/* Airbag — Gelir · Gider · Cari  (UI önizlemesi) */

:root {
  --bg: #F2F4F7;
  --surface: #FFFFFF;
  --surface-2: #F7F8FA;
  --surface-3: #EAECF0;
  --line: #E4E7EC;
  --line-strong: #D0D5DD;
  --text: #101828;
  --text-2: #344054;
  --muted: #667085;
  --faint: #98A2B3;
  --brand: #3B5BDB;
  --brand-ink: #FFFFFF;
  --brand-soft: #EDF2FF;
  --brand-text: #2F49B5;
  --in: #047857;
  --in-mark: #059669;
  --in-soft: #E6F6EF;
  --out: #B42318;
  --out-mark: #DC2626;
  --out-soft: #FDECEA;
  --cr: #B45309;
  --cr-soft: #FEF3E2;
  --hero-bg: #101828;
  --hero-text: #FFFFFF;
  --hero-muted: #98A2B3;
  --backdrop: rgba(16, 24, 40, .5);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 3px rgba(16, 24, 40, .07), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 24px 48px -12px rgba(16, 24, 40, .28);
  --radius: 16px;
  --radius-sm: 12px;
  --rail-w: 0px;
  --tabbar-h: 68px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B101B;
    --surface: #131A28;
    --surface-2: #192133;
    --surface-3: #222C40;
    --line: #232E44;
    --line-strong: #344054;
    --text: #F2F4F7;
    --text-2: #D0D5DD;
    --muted: #98A2B3;
    --faint: #667085;
    --brand: #7090FF;
    --brand-ink: #0B101B;
    --brand-soft: #1B2546;
    --brand-text: #A9BBFF;
    --in: #34D399;
    --in-mark: #0FA673;
    --in-soft: #0E2A22;
    --out: #F88A8A;
    --out-mark: #EF4444;
    --out-soft: #301719;
    --cr: #FBBF24;
    --cr-soft: #2D2310;
    --hero-bg: #1C2742;
    --hero-text: #F2F4F7;
    --hero-muted: #98A2B3;
    --backdrop: rgba(0, 0, 0, .6);
    --shadow-sm: none;
    --shadow: none;
    --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B101B;
  --surface: #131A28;
  --surface-2: #192133;
  --surface-3: #222C40;
  --line: #232E44;
  --line-strong: #344054;
  --text: #F2F4F7;
  --text-2: #D0D5DD;
  --muted: #98A2B3;
  --faint: #667085;
  --brand: #7090FF;
  --brand-ink: #0B101B;
  --brand-soft: #1B2546;
  --brand-text: #A9BBFF;
  --in: #34D399;
  --in-mark: #0FA673;
  --in-soft: #0E2A22;
  --out: #F88A8A;
  --out-mark: #EF4444;
  --out-soft: #301719;
  --cr: #FBBF24;
  --cr-soft: #2D2310;
  --hero-bg: #1C2742;
  --hero-text: #F2F4F7;
  --hero-muted: #98A2B3;
  --backdrop: rgba(0, 0, 0, .6);
  --shadow-sm: none;
  --shadow: none;
  --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
.num { font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico.sm { width: 18px; height: 18px; }
.ico.lg { width: 26px; height: 26px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 10px; }

/* ---------- Giriş ---------- */
.login {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background:
    radial-gradient(1200px 500px at 10% -10%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 60%),
    radial-gradient(900px 500px at 110% 110%, color-mix(in srgb, var(--in-mark) 14%, transparent), transparent 60%),
    var(--bg);
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 32px 24px 24px;
  box-shadow: var(--shadow-lg);
}
.brand-mark {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--brand), color-mix(in srgb, var(--brand) 60%, #000));
  color: #fff;
  font-weight: 800; font-size: 26px; letter-spacing: -.04em;
  box-shadow: 0 8px 20px -6px color-mix(in srgb, var(--brand) 60%, transparent);
}
.brand-mark.sm { width: 40px; height: 40px; border-radius: 12px; font-size: 19px; box-shadow: none; }
.login h1 { font-size: 26px; letter-spacing: -.02em; margin-top: 20px; }
.login .sub { color: var(--muted); margin-top: 4px; }
.login form { margin-top: 28px; display: grid; gap: 16px; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 52px; height: 56px; font-size: 18px; }
.pw-eye { position: absolute; right: 4px; top: 4px; width: 48px; height: 48px; display: grid; place-items: center; color: var(--muted); border-radius: 10px; }
.check { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 15px; user-select: none; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); }
.login .err { color: var(--out); font-size: 14px; min-height: 20px; margin-top: -6px; }
.demo-note { margin-top: 20px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); color: var(--muted); font-size: 13px; display: flex; gap: 10px; align-items: flex-start; }
.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ---------- Form öğeleri ---------- */
.field { display: grid; gap: 6px; min-width: 0; }
.field > span, .label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.input, .select, .textarea {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 16px;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 84px; padding: 12px 14px; resize: vertical; }
.select { appearance: none; padding-right: 40px; 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='%23667085' stroke-width='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; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input.invalid { border-color: var(--out-mark); box-shadow: 0 0 0 4px color-mix(in srgb, var(--out-mark) 15%, transparent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 18px;
  border-radius: var(--radius-sm);
  font-weight: 600; font-size: 15px;
  white-space: nowrap;
  transition: background .15s, transform .08s, box-shadow .15s;
  user-select: none;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--brand) 88%, #000); }
