/* Tatilox yönetim görüntüleyicisi. Saf CSS değişkenleri; harici font/CDN yok (CSP: style-src 'self').
   Varsayılan: OLED koyu; [data-theme=light] açık tema. Yazı tipi: Fira Sans / Fira Code varsa o, yoksa sistem yığını. */
:root {
  --sans: "Fira Sans", "Inter", "Segoe UI", system-ui, -apple-system, "Roboto", "Helvetica Neue", Arial, sans-serif;
  --mono: "Fira Code", "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
  --bg: #05070b; --surface: #0b1018; --surface-2: #111826; --surface-3: #182236;
  --line: #1f2a3f; --line-strong: #31405d;
  --text: #e7edf7; --muted: #9aa8bf;
  --primary: #2563eb; --primary-hover: #3b82f6; --link: #8ab8ff; --on-primary: #fff;
  --accent: #f59e0b; --accent-hover: #fbbf24; --on-accent: #1a1000;
  --focus: #fbbf24;
  --ok-bg: #0f2a22; --ok-fg: #5ee0ae; --bad-bg: #2f1618; --bad-fg: #ff9d97;
  --warn-bg: #2b2208; --warn-fg: #fbbf24; --off-bg: #1a2232; --off-fg: #aab4c6; --info-bg: #0f1e3a; --info-fg: #9cc2ff;
  --c1: #56b4e9; --c2: #e69f00; --c3: #2bc49a; --c4: #cc79a7; --c5: #f0e442; --c6: #ff8a4c; --c7: #a0a8b8;
  --shadow: 0 10px 40px rgb(0 0 0 / .55);
  --side-w: 248px; --top-h: 60px; --tap: 40px; --radius: 10px;
  --dur: 180ms;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f8fafc; --surface: #ffffff; --surface-2: #f1f5f9; --surface-3: #e6edf6;
  --line: #d5dde9; --line-strong: #b4c0d2;
  --text: #0f172a; --muted: #475569;
  --primary: #1e40af; --primary-hover: #1d4ed8; --link: #1e40af; --on-primary: #fff;
  --accent: #f59e0b; --accent-hover: #d98a06; --on-accent: #1a1000;
  --focus: #1d4ed8;
  --ok-bg: #dcf5e8; --ok-fg: #0b6b47; --bad-bg: #fde4e4; --bad-fg: #a31d1d;
  --warn-bg: #fdf0cc; --warn-fg: #7a4a00; --off-bg: #e6edf6; --off-fg: #475569; --info-bg: #e3ecff; --info-fg: #1e40af;
  --c1: #0072b2; --c2: #d55e00; --c3: #009e73; --c4: #cc79a7; --c5: #a89400; --c6: #e69f00; --c7: #6b7280;
  --shadow: 0 10px 40px rgb(15 23 42 / .18);
}
@media (pointer: coarse), (max-width: 768px) { :root { --tap: 44px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.5 var(--sans); min-height: 100vh; overflow-x: hidden; }
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: var(--link); }
[hidden] { display: none !important; }
svg { flex: none; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico.sm { width: 16px; height: 16px; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 10px 14px; border-radius: 8px; font-weight: 600; }
.skip:focus { top: 8px; }

/* ---------- kabuk ---------- */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns var(--dur) ease; }
.app[data-collapsed="1"] { --side-w: 68px; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--line); z-index: 40; overflow: hidden; }
.brand { display: flex; align-items: center; gap: 10px; height: var(--top-h); padding: 0 18px; border-bottom: 1px solid var(--line); flex: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--primary); color: #fff; display: grid; place-items: center; flex: none; }
.brand-name { font-weight: 700; font-size: 17px; letter-spacing: .01em; line-height: 1.1; white-space: nowrap; }
.brand-sub { display: block; font-size: 12px; color: var(--muted); font-weight: 400; letter-spacing: .04em; text-transform: uppercase; }
.nav { flex: 1; overflow-y: auto; padding: 10px 10px 16px; overscroll-behavior: contain; }
.nav-group { margin: 14px 0 4px; padding: 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.nav-group:first-child { margin-top: 4px; }
.nav a { display: flex; align-items: center; gap: 12px; min-height: var(--tap); padding: 0 10px; border-radius: 8px; color: var(--text); text-decoration: none; white-space: nowrap; transition: background-color var(--dur), color var(--dur); position: relative; cursor: pointer; }
.nav a:hover { background: var(--surface-2); }
.nav a[aria-current="page"] { background: var(--surface-3); font-weight: 600; }
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav .lbl { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.nav .cnt { font-family: var(--mono); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.app[data-collapsed="1"] .brand-text, .app[data-collapsed="1"] .nav .lbl, .app[data-collapsed="1"] .nav .cnt, .app[data-collapsed="1"] .side-foot .txt { display: none; }
.app[data-collapsed="1"] .nav-group { height: 1px; margin: 10px 8px; padding: 0; background: var(--line); font-size: 0; }
.side-foot { flex: none; border-top: 1px solid var(--line); padding: 10px; display: grid; gap: 6px; }
.pii-chip { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); font-size: 13px; color: var(--muted); line-height: 1.3; }
.pii-chip.on { color: var(--ok-fg); background: var(--ok-bg); }
.pii-chip.off { color: var(--warn-fg); background: var(--warn-bg); }
.nav-btn { display: flex; align-items: center; gap: 12px; width: 100%; min-height: var(--tap); padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); text-align: left; transition: background-color var(--dur), color var(--dur); }
.nav-btn:hover { background: var(--surface-2); color: var(--text); }

.main-col { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 30; height: var(--top-h); display: flex; align-items: center; gap: 12px; padding: 0 20px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.icon-btn { width: var(--tap); height: var(--tap); display: inline-grid; place-items: center; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--text); flex: none; transition: background-color var(--dur), border-color var(--dur); }
.icon-btn:hover { background: var(--surface-2); border-color: var(--line); }
.gsearch { position: relative; flex: 1; max-width: 560px; }
.gsearch .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.gsearch input { width: 100%; height: var(--tap); padding: 0 12px 0 40px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); color: var(--text); }
.gsearch input::placeholder { color: var(--muted); opacity: 1; }
.gresults { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow); max-height: min(70vh, 520px); overflow-y: auto; padding: 6px; z-index: 60; }
.gres-head { padding: 8px 10px 4px; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.gres { display: flex; flex-direction: column; width: 100%; min-height: var(--tap); padding: 6px 10px; border: 0; border-radius: 8px; background: transparent; text-align: left; justify-content: center; cursor: pointer; }
.gres:hover, .gres[aria-selected="true"] { background: var(--surface-3); }
.gres .t { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gres .s { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gres-empty { padding: 14px 12px; color: var(--muted); font-size: 14px; }
.fresh-link { display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font-size: 13px; text-decoration: none; white-space: nowrap; margin-left: auto; transition: border-color var(--dur); cursor: pointer; }
.fresh-link:hover { border-color: var(--line-strong); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--off-fg); flex: none; }
.dot.fresh { background: var(--ok-fg); } .dot.late { background: var(--warn-fg); border-radius: 2px; transform: rotate(45deg); } .dot.stale, .dot.none { background: var(--bad-fg); border-radius: 2px; }
.fresh-link .txt-s { display: none; }

main { padding: 24px; width: 100%; max-width: 1680px; margin: 0 auto; outline: none; flex: 1; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { font-size: 26px; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; outline: none; }
.page-head .desc { color: var(--muted); font-size: 14px; margin-top: 4px; max-width: 70ch; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; position: relative; }

/* ---------- düğmeler / alanlar ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); color: var(--text); font-weight: 500; text-decoration: none; transition: background-color var(--dur), border-color var(--dur), color var(--dur); white-space: nowrap; cursor: pointer; }
.btn:hover:not(:disabled) { background: var(--surface-3); }
.btn:disabled { opacity: .5; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn.primary:hover:not(:disabled) { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.cta { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn.cta:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover:not(:disabled) { color: var(--text); background: var(--surface-2); }
.field { display: grid; gap: 4px; min-width: 0; }
.field > label, .field > .lab { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.in { height: var(--tap); width: 100%; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); color: var(--text); transition: border-color var(--dur); }
.in:hover { border-color: var(--muted); }
select.in { padding-right: 8px; }
.filters { display: grid; grid-template-columns: minmax(200px, 2fr) repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; align-items: end; padding: 14px; margin-bottom: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.filters .field.q { grid-column: span 1; }

/* ---------- kartlar / ızgara ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; min-width: 0; }
.card h2 { font-size: 15px; font-weight: 600; }
.card .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { display: flex; flex-direction: column; gap: 4px; min-height: 124px; }
.kpi .k-lab { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); font-weight: 500; }
.kpi .k-val { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 32px; line-height: 1.15; font-weight: 600; letter-spacing: -.02em; }
.kpi .k-val.money { font-size: 26px; overflow-wrap: anywhere; }
.kpi .k-sub { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: auto; }
.kpi .k-sub b { color: var(--text); font-weight: 500; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.kpi.accent { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.grid-charts { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.c-8 { grid-column: span 8; } .c-4 { grid-column: span 4; } .c-6 { grid-column: span 6; } .c-12 { grid-column: span 12; }
.chart-box { margin-top: 12px; min-height: 220px; width: 100%; }
.chart-box svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-sum { margin-top: 10px; font-size: 13px; color: var(--muted); }
.chart-sum b { color: var(--text); font-weight: 500; }
.alt { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; }
.alt-sum { display: flex; flex-direction: column; cursor: pointer; }
.alt > summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; color: var(--link); font-size: 13px; font-weight: 500; list-style-position: inside; }
.alt table { margin-top: 8px; }
.s1 { fill: var(--c1); } .s2 { fill: var(--c2); } .s3 { fill: var(--c3); } .s4 { fill: var(--c4); } .s5 { fill: var(--c5); } .s6 { fill: var(--c6); } .s7 { fill: var(--c7); }
.sw1 { background: var(--c1); } .sw2 { background: var(--c2); } .sw3 { background: var(--c3); } .sw4 { background: var(--c4); } .sw5 { background: var(--c5); } .sw6 { background: var(--c6); } .sw7 { background: var(--c7); }
.ch-axis { stroke: var(--line-strong); stroke-width: 1; }
.ch-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; }
.ch-txt { fill: var(--muted); font-size: 12.5px; font-family: var(--sans); }
.ch-txt.val { fill: var(--text); font-family: var(--mono); font-size: 12px; }
.ch-seg { fill: none; stroke-width: 26; }
.ch-seg.s1 { stroke: var(--c1); fill: none; } .ch-seg.s2 { stroke: var(--c2); fill: none; } .ch-seg.s3 { stroke: var(--c3); fill: none; } .ch-seg.s4 { stroke: var(--c4); fill: none; } .ch-seg.s5 { stroke: var(--c5); fill: none; } .ch-seg.s6 { stroke: var(--c6); fill: none; } .ch-seg.s7 { stroke: var(--c7); fill: none; }
.ch-center { fill: var(--text); font-family: var(--mono); font-size: 22px; font-weight: 600; text-anchor: middle; }
.ch-center-s { fill: var(--muted); font-size: 12px; text-anchor: middle; }
.donut-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; justify-content: center; }
.donut-wrap svg { width: 168px; height: 168px; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; flex: 1; min-width: 160px; }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend .sw { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.legend .l { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend .v { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--muted); }

.fresh-strip { margin-bottom: 18px; }
.fresh-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fresh-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; margin: 12px 0; background: var(--surface-3); }
.fresh-bar i { display: block; height: 100%; }
.fresh-bar .fresh { background: var(--ok-fg); } .fresh-bar .late { background: var(--warn-fg); } .fresh-bar .stale, .fresh-bar .none { background: var(--bad-fg); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.dchip { max-width: 100%; flex-wrap: wrap; display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; background: var(--surface-2); }
.dchip .n { font-weight: 500; overflow-wrap: anywhere; min-width: 0; }
.dchip .a { color: var(--muted); font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 12px; }
.dchip.late { border-color: color-mix(in srgb, var(--warn-fg) 60%, var(--line)); }
.dchip.stale, .dchip.none { border-color: color-mix(in srgb, var(--bad-fg) 70%, var(--line)); }

.runs { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 0; }
.runs li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; flex-wrap: wrap; }
.runs li:first-child { border-top: 0; }
.runs .d { font-weight: 500; flex: 1; min-width: 140px; }
.runs .t { color: var(--muted); font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums; }

/* ---------- rozet ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 7px; border-radius: 999px; font-size: 12.5px; font-weight: 500; line-height: 1.5; white-space: nowrap; background: var(--info-bg); color: var(--info-fg); }
.badge .ico { width: 14px; height: 14px; stroke-width: 2.4; }
.badge.ok { background: var(--ok-bg); color: var(--ok-fg); } .badge.bad { background: var(--bad-bg); color: var(--bad-fg); }
.badge.warn { background: var(--warn-bg); color: var(--warn-fg); } .badge.off { background: var(--off-bg); color: var(--off-fg); }

/* ---------- tablo ---------- */
.tbl-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; color: var(--muted); font-size: 14px; min-height: 24px; }
.tbl-meta b { color: var(--text); font-family: var(--mono); font-weight: 500; }
.tbl-wrap { position: relative; overflow: auto; max-height: calc(100vh - 330px); min-height: 360px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); scrollbar-gutter: stable; }
.tbl-wrap:focus-visible { outline-offset: -2px; }
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 14px; }
thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); text-align: left; font-weight: 600; font-size: 13px; white-space: nowrap; padding: 0; border-bottom: 1px solid var(--line-strong); }
.th-btn { display: flex; align-items: center; gap: 6px; width: 100%; min-height: var(--tap); padding: 0 12px; border: 0; background: transparent; font-weight: 600; font-size: 13px; text-align: left; color: var(--text); transition: background-color var(--dur); }
.th-btn:hover { background: var(--surface-3); }
.th-btn .ico { width: 14px; height: 14px; color: var(--muted); }
th[aria-sort="ascending"] .ico, th[aria-sort="descending"] .ico { color: var(--accent); }
th.r .th-btn { justify-content: flex-end; text-align: right; }
td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; max-width: 360px; overflow: hidden; text-overflow: ellipsis; }
td.statecell { max-width: none; white-space: normal; padding: 0; border: 0; }
td.long { max-width: 320px; }
td.r, th.r { text-align: right; }
td.num { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 13.5px; }
td.null, .null { color: var(--muted); }
tbody tr { transition: background-color var(--dur); cursor: pointer; }
tbody tr:hover { background: var(--surface-2); }
tbody tr.sel { background: var(--surface-3); box-shadow: inset 3px 0 0 var(--accent); }
tbody tr:last-child td { border-bottom: 0; }
.rowbtn { border: 0; background: transparent; color: var(--link); padding: 2px 4px; margin: -2px -4px; border-radius: 6px; font-family: var(--mono); font-size: 13.5px; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--link) 40%, transparent); text-underline-offset: 3px; cursor: pointer; white-space: nowrap; }
.rowbtn:hover { text-decoration-color: currentColor; }
.bool-y { color: var(--ok-fg); } .bool-n { color: var(--muted); }
.neg { color: var(--bad-fg); }
.sk td { padding: 14px 12px; }
.sk i { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-3) 25%, var(--line-strong) 50%, var(--surface-3) 75%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.sk i.w1 { width: 40%; } .sk i.w2 { width: 65%; } .sk i.w3 { width: 85%; } .sk i.w4 { width: 55%; }
@keyframes shimmer { to { background-position: -200% 0; } }
.tbl-wrap[aria-busy="true"] tbody.stale { opacity: .45; pointer-events: none; }
.state { display: grid; place-items: center; text-align: center; gap: 10px; padding: 56px 20px; color: var(--muted); }
.state .big { width: 44px; height: 44px; color: var(--muted); }
.state h2 { color: var(--text); font-size: 17px; font-weight: 600; }
.state p { max-width: 46ch; font-size: 14px; }
.state.err .big { color: var(--bad-fg); }
.pager { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 2px 0; color: var(--muted); font-size: 14px; }
.pager .info { flex: 1; min-width: 160px; font-family: var(--mono); font-size: 13px; }
.pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 240px; max-height: 60vh; overflow: auto; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px; }
.pop legend { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 0 0 6px; }
.pop fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.chk { display: flex; align-items: center; gap: 10px; min-height: var(--tap); padding: 0 8px; border-radius: 8px; cursor: pointer; }
.chk:hover { background: var(--surface-2); }
.chk input { width: 18px; height: 18px; accent-color: var(--primary); margin: 0; cursor: pointer; }
.lock { display: inline-flex; align-items: center; gap: 4px; color: var(--warn-fg); font-size: 12px; }

