/* naQShe Stok — "Atelier Commerce" tasarım sistemi (dizayn/atelier_commerce/DESIGN.md) */
:root {
  /* naQShe logosu: canlı yeşil (#0c9e49) + siyah. Düğme/aktif menü için okunabilirlik adına biraz koyu yeşil. */
  --brand: #0c9e49;
  --surface: #f6f9f6;
  --surface-low: #edf5ef;
  --surface-container: #e1eee5;
  --surface-high: #d3e6d9;
  --card: #ffffff;
  --on-surface: #101a14;
  --on-variant: #3d4a42;
  --outline: #6f7b73;
  --outline-variant: #c5d0c8;
  --primary: #066b31;
  --primary-container: #087f3a;
  --primary-soft: #d8f3e1;
  --on-primary-soft: #06642e;
  --secondary: #0a7d4a;
  --secondary-soft: #7ff0b5;
  --secondary-tint: #d9f5e5;
  --tertiary: #1f2a24;
  --tertiary-soft: #e4e9e5;
  --error: #ba1a1a;
  --error-soft: #ffdad6;
  --on-error-soft: #93000a;
  --warn: #b45309;
  --warn-soft: #fef3c7;
  --slate-900: #111a14;
  --slate-500: #66716a;
  --slate-300: #cdd5cf;
  --slate-200: #e1e7e2;
  --slate-100: #eff3f0;
  --slate-50: #f7faf8;

  --font: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --r-sm: 4px;
  --r-md: 8px;
  --r-pill: 12px;
  --shadow-1: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-2: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-3: 0 10px 15px -3px rgba(15, 23, 42, 0.1), 0 4px 6px -4px rgba(8, 127, 58, 0.08);
  --focus: 0 0 0 3px rgba(12, 158, 73, 0.25);
  --header-h: 64px;
  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--surface); color: var(--on-surface);
  font: 400 14px/20px var(--font); -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--primary-container); text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--primary-container); outline-offset: 2px; }

.mono { font-family: var(--mono); letter-spacing: -0.02em; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.03em; font-weight: 600; }
.muted { color: var(--slate-500); }
.right { text-align: right; }
.center { text-align: center; }
.t-pos { color: var(--secondary); }
.kasa-summary { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 12px 0; }
.t-neg { color: var(--error); }
.nowrap { white-space: nowrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Kabuk ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; height: var(--header-h); z-index: 40;
  background: var(--card); box-shadow: 0 1px 8px rgba(0, 0, 0, 0.05); border-bottom: 1px solid var(--slate-100);
  display: flex; align-items: center; gap: 12px; padding: 0 24px;
}
.brand { display: flex; align-items: center; user-select: none; flex: none; }
.brand-logo { height: 36px; width: auto; display: block; }
.auth-card .brand-logo { height: 56px; }
.header-sep { width: 1px; height: 24px; background: var(--outline-variant); }
.loc-chip {
  display: flex; align-items: center; gap: 6px; background: var(--surface-low); padding: 6px 10px; border-radius: var(--r-sm);
  color: var(--on-variant); max-width: 260px; position: relative;
}
.loc-chip .ic { color: var(--primary-container); }
.loc-chip select {
  appearance: none; -webkit-appearance: none; border: 0; background: transparent; font-weight: 600; font-size: 12px; cursor: pointer;
  padding: 0 16px 0 0; max-width: 200px; text-overflow: ellipsis; color: var(--on-surface);
}
.loc-chip .chev { position: absolute; right: 8px; pointer-events: none; width: 16px; height: 16px; }
.loc-chip span.txt { font-weight: 600; font-size: 12px; color: var(--on-surface); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav a {
  padding: 8px 12px; border-radius: var(--r-sm); color: var(--on-variant); font-weight: 500; white-space: nowrap;
  transition: background 0.12s, color 0.12s;
}
.nav a:hover { background: var(--surface-container); color: var(--on-surface); }
.nav a.active { background: var(--primary-container); color: #fff; font-weight: 600; box-shadow: var(--shadow-1); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.scan-btn {
  display: inline-flex; align-items: center; gap: 6px; background: var(--surface-low); border: 0; border-radius: var(--r-sm);
  padding: 8px 12px; font: 500 12px/16px var(--mono); color: var(--on-surface); letter-spacing: -0.02em;
}
.scan-btn:hover { background: var(--surface-container); }
.scan-btn .ic { color: var(--secondary); }
.user-btn {
  display: flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 4px 6px 4px 8px; border-radius: var(--r-sm);
  text-align: left;
}
.user-btn:hover { background: var(--surface-low); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--primary-soft); color: var(--on-primary-soft);
  display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.user-meta { display: flex; flex-direction: column; line-height: 14px; }
.user-meta strong { font-size: 12px; font-weight: 600; }
.user-meta span { font-size: 11px; color: var(--outline); }
.menu {
  position: absolute; right: 24px; top: calc(var(--header-h) - 6px); background: var(--card); border: 1px solid var(--slate-200);
  border-radius: var(--r-md); box-shadow: var(--shadow-3); min-width: 220px; padding: 6px; z-index: 60;
}
.menu button, .menu .menu-info {
  display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 10px; border: 0; background: transparent;
  border-radius: var(--r-sm); text-align: left;
}
.menu button:hover { background: var(--slate-100); }
.menu .menu-info { color: var(--slate-500); font-size: 12px; cursor: default; }
.menu hr { border: 0; border-top: 1px solid var(--slate-100); margin: 4px 0; }

.main { padding: calc(var(--header-h) + 24px) 32px 40px; max-width: 1600px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.eyebrow { font: 500 11px/14px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--primary-container); }
.page-head h1 { font: 600 28px/36px var(--font); letter-spacing: -0.015em; }
.page-head p { color: var(--on-variant); margin-top: 2px; }

.bottom-nav {
  display: none; position: fixed; inset: auto 0 0 0; height: var(--nav-h); background: var(--card); z-index: 40;
  border-top: 1px solid var(--slate-200); padding-bottom: env(safe-area-inset-bottom);
  grid-auto-flow: column; grid-auto-columns: 1fr;
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--outline);
  font: 500 11px/14px var(--font);
}
.bottom-nav a .ic { width: 22px; height: 22px; }
.bottom-nav a.active { color: var(--primary-container); font-weight: 700; }

