/* ==========================================================================
   Trendyol Pazaryeri Paneli — tasarım sistemi
   ========================================================================== */
:root {
  --brand: #f27a1a;
  --brand-600: #de6a0c;
  --brand-50: #fff4ea;
  --brand-100: #ffe3cc;

  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --surface-3: #f1f3f5;
  --border: #e4e7ec;
  --border-strong: #d0d5dd;
  --text: #16181d;
  --text-2: #475467;
  --text-3: #8a94a6;

  --green: #12a150;
  --green-bg: #e7f7ee;
  --red: #d92d20;
  --red-bg: #fdecea;
  --amber: #b54708;
  --amber-bg: #fef4e6;
  --blue: #1f6feb;
  --blue-bg: #e8f1fe;
  --purple: #7a3fe4;
  --purple-bg: #f1eafd;
  --gray-bg: #eef0f3;

  --sidebar: #15171c;
  --sidebar-2: #1d2027;
  --sidebar-text: #aab1bf;
  --sidebar-active: #ffffff;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-lg: 0 20px 40px -12px rgba(16, 24, 40, 0.25);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --header-h: 60px;
  --sidebar-w: 248px;
  color-scheme: light;
}

:root[data-theme='dark'] {
  --bg: #0f1115;
  --surface: #171a20;
  --surface-2: #1c2027;
  --surface-3: #232830;
  --border: #2a2f38;
  --border-strong: #363c47;
  --text: #eceef2;
  --text-2: #b3bac7;
  --text-3: #7c8594;
  --brand-50: #2a1c10;
  --brand-100: #3d2612;
  --green-bg: #0f2a1b;
  --red-bg: #2f1513;
  --amber-bg: #2d2010;
  --blue-bg: #122138;
  --purple-bg: #221838;
  --gray-bg: #232830;
  --green: #3ccf7c;
  --red: #ff6b5e;
  --amber: #f5a524;
  --blue: #5b9bff;
  --purple: #a987ff;
  --sidebar: #0b0d10;
  --sidebar-2: #151820;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 40px -12px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01';
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -0.01em; }
.mono { font-family: var(--mono); font-size: 0.92em; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.hidden { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 8px; }
.gap-4 { gap: 4px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon.sm { width: 15px; height: 15px; }
.icon.lg { width: 22px; height: 22px; }

/* ---------------------------------- Kabuk ---------------------------------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: var(--sidebar);
  color: var(--sidebar-text); display: flex; flex-direction: column; z-index: 40;
  transition: transform 0.25s ease;
}
.sidebar .brand {
  height: var(--header-h); display: flex; align-items: center; gap: 10px; padding: 0 18px;
  color: #fff; font-weight: 700; font-size: 15px; letter-spacing: -0.02em; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; background: var(--brand); display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 15px; box-shadow: 0 6px 16px -6px rgba(242, 122, 26, 0.8);
}
.brand small { display: block; font-weight: 500; font-size: 11px; color: var(--sidebar-text); letter-spacing: 0; }
.nav { flex: 1; overflow-y: auto; padding: 12px 10px 20px; }
.nav-section { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: #6b7280; padding: 16px 10px 6px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 8px; font-weight: 500;
  color: var(--sidebar-text); transition: background 0.15s, color 0.15s; position: relative; margin-bottom: 1px;
}
.nav a:hover { background: var(--sidebar-2); color: #e5e7eb; }
.nav a.active { background: rgba(242, 122, 26, 0.14); color: var(--sidebar-active); }
.nav a.active .icon { color: var(--brand); }
.nav a .badge-count {
  margin-left: auto; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700;
  border-radius: 999px; padding: 1px 7px; min-width: 20px; text-align: center;
}
.sidebar-foot { padding: 12px 14px; border-top: 1px solid rgba(255,255,255,0.06); font-size: 12px; }
.sidebar-foot .row { color: var(--sidebar-text); }

.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; overflow-x: clip; }
.grid > *, .stats > *, .list-row > .grow { min-width: 0; }
.card { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--header-h); background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px; padding: 0 22px;
}
.topbar h1 { font-size: 17px; font-weight: 650; }
.topbar .spacer { flex: 1; }
.topbar .menu-btn { display: none; }
.content { padding: 22px; max-width: 1600px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h2 { font-size: 22px; font-weight: 700; }
.page-head p { margin: 4px 0 0; color: var(--text-2); }
.backdrop { display: none; }

/* Mağaza seçici */
.store-switch { position: relative; }
.store-btn {
  display: flex; align-items: center; gap: 9px; height: 38px; padding: 0 12px; border: 1px solid var(--border);
  background: var(--surface); border-radius: 10px; cursor: pointer; max-width: 280px; font-weight: 550;
}
.store-btn:hover { border-color: var(--border-strong); }
.store-btn .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--text-3); }
.dot.all { background: conic-gradient(#f27a1a 0 25%, #1f6feb 0 50%, #12a150 0 75%, #7a3fe4 0); }
.dropdown {
  position: absolute; top: calc(100% + 6px); right: 0; min-width: 280px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 60;
  max-height: 70vh; overflow: auto; animation: pop 0.14s ease;
}
.dropdown.left { left: 0; right: auto; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
.dropdown .item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; cursor: pointer; width: 100%;
  border: 0; background: none; text-align: left;
}
.dropdown .item:hover { background: var(--surface-3); }
.dropdown .item.active { background: var(--brand-50); }
.dropdown .item small { color: var(--text-3); display: block; font-size: 11.5px; }
.dropdown .sep { height: 1px; background: var(--border); margin: 6px 4px; }
.dropdown input.search { width: 100%; margin-bottom: 6px; }

/* ---------------------------------- Butonlar ---------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px;
  border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-weight: 550; cursor: pointer; white-space: nowrap; transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.05s;
  box-shadow: var(--shadow-sm); user-select: none;
}
.btn:hover { background: var(--surface-3); border-color: var(--border-strong); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .input:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 4px 12px -4px rgba(242, 122, 26, 0.6); }
.btn.primary:hover { background: var(--brand-600); border-color: var(--brand-600); }
.btn.danger { color: var(--red); }
.btn.danger.solid { background: var(--red); color: #fff; border-color: var(--red); }
.btn.success { background: var(--green); border-color: var(--green); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn.xs { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 7px; }
.btn.icon-only { width: 36px; padding: 0; }
.btn.sm.icon-only { width: 30px; }
.btn[disabled], .btn.loading { opacity: 0.55; pointer-events: none; }
.btn.loading::after {
  content: ''; width: 13px; height: 13px; border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: 9px 0 0 9px; margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 9px 9px 0; }

/* ---------------------------------- Formlar ---------------------------------- */
.input, select.input, textarea.input {
  height: 36px; padding: 0 11px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface);
  width: 100%; transition: border-color 0.15s, box-shadow 0.15s; min-width: 0;
}
textarea.input { height: auto; padding: 9px 11px; resize: vertical; min-height: 80px; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-100); }
.input.sm { height: 30px; font-size: 13px; padding: 0 8px; border-radius: 7px; }
.input.num { text-align: right; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label, .label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--text-3); }
.field .req { color: var(--red); }
.grid { display: grid; gap: 14px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.span-all { grid-column: 1 / -1; }
.input-group { display: flex; }
.input-group .input { border-radius: 9px 0 0 9px; }
.input-group .addon {
  display: grid; place-items: center; padding: 0 10px; border: 1px solid var(--border); border-left: 0;
  border-radius: 0 9px 9px 0; background: var(--surface-3); color: var(--text-2); font-size: 13px; white-space: nowrap;
}
.input-group select.addon { padding: 0 6px; cursor: pointer; }
.search-box { position: relative; }
.search-box .icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.search-box .input { padding-left: 34px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
input[type='checkbox'], input[type='radio'] { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; margin: 0; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 36px; height: 20px; border-radius: 99px; background: var(--border-strong); position: relative; transition: background 0.2s; flex: none; }
.switch .track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.2s; box-shadow: var(--shadow-sm); }
.switch input:checked + .track { background: var(--green); }
.switch input:checked + .track::after { transform: translateX(16px); }
.radio-cards { display: grid; gap: 10px; }
.radio-card {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--border);
  border-radius: 11px; cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.radio-card:hover { border-color: var(--border-strong); }
.radio-card:has(input:checked) { border-color: var(--brand); background: var(--brand-50); }
.radio-card input { margin-top: 2px; }
.radio-card b { display: block; font-weight: 600; }
.radio-card span { color: var(--text-2); font-size: 13px; }

/* ---------------------------------- Kartlar ---------------------------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.card-head h3 { font-size: 15px; font-weight: 650; }
.card-head .sub { color: var(--text-3); font-size: 12.5px; }
.card-body { padding: 16px; }
.card-foot { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { padding: 16px; position: relative; overflow: hidden; }
.stat .k { color: var(--text-2); font-size: 12.5px; font-weight: 550; display: flex; align-items: center; gap: 7px; }
.stat .v { font-size: 25px; font-weight: 700; margin-top: 6px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat .d { font-size: 12.5px; margin-top: 4px; color: var(--text-3); }
.stat .ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; position: absolute; right: 14px; top: 14px; }
.stat.link { cursor: pointer; transition: border-color 0.15s, transform 0.15s; }
.stat.link:hover { border-color: var(--brand); transform: translateY(-1px); }
.tone-orange { background: var(--brand-50); color: var(--brand); }
.tone-green { background: var(--green-bg); color: var(--green); }
.tone-red { background: var(--red-bg); color: var(--red); }
.tone-blue { background: var(--blue-bg); color: var(--blue); }
.tone-purple { background: var(--purple-bg); color: var(--purple); }
.tone-amber { background: var(--amber-bg); color: var(--amber); }
.up { color: var(--green); } .down { color: var(--red); }

/* ---------------------------------- Rozetler ---------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--gray-bg); color: var(--text-2);
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.8; }
.badge.plain::before { display: none; }
.badge.green { background: var(--green-bg); color: var(--green); }
.badge.red { background: var(--red-bg); color: var(--red); }
.badge.amber { background: var(--amber-bg); color: var(--amber); }
.badge.blue { background: var(--blue-bg); color: var(--blue); }
.badge.purple { background: var(--purple-bg); color: var(--purple); }
.badge.orange { background: var(--brand-50); color: var(--brand); }
.store-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); font-weight: 550; white-space: nowrap; }

/* ---------------------------------- Sekmeler ---------------------------------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; margin-bottom: 14px; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 10px 12px; border: 0; background: none; cursor: pointer; font-weight: 550; color: var(--text-2);
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: flex; align-items: center; gap: 7px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.tab .n { background: var(--surface-3); color: var(--text-2); border-radius: 99px; padding: 0 7px; font-size: 11.5px; font-weight: 650; }
.tab.active .n { background: var(--brand-100); color: var(--brand-600); }
.seg { display: inline-flex; background: var(--surface-3); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 8px; cursor: pointer; font-weight: 550; color: var(--text-2); font-size: 13px; }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ---------------------------------- Tablolar ---------------------------------- */
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.toolbar .search-box { flex: 1; min-width: 200px; max-width: 420px; }
.toolbar select.input { width: auto; max-width: 200px; }
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th {
  text-align: left; font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--text-3); padding: 10px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border);
  white-space: nowrap; position: sticky; top: 0; z-index: 1;
}
.table th.sortable { cursor: pointer; }
.table th.sortable:hover { color: var(--text); }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr { transition: background 0.1s; }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr.selected { background: var(--brand-50); }
.table tbody tr:last-child td { border-bottom: 0; }
.table td.check-col, .table th.check-col { width: 38px; padding-right: 0; }
.table .clickable { cursor: pointer; }
.thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--surface-3); border: 1px solid var(--border); flex: none; display: grid; place-items: center; color: var(--text-3); }
.thumb.lg { width: 72px; height: 72px; }
.prod-cell { display: flex; gap: 11px; align-items: center; min-width: 260px; max-width: 460px; }
.prod-cell .t { font-weight: 550; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prod-cell .s { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.edit-cell { width: 96px; }
.edit-cell.changed { border-color: var(--brand); background: var(--brand-50); }
.empty { padding: 56px 20px; text-align: center; color: var(--text-2); }
.empty .icon { width: 40px; height: 40px; color: var(--text-3); margin-bottom: 10px; stroke-width: 1.5; }
.empty h4 { font-size: 15px; color: var(--text); margin-bottom: 4px; }
.pager { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.pager .info { color: var(--text-2); font-size: 13px; margin-right: auto; }
.skeleton { background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 6px; height: 14px; }
@keyframes sk { to { background-position: -200% 0; } }

/* Seçim çubuğu */
.selection-bar {
  position: sticky; bottom: 16px; z-index: 25; margin: 14px auto 0; width: fit-content; max-width: calc(100% - 24px);
  background: var(--sidebar); color: #fff; border-radius: 14px; padding: 8px 8px 8px 16px; display: flex; gap: 8px;
  align-items: center; box-shadow: var(--shadow-lg); flex-wrap: wrap; animation: pop 0.15s ease;
}
.selection-bar .btn { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.12); color: #fff; box-shadow: none; }
.selection-bar .btn:hover { background: rgba(255,255,255,0.16); }
.selection-bar .btn.primary { background: var(--brand); border-color: var(--brand); }
.selection-bar .count { font-weight: 650; margin-right: 6px; }

/* ---------------------------------- Modal ---------------------------------- */
.modal-root { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal-bg { position: absolute; inset: 0; background: rgba(10, 12, 16, 0.55); backdrop-filter: blur(2px); animation: fade 0.15s; }
@keyframes fade { from { opacity: 0; } }
.modal {
  position: relative; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); width: 100%;
  max-width: 560px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; animation: pop 0.18s ease;
  border: 1px solid var(--border);
}
.modal.lg { max-width: 860px; }
.modal.xl { max-width: 1180px; }
.modal.sm { max-width: 420px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 16px; font-weight: 650; flex: 1; }
.modal-body { padding: 18px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.drawer-root { position: fixed; inset: 0; z-index: 90; }
.drawer {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(720px, 100%); background: var(--surface);
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slide 0.22s ease;
}
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }

/* ---------------------------------- Bildirim ---------------------------------- */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 36px)); }
.toast {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--sidebar);
  color: #fff; box-shadow: var(--shadow-lg); animation: pop 0.2s ease; font-size: 13.5px;
}
.toast .icon { margin-top: 1px; }
.toast.success .icon { color: #4ade80; }
.toast.error .icon { color: #ff7b72; }
.toast.warn .icon { color: #fbbf24; }
.toast .x { margin-left: auto; opacity: 0.6; cursor: pointer; background: none; border: 0; color: #fff; padding: 0; }

/* ---------------------------------- Diğer ---------------------------------- */
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; font-size: 13.5px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; font-weight: 500; word-break: break-word; }
.chart { width: 100%; height: 220px; }
.chart .bar { fill: var(--brand); transition: opacity 0.15s; }
/* Modern HTML çubuk grafik */
.bchart { width: 100%; }
.bc-info { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 2px 12px; margin-bottom: 14px; min-height: 58px; }
.bc-info.flash { animation: bcFlash 0.25s ease; }
@keyframes bcFlash { from { opacity: 0.35; transform: translateY(2px); } }
.bc-date { grid-column: 1 / -1; font-size: 12.5px; color: var(--text-3); font-weight: 550; text-transform: capitalize; }
.bc-main { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; min-width: 0; }
.bc-value { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.bc-count { font-size: 12.5px; font-weight: 650; color: var(--brand-600); background: var(--brand-50); padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.bc-delta { justify-self: end; text-align: right; font-size: 13px; font-weight: 700; white-space: nowrap; line-height: 1.2; }
.bc-delta small { display: block; font-size: 11px; font-weight: 500; color: var(--text-3); }
.bc-delta.up { color: var(--green); }
.bc-delta.down { color: var(--red); }
.bc-plot {
  position: relative; display: flex; align-items: flex-end; gap: 3px; padding-top: 26px; box-sizing: content-box;
  border-bottom: 1px solid var(--border);
  background-image: linear-gradient(to top, var(--border) 1px, transparent 1px);
  background-size: 100% 25%; background-position: bottom;
}
.bc-avg { position: absolute; left: 0; right: 0; height: 0; border-top: 1.5px dashed var(--text-3); opacity: 0.55; pointer-events: none; z-index: 0; }
.bc-avg span { position: absolute; left: 0; top: -19px; font-size: 10.5px; font-weight: 650; color: var(--text-2); background: var(--surface); padding: 1px 6px; border-radius: 6px; }
.bc-col {
  position: relative; flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end; justify-content: center;
  border: 0; background: none; padding: 0; margin: 0; cursor: pointer; border-radius: 8px 8px 0 0;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: background 0.15s;
}
.bc-col:hover { background: color-mix(in srgb, var(--brand) 6%, transparent); }
.bc-bar {
  position: relative; display: block; width: 78%; max-width: 26px; border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 55%, #fff) 0%, color-mix(in srgb, var(--brand) 35%, #fff) 100%);
  transform-origin: bottom; animation: bcGrow 0.55s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--d, 0ms);
  transition: background 0.18s, box-shadow 0.18s, transform 0.18s;
}
:root[data-theme='dark'] .bc-bar { background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 60%, #000) 0%, color-mix(in srgb, var(--brand) 35%, #000) 100%); }
@keyframes bcGrow { from { transform: scaleY(0); } }
@media (prefers-reduced-motion: reduce) { .bc-bar { animation: none; } }
.bc-bar.neg { background: color-mix(in srgb, var(--red) 45%, #fff); }
.bc-col:hover .bc-bar { background: linear-gradient(180deg, var(--brand) 0%, color-mix(in srgb, var(--brand) 70%, #fff) 100%); }
.bc-col.sel { z-index: 4; }
.bc-col.sel .bc-bar {
  background: linear-gradient(180deg, #ff9a45 0%, var(--brand) 55%, var(--brand-600) 100%);
  box-shadow: 0 6px 16px -4px color-mix(in srgb, var(--brand) 70%, transparent);
}
.bc-pill {
  position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%) translateY(4px); opacity: 0;
  background: var(--sidebar); color: #fff; font-size: 10.5px; font-weight: 700; padding: 3px 7px; border-radius: 7px;
  white-space: nowrap; pointer-events: none; transition: opacity 0.15s, transform 0.15s; z-index: 5;
}
.bc-pill::after { content: ''; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); border: 4px solid transparent; border-top-color: var(--sidebar); }
.bc-col.sel .bc-pill { opacity: 1; transform: translateX(-50%); }
.bc-col:first-child .bc-pill { left: 0; transform: translateX(0) translateY(4px); }
.bc-col:first-child.sel .bc-pill { transform: none; }
.bc-col:first-child .bc-pill::after { left: 10px; }
.bc-col:last-child .bc-pill, .bc-col:nth-last-child(2) .bc-pill { left: auto; right: 0; transform: translateY(4px); }
.bc-col:last-child.sel .bc-pill, .bc-col:nth-last-child(2).sel .bc-pill { transform: none; }
.bc-col:last-child .bc-pill::after, .bc-col:nth-last-child(2) .bc-pill::after { left: auto; right: 8px; transform: none; }
.bc-col:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.bc-axis { display: flex; gap: 3px; margin-top: 7px; }
.bc-axis span { flex: 1 1 0; min-width: 0; font-size: 10.5px; color: var(--text-3); text-align: center; white-space: nowrap; overflow: visible; font-variant-numeric: tabular-nums; }
@media (max-width: 680px) {
  .bc-value { font-size: 22px; }
  .bc-plot { gap: 2px; }
}
.chart .axis { fill: var(--text-3); font-size: 10.5px; }
.chart .gridline { stroke: var(--border); stroke-dasharray: 3 4; }
.progress { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.list-row { display: flex; gap: 10px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.list-row:last-child { border-bottom: 0; }
.alert { display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px; font-size: 13.5px; align-items: flex-start; }
.alert.warn { background: var(--amber-bg); color: var(--amber); }
.alert.info { background: var(--blue-bg); color: var(--blue); }
.alert.error { background: var(--red-bg); color: var(--red); }
.alert.success { background: var(--green-bg); color: var(--green); }
.alert b { color: inherit; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: var(--surface-3); font-size: 12.5px; font-weight: 550; }
.chip button { border: 0; background: none; cursor: pointer; padding: 0; color: var(--text-3); display: flex; }
.autocomplete { position: relative; }
.autocomplete .dropdown { left: 0; right: 0; min-width: 0; }
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.img-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 9px; border: 1px solid var(--border); }
.section-title { font-size: 13px; font-weight: 650; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.05em; margin: 18px 0 10px; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.rule-summary { font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.price-old { text-decoration: line-through; color: var(--text-3); font-size: 12px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 20px; font-size: 13px; }
.timeline li::before { content: ''; position: absolute; left: 4px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.timeline li::after { content: ''; position: absolute; left: 7.5px; top: 16px; bottom: 0; width: 1px; background: var(--border); }
.timeline li:last-child::after { display: none; }
.a4-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; aspect-ratio: 210 / 297; width: 230px; background: #fff; border: 1px solid var(--border-strong); border-radius: 6px; padding: 12px 8px; box-shadow: var(--shadow); margin: 0 auto; }
.a4-picker button {
  border: 2px dashed #cbd2dc; border-radius: 6px; background: #fbfcfd; cursor: pointer; display: grid; place-items: center;
  font-weight: 700; font-size: 18px; color: #98a2b3; transition: all 0.15s; position: relative;
}
.a4-picker button:hover { border-color: var(--brand); color: var(--brand); }
.a4-picker button.used { background: repeating-linear-gradient(45deg, #f2f4f7, #f2f4f7 6px, #e4e7ec 6px, #e4e7ec 12px); border-style: solid; border-color: #d0d5dd; color: #98a2b3; }
.a4-picker button.used::after { content: 'Dolu'; position: absolute; bottom: 6px; font-size: 10px; font-weight: 600; }
.a4-picker button.start { border-style: solid; border-color: var(--brand); color: var(--brand); background: var(--brand-50); }
.a4-picker button.start::after { content: 'Başlangıç'; position: absolute; bottom: 6px; font-size: 10px; font-weight: 600; }
.tip { position: relative; }

/* ---------------------------------- Mobil ---------------------------------- */
@media (max-width: 1100px) {
  .grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 35; }
  .main { margin-left: 0; }
  .topbar .menu-btn { display: inline-flex; }
  .content { padding: 14px; }
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar h1 { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .store-btn { max-width: 170px; }
  .hide-md { display: none !important; }
  .grid.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .page-head h2 { font-size: 19px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 13px; }
  .stat .v { font-size: 19px; }
  .stat .ic { display: none; }
  .hide-sm { display: none !important; }
  .toolbar .search-box { max-width: none; min-width: 100%; }
  .toolbar > .input, .toolbar > select.input { flex: 1 1 calc(50% - 8px); max-width: none; width: auto !important; min-width: 0; }
  .toolbar > .grow { display: none; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .modal-root { padding: 0; align-items: end; }
  .modal { max-height: 94vh; border-radius: 18px 18px 0 0; max-width: none !important; }
  .store-btn .label { max-width: 90px; }

  /* Tabloları karta dönüştür */
  table.rtable thead { display: none; }
  table.rtable, table.rtable tbody, table.rtable tr, table.rtable td { display: block; width: 100%; }
  table.rtable tr { border-bottom: 8px solid var(--bg); padding: 10px 12px; position: relative; }
  table.rtable td { border: 0; padding: 4px 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: 14px; text-align: right; align-items: start; }
  table.rtable td:not(.full) > * { grid-column: 2; justify-self: end; }
  table.rtable td::before { content: attr(data-label); color: var(--text-3); font-size: 12px; font-weight: 550; text-align: left; grid-column: 1; grid-row: 1 / span 9; padding-top: 1px; }
  table.rtable td:not([data-label]):not(.full)::before { display: none; }
  table.rtable td:not([data-label]):not(.full) { display: flex; justify-content: flex-end; gap: 6px; border-top: 1px solid var(--border); margin-top: 6px; padding-top: 8px; }
  table.rtable td .col { align-items: flex-end !important; }
  table.rtable .edit-cell { width: 120px; }
  table.rtable td.full { display: block; text-align: left; }
  table.rtable td.full::before { display: none; }
  table.rtable td.check-col { position: absolute; top: 12px; right: 12px; width: auto; padding: 0; }
  table.rtable td.check-col::before { display: none; }
  table.rtable td:empty { display: none; }
  .prod-cell { min-width: 0; max-width: none; padding-right: 26px; }
  .selection-bar { bottom: 10px; border-radius: 12px; padding: 8px; }
  .toasts { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}

@media print {
  .sidebar, .topbar, .toasts, .selection-bar { display: none !important; }
  .main { margin: 0; }
}
