/* Kasa Paneli — nötr koyu palet. Rakam = içerik; çevresi sessiz. Ham renk yalnızca :root'ta.
   Mobil öncelikli: temel kurallar telefon, min-width sorguları büyütür. */

:root {
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;

  --bg: #121212;
  --surface: #1b1b1b;
  --raised: #222222;
  --line: #2c2c2c;
  --line-strong: #3a3a3a;
  --text: #f4f4f5;
  --text-2: #a3a3a8;
  --text-3: #6f6f75;
  --on-accent: #ffffff;

  --pos: #22c55e;
  --neg: #f87171;
  --warn: #fbbf24;
  --blue: #60a5fa;
  --accent: #a78bfa;
  --accent-fill: #8b5cf6;

  --pos-soft: color-mix(in srgb, var(--pos) 14%, transparent);
  --neg-soft: color-mix(in srgb, var(--neg) 14%, transparent);
  --warn-soft: color-mix(in srgb, var(--warn) 14%, transparent);
  --blue-soft: color-mix(in srgb, var(--blue) 14%, transparent);
  --accent-soft: color-mix(in srgb, var(--accent) 16%, transparent);
  --hover: color-mix(in srgb, var(--text) 6%, transparent);
  --focus: color-mix(in srgb, var(--accent) 65%, transparent);

  --r-lg: 18px;
  --r-md: 12px;
  --r-sm: 9px;
  --r-pill: 999px;
  --ctl: 44px;
  --nav-w: 236px;
  --tab-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);

  --t-xs: 12px;
  --t-sm: 13px;
  --t-base: 15px;
  --t-md: 17px;
  --t-lg: clamp(20px, 1.2rem + 1vw, 24px);
  --t-hero: clamp(26px, 1.4rem + 1.6vw, 34px);
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font: 400 var(--t-base)/1.5 var(--font); color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
a, summary, [role="tab"] { touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.muted { color: var(--text-2); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 8px 14px; border-radius: var(--r-pill); background: var(--accent-fill); color: var(--on-accent); font-weight: 600; }
.skip:focus-visible { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- kabuk ---------- */
.app { min-height: 100dvh; }
.shell { min-height: 100dvh; }
.nav { display: none; }
.main { min-width: 0; width: 100%; padding: 16px 14px calc(var(--tab-h) + var(--safe-b) + 20px); }
@media (min-width: 900px) { .main { max-width: 1360px; justify-self: stretch; } }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: var(--surface); border-top: 1px solid var(--line);
}
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--text-2); font-size: 11px; font-weight: 600; min-height: 44px; }
.tab svg { width: 22px; height: 22px; }
.tab[aria-current="page"] { color: var(--accent); }
.tab:hover { color: var(--text); }

@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: var(--nav-w) 1fr; }
  .tabbar { display: none; }
  .nav {
    display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100dvh; padding: 22px 14px;
    border-right: 1px solid var(--line); background: var(--surface);
  }
  .main { padding: 28px 32px 56px; }
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 20px; }
.brand-mark { width: 32px; height: 32px; border-radius: 10px; background: var(--accent-fill); display: grid; place-items: center; color: var(--on-accent); flex: none; }
.brand-mark svg { width: 18px; height: 18px; }
.brand-name { font-weight: 700; letter-spacing: -.01em; }
.brand-sub { font-size: var(--t-xs); color: var(--text-2); }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: var(--r-sm); color: var(--text-2); font-weight: 500; transition: background-color .15s, color .15s; }
.nav-link svg { width: 20px; height: 20px; flex: none; }
.nav-link:hover { background: var(--hover); color: var(--text); }
.nav-link[aria-current="page"] { background: var(--accent-soft); color: var(--text); }
.nav-spacer { flex: 1; }
.nav-user { padding: 12px; border-top: 1px solid var(--line); font-size: var(--t-sm); color: var(--text-2); }
.nav-user strong { display: block; color: var(--text); font-weight: 600; }