.btn-ghost { background: var(--surface); color: var(--text-2); border: 1px solid var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-soft { background: var(--surface-3); color: var(--text); }
.btn-danger { color: var(--out); background: var(--out-soft); }
.btn-block { width: 100%; }
.btn-lg { height: 56px; font-size: 17px; border-radius: 14px; }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 12px; color: var(--text-2); }
.icon-btn:hover { background: var(--surface-3); }
.icon-btn.bordered { border: 1px solid var(--line-strong); background: var(--surface); }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--surface-3); border-radius: 13px; }
.seg button { height: 42px; padding: 0 10px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--muted); white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.seg.type button { height: 52px; font-size: 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.seg.type button[data-v="gelir"][aria-pressed="true"] { background: var(--in-mark); color: #fff; }
.seg.type button[data-v="gider"][aria-pressed="true"] { background: var(--out-mark); color: #fff; }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.chip {
  flex: none; height: 38px; padding: 0 14px;
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text-2);
  font-size: 14px; font-weight: 500;
}
.chip[aria-pressed="true"] { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 45%, transparent); color: var(--brand-text); font-weight: 600; }

.search { position: relative; }
.search .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search .input { padding-left: 44px; }

/* ---------- Uygulama iskeleti ---------- */
.app { min-height: 100dvh; padding-left: var(--rail-w); }
.view { max-width: 1320px; margin: 0 auto; padding: 16px 16px calc(var(--tabbar-h) + 32px + env(safe-area-inset-bottom)); }

.rail { display: none; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px; font-weight: 600; color: var(--faint); }
.tab[aria-current="page"] { color: var(--brand-text); }
.tab-fab { display: grid; place-items: center; }
.tab-fab span {
  width: 56px; height: 56px; margin-top: -22px;
  border-radius: 18px; display: grid; place-items: center;
  background: var(--brand); color: var(--brand-ink);
  box-shadow: 0 10px 24px -8px color-mix(in srgb, var(--brand) 70%, transparent), 0 0 0 5px var(--bg);
}

@media (min-width: 768px) {
  :root { --rail-w: 96px; }
  .tabbar { display: none; }
  .view { padding: 24px 24px 40px; }
  .rail {
    position: fixed; inset: 0 auto 0 0; z-index: 30;
    width: var(--rail-w);
    display: flex; flex-direction: column; align-items: stretch; gap: 6px;
    padding: 18px 10px;
    background: var(--surface);
    border-right: 1px solid var(--line);
  }
  .rail-brand { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 4px 14px; }
  .rail-brand .name { display: none; }
  .rail-new { margin: 2px 0 10px; height: 52px; padding: 0; border-radius: 14px; }
  .rail-new .lbl { display: none; }
  .rail a, .rail .rail-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    min-height: 64px; border-radius: 14px;
    font-size: 12px; font-weight: 600; color: var(--muted);
  }
  .rail a:hover, .rail .rail-item:hover { background: var(--surface-2); color: var(--text); }
  .rail a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-text); }
  .rail .spacer { flex: 1; }
  .only-mobile { display: none !important; }
}
@media (min-width: 1180px) {
  :root { --rail-w: 240px; }
  .view { padding: 32px 36px 48px; }
  .rail { padding: 22px 16px; }
  .rail-brand { justify-content: flex-start; padding: 0 8px 18px; }
  .rail-brand .name { display: block; }
  .rail-brand .name b { display: block; font-size: 17px; letter-spacing: -.01em; }
  .rail-brand .name small { color: var(--muted); font-size: 12px; }
  .rail-new { padding: 0 18px; }
  .rail-new .lbl { display: inline; }
  .rail a, .rail .rail-item { flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 48px; padding: 0 14px; font-size: 15px; }
}
@media (max-width: 767.98px) { .only-wide { display: none !important; } }