/* ---------- detay çekmecesi ---------- */
.scrim { position: fixed; inset: 0; background: rgb(0 0 0 / .55); z-index: 70; opacity: 0; transition: opacity var(--dur); }
.scrim.show { opacity: 1; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(540px, 100vw); z-index: 80; display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--line-strong); box-shadow: var(--shadow); transform: translateX(100%); transition: transform 220ms ease; }
.drawer.show { transform: none; }
.drawer-head { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.drawer-head .tt { flex: 1; min-width: 0; }
.drawer-head h2 { font-size: 19px; line-height: 1.25; overflow-wrap: anywhere; outline: none; }
.drawer-head .kicker { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.drawer-body { flex: 1; overflow-y: auto; padding: 6px 18px 28px; overscroll-behavior: contain; }
.dsec { margin-top: 18px; }
.dsec > h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
dl.kv { display: grid; grid-template-columns: minmax(110px, 38%) minmax(0, 1fr); margin: 0; }
dl.kv dt, dl.kv dd { margin: 0; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; overflow-wrap: anywhere; }
dl.kv dt { color: var(--muted); padding-right: 10px; }
dl.kv dd.pre { white-space: pre-wrap; }
.mini { width: 100%; font-size: 13px; }
.mini th { position: static; padding: 6px 10px; background: var(--surface-2); font-size: 12px; }
.mini td { padding: 7px 10px; max-width: 200px; }
.mini-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.rel-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; font-size: 13px; color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 120; background: var(--surface-3); color: var(--text); border: 1px solid var(--line-strong); padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); font-size: 14px; max-width: calc(100vw - 32px); }
.toast:empty { display: none; }

