:root {
  --bg: #f4f6f8; --surface: #ffffff; --surface-2: #f0f3f5; --border: #e2e7eb;
  --text: #0f1b24; --muted: #5d6b76; --faint: #8a97a1;
  --brand: #0f766e; --brand-2: #14b8a6; --brand-soft: #ccfbf1;
  --income: #15803d; --expense: #c2410c; --transfer: #2563eb;
  --danger: #dc2626; --warn-bg: #fff7e6; --warn: #92400e;
  --radius: 14px; --shadow: 0 1px 2px rgba(15, 27, 36, .06), 0 4px 16px rgba(15, 27, 36, .05);
  --nav-w: 220px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1419; --surface: #131e25; --surface-2: #1a2730; --border: #25343e;
    --text: #e7eef2; --muted: #9db0bc; --faint: #6f8391;
    --brand: #2dd4bf; --brand-2: #14b8a6; --brand-soft: #0f3b38;
    --income: #4ade80; --expense: #fb923c; --transfer: #60a5fa;
    --danger: #f87171; --warn-bg: #3a2a10; --warn: #fcd34d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); text-decoration: none; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 13px; }
.income { color: var(--income); } .expense { color: var(--expense); } .transfer { color: var(--transfer); }
.right { text-align: right; } .nowrap { white-space: nowrap; }
.hidden { display: none !important; }

/* ---------- Yerleşim ---------- */
.shell { display: flex; min-height: 100vh; }
.nav { width: var(--nav-w); flex: none; background: var(--surface); border-right: 1px solid var(--border); padding: 18px 12px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav .logo { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .3px; padding: 4px 10px 18px; }
.nav .logo img { width: 30px; height: 30px; border-radius: 8px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--muted); font-weight: 550; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.on { background: var(--brand-soft); color: var(--brand); }
.nav .spacer { flex: 1; }
.nav .add-btn { margin: 0 4px 10px; }
.nav .grp { font-size: 11px; font-weight: 750; letter-spacing: .6px; text-transform: uppercase; color: var(--faint); padding: 12px 12px 4px; }
.nav a { padding: 7px 12px; }
.grp-m { font-size: 11px; font-weight: 750; letter-spacing: .6px; text-transform: uppercase; color: var(--faint); padding: 12px 4px 2px; }
main { flex: 1; min-width: 0; padding: 24px 28px 100px; max-width: 1180px; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { font-size: 22px; margin: 0; flex: 1; min-width: 160px; }
.bottom-nav, .fab { display: none; }

@media (max-width: 820px) {
  .nav { display: none; }
  main { padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); }
  .bottom-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); padding: 4px 0; }
  .bottom-nav a .i { font-size: 20px; line-height: 1; }
  .bottom-nav a.on { color: var(--brand); }
  .fab { display: flex; position: fixed; right: 18px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 21; width: 58px; height: 58px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; font-size: 30px; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(15, 118, 110, .4); }
  @media (prefers-color-scheme: dark) { .fab { color: #062a27; } }
}

/* ---------- Bileşenler ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; min-width: 0; }
.card h2 { font-size: 15px; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.card h2 .x { margin-left: auto; font-weight: 500; font-size: 13px; }
.grid { display: grid; gap: 14px; }
.g-stats { grid-template-columns: repeat(3, 1fr); }
.g-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 980px) { .g-2 { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .g-stats { grid-template-columns: 1fr 1fr; } .g-stats .stat:last-child { grid-column: span 2; } }
.stat .lbl { color: var(--muted); font-size: 13px; font-weight: 600; }
.stat .val { font-size: 24px; font-weight: 750; margin-top: 2px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat .sub { color: var(--faint); font-size: 12.5px; margin-top: 2px; }
@media (max-width: 560px) { .stat .val { font-size: 19px; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); padding: 8px 14px; border-radius: 10px; cursor: pointer; font-weight: 600; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
@media (prefers-color-scheme: dark) { .btn.primary { color: #062a27; } }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--danger); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { border: 0; background: transparent; cursor: pointer; padding: 6px 8px; border-radius: 8px; color: var(--muted); font-size: 16px; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

input:not([type=checkbox]):not([type=radio]), select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); outline: none; min-width: 0;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
label.f { display: block; }
label.f > span { display: block; font-size: 12.5px; font-weight: 650; color: var(--muted); margin: 0 0 5px; }
.row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 120px; }
.row > .fix { flex: none; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack > * { flex-shrink: 0; } /* kaydırılan modalda tablolar büzülmesin */
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }

.seg { display: inline-flex; background: var(--surface-2); border-radius: 11px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 9px; cursor: pointer; font-weight: 650; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.seg.full { display: flex; } .seg.full button { flex: 1; }
.seg button.on.k-expense { color: var(--expense); } .seg button.on.k-income { color: var(--income); } .seg button.on.k-transfer { color: var(--transfer); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: 13.5px; font-weight: 550; display: inline-flex; gap: 6px; align-items: center; }
.chip:hover { background: var(--surface-2); }
.chip.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }

.badge { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.badge.code { font-family: ui-monospace, Consolas, monospace; letter-spacing: .3px; }
.badge.new { background: var(--brand-soft); color: var(--brand); }

.month-nav { display: inline-flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 11px; padding: 3px; }
.month-nav span { min-width: 120px; text-align: center; font-weight: 700; }

/* ---------- Listeler ---------- */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--border); cursor: pointer; min-width: 0; }
.li:last-child { border-bottom: 0; }
.li:hover { background: var(--surface-2); }
.li .ico { width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.li .main { flex: 1; min-width: 0; }
.li .t1 { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .t2 { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .amt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.day-head { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 14px 4px 4px; border-bottom: 1px solid var(--border); }

.bars { display: flex; flex-direction: column; gap: 10px; }
.bar .top { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; margin-bottom: 4px; }
.bar .top b { font-variant-numeric: tabular-nums; }
.bar .track { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.bar .fill { height: 100%; border-radius: 99px; }

.donut-wrap { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.donut { width: 150px; height: 150px; border-radius: 50%; flex: none; position: relative; }
.donut::after { content: ""; position: absolute; inset: 26px; background: var(--surface); border-radius: 50%; }
.donut .c { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); }
.donut .c b { font-size: 14px; color: var(--text); }
.legend { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.legend div { display: flex; align-items: center; gap: 8px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 700; padding: 8px 6px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.t th.right { text-align: right; }
table.t td { padding: 9px 6px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.t tr.click { cursor: pointer; } table.t tr.click:hover td { background: var(--surface-2); }
.table-wrap { overflow-x: auto; }

.alert { background: var(--warn-bg); color: var(--warn); border-radius: 12px; padding: 10px 14px; font-size: 14px; display: flex; gap: 10px; align-items: center; }
.empty { text-align: center; color: var(--muted); padding: 28px 10px; }
.empty .big { font-size: 34px; margin-bottom: 6px; }

/* ---------- Modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(5, 12, 16, .45); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 5vh 12px; }
.modal { background: var(--surface); border-radius: 18px; width: 100%; max-width: 560px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); display: flex; flex-direction: column; max-height: 90vh; }
.modal.wide { max-width: 760px; }
.modal .mh { display: flex; align-items: center; padding: 14px 16px 6px; gap: 8px; }
.modal .mh h3 { margin: 0; flex: 1; font-size: 17px; }
.modal .mb { padding: 8px 16px 16px; overflow-y: auto; flex: 1; min-height: 0; }
.modal .mf { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); flex: none; }
.modal .mf .sp { flex: 1; }
@media (max-width: 560px) {
  .overlay { padding: 0; align-items: flex-end; }
  .modal { border-radius: 18px 18px 0 0; max-height: 94vh; }
  .modal .mf { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
}
.amount-in { font-size: 30px !important; font-weight: 750; text-align: center; padding: 12px !important; font-variant-numeric: tabular-nums; }
.amount-in.k-expense { color: var(--expense); } .amount-in.k-income { color: var(--income); } .amount-in.k-transfer { color: var(--transfer); }
.err { color: var(--danger); font-size: 13.5px; min-height: 1em; }
details.more > summary { cursor: pointer; font-weight: 650; color: var(--muted); font-size: 13.5px; padding: 6px 0; list-style: none; }
details.more > summary::before { content: "▸ "; }
details.more[open] > summary::before { content: "▾ "; }

.items { display: flex; flex-direction: column; gap: 8px; }
.item { border: 1px solid var(--border); border-radius: 12px; padding: 8px; display: grid; grid-template-columns: 1.6fr 1.2fr 72px 74px 110px 30px; gap: 6px; align-items: center; }
.item .cat { grid-column: 1 / 3; }
.item .info { grid-column: 3 / 7; text-align: right; }
.item input, .item select { padding: 7px 9px; font-size: 14px; }
@media (max-width: 640px) {
  .item { grid-template-columns: 1fr 1fr 30px; }
  .item [name=iname] { grid-column: 1 / 3; } .item [data-rm] { grid-row: 1; grid-column: 3; }
  .item [name=ibrand] { grid-column: 1 / 4; }
  .item .cat, .item .info { grid-column: 1 / 4; text-align: left; }
}
.item-sum { font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

/* ---------- Giriş ---------- */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login .card { width: 100%; max-width: 360px; padding: 28px 24px; text-align: center; }
.login img { width: 64px; height: 64px; border-radius: 16px; }
.login h1 { font-size: 20px; margin: 12px 0 18px; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 600; opacity: 0; pointer-events: none; transition: .2s; z-index: 100; max-width: calc(100vw - 32px); }
#toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (max-width: 820px) { #toast { bottom: calc(150px + env(safe-area-inset-bottom)); } }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 9px 14px; color: var(--muted); font-weight: 650; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--brand); border-color: var(--brand); }

.cat-tree .main-row { display: flex; align-items: center; gap: 8px; padding: 8px 4px; border-bottom: 1px solid var(--border); }
.cat-tree .sub-row { display: flex; align-items: center; gap: 8px; padding: 6px 4px 6px 36px; border-bottom: 1px dashed var(--border); font-size: 14px; }
.cat-tree .name { flex: 1; min-width: 0; }
.cat-tree .archived { opacity: .45; }

.chart svg { width: 100%; height: auto; display: block; }
.chart .ax { stroke: var(--border); }
.chart .ln { fill: none; stroke: var(--brand); stroke-width: 2.5; }
.chart .dt { fill: var(--brand); }
.chart text { fill: var(--muted); font-size: 11px; }

/* Bordro tablosu */
table.ps td { padding: 4px 3px; }
table.ps input, table.ps select { padding: 6px 8px; font-size: 14px; }

/* Pano ızgarası */
.dash { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.dash > div { min-width: 0; }
.dash > .span2 { grid-column: 1 / -1; }
.dash > div > .card, .dash > div.card { height: 100%; }
@media (max-width: 980px) { .dash { grid-template-columns: minmax(0, 1fr); } }
/* Harcama takvimi */
.heat { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.heat .hh { font-size: 11px; color: var(--faint); text-align: center; }
.heat .hc { aspect-ratio: 1.4; border-radius: 6px; display: flex; align-items: flex-start; justify-content: flex-end; padding: 3px 5px; font-size: 11px; color: var(--muted); cursor: pointer; }
.heat .hc.today { outline: 2px solid var(--brand); }

/* Ekstre içe aktarma */
.imp-list { display: flex; flex-direction: column; }
.imp-row { display: grid; grid-template-columns: 22px 84px minmax(0, 1fr) 120px 150px minmax(170px, 240px); grid-template-areas: "cb d desc amt kind tg";
  gap: 8px; align-items: center; padding: 8px 2px; border-bottom: 1px solid var(--border); }
.imp-row:last-child { border-bottom: 0; }
.imp-row.off { opacity: .5; }
.imp-row .cb { grid-area: cb; } .imp-row .d { grid-area: d; } .imp-row .desc { grid-area: desc; min-width: 0; } .imp-row .amt { grid-area: amt; } .imp-row .kind { grid-area: kind; } .imp-row .tg { grid-area: tg; min-width: 0; }
.imp-row .d { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.imp-row .t1 { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imp-row .t2, .imp-row .t3 { font-size: 12px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imp-row .t3 { color: var(--muted); }
.imp-row .amt { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.imp-row select { padding: 6px 8px; font-size: 13.5px; }
.imp-bar { position: sticky; bottom: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; z-index: 5; }
.imp-bar .sp { flex: 1; }
@media (max-width: 980px) {
  .imp-row { grid-template-columns: 22px 130px minmax(0, 1fr) auto; grid-template-areas: "cb desc desc amt" "cb d d d" "cb kind tg tg"; row-gap: 6px; }
}
@media (max-width: 820px) { .imp-bar { bottom: calc(72px + env(safe-area-inset-bottom)); } }

/* Nakit tahmini zaman çizelgesi */
.cf-list { display: flex; flex-direction: column; }
.cf-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) 120px 120px 116px; gap: 10px; align-items: center; padding: 7px 4px; border-bottom: 1px solid var(--border); font-size: 14px; }
.cf-row:last-child { border-bottom: 0; }
.cf-row.neg { background: color-mix(in srgb, var(--danger) 7%, transparent); }
.cf-row.start, .cf-row.est { color: var(--muted); }
.cf-row.est { border-top: 1px dashed var(--border); }
.cf-d { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.cf-l { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-a, .cf-b { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 650; }
.cf-b { font-weight: 750; }
.cf-bar { position: relative; height: 10px; background: var(--surface-2); border-radius: 99px; }
.cf-bar::after { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--faint); }
.cf-bar i { position: absolute; top: 0; bottom: 0; border-radius: 99px; }
@media (max-width: 640px) {
  .cf-row { grid-template-columns: 52px minmax(0, 1fr) auto; grid-template-areas: "d l b" "d a bar"; row-gap: 3px; }
  .cf-d { grid-area: d; } .cf-l { grid-area: l; } .cf-b { grid-area: b; } .cf-a { grid-area: a; text-align: left; font-size: 12.5px; } .cf-bar { grid-area: bar; width: 90px; justify-self: end; }
}

/* Toplu düzenleme */
.selmode .li[data-tx] { position: relative; padding-left: 34px; }
.selmode .li[data-tx]::before { content: ""; position: absolute; left: 8px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border: 2px solid var(--faint); border-radius: 5px; }
.selmode .li[data-tx].picked { background: var(--brand-soft); }
.selmode .li[data-tx].picked::before { background: var(--brand); border-color: var(--brand); }

/* Grafik ipucu */
#tip { position: fixed; z-index: 80; pointer-events: none; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.25);
  padding: 8px 10px; font-size: 12.5px; min-width: 150px; max-width: 280px; opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s; }
#tip.on { opacity: 1; transform: none; }
#tip .tt-h { font-weight: 750; margin-bottom: 4px; }
#tip .tt-r { display: flex; align-items: center; gap: 6px; padding: 1px 0; }
#tip .tt-r i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
#tip .tt-r span { flex: 1; color: var(--muted); }
#tip .tt-r b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .hit.tip-on, .chart .hit:hover { fill: color-mix(in srgb, var(--text) 7%, transparent); }
.chart circle.hit:hover, .chart circle.hit.tip-on { fill: color-mix(in srgb, var(--brand) 25%, transparent); }
/* Yüzde çubuğu (sabit / değişken) */
.stackbar { display: flex; height: 18px; border-radius: 99px; overflow: hidden; background: var(--surface-2); }
.stackbar i { display: block; height: 100%; cursor: default; }
.stackbar i.tip-on { filter: brightness(1.15); }
/* Kutu grafik */
.tm { position: relative; border-radius: 12px; overflow: hidden; }
.tm-c { position: absolute; box-sizing: border-box; border: 2px solid var(--surface); padding: 6px 8px; color: #fff; overflow: hidden; border-radius: 8px; }
.tm-c.clk { cursor: pointer; } .tm-c.clk:hover, .tm-c.tip-on { filter: brightness(1.12); }
.tm-t { font-weight: 700; font-size: 13px; line-height: 1.2; text-shadow: 0 1px 2px rgba(0,0,0,.35); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-v { font-size: 12px; opacity: .92; text-shadow: 0 1px 2px rgba(0,0,0,.35); white-space: nowrap; }
/* Şelale */
.wf { display: flex; flex-direction: column; gap: 4px; }
.wf-row { display: grid; grid-template-columns: minmax(110px, 190px) minmax(0, 1fr) 118px; gap: 10px; align-items: center; padding: 3px 4px; border-radius: 8px; }
.wf-row.clk { cursor: pointer; } .wf-row:hover, .wf-row.tip-on { background: var(--surface-2); }
.wf-l { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf-t { position: relative; height: 18px; }
.wf-b { position: absolute; top: 0; bottom: 0; border-radius: 4px; }
.wf-z { position: absolute; top: -3px; bottom: -3px; width: 1px; background: var(--faint); }
.wf-v { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 13.5px; }
@media (max-width: 560px) { .wf-row { grid-template-columns: 1fr auto; } .wf-t { grid-column: 1 / 3; grid-row: 2; } }
/* Sıfır eksenli yatay çubuklar (kâr / zarar) */
.dv { display: flex; flex-direction: column; gap: 6px; }
.dv-row { display: grid; grid-template-columns: minmax(150px, 1.2fr) minmax(0, 1fr) 120px; gap: 12px; align-items: center; padding: 6px 4px; border-bottom: 1px solid var(--border); }
.dv-row:last-child { border-bottom: 0; }
.dv-t { position: relative; height: 16px; background: var(--surface-2); border-radius: 99px; }
.dv-z { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--faint); }
.dv-b { position: absolute; top: 0; bottom: 0; border-radius: 99px; }
.dv-v { text-align: right; font-weight: 750; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .dv-row { grid-template-columns: 1fr auto; } .dv-t { grid-column: 1 / 3; grid-row: 2; } }
/* Yıllık takvim */
.yh-wrap { overflow-x: auto; }
.yh-wrap svg text { font-size: 10px; }
.yh { fill: var(--surface-2); cursor: pointer; }
.yh.l1 { fill: color-mix(in srgb, var(--expense) 22%, var(--surface-2)); } .yh.l2 { fill: color-mix(in srgb, var(--expense) 42%, var(--surface-2)); }
.yh.l3 { fill: color-mix(in srgb, var(--expense) 62%, var(--surface-2)); } .yh.l4 { fill: color-mix(in srgb, var(--expense) 82%, var(--surface-2)); } .yh.l5 { fill: var(--expense); }
.yh.tip-on, .yh:hover { stroke: var(--text); stroke-width: 1.5; }
/* Pano ayrıntılar bölümü */
.dash-more { margin-top: 14px; }
.dash-more > summary { cursor: pointer; list-style: none; font-weight: 700; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.dash-more > summary::-webkit-details-marker { display: none; }
.dash-more[open] > summary { border-color: var(--brand); }
.dash-more > summary .faint { font-weight: 500; }

/* Hedefler */
.goal-bar { position: relative; height: 14px; background: var(--surface-2); border-radius: 99px; overflow: visible; }
.goal-bar .fill { height: 100%; border-radius: 99px; }
.goal-bar i { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--surface); opacity: .9; }
.goal-ideal { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1px; background: var(--text); opacity: .5; border-radius: 2px; }
.ms { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ms-c { font-size: 12.5px; padding: 4px 9px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
.ms-c b { color: var(--text); font-weight: 650; }
.ms-c.done { background: color-mix(in srgb, var(--income) 18%, var(--surface)); color: var(--income); }
.ms-c.late b { color: var(--expense); }

/* Seri giriş */
.quick { max-width: 640px; }
.quick .qk-acc { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
.quick .qk-acc .chip { flex: none; }
.quick [data-qsug] .chip { font-size: 14px; padding: 7px 12px; }
body:has(.quick) .fab { display: none; }
.quick .qk-scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.quick .qk-scroll::-webkit-scrollbar { display: none; }
.quick .qk-scroll .chip { flex: none; }
.quick [data-qcats] .chip { font-size: 14px; padding: 7px 12px; }
.quick .qk-lbl { font-size: 12.5px; font-weight: 650; color: var(--muted); margin-bottom: 6px; }
.quick .qk-days { align-items: center; }
/* Kaydet her zaman görünür: telefonda alt menünün hemen üstüne yapışır */
.quick .qk-save { position: sticky; bottom: 8px; z-index: 5; }
.quick .qk-save .btn { width: 100%; padding: 14px; font-size: 17px; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 820px) { .quick .qk-save { bottom: calc(72px + env(safe-area-inset-bottom)); } }
/* Telefonda bildirim satırları: metin tam genişlik, düğmeler alt satırda sağda */
@media (max-width: 600px) {
  .alert { flex-wrap: wrap; }
  .alert > span[style*="flex:1"] { flex: 1 1 calc(100% - 34px) !important; }
  .alert > span[style*="flex:1"] + .btn, .alert > span[style*="flex:1"] + .icon-btn { margin-left: auto; }
}

/* Üst sıra: eldeki para | kart limitleri | bildirimler */
.g-money { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
.g-money.has-al { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.15fr); }
.g-money.has-al .al-panel { order: 3; }
.al-panel { display: flex; flex-direction: column; min-width: 0; }
.al-list { display: flex; flex-direction: column; gap: 8px; max-height: 340px; overflow-y: auto; padding-right: 2px; }
.al-list .alert { font-size: 13px; padding: 8px 10px; flex-wrap: wrap; gap: 6px 8px; border-radius: 10px; }
.al-list .alert > span { min-width: 0; flex: 1 1 180px; }
.al-list .alert .btn.sm { padding: 4px 9px; font-size: 12.5px; }
@media (max-width: 1180px) {
  .g-money.has-al { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .g-money.has-al .al-panel { order: -1; grid-column: 1 / -1; }
  .al-list { max-height: none; }
}
@media (max-width: 700px) { .g-money, .g-money.has-al { grid-template-columns: minmax(0, 1fr); } }
/* Gelir / gider / kalan satırları */
.srow { display: grid; grid-template-columns: 90px auto 1fr; gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--border); }
.srow .lbl { color: var(--muted); font-weight: 600; font-size: 13.5px; }
.srow b { font-size: 20px; font-variant-numeric: tabular-nums; }
.srow span:last-child { text-align: right; }
.srow.total { border-bottom: 0; }
.g-money .li .main { flex: 1 1 110px; min-width: 110px; }
.g-money .li .amt { min-width: 0; white-space: normal; }
.g-money .li .amt .faint { font-size: 11.5px; }

/* Menüde bildirim sayısı */
.nbadge { margin-left: auto; background: var(--expense); color: #fff; font-size: 11px; font-weight: 800; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; display: inline-flex; align-items: center; justify-content: center; }
.bottom-nav a { position: relative; }
.bottom-nav .nbadge { position: absolute; top: 0; left: 55%; margin: 0; }

/* Pano: geniş ekranda iki bölge — solda büyük kartlar, sağda özet sütunu (bağımsız akar, boşluk kalmaz) */
.dash-zones { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.dash + .dash-zones { margin-top: 14px; }
/* 1500px altında bölgeler açılır: tüm kartlar tek ızgarada, asıl sırasıyla (order) */
@media (max-width: 1499px) {
  .dash-zones { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .dz-main, .dz-side { display: contents; }
}
@media (max-width: 980px) { .dash-zones { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 1500px) {
  main[data-page="pano"] { max-width: 2400px; }
  .dash-zones:not(.one) { grid-template-columns: minmax(0, 1.85fr) minmax(360px, 1fr); }
  .dz-side { grid-template-columns: minmax(0, 1fr); }
  /* Geniş bölgede grafikler aşırı uzamasın */
  main[data-page="pano"] .dash .chart svg { max-height: 300px; }
}
@media (min-width: 2300px) { .dash-zones:not(.one) { grid-template-columns: minmax(0, 2.1fr) minmax(420px, 1fr); } }
/* Kategorilere göre harcama tablosu */
.cm-t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.cm-t th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 4px 6px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.cm-t td { padding: 6px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.cm-t .num { text-align: right; font-variant-numeric: tabular-nums; }
.cm-t tbody tr:hover { background: var(--surface-2); }
.cm-t i.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: middle; }
/* Harcamasız günler takvimi */
.ns-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.ns-cal b { font-size: 11px; color: var(--faint); text-align: center; font-weight: 600; }
.ns-cal i { font-style: normal; text-align: center; font-size: 11.5px; padding: 5px 0; border-radius: 6px; color: var(--muted); }
.ns-cal i.ok { background: color-mix(in srgb, var(--income) 30%, var(--surface-2)); color: var(--text); font-weight: 700; }
.ns-cal i.sp { background: var(--surface-2); }
.ns-cal i.fu { opacity: .35; }
/* Saat × gün ısı haritası */
.hh-grid { display: grid; grid-template-columns: 34px repeat(24, minmax(14px, 1fr)); gap: 3px; min-width: 520px; align-items: center; }
.hh-grid b { font-size: 10.5px; color: var(--faint); font-weight: 600; text-align: center; }
.hh-grid i { aspect-ratio: 1; border-radius: 4px; display: block; }
/* Yıllık özet kutuları */
.yr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.yr-tile { border-radius: 18px; padding: 18px; color: #fff; min-height: 150px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow); }
.yr-e { font-size: 28px; }
.yr-t { font-size: 13px; opacity: .9; font-weight: 600; }
.yr-b { font-size: 26px; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.yr-s { font-size: 12.5px; opacity: .9; margin-top: auto; }
