/* Finans Merkezi — tasarım sistemi. Operate kipi: sakin, taranabilir, rakam öncelikli. */
:root {
  color-scheme: light;
  --bg: #f4f4f0;
  --surface: #ffffff;
  --surface-2: #faf9f6;
  --side: #ecebe5;
  --ink: #141413;
  --ink-2: #47463f;
  --ink-3: #6b6962;
  --line: #e3e1d9;
  --line-2: #cfccc1;
  --accent: #1f5fd1;
  --accent-2: #174fb0;
  --accent-ink: #ffffff;
  --accent-soft: #e8effc;
  --good: #0e7a3c;
  --good-bg: #e4f3ea;
  --bad: #bf2f2e;
  --bad-bg: #fbe8e7;
  --warn: #8a5800;
  --warn-bg: #fcf0d3;
  --info-bg: #e8effc;
  --c1: #2a78d6; --c2: #eb6834; --c3: #1baf7a; --c4: #eda100; --c5: #e87ba4; --c6: #008300; --c7: #6250d6; --c8: #e34948;
  --grid: #e6e4dc;
  --axis: #c3c1b6;
  --shadow: 0 1px 2px rgba(20, 20, 19, 0.05), 0 8px 24px -12px rgba(20, 20, 19, 0.18);
  --radius: 10px;
  --radius-sm: 6px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --fs-xs: 12px; --fs-sm: 13px; --fs: 14px; --fs-md: 16px; --fs-lg: 18px; --fs-xl: 22px; --fs-2xl: 28px;
  --side-w: 248px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #111110; --surface: #1a1a19; --surface-2: #20201f; --side: #161615; --ink: #f0efec; --ink-2: #c8c7bd; --ink-3: #9d9b92;
    --line: #2d2d2b; --line-2: #3e3e3b; --accent: #6aa3f2; --accent-2: #8bb8f6; --accent-ink: #0b1220; --accent-soft: #1b2a44;
    --good: #4cc47d; --good-bg: #14301f; --bad: #f08585; --bad-bg: #3a1a1a; --warn: #e5b24a; --warn-bg: #3a2c0e; --info-bg: #1b2a44;
    --c1: #3987e5; --c2: #d95926; --c3: #199e70; --c4: #c98500; --c5: #d55181; --c6: #14a014; --c7: #9085e9; --c8: #e66767;
    --grid: #2a2a28; --axis: #3e3e3b; --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111110; --surface: #1a1a19; --surface-2: #20201f; --side: #161615; --ink: #f0efec; --ink-2: #c8c7bd; --ink-3: #9d9b92;
  --line: #2d2d2b; --line-2: #3e3e3b; --accent: #6aa3f2; --accent-2: #8bb8f6; --accent-ink: #0b1220; --accent-soft: #1b2a44;
  --good: #4cc47d; --good-bg: #14301f; --bad: #f08585; --bad-bg: #3a1a1a; --warn: #e5b24a; --warn-bg: #3a2c0e; --info-bg: #1b2a44;
  --c1: #3987e5; --c2: #d95926; --c3: #199e70; --c4: #c98500; --c5: #d55181; --c6: #14a014; --c7: #9085e9; --c8: #e66767;
  --grid: #2a2a28; --axis: #3e3e3b; --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: var(--fs)/1.5 var(--font); -webkit-font-smoothing: antialiased; caret-color: var(--accent); }
::selection { background: var(--accent); color: var(--accent-ink); }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 2px solid transparent; background-clip: content-box; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: var(--fs-xl); } h2 { font-size: var(--fs-md); } h3 { font-size: var(--fs); }
p { margin: 0; }
.num, .tbl td.num, .tbl th.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); } .small { font-size: var(--fs-sm); } .xs { font-size: var(--fs-xs); }
.good { color: var(--good); } .bad { color: var(--bad); } .warn { color: var(--warn); }
.right { text-align: right; } .center { text-align: center; } .nowrap { white-space: nowrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; } .row.wrap { flex-wrap: wrap; } .row.between { justify-content: space-between; } .row.end { justify-content: flex-end; }
.col { display: flex; flex-direction: column; gap: 10px; }
.stack-s { display: flex; flex-direction: column; gap: 6px; }
.hide { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- Uygulama kabuğu ---------- */
.app { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: 100vh; }
.side { background: var(--side); border-right: 1px solid var(--line); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 10px; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--ink); color: var(--bg); display: grid; place-items: center; flex: none; }
.brand-name { font-weight: 700; font-size: var(--fs-md); letter-spacing: -0.015em; line-height: 1.15; }
.brand-sub { font-size: var(--fs-xs); color: var(--ink-3); }
.branch-pick { margin: 6px 14px 8px; }
.nav { padding: 6px 10px 12px; display: flex; flex-direction: column; gap: 1px; flex: 1; }
.nav-group { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); padding: 14px 10px 5px; font-weight: 600; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--radius-sm); color: var(--ink-2); font-weight: 520; text-decoration: none; position: relative; }
.nav a svg { flex: none; opacity: 0.8; }
.nav a:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); }
.nav a.active { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.nav a.active svg { color: var(--accent); opacity: 1; }
.nav .badge-n { margin-left: auto; font-size: 11px; background: var(--bad); color: #fff; border-radius: 10px; padding: 0 6px; min-width: 18px; text-align: center; line-height: 18px; font-weight: 650; }
.nav .badge-n.warn { background: var(--warn); }
.side-foot { padding: 10px 14px 14px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: var(--fs-sm); flex: none; }
.main { min-width: 0; }
.content { padding: 22px 30px 60px; max-width: 1560px; margin: 0 auto; }
.topbar-m { display: none; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .sub { color: var(--ink-3); font-size: var(--fs-sm); margin-top: 2px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; z-index: 40; width: min(86vw, 300px); transform: translateX(-102%); transition: transform 0.2s ease-out; box-shadow: var(--shadow); }
  .app.nav-open .side { transform: none; }
  .scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.4); z-index: 39; }
  .topbar-m { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
  .content { padding: 16px 14px 70px; }
}

/* Sol panel gizlendiğinde: içerik tam genişlik, sol üstte geri açma düğmesi (Ctrl+B) */
.btn.side-toggle { display: none; }
.side-hide { flex: none; }
@media (min-width: 961px) {
  .app.side-off { grid-template-columns: 1fr; }
  .app.side-off .side { display: none; }
  .btn.side-toggle { position: fixed; left: 12px; top: 12px; z-index: 35; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
  .app.side-off .btn.side-toggle { display: inline-flex; }
  .app.side-off .content { padding-left: 62px; }
}

/* ---------- Kartlar ve düzen ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card.pad { padding: 16px 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px 0; }
.card-head h2 { font-size: var(--fs); }
.card-head .sub { color: var(--ink-3); font-size: var(--fs-xs); }
.card-body { padding: 12px 18px 16px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split-21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } .split-12 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); } .split-32 { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
@media (max-width: 1100px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .split-21, .split-12, .split-32 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 680px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } }
.sect { margin-top: 22px; }
.sect > h2 { margin-bottom: 10px; }

/* Rakam şeridi: kart yığını yerine tek yüzeyde bölünmüş göstergeler */
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.strip > div { padding: 14px 18px; border-left: 1px solid var(--line); min-width: 0; }
.strip > div:first-child { border-left: 0; }
.strip .lbl { font-size: var(--fs-sm); color: var(--ink-3); }
.strip .val { font-size: 20px; font-weight: 650; letter-spacing: -0.02em; margin-top: 2px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.strip .val.hero { font-size: 26px; letter-spacing: -0.03em; }
.strip { grid-template-columns: 1.35fr repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column; }
.strip .hint { font-size: var(--fs-xs); color: var(--ink-3); margin-top: 2px; }
@media (max-width: 960px) {
  .strip { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip > div { border-left: 0; border-top: 1px solid var(--line); padding: 12px 14px; }
  .strip > div:first-child { grid-column: 1 / -1; border-top: 0; }
  .strip > div:nth-child(even) { border-left: 0; }
  .strip > div:nth-child(n+3):nth-child(odd) { border-left: 1px solid var(--line); }
  .strip .val { font-size: 17px; white-space: normal; overflow-wrap: anywhere; }
  .strip .val.hero { font-size: 24px; }
}

/* ---------- Düğmeler ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 560; cursor: pointer; white-space: nowrap; transition: background 0.12s, border-color 0.12s, box-shadow 0.12s; }
.btn:hover { background: var(--surface-2); border-color: var(--ink-3); }
.btn:active { transform: translateY(0.5px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line-2)); }
.btn.danger:hover { background: var(--bad-bg); border-color: var(--bad); }
.btn.danger.solid { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn.sm { height: 30px; padding: 0 10px; font-size: var(--fs-sm); }
.btn.icon { width: 34px; padding: 0; } .btn.icon.sm { width: 30px; }
.btn[disabled], .btn.loading { opacity: 0.55; pointer-events: none; }
.btn.loading::after { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Form elemanları ---------- */
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > label, .lbl-t { font-size: var(--fs-sm); color: var(--ink-2); font-weight: 520; }
.field .hint { font-size: var(--fs-xs); color: var(--ink-3); }
.field .err { font-size: var(--fs-xs); color: var(--bad); }
.inp, select.inp, textarea.inp { width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); transition: border-color 0.12s, box-shadow 0.12s; min-width: 0; }
textarea.inp { height: auto; min-height: 64px; padding: 8px 10px; resize: vertical; }
.inp:hover { border-color: var(--ink-3); }
.inp:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.inp::placeholder { color: var(--ink-3); opacity: 0.8; }
.inp[disabled], .inp[readonly] { background: var(--surface-2); color: var(--ink-2); }
.inp.money { text-align: right; font-variant-numeric: tabular-nums; }
.inp.invalid { border-color: var(--bad); }
.inp.calc { background: var(--surface-2); font-weight: 600; border-style: dashed; }
select.inp { appearance: none; padding-right: 28px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' 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 9px center; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 16px; height: 16px; }
.chk { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: var(--fs); }
.fgrid { display: grid; gap: 12px 14px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.fgrid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fgrid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 680px) { .fgrid.c2, .fgrid.c3 { grid-template-columns: minmax(0, 1fr); } }
.input-affix { position: relative; } .input-affix .suffix { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; font-size: var(--fs-sm); }
.input-affix .inp { padding-right: 26px; }

.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 2px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 6px; cursor: pointer; font-weight: 540; color: var(--ink-2); font-size: var(--fs-sm); }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line-2); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { border: 0; background: transparent; padding: 9px 14px; cursor: pointer; font-weight: 560; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--ink); border-bottom-color: var(--accent); }

/* ---------- Tablolar ---------- */
.tbl-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); max-height: var(--tbl-max, none); }
.card .tbl-wrap { border: 0; border-radius: 0; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); }
.tbl th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); color: var(--ink-3); font-weight: 600; font-size: var(--fs-xs); text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl th.num, .tbl td.num, .tbl th.right, .tbl td.right { text-align: right; }
.tbl tbody tr:hover td { background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
.tbl tr.click { cursor: pointer; }
.tbl tr.total td { font-weight: 650; background: var(--surface-2); border-top: 1px solid var(--line-2); }
.tbl tr.group td { font-weight: 650; background: var(--surface-2); color: var(--ink-2); }
.tbl tr.sub td { font-weight: 600; border-top: 1px solid var(--line-2); }
/* Mizan düzeyleri: Hesap Planı renkleri (kebir kırmızı, grup / alt hesap mavi, muavin beyaz) ve punto sırası */
.tbl tr.kebir td { font-size: 15px; font-weight: 750; color: var(--bad); border-top: 1px solid var(--line-2); }
.tbl tr.grup td { font-size: 14px; font-weight: 700; color: var(--accent); }
.tbl tr.alt td { font-size: 13.5px; font-weight: 500; color: color-mix(in srgb, var(--accent) 78%, var(--ink)); }
.tbl tr.muavin td { font-size: 12.5px; font-weight: 400; }
.tbl tr.grand td { font-weight: 700; background: var(--accent-soft); border-top: 2px solid var(--accent); }
.tbl tr.head td { font-weight: 700; letter-spacing: 0.02em; color: var(--ink); padding-top: 14px; background: transparent; border-bottom: 1px solid var(--line-2); }
.tbl tr.missing td { background: var(--warn-bg); color: var(--warn); }
.chip { display: inline-flex; align-items: center; gap: 2px; }
.chip .chip-x { border: 0; background: transparent; color: var(--ink-3); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 2px; }
.chip .chip-x:hover { color: var(--bad); }
.tbl tr.warnrow td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.tbl tr.off td { color: var(--ink-3); }
.tbl td.pos { color: var(--good); } .tbl td.neg { color: var(--bad); }
.tbl .cell-actions { display: flex; gap: 4px; justify-content: flex-end; }
.tbl tfoot td { font-weight: 650; background: var(--surface-2); border-top: 1px solid var(--line-2); position: sticky; bottom: 0; }
.tbl.sticky-first th:first-child, .tbl.sticky-first td:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); }
.tbl.sticky-first th:first-child { background: var(--surface-2); z-index: 3; }
.tbl.sticky-first tr.total td:first-child, .tbl.sticky-first tr.grand td:first-child { background: inherit; }