/* ---------- Sayfa başlığı ---------- */
.ph { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; min-height: 44px; }
.ph h1 { font-size: 26px; font-weight: 750; letter-spacing: -.025em; }
.ph .sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.ph .actions { display: flex; gap: 8px; align-items: center; }
@media (min-width: 768px) { .ph h1 { font-size: 30px; } .ph { margin-bottom: 22px; } }

.daynav { display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px; box-shadow: var(--shadow-sm); margin-bottom: 16px; }
.daynav .icon-btn { width: 48px; height: 48px; }
.daynav-date { position: relative; flex: 1; height: 48px; border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; text-align: center; }
.daynav-date:hover { background: var(--surface-2); }
.daynav-date small { color: var(--muted); font-weight: 500; }
.daynav-date input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.pill-today { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-text); }

/* ---------- Kartlar ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 6px; }
.card-h h2, .card-h h3 { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.card-h .meta { color: var(--muted); font-size: 13px; }
.card-b { padding: 14px 18px 18px; }
.link { color: var(--brand-text); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 2px; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.stat { padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); min-width: 0; }
.stat .k { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; font-weight: 600; }
.stat .v { font-size: 22px; font-weight: 750; margin-top: 8px; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .d { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.stat.hero { grid-column: 1 / -1; background: var(--hero-bg); color: var(--hero-text); border-color: transparent; }
.stat.hero .k, .stat.hero .d { color: var(--hero-muted); }
.stat.hero .v { font-size: 30px; }
.dot-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.dot-ico .ico { width: 17px; height: 17px; stroke-width: 2.4; }
.dot-ico.in { background: var(--in-soft); color: var(--in); }
.dot-ico.out { background: var(--out-soft); color: var(--out); }
.dot-ico.cr { background: var(--cr-soft); color: var(--cr); }
.dot-ico.net { background: rgba(255, 255, 255, .12); color: var(--hero-text); }
.c-in { color: var(--in); }
.c-out { color: var(--out); }
.c-cr { color: var(--cr); }
.c-muted { color: var(--muted); }
.view, .today-main { container-type: inline-size; }
@container (min-width: 600px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stat.hero { grid-column: auto; order: 3; }
  .stat .v, .stat.hero .v { font-size: 24px; }
}
@container (min-width: 820px) { .stat .v, .stat.hero .v { font-size: 28px; } .stat { padding: 18px 20px; } }

.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.quick-btn {
  height: 64px; border-radius: 16px; color: #fff;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 17px; font-weight: 700;
  transition: transform .08s, filter .15s;
}
.quick-btn:active { transform: scale(.98); }
.quick-btn:hover { filter: brightness(1.05); }
.quick-btn .ico { stroke-width: 2.6; }
.quick-btn.in { background: var(--in-mark); box-shadow: 0 8px 18px -10px var(--in-mark); }
.quick-btn.out { background: var(--out-mark); box-shadow: 0 8px 18px -10px var(--out-mark); }
@media (min-width: 768px) { .quick-btn { height: 72px; font-size: 18px; } }

.today-grid { display: grid; gap: 18px; }
@media (min-width: 1024px) {
  .today-grid { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
  .today-side { position: sticky; top: 24px; display: grid; gap: 18px; }
}
@media (min-width: 1180px) { .today-grid { grid-template-columns: minmax(0, 1fr) 380px; } }
.today-side { display: grid; gap: 18px; }

/* ---------- Listeler ---------- */
.list { list-style: none; margin: 0; padding: 4px 6px 6px; }
.row {
  width: 100%; text-align: left;
  display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  min-height: 66px; padding: 10px 12px; border-radius: 12px;
}
.row:hover { background: var(--surface-2); }
.list > li + li .row { box-shadow: 0 -1px 0 var(--line); }
.list > li + li .row:hover, .list > li:hover + li .row { box-shadow: none; }
.row .dot-ico { width: 42px; height: 42px; border-radius: 12px; }
.row .dot-ico .ico { width: 20px; height: 20px; }
.row .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .m { color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; margin-top: 1px; }
.row .m .sep { color: var(--faint); }
.row .a { font-weight: 700; text-align: right; white-space: nowrap; font-size: 16px; }
.row .a small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11.5px; font-weight: 650; background: var(--surface-3); color: var(--text-2); }
.tag.cr { background: var(--cr-soft); color: var(--cr); }
.tag.brand { background: var(--brand-soft); color: var(--brand-text); }