/* ---------- Kartlar / KPI ---------- */
.card { background: var(--card); border: 1px solid var(--slate-200); border-radius: var(--r-md); box-shadow: var(--shadow-1); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 20px 0; }
.card-head h2 { font: 600 18px/26px var(--font); letter-spacing: -0.01em; }
.card-head .eyebrow { display: block; margin-bottom: 2px; }
.card-head .sub { color: var(--slate-500); font-size: 12px; margin-top: 2px; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi { padding: 16px 18px; position: relative; overflow: hidden; }
.kpi::after { content: ''; position: absolute; inset: auto 0 0 0; height: 3px; background: var(--kpi, var(--brand)); }
.kpi.green { --kpi: var(--secondary); }
.kpi.red { --kpi: var(--error); }
.kpi.iris { --kpi: var(--tertiary); }
.kpi-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.kpi-label { color: var(--on-variant); font-size: 12px; font-weight: 500; }
.kpi-icon { width: 36px; height: 36px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-container); flex: none; }
.kpi.green .kpi-icon { background: var(--secondary-tint); color: var(--secondary); }
.kpi.red .kpi-icon { background: var(--error-soft); color: var(--error); }
.kpi.iris .kpi-icon { background: var(--tertiary-soft); color: var(--tertiary); }
.kpi-value { font: 600 30px/38px var(--mono); letter-spacing: -0.04em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi-value small { font: 400 12px var(--font); letter-spacing: 0; color: var(--slate-500); margin-left: 4px; }
.kpi-foot { margin-top: 8px; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--slate-500); min-height: 22px; }

