/* ───────── Tokens ───────── */
:root {
  --bg: #FFFFFF;
  --surface: #F6F5FA;
  --surface-2: #ECEAF4;
  --line: rgba(30, 17, 71, .08);
  --text: #1E1147;
  --muted: #9A97AD;
  --accent: #391FE0;
  --on-accent: #FFFFFF;
  --accent-ink: #391FE0;
  --card: #2F18C9;
  --nav: #150E45;
  --lime: #10FDE9;
  --on-lime: #04262B;
  --in: #1FAE6B;
  --out: #F04A5D;
  --out-soft: #FFE0E3;
  --warn: #F59E0B;
  --bubble: 0 6px 16px -6px rgba(30, 17, 71, .28);
  --shadow: 0 20px 34px -18px rgba(21, 14, 69, .55);
  --stage: #E7E6EA;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B0B14;
    --surface: #16162A;
    --surface-2: #22223C;
    --line: rgba(255, 255, 255, .09);
    --text: #F4F1FF;
    --muted: #9D95B8;
    --accent: #4B2BFF;
    --accent-ink: #A294FF;
    --card: #391FE0;
    --nav: #17134A;
    --in: #4ADE9A;
    --out: #FF7483;
    --out-soft: rgba(255, 116, 131, .18);
    --bubble: 0 0 0 1px rgba(255, 255, 255, .06);
    --shadow: 0 20px 34px -18px rgba(0, 0, 0, .8);
    --stage: #07040F;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B0B14;
  --surface: #16162A;
  --surface-2: #22223C;
  --line: rgba(255, 255, 255, .09);
  --text: #F4F1FF;
  --muted: #9D95B8;
  --accent: #4B2BFF;
  --accent-ink: #A294FF;
  --card: #391FE0;
  --nav: #17134A;
  --in: #4ADE9A;
  --out: #FF7483;
  --out-soft: rgba(255, 116, 131, .18);
  --bubble: 0 0 0 1px rgba(255, 255, 255, .06);
  --shadow: 0 20px 34px -18px rgba(0, 0, 0, .8);
  --stage: #07040F;
  color-scheme: dark;
}

/* ───────── Base ───────── */
* { box-sizing: border-box; margin: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: Quicksand, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--stage);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  display: flex;
  justify-content: center;
}
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
b, h1, h2, h3 { font-weight: 700; }
svg.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.app { position: relative; width: 100%; max-width: 460px; height: 100dvh; background: var(--bg); overflow: hidden; display: flex; flex-direction: column; }
@media (min-width: 520px) and (min-height: 700px) {
  body { align-items: center; }
  .app { height: min(920px, calc(100dvh - 40px)); border-radius: 44px; box-shadow: 0 30px 70px -24px rgba(30, 17, 71, .35); }
}

