/* =========================================================
   Cennet İstanbul Operasyon · Tasarım sistemi
   ========================================================= */
:root {
  color-scheme: light;
  --font: Inter, "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;

  --bg: #f3f5fa;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #eef2f8;
  --border: #e3e8f1;
  --border-strong: #cfd7e5;
  --text: #0f172a;
  --text-2: #475569;
  --muted: #6b7a90;

  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: #eef0ff;
  --primary-ink: #3730a3;
  --success: #047857;
  --success-soft: #e7f8f0;
  --warning: #b45309;
  --warning-soft: #fff5e0;
  --danger: #c2261f;
  --danger-soft: #fdecea;
  --info: #0369a1;
  --info-soft: #e6f4fb;

  --sidebar-bg: #0c1322;
  --sidebar-text: #a9b4c8;
  --sidebar-hover: #17203a;
  --sidebar-active: #1f2a4a;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 30px -14px rgba(15, 23, 42, .18);
  --ring: 0 0 0 3px rgba(79, 70, 229, .28);
  --sidebar-w: 268px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #080d1a;
  --surface: #101829;
  --surface-2: #0d1424;
  --surface-3: #16203a;
  --border: #1e2a45;
  --border-strong: #2b3a5c;
  --text: #e8edf7;
  --text-2: #b0bace;
  --muted: #8591a8;
  --primary: #8b93ff;
  --primary-hover: #a3a9ff;
  --primary-soft: #1a2147;
  --primary-ink: #c3c7ff;
  --success: #3dd6a0;
  --success-soft: #0f2a24;
  --warning: #f5b455;
  --warning-soft: #2c2210;
  --danger: #ff8a80;
  --danger-soft: #331a1a;
  --info: #62c3f0;
  --info-soft: #0f2533;
  --sidebar-bg: #060a14;
  --sidebar-hover: #111a30;
  --sidebar-active: #18233f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px -14px rgba(0, 0, 0, .6);
  --ring: 0 0 0 3px rgba(139, 147, 255, .35);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
code { font: 12px var(--mono); background: var(--surface-3); padding: 2px 6px; border-radius: 6px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.num { font-variant-numeric: tabular-nums; }
.grow { flex: 1; min-width: 0; }
.stack { display: grid; gap: 16px; align-content: start; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.icon { flex: none; vertical-align: middle; }
[hidden] { display: none !important; }

/* ---------- Uygulama iskeleti ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.main { min-width: 0; display: flex; flex-direction: column; }
.content { width: 100%; max-width: 1560px; margin: 0 auto; padding: 8px 32px 64px; flex: 1; }
.page-subtitle { color: var(--muted); margin: 0 0 22px; max-width: 78ch; }

.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--sidebar-bg), #0a0f1c); color: var(--sidebar-text);
  padding: 22px 14px 16px; z-index: 40; border-right: 1px solid rgba(255, 255, 255, .04);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 22px; color: #fff; }
.brand-mark { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; letter-spacing: -.02em; color: #1b1300; background: linear-gradient(135deg, #ffd88a, #f2a93b); box-shadow: 0 6px 18px -6px rgba(242, 169, 59, .6); }
.brand-text { display: grid; line-height: 1.2; }
.brand-text b { font-size: 15px; letter-spacing: -.01em; }
.brand-text small { color: #7f8ba3; font-size: 11.5px; margin-top: 2px; }
.nav { display: grid; gap: 2px; overflow-y: auto; flex: 1; align-content: start; }
.nav-group { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #5f6b84; margin: 18px 12px 6px; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--sidebar-text); font-weight: 500; transition: background .15s, color .15s; }
.nav-link:hover { background: var(--sidebar-hover); color: #fff; }
.nav-link.is-active { background: var(--sidebar-active); color: #fff; box-shadow: inset 3px 0 0 #8b93ff; }
.sidebar-foot { display: flex; align-items: center; gap: 8px; padding-top: 14px; margin-top: 10px; border-top: 1px solid rgba(255, 255, 255, .07); }
.user-chip { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; padding: 6px; border-radius: 10px; }
.user-chip:hover { background: var(--sidebar-hover); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: linear-gradient(135deg, #6366f1, #8b5cf6); flex: none; }
.user-meta { display: grid; line-height: 1.25; min-width: 0; }
.user-meta b { color: #e8edf7; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta small { color: #7f8ba3; font-size: 11px; }
.sidebar-foot .icon-btn { color: #a9b4c8; border-color: transparent; background: transparent; }
.sidebar-foot .icon-btn:hover { background: var(--sidebar-hover); color: #fff; }

.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 18px 32px 14px; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.page-title { display: grid; gap: 2px; min-width: 0; flex: 1; }
.page-title h1 { font-size: 26px; font-weight: 750; }
.eyebrow { font-size: 11.5px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.topbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.menu-btn, .icon-btn.menu-btn { display: none; }
.scrim { display: none; }

/* ---------- Bileşenler ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 20px 22px 0; flex-wrap: wrap; }
.card-head h2 { font-size: 16.5px; font-weight: 700; }
.card-head p { color: var(--muted); font-size: 13px; margin-top: 3px; }
.card-body { padding: 18px 22px 22px; }
.card-flush { overflow: hidden; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.section { margin-top: 18px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 6px 16px -8px var(--primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger-soft { color: var(--danger); background: transparent; border-color: transparent; }
.btn-danger-soft:hover { background: var(--danger-soft); }
form.inline { display: inline; margin: 0; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); cursor: pointer; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.theme-moon { display: none; }
[data-theme="dark"] .theme-sun { display: none; }
[data-theme="dark"] .theme-moon { display: inline; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; background: var(--surface-3); color: var(--text-2); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-primary { background: var(--primary-soft); color: var(--primary-ink); }
.badge-plain::before { display: none; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 650; background: var(--surface-3); color: var(--text-2); }

.segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: var(--surface-3); border: 1px solid var(--border); }
.segmented a, .segmented button { padding: 6px 14px; border-radius: 8px; font-weight: 600; color: var(--muted); border: 0; background: transparent; cursor: pointer; font-size: 13px; }
.segmented a.is-active, .segmented button.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* KPI */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { position: relative; padding: 20px; display: grid; gap: 4px; overflow: hidden; }
.kpi-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 8px; background: var(--primary-soft); color: var(--primary); }
.kpi-icon.tone-success { background: var(--success-soft); color: var(--success); }
.kpi-icon.tone-warning { background: var(--warning-soft); color: var(--warning); }
.kpi-icon.tone-danger { background: var(--danger-soft); color: var(--danger); }
.kpi-icon.tone-info { background: var(--info-soft); color: var(--info); }
.kpi-label { color: var(--muted); font-size: 13px; font-weight: 550; }
.kpi-value { font-size: 32px; font-weight: 780; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-sub { color: var(--muted); font-size: 12.5px; }
.kpi-sub b { color: var(--text-2); }

/* Tablolar */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; min-width: 640px; }
table.data th { position: sticky; top: 0; text-align: left; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
table.data td { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td { background: var(--surface-2); }
table.data .cell-title { font-weight: 650; }
table.data .cell-sub { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
th.right, td.right { text-align: right; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--text); }
.qty { font-weight: 700; font-variant-numeric: tabular-nums; }
.qty-zero { color: var(--danger); }
.delta-pos { color: var(--success); font-weight: 700; font-variant-numeric: tabular-nums; }
.delta-neg { color: var(--danger); font-weight: 700; font-variant-numeric: tabular-nums; }

.meter { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; min-width: 70px; }
.meter span { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.meter-success span { background: #10b981; }
.meter-warning span { background: #f59e0b; }
.meter-danger span { background: #ef4444; }

/* Form */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > label, .field-label { font-size: 12.5px; font-weight: 650; color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--muted); }
input[type=text], input[type=search], input[type=number], input[type=password], input[type=date], select, textarea {
  width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; padding: 10px 12px; resize: vertical; min-height: 84px; }
select { appearance: none; padding-right: 34px; 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='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
input::placeholder, textarea::placeholder { color: #93a0b4; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.search { position: relative; }
.search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { padding-left: 38px; }
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; padding: 16px 22px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.filter-bar .field { margin: 0; min-width: 150px; }
.filter-bar .field.grow { min-width: 220px; }
.choice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.choice label { position: relative; margin: 0; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span { display: grid; place-items: center; height: 40px; border-radius: 10px; border: 1px solid var(--border-strong); font-weight: 600; font-size: 13px; color: var(--text-2); background: var(--surface); }
.choice input:checked + span { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-ink); }
.choice input:focus-visible + span { box-shadow: var(--ring); }
.choice-2 { grid-template-columns: repeat(2, 1fr); }

.tabs { display: flex; gap: 4px; flex-wrap: wrap; padding: 14px 22px 0; border-bottom: 1px solid var(--border); }
.tabs a { padding: 10px 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a.is-active { color: var(--primary); border-color: var(--primary); }
.tabs .count { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--surface-3); font-size: 11.5px; color: var(--text-2); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); font-weight: 600; font-size: 13px; color: var(--text-2); cursor: pointer; }
.chip:hover { background: var(--surface-3); }
.chip.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }

.pagination { display: flex; gap: 6px; align-items: center; justify-content: center; padding: 16px; flex-wrap: wrap; }
.page-link { min-width: 36px; height: 36px; display: inline-grid; place-items: center; padding: 0 8px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; font-size: 13px; }
.page-link:hover { background: var(--surface-3); }
.page-link.is-current { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-link.is-disabled { opacity: .4; }
.page-gap { color: var(--muted); }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 22px 4px; flex-wrap: wrap; color: var(--muted); font-size: 13px; border-top: 1px solid var(--border); }

.empty-state { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 48px 24px; color: var(--muted); }
.empty-state h2, .empty-state h3 { color: var(--text); }

/* Grafik */
.chart { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; align-items: end; height: 210px; padding: 8px 0 0; }
.chart-col { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 8px; height: 100%; min-width: 0; }
.chart-bars { display: flex; align-items: flex-end; gap: 4px; flex: 1; width: 100%; justify-content: center; }
.bar { width: min(18px, 40%); border-radius: 6px 6px 2px 2px; min-height: 2px; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
.bar-in { background: linear-gradient(180deg, #34d399, #059669); }
.bar-out-manual { background: linear-gradient(180deg, #fb7185, #e11d48); }
.bar-out-order { background: linear-gradient(180deg, #a5b4fc, #6366f1); }
.chart-label { font-size: 11px; color: var(--muted); white-space: nowrap; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* Listeler */
.list { display: grid; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 22px; border-top: 1px solid var(--border); }
.list-item:first-child { border-top: 0; }
.list-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.list-icon.in { background: var(--success-soft); color: var(--success); }
.list-icon.out { background: var(--danger-soft); color: var(--danger); }
.list-main { min-width: 0; flex: 1; }
.list-main b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.list-main small { color: var(--muted); font-size: 12px; }
.list-end { text-align: right; flex: none; }

.type-row { display: grid; grid-template-columns: minmax(110px, 1.5fr) repeat(2, minmax(0, 1fr)); gap: 14px; align-items: center; padding: 12px 22px; border-top: 1px solid var(--border); }
.type-row:first-child { border-top: 0; }
.type-head { color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--surface-2); }

/* Set bileşenleri */
.set-pill { display: inline-grid; place-items: center; min-width: 54px; height: 36px; padding: 0 12px; border-radius: 10px; font-size: 18px; font-weight: 780; font-variant-numeric: tabular-nums; background: var(--surface-3); color: var(--muted); }
.set-pill.hazir { background: var(--success-soft); color: var(--success); }
.set-pill.tek_eksik { background: var(--warning-soft); color: var(--warning); }
#sets-table td:first-child { min-width: 210px; }
.parts-mini { display: flex; gap: 6px; flex-wrap: wrap; }
.part-mini { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 7px; background: var(--surface-3); font-size: 12px; color: var(--text-2); }
.part-mini b { font-variant-numeric: tabular-nums; }
.part-mini.zero { background: var(--danger-soft); color: var(--danger); }
.part-row { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(70px, 1fr)); gap: 12px; align-items: center; padding: 14px 22px; border-top: 1px solid var(--border); }
.part-row.is-limit { background: var(--warning-soft); }
.part-row.is-missing { background: var(--danger-soft); }
.stat-pair { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat-box { padding: 14px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.stat-box small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.stat-box strong { font-size: 26px; font-weight: 780; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--info-soft); color: var(--info); }
.callout.warn { background: var(--warning-soft); color: var(--warning); }
.callout p { color: inherit; font-size: 13px; }

/* Modal */
dialog.modal { width: min(520px, calc(100vw - 24px)); padding: 0; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); color: var(--text); box-shadow: 0 30px 80px -20px rgba(2, 6, 23, .55); }
dialog.modal::backdrop { background: rgba(8, 13, 26, .55); backdrop-filter: blur(3px); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 22px 24px 0; }
.modal-head h2 { font-size: 18px; }
.modal-head p { color: var(--muted); font-size: 13px; margin-top: 3px; }
.modal-body { padding: 18px 24px 8px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px 22px; }
.current-stock { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 16px; }
.current-stock div { padding: 10px 14px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); }
.current-stock small { color: var(--muted); font-size: 12px; display: block; }
.current-stock b { font-size: 20px; font-variant-numeric: tabular-nums; }

/* Toast */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; gap: 10px; width: min(420px, calc(100vw - 32px)); }
.toast { display: flex; align-items: flex-start; gap: 12px; padding: 13px 14px 13px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); border-left-width: 4px; box-shadow: var(--shadow); animation: toast-in .25s ease; }
.toast span { flex: 1; font-weight: 550; }
.toast-success { border-left-color: #10b981; }
.toast-danger { border-left-color: #ef4444; }
.toast-warning { border-left-color: #f59e0b; }
.toast-close { border: 0; background: transparent; cursor: pointer; color: var(--muted); padding: 2px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Giriş ekranı */
.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; background:
  radial-gradient(900px 500px at 10% -10%, color-mix(in srgb, var(--primary) 22%, transparent), transparent),
  radial-gradient(700px 420px at 100% 110%, color-mix(in srgb, #f2a93b 22%, transparent), transparent), var(--bg); }
.auth-card { width: min(430px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 38px 34px; box-shadow: var(--shadow); display: grid; gap: 18px; }
.auth-card .brand-mark { width: 52px; height: 52px; font-size: 19px; }
.auth-card h1 { font-size: 26px; font-weight: 780; }
.auth-card .btn { height: 44px; }
.alert { padding: 12px 14px; border-radius: 12px; font-weight: 550; }
.alert-danger { background: var(--danger-soft); color: var(--danger); }
.alert-success { background: var(--success-soft); color: var(--success); }

.link { color: var(--primary); font-weight: 600; }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
.link:hover { text-decoration: underline; }
.text-danger { color: var(--danger); }
input[type=checkbox], input[type=radio] { accent-color: var(--primary); width: 16px; height: 16px; }
.choice input[type=radio] { width: 100%; height: 100%; }
.page-title .eyebrow { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.data .cell-title { overflow-wrap: anywhere; }
.bar > span { display: block; width: 100%; }
.hint { font-size: 12px; color: var(--muted); }

/* Responsive */
@media (max-width: 1280px) { .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-main { grid-template-columns: 1fr; } }
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .25s ease; }
  .app.nav-open .sidebar { transform: none; box-shadow: 0 0 80px rgba(0, 0, 0, .55); }
  .app.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(8, 13, 26, .55); z-index: 35; }
  .menu-btn, .icon-btn.menu-btn { display: inline-grid; }
  .topbar { padding: 14px 18px 10px; }
  .page-title h1 { font-size: 22px; }
  .content { padding: 6px 18px 56px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; gap: 10px; }
  .menu-btn { order: 1; }
  .topbar-actions { order: 2; margin-left: auto; flex-wrap: nowrap; }
  .page-title { order: 3; flex-basis: 100%; }
  .page-title h1 { font-size: 21px; }
  .kpi-grid { gap: 10px; }
  .kpi { padding: 14px; }
  .kpi-value { font-size: 24px; }
  .field-row { grid-template-columns: 1fr; }
  .filter-bar { padding: 14px 16px; }
  .filter-bar .field, .filter-bar .field.grow { min-width: calc(50% - 6px); flex: 1 1 calc(50% - 6px); }
  .card-head { padding: 16px 16px 0; }
  .card-body { padding: 14px 16px 18px; }
  .type-row { grid-template-columns: minmax(70px, 1.3fr) repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px 14px; }
  .chart { gap: 4px; }
  .chart-col:nth-child(even) .chart-label { visibility: hidden; }
  .part-row { grid-template-columns: 1fr 1fr 1fr; padding: 12px 16px; }
  .part-row > :first-child { grid-column: 1 / -1; }
  .list-item { padding: 12px 16px; }
  .topbar-actions .btn span.label-long { display: none; }
  .segmented a { padding: 6px 10px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { .sidebar, .topbar, .toasts, .filter-bar, .btn { display: none !important; } .app { display: block; } }
