/* GEN FİNANS sade bileşen sistemi. Mobil öncelikli; 880px üstünde yan menü. */
:root {
  --bg: #f5f6f8; --surface: #fff; --text: #1b1f24; --muted: #5d6673; --line: #e2e5ea;
  --brand: #0f5ea8; --brand-ink: #fff; --pos: #11734b; --neg: #b42318; --warn-bg: #fff6e0; --warn: #8a5a00;
  --radius: 10px; --gap: 16px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); font-size: 16px; line-height: 1.45; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.35rem; margin: 0 0 12px; }
h2 { font-size: 1.05rem; margin: 20px 0 10px; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.muted { color: var(--muted); font-size: .9rem; }
.pos { color: var(--pos); } .neg { color: var(--neg); }

/* Üst çubuk */
.topbar { position: sticky; top: 0; z-index: 10; background: var(--surface); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.brand { font-weight: 700; color: var(--text); white-space: nowrap; }
.topsearch { flex: 1; min-width: 0; position: relative; }
.topsearch input { width: 100%; }
.who { font-size: .85rem; color: var(--muted); white-space: nowrap; }
.who form { display: inline; }
.linkbtn { background: none; border: 0; color: var(--brand); cursor: pointer; padding: 0; font: inherit; }

/* Düzen */
.layout { display: block; }
.side { display: none; }
main { padding: 16px; padding-bottom: 88px; max-width: 1100px; margin: 0 auto; }
.bottomnav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; background: var(--surface); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(4, 1fr); padding-bottom: env(safe-area-inset-bottom); }
.bottomnav a { text-align: center; padding: 10px 4px; font-size: .8rem; color: var(--muted); }
.bottomnav a.on { color: var(--brand); font-weight: 600; }
@media (min-width: 880px) {
  .layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); }
  .side { display: block; background: var(--surface); border-right: 1px solid var(--line); min-height: calc(100vh - 57px); padding: 12px; }
  .side a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--text); }
  .side a.on { background: var(--soft-brand); color: var(--brand); font-weight: 600; }
  .bottomnav { display: none; }
  main { padding: 24px; }
}