.view { flex: 1; overflow-y: auto; padding: calc(22px + env(safe-area-inset-top)) 22px calc(116px + env(safe-area-inset-bottom)); scrollbar-width: none; }
.view::-webkit-scrollbar { display: none; }
.view > * { animation: rise .45s cubic-bezier(.2, .8, .2, 1) both; }
.view > *:nth-child(2) { animation-delay: .04s; }
.view > *:nth-child(3) { animation-delay: .08s; }
.view > *:nth-child(4) { animation-delay: .12s; }
.view > *:nth-child(5) { animation-delay: .16s; }
.view > *:nth-child(n+6) { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* ───────── Header ───────── */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.top h1 { font-size: 22px; letter-spacing: -.01em; }
.top .hi { color: var(--muted); font-size: 13px; margin-top: 1px; }

.month { display: flex; align-items: center; gap: 4px; }
.month b { font-size: 13.5px; min-width: 96px; text-align: center; white-space: nowrap; }
.month button { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--accent-ink); border: 1.6px solid currentColor; transition: all .15s; }
.month button:active { background: var(--accent-ink); color: #fff; border-color: var(--accent-ink); }
.month svg.ic { width: 14px; height: 14px; stroke-width: 2.6; }

/* ───────── Hero card ───────── */
.hero { position: relative; border-radius: 30px; padding: 30px 26px; background: var(--card); color: #fff; overflow: hidden; box-shadow: var(--shadow); }
.hero > i { position: absolute; border-radius: 50%; }
.hero .c1 { width: 76px; height: 76px; left: 10px; top: -46px; background: #5B45F0; }
.hero .c2 { width: 120px; height: 120px; right: -78px; bottom: -58px; border: 2.5px solid #10FDE9; }
.hero .c3 { width: 46px; height: 46px; right: 46px; top: -26px; border: 2.5px solid #7C6BFF; }
.hero-main { position: relative; display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; }
.hero-main > div { min-width: 0; }
.hero-main > div:last-child { text-align: right; }
.hero span { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .82); }
.hero span button { display: grid; place-items: center; opacity: .8; }
.hero span svg.ic { width: 16px; height: 16px; }
.hero b { display: block; font-variant-numeric: tabular-nums; white-space: nowrap; margin-top: 2px; }
.hero-amount { font-size: clamp(23px, 7.2vw, 29px); letter-spacing: -.01em; }
.hero-amount small { font-size: .6em; opacity: .7; }
.hero-net { font-size: 18px; }

/* ───────── Quick actions ───────── */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 26px; }
.quick button { display: flex; flex-direction: column; align-items: center; gap: 9px; font-size: 12px; font-weight: 600; color: var(--accent-ink); }
.quick i { width: 50px; height: 50px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; box-shadow: var(--bubble); border: 1px solid var(--line); color: var(--text); transition: transform .15s; }
.quick button:active i { transform: scale(.9); }
.quick svg.ic { width: 20px; height: 20px; }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.tile { background: var(--surface); border-radius: 20px; padding: 14px; display: flex; gap: 11px; align-items: center; min-width: 0; }
.tile i { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; flex: none; }
.tile.in i { background: var(--lime); color: var(--on-lime); }
.tile.out i { background: var(--out-soft); color: var(--out); }
.tile svg.ic { width: 18px; height: 18px; stroke-width: 2.4; }
.tile div { min-width: 0; }
.tile span { display: block; font-size: 12px; color: var(--muted); }
.tile b { display: block; font-size: 15.5px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ───────── Cards & sections ───────── */
.card { background: var(--surface); border-radius: 24px; padding: 18px; margin-top: 16px; }
.sec { display: flex; align-items: center; justify-content: space-between; margin: 28px 0 8px; }
.sec h2 { font-size: 16.5px; }
.sec button { font-size: 12.5px; font-weight: 600; color: var(--accent-ink); padding: 6px 0; }

.budget-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.budget-head span { font-size: 13px; color: var(--muted); }
.budget-head b { font-size: 13px; font-variant-numeric: tabular-nums; }
.budget-big { font-size: 22px; font-weight: 700; margin: 4px 0 12px; font-variant-numeric: tabular-nums; }
.budget-big small { font-size: 13px; font-weight: 500; color: var(--muted); }
.bar { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--c, var(--accent-ink)); width: var(--w, 0%); animation: grow .8s cubic-bezier(.2, .8, .2, 1) both; transform-origin: left; }
@keyframes grow { from { transform: scaleX(0); } }
.budget-foot { margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.cta { display: flex; align-items: center; gap: 12px; width: 100%; }
.cta .ico { --c: var(--accent-ink); }
.cta b { display: block; }
.cta small { color: var(--muted); font-size: 12.5px; }
.cta > svg.ic { margin-left: auto; color: var(--muted); width: 18px; height: 18px; }

.crow { display: flex; align-items: center; gap: 12px; padding: 9px 0; }
.crow .mid { flex: 1; min-width: 0; }
.crow .mid div:first-child { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 7px; font-weight: 600; font-size: 14px; }
.crow .mid div:first-child span:last-child { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.crow .bar { height: 6px; }
.crow .pct { font-size: 12px; color: var(--muted); font-weight: 600; width: 34px; text-align: right; font-variant-numeric: tabular-nums; }

.ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 19px; flex: none; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); }

/* ───────── Transactions ───────── */
.tx { display: flex; align-items: center; gap: 13px; width: 100%; padding: 10px 0; transition: opacity .15s, transform .15s; }
.tx:active { opacity: .6; transform: scale(.985); }
.tx-main { flex: 1; min-width: 0; }
.tx-main b { display: block; font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-main small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.amt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 15px; }
.amt.in { color: var(--in); }
.day { display: flex; justify-content: space-between; align-items: baseline; margin: 22px 0 4px; font-size: 13px; font-weight: 700; }
.day span:last-child { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }

.search { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 16px; padding: 0 16px; height: 52px; color: var(--muted); border: 1.5px solid transparent; }
.search:focus-within { border-color: var(--accent-ink); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font-weight: 600; }
.search input::placeholder { color: var(--muted); font-weight: 500; }
.search svg.ic { width: 19px; height: 19px; }

.chips { display: flex; gap: 8px; margin-top: 12px; }
.chip { padding: 9px 18px; border-radius: 13px; background: var(--surface); font-size: 13px; font-weight: 600; color: var(--muted); transition: all .2s; }
.chip.on { background: var(--lime); color: var(--on-lime); font-weight: 700; }

.empty { text-align: center; padding: 34px 20px 30px; }
.empty .orb { width: 84px; height: 84px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; font-size: 36px; background: var(--bg); box-shadow: var(--bubble); border: 1px solid var(--line); }
.empty h3 { font-size: 18px; }
.empty p { color: var(--muted); margin: 6px auto 18px; max-width: 260px; font-size: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; padding: 0 28px; border-radius: 16px; font-weight: 700; background: var(--accent); color: var(--on-accent); transition: transform .15s; box-shadow: 0 12px 20px -12px var(--accent); }
.btn:active { transform: scale(.96); }
.btn.ghost { background: var(--surface-2); color: var(--text); box-shadow: none; }
.btn.danger { background: var(--out); color: #fff; box-shadow: none; }
.btn.lime { background: var(--lime); color: var(--on-lime); box-shadow: none; }
.btn.block { display: flex; width: 100%; }
.empty .btn + br + .btn { margin-top: 10px; }

/* ───────── Analysis ───────── */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface); border-radius: 16px; padding: 5px; gap: 5px; }
.seg button { height: 40px; border-radius: 12px; font-weight: 600; font-size: 14px; color: var(--muted); text-align: center; transition: all .2s; }
.seg button.on { background: var(--bg); color: var(--text); font-weight: 700; box-shadow: 0 3px 10px -4px rgba(30, 17, 71, .25); }
.seg.type button.on[data-v="expense"] { background: var(--out); color: #fff; box-shadow: none; }
.seg.type button.on[data-v="income"] { background: var(--lime); color: var(--on-lime); box-shadow: none; }

.chart { margin: 14px -22px 0; }
.chart svg { display: block; width: 100%; height: auto; }
.chart-x { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; text-align: center; font-size: 11.5px; color: var(--muted); margin-top: 8px; }
.chart-x .cur { color: var(--text); font-weight: 700; }
.total { text-align: center; margin: 22px 0 6px; }
.total span { display: block; font-size: 13px; color: var(--muted); }
.total b { display: block; font-size: 30px; color: var(--accent-ink); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

.donut { position: relative; width: 190px; height: 190px; margin: 4px auto 14px; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 5.2; }
.donut .track { stroke: var(--surface-2); }
.donut .seg-c { animation: sweep .9s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes sweep { from { stroke-dasharray: 0 100; } }
.donut .center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut .center span { font-size: 12px; color: var(--muted); }
.donut .center b { font-size: 26px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.stat { background: var(--surface); border-radius: 20px; padding: 14px 12px; min-width: 0; }
.stat span { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.25; min-height: 29px; }
.stat b { display: block; font-size: 15.5px; margin-top: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ───────── Settings ───────── */
.group { margin-top: 4px; }
.row { display: flex; align-items: center; gap: 14px; min-height: 62px; padding: 8px 0; width: 100%; }
.bub { width: 44px; height: 44px; border-radius: 50%; background: var(--bg); box-shadow: var(--bubble); border: 1px solid var(--line); display: grid; place-items: center; flex: none; color: var(--text); }
.bub svg.ic { width: 19px; height: 19px; }
.row > label, .row > .lbl { flex: 1; font-weight: 600; min-width: 0; }
.row .lbl small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); }
.row input[type="text"], .row input[type="number"] { width: 118px; text-align: right; background: var(--surface); border: 1.5px solid transparent; outline: 0; border-radius: 13px; height: 42px; padding: 0 12px; font-weight: 600; }
.row input:focus { border-color: var(--accent-ink); }
.row input::placeholder { color: var(--muted); font-weight: 500; }
.row .seg { flex: none; border-radius: 13px; padding: 4px; gap: 2px; }
.row .seg button { height: 34px; padding: 0 11px; font-size: 13px; border-radius: 10px; }
.row > svg.ic { color: var(--text); width: 16px; height: 16px; stroke-width: 2.4; }
.gl { font-size: 13px; font-weight: 700; color: var(--muted); margin: 24px 0 2px; }
.privacy { display: flex; gap: 14px; align-items: center; border-radius: 22px; padding: 16px; background: var(--surface); }
.privacy i { width: 44px; height: 44px; border-radius: 14px; background: var(--lime); color: var(--on-lime); display: grid; place-items: center; flex: none; }
.privacy b { display: block; }
.privacy small { color: var(--muted); font-size: 12.5px; }
.wipe { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 30px auto 0; font-weight: 700; color: var(--accent-ink); }
.wipe .bub { width: 54px; height: 54px; color: var(--accent-ink); }
.foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 22px; }

/* ───────── Bottom nav ───────── */
.nav { position: absolute; left: 20px; right: 20px; bottom: calc(16px + env(safe-area-inset-bottom)); height: 66px; border-radius: 24px; z-index: 5; background: var(--nav); box-shadow: 0 18px 28px -12px rgba(21, 14, 69, .65); display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; padding: 0 6px; }
.nav .tab { height: 100%; display: grid; place-items: center; color: rgba(255, 255, 255, .5); position: relative; transition: color .2s; }
.nav .tab.on { color: #fff; }
.nav .tab.on svg.ic { fill: rgba(255, 255, 255, .22); transform: translateY(-3px); }
.nav .tab::after { content: ""; position: absolute; bottom: 12px; width: 5px; height: 5px; border-radius: 50%; background: var(--lime); transform: scale(0); transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.nav .tab.on::after { transform: none; }
.nav svg.ic { width: 23px; height: 23px; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.fab { width: 46px; height: 46px; border-radius: 15px; justify-self: center; display: grid; place-items: center; background: var(--lime); color: var(--on-lime); transition: transform .2s cubic-bezier(.3, 1.6, .5, 1); }
.fab:active { transform: scale(.88) rotate(90deg); }
.fab svg.ic { stroke-width: 2.6; }

/* ───────── Sheet ───────── */
.backdrop { position: absolute; inset: 0; background: rgba(30, 17, 71, .45); opacity: 0; pointer-events: none; transition: opacity .3s; z-index: 10; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 11; max-height: 97%; background: var(--bg); border-radius: 32px 32px 0 0; padding: 10px 22px 0; transform: translateY(105%); transition: transform .42s cubic-bezier(.2, .9, .2, 1); overflow-y: auto; scrollbar-width: none; }
.app.sheet-open .backdrop { opacity: 1; pointer-events: auto; }
.app.sheet-open .sheet { transform: none; }
.grab { width: 40px; height: 5px; border-radius: 9px; background: var(--surface-2); margin: 0 auto 12px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheet-head h2 { font-size: 18px; }
.round { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--accent-ink); border: 1.6px solid currentColor; }
.round svg.ic { width: 16px; height: 16px; stroke-width: 2.2; }
.round.red { color: var(--out); }
.sheet-head div { display: flex; gap: 8px; }

.amount { text-align: center; padding: 18px 0 14px; font-size: clamp(36px, 12vw, 46px); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; }
.amount .cur { font-size: .6em; color: var(--muted); margin-right: 4px; }
.amount.zero .val { color: var(--muted); opacity: .6; }
.amount .caret { display: inline-block; width: 3px; height: .8em; border-radius: 2px; background: var(--accent-ink); margin-left: 3px; vertical-align: -.06em; animation: blink 1.1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.amount.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

.cats { display: flex; gap: 8px; overflow-x: auto; margin: 0 -22px; padding: 2px 22px 4px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat { flex: none; width: 74px; padding: 10px 4px 8px; border-radius: 18px; background: var(--surface); border: 1.6px solid transparent; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--muted); transition: all .18s; }
.cat em { font-style: normal; font-size: 22px; line-height: 1.1; }
.cat.on { border-color: var(--accent-ink); background: var(--bg); color: var(--text); font-weight: 700; }

.fields { display: grid; grid-template-columns: 140px 1fr; gap: 8px; margin-top: 10px; }
.fields input { height: 48px; border-radius: 15px; background: var(--surface); border: 1.5px solid transparent; padding: 0 13px; outline: 0; font-weight: 600; font-size: 14px; min-width: 0; width: 100%; }
.fields input:focus { border-color: var(--accent-ink); }
.fields input::placeholder { color: var(--muted); font-weight: 500; }

.keys { background: var(--card); margin: 16px -22px 0; padding: 14px 22px calc(18px + env(safe-area-inset-bottom)); border-radius: 32px 32px 0 0; }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.pad button { height: 48px; border-radius: 14px; font-size: 21px; font-weight: 600; color: #fff; display: grid; place-items: center; transition: background .1s, transform .1s; user-select: none; }
.pad button:active { background: rgba(255, 255, 255, .14); transform: scale(.94); }
.keys .btn { margin-top: 10px; height: 54px; font-size: 16px; }

/* ───────── Dialog & toast ───────── */
.dlg-wrap { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; padding: 28px; background: rgba(30, 17, 71, .5); opacity: 0; pointer-events: none; transition: opacity .2s; }
.dlg-wrap.on { opacity: 1; pointer-events: auto; }
.dlg { width: 100%; max-width: 330px; background: var(--bg); border-radius: 28px; padding: 24px 22px 22px; text-align: center; transform: scale(.92); transition: transform .25s cubic-bezier(.3, 1.4, .5, 1); }
.dlg-wrap.on .dlg { transform: none; }
.dlg h3 { font-size: 18px; }
.dlg p { color: var(--muted); margin: 8px 0 20px; font-size: 14px; }
.dlg div { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dlg .btn { padding: 0; }

.toast { position: absolute; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--nav); color: #fff; padding: 11px 20px; border-radius: 14px; font-weight: 600; font-size: 13.5px; opacity: 0; pointer-events: none; transition: all .3s cubic-bezier(.3, 1.4, .5, 1); z-index: 30; white-space: nowrap; box-shadow: var(--shadow); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

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

/* ═════════════════ Koyu tema & hareket katmanı ═════════════════ */
:root {
  --bub-bg: var(--bg);
  --hero-bg: linear-gradient(135deg, #4A2BFF, #2A14B8);
  --aura: .12;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.3, 1.5, .5, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B0B14; --surface: rgba(255, 255, 255, .06); --surface-2: rgba(255, 255, 255, .11);
    --bub-bg: rgba(255, 255, 255, .08); --hero-bg: linear-gradient(135deg, #4B2BFF, #391FE0 55%, #1B0F8A);
    --nav: #17134A; --aura: .5; --stage: #05020B;
    --shadow: 0 26px 50px -20px rgba(75, 43, 255, .8);
  }
}
:root[data-theme="dark"] {
  --bg: #0B0B14; --surface: rgba(255, 255, 255, .06); --surface-2: rgba(255, 255, 255, .11);
  --bub-bg: rgba(255, 255, 255, .08); --hero-bg: linear-gradient(135deg, #4B2BFF, #391FE0 55%, #1B0F8A);
  --nav: #17134A; --aura: .5; --stage: #05020B;
  --shadow: 0 26px 50px -20px rgba(75, 43, 255, .8);
}
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* Arka planda süzülen ışık lekeleri */
.aura { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; opacity: var(--aura); transition: opacity .6s; }
.aura i { position: absolute; aspect-ratio: 1; border-radius: 50%; filter: blur(70px); will-change: transform; }
.aura i:nth-child(1) { width: 70%; background: #4B2BFF; left: -25%; top: -8%; animation: drift1 16s ease-in-out infinite alternate; }
.aura i:nth-child(2) { width: 60%; background: #10FDE9; right: -35%; top: 38%; animation: drift2 21s ease-in-out infinite alternate; }
.aura i:nth-child(3) { width: 55%; background: #3B82F6; left: -20%; bottom: -12%; animation: drift1 25s ease-in-out infinite alternate-reverse; }
@keyframes drift1 { to { transform: translate(32%, 20%) scale(1.25); } }
@keyframes drift2 { to { transform: translate(-42%, -26%) scale(.8); } }

/* Açılış ekranı */
.splash { position: absolute; inset: 0; z-index: 50; background: var(--bg); display: grid; place-content: center; justify-items: center; gap: 20px; transition: opacity .6s, transform .7s var(--ease), filter .6s; }
.splash.out { opacity: 0; transform: scale(1.18); filter: blur(18px); pointer-events: none; }
.splash .logo { width: 96px; height: 96px; border-radius: 32px; background: var(--hero-bg); display: flex; align-items: flex-end; justify-content: center; gap: 9px; padding-bottom: 27px; box-shadow: 0 26px 54px -14px rgba(75, 43, 255, .85); animation: logoin .8s var(--spring) both; }
.splash .logo i { width: 10px; border-radius: 9px; background: var(--lime); transform-origin: bottom; animation: barup .6s var(--spring) both; }
.splash .logo i:nth-child(1) { height: 22px; animation-delay: .3s; }
.splash .logo i:nth-child(2) { height: 42px; animation-delay: .42s; }
.splash .logo i:nth-child(3) { height: 31px; animation-delay: .54s; }
.splash b { font-size: 27px; letter-spacing: .01em; animation: rise .6s var(--ease) .45s both; }
.splash u { width: 120px; height: 4px; border-radius: 9px; background: var(--surface-2); overflow: hidden; }
.splash u::after { content: ""; display: block; height: 100%; background: var(--accent-ink); border-radius: inherit; transform-origin: left; animation: load 1s var(--ease) .15s both; }
@keyframes logoin { from { transform: scale(.3) rotate(-24deg); opacity: 0; } }
@keyframes barup { from { transform: scaleY(0); } }
@keyframes load { from { transform: scaleX(0); } }

/* Sayfa geçişleri */
.view { position: relative; z-index: 1; transition: transform .5s var(--ease), filter .5s var(--ease), opacity .2s; }
.view.leave { opacity: 0; filter: blur(12px); transform: translateX(calc(var(--dx, 0px) * -1)) scale(.97); transition-duration: .17s; }
.view > * { animation: rise .65s var(--ease) both; }
.view > *:nth-child(1) { animation-delay: 0s; }
.view > *:nth-child(2) { animation-delay: .06s; }
.view > *:nth-child(3) { animation-delay: .12s; }
.view > *:nth-child(4) { animation-delay: .18s; }
.view > *:nth-child(5) { animation-delay: .24s; }
.view > *:nth-child(6) { animation-delay: .3s; }
.view > *:nth-child(n+7) { animation-delay: .36s; }
@keyframes rise { from { opacity: 0; transform: translate(var(--dx, 0px), 22px) scale(.97); filter: blur(10px); } }
.view.soft > *, .view.soft .list > *, .view.soft .quick button, #txlist.quiet .list > * { animation: none; }
.app.sheet-open .view { transform: scale(.93); filter: blur(5px) brightness(.85); }

:is(.list, .cats, .pad) > :nth-child(2) { --n: 1; }
:is(.list, .cats, .pad) > :nth-child(3) { --n: 2; }
:is(.list, .cats, .pad) > :nth-child(4) { --n: 3; }
:is(.list, .cats, .pad) > :nth-child(5) { --n: 4; }
:is(.list, .cats, .pad) > :nth-child(6) { --n: 5; }
:is(.list, .cats, .pad) > :nth-child(7) { --n: 6; }
:is(.list, .cats, .pad) > :nth-child(8) { --n: 7; }
:is(.list, .cats, .pad) > :nth-child(9) { --n: 8; }
:is(.list, .cats, .pad) > :nth-child(10) { --n: 9; }
:is(.list, .cats, .pad) > :nth-child(11) { --n: 10; }
:is(.list, .cats, .pad) > :nth-child(12) { --n: 11; }
.list > * { animation: rowin .55s var(--ease) both; animation-delay: calc(var(--n, 0) * 45ms + .12s); }
@keyframes rowin { from { opacity: 0; transform: translateX(20px); filter: blur(6px); } }
@keyframes pop { from { opacity: 0; transform: scale(.4); } }
@keyframes fade { from { opacity: 0; } }

/* Cam başlık */
.top { position: sticky; top: calc(-22px - env(safe-area-inset-top)); z-index: 4; margin: calc(-22px - env(safe-area-inset-top)) -22px 8px; padding: calc(20px + env(safe-area-inset-top)) 22px 14px; background: color-mix(in srgb, var(--bg) 68%, transparent); backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5); }
.top-r { display: flex; align-items: center; gap: 10px; }
.tbtn { width: 38px; height: 38px; border-radius: 50%; background: var(--bub-bg); box-shadow: var(--bubble); border: 1px solid var(--line); display: grid; place-items: center; flex: none; transition: transform .2s var(--spring); }
.tbtn:active { transform: scale(.85); }
.tbtn svg.ic { width: 18px; height: 18px; animation: spinin .7s var(--spring); }
@keyframes spinin { from { transform: rotate(-140deg) scale(.2); opacity: 0; } }
.month b { min-width: 88px; }

/* Kart: parıltı, süzülen daireler, eğilme */
.hero { background: var(--hero-bg); transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .35s var(--ease); }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 36%, rgba(255, 255, 255, .22) 50%, transparent 64%); transform: translateX(-100%); animation: sheen 6s var(--ease) .7s infinite; }
@keyframes sheen { 0% { transform: translateX(-100%); } 32%, 100% { transform: translateX(100%); } }
.hero .c1 { animation: float 7s ease-in-out infinite alternate; }
.hero .c2 { animation: float 9s ease-in-out infinite alternate-reverse; }
.hero .c3 { animation: float 6s ease-in-out -2s infinite alternate; }
@keyframes float { to { transform: translate(10px, 9px) scale(1.14); } }

.quick button { animation: pop .55s var(--spring) both; }
.quick button:nth-child(1) { animation-delay: .2s; }
.quick button:nth-child(2) { animation-delay: .27s; }
.quick button:nth-child(3) { animation-delay: .34s; }
.quick button:nth-child(4) { animation-delay: .41s; }
.quick i, .bub { background: var(--bub-bg); }
.quick button:active i { transform: scale(.85) rotate(-10deg); }

.card, .tile, .stat, .privacy { border: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.tile i { animation: pop .6s var(--spring) .35s both; }
.btn { position: relative; overflow: hidden; }
.btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .28) 50%, transparent 62%); transform: translateX(-100%); animation: sheen 4.5s var(--ease) 1s infinite; pointer-events: none; }
.chip, .seg button { transition: all .3s var(--spring); }
.chip:active { transform: scale(.9); }

/* Grafik çizimi */
.chart .line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.4s var(--ease) .25s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.chart .area { animation: fade 1s ease .7s both; }
.chart circle, .chart rect, .chart text { animation: fade .45s ease 1.3s both; }
.total b { animation: pop .6s var(--spring) .3s both; text-shadow: 0 0 26px color-mix(in srgb, var(--accent-ink) 45%, transparent); }
.donut { animation: pop .7s var(--spring) .15s both; }

/* Alt menü: cam, kayan gösterge, nabız */
.app:not(.ready) .nav { opacity: 0; }
.app.ready .nav { animation: navin .8s var(--spring) .15s backwards; }
@keyframes navin { from { transform: translateY(130%); opacity: 0; } }
.nav { background: color-mix(in srgb, var(--nav) 78%, transparent); backdrop-filter: blur(22px) saturate(1.7); -webkit-backdrop-filter: blur(22px) saturate(1.7); border: 1px solid rgba(255, 255, 255, .09); transition: transform .45s var(--ease); }
.app.sheet-open .nav { transform: translateY(150%); }
.nav .ind { position: absolute; left: 6px; top: 0; bottom: 0; width: calc((100% - 12px) / 5); transform: translateX(calc(var(--i, 0) * 100%)); transition: transform .55s var(--spring); pointer-events: none; display: grid; place-items: center; }
.nav .ind::before { content: ""; width: 46px; height: 46px; border-radius: 16px; background: rgba(255, 255, 255, .13); }
.nav .ind::after { content: ""; position: absolute; bottom: 5px; width: 16px; height: 3px; border-radius: 3px; background: var(--lime); box-shadow: 0 0 12px var(--lime); }
.nav .tab::after { display: none; }
.nav .tab { z-index: 1; }
.nav .tab.on svg.ic { transform: none; animation: tabpop .5s var(--spring); }
@keyframes tabpop { 40% { transform: scale(1.32) rotate(-10deg); } }
.fab { position: relative; isolation: isolate; z-index: 1; }
.fab::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--lime); z-index: -1; animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { from { transform: scale(1); opacity: .55; } to { transform: scale(1.75); opacity: 0; } }

/* Alt panel, pencere, bildirim */
.backdrop { background: rgba(12, 6, 30, .5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: opacity .4s; }
.sheet { transition: transform .6s cubic-bezier(.2, 1.12, .3, 1); box-shadow: 0 -24px 60px -12px rgba(0, 0, 0, .45); }
.app.sheet-open .cat { animation: pop .5s var(--spring) both; animation-delay: calc(var(--n, 0) * 40ms + .12s); }
.app.sheet-open .pad button { animation: rowin .45s var(--ease) both; animation-delay: calc(var(--n, 0) * 18ms + .15s); }
.amount .val { display: inline-block; }
.cat { transition: all .3s var(--spring); }
.cat.on em { animation: tabpop .5s var(--spring); display: inline-block; }
.dlg-wrap { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.toast { background: color-mix(in srgb, var(--nav) 82%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid rgba(255, 255, 255, .1); }
.tx:active .ico { transform: scale(.85) rotate(-8deg); }
.ico { transition: transform .3s var(--spring); }

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