/* ---------- Rozetler, uyarılar, boş durum ---------- */
/* Şube rengi: günlük kasada şubeleri ayırt eden rozet (renk şubenin sırasına göre sabittir) */
.branch-chip { font-weight: 650; }
.branch-chip .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px; border-radius: 20px; font-size: var(--fs-xs); font-weight: 600; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; line-height: 20px; }
.badge.good { background: var(--good-bg); color: var(--good); border-color: transparent; } .badge.bad { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; } .badge.info { background: var(--info-bg); color: var(--accent); border-color: transparent; }
.notice { display: flex; gap: 10px; padding: 10px 14px; border-radius: var(--radius-sm); font-size: var(--fs-sm); align-items: flex-start; background: var(--info-bg); color: var(--ink); }
.notice svg { flex: none; margin-top: 2px; color: var(--accent); }
.notice.warn { background: var(--warn-bg); } .notice.warn svg { color: var(--warn); }
.notice.bad { background: var(--bad-bg); } .notice.bad svg { color: var(--bad); }
.notice.good { background: var(--good-bg); } .notice.good svg { color: var(--good); }
.empty { text-align: center; padding: 38px 20px; color: var(--ink-3); }
.empty svg { color: var(--line-2); margin-bottom: 8px; }
.empty h3 { color: var(--ink); margin-bottom: 4px; }
.empty p { max-width: 46ch; margin: 0 auto 14px; font-size: var(--fs-sm); }
.skel { background: linear-gradient(90deg, var(--line) 0%, var(--surface-2) 50%, var(--line) 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 6px; height: 14px; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } * { transition: none !important; } }

