/* ==========================================================================
   ALTUN HOLDİNG — Kişisel Hesap Defteri
   Tema: kırık beyaz zemin · yeşil butonlar · siyah yazı · Poppins
   ========================================================================== */

:root {
  --bg: #F6F3EC;
  --bg-2: #EFEBE1;
  --surface: #FFFFFF;
  --surface-2: #FBFAF6;
  --line: #E7E2D6;
  --line-2: #D8D2C3;
  --ink: #111111;
  --ink-2: #393731;
  --ink-3: #75716A;
  --ink-4: #A29E94;

  --green: #15803D;
  --green-d: #116A32;
  --green-dd: #0C5226;
  --green-l: #16A34A;
  --green-50: #EBF6EF;
  --green-100: #D3EDDB;

  --red: #C53030;
  --red-50: #FCEEEE;
  --amber: #B45309;
  --amber-50: #FDF3E4;
  --blue: #1D4ED8;
  --blue-50: #EBF0FD;
  --gold: #A16207;
  --gold-50: #FBF4DE;

  --r-lg: 22px;
  --r: 18px;
  --r-sm: 12px;
  --r-xs: 9px;

  --sh-sm: 0 1px 2px rgba(17, 17, 17, .05);
  --sh: 0 1px 2px rgba(17, 17, 17, .04), 0 12px 32px -18px rgba(17, 17, 17, .16);
  --sh-lg: 0 24px 60px -24px rgba(17, 17, 17, .35);

  --side-w: 272px;
  --top-h: 72px;
  --bottom-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);

  color-scheme: light;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
  min-height: 100vh;
  min-height: 100dvh;
}
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; color: var(--ink); }
p { margin: 0 0 .75rem; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-d); }
b, strong { font-weight: 700; }
small { font-size: .82em; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid rgba(21, 128, 61, .45); outline-offset: 2px; border-radius: 8px; }
::selection { background: var(--green-100); color: var(--ink); }
[hidden] { display: none !important; }

.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; display: inline-block; vertical-align: middle; }