/* ---------- Düğmeler ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border-radius: var(--r-sm); border: 1px solid transparent; font-weight: 600; white-space: nowrap; text-decoration: none;
  transition: background 0.12s, box-shadow 0.12s, transform 0.05s;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--primary-container); color: #fff; }
.btn-primary:hover:not([disabled]) { background: var(--primary); }
.btn-secondary { background: var(--card); border-color: var(--slate-300); color: var(--slate-900); }
.btn-secondary:hover:not([disabled]) { background: var(--slate-100); }
.btn-success { background: var(--secondary); color: #fff; }
.btn-success:hover:not([disabled]) { background: #005236; }
.btn-danger { background: var(--card); border-color: #f3b4ae; color: var(--error); }
.btn-danger:hover:not([disabled]) { background: var(--error-soft); }
.btn-danger-solid { background: var(--error); color: #fff; }
.btn-tint { background: var(--surface-low); color: var(--on-primary-soft); }
.btn-tint:hover:not([disabled]) { background: var(--surface-container); }
.btn-ghost { background: transparent; color: var(--on-variant); }
.btn-ghost:hover:not([disabled]) { background: var(--slate-100); }
.btn-lg { min-height: 52px; font-size: 16px; padding: 0 22px; }
.btn-sm { min-height: 32px; padding: 0 10px; font-size: 12px; }
.btn-icon { width: 36px; min-height: 36px; padding: 0; }
.btn-block { width: 100%; }

/* ---------- Form ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font: 500 12px/16px var(--font); color: var(--on-variant); }
.input, .select, .textarea {
  width: 100%; min-height: 40px; padding: 8px 12px; background: var(--card); border: 1px solid var(--slate-300);
  border-radius: var(--r-sm); color: var(--slate-900); transition: border-color 0.12s, box-shadow 0.12s;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary-container); box-shadow: var(--focus); }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--error); }
.input::placeholder { color: #94a3b8; }
.select { appearance: none; -webkit-appearance: none; padding-right: 32px; background-repeat: no-repeat; background-position: right 10px center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23747686' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.input-mono { font-family: var(--mono); letter-spacing: -0.02em; }
.input-num { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.hint { font-size: 12px; color: var(--slate-500); }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--primary-container); }

.scanbar {
  display: flex; align-items: center; gap: 8px; background: var(--surface-low); border: 1px solid transparent; border-radius: var(--r-md);
  padding: 6px 6px 6px 12px; transition: box-shadow 0.15s, border-color 0.15s, background 0.15s; position: relative;
}
.scanbar:focus-within { border-color: var(--primary-container); box-shadow: var(--focus); background: #fff; }
.scanbar > .ic { color: var(--primary-container); width: 22px; height: 22px; }
.scanbar input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font: 500 15px/24px var(--mono); letter-spacing: -0.02em; padding: 8px 0; }
.scanbar input::placeholder { font-family: var(--font); letter-spacing: 0; color: #64748b; font-weight: 400; }
.scanbar.flash-ok { background: var(--secondary-tint); border-color: var(--secondary); animation: flash 0.7s ease-out; }
.scanbar.flash-err { background: var(--error-soft); border-color: var(--error); }
@keyframes flash { 0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); } 100% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); } }
.kbd { font: 500 11px/14px var(--mono); color: var(--slate-500); background: var(--slate-100); border-radius: var(--r-sm); padding: 4px 6px; }

.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--card); border: 1px solid var(--slate-200);
  border-radius: var(--r-md); box-shadow: var(--shadow-3); z-index: 30; max-height: 360px; overflow: auto; padding: 4px;
}
.suggest button {
  display: flex; width: 100%; align-items: center; gap: 10px; text-align: left; border: 0; background: transparent; padding: 10px;
  border-radius: var(--r-sm); min-height: 48px;
}
.suggest button:hover, .suggest button.hl { background: var(--surface-low); }
.suggest .empty { padding: 14px; color: var(--slate-500); text-align: center; }

/* ---------- Rozet / çip ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: var(--r-pill); font: 500 12px/18px var(--font);
  background: var(--slate-100); color: #475569; white-space: nowrap;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.green { background: var(--secondary-tint); color: var(--secondary); }
.badge.red { background: var(--error-soft); color: var(--on-error-soft); }
.badge.amber { background: var(--warn-soft); color: var(--warn); }
.badge.blue { background: var(--primary-soft); color: var(--on-primary-soft); }
.badge.iris { background: var(--tertiary-soft); color: var(--tertiary); }
.badge.mono { font-family: var(--mono); font-size: 12px; letter-spacing: -0.02em; }
.sku {
  font: 500 12px/16px var(--mono); letter-spacing: -0.02em; background: var(--slate-50); border: 1px solid var(--slate-200);
  color: #475569; border-radius: var(--r-sm); padding: 2px 6px; white-space: nowrap;
}
.swatch { display: inline-block; width: 8px; height: 8px; border-radius: 50%; border: 1px solid rgba(15, 23, 42, 0.18); flex: none; }
.pills { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.pill { background: var(--slate-100); color: #475569; border-radius: var(--r-pill); padding: 1px 8px; font-size: 12px; line-height: 18px; display: inline-flex; align-items: center; gap: 5px; }
.pill.size { font-family: var(--mono); font-size: 11px; background: var(--primary-soft); color: var(--on-primary-soft); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 0; background: var(--surface-container); color: var(--on-variant); padding: 6px 14px; border-radius: 999px; font-weight: 500;
  min-height: 34px; white-space: nowrap;
}
.chip:hover { background: var(--surface-high); }
.chip.active { background: var(--primary-container); color: #fff; }
.seg { display: inline-flex; background: var(--slate-100); border-radius: var(--r-sm); padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 3px; color: #475569; font-weight: 500; min-height: 32px; white-space: nowrap; }
.seg button.active { background: #fff; color: var(--primary-container); box-shadow: var(--shadow-1); font-weight: 600; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--slate-200); }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 14px; border: 0; background: transparent; color: var(--on-variant);
  font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tabs a:hover, .tabs button:hover { color: var(--on-surface); }
.tabs .active { color: var(--primary-container); border-bottom-color: var(--primary-container); font-weight: 600; }
.tabs .count { background: var(--primary-soft); color: var(--on-primary-soft); font: 600 11px/16px var(--mono); padding: 1px 7px; border-radius: 999px; }

/* ---------- Tablo ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  position: sticky; top: 0; background: var(--slate-50); text-align: left; font: 500 11px/14px var(--font); letter-spacing: 0.05em;
  text-transform: uppercase; color: #475569; padding: 12px 14px; border-bottom: 1px solid var(--slate-200); white-space: nowrap;
}
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--slate-100); vertical-align: middle; }
.tbl tbody tr:hover { background: var(--slate-50); }
.tbl th.right, .tbl td.right { text-align: right; }
.tbl tr.cancelled td { color: var(--slate-500); text-decoration: line-through; }
.tbl tr.cancelled td:last-child { text-decoration: none; }
.link-sku { cursor: pointer; }
.link-sku:hover { border-color: var(--brand); color: var(--primary-container); }
.tbl tr.crit { background: #fff6f5; }
.tbl tfoot td { background: var(--slate-50); font-weight: 700; border-top: 2px solid var(--slate-200); }
.prod-cell { display: flex; flex-direction: column; gap: 3px; min-width: 160px; }
.prod-cell strong { font-weight: 600; }
.qty-zero { color: var(--slate-300); }
.qty-low { color: var(--warn); }
.tbl-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; flex-wrap: wrap; border-top: 1px solid var(--slate-100); color: var(--slate-500); font-size: 12px; }
.pager { display: flex; align-items: center; gap: 8px; }
.pager .num { min-width: 64px; text-align: center; color: var(--on-surface); }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 16px; }
.toolbar .field { flex: 0 0 auto; }
.toolbar .select { width: auto; min-width: 150px; max-width: 100%; }
.toolbar .search { flex: 1 1 280px; min-width: 200px; position: relative; }
.toolbar .search .ic { position: absolute; left: 12px; top: 11px; color: var(--outline); }
.toolbar .search input { padding-left: 38px; }

/* ---------- Modal ---------- */
dialog.modal {
  border: 0; padding: 0; border-radius: var(--r-md); box-shadow: var(--shadow-3); width: min(560px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px); color: var(--on-surface); background: var(--card); overflow: hidden;
}
dialog.modal[open] { display: flex; flex-direction: column; animation: pop 0.14s ease-out; }
dialog.modal.wide { width: min(880px, calc(100vw - 24px)); }
dialog.modal.narrow { width: min(420px, calc(100vw - 24px)); }
dialog.modal::backdrop { background: rgba(11, 28, 48, 0.45); }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(0.99); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--slate-100); }
.modal-head h2 { font: 600 18px/26px var(--font); }
.modal-body { padding: 20px; overflow: auto; display: flex; flex-direction: column; gap: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--slate-100); background: var(--slate-50); flex-wrap: wrap; }