/* ---------- Çekmece, onay, toast ---------- */
.drawer-scrim { position: fixed; inset: 0; background: rgba(10, 10, 9, 0.38); z-index: 60; animation: fade 0.15s ease-out; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--surface); z-index: 61; box-shadow: var(--shadow); display: flex; flex-direction: column; animation: slidein 0.2s cubic-bezier(0.2, 0.7, 0.2, 1); }
.drawer.wide { width: min(820px, 100vw); }
.tbl th .col-grip { position: absolute; top: 0; right: 0; bottom: 0; width: 8px; cursor: col-resize; z-index: 3; }
.tbl th .col-grip::after { content: ''; position: absolute; top: 20%; bottom: 20%; left: 6px; width: 1px; background: var(--line-2); }
.tbl th .col-grip:hover::after { background: var(--accent); width: 2px; left: 5px; }
.accpick-pop { position: fixed; z-index: 95; max-height: 280px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 4px; }
.accpick-pop .opt { display: flex; gap: 10px; align-items: baseline; padding: 6px 10px; border-radius: 7px; cursor: pointer; font-size: var(--fs-sm); }
.accpick-pop .opt:hover, .accpick-pop .opt.on { background: var(--accent-soft); }
.accpick-pop .opt .c { font-variant-numeric: tabular-nums; font-weight: 650; min-width: 92px; }
.accpick-pop .opt .n { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.accpick-pop .opt.new .c { color: var(--accent); }
.accpick-pop .opt.none { color: var(--ink-3); cursor: default; }
.col-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 290px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 10px; }
.col-pop .col-row { display: flex; align-items: center; gap: 4px; padding: 3px 4px; }
.col-pop .col-row .btn { min-width: 30px; padding: 2px 6px; }
.drawer.ledger-win { transition: width 0.18s ease; }
.drawer.ledger-win .drawer-head { gap: 4px; }
.drawer.ledger-win .drawer-head h2 { margin-right: 8px; }
.tbl tr[title] { cursor: pointer; }
.tbl tr.kebir[title], .tbl tr.grup[title], .tbl tr.alt[title], .tbl tr.muavin[title] { user-select: none; }
.drawer-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.drawer-head h2 { flex: 1; font-size: var(--fs-lg); }
.drawer-body { padding: 18px 20px; overflow-y: auto; flex: 1; }
.drawer-foot { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; background: var(--surface-2); }
@keyframes slidein { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } }
dialog.dlg { border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); color: var(--ink); padding: 0; width: min(440px, calc(100vw - 32px)); box-shadow: var(--shadow); }
dialog.dlg::backdrop { background: rgba(10, 10, 9, 0.42); }
.dlg-body { padding: 20px 22px 6px; } .dlg-body h2 { margin-bottom: 6px; } .dlg-body p { color: var(--ink-2); }
.dlg-foot { padding: 14px 22px 18px; display: flex; gap: 8px; justify-content: flex-end; }
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 90; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow); font-size: var(--fs-sm); animation: slidein 0.18s ease-out; display: flex; gap: 10px; align-items: flex-start; }
.toast.err { background: var(--bad); color: #fff; } .toast.ok { background: var(--good); color: #fff; }
@media print { .toasts { display: none; } }

/* ---------- Grafikler ---------- */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart text { font-family: var(--font); fill: var(--ink-3); font-size: 11px; }
.chart .grid-l { stroke: var(--grid); stroke-width: 1; }
.chart .axis-l { stroke: var(--axis); stroke-width: 1; }
.chart .ln { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chart .dot { stroke: var(--surface); stroke-width: 2; }
.chart .hit { fill: transparent; }
.chart .cross { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 3; }
.tip { position: absolute; pointer-events: none; z-index: 5; background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px; box-shadow: var(--shadow); padding: 8px 10px; font-size: var(--fs-xs); min-width: 140px; opacity: 0; transition: opacity 0.08s; }
.tip.on { opacity: 1; }
.tip .t { font-weight: 650; margin-bottom: 4px; color: var(--ink); }
.tip .r { display: flex; justify-content: space-between; gap: 14px; color: var(--ink-2); }
.tip .r b { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 600; }
.tip .sw { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--ink-2); margin-top: 8px; }
.legend .k { display: inline-flex; align-items: center; gap: 6px; } .legend .sw { width: 14px; height: 3px; border-radius: 2px; } .legend .sw.box { height: 9px; width: 9px; border-radius: 2px; }
.segbar { display: flex; height: 10px; border-radius: 6px; overflow: hidden; gap: 2px; background: var(--surface); }
.segbar > i { display: block; min-width: 2px; border-radius: 2px; }
.hbars { display: flex; flex-direction: column; gap: 9px; }
.hbar .top { display: flex; justify-content: space-between; font-size: var(--fs-sm); margin-bottom: 3px; gap: 8px; }
.hbar .track { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; border: 1px solid var(--line); }
.hbar .fill { height: 100%; border-radius: 0 4px 4px 0; }
.tableview { margin-top: 10px; } .tableview summary { cursor: pointer; font-size: var(--fs-xs); color: var(--ink-3); }

/* ---------- Giriş ekranı ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-side { background: var(--ink); color: var(--bg); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side h1 { font-size: 34px; line-height: 1.15; letter-spacing: -0.03em; max-width: 14ch; }
.auth-side p { color: color-mix(in srgb, var(--bg) 70%, transparent); max-width: 42ch; margin-top: 14px; }
.auth-pts { display: flex; flex-direction: column; gap: 10px; font-size: var(--fs-sm); color: color-mix(in srgb, var(--bg) 78%, transparent); }
.auth-pts div { display: flex; gap: 10px; align-items: center; }
.auth-form { display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: min(380px, 100%); display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-side { display: none; } }

/* ---------- Sayfaya özel ---------- */
.day-nav { display: flex; align-items: center; gap: 6px; }
.form-sect { padding: 16px 18px 18px; border-bottom: 1px solid var(--line); }
.form-sect:last-child { border-bottom: 0; }
.form-sect > h3 { margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.sum-panel { position: sticky; top: 16px; align-self: start; }
.sum-row { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: var(--fs-sm); }
.sum-row b { font-variant-numeric: tabular-nums; font-weight: 600; }
.sum-row.big { font-size: var(--fs-md); padding: 8px 0; border-top: 1px solid var(--line); margin-top: 4px; }
.sum-row.big b { font-weight: 700; }
.sum-sep { border-top: 1px solid var(--line); margin: 8px 0; }
.alert-row { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; align-items: flex-start; }
.alert-row:last-child { border-bottom: 0; }
.alert-row:hover { text-decoration: none; background: color-mix(in srgb, var(--ink) 3%, transparent); }
.alert-row .ico { flex: none; margin-top: 2px; }
.alert-row .ico.critical { color: var(--bad); } .alert-row .ico.warning { color: var(--warn); } .alert-row .ico.info { color: var(--accent); }
.alert-row .tt { font-weight: 600; font-size: var(--fs-sm); } .alert-row .dd { font-size: var(--fs-xs); color: var(--ink-3); margin-top: 1px; }
.pill-row { display: flex; gap: 6px; flex-wrap: wrap; }
.grid-ts { border-collapse: separate; border-spacing: 0; font-size: var(--fs-xs); }
.grid-ts th, .grid-ts td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 0; text-align: center; min-width: 38px; height: 30px; background: var(--surface); }
.grid-ts th { background: var(--surface-2); color: var(--ink-3); font-weight: 600; position: sticky; top: 0; z-index: 2; padding: 4px 2px; }
.grid-ts th.we, .grid-ts td.we { background: color-mix(in srgb, var(--warn) 8%, var(--surface)); }
.grid-ts td.name, .grid-ts th.name { text-align: left; padding: 0 10px; position: sticky; left: 0; z-index: 3; min-width: 190px; background: var(--surface); white-space: nowrap; }
.grid-ts th.name { background: var(--surface-2); }
.grid-ts td input { width: 100%; height: 29px; border: 0; background: transparent; text-align: center; font: inherit; color: inherit; padding: 0; }
.grid-ts td input:focus { outline: 2px solid var(--accent); outline-offset: -2px; background: var(--accent-soft); }
.grid-ts td.code input { color: var(--warn); font-weight: 650; }
.grid-ts td.sum { min-width: 64px; font-weight: 650; background: var(--surface-2); padding: 0 6px; }
.kbd { font-size: 11px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: var(--surface); }
.dropzone { border: 2px dashed var(--line-2); border-radius: var(--radius); padding: 36px 20px; text-align: center; color: var(--ink-2); transition: border-color 0.12s, background 0.12s; cursor: pointer; }
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.steps { display: flex; gap: 6px; align-items: center; font-size: var(--fs-sm); color: var(--ink-3); flex-wrap: wrap; }
.steps .st { display: inline-flex; align-items: center; gap: 6px; } .steps .st b { width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line-2); display: grid; place-items: center; font-size: 11px; }
.steps .st.on { color: var(--ink); font-weight: 600; } .steps .st.on b { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); } .steps .st.done b { background: var(--good); color: #fff; border-color: var(--good); }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 18px; }
.perm-grp { grid-column: 1 / -1; font-weight: 650; margin-top: 10px; font-size: var(--fs-sm); color: var(--ink-2); border-bottom: 1px solid var(--line); padding-bottom: 3px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-size: var(--fs-sm); } .kv dt { color: var(--ink-3); } .kv dd { margin: 0; font-weight: 520; }

@media print {
  .side, .side-toggle, .topbar-m, .page-actions, .btn, .tabs, .no-print, .drawer, .toasts { display: none !important; }
  .app { display: block; } .content { padding: 0; max-width: none; }
  body { background: #fff; color: #000; } .card, .tbl-wrap { border-color: #bbb; box-shadow: none; }
  .tbl th { position: static; } .tbl-wrap { max-height: none !important; overflow: visible; }
  :root { --surface: #fff; --surface-2: #f3f3f3; --ink: #000; --ink-2: #222; --ink-3: #444; --line: #bbb; }
}

/* ---- Genel arama (Ctrl+K) ve liste içi arama ---- */
.side-search { display: flex; align-items: center; gap: 8px; margin: 0 12px 8px; height: 36px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink-3); cursor: pointer; font: inherit; text-align: left; }
.side-search:hover { border-color: var(--ink-3); color: var(--ink-2); }
.side-search span { flex: 1; }
kbd { font: 600 11px/1 var(--font); padding: 3px 5px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; background: var(--surface-2); color: var(--ink-3); }
.pal-scrim { position: fixed; inset: 0; z-index: 90; background: rgba(15, 15, 14, 0.45); display: flex; justify-content: center; align-items: flex-start; padding: 10vh 16px 16px; }
.pal-box { width: min(660px, 100%); background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; max-height: 76vh; overflow: hidden; }
.pal-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--ink-3); }
.pal-head input.inp { border: 0; box-shadow: none; height: 32px; background: transparent; padding: 0; }
.pal-head input.inp:focus { box-shadow: none; }
.pal-list { overflow: auto; padding: 6px; }
.pal-group { padding: 8px 10px 4px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.pal-item { display: block; padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.pal-item.sel { background: var(--accent-soft); }
.pal-t { font-weight: 560; }
.pal-s { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal-foot { padding: 8px 14px; border-top: 1px solid var(--line); }
.pal-empty { padding: 28px; text-align: center; color: var(--ink-3); }
mark.hl { background: color-mix(in srgb, var(--accent) 24%, transparent); color: inherit; border-radius: 2px; }
input[type="search"].inp { appearance: none; }

/* Kaydedilmiş (kilitli) ayar bölümü */
.faded { opacity: 0.6; }
.faded .inp { pointer-events: none; }

/* Banka › birim seçimi: tıklanarak seçilen kartlar */
.unit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.unit-pick { display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-align: left; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; transition: border-color .12s, background .12s; }
.unit-pick:hover:not(:disabled) { border-color: var(--line-2); background: var(--surface-2); }
.unit-pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.unit-pick:disabled { cursor: default; opacity: .75; }
.unit-pick.on { border-color: var(--accent); background: var(--accent-soft); }
.unit-pick .chk-dot { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--accent-ink, #fff); }
.unit-pick.on .chk-dot { background: var(--accent); border-color: var(--accent); }
.unit-pick .nm { display: block; font-weight: 600; }
.unit-pick .sub { display: block; font-size: var(--fs-xs); color: var(--ink-3); margin-top: 1px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; text-decoration: underline; text-underline-offset: 3px; }
.tbl tbody tr.sel td { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.tbl tbody tr.dirty td { background: var(--warn-bg); }
