/* ============================================================================
 * KuyumGo — Mali müşavir paneli tasarım sistemi (2026-10-16)
 * Konsept "Sürekli form": muhasebecinin yeşil bantlı bilgisayar çıktısı (traktör delikleri), defter marjındaki
 * kırmızı çift çizgi, toplam altındaki çift çizgi, ıstampa kaşesi ve kırmızı kalem; kuyumcunun altını yalnız vurguda.
 * Yerleşim: solda klasör sırtları rafı · üstte dönem cetveli · ortada form kâğıdı.
 * Yazı: Archivo (genişlik ekseni: başlıkta geniş, etiket/kaşede dar) · IBM Plex Sans (metin) · IBM Plex Mono (rakam).
 * Hareket kuralı: bilgi taşır, ≤ 400 ms, prefers-reduced-motion'da kapalı.
 * ==========================================================================*/
:root {
  --paper: #EEF1EC;
  --sheet: #FAFBF8;
  --band: #E1EBDF;
  --band-2: #EAF1E8;
  --rule: #C5D0C3;
  --rule-2: #DCE3DA;
  --ink: #18202B;
  --ink-2: #4A5560;
  --ink-3: #8E9A92;
  --gold: #94681A;
  --gold-soft: #EADBB6;
  --pen: #B3242D;
  --pen-soft: #F6E1E1;
  --ok: #2F6B4F;
  --ok-soft: #DDEBE2;
  --stamp: #3E36A3;
  --shelf: #222A33;
  --shelf-2: #2B343E;
  --on-shelf: #E9EDE6;
  --on-spine: #F3F5F0;
  --focus: #94681A;
  --shadow: 0 1px 0 var(--rule), 0 10px 30px -18px rgba(24, 32, 43, .35);
  --f-display: "Archivo", "Arial Narrow", Arial, sans-serif;
  --f-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-num: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --r: 3px;
  --hiz: 220ms;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0F1316; --sheet: #151A1E; --band: #18221D; --band-2: #161E1A; --rule: #2B3631; --rule-2: #222B27;
    --ink: #E3E8E0; --ink-2: #A3AEA7; --ink-3: #66746C; --gold: #D6AA52; --gold-soft: #3A311F;
    --pen: #EE6A6E; --pen-soft: #3A1E21; --ok: #79C29B; --ok-soft: #18302A; --stamp: #A29CF5;
    --shelf: #090C0F; --shelf-2: #11161B; --on-shelf: #C9D0C8; --focus: #D6AA52;
    --shadow: 0 1px 0 var(--rule), 0 12px 30px -16px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0F1316; --sheet: #151A1E; --band: #18221D; --band-2: #161E1A; --rule: #2B3631; --rule-2: #222B27;
  --ink: #E3E8E0; --ink-2: #A3AEA7; --ink-3: #66746C; --gold: #D6AA52; --gold-soft: #3A311F;
  --pen: #EE6A6E; --pen-soft: #3A1E21; --ok: #79C29B; --ok-soft: #18302A; --stamp: #A29CF5;
  --shelf: #090C0F; --shelf-2: #11161B; --on-shelf: #C9D0C8; --focus: #D6AA52;
  --shadow: 0 1px 0 var(--rule), 0 12px 30px -16px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--paper); color: var(--ink); font-family: var(--f-body); font-size: 14.5px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.mono, .num { font-family: var(--f-num); font-variant-numeric: tabular-nums; }
.gizli { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ── Tipografi ── */
.eyebrow { font-family: var(--f-display); font-stretch: 78%; font-weight: 600; font-size: .74rem; letter-spacing: .12em; color: var(--ink-2);
  text-transform: uppercase; }
h1.baslik { margin: 2px 0 0; font-family: var(--f-display); font-stretch: 112%; font-weight: 750; font-size: clamp(1.55rem, 3.2vw, 2.25rem);
  line-height: 1.1; letter-spacing: -.01em; text-wrap: balance; }
h2.bolum { margin: 0; font-family: var(--f-display); font-stretch: 85%; font-weight: 700; font-size: 1.05rem; letter-spacing: .02em; }
.lbl { font-family: var(--f-display); font-stretch: 75%; font-weight: 650; font-size: .7rem; letter-spacing: .09em; color: var(--ink-2); text-transform: uppercase; }
.aciklama { color: var(--ink-2); font-size: .88rem; max-width: 68ch; margin: 4px 0 0; }
.kaynak-notu { color: var(--ink-3); font-size: .76rem; }

/* ── Kabuk ── */
.mv-app { display: grid; grid-template-columns: 96px minmax(0, 1fr); min-height: 100%; }
.mv-main { min-width: 0; padding-inline: clamp(16px, 3vw, 40px); padding-block: 22px 56px; display: flex; flex-direction: column; gap: 20px; }

/* Raf + klasör sırtları */
.mv-raf { background: var(--shelf); color: var(--on-shelf); display: flex; flex-direction: column; align-items: center; gap: 16px;
  padding-block: 18px; position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; scrollbar-width: thin; }
.mv-mark { width: 44px; height: 44px; display: grid; place-items: center; border: 1.5px solid var(--gold); color: var(--gold);
  font-family: var(--f-display); font-stretch: 75%; font-weight: 800; letter-spacing: .04em; border-radius: var(--r); text-decoration: none; flex: none; }
.mv-raf-etiket { font-family: var(--f-display); font-stretch: 70%; font-weight: 600; letter-spacing: .18em; font-size: .62rem; opacity: .7; text-transform: uppercase; }
.mv-sirtlar { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; padding-left: 14px; width: 100%; }
.mv-sirt { --c: #2F6B4F; position: relative; width: 54px; height: 150px; border: 0; border-radius: 3px 3px 2px 2px; background: var(--c);
  color: var(--on-spine); cursor: pointer; padding: 10px 0 8px; display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s; box-shadow: inset -6px 0 0 rgba(0, 0, 0, .14), inset 1px 0 0 rgba(255, 255, 255, .12);
  text-decoration: none; flex: none; }
.mv-sirt::before, .mv-sirt::after { content: ""; position: absolute; left: 6px; right: 10px; height: 2px; background: rgba(255, 255, 255, .22); }
.mv-sirt::before { top: 30px; } .mv-sirt::after { bottom: 44px; }
.mv-sirt .ad { writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--f-display); font-stretch: 72%; font-weight: 600; font-size: .82rem;
  letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-height: 82px; margin-top: 22px; }