/* ---------- sayfa başlığı ---------- */
.page-head { display: flex; flex-direction: column; gap: 10px; margin: 0 0 16px; }
.page-title { margin: 0; font-size: var(--t-lg); font-weight: 700; letter-spacing: -.02em; line-height: 1.15; text-wrap: balance; overflow-wrap: anywhere; }
.page-sub { margin: 2px 0 0; color: var(--text-2); font-size: var(--t-sm); }
.head-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (min-width: 640px) {
  .page-head { flex-direction: row; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
}
.live { display: inline-flex; align-items: center; gap: 7px; font-size: var(--t-xs); color: var(--text-2); padding: 6px 11px; border: 1px solid var(--line); border-radius: var(--r-pill); min-height: 32px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pos); box-shadow: 0 0 0 3px var(--pos-soft); }
.live[data-state="stale"] .live-dot { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.live[data-state="off"] .live-dot { background: var(--neg); box-shadow: none; }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 12px 0 6px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-size: var(--t-sm); font-weight: 500; margin-bottom: 8px; }
.back svg { width: 16px; height: 16px; }
.back:hover { color: var(--text); background: var(--raised); }

/* ---------- durum ---------- */
.status { display: inline-flex; align-items: center; gap: 7px; font-size: var(--t-xs); font-weight: 600; padding: 5px 10px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); color: var(--text-2); white-space: nowrap; min-height: 28px; }
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); }
.status[data-on="1"] { color: var(--pos); border-color: color-mix(in srgb, var(--pos) 40%, transparent); background: var(--pos-soft); }
.status[data-on="1"]::before { background: var(--pos); box-shadow: 0 0 0 3px var(--pos-soft); }