.skip-link { position: absolute; left: -999px; top: 8px; z-index: 999; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 10px; }
.skip-link:focus { left: 8px; color: #fff; }

/* utilities */
.muted { color: var(--ink-3); }
.muted-i { color: var(--ink-4); font-style: italic; }
.small { font-size: .85rem; }
.ta-r { text-align: right; }
.ta-c { text-align: center; }
.nowrap { white-space: nowrap; }
.d-block { display: block; }
.ml-auto { margin-left: auto; }
.c-green { color: var(--green) !important; }
.c-red { color: var(--red) !important; }
.c-amber { color: var(--amber) !important; }
.c-blue { color: var(--blue) !important; }

/* ------------------------------------------------------------------ shell */
.shell { min-height: 100vh; }
.sidebar { display: none; }
.main { min-width: 0; padding-bottom: calc(var(--bottom-h) + var(--safe-b) + 24px); }

.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
  padding: calc(12px + var(--safe-t)) 16px 12px;
  background: rgba(246, 243, 236, .88);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-title h1 { font-size: 1.2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.subtitle { margin: 2px 0 0; font-size: .8rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70vw; }
.brand-mini img { border-radius: 10px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.clock { display: none; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.clock .ic { width: 16px; height: 16px; color: var(--green); }

.content { padding: 16px; max-width: 1320px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }

/* month nav */
.month-nav { display: flex; align-items: center; gap: 6px; }
.month-label { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: .92rem; cursor: pointer; white-space: nowrap; }
.month-label .ic { width: 17px; height: 17px; color: var(--green); }
.month-label input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; border: 0; }

/* ------------------------------------------------------------------ buttons */
.btn {
  --b-bg: var(--surface); --b-fg: var(--ink); --b-bd: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px;
  border-radius: 14px; border: 1.5px solid var(--b-bd);
  background: var(--b-bg); color: var(--b-fg);
  font-weight: 600; font-size: .95rem; line-height: 1.1; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .08s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:hover { color: var(--b-fg); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn .ic { width: 19px; height: 19px; }
.btn-primary { --b-bg: var(--green); --b-fg: #fff; --b-bd: var(--green); box-shadow: 0 6px 16px -8px rgba(21, 128, 61, .7); }
.btn-primary:hover { --b-bg: var(--green-d); --b-bd: var(--green-d); }
.btn-dark { --b-bg: var(--ink); --b-fg: #fff; --b-bd: var(--ink); }
.btn-dark:hover { --b-bg: #2a2a2a; }
.btn-light { --b-bg: var(--surface); }
.btn-light:hover { --b-bg: var(--surface-2); --b-bd: var(--ink-4); }
.btn-ghost { --b-bg: transparent; --b-bd: transparent; --b-fg: var(--ink-2); }
.btn-ghost:hover { --b-bg: var(--bg-2); }
.btn-green-soft { --b-bg: var(--green-50); --b-fg: var(--green-dd); --b-bd: var(--green-100); }
.btn-green-soft:hover { --b-bg: var(--green-100); }
.btn-blue-soft { --b-bg: var(--blue-50); --b-fg: var(--blue); --b-bd: #D3DEFB; }
.btn-danger { --b-bg: var(--red); --b-fg: #fff; --b-bd: var(--red); }
.btn-danger:hover { --b-bg: #A82828; }
.btn-danger-soft { --b-bg: var(--red-50); --b-fg: var(--red); --b-bd: #F5D5D5; }
.btn-danger-soft:hover { --b-bg: #F9DFDF; }
.btn-sm { min-height: 36px; padding: 7px 13px; font-size: .86rem; border-radius: 11px; }
.btn-sm .ic { width: 16px; height: 16px; }
.btn-lg { min-height: 52px; padding: 13px 24px; font-size: 1rem; border-radius: 16px; }
.btn-block { display: flex; width: 100%; }
.btn[disabled], .btn.is-loading { opacity: .65; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-2); transition: background .15s, border-color .15s; flex: none; }
.icon-btn:hover { background: var(--surface-2); border-color: var(--line-2); color: var(--ink); }
.icon-btn .ic { width: 19px; height: 19px; }

.link { font-weight: 600; font-size: .88rem; color: var(--green); display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; padding: 0; }
.link .ic { width: 15px; height: 15px; }
.link-danger { color: var(--red); }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--surface); font-size: .82rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.chip:hover { border-color: var(--ink-4); color: var(--ink); }
.chip-green { background: var(--green); border-color: var(--green); color: #fff; }
.chip-green:hover { color: #fff; background: var(--green-d); }

.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .72rem; font-weight: 700; line-height: 1.6; vertical-align: middle; white-space: nowrap; background: var(--bg-2); color: var(--ink-2); }
.pill .ic { width: 12px; height: 12px; stroke-width: 2.5; }
.pill-green { background: var(--green-50); color: var(--green-dd); }
.pill-red { background: var(--red-50); color: var(--red); }
.pill-amber { background: var(--amber-50); color: var(--amber); }
.pill-blue { background: var(--blue-50); color: var(--blue); }
.pill-gray { background: var(--bg-2); color: var(--ink-3); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.badge .ic { width: 15px; height: 15px; }
.badge-green { background: var(--green-50); color: var(--green-dd); }

/* ------------------------------------------------------------------ cards & grid */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); padding: 18px; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2 { font-size: 1.02rem; display: flex; align-items: center; gap: 9px; }
.card-head h2 .ic { width: 19px; height: 19px; color: var(--green); }
.grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.narrow { max-width: 760px; width: 100%; margin: 0 auto; }

.section-head { display: flex; align-items: center; justify-content: space-between; margin: 6px 2px 12px; }
.section-head h2 { font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.section-head h2 .ic { color: var(--green); }
.section-sum { font-weight: 700; }

.page-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ------------------------------------------------------------------ stats */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stat {
  --accent: var(--green); --accent-bg: var(--green-50);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh);
  color: var(--ink); transition: transform .15s, box-shadow .15s, border-color .15s; min-width: 0;
}
a.stat:hover { transform: translateY(-2px); box-shadow: var(--sh-lg); border-color: var(--line-2); color: var(--ink); }
.stat::after { content: ""; position: absolute; inset: auto -30px -40px auto; width: 110px; height: 110px; border-radius: 50%; background: var(--accent-bg); opacity: .8; z-index: 0; }
.stat > * { position: relative; z-index: 1; }
.stat-ico { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--accent-bg); color: var(--accent); margin-bottom: 6px; }
.stat-ico .ic { width: 21px; height: 21px; stroke-width: 2.3; }
.stat-label { font-size: .82rem; font-weight: 600; color: var(--ink-2); display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.stat-label small { color: var(--ink-4); font-weight: 600; }
.stat-value { font-size: 1.28rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; color: var(--accent); word-break: break-word; }
.stat-sub { font-size: .78rem; color: var(--ink-3); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.stat-note { font-size: .72rem; color: var(--ink-3); font-style: italic; }
.stat-gelir { --accent: var(--green); --accent-bg: var(--green-50); }
.stat-gider { --accent: var(--red); --accent-bg: var(--red-50); }
.stat-alacak { --accent: var(--blue); --accent-bg: var(--blue-50); }
.stat-borc { --accent: var(--amber); --accent-bg: var(--amber-50); }
.stat-gold { --accent: var(--gold); --accent-bg: var(--gold-50); }
.stat-net, .stat-plain { --accent: var(--ink); --accent-bg: var(--bg-2); }
.stat-net .stat-value { color: inherit; }

.trend { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; font-size: .74rem; padding: 1px 7px; border-radius: 999px; }
.trend .ic { width: 13px; height: 13px; stroke-width: 2.6; }
.trend-good { background: var(--green-50); color: var(--green-dd); }
.trend-bad { background: var(--red-50); color: var(--red); }

/* hero */
.hero { display: grid; gap: 18px; background: linear-gradient(135deg, #0F5F2E 0%, var(--green) 55%, #1E9A4D 100%); color: #fff; border: 0; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255, 255, 255, .07); }
.hero::after { content: ""; position: absolute; right: 90px; bottom: -120px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255, 255, 255, .05); }
.hero > * { position: relative; z-index: 1; }
.hero-main { display: flex; flex-direction: column; gap: 6px; }
.hero-label { font-size: .85rem; font-weight: 600; opacity: .85; }
.hero-value { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.hero-value.is-neg { color: #FFD7D7; }
.hero-bar { height: 10px; border-radius: 99px; background: rgba(255, 255, 255, .2); overflow: hidden; margin-top: 6px; }
.hero-bar span { display: block; height: 100%; border-radius: inherit; background: #fff; transition: width .6s ease; }
.hero-bar span.is-hot { background: #FFC9C9; }
.hero-hint { font-size: .85rem; opacity: .9; }
.hero-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.hero-metrics > div { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; min-width: 0; }
.hero-metrics span { font-size: .74rem; opacity: .85; display: flex; align-items: center; gap: 4px; }
.hero-metrics span .ic { width: 13px; height: 13px; }
.hero-metrics b { font-size: .98rem; word-break: break-word; }
.hero-net { background: rgba(255, 255, 255, .18) !important; }

/* summary strip */
.summary-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); overflow: hidden; }
.summary-strip > div { padding: 13px 16px; display: flex; flex-direction: column; gap: 2px; border-bottom: 1px solid var(--line); min-width: 0; }
.summary-strip > div:nth-child(odd) { border-right: 1px solid var(--line); }
.summary-strip span { font-size: .76rem; color: var(--ink-3); font-weight: 600; }
.summary-strip b { font-size: 1.05rem; word-break: break-word; }

.total-banner { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.total-banner > div { display: flex; flex-direction: column; }
.big-num { font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; display: block; }

/* ------------------------------------------------------------------ charts */
.legend { display: flex; gap: 12px; font-size: .78rem; color: var(--ink-3); font-weight: 600; }
.lg { display: inline-flex; align-items: center; gap: 6px; }
.lg::before { content: ""; width: 10px; height: 10px; border-radius: 3px; }
.lg-in::before { background: var(--green-l); }
.lg-out::before { background: #E05A5A; }

.daychart { display: flex; align-items: stretch; gap: 2px; height: 190px; padding-top: 6px; }
.dc-col { flex: 1; display: flex; flex-direction: column; min-width: 0; border-radius: 6px; }
.dc-col:hover { background: var(--surface-2); }
.dc-col.is-today { background: var(--green-50); }
.dc-bars { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 1px; padding: 0 1px; }
.dc-bars span, .yc-bars span { display: block; width: 50%; max-width: 9px; border-radius: 4px 4px 1px 1px; min-height: 0; transition: height .5s ease; }
.dc-in { background: var(--green-l); }
.dc-out { background: #E05A5A; }
.dc-day { font-size: .62rem; text-align: center; color: var(--ink-4); height: 18px; line-height: 18px; font-weight: 600; }
.dc-col.is-today .dc-day { color: var(--green); font-weight: 800; }

.yearchart { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; height: 220px; }
.yc-col { display: flex; flex-direction: column; border-radius: 8px; color: var(--ink-3); }
.yc-col:hover { background: var(--surface-2); color: var(--ink); }
.yc-bars { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 2px; padding: 0 2px; }
.yc-bars span { max-width: 16px; }
.yc-label { text-align: center; font-size: .72rem; font-weight: 600; padding: 4px 0; }

.mini-bars { display: flex; flex-direction: column; gap: 3px; }
.mini-bars span { height: 6px; border-radius: 4px; display: block; }
.mb-in { background: var(--green-l); }
.mb-out { background: #E05A5A; }

.cat-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 13px; }
.cat-bar-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.cat-name { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: .9rem; min-width: 0; }
.cat-emoji { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; background: color-mix(in srgb, var(--c) 14%, white); font-size: 15px; flex: none; }
.cat-val { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.cat-val b { font-size: .92rem; }
.cat-val small { color: var(--ink-3); font-weight: 600; }
.bar { display: block; height: 8px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: inherit; background: var(--c, var(--green)); transition: width .6s ease; }
.bar-lg { height: 10px; }
.dot-ico { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-in { background: var(--green-l); }
.dot-out { background: #E05A5A; }

/* ------------------------------------------------------------------ lists */
.tx-list { display: flex; flex-direction: column; }
.tx { display: flex; align-items: center; gap: 12px; padding: 11px 8px; margin: 0 -8px; border-radius: 13px; color: var(--ink); min-width: 0; }
.tx + .tx { border-top: 1px solid var(--line); }
.tx:hover { background: var(--surface-2); color: var(--ink); }
.tx-ico { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 14px; font-size: 19px; background: color-mix(in srgb, var(--c, #8A877D) 14%, white); color: var(--c, var(--ink-2)); }
.tx-ico-transfer { background: var(--bg-2); color: var(--ink-2); }
.tx-ico .ic { width: 19px; height: 19px; }
.tx-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.tx-title { font-weight: 700; font-size: .93rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; line-height: 1.35; }
.tx-meta { font-size: .76rem; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.tx-meta .dot { color: var(--ink-4); }
.tx-desc { font-size: .78rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-amt { font-weight: 800; font-size: .95rem; white-space: nowrap; text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.tx-amt small { font-weight: 600; color: var(--ink-3); font-size: .72rem; }
.amt-in { color: var(--green); }
.amt-out { color: var(--red); }
.amt-transfer { color: var(--ink-2); }
.amt-muted { opacity: .55; }

.tx-sel { display: flex; align-items: center; gap: 2px; }
.tx-sel + .tx-sel { border-top: 1px solid var(--line); }
.tx-sel > .tx { flex: 1; min-width: 0; }
.tx-check { display: none; padding: 10px 6px 10px 0; cursor: pointer; }
.tx-check input { width: 22px; height: 22px; margin: 0; accent-color: var(--red); cursor: pointer; }
body.select-mode .tx-check { display: block; }
body.select-mode .tx-sel > .tx { cursor: pointer; }
body.select-mode .tx-sel:has(input:checked) > .tx { background: var(--red-50); }
.bulk-bar { position: fixed; left: 12px; right: 12px; bottom: calc(var(--bottom-h) + var(--safe-b) + 10px); z-index: 65; display: flex; align-items: center; gap: 10px; max-width: 560px; margin: 0 auto; padding: 10px 12px 10px 16px; border-radius: 18px; background: var(--ink); color: #fff; box-shadow: var(--sh-lg); animation: toastIn .25s ease; }
.bulk-bar .check { color: #fff; font-weight: 700; }
.bulk-bar .check input { accent-color: var(--red); }
.bulk-count { flex: 1; font-weight: 600; font-size: .88rem; opacity: .85; }
.bulk-bar .btn-ghost { --b-fg: #fff; }
.bulk-bar .btn-ghost:hover { --b-bg: rgba(255, 255, 255, .12); }
.bulk-bar .btn[disabled] { opacity: .45; }
body.select-mode .install-banner { display: none !important; }

.day-group { padding: 6px 18px 8px; }
.day-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0 6px; border-bottom: 1px solid var(--line); margin-bottom: 2px; }
.day-head h3 { font-size: .86rem; color: var(--ink-2); }
.day-totals { display: flex; gap: 10px; font-size: .82rem; font-weight: 700; }

.acc-list, .due-list, .hold-mini, .cat-list, .device-list, .log-list { list-style: none; margin: 0; padding: 0; }
.acc-list li + li, .due-list li + li, .hold-mini li + li, .cat-list li + li { border-top: 1px solid var(--line); }
.acc-list a { display: flex; align-items: center; gap: 12px; padding: 10px 2px; color: var(--ink); }
.acc-list a:hover .acc-name b { color: var(--green); }
.acc-ico { width: 40px; height: 40px; flex: none; border-radius: 13px; display: grid; place-items: center; background: color-mix(in srgb, var(--c, var(--green)) 13%, white); color: var(--c, var(--green)); }
.acc-ico .ic { width: 20px; height: 20px; }
.acc-ico-lg { width: 56px; height: 56px; border-radius: 18px; }
.acc-ico-lg .ic { width: 26px; height: 26px; }
.acc-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.acc-name b { font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-name small { color: var(--ink-3); font-size: .76rem; }
.acc-bal { font-weight: 800; white-space: nowrap; text-align: right; display: flex; flex-direction: column; font-size: .93rem; }
.acc-bal small { color: var(--ink-3); font-weight: 600; font-size: .72rem; }
.acc-bal.is-neg { color: var(--red); }

.due-list a { display: flex; align-items: center; gap: 12px; padding: 10px 2px; color: var(--ink); }
.due-badge { width: 46px; flex: none; border-radius: 12px; background: var(--bg-2); display: flex; flex-direction: column; align-items: center; padding: 5px 0; line-height: 1.1; }
.due-badge b { font-size: 1.05rem; }
.due-badge small { font-size: .66rem; font-weight: 700; text-transform: uppercase; color: var(--ink-3); }
.due-badge.is-soon { background: var(--amber-50); color: var(--amber); }
.due-badge.is-late { background: var(--red-50); color: var(--red); }
.due-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.due-main small { color: var(--ink-3); }
.due-amt { font-weight: 800; white-space: nowrap; }

.hold-mini li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; }
.hold-mini span { display: flex; flex-direction: column; min-width: 0; }
.hold-mini small { color: var(--ink-3); }

.empty { text-align: center; padding: 26px 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty-ico { width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center; background: var(--green-50); color: var(--green); margin-bottom: 6px; }
.empty-ico .ic { width: 30px; height: 30px; }
.empty h3 { font-size: 1.05rem; }
.empty p { color: var(--ink-3); max-width: 380px; font-size: .9rem; }
.empty-mini { padding: 18px 12px; text-align: center; color: var(--ink-3); font-size: .88rem; background: var(--surface-2); border: 1.5px dashed var(--line-2); border-radius: 14px; }

/* ------------------------------------------------------------------ forms */
.form { display: flex; flex-direction: column; gap: 14px; }
.form-card { display: flex; flex-direction: column; gap: 18px; padding: 20px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > label, .label-row label { font-size: .86rem; font-weight: 700; color: var(--ink); }
.label-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.opt { font-weight: 500; color: var(--ink-4); font-size: .78rem; }
.hint { color: var(--ink-3); font-size: .78rem; line-height: 1.45; margin: 0; }
.form-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }

input[type=text], input[type=password], input[type=search], input[type=tel], input[type=email], input[type=date], input[type=datetime-local], input[type=number], select, textarea {
  width: 100%; min-height: 48px; padding: 11px 14px;
  border: 1.5px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface);
  font-weight: 500; font-size: 1rem; color: var(--ink);
  transition: border-color .15s, box-shadow .15s, background .15s;
  -webkit-appearance: none; appearance: none;
}
textarea { min-height: 76px; resize: vertical; line-height: 1.5; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px; cursor: pointer; }
input::placeholder, textarea::placeholder { color: var(--ink-4); font-weight: 500; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-4); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px rgba(21, 128, 61, .14); }
input:disabled, select:disabled { background: var(--bg-2); color: var(--ink-3); cursor: not-allowed; }

.input-icon { position: relative; display: flex; align-items: center; }
.input-icon > .ic { position: absolute; left: 14px; width: 19px; height: 19px; color: var(--ink-3); pointer-events: none; }
.input-icon input { padding-left: 44px; }
.pw-toggle { position: absolute; right: 6px; width: 38px; height: 38px; border: 0; background: transparent; color: var(--ink-3); border-radius: 10px; display: grid; place-items: center; }
.pw-toggle:hover { background: var(--bg-2); color: var(--ink); }
.input-icon input[type=password], .input-icon input[data-pw-shown] { padding-right: 48px; }
.pw-meter { height: 5px; border-radius: 9px; background: var(--bg-2); overflow: hidden; }
.pw-meter span { display: block; height: 100%; width: 0; background: var(--red); transition: width .25s, background .25s; }

.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: .9rem; font-weight: 500; color: var(--ink-2); }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--green); flex: none; }

.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; font-size: .86rem; color: var(--green); }
.switch input { position: relative; width: 40px; height: 24px; border-radius: 99px; background: var(--line-2); -webkit-appearance: none; appearance: none; margin: 0; cursor: pointer; transition: background .2s; flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch input:checked { background: var(--green); }
.switch input:checked::after { transform: translateX(16px); }

/* amount input */
.amount-field { display: flex; flex-direction: column; gap: 6px; }
.amount-field label { font-size: .86rem; font-weight: 700; }
.amount-input { position: relative; display: flex; align-items: center; }
.amount-input input { min-height: 64px; font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; padding-right: 64px; border-radius: 16px; }
.amount-input .amount-sym { position: absolute; right: 18px; font-weight: 800; font-size: 1.15rem; color: var(--ink-3); pointer-events: none; }
.amount-input-sm input { min-height: 50px; font-size: 1.08rem; font-weight: 700; padding-right: 56px; border-radius: var(--r-sm); }
.amount-input-sm .amount-sym { font-size: .95rem; right: 14px; }

/* segmented */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--bg-2); border-radius: 16px; }
.seg-item { position: relative; cursor: pointer; }
.seg-item input { position: absolute; opacity: 0; pointer-events: none; }
.seg-item span { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 8px 10px; border-radius: 12px; font-weight: 700; font-size: .92rem; color: var(--ink-3); transition: background .15s, color .15s, box-shadow .15s; white-space: nowrap; }
.seg-item span .ic { width: 18px; height: 18px; }
.seg-item:hover span { color: var(--ink); }
.seg-item input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--sh-sm), 0 2px 8px -4px rgba(0,0,0,.15); }
.seg-item input:focus-visible + span { outline: 3px solid rgba(21, 128, 61, .45); }
.seg-gider input:checked + span { color: var(--red); }
.seg-gelir input:checked + span { color: var(--green); }
.seg-transfer input:checked + span { color: var(--ink); }
.seg-type { position: sticky; top: calc(var(--top-h) + var(--safe-t) - 4px); z-index: 5; }
.seg-sm .seg-item span { min-height: 38px; font-size: .84rem; }

/* category chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-radio { cursor: pointer; position: relative; }
.chip-radio input { position: absolute; opacity: 0; pointer-events: none; }
.chip-radio span { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px 8px 9px; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--surface); font-weight: 600; font-size: .88rem; transition: all .15s; }
.chip-radio span i { font-style: normal; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, white); font-size: 14px; }
.chip-radio:hover span { border-color: var(--c); }
.chip-radio input:checked + span { border-color: var(--c); background: color-mix(in srgb, var(--c) 10%, white); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 18%, transparent); color: var(--ink); }
.chip-radio input:focus-visible + span { outline: 3px solid rgba(21, 128, 61, .45); }

/* date box */
.date-box { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px 12px; padding: 12px 14px; background: var(--green-50); border: 1px solid var(--green-100); border-radius: 14px; }
.date-auto { display: flex; align-items: center; gap: 10px; min-width: 0; }
.date-auto > .ic { color: var(--green); width: 22px; height: 22px; }
.date-auto div { display: flex; flex-direction: column; min-width: 0; }
.date-auto b { font-size: .84rem; }
.date-auto span { font-size: .8rem; color: var(--ink-2); }
.date-custom { grid-column: 1 / -1; }
.date-box-sm { padding: 10px 12px; }

.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sticky-actions { position: sticky; bottom: calc(var(--bottom-h) + var(--safe-b) + 8px); z-index: 20; padding: 10px; margin: 0 -4px; background: rgba(246, 243, 236, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: 18px; border: 1px solid var(--line); }
.sticky-actions .btn-primary { flex: 1; }
.tx-form { width: 100%; max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.tx-form + .danger-zone { width: 100%; max-width: 900px; margin: 0 auto; }

.danger-zone { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border: 1.5px dashed #EBC7C7; border-radius: 16px; background: #FFFBFA; }
.pay-box { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); }
.rest-box { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 14px; background: var(--amber-50); border: 1px solid #F1D9B5; }
.rest-title { margin: 0; display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--amber); font-size: .88rem; }
.rest-title .ic { width: 18px; height: 18px; }
.danger-zone form { margin: 0; }
.danger-card { border-color: #EBC7C7; }
.danger-card .card-head h2 .ic { color: var(--red); }
.dz-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 260px; }
.dz-text b { font-size: .92rem; }
.dz-options { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.dz-option { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--surface); cursor: pointer; font-size: .88rem; }
.dz-option:has(input:checked) { border-color: var(--red); background: #FFF6F6; }
.dz-option input[type=radio] { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--red); flex: none; }
.dz-option b { display: block; }
.dz-option small { color: var(--ink-3); }
.dz-option select { margin-top: 8px; min-height: 42px; }
.note-box { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-size: .86rem; margin: 0; }
.note-box > .ic { color: var(--green); margin-top: 2px; }

/* account form */
.kind-grid, .dir-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.kind-card, .dir-card, .mode-card { cursor: pointer; position: relative; }
.kind-card input, .dir-card input, .mode-card input { position: absolute; opacity: 0; pointer-events: none; }
.kind-card span, .dir-card span { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; border-radius: 16px; border: 1.5px solid var(--line-2); background: var(--surface); transition: all .15s; height: 100%; }
.kind-card span .ic, .dir-card span .ic { width: 24px; height: 24px; color: var(--ink-3); }
.kind-card b, .dir-card b { font-size: .92rem; }
.dir-card small { color: var(--ink-3); font-size: .78rem; line-height: 1.35; }
.kind-card:hover span, .dir-card:hover span { border-color: var(--ink-4); }
.kind-card input:checked + span { border-color: var(--green); background: var(--green-50); box-shadow: 0 0 0 3px rgba(21, 128, 61, .14); }
.kind-card input:checked + span .ic { color: var(--green); }
.dir-borc input:checked + span { border-color: var(--amber); background: var(--amber-50); box-shadow: 0 0 0 3px rgba(180, 83, 9, .14); }
.dir-borc input:checked + span .ic { color: var(--amber); }
.dir-alacak input:checked + span { border-color: var(--blue); background: var(--blue-50); box-shadow: 0 0 0 3px rgba(29, 78, 216, .14); }
.dir-alacak input:checked + span .ic { color: var(--blue); }
.dir-card input:disabled + span, .mode-card input:disabled + span { cursor: not-allowed; opacity: .75; }

.mode-grid { display: grid; gap: 10px; }
.mode-card > span { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 16px; border: 1.5px solid var(--line-2); background: var(--surface); transition: all .15s; }
.mode-card b { display: flex; align-items: center; gap: 8px; font-size: .92rem; }
.mode-card b .ic { color: var(--ink-3); width: 20px; height: 20px; }
.mode-card small { color: var(--ink-3); font-size: .8rem; line-height: 1.45; }
.mode-card:hover > span { border-color: var(--ink-4); }
.mode-card input:checked + span { border-color: var(--green); background: var(--green-50); box-shadow: 0 0 0 3px rgba(21, 128, 61, .14); }
.mode-card input:checked + span b .ic { color: var(--green); }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { cursor: pointer; position: relative; }
.swatch input { position: absolute; opacity: 0; }
.swatch span { display: block; width: 34px; height: 34px; border-radius: 50%; background: var(--c); border: 3px solid var(--surface); box-shadow: 0 0 0 1.5px var(--line-2); transition: box-shadow .15s, transform .15s; }
.swatch input:checked + span { box-shadow: 0 0 0 3px var(--c); transform: scale(1.06); }
.swatch input:focus-visible + span { outline: 3px solid rgba(21, 128, 61, .45); outline-offset: 3px; }
.swatches-sm { gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); margin-top: 10px; }
.swatch-btn { width: 26px; height: 26px; border-radius: 50%; background: var(--c); border: 2px solid var(--surface); box-shadow: 0 0 0 1.5px var(--line-2); padding: 0; }
.swatch-btn.is-active { box-shadow: 0 0 0 3px var(--c); }

/* ------------------------------------------------------------------ filters */
.filters { display: flex; flex-direction: column; gap: 12px; padding: 14px; }
.filters-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.filters-row .search { grid-column: 1 / -1; }
.filters-row .btn { min-height: 48px; }
.filters-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.filters-grid .field label { font-size: .78rem; color: var(--ink-3); }
.filters-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.filters-inline { flex-direction: row; flex-wrap: wrap; align-items: flex-end; }
.filters-inline .field { width: 140px; }
.presets { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.presets::-webkit-scrollbar { display: none; }

.tabs { display: flex; gap: 4px; padding: 4px; background: var(--bg-2); border-radius: 14px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 11px; font-weight: 700; font-size: .88rem; color: var(--ink-3); white-space: nowrap; }
.tabs a .ic { width: 17px; height: 17px; }
.tabs a:hover { color: var(--ink); }
.tabs a.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--sh-sm), 0 2px 8px -4px rgba(0,0,0,.15); }
.tabs a.is-active .ic { color: var(--green); }
.tabs-sm a { padding: 7px 12px; font-size: .82rem; }
.tabs-lg a { padding: 11px 16px; }
.tabs-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }

/* ------------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th { text-align: left; font-size: .74rem; font-weight: 700; color: var(--ink-3); padding: 10px 10px; border-bottom: 1.5px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr[data-href] { cursor: pointer; }
.table tbody tr:hover td { background: var(--surface-2); }
.table th:first-child, .table td:first-child { padding-left: 2px; }
.table th:last-child, .table td:last-child { padding-right: 2px; }
.row-link { color: var(--ink); }
.matrix td, .matrix th { font-size: .8rem; padding: 8px 7px; }
.rates td { padding: 8px 6px; }

/* ------------------------------------------------------------------ accounts */
.acc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.acc-card { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 2px; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh); color: var(--ink); transition: transform .15s, box-shadow .15s; }
.acc-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c); }
.acc-card:hover { transform: translateY(-2px); box-shadow: var(--sh-lg); color: var(--ink); }
.acc-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.acc-card-cur { font-size: .72rem; font-weight: 700; color: var(--ink-3); background: var(--bg-2); padding: 3px 9px; border-radius: 99px; }
.acc-card-name { font-weight: 700; font-size: 1rem; }
.acc-card-sub { font-size: .78rem; color: var(--ink-3); }
.acc-card-bal { font-size: 1.35rem; font-weight: 800; margin-top: 8px; letter-spacing: -.02em; }
.acc-card-bal.is-neg { color: var(--red); }
.acc-card-try { font-size: .8rem; color: var(--ink-3); font-weight: 600; }
.acc-card-meta { font-size: .72rem; color: var(--ink-4); margin-top: 4px; }
.archived summary, .inactive-cats summary, .manual-rates summary, .install-help summary { cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: 8px; color: var(--ink-2); list-style: none; }
.archived summary::-webkit-details-marker, .inactive-cats summary::-webkit-details-marker, .manual-rates summary::-webkit-details-marker, .install-help summary::-webkit-details-marker { display: none; }
.archived[open] summary { margin-bottom: 10px; }

.acc-hero { --c: var(--green); display: flex; flex-direction: column; gap: 16px; padding: 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh); position: relative; overflow: hidden; }
.acc-hero::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--c); }
.acc-hero-main { display: flex; gap: 16px; align-items: flex-start; }
.acc-hero-main > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.acc-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.iban-copy { margin-top: 6px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; border: 1px dashed var(--line-2); background: var(--surface-2); font-size: .8rem; font-weight: 600; letter-spacing: .02em; color: var(--ink-2); width: fit-content; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iban-copy .ic { width: 15px; height: 15px; }
.iban-copy.is-copied { border-color: var(--green); color: var(--green); background: var(--green-50); }

/* ------------------------------------------------------------------ credit cards */
.card-fields { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 16px; background: var(--surface-2); border: 1px dashed var(--line-2); }
.card-fields-title { margin: 0; display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .9rem; }
.card-fields-title .ic { color: var(--green); }
.card-list { display: flex; flex-direction: column; gap: 16px; }
.cc-row { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.cc-link { display: block; color: inherit; }
.cc-info { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cc {
  --c: #15803D;
  position: relative; overflow: hidden; aspect-ratio: 1.586; max-width: 380px; width: 100%;
  display: flex; flex-direction: column; justify-content: space-between; gap: 6px;
  padding: 18px 20px; border-radius: 20px; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--c) 55%, #ffffff 0%) 0%, transparent 60%),
              linear-gradient(135deg, color-mix(in srgb, var(--c) 80%, #000) 0%, var(--c) 55%, color-mix(in srgb, var(--c) 70%, #fff) 130%);
  box-shadow: 0 18px 40px -22px color-mix(in srgb, var(--c) 90%, #000);
}
.cc::after { content: ""; position: absolute; right: -40px; bottom: -70px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.cc > * { position: relative; z-index: 1; }
.cc-top { display: flex; justify-content: space-between; align-items: center; }
.cc-bank { font-weight: 700; font-size: .85rem; opacity: .92; letter-spacing: .02em; }
.cc-chip { width: 38px; height: 28px; border-radius: 7px; background: linear-gradient(135deg, #F7E39A, #C9A43B); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.cc-name { font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; }
.cc-num { font-weight: 600; letter-spacing: .14em; font-size: .92rem; opacity: .9; }
.cc-bottom { display: flex; justify-content: space-between; gap: 10px; }
.cc-bottom small { display: block; font-size: .68rem; opacity: .8; font-weight: 600; }
.cc-bottom b { font-size: 1rem; }
.cc-bar { height: 5px; border-radius: 9px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.cc-bar span { display: block; height: 100%; background: #fff; border-radius: inherit; }
.cc-due { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--bg-2); font-size: .88rem; }
.cc-due-label { font-weight: 700; color: var(--ink-2); }
.cc-due.is-soon { background: var(--amber-50); }
.cc-due.is-soon .cc-due-label { color: var(--amber); }
.cc-due.is-late { background: var(--red-50); }
.cc-due.is-late .cc-due-label { color: var(--red); }
.cc-due.is-ok { background: var(--green-50); }
.cc-due.is-ok .cc-due-label { color: var(--green-dd); }
.cc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin: 0; }
.cc-grid dt { font-size: .74rem; color: var(--ink-3); font-weight: 600; }
.cc-grid dd { margin: 0; font-weight: 800; font-size: .98rem; }
.cc-hero { display: flex; flex-direction: column; gap: 14px; }
.pay-options { display: flex; flex-direction: column; gap: 8px; }
.pay-opt { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px 12px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--surface); cursor: pointer; }
.pay-opt input[type=radio] { width: 19px; height: 19px; margin: 0; accent-color: var(--green); }
.pay-opt span { display: flex; flex-direction: column; min-width: 0; }
.pay-opt span b { font-size: .9rem; }
.pay-opt span small { color: var(--ink-3); font-size: .76rem; }
.pay-opt strong { font-size: 1rem; white-space: nowrap; }
.pay-opt:has(input:checked) { border-color: var(--green); background: var(--green-50); box-shadow: 0 0 0 3px rgba(21, 128, 61, .12); }
.pay-opt.is-disabled { opacity: .5; cursor: not-allowed; }
.pay-other { grid-column: 2 / -1; }
.portion-list { list-style: none; margin: 0; padding: 0; }
.portion-list li + li { border-top: 1px solid var(--line); }
.portion-list a { display: flex; align-items: center; gap: 10px; padding: 9px 2px; color: var(--ink); }
.pr-date { font-size: .76rem; color: var(--ink-3); font-weight: 600; width: 74px; flex: none; }
.pr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pr-main b { font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-main small { font-size: .74rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-amt { font-weight: 800; white-space: nowrap; }
.portion-head { display: flex; justify-content: space-between; font-size: .86rem; color: var(--ink-2); margin: 12px 0 4px; padding-bottom: 6px; border-bottom: 1.5px solid var(--line); }
.portion-head:first-of-type { margin-top: 0; }

/* ------------------------------------------------------------------ categories */
.cat-add { position: relative; display: flex; gap: 8px; margin-bottom: 12px; }
.cat-add input[type=text] { flex: 1; min-width: 0; }
.emoji-btn { width: 48px; height: 48px; flex: none; border-radius: var(--r-sm); border: 1.5px solid var(--line-2); background: var(--surface); font-size: 22px; display: grid; place-items: center; }
.emoji-btn:hover { border-color: var(--ink-4); }
.emoji-pop { position: absolute; top: 54px; left: 0; z-index: 30; width: min(340px, 100%); padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--sh-lg); }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.emoji-grid button { aspect-ratio: 1; border: 0; background: transparent; border-radius: 10px; font-size: 20px; display: grid; place-items: center; padding: 0; }
.emoji-grid button:hover, .emoji-grid button.is-active { background: var(--green-50); }
.emoji-grid-inline { padding: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; }
.emoji-input { font-size: 1.3rem !important; }
.cat-list a { display: flex; align-items: center; gap: 12px; padding: 10px 2px; color: var(--ink); }
.cat-list a:hover .cat-info b { color: var(--green); }
.cat-badge { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 13px; background: color-mix(in srgb, var(--c) 14%, white); font-size: 19px; border: 1.5px solid color-mix(in srgb, var(--c) 30%, white); }
.cat-badge-lg { width: 64px; height: 64px; border-radius: 20px; font-size: 30px; }
.cat-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cat-info b { font-size: .92rem; }
.cat-info small { color: var(--ink-3); font-size: .76rem; }
.cat-total { font-weight: 800; white-space: nowrap; font-size: .92rem; }
.chev { width: 17px !important; height: 17px !important; color: var(--ink-4); }
.cat-list.is-muted { opacity: .75; }
.inactive-cats { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.inactive-cats summary { font-size: .85rem; color: var(--ink-3); }
.cat-preview { display: flex; gap: 14px; align-items: center; }
.cat-preview p { margin: 6px 0 0; }

/* ------------------------------------------------------------------ debts */
.debt-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.debt-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh); color: var(--ink); transition: transform .15s, box-shadow .15s; }
.debt-card:hover { transform: translateY(-2px); box-shadow: var(--sh-lg); color: var(--ink); }
.debt-card.is-borc .bar > span { background: var(--amber); }
.debt-card.is-alacak .bar > span { background: var(--blue); }
.debt-card.is-closed { opacity: .78; }
.debt-card.is-closed .bar > span { background: var(--green); }
.debt-top { display: flex; align-items: center; gap: 12px; }
.debt-person { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.debt-person b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.debt-person small { color: var(--ink-3); font-size: .76rem; }
.debt-amounts { display: flex; justify-content: space-between; gap: 10px; }
.debt-amounts span { display: flex; flex-direction: column; }
.debt-amounts small { font-size: .72rem; color: var(--ink-3); font-weight: 600; }
.debt-amounts b { font-size: 1.15rem; font-weight: 800; }
.debt-foot { display: flex; justify-content: space-between; font-size: .76rem; color: var(--ink-3); font-weight: 600; }

.avatar { width: 42px; height: 42px; flex: none; border-radius: 14px; display: grid; place-items: center; font-weight: 800; font-size: .95rem; background: var(--green-50); color: var(--green-dd); }
.avatar-amber { background: var(--amber-50); color: var(--amber); }
.avatar-blue { background: var(--blue-50); color: var(--blue); }
.avatar-lg { width: 60px; height: 60px; border-radius: 20px; font-size: 1.4rem; }

.debt-hero { display: flex; flex-direction: column; gap: 16px; padding: 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh); }
.debt-hero.is-borc .bar > span { background: var(--amber); }
.debt-hero.is-alacak .bar > span { background: var(--blue); }
.debt-hero-top { display: flex; gap: 14px; align-items: center; }
.debt-hero-top h2 { font-size: 1.35rem; margin-top: 4px; }
.debt-hero-top a { display: inline-flex; align-items: center; gap: 5px; font-size: .86rem; }
.debt-hero-top a .ic { width: 15px; height: 15px; }
.debt-hero-nums { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 10px; }
.debt-hero-nums > div { display: flex; flex-direction: column; min-width: 0; }
.debt-hero-nums span { font-size: .76rem; color: var(--ink-3); font-weight: 600; }
.debt-hero-nums b { font-size: 1rem; word-break: break-word; }
.debt-hero-nums .big-num { font-size: 1.5rem; }
.debt-info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin: 0; padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.debt-info dt { font-size: .72rem; color: var(--ink-3); font-weight: 600; }
.debt-info dd { margin: 0; font-weight: 600; font-size: .88rem; }
.debt-info .full { grid-column: 1 / -1; }
.debt-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-fill { display: flex; gap: 6px; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 6px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { position: relative; display: flex; gap: 14px; padding: 8px 0; }
.tl-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 3px solid var(--green); margin-top: 5px; flex: none; position: relative; z-index: 1; }
.timeline li.is-opening .tl-dot { border-color: var(--ink); }
.tl-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tl-row { display: flex; justify-content: space-between; gap: 10px; }
.tl-del { margin: 0; }
.tl-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px 16px; margin-top: 6px; }
.tl-edit { flex-basis: auto; }
.tl-edit[open] { flex-basis: 100%; order: 2; }
.tl-edit > summary { list-style: none; cursor: pointer; }
.tl-edit > summary::-webkit-details-marker { display: none; }
.tl-form { margin-top: 10px; padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); gap: 10px; }

/* ------------------------------------------------------------------ settings */
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.mini-stats div { padding: 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; }
.mini-stats b { font-size: 1.2rem; }
.mini-stats span { font-size: .74rem; color: var(--ink-3); }
.device-list { margin-bottom: 12px; }
.device-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.device-list li + li { border-top: 1px solid var(--line); }
.device-ico { width: 38px; height: 38px; border-radius: 12px; background: var(--bg-2); display: grid; place-items: center; flex: none; color: var(--ink-2); }
.device-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.device-info small { color: var(--ink-3); font-size: .76rem; }
.log-list li { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; }
.log-list li + li { border-top: 1px solid var(--line); }
.log-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green-l); margin-top: 8px; flex: none; }
.log-list li.is-bad .log-dot { background: var(--red); }
.log-list li.is-bad b { color: var(--red); }
.log-main { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: .88rem; }
.log-main small { color: var(--ink-3); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-meta { font-size: .76rem; color: var(--ink-3); text-align: right; display: flex; flex-direction: column; white-space: nowrap; }
.install-help { margin-top: 12px; font-size: .86rem; }
.install-help ul { margin: 10px 0 0; padding-left: 18px; color: var(--ink-2); display: flex; flex-direction: column; gap: 6px; }
.install-help .ic { width: 15px; height: 15px; display: inline; }
.manual-rates { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.manual-rates[open] summary { margin-bottom: 12px; }
.rate-row { display: grid; grid-template-columns: 1fr 96px 96px; gap: 6px; align-items: center; font-size: .82rem; font-weight: 600; }
.rate-row input { min-height: 38px; padding: 6px 9px; font-size: .86rem; }
.form-grid-tight { grid-template-columns: 1fr 1fr; gap: 10px; }

/* ------------------------------------------------------------------ quick actions / dropdown */
.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quick-item { --q: var(--green); --qb: var(--green-50); display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1.5px solid var(--line); color: var(--ink); transition: border-color .15s, transform .1s; }
.quick-item:hover { border-color: var(--q); color: var(--ink); }
.quick-item:active { transform: scale(.98); }
.q-ico { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--qb); color: var(--q); margin-bottom: 6px; }
.quick-item b { font-size: .95rem; }
.quick-item small { color: var(--ink-3); font-size: .76rem; }
.q-gider { --q: var(--red); --qb: var(--red-50); }
.q-transfer { --q: var(--ink); --qb: var(--bg-2); }
.q-borc { --q: var(--amber); --qb: var(--amber-50); }
.q-birikim { --q: var(--gold); --qb: var(--gold-50); }
.q-kart { --q: var(--blue); --qb: var(--blue-50); }

.dropdown { position: relative; }
.dropdown > summary { list-style: none; }
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown-menu { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 60; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--sh-lg); min-width: 300px; }

/* ------------------------------------------------------------------ bottom nav & sheets */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
  height: calc(var(--bottom-h) + var(--safe-b)); padding: 0 6px var(--safe-b);
  background: rgba(255, 255, 255, .94); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-top: 1px solid var(--line); box-shadow: 0 -8px 30px -18px rgba(0, 0, 0, .25);
}
.bottomnav > a, .bottomnav > button:not(.fab) { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: var(--bottom-h); border: 0; background: transparent; color: var(--ink-3); font-size: .7rem; font-weight: 700; -webkit-tap-highlight-color: transparent; }
.bottomnav .ic { width: 23px; height: 23px; }
.bottomnav .is-active { color: var(--green); }
.bottomnav .is-active .ic { stroke-width: 2.5; }
.fab { justify-self: center; align-self: center; width: 58px; height: 58px; margin-top: -26px; border-radius: 20px; border: 4px solid var(--bg); background: var(--green); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 24px -8px rgba(21, 128, 61, .8); transition: transform .15s, background .15s; }
.fab:active { transform: scale(.94); }
.fab .ic { width: 27px; height: 27px; stroke-width: 2.6; }

.sheet { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(17, 17, 17, .38); animation: fade .2s ease; }
.sheet-panel { position: relative; width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; background: var(--bg); border-radius: 26px 26px 0 0; padding: 10px 16px calc(18px + var(--safe-b)); box-shadow: var(--sh-lg); animation: up .26s cubic-bezier(.2, .9, .3, 1.1); }
.sheet-handle { width: 44px; height: 5px; border-radius: 9px; background: var(--line-2); margin: 2px auto 14px; }
.sheet-title { font-size: 1.05rem; margin-bottom: 14px; }
.sheet-user { display: flex; align-items: center; gap: 12px; padding: 6px 4px 14px; }
/* ana menü (kenar menü + mobil menü penceresi) */
.nav-menu { display: flex; flex-direction: column; gap: 2px; }
.nav-section { margin: 14px 12px 4px; font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-4); }
.nav-link, .nav-group > summary { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 13px; color: var(--ink-2); font-weight: 600; font-size: .93rem; cursor: pointer; list-style: none; transition: background .12s, color .12s; -webkit-tap-highlight-color: transparent; user-select: none; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-link:hover, .nav-group > summary:hover { background: var(--bg); color: var(--ink); }
.nav-ico { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 11px; background: var(--bg-2); color: var(--ink-2); }
.nav-ico .ic { width: 19px; height: 19px; stroke-width: 2.3; }
.nav-label { flex: 1; min-width: 0; }
.nav-chev { width: 17px !important; height: 17px !important; color: var(--ink-4); transition: transform .2s; }
.nav-group[open] > summary .nav-chev { transform: rotate(180deg); }
.nav-group[data-nav-active] > summary { color: var(--ink); font-weight: 700; }
.nav-link.is-current { background: var(--green-50); color: var(--green-dd); font-weight: 700; }
.nav-link.is-current .nav-ico { background: var(--green); color: #fff; }
.tone-red .nav-ico { background: var(--red-50); color: var(--red); }
.tone-green .nav-ico { background: var(--green-50); color: var(--green); }
.tone-amber .nav-ico { background: var(--amber-50); color: var(--amber); }
.tone-gold .nav-ico { background: var(--gold-50); color: var(--gold); }
.tone-ink .nav-ico { background: var(--blue-50); color: var(--blue); }
.nav-sub { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 8px 26px; padding-left: 12px; border-left: 2px solid var(--line); animation: fade .18s ease; }
.tone-red .nav-sub { border-color: #F2D2D2; }
.tone-green .nav-sub { border-color: var(--green-100); }
.nav-sub a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; font-size: .87rem; font-weight: 600; color: var(--ink-3); }
.nav-sub a .ic { width: 16px; height: 16px; }
.nav-sub a:hover { background: var(--bg); color: var(--ink); }
.nav-sub a.is-current { background: var(--bg-2); color: var(--ink); font-weight: 700; }
.tone-red .nav-sub a.is-current { background: var(--red-50); color: var(--red); }
.tone-green .nav-sub a.is-current { background: var(--green-50); color: var(--green-dd); }
.tone-amber .nav-sub a.is-current { background: var(--amber-50); color: var(--amber); }
.tone-gold .nav-sub a.is-current { background: var(--gold-50); color: var(--gold); }
.tone-ink .nav-sub a.is-current { background: var(--blue-50); color: var(--blue); }
.nav-sheet { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 4px 8px 8px; margin-bottom: 12px; }
.nav-sheet .nav-section:first-child { margin-top: 8px; }
.nav-sheet .nav-link, .nav-sheet .nav-group > summary { padding: 10px; font-size: .97rem; }
.nav-sheet .nav-sub a { padding: 11px 10px; font-size: .93rem; }
.sheet-extra:not(:has(button:not([hidden]))) { display: none; }

/* gider / gelir listesi üst kartı */
.type-hero { display: flex; align-items: center; gap: 16px; align-self: start; }
.type-hero-ico { width: 56px; height: 56px; flex: none; display: grid; place-items: center; border-radius: 18px; }
.type-hero-ico .ic { width: 28px; height: 28px; stroke-width: 2.4; }
.type-hero.is-gider .type-hero-ico { background: var(--red-50); color: var(--red); }
.type-hero.is-gelir .type-hero-ico { background: var(--green-50); color: var(--green); }
.type-hero.is-gider .big-num { color: var(--red); }
.type-hero.is-gelir .big-num { color: var(--green); }
.type-hero-main { display: flex; flex-direction: column; min-width: 0; }
.grid-narrow { max-width: 820px; }

.sheet-nav { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; margin-bottom: 12px; }
.sheet-nav > a, .sheet-nav > button { display: flex; align-items: center; gap: 14px; padding: 15px 16px; border: 0; background: transparent; color: var(--ink); font-weight: 600; text-align: left; width: 100%; }
.sheet-nav > a + a, .sheet-nav > button { border-top: 1px solid var(--line); }
.sheet-nav > a > .ic:first-child, .sheet-nav > button > .ic:first-child { color: var(--green); }
.sheet-nav span { flex: 1; }
.sheet-nav .is-active { background: var(--green-50); }
@keyframes up { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
body.sheet-open { overflow: hidden; }

.user-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.user-meta b { font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta small { color: var(--ink-3); font-size: .76rem; }

/* ------------------------------------------------------------------ toasts, modal, install */
.toasts { position: fixed; top: calc(12px + var(--safe-t)); left: 12px; right: 12px; z-index: 90; display: flex; flex-direction: column; gap: 8px; pointer-events: none; align-items: center; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; width: 100%; max-width: 460px; padding: 13px 12px 13px 14px; border-radius: 16px; background: var(--ink); color: #fff; box-shadow: var(--sh-lg); font-size: .9rem; animation: toastIn .3s cubic-bezier(.2, .9, .3, 1.2); }
.toast > .ic { margin-top: 1px; }
.toast span { flex: 1; }
.toast-success > .ic { color: #6EE7A0; }
.toast-error { background: #7F1D1D; }
.toast-error > .ic { color: #FCA5A5; }
.toast-info > .ic { color: #93C5FD; }
.toast-x { border: 0; background: transparent; color: rgba(255,255,255,.7); padding: 2px; border-radius: 8px; }
.toast-x:hover { color: #fff; }
.toast-x .ic { width: 17px; height: 17px; }
.toast.is-leaving { animation: toastOut .25s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px); } }

.modal { border: 0; padding: 0; background: transparent; max-width: 420px; width: calc(100% - 32px); }
.modal::backdrop { background: rgba(17, 17, 17, .45); }
.modal[open] { animation: toastIn .22s ease; }
.modal-card { background: var(--surface); border-radius: 24px; padding: 24px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; box-shadow: var(--sh-lg); }
.modal-icon { width: 56px; height: 56px; border-radius: 18px; background: var(--red-50); color: var(--red); display: grid; place-items: center; margin-bottom: 4px; }
.modal-icon .ic { width: 28px; height: 28px; }
.modal-card h3 { font-size: 1.15rem; }
.modal-card p { color: var(--ink-3); font-size: .9rem; margin: 0 0 8px; }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }

.install-banner { position: fixed; left: 12px; right: 12px; bottom: calc(var(--bottom-h) + var(--safe-b) + 12px); z-index: 70; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-lg); max-width: 520px; margin: 0 auto; animation: toastIn .35s ease; }
.install-banner img { border-radius: 12px; flex: none; }
.install-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.install-text b { font-size: .9rem; }
.install-text span { font-size: .78rem; color: var(--ink-3); }
.install-text span .ic { display: inline; width: 14px; height: 14px; }

/* ------------------------------------------------------------------ auth */
.auth-body { display: flex; min-height: 100vh; min-height: 100dvh; background: radial-gradient(1200px 600px at 10% -10%, #E3F1E7 0%, transparent 60%), radial-gradient(900px 500px at 110% 110%, #EFE6D3 0%, transparent 55%), var(--bg); }
.auth-wrap { width: 100%; max-width: 440px; margin: auto; padding: calc(28px + var(--safe-t)) 18px 28px; display: flex; flex-direction: column; gap: 16px; }
.auth-brand { display: flex; align-items: center; gap: 14px; justify-content: center; margin-bottom: 6px; }
.auth-brand img { border-radius: 16px; box-shadow: 0 10px 24px -10px rgba(21, 128, 61, .6); }
.auth-brand div { display: flex; flex-direction: column; line-height: 1.2; }
.auth-brand b { font-size: 1.45rem; font-weight: 800; letter-spacing: .01em; white-space: nowrap; }
.auth-brand span { font-size: .85rem; color: var(--ink-3); font-weight: 600; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--sh-lg); padding: 26px 22px; display: flex; flex-direction: column; gap: 6px; }
.auth-card h1 { font-size: 1.45rem; margin-top: 6px; }
.auth-card .form { margin-top: 14px; }
.auth-foot { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: .78rem; color: var(--ink-3); text-align: center; }
.auth-foot .ic { width: 15px; height: 15px; color: var(--green); }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; font-size: .9rem; font-weight: 600; }
.alert-error { background: var(--red-50); color: #8E2020; border: 1px solid #F3D0D0; }
.alert-success { background: var(--green-50); color: var(--green-dd); border: 1px solid var(--green-100); }
.alert-info { background: var(--blue-50); color: var(--blue); border: 1px solid #D3DEFB; }
.error-card { text-align: center; align-items: center; }
.error-code { font-size: 4rem; font-weight: 800; line-height: 1; color: var(--green); letter-spacing: -.04em; }
.error-card .btn { margin-top: 12px; }

/* ==================================================================
   Tablet (≥ 640px)
   ================================================================== */
@media (min-width: 640px) {
  .content { padding: 20px 22px; gap: 18px; }
  .topbar { padding-left: 22px; padding-right: 22px; }
  .stats { gap: 14px; }
  .stat { padding: 18px; }
  .stat-value { font-size: 1.45rem; }
  .stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .summary-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .summary-strip > div { border-bottom: 0; border-right: 1px solid var(--line); }
  .summary-strip > div:last-child { border-right: 0; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid-amount { grid-template-columns: 1.6fr 1fr; }
  .kind-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .mode-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filters-row { grid-template-columns: 1fr 1fr 1.4fr auto auto; }
  .filters-row .search { grid-column: auto; }
  .filters-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .quick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-1-1 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cc-row { grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); }
  .cc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1.1fr 1fr; align-items: center; padding: 22px 24px; }
  .hero-value { font-size: 2.3rem; }
  .acc-hero { flex-direction: row; justify-content: space-between; align-items: center; flex-wrap: wrap; }
  .toasts { left: auto; right: 20px; top: 20px; align-items: flex-end; }
  .install-banner { left: auto; right: 20px; }
  .clock { display: inline-flex; }
  .auth-card { padding: 32px 30px; }
}

/* ==================================================================
   Masaüstü (≥ 1024px): kenar menü
   ================================================================== */
@media (min-width: 1024px) {
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--side-w); z-index: 45;
    display: flex; flex-direction: column; gap: 18px;
    padding: 22px 16px 18px; background: var(--surface); border-right: 1px solid var(--line);
    overflow-y: auto;
  }
  .brand { display: flex; align-items: center; gap: 12px; padding: 2px 8px; color: var(--ink); }
  .brand:hover { color: var(--ink); }
  .brand img { border-radius: 13px; box-shadow: 0 8px 18px -10px rgba(21, 128, 61, .7); }
  .brand span { display: flex; flex-direction: column; line-height: 1.2; }
  .brand b { font-size: 1.06rem; font-weight: 800; letter-spacing: .01em; white-space: nowrap; }
  .brand small { font-size: .74rem; color: var(--ink-3); font-weight: 600; }
  .side-new .dropdown-menu { right: auto; width: 360px; }
  .side-new .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
  .side-install { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 13px; border: 1.5px dashed var(--green-100); background: var(--green-50); color: var(--green-dd); font-weight: 700; font-size: .88rem; }
  .side-install:hover { border-color: var(--green); }
  .user-chip { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 16px; background: var(--bg); border: 1px solid var(--line); }
  .user-chip .avatar { width: 38px; height: 38px; border-radius: 12px; font-size: .85rem; }
  .user-chip .icon-btn { width: 36px; height: 36px; }

  .main { margin-left: var(--side-w); padding-bottom: 32px; }
  .topbar { padding: 14px 28px; min-height: var(--top-h); }
  .topbar-title h1 { font-size: 1.4rem; }
  .brand-mini { display: none; }
  .subtitle { max-width: 520px; }
  .content { padding: 24px 28px 32px; gap: 20px; }
  .bottomnav, .sheet { display: none !important; }
  .sticky-actions { bottom: 16px; }
  .bulk-bar { left: calc(var(--side-w) + 24px); right: 24px; bottom: 20px; }
  .install-banner { bottom: 20px; }
  .seg-type { top: calc(var(--top-h) + 8px); }

  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat { padding: 20px; }
  .stat-value { font-size: 1.6rem; }
  .card { padding: 20px 22px; }
  .table-wrap { margin: 0 -22px; padding: 0 22px; }
  .grid-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
  .grid-1-1 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .day-group { padding: 6px 22px 8px; }
  .daychart { height: 220px; gap: 3px; }
  .filters-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .hero-metrics b { font-size: 1.08rem; }
  .debt-hero { padding: 24px; }
  .debt-info { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1280px) {
  .acc-cards { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
}

/* küçük telefonlar */
@media (max-width: 380px) {
  body { font-size: 14px; }
  .stat-value { font-size: 1.12rem; }
  .hero-metrics { grid-template-columns: 1fr 1fr; }
  .hero-net { grid-column: 1 / -1; }
  .seg-item span { font-size: .84rem; padding: 8px 6px; }
  .amount-input input { font-size: 1.6rem; }
  .debt-hero-nums { grid-template-columns: 1fr 1fr; }
  .debt-hero-nums > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 639px) {
  .hide-sm { display: none !important; }
  .hero-metrics { grid-template-columns: 1fr; gap: 6px; }
  .hero-metrics > div { flex-direction: row; justify-content: space-between; align-items: center; padding: 9px 12px; }
  .hero-net { grid-column: auto; }
  .hero-value { font-size: 1.85rem; }
  .tx-amt { font-size: .9rem; }
  .debt-hero-nums { grid-template-columns: 1fr 1fr; }
  .debt-hero-nums > div:first-child { grid-column: 1 / -1; }
  .debt-hero-nums b { white-space: nowrap; }
  .tx-desc { white-space: normal; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
  .topbar-actions:has(.month-nav) { width: 100%; }
  .month-nav { width: 100%; }
  .month-label { flex: 1; justify-content: center; }
  .page-actions .btn { flex: 1 1 auto; }
  .page-actions .ml-auto { margin-left: 0; }
  .rate-row { grid-template-columns: 1fr 80px 80px; }
}

/* yazdırma */
@media print {
  .sidebar, .bottomnav, .topbar-actions, .page-actions, .filters, .install-banner, .toasts, .form-actions, .danger-zone { display: none !important; }
  .main { margin: 0; padding: 0; }
  body { background: #fff; }
  .card, .stat { box-shadow: none; break-inside: avoid; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