/* ---------- Bildirim ---------- */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(480px, calc(100vw - 24px)); }
.toast {
  pointer-events: auto; background: var(--on-surface); color: #fff; padding: 12px 16px; border-radius: var(--r-md); box-shadow: var(--shadow-3);
  display: flex; align-items: center; gap: 10px; animation: pop 0.16s ease-out; width: 100%;
}
.toast.ok { background: var(--secondary); }
.toast.err { background: var(--error); }
.toast.warn { background: var(--warn); }

/* ---------- Boş durum / yükleniyor ---------- */
.empty { text-align: center; padding: 48px 16px; color: var(--slate-500); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty .ic { width: 36px; height: 36px; color: var(--slate-300); }
.empty strong { color: var(--on-surface); font-weight: 600; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--slate-200); border-top-color: var(--primary-container); border-radius: 50%; animation: spin 0.7s linear infinite; margin: 32px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Giriş ---------- */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background:
  radial-gradient(1000px 500px at 100% -10%, var(--primary-soft), transparent 60%), var(--surface); }
.auth-card { width: min(420px, 100%); padding: 32px 28px; display: flex; flex-direction: column; gap: 20px; box-shadow: var(--shadow-3); }
.auth-card h1 { font: 700 24px/32px var(--font); letter-spacing: -0.015em; }
.error-box { background: var(--error-soft); color: var(--on-error-soft); border-radius: var(--r-sm); padding: 10px 12px; font-size: 13px; }