/* Kartlar ve tablolar */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: var(--gap); }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.stat .k { font-size: .8rem; color: var(--muted); } .stat .v { font-size: 1.25rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.stat.hi { border-color: var(--brand); box-shadow: inset 4px 0 0 var(--brand); }
table.t { width: 100%; border-collapse: collapse; }
table.t th, table.t td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
table.t th { font-size: .8rem; color: var(--muted); font-weight: 600; }
table.t td.num, table.t th.num { text-align: right; }
/* Dar ekranda tablo satırları karta dönüşür; tutar, döviz ve tarih korunur. */
@media (max-width: 640px) {
  table.t.cards thead { display: none; }
  table.t.cards, table.t.cards tbody, table.t.cards tr, table.t.cards td { display: block; width: 100%; }
  table.t.cards tr { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; margin-bottom: 10px; }
  table.t.cards td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  table.t.cards td::before { content: attr(data-label); color: var(--muted); font-size: .85rem; text-align: left; }
  table.t.cards td.num { white-space: normal; }
}

/* Formlar */
label { display: block; font-size: .88rem; font-weight: 600; margin: 12px 0 4px; }
input, select, textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--input-line); border-radius: 8px; background: var(--input-bg); color: var(--text); }
input[type=checkbox] { width: auto; margin-right: 8px; }
.check { display: flex; align-items: center; font-weight: 600; }
.help { font-size: .8rem; color: var(--muted); margin-top: 3px; }
.errorlist, .err { color: var(--neg); font-size: .88rem; margin: 4px 0; padding: 0; list-style: none; }
.btn { display: inline-block; background: var(--brand); color: var(--brand-ink); border: 0; border-radius: 8px; padding: 11px 16px;
  font: inherit; font-weight: 600; cursor: pointer; text-align: center; }
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn.sec { background: var(--soft-brand); color: var(--brand); }
.btn.block { display: block; width: 100%; }
.btn[disabled], .btn.htmx-request { opacity: .6; pointer-events: none; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.row2 { display: grid; gap: 0 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .row2 { grid-template-columns: 1fr 1fr; } }

/* Mesajlar ve rozetler */
.msg { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; background: var(--ok-bg); color: var(--pos); }
.msg.error { background: var(--err-bg); color: var(--neg); } .msg.info { background: var(--soft-brand); color: var(--brand); }
.badge { display: inline-block; font-size: .75rem; padding: 2px 8px; border-radius: 999px; background: var(--badge-bg); color: var(--muted); }
.badge.ok { background: var(--ok-bg); color: var(--pos); } .badge.warn { background: var(--warn-bg); color: var(--warn); }
.preview { background: var(--preview-bg); border: 1px dashed var(--preview-line); border-radius: var(--radius); padding: 12px 14px; margin: 14px 0; }
.preview dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 0; }
.preview dt { color: var(--muted); } .preview dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; }
.results { position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 8px 24px var(--shadow); max-height: 60vh; overflow: auto; }
.results:empty { display: none; }
.results a { display: block; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--text); }
.list .item { display: flex; justify-content: space-between; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); color: var(--text); }
.auth { max-width: 380px; margin: 8vh auto; }
.msg.live { position: sticky; top: 8px; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; box-shadow: 0 2px 8px var(--shadow); }
.secret { font-size: 1.05rem; letter-spacing: .04em; word-break: break-all; background: var(--surface2); padding: 6px 8px; border-radius: 6px; display: inline-block; }
.qr svg { width: 220px; height: 220px; display: block; margin: 8px auto; background: #fff; }
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 12px; }
.tabs a { padding: 10px 16px; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs a.on { color: var(--text); border-bottom-color: var(--text); }
.monthbar { align-items: center; }

/* ===================================================================== GEN REKLAM teması
   Siyah/beyaz ana çizgi (logo) + baskı dünyasından ölçülü vurgu: CMYK şeridi, kesim (bıçak) işaretleri,
   kayıt (register) işareti. Tutarlar ve okunabilirlik önceliklidir; vurgu renkleri metin rengi olarak
   kullanılmaz (kontrast). */
:root {
  --ink: #0b0b0c; --paper: #ffffff; --bg: #f4f4f2; --line: #e3e3df; --muted: #575c63; --text: #0b0b0c;
  --brand: #0b0b0c; --brand-ink: #fff; --link: #00607f;
  --c: #00a3d9; --m: #e6007e; --y: #ffd400; --k: #0b0b0c;
  --pos: #0b6b3a; --neg: #b3261e;
  --surface: #ffffff; --surface2: #f3f4f6; --input-bg: #ffffff; --input-line: #c9ced6; --soft-brand: #ececea;
  --ok-bg: #e8f5ee; --err-bg: #fdecea; --info-bg: #e6f6fc; --info-ink: #004a63; --badge-bg: #eef0f3;
  --preview-bg: #fbfbf9; --preview-line: #8d8d88; --side-on: #f1f1ee; --sep: #c8c8c2; --crop: #9a9a95;
  --tag-bg: #eeeeee; --tag-ink: #333333; --tag-c-bg: #dff3fb; --tag-c-ink: #004a63; --tag-m-bg: #fde3f1; --tag-m-ink: #7a0043;
  --tag-y-bg: #fff4bf; --tag-y-ink: #5c4a00; --bad-row: #fff7f6; --stale-bg: #fff8d6; --stale-line: #e0b400; --stale-ink: #5c4a00;
  --warn-bg: #fff6e0; --warn: #8a5a00; --btn-bg: #0b0b0c; --btn-ink: #ffffff; --shadow: rgba(0,0,0,.08);
  color-scheme: light;
}
a { color: var(--link); }
h1 { font-size: 1.45rem; letter-spacing: -.01em; }
h2 { font-size: 1.02rem; text-transform: none; }

/* Üst çubuk: siyah zemin, logo */
.topbar { background: var(--ink); border-bottom: 0; color: #fff; padding: 8px 14px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none !important; }
.brand img { display: block; }
.wordmark { font-size: 1.12rem; letter-spacing: .02em; font-weight: 700; line-height: 1; display: flex; align-items: baseline; }
.wordmark b { font-weight: 900; letter-spacing: -.03em; }
.wordmark small { font-size: .62rem; font-weight: 700; letter-spacing: .22em; margin-left: 8px; padding: 3px 6px;
  border: 1px solid rgba(255,255,255,.55); border-radius: 3px; }
.topsearch input { background: #1c1c1f; border-color: #33343a; color: #fff; }
.topsearch input::placeholder { color: #a7abb2; }
.who, .who a, .who .linkbtn { color: #e9e9ea; }
@media (max-width: 560px) { .wordmark small { display: none; } .wordmark { font-size: 1rem; } .who a { display: none; } }

/* CMYK şeridi */
.cmyk { display: grid; grid-template-columns: repeat(4, 1fr); height: 4px; }
.cmyk i:nth-child(1) { background: var(--c); } .cmyk i:nth-child(2) { background: var(--m); }
.cmyk i:nth-child(3) { background: var(--y); } .cmyk i:nth-child(4) { background: var(--k); }
.topbar + .cmyk { position: sticky; top: 52px; z-index: 9; }

/* Yan menü ve alt menü */
@media (min-width: 880px) {
  .side { background: var(--paper); }
  .side a { color: var(--text); border-left: 3px solid transparent; border-radius: 0 8px 8px 0; }
  .side a.on { background: var(--side-on); color: var(--text); border-left-color: var(--m); }
  .side .sep { display: block; height: 1px; margin: 10px 8px; border-top: 1px dashed var(--sep); }
}
.side .sep { display: none; }
.bottomnav { grid-template-columns: repeat(5, 1fr); background: var(--paper); }
.bottomnav a { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); }
.bottomnav a span { font-size: 1.15rem; line-height: 1; }
.bottomnav a.on { color: var(--text); box-shadow: inset 0 3px 0 var(--m); }
.bottomnav a.plus span { background: var(--btn-bg); color: var(--btn-ink); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; }

/* Düğmeler */
.btn { background: var(--btn-bg); color: var(--btn-ink); border-radius: 8px; }
.btn.sec { background: var(--paper); color: var(--text); box-shadow: inset 0 0 0 1.5px var(--text); }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, button:focus-visible { outline: 3px solid var(--c); outline-offset: 2px; }
.msg.info { background: var(--info-bg); color: var(--info-ink); }
.stat.hi { border-color: var(--text); box-shadow: inset 4px 0 0 var(--m); }
.tabs a.on { border-bottom-color: var(--m); }

/* Kesim (bıçak) işaretleri: kartın köşelerinde ince çizgiler */
.cropmarks { position: relative; }
.cropmarks::before, .cropmarks::after { content: ""; position: absolute; width: 14px; height: 14px; pointer-events: none; }
.cropmarks::before { top: -7px; left: -7px; border-top: 1px solid var(--crop); border-left: 1px solid var(--crop); }
.cropmarks::after { bottom: -7px; right: -7px; border-bottom: 1px solid var(--crop); border-right: 1px solid var(--crop); }
.preview { border: 1.5px dashed var(--preview-line); background: var(--preview-bg); }

/* Giriş ekranı */
.authpage { background: var(--ink); min-height: 100vh; }
.auth { max-width: 400px; margin: 0 auto; padding: 24px 16px 40px; }
.authlogo { display: flex; justify-content: center; margin: 4vh 0 16px; }
.auth .cmyk { margin: 0 0 18px; border-radius: 2px; overflow: hidden; }
.auth .card h1 { font-size: 1.1rem; letter-spacing: .14em; }

/* ---- Ana sayfa ---- */
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.hero h1 { margin: 0; }
.hero .date { color: var(--muted); font-size: .9rem; }
.regmark { width: 28px; height: 28px; flex: none; opacity: .55; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0 0 18px; }
.quick a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 84px; padding: 10px 6px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px; color: var(--text); font-weight: 650; font-size: .88rem;
  text-align: center; text-decoration: none; position: relative; overflow: hidden; }
.quick a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; }
.quick a:nth-child(1)::after { background: var(--c); } .quick a:nth-child(2)::after { background: var(--m); }
.quick a:nth-child(3)::after { background: var(--y); } .quick a:nth-child(4)::after { background: var(--k); }
.quick a .ico { width: 34px; height: 34px; border-radius: 50%; background: var(--btn-bg); color: var(--btn-ink); display: grid; place-items: center; font-size: 1.1rem; }
.quick a:hover { border-color: var(--text); text-decoration: none; }
@media (max-width: 380px) { .quick { grid-template-columns: repeat(2, 1fr); } }

.kpis { display: grid; gap: 12px; grid-template-columns: 1fr; margin-bottom: 18px; }
@media (min-width: 720px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
.kpi { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.kpi .k { font-size: .8rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.kpi .v { font-size: 1.7rem; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.01em; margin-top: 2px; }
.kpi .sub { font-size: .82rem; color: var(--muted); margin-top: 4px; }
.kpi.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.kpi.dark .k, .kpi.dark .sub { color: #c9cbd0; }
.ccy { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.ccy div { font-size: .78rem; border-top: 1px dashed rgba(127,127,127,.5); padding-top: 4px; font-variant-numeric: tabular-nums; }
.ccy b { display: block; font-size: .72rem; letter-spacing: .08em; opacity: .75; }
.twocol { display: grid; gap: 0 18px; grid-template-columns: 1fr; }
@media (min-width: 960px) { .twocol { grid-template-columns: 1fr 1fr; } }
.panel h2 { display: flex; justify-content: space-between; align-items: baseline; }
.panel h2 a { font-size: .85rem; font-weight: 600; }
.list .item.small { padding: 9px 4px; font-size: .92rem; }
.empty { color: var(--muted); font-size: .9rem; padding: 8px 4px; }
.tag { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .06em; padding: 1px 6px; border-radius: 3px; background: var(--tag-bg); color: var(--tag-ink); }
.tag.c { background: var(--tag-c-bg); color: var(--tag-c-ink); } .tag.m { background: var(--tag-m-bg); color: var(--tag-m-ink); } .tag.y { background: var(--tag-y-bg); color: var(--tag-y-ink); }
.scrollx { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.t.sheet { font-size: .82rem; } table.t.sheet td, table.t.sheet th { white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
tr.bad td { background: var(--bad-row); }
h3 { font-size: .95rem; margin: 0 0 8px; }
.authpage { background: #000; }
.authpage .cmyk i:nth-child(4) { background: #fff; }

/* Kur şeridi: üst çubuğun altında tek satır */
.fxstrip { position: sticky; top: 56px; z-index: 8; display: flex; align-items: center; gap: 10px; height: 26px; padding: 0 14px;
  background: #16171a; color: #e9e9ea; font-size: .78rem; white-space: nowrap; overflow: hidden; font-variant-numeric: tabular-nums; }
.fxstrip a { color: #9fd9ef; }
.fxtoggle { background: none; border: 0; color: inherit; font: inherit; padding: 0; cursor: pointer; min-width: 0; flex: 1 1 auto;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.fxtoggle b { color: #fff; } .fxtoggle small { color: #a7abb2; }
.fxstrip .fx-inv { display: none; } .fxstrip.inv .fx-inv { display: inline; } .fxstrip.inv .fx-tl { display: none; }
.fxdate { flex: none; font-size: .72rem; color: #a7abb2 !important; }
.fxstrip.stale .fxdate { color: #1b1b1b !important; background: var(--y); padding: 1px 6px; border-radius: 3px; font-weight: 700; }
.stickyhead { position: sticky; top: 0; z-index: 10; }
.stickyhead .topbar, .stickyhead .cmyk, .stickyhead .fxstrip { position: static; }

/* Ana sayfa aylık rapor kartı */
.month-card { padding: 14px; }
.month-card .mc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.month-card .mc-head h2 { margin: 0; font-size: 1.1rem; text-align: center; flex: 1; }
.month-card .mc-head h2 a { color: var(--text); }
.month-card .mc-nav { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--line);
  border-radius: 10px; font-size: 1.5rem; color: var(--text); text-decoration: none; }
.month-card .mc-nav.off { opacity: .3; }
.month-card .mc-kpis { display: grid; gap: 8px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .month-card .mc-kpis { grid-template-columns: repeat(6, 1fr); } }
.month-card .mc-kpis > div { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.month-card .mc-kpis > div.hl { border-color: var(--text); }
.month-card .mc-kpis .k { font-size: .75rem; color: var(--muted); }
.month-card .mc-kpis .v { font-size: 1.05rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.month-card .mc-kpis .s { font-size: .72rem; color: var(--muted); }
.month-card .mc-note { font-size: .85rem; color: var(--muted); margin: 8px 0 0; }
.month-card .mc-chart { display: block; margin-top: 12px; color: inherit; text-decoration: none; }
.chart-scroll { overflow-x: auto; }
.month-card .legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: .78rem; color: var(--muted); margin-bottom: 4px; }
.month-card .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.month-card .mc-cur { margin-top: 8px; font-size: .9rem; }
.month-card .mc-cur table { font-size: .82rem; }
.month-card .mc-cur > div, .month-card .mc-cur table { overflow-x: auto; display: block; }
.month-card .mc-lists { display: grid; gap: 12px; margin-top: 10px; }
@media (min-width: 720px) { .month-card .mc-lists { grid-template-columns: 1fr 1fr; } }
.month-card .mc-lists h3 { font-size: .9rem; margin: 0 0 4px; }
.month-card .mc-more { margin: 10px 0 0; font-weight: 600; }


/* Sayfa asla yatay kaymaz: ana sütun içeriğe göre büyümez, geniş tablo/grafik kendi kabında kayar. */
html, body { overflow-x: clip; max-width: 100%; }
main { min-width: 0; }
.card:not(.month-card):has(> table.t:not(.cards)), .card:not(.month-card):has(> details > table.t) { overflow-x: auto; }
.month-card details > table.t { display: block; overflow-x: auto; }
table.t td, table.t th { overflow-wrap: anywhere; }
table.t td.num, table.t th.num { overflow-wrap: normal; white-space: nowrap; }
.card .muted, .list .item span { overflow-wrap: anywhere; }
svg.chart { max-width: none; }


/* Formlarda kur kutusu ve hatırlatma */
.ratebox { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 0 0 12px; font-size: .85rem; color: var(--muted); }
.ratebox .rb-line { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.ratebox .rb-ico { font-weight: 700; color: var(--text); }
.ratebox.stale { border-color: var(--stale-line); background: var(--stale-bg); color: var(--stale-ink); }
.ratebox .rb-warn { margin-top: 6px; font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ratebox .rb-note { margin-top: 6px; color: var(--stale-ink); background: var(--tag-y-bg); border-radius: 6px; padding: 6px 8px; font-weight: 600; }
.ratebox .rb-btn { padding: 4px 10px; min-height: 0; }


/* Modern aylık grafik (ana sayfa). Renkler: varsayılan doğrulanmış palet, açık ve koyu adımları ayrı. */
.mc-root { --c-sales: #2a78d6; --c-expense: #eb6834; --c-net: #1baf7a; --c-diff: #eda100;
  --c-grid: #ecebe7; --c-zero: #c9c8c2; --c-ax: #6b6a66; --c-band: #f3f6fb; --c-tip-bg: #fff; --c-tip-ink: #0b0b0c; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] .mc-root { --c-sales: #3987e5; --c-expense: #d95926; --c-net: #199e70; --c-diff: #c98500;
    --c-grid: #2c2c2a; --c-zero: #4a4a47; --c-ax: #a9a8a2; --c-band: #22262c; --c-tip-bg: #1a1a19; --c-tip-ink: #f0efec; }
}
:root[data-theme="dark"] .mc-root { --c-sales: #3987e5; --c-expense: #d95926; --c-net: #199e70; --c-diff: #c98500;
  --c-grid: #2c2c2a; --c-zero: #4a4a47; --c-ax: #a9a8a2; --c-band: #22262c; --c-tip-bg: #1a1a19; --c-tip-ink: #f0efec; }
.mc-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .78rem; color: var(--muted); margin: 12px 0 4px; }
.mc-legend i, .mc-tip i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.k-sales { background: var(--c-sales); } .k-expense { background: var(--c-expense); }
.k-net { background: var(--c-net); height: 3px !important; vertical-align: 2px !important; border-radius: 2px; }
.k-diff { background: repeating-linear-gradient(90deg, var(--c-diff) 0 4px, transparent 4px 6px); height: 3px !important; vertical-align: 2px !important; }
.mc-wrap { position: relative; }
.mchart { display: block; font-family: inherit; }
.mchart .mc-grid { stroke: var(--c-grid); stroke-width: 1; }
.mchart .mc-zero { stroke: var(--c-zero); stroke-width: 1; }
.mchart .mc-ax { fill: var(--c-ax); font-size: 10px; }
.mchart .mc-x.sel { fill: var(--text); font-weight: 700; }
.mchart .mc-band { fill: transparent; transition: fill .15s; }
.mchart .mc-col { cursor: pointer; outline: none; }
.mchart .mc-col.sel .mc-band { fill: var(--c-band); }
.mchart .mc-col:hover .mc-band, .mchart .mc-col.on .mc-band, .mchart .mc-col:focus-visible .mc-band { fill: var(--c-band); stroke: var(--c-zero); }
.mchart .mc-sales { fill: var(--c-sales); } .mchart .mc-expense { fill: var(--c-expense); }
.mchart .mc-net { fill: none; stroke: var(--c-net); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.mchart .mc-diff { fill: none; stroke: var(--c-diff); stroke-width: 2; stroke-dasharray: 5 4; }
.mchart .mc-dot { fill: var(--c-net); stroke: var(--paper); stroke-width: 2; }
.mchart .mc-dot.sel { r: 5.5; }
.mchart .mc-bar { transform-box: fill-box; transform-origin: 50% 100%; animation: mc-grow .55s cubic-bezier(.2,.8,.2,1) both;
  animation-delay: calc(var(--i) * 35ms); }
.mchart .mc-net, .mchart .mc-diff { animation: mc-fade .6s ease .35s both; }
@keyframes mc-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes mc-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .mchart .mc-bar, .mchart .mc-net, .mchart .mc-diff { animation: none; } }
.mc-tip { position: absolute; top: calc(100% + 4px); z-index: 5; min-width: 190px; background: var(--c-tip-bg); color: var(--c-tip-ink);
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: .82rem; box-shadow: 0 4px 16px var(--shadow);
  font-variant-numeric: tabular-nums; pointer-events: auto; }
.mc-tip strong { display: block; margin-bottom: 4px; } .mc-tip div { display: flex; align-items: center; gap: 2px; }
.mc-tip b { margin-left: auto; padding-left: 8px; } .mc-tip a { display: block; margin-top: 6px; font-weight: 600; }


/* ===================================================================== Koyu tema
   data-theme="dark" (kullanıcı seçimi) veya data-theme="system" + cihaz koyu. Üst çubuk ve kur şeridi zaten koyu. */
:root[data-theme="dark"] {
  --ink: #0b0b0c; --paper: #1b1b1d; --bg: #111112; --surface: #1b1b1d; --surface2: #232326; --line: #2f2f33;
  --text: #ecebe7; --muted: #a9a8a2; --brand: #ecebe7; --link: #6cc4e6; --pos: #4cc28a; --neg: #f2726a;
  --input-bg: #141416; --input-line: #3a3a3f; --soft-brand: #2a2a2e; --ok-bg: #12301f; --err-bg: #3a1714;
  --info-bg: #0f2a35; --info-ink: #8fd6f0; --badge-bg: #2a2a2e; --preview-bg: #18181a; --preview-line: #5a5a56;
  --side-on: #25252a; --sep: #3a3a3f; --crop: #6b6b66; --tag-bg: #2a2a2e; --tag-ink: #d6d5cf; --tag-c-bg: #0f2a35;
  --tag-c-ink: #8fd6f0; --tag-m-bg: #3a1227; --tag-m-ink: #f4a6cf; --tag-y-bg: #3a3110; --tag-y-ink: #f3d77a;
  --bad-row: #2b1a18; --stale-bg: #3a3110; --stale-line: #b08a00; --stale-ink: #f3d77a; --warn-bg: #3a3110; --warn: #f3d77a;
  --btn-bg: #ecebe7; --btn-ink: #0b0b0c; --shadow: rgba(0,0,0,.45);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
  --ink: #0b0b0c; --paper: #1b1b1d; --bg: #111112; --surface: #1b1b1d; --surface2: #232326; --line: #2f2f33;
  --text: #ecebe7; --muted: #a9a8a2; --brand: #ecebe7; --link: #6cc4e6; --pos: #4cc28a; --neg: #f2726a;
  --input-bg: #141416; --input-line: #3a3a3f; --soft-brand: #2a2a2e; --ok-bg: #12301f; --err-bg: #3a1714;
  --info-bg: #0f2a35; --info-ink: #8fd6f0; --badge-bg: #2a2a2e; --preview-bg: #18181a; --preview-line: #5a5a56;
  --side-on: #25252a; --sep: #3a3a3f; --crop: #6b6b66; --tag-bg: #2a2a2e; --tag-ink: #d6d5cf; --tag-c-bg: #0f2a35;
  --tag-c-ink: #8fd6f0; --tag-m-bg: #3a1227; --tag-m-ink: #f4a6cf; --tag-y-bg: #3a3110; --tag-y-ink: #f3d77a;
  --bad-row: #2b1a18; --stale-bg: #3a3110; --stale-line: #b08a00; --stale-ink: #f3d77a; --warn-bg: #3a3110; --warn: #f3d77a;
  --btn-bg: #ecebe7; --btn-ink: #0b0b0c; --shadow: rgba(0,0,0,.45);
  color-scheme: dark;
  }
}
.themebtn { background: none; border: 1px solid rgba(255,255,255,.35); color: #e9e9ea; border-radius: 8px; padding: 4px 8px;
  font: inherit; font-size: .8rem; cursor: pointer; white-space: nowrap; }
.themebtn:hover { border-color: #fff; }


/* Formdan çıkmadan yeni cari */
.pq-open { margin-top: 6px; }
.pq-dialog { border: 1px solid var(--line); border-radius: 12px; padding: 0; width: min(440px, calc(100vw - 32px));
  background: var(--surface); color: var(--text); box-shadow: 0 12px 40px var(--shadow); }
.pq-dialog::backdrop { background: rgba(0,0,0,.45); }
.pq-form { padding: 16px; display: grid; gap: 10px; }
.pq-form h2 { margin: 0; }
.pq-form label { display: grid; gap: 4px; font-weight: 600; font-size: .9rem; }
.pq-msg .btn { margin: 4px 6px 0 0; }