/* ---------- çip ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 0 9px; border-radius: var(--r-pill); font-size: var(--t-xs); font-weight: 600; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); white-space: nowrap; }
.chip[data-tone="pos"] { color: var(--pos); border-color: color-mix(in srgb, var(--pos) 40%, transparent); background: var(--pos-soft); }
.chip[data-tone="neg"] { color: var(--neg); border-color: color-mix(in srgb, var(--neg) 40%, transparent); background: var(--neg-soft); }
.chip[data-tone="warn"] { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: var(--warn-soft); }
.chip[data-tone="blue"], .chip[data-tone="mut"] { color: var(--blue); border-color: color-mix(in srgb, var(--blue) 40%, transparent); background: var(--blue-soft); }
.chip[data-tone="ops"], .chip[data-tone="info"] { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: var(--accent-soft); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
button.chip { min-height: 32px; transition: background-color .15s, color .15s; }
button.chip:hover { color: var(--text); background: var(--raised); }
button.chip[aria-pressed="true"] { color: var(--text); background: var(--raised); border-color: var(--line-strong); }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
@media (min-width: 640px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; } }
@media (min-width: 1100px) { .kpis { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); } }
.kpi { padding: 12px 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kpi-top { display: flex; align-items: center; gap: 7px; font-size: var(--t-xs); font-weight: 500; color: var(--text-2); }
.kpi-ico { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: color-mix(in srgb, var(--tone, var(--text-3)) 18%, transparent); color: var(--tone, var(--text-2)); flex: none; }
.kpi-ico svg { width: 13px; height: 13px; }
.kpi[data-tone="pos"] { --tone: var(--pos); }
.kpi[data-tone="neg"] { --tone: var(--neg); }
.kpi[data-tone="warn"] { --tone: var(--warn); }
.kpi[data-tone="blue"], .kpi[data-tone="mut"] { --tone: var(--blue); }
.kpi[data-tone="ops"], .kpi[data-tone="info"] { --tone: var(--accent); }
.kpi-value { font-size: 20px; font-weight: 600; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-foot { font-size: var(--t-xs); color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- kartlar ---------- */
.cards { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; } }
.card { display: block; width: 100%; text-align: left; padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); color: inherit; min-width: 0; transition: border-color .15s, transform .12s; }
a.card:hover, button.card:hover { border-color: var(--line-strong); }
a.card:active, button.card:active { transform: scale(.995); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-title { font-size: var(--t-md); font-weight: 700; letter-spacing: -.01em; margin: 0; text-wrap: balance; overflow-wrap: anywhere; min-width: 0; }
.card-sub { margin: 2px 0 12px; font-size: var(--t-xs); color: var(--text-2); }

/* iki ana rakam: kapsayıcı genişse yan yana, darsa alt alta; rakam ASLA kısaltılmaz,
   yazı boyutu kapsayıcıya göre küçülür (mono karakter ≈ 0,6em, en uzun değer ~15 karakter) */
.card, #kasa-panel { container-type: inline-size; }
.hero { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
@container (min-width: 520px) { .hero { grid-template-columns: 1fr 1fr; } }
.hero-item { background: var(--raised); padding: 12px 14px; min-width: 0; container-type: inline-size; }
.hero-label { font-size: var(--t-xs); color: var(--text-2); font-weight: 500; margin: 0 0 4px; }
.hero-value { font-size: clamp(15px, calc((100cqw - 28px) / 9), 34px); font-weight: 600; line-height: 1.1; white-space: nowrap; letter-spacing: -.02em; }
.hero-foot { font-size: var(--t-xs); color: var(--text-2); margin-top: 4px; }
.hero-item[data-tone="blue"] .hero-value { color: var(--blue); }
.hero-item[data-tone="pos"] .hero-value { color: var(--pos); }
.hero-item[data-tone="neg"] .hero-value { color: var(--neg); }
.hero-item[data-tone="muted"] .hero-value { color: var(--text-2); font-size: var(--t-md); font-weight: 500; }

/* küçük istatistik ızgarası */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; margin-top: 14px; }
@container (max-width: 360px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { min-width: 0; }
.stat-label { display: block; font-size: var(--t-xs); color: var(--text-2); margin-bottom: 1px; }
.stat-value { font-size: var(--t-base); font-weight: 600; white-space: nowrap; display: block; }
.tone-pos { color: var(--pos); }
.tone-neg { color: var(--neg); }
.tone-warn { color: var(--warn); }
.tone-blue, .tone-mut { color: var(--blue); }
.tone-accent, .tone-ops { color: var(--accent); }

/* meta satırları (hakediş, hesaplar) */
.meta { margin-top: 14px; border-top: 1px solid var(--line); }
.meta-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: var(--t-sm); }
.meta-row:last-child { border-bottom: 0; padding-bottom: 0; }
.meta-row .k { color: var(--text-2); min-width: 0; }
.meta-row .v { font-weight: 600; white-space: nowrap; }
.meta-row .v small { font-family: var(--font); font-weight: 500; color: var(--text-2); font-size: var(--t-xs); margin-left: 6px; }
.card-foot { margin-top: 12px; font-size: var(--t-xs); color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- bölüm / liste ---------- */
.section { margin: 20px 0 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.section-title { margin: 0; font-size: var(--t-base); font-weight: 600; }
.section-sub { margin: 0; font-size: var(--t-xs); color: var(--text-2); }
.box { border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); min-height: 54px; }
.row:first-child { border-top: 0; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 500; overflow-wrap: anywhere; }
.row-sub { font-size: var(--t-xs); color: var(--text-2); overflow-wrap: anywhere; }
.row-amt { font-size: var(--t-base); font-weight: 600; white-space: nowrap; }
.empty { padding: 32px 16px; text-align: center; color: var(--text-2); font-size: var(--t-sm); }

/* ---------- defter (günsonu / mutabakat gün kartı — set detayı vb. için saklanır) ---------- */
.days { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 900px) { .days { grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); gap: 14px; } }
.ledger { border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.ledger[data-today="1"] { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.ledger-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 14px 16px 0; }
.ledger-date { margin: 0; font-size: var(--t-base); font-weight: 600; }
.ledger-date small { display: block; font-size: var(--t-xs); color: var(--text-2); font-weight: 500; }
.ledger-total { padding: 8px 16px 14px; }
.ledger-total { container-type: inline-size; }
.ledger-total .hero-value { font-size: clamp(18px, calc((100cqw - 32px) / 9), 34px); }
.ledger-lines { border-top: 1px solid var(--line); padding: 6px 0; }
.line { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 8px; padding: 7px 16px; font-size: var(--t-sm); }
.line-sign { font-weight: 700; text-align: center; color: var(--text-3); font-family: var(--mono); }
.line-sign[data-s="1"] { color: var(--pos); }
.line-sign[data-s="-1"] { color: var(--neg); }
.line-label { color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.line-label small { display: block; color: var(--text-2); font-size: var(--t-xs); }
.line-value { font-weight: 600; white-space: nowrap; }
.line.sub { padding-top: 2px; padding-bottom: 2px; }
.line.sub .line-label { color: var(--text-2); font-size: var(--t-xs); padding-left: 10px; }
.line.sub .line-value { font-weight: 500; color: var(--text-2); font-size: var(--t-xs); }
.line.result { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }
.line.result .line-label { font-weight: 600; }
.line.result .line-value { font-size: var(--t-md); }
.ledger-foot { display: flex; gap: 8px 14px; flex-wrap: wrap; padding: 10px 16px 14px; border-top: 1px solid var(--line); font-size: var(--t-xs); color: var(--text-2); }

/* ---------- ilerleme ---------- */
.bar { height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--text) 10%, transparent); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 3px; background: var(--pos); transform-origin: left; }
.bar[data-tone="warn"] > span { background: var(--warn); }
.bar[data-tone="neg"] > span { background: var(--neg); }

/* ---------- sekmeler ---------- */
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 1 0 auto; min-height: 40px; padding: 0 14px; border: 0; border-radius: var(--r-sm); background: none; color: var(--text-2); font-weight: 600; font-size: var(--t-sm); white-space: nowrap; transition: background-color .15s, color .15s; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { background: var(--raised); color: var(--text); }

/* ---------- form ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label { font-size: var(--t-xs); font-weight: 600; color: var(--text-2); }
.input, .select, .textarea { width: 100%; min-height: var(--ctl); padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); color: var(--text); font-size: 16px; transition: border-color .15s; -webkit-appearance: none; appearance: none; }
.textarea { padding: 10px 14px; resize: vertical; min-height: 72px; }
.input::placeholder { color: var(--text-3); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: none; border-color: var(--accent-fill); box-shadow: 0 0 0 3px var(--focus); }
.input[aria-invalid="true"] { border-color: var(--neg); }
.form-err { color: var(--neg); font-size: var(--t-sm); min-height: 1.2em; margin: 0; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 600px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: var(--r-sm); background: var(--bg); border: 1px solid var(--line); }
.seg button { min-height: 40px; border: 0; border-radius: 7px; background: none; color: var(--text-2); font-weight: 600; font-size: var(--t-sm); transition: background-color .15s, color .15s; }
.seg button[aria-pressed="true"] { background: color-mix(in srgb, var(--c, var(--accent)) 20%, transparent); color: var(--c, var(--accent)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c, var(--accent)) 45%, transparent); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--ctl); padding: 0 18px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--raised); color: var(--text); font-weight: 600; font-size: var(--t-sm); white-space: nowrap; transition: background-color .15s, transform .12s, border-color .15s; }
.btn svg { width: 18px; height: 18px; }
.btn:hover { background: color-mix(in srgb, var(--text) 12%, var(--surface)); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn-primary { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent-fill) 85%, #fff); }
.btn-danger { color: var(--neg); border-color: color-mix(in srgb, var(--neg) 40%, transparent); background: var(--neg-soft); }
.btn-danger:hover { background: color-mix(in srgb, var(--neg) 22%, transparent); }
.btn-sm { min-height: 36px; padding: 0 12px; }
.btn-icon { width: 40px; min-height: 40px; padding: 0; border-radius: 50%; }
.btn-icon svg { width: 16px; height: 16px; }
.actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.search { position: relative; }
.search .input { padding-left: 40px; }
.search svg { position: absolute; left: 13px; top: 50%; width: 18px; height: 18px; margin-top: -9px; color: var(--text-2); pointer-events: none; }

/* ---------- dialog ---------- */
dialog.sheet { border: 1px solid var(--line); border-radius: var(--r-lg) var(--r-lg) 0 0; border-bottom: 0; background: var(--surface); color: var(--text); padding: 0; margin: auto 0 0; width: 100vw; max-width: 100vw; max-height: 92dvh; box-shadow: 0 -12px 40px rgba(0, 0, 0, .4); overscroll-behavior: contain; }
dialog.sheet::backdrop { background: rgba(0, 0, 0, .58); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px 0; }
.sheet-title { margin: 0; font-size: var(--t-md); font-weight: 700; }
.sheet-body { padding: 16px 18px calc(18px + var(--safe-b)); display: flex; flex-direction: column; gap: 14px; max-height: 80dvh; overflow-y: auto; overscroll-behavior: contain; }
@media (min-width: 600px) {
  dialog.sheet { margin: auto; width: min(520px, calc(100vw - 24px)); border-radius: var(--r-lg); border-bottom: 1px solid var(--line); box-shadow: 0 20px 50px rgba(0, 0, 0, .5); }
  .sheet-body { padding-bottom: 18px; }
}

/* ---------- giriş ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(380px, 100%); padding: 28px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 16px; }
.login-card h1 { margin: 0; font-size: var(--t-lg); }
.login-card p { margin: 0; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 14px); transform: translate(-50%, 12px); z-index: 60; padding: 10px 16px; border-radius: var(--r-pill); background: var(--text); color: var(--bg); font-weight: 600; font-size: var(--t-sm); opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; max-width: calc(100vw - 32px); text-align: center; }
.toast[data-show="1"] { opacity: 1; transform: translate(-50%, 0); }
.toast[data-tone="neg"] { background: var(--neg); color: #fff; }
@media (min-width: 900px) { .toast { bottom: 24px; } }

/* ---------- ayrıntı / anahtar-değer ---------- */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: var(--t-sm); margin: 0; }
.kv dt { color: var(--text-2); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.secret { display: inline-flex; align-items: center; gap: 8px; }
.secret button { border: 1px solid var(--line); background: var(--raised); color: var(--text-2); border-radius: var(--r-pill); font-size: 11px; font-weight: 600; padding: 0 9px; min-height: 28px; }
.secret button:hover { color: var(--text); }
.only-mobile { display: block; }
.only-desktop { display: none; }
@media (min-width: 700px) { .only-desktop { display: block; } .only-mobile { display: none; } }
.acc-card { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.acc-card:first-child { border-top: 0; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--t-sm); }
.table th { text-align: left; padding: 10px 14px; font-size: var(--t-xs); font-weight: 600; color: var(--text-2); border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); }
.table td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: middle; white-space: nowrap; background: var(--surface); }
.table tbody tr:first-child td { border-top: 0; }
.table .r { text-align: right; }
.table .strong { font-weight: 700; font-size: var(--t-base); }
.table td.wrap { white-space: normal; overflow-wrap: anywhere; min-width: 260px; }
.table .cell-sub { display: block; font-size: 11px; color: var(--text-2); font-family: var(--font); font-weight: 400; }
.table tr[data-today="1"] td { background: color-mix(in srgb, var(--warn) 6%, var(--surface)); }
.table tr.total td { background: var(--raised); font-weight: 700; border-top: 2px solid var(--line-strong); }
.table tr.detail td { background: var(--raised); white-space: normal; padding: 8px 14px 12px 40px; }
.detail-list { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: var(--t-xs); color: var(--text-2); }
.detail-list span { display: inline-flex; gap: 6px; align-items: baseline; }
.detail-list b { color: var(--text); font-weight: 600; }
.table.rows-link tbody tr:not(.total) { cursor: pointer; }
.table.rows-link tbody tr:not(.total):hover td { background: var(--raised); }
.row-link { font-weight: 600; }
.row-link:hover { text-decoration: underline; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--blue); font: inherit; font-family: var(--mono); font-variant-numeric: tabular-nums; cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }
.table-note { margin: 0; padding: 10px 14px; border-top: 1px solid var(--line); font-size: var(--t-xs); color: var(--text-2); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table.sticky th:first-child, .table.sticky td:first-child { position: sticky; left: 0; z-index: 1; box-shadow: 1px 0 0 var(--line); }
.rangebar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.rangebar-dates { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rangebar-dates .field { width: auto; }
.rangebar-dates .input { min-height: 40px; width: 150px; padding: 0 10px; }
.rangebar-dates .input::-webkit-calendar-picker-indicator { filter: invert(.7); }
.range-info { font-size: var(--t-xs); margin-left: 4px; }
@media (min-width: 900px) { .rangebar { flex-direction: row; align-items: center; justify-content: space-between; } }
.loading { padding: 40px; text-align: center; color: var(--text-2); }
.skeleton { height: 120px; border-radius: var(--r-lg); background: var(--surface); animation: pulse 1.2s ease-in-out infinite alternate; }
@keyframes pulse { from { opacity: .5; } to { opacity: 1; } }

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