/* SS Giyim Satış — tasarım sistemi. SS ürünleri birbirinden açık tonlu vurgu rengiyle ayrılır; Giyim Satış'ınki gül (açık pembe). */
:root {
  color-scheme: light;
  --bg: #f9f3f6;
  --surface: #ffffff;
  --surface-2: #faf9f7;
  --surface-3: #f0eeea;
  --border: #e4e1db;
  --border-strong: #cfcbc3;
  --text: #1b1a1f;
  --text-2: #57545d;
  --text-3: #8a8690;
  --brand: #c0528a;
  --brand-hover: #a8427a;
  --brand-soft: #fbe9f2;
  --brand-ink: #8c2f61;
  --side: #17151c;
  --side-2: #221f29;
  --side-text: #c9c5d0;
  --side-muted: #8b8694;
  --ok: #1d7a46;
  --ok-soft: #e3f3e9;
  --warn: #9a6200;
  --warn-soft: #fcf1d9;
  --bad: #c0332f;
  --bad-soft: #fbe6e5;
  --info: #2a63b8;
  --info-soft: #e5eefb;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --series-5: #e87ba4;
  --grid: #ebe9e4;
  --shadow: 0 1px 2px rgba(20, 18, 25, .06), 0 1px 1px rgba(20, 18, 25, .04);
  --shadow-lg: 0 12px 40px rgba(20, 18, 25, .18);
  --r: 10px;
  --r-sm: 7px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121116; --surface: #1b1a20; --surface-2: #211f27; --surface-3: #29272f;
    --border: #2f2d36; --border-strong: #423f4a; --text: #f2f0f5; --text-2: #bdb9c4; --text-3: #8b8792;
    --brand: #d0548c; --brand-hover: #de6c9f; --brand-soft: #3a1c2b; --brand-ink: #f0a3c5;
    --side: #0d0c10; --side-2: #1b1920;
    --ok: #4cc27f; --ok-soft: #173325; --warn: #e3a634; --warn-soft: #3a2c10; --bad: #ef6b66; --bad-soft: #3d1c1c;
    --info: #6aa2ef; --info-soft: #1a2940;
    --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500; --series-5: #d55181;
    --grid: #2a2830; --shadow: 0 1px 2px rgba(0, 0, 0, .4); --shadow-lg: 0 12px 40px rgba(0, 0, 0, .6);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121116; --surface: #1b1a20; --surface-2: #211f27; --surface-3: #29272f;
  --border: #2f2d36; --border-strong: #423f4a; --text: #f2f0f5; --text-2: #bdb9c4; --text-3: #8b8792;
  --brand: #d0548c; --brand-hover: #de6c9f; --brand-soft: #3a1c2b; --brand-ink: #f0a3c5;
  --side: #0d0c10; --side-2: #1b1920;
  --ok: #4cc27f; --ok-soft: #173325; --warn: #e3a634; --warn-soft: #3a2c10; --bad: #ef6b66; --bad-soft: #3d1c1c;
  --info: #6aa2ef; --info-soft: #1a2940;
  --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500; --series-5: #d55181;
  --grid: #2a2830; --shadow: 0 1px 2px rgba(0, 0, 0, .4); --shadow-lg: 0 12px 40px rgba(0, 0, 0, .6);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
h1 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 16px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.num, .money { font-variant-numeric: tabular-nums; white-space: nowrap; }
:where(svg.i) { width: 1.2em; height: 1.2em; flex: none; vertical-align: -.2em; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }
.pos { color: var(--ok); }
.neg { color: var(--bad); }
.strike { text-decoration: line-through; color: var(--text-3); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Boot & spinner */
.boot { height: 100vh; display: grid; place-items: center; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--border); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { padding: 60px; display: grid; place-items: center; }

/* ---------- Kabuk ---------- */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { background: var(--side); color: var(--side-text); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; overflow-y: auto; z-index: 30; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; color: #fff; }
.brand img { width: 32px; height: 32px; }
.brand b { display: block; font-size: 15px; letter-spacing: .01em; }
.brand small { display: block; color: var(--side-muted); font-size: 11.5px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav { padding: 6px 10px 16px; display: flex; flex-direction: column; gap: 1px; }
.nav-sec { color: var(--side-muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; padding: 14px 10px 5px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 8px; color: var(--side-text); font-weight: 500; }
.nav a:hover { background: var(--side-2); color: #fff; text-decoration: none; }
.nav a.active { background: var(--brand); color: #fff; }
.nav a svg { width: 18px; height: 18px; flex: none; opacity: .9; }
.nav .badge-count { margin-left: auto; background: rgba(255,255,255,.14); color: #fff; font-size: 11px; padding: 1px 7px; border-radius: 99px; }
.nav a.active .badge-count { background: rgba(0,0,0,.2); }
.side-foot { margin-top: auto; padding: 12px; border-top: 1px solid var(--side-2); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; cursor: pointer; width: 100%; background: none; border: 0; color: var(--side-text); text-align: left; }
.user-chip:hover { background: var(--side-2); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.user-chip small { display: block; color: var(--side-muted); font-size: 11.5px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); display: flex; align-items: center; gap: 10px; padding: 12px 24px; border-bottom: 1px solid var(--border); }
.menu-btn { display: none; }
.gsearch { position: relative; flex: 1; max-width: 480px; }
div.gsearch input { width: 100%; padding-left: 36px; }
.gsearch > svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 17px; color: var(--text-3); pointer-events: none; }
.gsearch-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-lg); max-height: 420px; overflow-y: auto; z-index: 40; }
.gs-group { padding: 8px 12px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.gs-item { display: flex; gap: 10px; align-items: center; padding: 8px 12px; cursor: pointer; }
.gs-item:hover, .gs-item.sel { background: var(--surface-3); }
.top-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.page { padding: 22px 24px 60px; max-width: 1480px; width: 100%; }
.page-head { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .sub { color: var(--text-2); margin-top: 3px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); font-size: 13px; margin-bottom: 6px; }

/* ---------- Butonlar ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; border-radius: var(--r-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-weight: 550; cursor: pointer; white-space: nowrap; line-height: 1.2; min-height: 36px; transition: background .12s, border-color .12s; }
.btn:hover { background: var(--surface-3); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-hover); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.danger.solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.sm { padding: 5px 10px; min-height: 30px; font-size: 13px; }
.btn.xs { padding: 3px 8px; min-height: 26px; font-size: 12px; }
.btn.lg { padding: 12px 20px; font-size: 16px; min-height: 48px; }
.btn.icon { padding: 0; width: 36px; }
.btn.icon.sm { width: 30px; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.btn-group .btn.on { background: var(--text); color: var(--surface); border-color: var(--text); z-index: 1; }

/* ---------- Form ---------- */
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], input[type=tel], input:not([type]), select, textarea {
  width: 100%; padding: 8px 11px; border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: var(--surface); min-height: 36px; outline: none; transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
textarea { resize: vertical; min-height: 70px; }
input.big { font-size: 18px; padding: 12px 14px; min-height: 48px; }
input.money-in { text-align: right; font-variant-numeric: tabular-nums; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--text-3); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-all { grid-column: 1 / -1; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }
.input-group { display: flex; }
.input-group input { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.input-group .btn, .input-group .addon { border-radius: 0 var(--r-sm) var(--r-sm) 0; margin-left: -1px; }
.addon { display: grid; place-items: center; padding: 0 10px; border: 1px solid var(--border-strong); background: var(--surface-3); color: var(--text-2); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar > input[type=search], .toolbar > .search { max-width: 320px; }
.toolbar select { width: auto; min-width: 150px; }

/* ---------- Kartlar ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow); min-width: 0; }
.card-h { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; }
.card-h .actions { margin-left: auto; display: flex; gap: 6px; }
.card-b { padding: 4px 16px 16px; }
.card-b.flush { padding: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.sep { height: 1px; background: var(--border); margin: 12px 0; }

/* KPI kutucukları */
.kpi { padding: 14px 16px; }
.kpi .lbl { color: var(--text-2); font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.kpi .lbl svg { width: 15px; height: 15px; flex: none; }
.kpi .val { font-size: 24px; font-weight: 700; margin-top: 6px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.kpi .cmp { font-size: 12.5px; margin-top: 4px; color: var(--text-2); }
.kpi .cmp b { font-weight: 650; }
.kpi.accent { background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 70%, #3b1030)); color: #fff; border: 0; }
.kpi.accent .lbl, .kpi.accent .cmp { color: rgba(255,255,255,.85); }
.delta { display: inline-flex; align-items: center; gap: 2px; font-weight: 650; }
.delta.up { color: var(--ok); }
.delta.down { color: var(--bad); }
.kpi.accent .delta { color: #fff; }

/* ---------- Tablo ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; }
.t th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-2); padding: 9px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface-2); position: sticky; top: 0; }
.t td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr.click { cursor: pointer; }
.t tbody tr.click:hover td { background: var(--surface-2); }
.t th.right, .t td.right { text-align: right; }
.t tfoot td { font-weight: 700; background: var(--surface-2); border-top: 1px solid var(--border); }
.t.compact td, .t.compact th { padding: 6px 10px; }
.t th.sortable { cursor: pointer; user-select: none; }
.t th.sortable:hover { color: var(--text); }
.empty { padding: 36px 16px; text-align: center; color: var(--text-2); }
.empty svg { width: 36px; height: 36px; color: var(--text-3); margin-bottom: 8px; }
.empty b { display: block; color: var(--text); margin-bottom: 4px; }

/* Rozetler */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 650; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.brand { background: var(--brand-soft); color: var(--brand-ink); }
.badge svg { width: 12px; height: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--border); font-size: 12.5px; }
.chip button { border: 0; background: none; padding: 0; cursor: pointer; color: var(--text-3); line-height: 1; font-size: 15px; }
.swatch { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); display: inline-block; flex: none; }

/* Sekmeler */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 10px 14px; cursor: pointer; color: var(--text-2); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--brand-ink); border-bottom-color: var(--brand); }
.tabs button .badge { margin-left: 6px; }

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(15, 12, 20, .5); display: grid; place-items: center; padding: 20px; z-index: 100; animation: fade .12s; }
.modal { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; animation: pop .14s ease-out; }
.modal.wide { max-width: 880px; }
.modal.xwide { max-width: 1100px; }
.modal-h { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-h h2 { font-size: 17px; }
.modal-h .x { margin-left: auto; }
.modal-b { padding: 18px 20px; overflow-y: auto; }
.modal-f { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 14px 14px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }

/* Toast */
#toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { background: var(--text); color: var(--surface); padding: 11px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); max-width: 380px; display: flex; gap: 10px; align-items: center; animation: pop .16s; font-weight: 500; }
.toast.err { background: var(--bad); color: #fff; }
.toast.ok { background: var(--ok); color: #fff; }
.toast svg { width: 18px; height: 18px; flex: none; }

/* Uyarı listesi */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--border); }
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.alert.warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.alert.bad { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.alert.info { background: var(--info-soft); border-color: transparent; color: var(--info); }
.alert.ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.alert .t-body { color: var(--text); }
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); min-width: 0; }
.li:last-child { border-bottom: 0; }
.li.click { cursor: pointer; }
.li.click:hover { background: var(--surface-2); margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.li .ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--surface-3); color: var(--text-2); }
.li .ico svg { width: 17px; height: 17px; }
.li .ico.brand { background: var(--brand-soft); color: var(--brand-ink); }
.li .ico.warn { background: var(--warn-soft); color: var(--warn); }
.li .ico.bad { background: var(--bad-soft); color: var(--bad); }
.li .ico.ok { background: var(--ok-soft); color: var(--ok); }
.li .ico.info { background: var(--info-soft); color: var(--info); }

/* ---------- Grafikler ---------- */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .axis text { fill: var(--text-3); font-size: 11px; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .bar { fill: var(--series-1); }
.chart .bar.alt { fill: var(--series-2); }
.chart .bar.hl { fill: var(--brand); }
.chart .hit:hover + .bar, .chart .bar:hover { opacity: .8; }
.chart-tip { position: absolute; pointer-events: none; background: var(--text); color: var(--surface); padding: 7px 10px; border-radius: 8px; font-size: 12px; white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); z-index: 5; box-shadow: var(--shadow-lg); }
.chart-tip b { display: block; font-size: 13px; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12.5px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 160px) 1fr auto; gap: 10px; align-items: center; padding: 5px 0; font-size: 13px; }
.hbar .track { height: 10px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.hbar .fill { height: 100%; background: var(--series-1); border-radius: 99px; }
.meter { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.meter > div { height: 100%; background: var(--series-1); border-radius: 99px; }

/* ---------- Kasa (POS) ---------- */
.pos-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 16px; align-items: start; }
.pos-scan { display: flex; gap: 8px; }
.pos-scan .grow { position: relative; }
.pos-scan input { font-size: 17px; padding: 12px 14px 12px 44px; min-height: 50px; }
.pos-scan .grow > svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; color: var(--text-3); }
.pos-results { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-lg); max-height: 420px; overflow-y: auto; z-index: 15; }
.pos-res { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 9px 14px; cursor: pointer; border-bottom: 1px solid var(--border); }
.pos-res:hover, .pos-res.sel { background: var(--surface-3); }
.cart-line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 12px; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--border); }
.cart-line.ret { background: var(--bad-soft); }
.cart-line .nm b { display: block; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 8px; overflow: hidden; }
.qty button { width: 30px; height: 32px; border: 0; background: var(--surface-2); cursor: pointer; font-size: 16px; }
.qty button:hover { background: var(--surface-3); }
.qty span { min-width: 34px; text-align: center; font-weight: 650; }
.pos-side { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 12px; }
.totals .tr { display: flex; justify-content: space-between; padding: 4px 0; }
.totals .grand { font-size: 28px; font-weight: 800; padding-top: 10px; margin-top: 6px; border-top: 1px dashed var(--border-strong); letter-spacing: -.01em; }
.pay-methods { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.pay-btn { padding: 14px 10px; border: 1px solid var(--border-strong); border-radius: var(--r); background: var(--surface); cursor: pointer; font-weight: 650; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pay-btn svg { width: 22px; height: 22px; }
.pay-btn:hover { border-color: var(--brand); background: var(--brand-soft); }
.pay-btn:disabled { opacity: .45; cursor: not-allowed; background: var(--surface); border-color: var(--border-strong); }
.quick-cash { display: flex; gap: 6px; flex-wrap: wrap; }
.kbd { font-family: var(--mono); font-size: 11px; padding: 1px 5px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 4px; color: var(--text-2); background: var(--surface-2); }

/* Varyant matrisi */
.matrix { border-collapse: collapse; }
.matrix th, .matrix td { border: 1px solid var(--border); padding: 4px; text-align: center; }
.matrix th { background: var(--surface-2); font-size: 12px; padding: 6px 8px; }
.matrix td input { width: 64px; text-align: center; padding: 5px; min-height: 30px; }
.matrix td.low { background: var(--warn-soft); }
.matrix td.out { background: var(--bad-soft); }
.matrix td.none { background: var(--surface-3); }
.cell-btn { border: 0; background: none; cursor: pointer; font-weight: 650; min-width: 44px; padding: 6px; border-radius: 6px; font-variant-numeric: tabular-nums; }
.cell-btn:hover { background: var(--surface-3); }

/* Giriş ekranı */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-hero { background: radial-gradient(circle at 20% 20%, #3a1a2c, var(--side) 60%); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-hero h1 { font-size: 38px; line-height: 1.12; max-width: 520px; letter-spacing: -.02em; }
.auth-hero p { color: #cfc9d6; font-size: 16px; max-width: 480px; }
.auth-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 22px; max-width: 540px; margin-top: 30px; }
.auth-feats div { display: flex; gap: 10px; color: #e6e1ec; font-size: 14px; }
.auth-feats svg { width: 18px; height: 18px; color: #f0a3c5; flex: none; margin-top: 2px; }
.auth-form { display: grid; place-items: center; padding: 30px; }
.auth-box { width: 100%; max-width: 380px; }
.auth-box h2 { font-size: 24px; margin-bottom: 6px; }

/* SaaS: tanıtım, kayıt, lisans bandı, Paket ve Ödeme */
.auth-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.btn.ghost-light { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.25); color: #fff; }
.btn.ghost-light:hover { background: rgba(255,255,255,.16); }
.auth-box.wide { max-width: 560px; }
.logo-prev { max-height: 56px; max-width: 160px; border-radius: 8px; border: 1px solid var(--border); background: #fff; padding: 4px; }
.brand img.firma-logo { object-fit: contain; background: #fff; border-radius: 8px; padding: 2px; }
.ok-ring { width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); }
.ok-ring svg { width: 32px; height: 32px; }
.firma-no { font: 700 30px/1.2 var(--mono); letter-spacing: .08em; padding: 14px; border: 2px dashed var(--brand); border-radius: var(--r); color: var(--brand-ink); background: var(--brand-soft); }
.lisans-bandi { margin: 12px 24px 0; align-items: center; }
.lisans-bandi .btn { flex: none; }
.paket-kart { text-align: left; cursor: pointer; font: inherit; color: inherit; padding: 0; border: 2px solid var(--border); }
.paket-kart.on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.paket-kart .row svg { width: 16px; height: 16px; flex: none; }
.zil { position: relative; }
.zil-rozet { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; }
.bildirim-satir { align-items: center; }
.duyuru-bandi + .lisans-bandi { margin-top: 8px; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 99px; padding: 2px; background: var(--surface-2); }
.seg button { border: 0; background: none; padding: 5px 14px; border-radius: 99px; cursor: pointer; font-weight: 600; color: var(--text-2); }
.seg button.on { background: var(--brand); color: #fff; }
.iban-kutu { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; padding: 12px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--border); }
.iban-kutu .mono { font-size: 15px; letter-spacing: .03em; }
.iban-kutu > .small { grid-column: 1 / -1; }
@media (max-width: 960px) { .paketler { grid-template-columns: 1fr; } .lisans-bandi { margin: 10px 12px 0; } }

/* Etiket & fiş yazdırma */
#print-area { display: none; }
@media print {
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block !important; }
  body { background: #fff; color: #000; }
  @page { margin: 6mm; }
}
.receipt { width: 72mm; font: 12px/1.35 var(--mono); color: #000; }
.receipt h3 { text-align: center; font-size: 15px; }
.receipt .c { text-align: center; }
.receipt .ln { display: flex; justify-content: space-between; gap: 6px; }
.receipt hr { border: 0; border-top: 1px dashed #000; margin: 6px 0; }
.labels { display: flex; flex-wrap: wrap; gap: 2mm; }
.label { width: 50mm; height: 30mm; border: 1px dashed #bbb; padding: 1.5mm 2mm; display: flex; flex-direction: column; font: 9px/1.2 var(--font); color: #000; overflow: hidden; page-break-inside: avoid; }
.label .ln1 { font-weight: 700; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.label .ln2 { display: flex; justify-content: space-between; }
.label .pr { font-size: 14px; font-weight: 800; }
.label svg { width: 100%; height: 11mm; margin-top: auto; }
@media print { .label { border: 0; } }

/* ---------- Duyarlı ---------- */
@media (max-width: 1180px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pos-grid { grid-template-columns: minmax(0, 1fr) 340px; }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; transform: translateX(-100%); transition: transform .2s; }
  .shell.nav-open .side { transform: none; box-shadow: var(--shadow-lg); }
  .shell.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 25; }
  .menu-btn { display: inline-flex; }
  .g3, .g-main, .g2 { grid-template-columns: minmax(0, 1fr); }
  .pos-grid { grid-template-columns: minmax(0, 1fr); }
  .pos-side { position: static; }
  .auth { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
}
@media (max-width: 640px) {
  .page { padding: 16px 16px 60px; }
  .topbar { padding: 10px 16px; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi .val { font-size: 19px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .page-head .actions { margin-left: 0; width: 100%; }
  .cart-line { grid-template-columns: minmax(0, 1fr) auto; }
  .hbar { grid-template-columns: 90px 1fr auto; }
  .top-actions .hide-sm { display: none; }
  .modal-bg { padding: 0; align-items: end; }
  .modal { max-height: 94vh; border-radius: 14px 14px 0 0; }
  .toolbar > input[type=search], .toolbar > .search { max-width: none; }
}

/* ---------- Aranabilir seçici (combobox) ---------- */
.combo { position: relative; min-width: 0; }
.combo input { padding-right: 28px; }
.combo-clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; font-size: 18px; line-height: 1; color: var(--text-3); cursor: pointer; padding: 2px 4px; }
.combo-list { position: absolute; top: calc(100% + 4px); left: 0; right: 0; min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-lg); max-height: 300px; overflow-y: auto; z-index: 120; }
.combo-item { padding: 7px 11px; cursor: pointer; min-width: 0; }
.combo-item:hover, .combo-item.sel { background: var(--surface-3); }
.combo-item.cur { font-weight: 650; }
.combo-item.more { text-align: center; color: var(--brand-ink); font-weight: 600; font-size: 12.5px; }
.search { position: relative; min-width: 220px; flex: 1; max-width: 360px; }
.search > svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; color: var(--text-3); pointer-events: none; }
.search input { padding-left: 32px; }
.toolbar .combo { min-width: 180px; max-width: 240px; }
.load-more { display: flex; gap: 12px; align-items: center; justify-content: center; padding: 14px; }
.export .btn svg { width: 14px; height: 14px; }
.filterbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.filterbar .combo { width: 190px; }
.filterbar select { width: auto; }

/* Çizgi / yığılmış grafik */
.chart .line { fill: none; stroke-width: 2.2; stroke: var(--series-1); }
.chart .line.s2 { stroke: var(--series-2); }
.chart .line.s3 { stroke: var(--series-3); }
.chart .line.s4 { stroke: var(--series-4); }
.chart .line.dashed { stroke-dasharray: 5 4; }
.chart .dot { fill: var(--series-1); }
.chart .dot.s2 { fill: var(--series-2); }
.chart .dot.s3 { fill: var(--series-3); }
.chart .seg { fill: var(--series-1); }
.chart .seg.s2 { fill: var(--series-2); }
.chart .seg.s3 { fill: var(--series-3); }
.chart .seg.s4 { fill: var(--series-4); }
.chart .seg.s5 { fill: var(--series-5); }
.chart .guide { stroke: var(--border-strong); stroke-dasharray: 3 3; }
.swatch.dashed { background-image: repeating-linear-gradient(90deg, transparent 0 2px, var(--surface) 2px 4px) !important; }

/* Yetki matrisi */
.perm-table td, .perm-table th { padding: 6px 10px; }
.perm-table td.c, .perm-table th.c { text-align: center; }
.perm-table .grp td { background: var(--surface-2); font-weight: 700; }
.tri { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 7px; overflow: hidden; }
.tri button { border: 0; background: var(--surface); padding: 3px 8px; font-size: 12px; cursor: pointer; }
.tri button.on { background: var(--text); color: var(--surface); }
.tri button.on.allow { background: var(--ok); color: #fff; }
.tri button.on.deny { background: var(--bad); color: #fff; }
.diff td { vertical-align: top; font-family: var(--mono); font-size: 12px; word-break: break-word; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px 18px; }
.kv > div > .k { font-size: 12px; color: var(--text-3); }
.kv > div > .v { font-weight: 600; }
.row-void td { color: var(--text-3); text-decoration: line-through; }
.lines-table input { min-height: 32px; padding: 5px 8px; }
.lines-table td { vertical-align: middle; }

/* Yazdırılabilir rapor */
.print-report { font: 11px/1.35 var(--font); color: #000; }
.print-report h2 { font-size: 16px; margin-bottom: 4px; }
.print-report table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.print-report th, .print-report td { border-bottom: 1px solid #ccc; padding: 3px 6px; text-align: left; }
.print-report th { position: static; background: #f3f3f3; }
.print-report .right { text-align: right; }
@media print { .print-report .chart svg { max-width: 100%; } }

/* ---------- Galeri kalıbı 3: kullanım bilgisi, yasal sayfalar, davet, dar ekran ---------- */
.kullanim-kapisi { position: fixed; inset: 0; z-index: 100; overflow-y: auto; background: var(--surface); }
.kullanim-ic { max-width: 720px; margin: 0 auto; padding: 28px 18px 40px; }
.kullanim-alt { border-top: 1px solid var(--border); padding-top: 14px; }
.yasal-metin section h3 { margin: 6px 0 2px; font-size: 14.5px; }
.yasal-metin section p { margin: 0; line-height: 1.55; color: var(--text-2); }
.satici-kutu { padding: 8px 12px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); line-height: 1.5; overflow-wrap: anywhere; }
.yasal-sayfa { max-width: 760px; }
.depolama-cubuk { height: 10px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.depolama-cubuk > span { display: block; height: 100%; background: var(--ok); }
.depolama-cubuk.sari > span { background: var(--warn); }
.depolama-cubuk.kirmizi > span { background: var(--bad); }
/* Dar ekran (360 / 390 px): üst çubuktaki arama kutusu sıkışabilsin, sayfa yana taşmasın */
.gsearch { min-width: 0; }
.main, .card { max-width: 100%; }
@media (max-width: 640px) {
  .topbar { gap: 6px; }
  .top-actions { gap: 4px; }
  .auth-form { padding: 16px; }
  .firma-no { font-size: 22px; }
  .lisans-bandi { flex-wrap: wrap; }
  #davet-baglantisi { font-size: 12px; }
}
/* Süzgeç düğme grupları dar ekranda sayfayı yana itmez, kendi içinde kayar (Müşteriler: 360 px'te +132 px taşıyordu) */
.filterbar > div, .filterbar .btn-group { max-width: 100%; }
.filterbar > div:has(> .btn-group) { overflow-x: auto; }