/* ---------- raporlar / senkron ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tab { min-height: var(--tap); padding: 0 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--muted); font-weight: 500; transition: background-color var(--dur), color var(--dur); cursor: pointer; }
.tab:hover { color: var(--text); background: var(--surface-2); }
.tab[aria-selected="true"] { background: var(--surface-3); color: var(--text); border-color: var(--line-strong); box-shadow: inset 0 -2px 0 var(--accent); }
.sums { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-bottom: 16px; }
.sum-nums { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 6px; }
.sum-nums div { display: grid; }
.sum-nums b { font-family: var(--mono); font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sum-nums span { font-size: 13px; color: var(--muted); }
.note { color: var(--muted); font-size: 13px; line-height: 1.55; margin-top: 8px; }
.callout { padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font-size: 13.5px; line-height: 1.55; margin-bottom: 16px; }
.callout b { color: var(--text); }

/* ---------- giriş ---------- */
.login-page { display: grid; place-items: center; min-height: 100vh; padding: 20px; background: radial-gradient(1200px 500px at 50% -10%, color-mix(in srgb, var(--primary) 22%, transparent), transparent 70%), var(--bg); }
.login { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px; padding: 28px 26px; box-shadow: var(--shadow); }
.login .brand { padding: 0; border: 0; height: auto; margin-bottom: 18px; }
.login h1 { font-size: 22px; margin-bottom: 6px; }
.login .sub { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.login form { display: grid; gap: 14px; }
.login .btn { width: 100%; }
.login-err { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 9px; background: var(--bad-bg); color: var(--bad-fg); font-size: 14px; }
.login .theme { position: fixed; right: 14px; top: 14px; }

/* ---------- duyarlı ---------- */
@media (max-width: 1100px) {
  .c-8, .c-4, .c-6 { grid-column: span 12; }
}
@media (max-width: 1023px) {
  .app, .app[data-collapsed="1"] { grid-template-columns: minmax(0, 1fr); --side-w: 280px; }
  .side { position: fixed; left: 0; top: 0; width: min(var(--side-w), 86vw); transform: translateX(-100%); visibility: hidden; transition: transform 220ms ease, visibility 0s linear 220ms; box-shadow: var(--shadow); z-index: 90; }
  .app[data-open="1"] .side { transform: none; visibility: visible; transition: transform 220ms ease, visibility 0s; }
  .app[data-collapsed="1"] .brand-text, .app[data-collapsed="1"] .nav .lbl, .app[data-collapsed="1"] .nav .cnt, .app[data-collapsed="1"] .side-foot .txt { display: revert; }
  .app[data-collapsed="1"] .nav-group { height: auto; margin: 14px 0 4px; padding: 0 10px; background: none; font-size: 12px; }
  .nav .lbl { display: block; }
  .top { padding: 0 12px; }
}
@media (max-width: 768px) {
  main { padding: 16px 14px 28px; }
  .page-head h1 { font-size: 22px; }
  .filters { grid-template-columns: 1fr 1fr; padding: 12px; }
  .filters .field.q { grid-column: 1 / -1; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi { min-height: 112px; }
  .kpi .k-val { font-size: 25px; }
  .tbl-wrap { max-height: calc(100vh - 250px); }
  .fresh-link .txt-l { display: none; } .fresh-link .txt-s { display: inline; }
  .gsearch input, .in { font-size: 16px; }
  .drawer { width: 100vw; border-left: 0; }
  dl.kv { grid-template-columns: 1fr; }
  dl.kv dt { padding-bottom: 0; border-bottom: 0; font-size: 12.5px; }
}
@media (max-width: 420px) {
  .kpis { grid-template-columns: 1fr; }
  .filters .field:not(.d) { grid-column: 1 / -1; }
  .top { gap: 6px; }
}
/* elle senkron tetikleme (syncctl.js) */
.units { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.unit { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
.u-main { min-width: 0; flex: 1; display: grid; gap: 4px; }
.u-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; }
.u-name { font-weight: 600; }
.u-key { color: var(--muted); font-size: 12.5px; }
.u-desc, .u-meta { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.u-warn { display: inline-flex; align-items: center; gap: 6px; color: var(--warn-fg); font-size: 12.5px; }
.u-act { flex: none; }
.unit .btn, .sync-btn { min-height: 44px; min-width: 44px; }
@media all { .sync-btn:disabled { opacity: .75; cursor: progress; } }
.sync-btn .ico.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.u-sched { margin-top: 6px; border-top: 1px dashed var(--line); padding-top: 6px; }
.u-sum { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--link); font-size: 13.5px; width: max-content; max-width: 100%; }
.u-form { display: grid; gap: 8px; padding: 6px 0 4px; }
.u-field { display: grid; gap: 4px; max-width: 460px; }
.u-field label { color: var(--muted); font-size: 12.5px; }
.u-field input, .u-field select { min-height: 44px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--text); }
.u-field input[aria-invalid="true"] { border-color: var(--bad-fg); }
.u-hint { color: var(--muted); font-size: 12.5px; }
.u-err { color: var(--bad-fg); font-size: 13px; }
.u-err:empty { display: none; }
.u-switch { gap: 10px; }
.u-switch .sw-k { width: 34px; height: 20px; border-radius: 999px; background: var(--off-bg); border: 1px solid var(--line-strong); position: relative; flex: none; }
.u-switch .sw-k::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform var(--dur), background-color var(--dur); }
.u-switch[aria-checked="true"] .sw-k { background: var(--ok-bg); border-color: var(--ok-fg); }
.u-switch[aria-checked="true"] .sw-k::after { transform: translateX(14px); background: var(--ok-fg); }
@media (max-width: 560px) { .unit { flex-direction: column; } .u-act, .u-act .btn { width: 100%; } }
@media (prefers-reduced-motion: reduce) {
  .sync-btn .ico.spin { animation: none; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .sk i { animation: none; }
}
@media print {
  .side, .top, .filters, .pager, .actions, .drawer, .scrim, .skip, .toast, .tabs { display: none !important; }
  .app { display: block; } body { background: #fff; color: #000; }
  main { padding: 0; max-width: none; }
  .tbl-wrap { max-height: none; overflow: visible; border: 0; }
  thead th { position: static; background: #eee; color: #000; } td, th { color: #000; }
  .card { break-inside: avoid; border-color: #999; background: #fff; }
}