.mv-sirt .etiket { background: var(--on-spine); color: #18202B; font-family: var(--f-num); font-weight: 600; font-size: .68rem; padding: 2px 5px;
  border-radius: 2px; border: 1.5px solid transparent; }
.mv-sirt:hover { transform: translateX(4px); }
.mv-sirt[aria-current="page"] { transform: translateX(12px); box-shadow: inset -6px 0 0 rgba(0, 0, 0, .14), 4px 4px 0 rgba(0, 0, 0, .28); }
.mv-sirt[aria-current="page"] .etiket { border-color: var(--gold); }
.mv-sirt.kapali { filter: grayscale(.85) brightness(.75); }
.mv-sirt.genel { --c: var(--shelf-2); height: 64px; }
.mv-sirt.genel .ad { margin-top: 0; writing-mode: horizontal-tb; transform: none; font-size: .64rem; letter-spacing: .1em; }
.mv-sirt.genel::before, .mv-sirt.genel::after { display: none; }
.mv-raf-alt { margin-top: auto; display: grid; place-items: center; gap: 6px; font-size: .68rem; text-align: center; opacity: .9; }
.mv-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #18202B;
  font-family: var(--f-display); font-weight: 700; font-stretch: 80%; border: 0; cursor: pointer; }
.mv-raf-dugme { background: transparent; border: 0; color: var(--on-shelf); opacity: .75; cursor: pointer; padding: 4px; font-size: 1.1rem; }
.mv-raf-dugme:hover { opacity: 1; }

/* Üst bant */
.mv-ust { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 28px; }
.mv-ust .kim { min-width: 0; flex: 1 1 260px; }
.mv-donem { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 2 1 460px; }
.mv-donem-ust { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.seg { display: inline-flex; border: 1.5px solid var(--ink); border-radius: var(--r); overflow: hidden; }
.seg button { background: transparent; border: 0; padding: 4px 12px; font-family: var(--f-display); font-stretch: 80%; font-weight: 600; font-size: .8rem;
  letter-spacing: .04em; cursor: pointer; }
.seg button + button { border-left: 1.5px solid var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--sheet); }
.mv-yil { display: inline-flex; align-items: center; gap: 4px; font-family: var(--f-num); font-size: .82rem; }
.mv-yil button { background: transparent; border: 1px solid var(--rule); border-radius: var(--r); width: 26px; height: 26px; cursor: pointer; display: grid; place-items: center; }
.cetvel-kap { overflow-x: auto; scrollbar-width: none; }
.cetvel { position: relative; display: grid; grid-template-columns: repeat(12, minmax(34px, 1fr)); min-width: 430px; border-top: 1.5px solid var(--ink); }
.cetvel button { position: relative; background: transparent; border: 0; padding: 10px 0 2px; font-family: var(--f-num); font-size: .74rem; color: var(--ink-2); cursor: pointer; }
.cetvel button::before { content: ""; position: absolute; top: 0; left: 50%; width: 1.5px; height: 7px; background: var(--ink); }
.cetvel button:nth-child(3n+1)::after { content: ""; position: absolute; top: 0; right: -.75px; width: 1.5px; height: 12px; background: var(--ink); }
.cetvel button:disabled { color: var(--ink-3); cursor: default; }
.cetvel button.on { color: var(--ink); font-weight: 600; }
.cetvel .aralik { position: absolute; top: -4px; height: 6px; background: var(--gold); border-radius: 1px; transition: left .3s ease, width .3s ease; }
.cetvel button.canli::after { content: attr(data-canli); position: absolute; left: 50%; transform: translateX(-50%); bottom: -14px; font-size: .58rem; color: var(--pen);
  letter-spacing: .04em; white-space: nowrap; width: auto; height: auto; top: auto; right: auto; background: none; }