.group-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 18px 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.group-h .num { font-weight: 600; }
.group-h:first-child { padding-top: 16px; }

.empty { padding: 36px 20px; text-align: center; color: var(--muted); }
.empty .ill { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 12px; display: grid; place-items: center; background: var(--surface-3); color: var(--faint); }
.empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }

.more { display: flex; justify-content: center; padding: 8px 0 14px; }

/* ---------- Hareketler ---------- */
.toolbar { display: grid; gap: 10px; margin-bottom: 14px; }
@media (min-width: 900px) {
  .toolbar { grid-template-columns: minmax(220px, 1fr) auto; align-items: center; }
  .toolbar .chips { grid-column: 1 / -1; }
}
.sumbar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-bottom: 14px; }
.sumbar > div { padding: 12px 14px; min-width: 0; }
.sumbar > div + div { border-left: 1px solid var(--line); }
.sumbar .k { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.sumbar .v { font-weight: 750; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 768px) { .sumbar > div { padding: 14px 20px; } .sumbar .v { font-size: 20px; } }

/* ---------- Cariler ---------- */
.md { display: grid; gap: 18px; }
@media (min-width: 1024px) {
  .md { grid-template-columns: 360px minmax(0, 1fr); align-items: start; }
  .md-detail { position: sticky; top: 24px; }
}
@media (min-width: 1180px) { .md { grid-template-columns: 400px minmax(0, 1fr); } }
.cari-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.cari-sum .stat { padding: 12px 14px; }
.cari-sum .stat .v { font-size: 19px; margin-top: 4px; }
.avatar { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-weight: 700; font-size: 15px; letter-spacing: .02em; flex: none; }
.row.cari { grid-template-columns: 44px minmax(0, 1fr) auto; }
.row.cari[aria-current="true"] { background: var(--brand-soft); }
.row.cari[aria-current="true"] + * { box-shadow: none; }
.bal-lbl { font-size: 12px; font-weight: 600; }

.detail-h { display: flex; align-items: center; gap: 14px; padding: 18px 18px 0; }
.detail-h .avatar { width: 56px; height: 56px; font-size: 19px; border-radius: 16px; }
.detail-h h2 { font-size: 21px; font-weight: 750; letter-spacing: -.02em; }
.detail-h .m { color: var(--muted); font-size: 14px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 2px; }
.detail-h .grow { flex: 1; min-width: 0; }
.balance {
  margin: 16px 18px 0; padding: 18px; border-radius: 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.balance.pos { background: var(--in-soft); }
.balance.neg { background: var(--out-soft); }
.balance.zero { background: var(--surface-2); }
.balance .k { font-size: 13px; font-weight: 700; color: var(--text-2); }
.balance .v { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.balance .hint { font-size: 13px; color: var(--text-2); max-width: 240px; }
.acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 16px 18px 4px; }
.act {
  display: flex; align-items: center; gap: 12px; text-align: left;
  min-height: 64px; padding: 10px 12px; border-radius: 14px;
  border: 1px solid var(--line-strong); background: var(--surface);
}
.act:hover { background: var(--surface-2); }
.act b { display: block; font-size: 15px; }
.act small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.3; }
.cari-detail { container-type: inline-size; }
@container (min-width: 760px) { .acts { grid-template-columns: repeat(4, 1fr); } }

.ledger { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.ledger th { text-align: left; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.ledger td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ledger tr:last-child td { border-bottom: 0; }
.ledger tbody tr { cursor: pointer; }
.ledger tbody tr:hover td { background: var(--surface-2); }
.ledger .r { text-align: right; white-space: nowrap; }
.ledger .desc { font-weight: 600; }
.ledger .desc small { display: block; font-weight: 500; color: var(--muted); font-size: 12.5px; }
.ledger-wrap { margin: 16px 0 0; border-top: 1px solid var(--line); overflow-x: auto; }

/* ---------- Rapor ---------- */
.monthnav { display: inline-flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px; }
.monthnav b { min-width: 128px; text-align: center; font-weight: 650; font-size: 15px; }
.monthnav .icon-btn { width: 40px; height: 40px; }
.rep-grid { display: grid; gap: 18px; }
@media (min-width: 900px) { .rep-grid.two { grid-template-columns: 1fr 1fr; } }

.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); font-weight: 600; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.chart { position: relative; padding: 8px 18px 18px; }
.chart-plot { position: relative; height: 200px; margin-left: 44px; }
@media (min-width: 768px) { .chart-plot { height: 240px; } }
.chart-grid { position: absolute; inset: 0; pointer-events: none; }
.chart-grid div { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.chart-grid div.base { border-top-color: var(--line-strong); }
.chart-grid span { position: absolute; right: calc(100% + 8px); top: -8px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.chart-cols { position: absolute; inset: 0; display: flex; align-items: flex-end; }
.chart-col { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; padding: 0 1px; position: relative; border-radius: 6px; }
.chart-col:hover, .chart-col.on { background: color-mix(in srgb, var(--text) 5%, transparent); }
.chart-col i { display: block; width: min(10px, 40%); border-radius: 4px 4px 0 0; min-height: 0; }
.chart-col i.in { background: var(--in-mark); }
.chart-col i.out { background: var(--out-mark); }
.chart-x { display: flex; margin-left: 44px; margin-top: 6px; }
.chart-x span { flex: 1; text-align: center; font-size: 11px; color: var(--muted); }
.tip {
  position: absolute; z-index: 5; pointer-events: none;
  min-width: 170px; padding: 10px 12px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg);
  font-size: 13px;
}
.tip b { display: block; margin-bottom: 4px; }
.tip div { display: flex; justify-content: space-between; gap: 14px; }
.tip i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }

.bars { display: grid; gap: 14px; }
.bar-row .top { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.bar-row .top span:first-child { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 8px; border-radius: 99px; background: var(--surface-3); margin-top: 6px; overflow: hidden; }
.bar-track i { display: block; height: 100%; border-radius: 99px; background: var(--brand); }
.bar-track i.in { background: var(--in-mark); }
.bar-track i.out { background: var(--out-mark); }

.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line); }
.tbl th { text-align: left; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.tbl .r { text-align: right; }
.tbl-wrap { max-height: 360px; overflow: auto; border-top: 1px solid var(--line); }

/* ---------- Sheet / modal ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 50; background: var(--backdrop); animation: fade .18s ease-out; }
.sheet {
  position: fixed; z-index: 51; left: 0; right: 0; bottom: 0;
  max-height: 94dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  padding: 8px 18px calc(18px + env(safe-area-inset-bottom));
  box-shadow: var(--shadow-lg);
  animation: up .24s cubic-bezier(.2, .8, .2, 1);
}
.sheet::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 9px; background: var(--line-strong); margin: 2px auto 10px; }
.sheet-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sheet-h h2 { font-size: 20px; font-weight: 750; letter-spacing: -.02em; }
.sheet-h p { color: var(--muted); font-size: 14px; }
.sheet-b { display: grid; gap: 16px; }
.sheet-f {
  position: sticky; z-index: 2;
  bottom: calc(-18px - env(safe-area-inset-bottom));
  display: flex; gap: 10px;
  margin: 20px -18px calc(-18px - env(safe-area-inset-bottom));
  padding: 12px 18px calc(18px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.sheet-f .btn-primary { flex: 1; }
.sheet-f .btn-danger { margin-right: auto; }
.row2 { display: grid; grid-template-columns: 1fr; gap: 16px; }
.row2.keep { grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 480px) { .row2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 768px) {
  .sheet {
    left: 50%; top: 50%; bottom: auto; right: auto;
    width: min(560px, calc(100vw - 48px)); max-height: calc(100dvh - 48px);
    transform: translate(-50%, -50%);
    border-radius: 22px; padding: 24px;
    animation: pop .2s cubic-bezier(.2, .8, .2, 1);
  }
  .sheet-f { bottom: -24px; margin: 22px -24px -24px; padding: 16px 24px 24px; }
  .sheet::before { display: none; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(100%); } }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -48%) scale(.98); } }

.amount { position: relative; }
.amount b { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 28px; font-weight: 700; color: var(--faint); }
.amount .input { height: 72px; padding-left: 48px; font-size: 34px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hint { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; }
.hint .ico { width: 16px; height: 16px; margin-top: 1px; }
.err-msg { color: var(--out); font-size: 13px; font-weight: 600; }

.typegrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.typegrid button {
  display: flex; align-items: center; gap: 10px; text-align: left;
  min-height: 64px; padding: 10px 12px; border-radius: 14px;
  border: 1.5px solid var(--line-strong); background: var(--surface);
}
.typegrid button b { display: block; font-size: 15px; }
.typegrid button small { display: block; font-size: 12px; color: var(--muted); line-height: 1.3; }
.typegrid button[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent); }

.chooser { display: grid; gap: 12px; }
.chooser .quick-btn { height: 76px; font-size: 19px; }

.menu { display: grid; gap: 4px; }
.menu button, .menu a { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 0 12px; border-radius: 12px; text-align: left; font-weight: 600; }
.menu button:hover, .menu a:hover { background: var(--surface-2); }
.menu .ico-wrap { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); }
.menu small { display: block; color: var(--muted); font-weight: 500; font-size: 13px; }
.menu .danger { color: var(--out); }
.menu .danger .ico-wrap { background: var(--out-soft); color: var(--out); }
.divider { height: 1px; background: var(--line); margin: 8px 0; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; z-index: 60; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tabbar-h) + 18px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 14px;
  max-width: calc(100vw - 32px); padding: 12px 14px 12px 16px;
  border-radius: 14px; background: var(--hero-bg); color: var(--hero-text);
  box-shadow: var(--shadow-lg); font-weight: 600; font-size: 15px;
  animation: toast .25s cubic-bezier(.2, .8, .2, 1);
}
.toast .ico { color: #4ADE80; }
.toast button { color: #A5B8FF; font-weight: 700; padding: 6px 8px; border-radius: 8px; }
@media (min-width: 768px) { .toast { bottom: 28px; left: calc(50% + var(--rail-w) / 2); } }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 12px); } }

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

/* ---------- Ek parçalar ---------- */
.row .body { display: block; min-width: 0; }
.row .t { display: block; }
.avatar { background: hsl(var(--h, 220) 70% 93%); color: hsl(var(--h, 220) 55% 30%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .avatar { background: hsl(var(--h, 220) 30% 22%); color: hsl(var(--h, 220) 70% 80%); } }
:root[data-theme="dark"] .avatar { background: hsl(var(--h, 220) 30% 22%); color: hsl(var(--h, 220) 70% 80%); }
.kv { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 0; color: var(--text-2); font-size: 15px; }
.kv b { font-size: 16px; font-weight: 700; }
.kv.total { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 11px; margin-bottom: 12px; color: var(--text); font-weight: 600; }
.kv.total b { font-size: 19px; }
.mini-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-top: 10px; padding-bottom: 8px; }
.mini-two > div { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.mini-two span { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.mini-two b { display: block; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-primary.btn-in { background: var(--in-mark); color: #fff; }
.btn-primary.btn-out { background: var(--out-mark); color: #fff; }
.today-main { min-width: 0; }
.md-list, .md-detail { min-width: 0; }
.cari-detail .ledger-wrap { margin-top: 8px; }
.cari-detail .list { padding-top: 6px; }
.tag + .tag { margin-left: 0; }
.sheet .hint b { color: var(--text); }