/* ---------- Panel ---------- */
.dash-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.bars { display: flex; align-items: flex-end; gap: 12px; height: 200px; padding: 8px 20px 0; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.bar-pair { display: flex; align-items: flex-end; gap: 4px; width: 100%; height: 100%; justify-content: center; }
.bar { width: 42%; max-width: 34px; border-radius: 3px 3px 0 0; min-height: 2px; background: var(--brand); transition: height 0.4s ease; }
.bar.cost { background: var(--slate-300); }
.bar-col.today .bar { background: var(--primary); }
.bar-label { font: 500 11px/14px var(--mono); color: var(--slate-500); }
.bar-col.today .bar-label { color: var(--primary-container); font-weight: 600; }
.bar-val { font: 600 11px/14px var(--mono); color: var(--primary-container); height: 14px; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--on-variant); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.meter { height: 8px; background: var(--slate-100); border-radius: 999px; overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.dist-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.dist-row .row { justify-content: space-between; flex-wrap: nowrap; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--slate-100); }
.list-row:first-child { border-top: 0; }
.rank { width: 28px; height: 28px; border-radius: var(--r-md); background: var(--primary-soft); color: var(--on-primary-soft); display: grid; place-items: center; font: 600 12px var(--mono); flex: none; }
.alert-card { border-left: 4px solid var(--error); }
.alert-item { background: #fff6f5; border-radius: var(--r-md); padding: 10px 12px; display: flex; justify-content: space-between; gap: 10px; align-items: center; }

/* ---------- POS ---------- */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 400px; grid-template-areas: 'scan cart' 'tiles cart'; grid-template-rows: auto 1fr; gap: 20px; align-items: start; }
.pos-scan { grid-area: scan; }
.pos-tiles { grid-area: tiles; }
.pos > .cart { grid-area: cart; }
.pos-ribbon { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; padding: 12px; }
.ribbon-item { display: flex; align-items: center; gap: 6px; background: var(--surface-container); padding: 6px 10px; border-radius: var(--r-sm); }
.ribbon-item .ic { color: var(--primary-container); }
.ribbon-item.green { background: rgba(16, 185, 129, 0.12); }
.ribbon-item.green .ic { color: var(--secondary); }
.ribbon-item small { font: 500 11px/14px var(--font); text-transform: uppercase; letter-spacing: 0.05em; color: var(--on-variant); }
.ribbon-item select { border: 0; background: transparent; font-weight: 600; padding-right: 4px; max-width: 200px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.tile {
  text-align: left; background: var(--card); border: 1px solid var(--slate-200); border-radius: var(--r-md); padding: 12px; display: flex; flex-direction: column;
  gap: 8px; box-shadow: var(--shadow-1); transition: box-shadow 0.12s, transform 0.05s, border-color 0.12s; min-height: 132px;
}
.tile:hover:not([disabled]) { box-shadow: var(--shadow-2); border-color: var(--primary-soft); }
.tile:active:not([disabled]) { transform: scale(0.99); }
.tile[disabled] { opacity: 0.55; cursor: not-allowed; }
.tile .name { font-weight: 600; line-height: 18px; }
.tile .foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tile .price { font: 600 16px/22px var(--mono); letter-spacing: -0.03em; color: var(--primary-container); }
.cart { position: sticky; top: calc(var(--header-h) + 16px); box-shadow: var(--shadow-2); display: flex; flex-direction: column; max-height: calc(100dvh - var(--header-h) - 32px); }
.cart-lines { overflow: auto; padding: 0 16px; flex: 1 1 auto; min-height: 120px; }
.cart-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 12px 0; border-bottom: 1px solid var(--slate-100); align-items: center; }
.cart-line .ctl { display: flex; align-items: center; gap: 8px; grid-column: 1 / -1; justify-content: space-between; }
.stepper { display: inline-flex; align-items: center; background: var(--slate-50); border: 1px solid var(--slate-200); border-radius: var(--r-sm); }
.stepper button { width: 36px; height: 36px; border: 0; background: transparent; display: grid; place-items: center; color: var(--on-variant); border-radius: var(--r-sm); }
.stepper button:hover { background: var(--slate-100); }
.stepper input { width: 52px; height: 36px; border: 0; background: transparent; text-align: center; font: 600 15px var(--mono); }
.price-input { width: 96px; min-height: 36px; }
.cart-sum { padding: 16px; background: var(--surface-low); border-radius: 0 0 var(--r-md) var(--r-md); display: flex; flex-direction: column; gap: 12px; }
.total-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.total-row .lbl { font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; font-size: 12px; }
.total-row .amt { font: 700 30px/36px var(--mono); letter-spacing: -0.04em; color: var(--primary-container); }
.cam-box { position: relative; overflow: hidden; border-radius: var(--r-md); background: #101a14; }
.cam-box .reader { width: 100%; min-height: 220px; }
.cam-box video { width: 100% !important; object-fit: cover; }
.cam-hint { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); background: rgba(11, 28, 48, 0.75); color: #fff; padding: 5px 12px; border-radius: 999px; font-size: 12px; display: flex; gap: 6px; align-items: center; pointer-events: none; white-space: nowrap; }
.cam-badge { position: absolute; left: 10px; top: 10px; background: rgba(255, 255, 255, 0.9); border-radius: 999px; padding: 3px 10px; font: 600 11px var(--mono); color: var(--secondary); display: flex; gap: 6px; align-items: center; }
.cam-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--secondary); }
.cam-fallback { padding: 24px 16px; color: #fff; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }

/* ---------- Hareket editörü ---------- */
.route { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: end; }
.route .arrow { width: 36px; height: 40px; display: grid; place-items: center; color: var(--primary-container); }
.lines { border: 1px solid var(--slate-200); border-radius: var(--r-md); overflow: hidden; }
.line { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--slate-100); }
.line:last-child { border-bottom: 0; }
.line .info { flex: 1; min-width: 0; }
.type-in { background: var(--secondary-tint); color: var(--secondary); }
.type-out { background: var(--error-soft); color: var(--on-error-soft); }
.type-transfer { background: var(--primary-soft); color: var(--on-primary-soft); }
.type-sale { background: var(--slate-100); color: #475569; }

.stat-strip { display: flex; gap: 24px; flex-wrap: wrap; padding: 16px 20px; }
.stat-strip div { display: flex; flex-direction: column; }
.stat-strip small { color: var(--slate-500); font-size: 12px; }
.stat-strip b { font: 600 18px/26px var(--mono); letter-spacing: -0.03em; }

.user-card { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.user-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; padding: 16px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 12px; }
.kv dt { color: var(--slate-500); }
.kv dd { margin: 0; text-align: right; font-weight: 500; }

/* ---------- Duyarlı ---------- */
@media (max-width: 1279px) {
  .nav { display: none; }
  .bottom-nav { display: grid; }
  .main { padding: calc(var(--header-h) + 16px) 20px calc(var(--nav-h) + 28px); }
  .header { padding: 0 16px; }
  .user-meta { display: none; }
  .toasts { bottom: calc(var(--nav-h) + 12px); }
}
@media (max-width: 1099px) {
  .pos { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'scan' 'cart' 'tiles'; grid-template-rows: auto; }
  .cart { position: static; max-height: none; }
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .main { padding-left: 12px; padding-right: 12px; }
  .page-head h1 { font-size: 22px; line-height: 30px; }
  .kpi-value { font-size: 24px; line-height: 32px; }
  .kpis { gap: 10px; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .route { grid-template-columns: minmax(0, 1fr); }
  .route .arrow { transform: rotate(90deg); margin: -4px auto; }
  .brand-logo { height: 26px; }
  .header { gap: 8px; padding: 0 12px; }
  .header-actions { gap: 4px; }
  .loc-chip { max-width: 34vw; min-width: 0; }
  .loc-chip select { max-width: 100%; min-width: 0; padding-right: 0; }
  .loc-chip > .ic:last-child { display: none; }
  .scan-btn span { display: none; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar { padding: 12px; }
  .bars { gap: 6px; padding: 8px 12px 0; }
  dialog.modal { width: 100vw; max-width: 100vw; max-height: 100dvh; border-radius: 0; margin: 0; height: 100dvh; }
  .modal-foot .btn { flex: 1; }
  .menu { right: 12px; }
  .hide-sm { display: none !important; }
  .tbl th, .tbl td { padding: 10px 10px; }
}
/* ---------- İçe aktarma / sayım ---------- */
.dropzone { border: 2px dashed var(--outline-variant); border-radius: var(--r-md); padding: 36px 16px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; cursor: pointer; background: var(--surface-low); color: var(--primary-container); transition: border-color 0.12s, background 0.12s; }
.dropzone:hover, .dropzone.over { border-color: var(--brand); background: var(--primary-soft); }
.dropzone strong { color: var(--on-surface); }
.help-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; color: var(--on-variant); }
.map-row { display: grid; grid-template-columns: 190px minmax(0, 1fr) minmax(0, 1.2fr); gap: 12px; align-items: center; }
.cost-input { width: 110px; min-height: 36px; }
.cost-wrap { display: flex; flex-direction: column; gap: 2px; }
.line.wrap { flex-wrap: wrap; }
.cost-note { flex-basis: 100%; font-size: 12px; color: var(--slate-500); padding-left: 0; }
.count-input { width: 72px; min-height: 36px; text-align: center; font-family: var(--mono); font-weight: 600; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--on-variant); font-weight: 500; margin-bottom: 6px; }
.back-link:hover { color: var(--primary-container); }
.callout { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); background: var(--primary-soft); color: var(--on-primary-soft); }
.callout.warn { background: var(--warn-soft); color: var(--warn); }
.tbl tbody tr.clickable { cursor: pointer; }
@media (max-width: 640px) { .map-row { grid-template-columns: minmax(0, 1fr); gap: 4px; } }