.ozel-aralik { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ozel-aralik input { width: 150px; }

/* ── Form kâğıdı (sürekli form) ── */
.kagit { position: relative; background: var(--sheet); padding: 20px 46px 24px; border: 1px solid var(--rule); box-shadow: var(--shadow); }
.kagit::before, .kagit::after { content: ""; position: absolute; top: 0; bottom: 0; width: 30px;
  background-image: radial-gradient(circle, var(--paper) 0 4.6px, transparent 5.2px); background-size: 30px 26px; background-position: center 6px; }
.kagit::before { left: 0; border-right: 1px dashed var(--rule); }
.kagit::after { right: 0; border-left: 1px dashed var(--rule); }
.kagit-bas { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 18px; margin-bottom: 12px; }
.kart { background: var(--sheet); border: 1px solid var(--rule); padding: 16px 18px; box-shadow: 0 1px 0 var(--rule); min-width: 0; }
.kart-bas { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.iki-kolon { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.yan { display: flex; flex-direction: column; gap: 20px; }

/* ── Defter tablosu (elle yazılan tablolar) ── */
.tablo-kap { overflow-x: auto; }
table.defter { width: 100%; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
table.defter th { font-family: var(--f-display); font-stretch: 75%; font-weight: 650; font-size: .7rem; letter-spacing: .09em; color: var(--ink-2); text-align: left;
  padding: 8px 12px; border-bottom: 1.5px solid var(--ink); white-space: nowrap; text-transform: uppercase; }
table.defter td { padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
table.defter tbody tr:nth-child(odd) td { background: var(--band); }
table.defter tbody tr.tik { cursor: pointer; }
table.defter tbody tr.tik:hover td { background: color-mix(in srgb, var(--gold-soft) 55%, var(--sheet)); }
/* Tutarlar SOLA dayalı (kullanıcı kararı 2026-10-16); hizayı eşit genişlikli rakam yazısı (tabular-nums) korur */
table.defter .sag, table.defter .num { text-align: left; font-family: var(--f-num); white-space: nowrap; }
table.defter .marj { border-left: 3px double var(--pen); }
table.defter tfoot td { font-family: var(--f-num); font-weight: 600; border-bottom: 3px double var(--ink); padding-top: 12px; }
table.defter tfoot td:first-child { font-family: var(--f-display); font-stretch: 75%; letter-spacing: .09em; font-size: .74rem; text-transform: uppercase; }
.neg { color: var(--pen); }
.soluk { color: var(--ink-3); }
.firma-hucre { display: flex; align-items: center; gap: 10px; font-weight: 600; min-width: 0; }
.firma-hucre small { display: block; font-weight: 400; color: var(--ink-2); font-size: .76rem; }
.renk-cubuk { width: 10px; height: 26px; border-radius: 2px; background: var(--c); flex: none; }
.spark { display: block; }
.spark polyline { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.spark circle { fill: var(--gold); }

/* ── Tabulator → defter görünümü ── */
.defter-tab.tabulator { background: transparent; border: 0; font-size: 13.5px; font-family: var(--f-body); }
.defter-tab .tabulator-header { background: transparent; border-bottom: 1.5px solid var(--ink); color: var(--ink-2); }
.defter-tab .tabulator-header .tabulator-col { background: transparent; border-right: 0; }
.defter-tab .tabulator-header .tabulator-col .tabulator-col-content { padding: 8px 12px; }
.defter-tab .tabulator-header .tabulator-col-title { font-family: var(--f-display); font-stretch: 75%; font-weight: 650; font-size: .7rem; letter-spacing: .09em;
  text-transform: uppercase; white-space: nowrap; }
.defter-tab .tabulator-tableholder { background: transparent; }
.defter-tab .tabulator-tableholder .tabulator-table { background: transparent; color: var(--ink); }
.defter-tab .tabulator-row { background: transparent; border-bottom: 1px solid var(--rule); min-height: 38px; }
.defter-tab .tabulator-row.tabulator-row-even { background: transparent; }
.defter-tab .tabulator-row:nth-child(odd) { background: var(--band); }
.defter-tab .tabulator-row.tabulator-selectable:hover { background: color-mix(in srgb, var(--gold-soft) 55%, var(--sheet)); cursor: pointer; }
.defter-tab .tabulator-row .tabulator-cell { border-right: 0; padding: 9px 12px; }
.defter-tab .tabulator-cell.num, .defter-tab .tabulator-col.num .tabulator-col-title { font-family: var(--f-num); text-align: left; }
.defter-tab .tabulator-cell.marj, .defter-tab .tabulator-col.marj { border-left: 3px double var(--pen) !important; }
.defter-tab .tabulator-footer { background: transparent; border-top: 0; color: var(--ink-2); font-weight: 400; padding: 0; }
.defter-tab .tabulator-footer .tabulator-calcs-holder { background: transparent; border-top: 0; border-bottom: 3px double var(--ink); }
/* Tabulator'ın kendi kuralı !important + daha yüksek özgüllük (açık gri, koyu temada parlıyordu) → özgüllüğü aşan eşlenik */
.defter-tab.tabulator .tabulator-footer .tabulator-calcs-holder, .defter-tab.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row { background: transparent !important; border-top: 0; color: var(--ink); }
.defter-tab .tabulator-calcs-holder .tabulator-row { background: transparent !important; border: 0; font-family: var(--f-num); font-weight: 600; }
.defter-tab .tabulator-footer .tabulator-paginator { padding: 10px 0 0; font-family: var(--f-num); font-size: .8rem; }
.defter-tab .tabulator-page { border: 1px solid var(--rule); background: var(--sheet); color: var(--ink); border-radius: var(--r); }
.defter-tab .tabulator-page.active { background: var(--ink); color: var(--sheet); border-color: var(--ink); }
.defter-tab .tabulator-placeholder span { color: var(--ink-3); font-weight: 400; font-family: var(--f-body); font-size: .9rem; }
.defter-tab .tabulator-col .tabulator-col-sorter .tabulator-arrow { border-bottom-color: var(--ink-3); }
.defter-tab .tabulator-row .tabulator-responsive-collapse { border: 0; padding: 4px 12px 10px; }
.defter-tab .tabulator-row .tabulator-responsive-collapse table td { padding: 2px 8px 2px 0; font-size: .82rem; }

/* ── Kaşe (ıstampa) ── */
.kase { display: inline-block; font-family: var(--f-display); font-stretch: 80%; font-weight: 750; font-size: .7rem; letter-spacing: .08em; color: var(--stamp);
  border: 1.8px solid currentColor; border-radius: 4px; padding: 3px 8px 2px; transform: rotate(-2.5deg); filter: url(#isli); white-space: nowrap;
  text-transform: uppercase; line-height: 1.2; }
.kase.kalem { color: var(--pen); }
.kase.yesil { color: var(--ok); }
.kase.soluk { color: var(--ink-3); }
.kase + .kase { margin-left: 6px; transform: rotate(1.8deg); }
.kase.buyuk { font-size: 1.1rem; padding: 6px 14px 4px; border-width: 2.5px; border-radius: 6px; }

/* ── Rakam satırı ── */
.rakamlar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--rule); border-block: 1px solid var(--rule); }
.rakamlar.uc { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rakam { padding: 12px 14px; min-width: 0; background: var(--sheet); }
.rakam .deger { font-family: var(--f-num); font-weight: 500; font-size: clamp(1.05rem, 1.7vw, 1.36rem); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rakam .alt { font-size: .76rem; color: var(--ink-2); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rakam.altin .deger { color: var(--gold); }
.degisim { font-family: var(--f-num); font-size: .72rem; padding: 0 5px; border-radius: 2px; }
.degisim.art { color: var(--ok); background: var(--ok-soft); }
.degisim.azal { color: var(--pen); background: var(--pen-soft); }
@container (max-width: 760px) { .rakamlar { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kap-sorgu { container-type: inline-size; }
.grafik { width: 100%; height: 270px; margin-top: 12px; }

/* ── Kırmızı kalem notları ── */
.notlar { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; }
.notlar li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; padding: 9px 0; border-bottom: 1px dashed var(--rule); font-size: .9rem; }
.notlar li:last-child { border-bottom: 0; }
.notlar i { margin-top: 3px; color: var(--ink-3); }
.notlar li.kalem i { color: var(--pen); }
.daire { display: inline-block; padding-inline: 2px; font-family: var(--f-num); font-weight: 600; }

/* ── Paylaşım kartı ── */
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; margin: 8px 0 0; font-size: .86rem; }
.kv dt { font-family: var(--f-display); font-stretch: 75%; font-weight: 650; letter-spacing: .08em; font-size: .7rem; color: var(--ink-2); padding-top: 3px; text-transform: uppercase; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.cip { display: inline-block; padding: 1px 8px; margin: 1px 2px 1px 0; border: 1px solid var(--rule); border-radius: 999px; font-size: .78rem; background: var(--sheet); }
.cip.hassas { border-color: var(--pen); color: var(--pen); }

/* ── Firma başlığı + şube sekmeleri + fihrist ── */
.firma-bas { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 16px; }
.sekmeler { display: flex; flex-wrap: wrap; gap: 0; border-bottom: 1.5px solid var(--ink); }
.sekmeler button, .sekmeler a { background: transparent; border: 1.5px solid transparent; border-bottom: 0; margin-bottom: -1.5px; padding: 6px 14px 5px;
  font-weight: 500; font-size: .86rem; cursor: pointer; color: var(--ink-2); clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 100%, 0 100%); text-decoration: none; }
.sekmeler [aria-pressed="true"], .sekmeler [aria-current="page"] { background: var(--band); color: var(--ink); border-color: var(--ink); font-weight: 600; }
/* Çok şubeli firma: tek düğme + aranabilir liste (uzun resmî ünvanlar sekmede okunmuyordu) */
.sube-secici { position: relative; max-width: 100%; }
.sube-dugme { display: flex; align-items: center; gap: 10px; max-width: min(680px, 100%); min-height: 40px; padding: 6px 12px; background: var(--sheet);
  border: 1.5px solid var(--ink); border-radius: var(--r); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.sube-dugme:hover { background: var(--band); }
.sube-dugme:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sube-dugme .etiket { flex: none; font-family: var(--f-display); font-stretch: 72%; font-weight: 650; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.sube-dugme .secili { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: .9rem; }
.sube-dugme .sayi { flex: none; font-family: var(--f-num); font-size: .72rem; color: var(--ink-3); border-left: 1px solid var(--rule); padding-left: 10px; }
.sube-dugme[aria-expanded="true"] .ph-caret-down { transform: rotate(180deg); }
.sube-panel { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: min(620px, calc(100vw - 32px)); background: var(--sheet);
  border: 1.5px solid var(--ink); border-radius: var(--r); box-shadow: 0 18px 40px -14px rgba(15, 19, 22, .4); }
.sube-panel .ara { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1.5px solid var(--ink); cursor: text; }
.sube-panel .ara input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; color: var(--ink); }
.sube-panel ul { list-style: none; margin: 0; padding: 4px; max-height: min(380px, 55vh); overflow: auto; overscroll-behavior: contain; }
.sube-panel li { display: grid; grid-template-columns: minmax(0, 1fr) auto 18px; gap: 2px 12px; align-items: center; padding: 8px 10px; border-radius: var(--r); cursor: pointer; }
.sube-panel li:nth-child(even) { background: var(--band); }
.sube-panel li.etkin { outline: 1.5px solid var(--ink); outline-offset: -1.5px; }
.sube-panel li .ad { font-size: .86rem; overflow-wrap: anywhere; }
.sube-panel li .alt { grid-column: 1 / -1; font-size: .72rem; color: var(--ink-3); overflow-wrap: anywhere; }
.sube-panel li .vkn { font-family: var(--f-num); font-size: .72rem; color: var(--ink-3); }
.sube-panel li .tik { visibility: hidden; color: var(--ok); }
.sube-panel li[aria-selected="true"] .ad { font-weight: 600; }
.sube-panel li[aria-selected="true"] .tik { visibility: visible; }
.sube-panel li.yok { display: block; cursor: default; color: var(--ink-3); background: none; }
/* Firma sayfası: solda sade rapor menüsü (kutusuz liste, sağında ince defter çizgisi), sağda şube seçimi + içerik */
.firma-sayfa { display: grid; grid-template-columns: clamp(168px, 13vw, 196px) minmax(0, 1fr); gap: 22px; align-items: start; }
.firma-govde { min-width: 0; display: flex; flex-direction: column; gap: 16px; container: govde / inline-size; }
.fihrist { position: sticky; top: 12px; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: none; display: flex; flex-direction: column; gap: 10px; padding: 2px 14px 12px 0; border-inline-end: 1px solid var(--rule); }
.fihrist::-webkit-scrollbar { display: none; }
.fihrist-bas { display: none; }
.fihrist .grup { display: flex; flex-direction: column; gap: 1px; }
.fihrist .grup > span { padding: 0 0 3px 10px; font-family: var(--f-display); font-stretch: 72%; font-weight: 650; font-size: .64rem; letter-spacing: .13em; color: var(--ink-3); text-transform: uppercase; }
.fihrist .grup > div { display: flex; flex-direction: column; }
.fihrist a { display: flex; align-items: center; gap: 9px; padding: 5px 10px; border-inline-start: 2px solid transparent; color: var(--ink-2);
  text-decoration: none; font-size: .85rem; line-height: 1.3; transition: background var(--hiz), color var(--hiz), border-color var(--hiz); }
.fihrist a i { flex: none; font-size: 1rem; color: var(--ink-3); transition: color var(--hiz); }
.fihrist a span { min-width: 0; overflow-wrap: anywhere; }
.fihrist a:hover { background: var(--band); color: var(--ink); }
.fihrist a:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.fihrist a[aria-current="page"] { background: var(--band); color: var(--ink); border-inline-start-color: var(--gold); font-weight: 650; }
.fihrist a[aria-current="page"] i { color: var(--gold); }
.fihrist-ac { display: none; }
.fihrist-liste { display: flex; flex-direction: column; gap: 14px; }
@container govde (max-width: 860px) { .iki-kolon { grid-template-columns: minmax(0, 1fr); } }

/* ── Araç çubuğu, düğmeler, girdiler ── */
.arac { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin: 4px 0 12px; }
.arac .sol, .arac .sag { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dugme { display: inline-flex; align-items: center; gap: 6px; background: var(--ink); color: var(--sheet); border: 1.5px solid var(--ink); border-radius: var(--r);
  padding: 7px 14px; font-family: var(--f-display); font-stretch: 85%; font-weight: 650; letter-spacing: .03em; cursor: pointer; text-decoration: none;
  transition: background var(--hiz), color var(--hiz), opacity var(--hiz); white-space: nowrap; }
.dugme:hover { background: color-mix(in srgb, var(--ink) 85%, var(--gold)); }
.dugme:disabled { opacity: .45; cursor: not-allowed; }
.dugme.ikincil { background: transparent; color: var(--ink); }
.dugme.ikincil:hover { background: var(--band); }
.dugme.tehlike { background: transparent; color: var(--pen); border-color: var(--pen); }
.dugme.altin { background: var(--gold); border-color: var(--gold); color: #18202B; }
.dugme.kucuk { padding: 4px 10px; font-size: .8rem; }
.dugme .ph-light, .dugme .ph-duotone { font-size: 1.05em; }
.girdi, select.girdi, textarea.girdi { background: var(--sheet); border: 1.5px solid var(--rule); border-radius: var(--r); padding: 7px 10px; min-width: 0; color: var(--ink);
  transition: border-color var(--hiz); }
.girdi:focus { border-color: var(--ink); outline: none; }
.girdi.ara { padding-left: 32px; background-image: none; }
.ara-kap { position: relative; }
.ara-kap i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.alan { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.alan > span { font-family: var(--f-display); font-stretch: 78%; font-weight: 650; font-size: .72rem; letter-spacing: .08em; color: var(--ink-2); text-transform: uppercase; }
.ozet-serit { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: baseline; padding: 8px 0 12px; border-bottom: 1px dashed var(--rule); margin-bottom: 8px; }
.ozet-serit .k { display: flex; flex-direction: column; }
.ozet-serit .k b { font-family: var(--f-num); font-weight: 600; font-size: 1.02rem; }
.ozet-serit .k span { font-size: .72rem; color: var(--ink-2); }
.uyari { border-left: 3px solid var(--pen); background: var(--pen-soft); padding: 10px 14px; font-size: .88rem; }
.bilgi { border-left: 3px solid var(--gold); background: color-mix(in srgb, var(--gold-soft) 45%, var(--sheet)); padding: 10px 14px; font-size: .88rem; }
.bos { padding: 34px 12px; text-align: center; color: var(--ink-2); }
.bos i { font-size: 2rem; color: var(--ink-3); display: block; margin-bottom: 6px; }

/* ── Yükleniyor: kâğıt üzerine çizgi iskeleti ── */
.iskelet { display: flex; flex-direction: column; gap: 10px; padding: 8px 0; }
.iskelet span { display: block; height: 12px; border-radius: 2px; background: linear-gradient(90deg, var(--band) 0%, var(--rule-2) 50%, var(--band) 100%);
  background-size: 200% 100%; animation: kayan 1.3s linear infinite; }
.iskelet span:nth-child(2n) { width: 78%; } .iskelet span:nth-child(3n) { width: 56%; }
@keyframes kayan { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ── Çekmece (ekstre, belgeler, PDF) ── */
.cekmece-ort { position: fixed; inset: 0; background: rgba(15, 19, 22, .38); z-index: 40; opacity: 0; transition: opacity var(--hiz); }
.cekmece-ort.acik { opacity: 1; }
.cekmece { position: fixed; top: 0; right: 0; bottom: 0; width: min(920px, 100%); background: var(--sheet); z-index: 41; display: flex; flex-direction: column;
  border-left: 1px solid var(--rule); box-shadow: -18px 0 40px -24px rgba(0, 0, 0, .5); transform: translateX(100%); transition: transform .26s ease; }
.cekmece.acik { transform: none; }
.cekmece-bas { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1.5px solid var(--ink); }
.cekmece-govde { overflow: auto; padding: 16px 20px 28px; flex: 1; }
.kapat-x { background: transparent; border: 0; font-size: 1.3rem; cursor: pointer; color: var(--ink-2); }
.belge-onizleme { width: 100%; height: calc(100vh - 140px); border: 1px solid var(--rule); background: var(--paper); }
.belge-onizleme img { max-width: 100%; display: block; margin: 0 auto; }
.belge-izgara { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.belge-kart { border: 1px solid var(--rule); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; background: var(--sheet); }
.belge-kart.yok { border-style: dashed; color: var(--ink-3); }

/* ── Bildirim (toast) ── */
.mv-bildirim { position: fixed; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%) translateY(20px); z-index: 60;
  background: var(--ink); color: var(--sheet); padding: 10px 18px; border-radius: var(--r); font-size: .9rem; opacity: 0; transition: opacity .2s, transform .2s;
  max-width: min(560px, calc(100vw - 32px)); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5); }
.mv-bildirim.acik { opacity: 1; transform: translateX(-50%); }
.mv-bildirim.hata { background: var(--pen); color: #fff; }

/* ── Sihirbaz (MASAK, fatura) ── */
.adimlar { list-style: none; margin: 0 0 14px; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; counter-reset: adim; }
.adimlar li { counter-increment: adim; display: flex; align-items: center; gap: 8px; font-size: .84rem; color: var(--ink-3); padding-right: 14px; }
.adimlar li::before { content: counter(adim); width: 24px; height: 24px; border: 1.5px solid currentColor; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--f-num); font-size: .75rem; }
.adimlar li.on { color: var(--ink); font-weight: 600; }
.adimlar li.bitti { color: var(--ok); }
.secenekler { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.secenek { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--rule); padding: 10px 12px; cursor: pointer; background: var(--sheet); border-radius: var(--r); }
.secenek:has(input:checked) { border-color: var(--ink); background: var(--band-2); }
.secenek input { margin-top: 4px; accent-color: var(--ink); }
.secenek b { display: block; font-size: .9rem; }
.secenek small { color: var(--ink-2); font-size: .8rem; }
/* Pencere (modal) */
.pencere-ort { z-index: 41; }
.pencere { position: fixed; z-index: 42; left: 50%; top: 50%; transform: translate(-50%, -47%); opacity: 0; transition: opacity .18s, transform .18s;
  width: min(var(--pencere-g, 720px), calc(100vw - 32px)); max-height: calc(100dvh - 48px); display: flex; flex-direction: column;
  background: var(--sheet); border: 1.5px solid var(--ink); border-radius: var(--r); box-shadow: 0 24px 60px -20px rgba(15, 19, 22, .55); }
.pencere.acik { opacity: 1; transform: translate(-50%, -50%); }
.pencere-bas { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 14px 18px 12px; border-bottom: 1.5px solid var(--ink); }
.pencere-bas .bolum { margin: 2px 0 0; }
.pencere-govde { padding: 16px 18px 18px; overflow: auto; overscroll-behavior: contain; }
body.pencere-acik { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .pencere { transition: none; } }

/* MASAK: eksik belge özeti + kaydırmalı liste (uzun listede sayfa uzamasın) */
.eksik-ozet { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 8px; }
.eksik-ozet .cip b { font-family: var(--f-num); font-weight: 600; margin-left: 4px; }
.eksik-liste-ust { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 16px; }
.eksik-liste-ust .ara-kutu { display: flex; align-items: center; gap: 6px; border: 1px solid var(--rule); border-radius: var(--r); padding: 4px 8px; background: var(--sheet); }
.eksik-liste-ust .ara-kutu input { border: 0; outline: 0; background: transparent; font: inherit; font-size: .85rem; color: var(--ink); width: 200px; max-width: 46vw; }
.kaydirma-kutu { max-height: 340px; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--rule); margin-top: 8px; }
.kaydirma-kutu table { margin: 0; }
.kaydirma-kutu thead th { position: sticky; top: 0; z-index: 1; background: var(--sheet); }
.paket-sahne { border: 1px solid var(--rule); background: var(--band); padding: 12px; }
.paket-sahne svg { width: 100%; height: auto; display: block; max-width: 100%; max-height: 190px; }
.paket-sahne .sahne-alt { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.paket-sahne .sahne-alt .kaynak-notu { flex: none; min-width: 150px; text-align: right; }
.pencere .kase-yeri { display: flex; justify-content: center; min-height: 0; }
.paket-sahne .belge rect { fill: var(--sheet); stroke: var(--ink); stroke-width: 1.2; }
.paket-sahne .belge path { fill: var(--band); stroke: var(--ink); stroke-width: 1.2; }
.paket-sahne .belge line { stroke: var(--ink-3); stroke-width: 1; }
.paket-sahne .kutu, .paket-sahne .kapak { fill: var(--gold-soft); stroke: var(--ink); stroke-width: 1.4; }
.paket-sahne .etiket-k { fill: var(--sheet); stroke: var(--ink); stroke-width: 1; }
.paket-sahne text { font-family: var(--f-num); font-size: 9px; fill: var(--ink); }
.cubuk { flex: 1 1 160px; height: 8px; border: 1.2px solid var(--ink); border-radius: 1px; position: relative; overflow: hidden; background: var(--sheet); }
.cubuk i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--gold); }
.parca-listesi { display: flex; flex-direction: column; gap: 8px; }
.parca { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid var(--rule); padding: 8px 12px; background: var(--sheet); }
.parca .parca-durum { flex: 1 1 100%; display: flex; align-items: center; gap: 10px; font-family: var(--f-num); font-size: .76rem; color: var(--ink-3); }
.parca .parca-durum[hidden] { display: none; }
.parca.bitti { border-color: var(--ok); }
.parca.hatali { border-color: var(--pen); }

/* ── Giriş ekranı ── */
.giris-sahne { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.giris-sol { display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.giris-kagit { width: min(440px, 100%); }
.giris-kagit .kagit { padding: 28px 46px 26px; }
.giris-sag { position: relative; background: var(--shelf); color: var(--on-shelf); overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 40px clamp(24px, 4vw, 56px); }
.giris-sag .alinti { font-family: var(--f-display); font-stretch: 112%; font-weight: 700; font-size: clamp(1.4rem, 2.6vw, 2.1rem); line-height: 1.15; max-width: 20ch;
  position: relative; z-index: 2; }
.giris-sag .alt { position: relative; z-index: 2; margin-top: 14px; max-width: 46ch; opacity: .8; font-size: .92rem; }
.giris-sag svg.cikti { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; opacity: .55; }
.form-satiri { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.kod-kutusu { font-family: var(--f-num); font-size: 1.6rem; letter-spacing: .5em; text-align: center; padding: 8px 6px 8px 14px; }
.baglanti { background: transparent; border: 0; padding: 0; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: .86rem; }
.baglanti:hover { color: var(--ink); }
.onay-satiri { display: flex; gap: 10px; align-items: flex-start; font-size: .84rem; color: var(--ink-2); }
.onay-satiri input { margin-top: 3px; accent-color: var(--ink); }
.sifre-olcer { display: flex; gap: 4px; }
.sifre-olcer i { flex: 1; height: 4px; background: var(--rule); border-radius: 1px; transition: background var(--hiz); }
.sifre-olcer.s1 i:nth-child(-n+1), .sifre-olcer.s2 i:nth-child(-n+2) { background: var(--pen); }
.sifre-olcer.s3 i:nth-child(-n+3) { background: var(--gold); }
.sifre-olcer.s4 i { background: var(--ok); }

/* ── Telefon ── */
@media (max-width: 1080px) { .iki-kolon { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) { .giris-sahne { grid-template-columns: minmax(0, 1fr); } .giris-sag { display: none; } }
/* Dar ekranda fihrist içeriğin üstünde: tek satırlık "Raporlar · seçili" düğmesi listeyi açar */
@media (max-width: 900px) {
  .firma-sayfa { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .fihrist { position: relative; max-height: none; overflow: visible; gap: 0; padding: 0; background: var(--sheet); border: 1px solid var(--rule); border-bottom: 3px double var(--pen); }
  .fihrist-bas { display: none; }
  .fihrist-ac { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 8px 14px; background: transparent; border: 0; color: var(--ink); font: inherit; text-align: start; cursor: pointer; }
  .fihrist-ac:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
  .fihrist-ac .etiket { flex: none; font-family: var(--f-display); font-stretch: 72%; font-weight: 650; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
  .fihrist-ac .secili { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; font-weight: 600; font-size: .9rem; }
  .fihrist-ac .secili span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .fihrist-ac .ok { flex: none; transition: transform var(--hiz); }
  .fihrist.acik .fihrist-ac .ok { transform: rotate(180deg); }
  .fihrist-liste { display: none; padding: 8px 0 12px; border-top: 1px solid var(--rule); max-height: min(70vh, 520px); overflow-y: auto; overscroll-behavior: contain; }
  .fihrist.acik .fihrist-liste { display: flex; }
}
@media (max-width: 720px) {
  .mv-app { grid-template-columns: minmax(0, 1fr); }
  .mv-raf { position: sticky; top: 0; z-index: 20; height: auto; flex-direction: row; padding: 10px 16px; gap: 12px; overflow-x: auto; overflow-y: hidden; }
  .mv-raf-etiket { display: none; }
  .mv-raf-alt { margin-top: 0; margin-left: auto; flex-direction: row; }
  .mv-raf-alt span { display: none; }
  .mv-mark { width: 38px; height: 38px; }
  .mv-sirtlar { flex-direction: row; padding-left: 0; gap: 8px; width: auto; }
  .mv-sirt { width: auto; height: 40px; flex-direction: row; padding: 0 8px 0 10px; gap: 8px; }
  .mv-sirt::before, .mv-sirt::after { display: none; }
  .mv-sirt .ad { writing-mode: horizontal-tb; transform: none; margin: 0; font-size: .8rem; max-height: none; max-width: 140px; }
  .mv-sirt:hover, .mv-sirt[aria-current="page"] { transform: translateY(-2px); }
  .mv-sirt.genel { height: 40px; }
  .kagit { padding: 16px 16px 18px; }
  .kagit::before, .kagit::after { display: none; }
  .rakamlar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .giris-kagit .kagit { padding: 22px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .mv-raf, .mv-donem, .arac, .fihrist { display: none !important; }
  .mv-app, .firma-sayfa { display: block; }
  .firma-govde { container-type: normal; }
  .kagit::before, .kagit::after { display: none; }
}

/* ── Onay penceresi ── */
.onay-kutu { position: fixed; z-index: 45; left: 50%; top: 50%; transform: translate(-50%, -46%); opacity: 0; transition: opacity .18s, transform .18s;
  width: min(460px, calc(100vw - 32px)); background: var(--sheet); border: 1px solid var(--rule); border-top: 3px double var(--ink); padding: 20px 22px;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .55); }
.onay-kutu.acik { opacity: 1; transform: translate(-50%, -50%); }
.onay-kutu .aciklama { margin: 8px 0 16px; }
.onay-dugmeler { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