/* ---------- Ürün fotoğrafı / model görünümü ---------- */
.thumb { border-radius: var(--r-md); overflow: hidden; background: var(--slate-100); flex: none; display: grid; place-items: center; border: 1px solid var(--slate-200); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.ph { color: var(--slate-300); background: var(--slate-50); }
.tile-photo { margin: -12px -12px 0; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--r-md) var(--r-md) 0 0; background: var(--slate-100); }
.tile-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.model-row td { vertical-align: middle; }
.model-row.open { background: var(--surface-low); }
.model-row.open td:last-child .ic { transform: rotate(180deg); }
.model-detail-row > td { background: var(--surface-low); border-bottom: 1px solid var(--slate-200); padding: 0; }
.model-detail-row:hover { background: transparent !important; }
.model-panel { display: flex; gap: 20px; padding: 16px; align-items: flex-start; }
.model-panel > .stack { flex: 1; }
.model-panel > .stack:first-child { flex: none; }
.matrix th, .matrix td { padding: 8px 12px; }
.matrix tbody td:first-child { min-width: 110px; }
@media (max-width: 640px) { .model-panel { flex-direction: column; } }

/* ---------- Bağlantı durumu ---------- */
.net-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--outline-variant); background: var(--primary-soft); color: var(--on-primary-soft); border-radius: 999px; padding: 5px 12px; font: 600 12px/16px var(--font); white-space: nowrap; }
.net-chip.off { background: var(--warn-soft); color: var(--warn); border-color: #f3d38a; }
@media (max-width: 640px) { .net-chip { padding: 5px 8px; max-width: 34vw; overflow: hidden; text-overflow: ellipsis; } .net-chip span { overflow: hidden; text-overflow: ellipsis; } }

/* ---------- Fiş / bildirim eylemi ---------- */
.toast-action { background: rgba(255, 255, 255, 0.18); color: #fff; border: 1px solid rgba(255, 255, 255, 0.5); border-radius: var(--r-sm); padding: 4px 10px; font-weight: 600; white-space: nowrap; }
.toast-action:hover { background: rgba(255, 255, 255, 0.3); }
.pay-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pay-seg button { min-height: 44px; border: 1px solid var(--slate-300); background: #fff; border-radius: var(--r-sm); font-weight: 600; color: var(--on-variant); }
.pay-seg button.active { background: var(--primary-container); border-color: var(--primary-container); color: #fff; }
.receipt-sheet { font-family: var(--mono); color: #000; width: 72mm; font-size: 9pt; line-height: 1.35; }
.receipt-sheet h2 { font: 700 12pt var(--font); text-align: center; margin: 0 0 2mm; }
.receipt-sheet .c { text-align: center; }
.receipt-sheet hr { border: 0; border-top: 1px dashed #000; margin: 2mm 0; }
.receipt-sheet .r { display: flex; justify-content: space-between; gap: 4mm; }
.receipt-sheet .b { font-weight: 700; }
.receipt-sheet .sm { font-size: 7.5pt; line-height: 1.25; }
.receipt-sheet .rc-logo { display: block; width: 44mm; height: auto; margin: 0 auto 1.5mm; filter: grayscale(1) contrast(1.6); } /* siyah-beyaz fiş yazıcı için gri tonlama */
.report-print { font-family: var(--font); color: #000; font-size: 10pt; }
.report-print h1 { font-size: 16pt; margin: 0 0 4mm; }
.report-print table { width: 100%; border-collapse: collapse; margin-bottom: 6mm; }
.report-print th, .report-print td { border-bottom: 1px solid #999; padding: 1.5mm 2mm; text-align: left; }
.report-print .n { text-align: right; font-variant-numeric: tabular-nums; }
/* Kurumsal A4 belge (docprint.js) */
.doc-print { font-family: var(--font); color: #1b2420; font-size: 9.5pt; line-height: 1.35; }
.doc-print .dp-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 8mm; }
.doc-print .dp-logo { height: 14mm; width: auto; }
.doc-print .dp-brand { font: 700 18pt var(--font); }
.doc-print .dp-title { text-align: right; }
.doc-print .dp-title h1 { margin: 0; font-size: 17pt; letter-spacing: 0.04em; color: #066b31; }
.doc-print .dp-no { color: #5b6660; font-size: 9.5pt; margin-top: 0.5mm; }
.doc-print .dp-rule { height: 0.9mm; background: #0c9e49; margin: 3mm 0 2mm; }
.doc-print .dp-info { font-size: 7.5pt; color: #5b6660; margin-bottom: 4mm; }
.doc-print .dp-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 1mm 6mm; background: #eaf6ee; border-radius: 2mm; padding: 3mm 4mm; margin-bottom: 5mm; font-size: 9pt; }
.doc-print .dp-meta span { color: #5b6660; margin-right: 2mm; }
.doc-print .dp-meta div { break-inside: avoid; }
.doc-print .dp-sec { margin: 5mm 0 1.5mm; font: 700 8pt var(--font); letter-spacing: 0.08em; text-transform: uppercase; color: #0c9e49; }
.doc-print p { margin: 0 0 2.5mm; }
.doc-print .dp-table { width: 100%; border-collapse: collapse; margin-bottom: 4mm; }
.doc-print .dp-table th { background: #066b31; color: #fff; font-size: 8pt; letter-spacing: 0.04em; text-align: left; padding: 1.8mm 2.5mm; }
.doc-print .dp-table td { padding: 1.6mm 2.5mm; border-bottom: 0.2mm solid #d5dbd8; }
.doc-print .dp-table tbody tr:nth-child(even) td { background: #f6f8f7; }
.doc-print .dp-table tr { break-inside: avoid; }
.doc-print .dp-table .n { text-align: right; font-variant-numeric: tabular-nums; }
.doc-print .dp-table tr.total td { font-weight: 700; border-top: 0.4mm solid #066b31; background: #fff; }
.doc-print .dp-sign { display: grid; grid-template-columns: repeat(auto-fit, minmax(60mm, 1fr)); gap: 6mm; margin-top: 10mm; break-inside: avoid; }
.doc-print .dp-sign div { border: 0.3mm solid #d5dbd8; border-radius: 2mm; height: 24mm; padding: 2.5mm 3mm; display: flex; flex-direction: column; justify-content: space-between; }
.doc-print .dp-sign span { font: 700 8pt var(--font); letter-spacing: 0.08em; text-transform: uppercase; color: #0c9e49; }
.doc-print .dp-sign small { font-size: 7.5pt; color: #5b6660; }
.pay-card { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.pay-card .big { font: 700 26px/32px var(--mono); letter-spacing: -0.04em; }
.pay-card dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; font-size: 12px; color: var(--slate-500); }
.pay-card dd { margin: 0; text-align: right; font-family: var(--mono); color: var(--on-surface); }

/* ---------- Etiket ---------- */
.bc-label { background: #fff; color: #000; box-sizing: border-box; padding: 1.6mm 2mm; display: flex; flex-direction: column; gap: 0.6mm; overflow: hidden; font-family: var(--font); }
.bc-label .l-name { font-weight: 700; font-size: 9pt; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-label .l-row { display: flex; justify-content: space-between; gap: 2mm; font-size: 8pt; line-height: 1.1; }
.bc-label .l-bar { flex: 1 1 auto; min-height: 0; width: 100%; }
.bc-label .l-sku { font-family: var(--mono); font-size: 7pt; text-align: center; line-height: 1; }
.bc-label .l-nobar { flex: 1; display: grid; place-items: center; font-size: 7pt; border: 1px dashed #000; }
.bc-label.small .l-name { font-size: 8pt; }
.bc-label.small .l-row { font-size: 7pt; }
.label-preview { display: flex; justify-content: center; padding: 16px; background: var(--slate-100); border-radius: var(--r-md); }
.label-preview .bc-label { border: 1px solid var(--slate-300); box-shadow: var(--shadow-1); transform: scale(1.5); transform-origin: center; margin: 12px 0; }
#print-root { display: none; }
@media print {
  body.printing > #app, body.printing > .toasts, body.printing > dialog { display: none !important; }
  body.printing #print-root { display: block; }
  body.printing { background: #fff; }
  #print-root .bc-label { break-after: page; page-break-after: always; }
  #print-root .bc-label:last-child { break-after: auto; page-break-after: auto; }
}
/* ---------- Telefon uyumu (public/js/responsive.js ile birlikte) ---------- */
.bar-val .bv-short { display: none; }
.more-wrap { position: relative; flex: 1; display: flex; }
.more-wrap > .btn { flex: 1; }
.more-menu { position: absolute; right: 0; bottom: calc(100% + 8px); min-width: 210px; background: #fff; border: 1px solid var(--slate-200); border-radius: var(--r-md); box-shadow: var(--shadow-2, 0 8px 24px rgba(0, 0, 0, 0.18)); padding: 6px; display: flex; flex-direction: column; gap: 2px; z-index: 5; }
.more-menu[hidden] { display: none; }
.foot-compact { display: flex; gap: 8px; width: 100%; flex-wrap: nowrap !important; }
.foot-compact > .btn, .foot-compact > .more-wrap { flex: 1 1 auto; min-width: 0; margin-left: 0 !important; }
.foot-compact .btn { padding-left: 10px; padding-right: 10px; }
.more-menu .btn { width: 100%; justify-content: flex-start; min-height: 44px; flex: none; }
@media (max-width: 640px) {
  /* özet kartları: alt yazı dar kalınca alt satıra geçer, rakam kart genişliğine sığdırılır (responsive.js) */
  .kpi { padding: 14px; }
  .kpi-foot { flex-wrap: wrap; justify-content: flex-start; row-gap: 4px; }
  .bar-val .bv-full { display: none; }
  .bar-val .bv-short { display: inline; font-size: 10px; letter-spacing: -0.04em; }
  .bars { gap: 4px; }
  /* dokunma hedefleri */
  .btn-sm, .seg button { min-height: 40px; }
  .tbl .btn { min-height: 40px; }
  .btn-icon { min-width: 40px; min-height: 40px; }
  .chip { min-height: 40px; }
  .sku.link-sku, .link-btn { min-height: 36px; display: inline-flex; align-items: center; padding-top: 6px; padding-bottom: 6px; }
  /* açılır pencere: geniş/dar tüm boyutlar tam ekran */
  dialog.modal, dialog.modal.wide, dialog.modal.narrow { width: 100vw; max-width: 100vw; }
  .modal-foot { flex-wrap: wrap; }
  /* tablolar: satırlar kart olur */
  .table-wrap { overflow-x: visible; }
  table.tbl-cards, .tbl-cards tbody, .tbl-cards tfoot, .tbl-cards tr { display: block; width: 100%; }
  .tbl-cards thead { display: none; }
  .tbl-cards tr { border: 1px solid var(--slate-200); border-radius: var(--r-md, 12px); background: #fff; margin: 0 0 10px; padding: 4px 12px; }
  .tbl-cards tbody tr:hover { background: #fff; }
  .tbl-cards tfoot tr { background: var(--slate-50); }
  .tbl-cards td { display: block; position: relative; padding: 7px 0 7px 42%; border: 0; min-height: 22px; white-space: normal; text-align: left; overflow-wrap: anywhere; }
  .tbl-cards td.right { text-align: right; }
  .tbl-cards td::before { content: attr(data-label); position: absolute; left: 0; top: 8px; width: 38%; font: 500 11px/16px var(--font); color: var(--slate-500); letter-spacing: 0.03em; text-align: left; }
  .tbl-cards td[data-primary] { padding-left: 0; padding-top: 10px; padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px solid var(--slate-100); font-size: 15px; text-align: left; }
  .tbl-cards td[data-primary]::before, .tbl-cards td[data-label='']::before, .tbl-cards td:not([data-label])::before { display: none; }
  .tbl-cards td[data-label=''], .tbl-cards td:not([data-label]) { padding-left: 0; text-align: right; }
  .tbl-cards td:not([data-label]) { text-align: left; }
  .tbl-cards td:empty { display: none; }
  .tbl-cards tfoot td { background: transparent; border-top: 0; }
}
@media (max-width: 420px) {
  .bottom-nav a { font-size: 10px; letter-spacing: -0.02em; }
}

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---- Stok kartı, sevkiyat ve dönem karşılaştırması ---- */
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.link-btn:hover strong { color: var(--primary-container); text-decoration: underline; }
.ledger-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.ledger-tile { border: 1px solid var(--slate-200); border-radius: var(--r-md); padding: 10px 12px; background: var(--slate-50); }
.ledger-tile.strong { background: var(--primary-soft); border-color: transparent; }
.ledger-tile.strong .num { color: var(--on-primary-soft); }
.cmp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 4px 20px 20px; }
.cmp { border: 1px solid var(--slate-200); border-radius: var(--r-md); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.trend-chart { display: flex; align-items: flex-end; gap: 3px; height: 170px; border-bottom: 1px solid var(--slate-200); }
.trend-col { position: relative; flex: 1; min-width: 0; height: 100%; display: flex; align-items: flex-end; }
.trend-col .cur { width: 100%; min-height: 1px; background: var(--brand); border-radius: 3px 3px 0 0; }
.trend-col .prev { position: absolute; left: 0; right: 0; height: 0; border-top: 3px solid var(--slate-500); opacity: .85; }
.trend-axis { display: flex; gap: 3px; margin-top: 6px; font: 500 11px/1 var(--mono); color: var(--slate-500); }
.trend-axis span { flex: 1; min-width: 0; text-align: center; white-space: nowrap; overflow: visible; }
@media (max-width: 720px) {
  .ledger-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cmp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 4px 12px 16px; }
}
