@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700&display=swap');

:root {
  color-scheme: light;
  --bg: #f3f1ea;
  --bg-soft: #ebe8df;
  --surface: #fffdf8;
  --surface-strong: #ffffff;
  --surface-muted: #f6f4ed;
  --text: #183129;
  --text-soft: #44564f;
  --muted: #707974;
  --border: #dedbd1;
  --border-strong: #cbc8bc;
  --primary: #173b32;
  --primary-hover: #214d41;
  --primary-soft: #e1ebe6;
  --accent: #f4c99b;
  --accent-deep: #d99b65;
  --income: #4f806e;
  --income-soft: #e1eee8;
  --expense: #c9785b;
  --expense-soft: #f6e7e0;
  --saving: #7d855d;
  --saving-soft: #ecefdf;
  --budget: #6f8fa0;
  --budget-soft: #e6eef2;
  --danger: #a64e48;
  --danger-soft: #f7e4e2;
  --warning: #a66f34;
  --warning-soft: #fbedd8;
  --shadow-sm: 0 8px 24px rgba(25, 52, 43, .06);
  --shadow-lg: 0 28px 80px rgba(18, 48, 39, .16);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 30px;
  --sidebar-width: 252px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  font-family: "Be Vietnam Pro", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111a17;
  --bg-soft: #0d1512;
  --surface: #18231f;
  --surface-strong: #1d2a25;
  --surface-muted: #202d28;
  --text: #ecf1ee;
  --text-soft: #c2cec8;
  --muted: #919e98;
  --border: #2b3934;
  --border-strong: #3b4a44;
  --primary: #79aa98;
  --primary-hover: #8db9a8;
  --primary-soft: #243c34;
  --accent: #e7b986;
  --accent-deep: #c99059;
  --income: #78aa97;
  --income-soft: #203a32;
  --expense: #dc9378;
  --expense-soft: #432e28;
  --saving: #a7af7f;
  --saving-soft: #343927;
  --budget: #8cadbd;
  --budget-soft: #263b44;
  --danger: #e08b84;
  --danger-soft: #452b2a;
  --warning: #dcaa68;
  --warning-soft: #493721;
  --shadow-sm: 0 10px 28px rgba(0, 0, 0, .16);
  --shadow-lg: 0 28px 90px rgba(0, 0, 0, .36);
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: var(--bg); font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button { border: 0; }
a { color: inherit; text-decoration: none; }
svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 42%, transparent); outline-offset: 2px; }
::selection { background: var(--accent); color: #173b32; }

h1, h2, h3, h4, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(25px, 2.2vw, 34px); line-height: 1.15; letter-spacing: -.035em; }
h2 { margin-bottom: 0; font-size: 18px; line-height: 1.3; letter-spacing: -.02em; }
h3 { margin-bottom: 4px; font-size: 16px; line-height: 1.35; }
h4 { margin-bottom: 10px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.muted { color: var(--muted); }
.eyebrow { margin-bottom: 6px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }

.app-shell { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; z-index: 30; display: flex; flex-direction: column; height: 100vh; padding: 24px 18px 18px; color: #edf4f0; background: #173b32; overflow: auto; }
:root[data-theme="dark"] .sidebar { background: #0b1512; border-right: 1px solid #22312c; }
.brand { display: flex; align-items: center; gap: 11px; min-height: 44px; padding: 3px 8px; font-size: 15px; font-weight: 700; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 11px; color: #173b32; background: var(--accent); font-size: 16px; font-weight: 800; box-shadow: inset 0 0 0 1px rgba(255,255,255,.3); }
.brand--light { color: #fff; padding: 0; }
.side-nav { display: grid; gap: 5px; margin-top: 34px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 13px; width: 100%; min-height: 46px; padding: 0 13px; border-radius: 13px; color: #b8c9c2; background: transparent; text-align: left; transition: color .18s var(--ease), background .18s var(--ease), transform .18s var(--ease); }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-item:active { transform: scale(.98); }
.nav-item.is-active { color: #fff; background: rgba(255,255,255,.115); box-shadow: inset 3px 0 0 var(--accent); }
.nav-item svg { width: 19px; height: 19px; }
.nav-item span:nth-child(2) { font-weight: 600; }
.nav-badge { min-width: 21px; height: 21px; margin-left: auto; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; color: #173b32; background: var(--accent); font-size: 10px; font-weight: 700; }
.sidebar-spacer { flex: 1; min-height: 24px; }
.side-balance { margin: 18px 4px 14px; padding: 16px; border: 1px solid rgba(255,255,255,.1); border-radius: 16px; background: rgba(255,255,255,.055); }
.side-balance > span, .side-balance small { display: block; color: #a9beb5; font-size: 11px; }
.side-balance strong { display: block; margin: 5px 0 3px; color: #fff; font-size: 18px; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.user-menu { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 10px 5px 0; border-top: 1px solid rgba(255,255,255,.1); }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 auto; border-radius: 12px; color: #173b32; background: #b9d1c7; font-weight: 800; }
.user-copy { min-width: 0; flex: 1; }
.user-copy strong, .user-copy small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-copy strong { color: #fff; font-size: 12px; }
.user-copy small { color: #9bb1a8; font-size: 10px; }
.user-menu .icon-button { color: #b8c9c2; }

.main-content { min-width: 0; width: 100%; max-width: 1660px; margin: 0 auto; padding: 0 34px 52px; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 102px; padding: 18px 0; background: color-mix(in srgb, var(--bg) 91%, transparent); backdrop-filter: blur(16px); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.month-control { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); box-shadow: var(--shadow-sm); }
.month-control svg { width: 17px; height: 17px; color: var(--muted); }
.month-control input { width: 126px; border: 0; outline: 0; background: transparent; font-size: 12px; font-weight: 600; }
.sync-status { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 8px; color: var(--muted); font-size: 10px; font-weight: 600; }
.sync-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--income); box-shadow: 0 0 0 4px var(--income-soft); }
.sync-status.is-pending i { background: var(--warning); box-shadow: 0 0 0 4px var(--warning-soft); }
.sync-status.is-syncing i { background: var(--budget); animation: pulse 1s infinite; }
.offline-banner { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; padding: 12px 15px; border: 1px solid color-mix(in srgb, var(--warning) 35%, var(--border)); border-radius: 14px; color: var(--warning); background: var(--warning-soft); font-size: 12px; }
.offline-banner svg { flex: 0 0 auto; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 17px; border: 1px solid transparent; border-radius: 13px; font-size: 12px; font-weight: 700; line-height: 1; transition: transform .16s var(--ease), background .16s var(--ease), border-color .16s var(--ease), box-shadow .16s var(--ease); }
.button:hover { transform: translateY(-1px); }
.button:active { transform: scale(.98); }
.button svg { width: 17px; height: 17px; }
.button--primary { color: #fff; background: var(--primary); box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 18%, transparent); }
:root[data-theme="dark"] .button--primary { color: #0f1d18; }
.button--primary:hover { background: var(--primary-hover); }
.button--secondary { color: var(--primary); border-color: var(--border-strong); background: var(--surface); }
.button--secondary:hover { border-color: var(--primary); background: var(--primary-soft); }
.button--soft { color: var(--primary); background: var(--primary-soft); }
.button--ghost { color: var(--text-soft); background: transparent; }
.button--archive { margin-right: auto; color: var(--danger); }
.button--danger { color: #fff; background: var(--danger); }
.button--block { width: 100%; }
.icon-button { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: 0 0 auto; border: 1px solid var(--border); border-radius: 13px; color: var(--text-soft); background: var(--surface); transition: transform .16s var(--ease), color .16s var(--ease), background .16s var(--ease); }
.icon-button:hover { color: var(--primary); background: var(--primary-soft); }
.icon-button:active { transform: scale(.96); }
.icon-button--quiet { width: 38px; height: 38px; border-color: transparent; background: transparent; box-shadow: none; }
.text-button { min-height: 36px; padding: 0 2px; color: var(--primary); background: transparent; font-size: 11px; font-weight: 700; }
.text-button:hover { text-decoration: underline; text-underline-offset: 4px; }

.view { animation: view-in .24s var(--ease); }
.view-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.view-heading h2 { font-size: 24px; }
.view-heading p:not(.eyebrow) { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.view-heading--compact { align-items: center; margin: 4px 0 18px; }
.view-heading--compact h3 { font-size: 17px; }

.balance-hero { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, .65fr); gap: 38px; min-height: 210px; padding: 34px 38px; overflow: hidden; border-radius: var(--radius-xl); color: #f5faf7; background: #173b32; box-shadow: 0 24px 60px rgba(23, 59, 50, .18); }
:root[data-theme="dark"] .balance-hero { background: #203f36; }
.balance-main, .forecast-block { position: relative; z-index: 2; align-self: center; }
.balance-label { display: block; margin-bottom: 10px; color: #b9d0c7; font-size: 12px; font-weight: 600; }
.balance-main strong { display: block; font-size: clamp(36px, 5vw, 60px); line-height: 1.05; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.balance-context { display: block; margin-top: 12px; color: #acc2ba; font-size: 11px; }
.forecast-block { padding: 6px 0 6px 28px; border-left: 1px solid rgba(255,255,255,.18); }
.forecast-block > span { color: #b9d0c7; font-size: 11px; }
.forecast-block strong { display: block; margin: 8px 0; color: var(--accent); font-size: 27px; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.forecast-block small { display: block; max-width: 260px; color: #a9beb6; line-height: 1.55; }
.hero-orbit { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-orbit::before, .hero-orbit::after { content: ""; position: absolute; border: 1px solid rgba(244,201,155,.2); border-radius: 50%; }
.hero-orbit::before { width: 360px; height: 360px; right: -80px; top: -210px; }
.hero-orbit::after { width: 240px; height: 240px; right: 10px; top: -145px; }
.hero-orbit span { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); opacity: .72; }
.hero-orbit span:nth-child(1) { right: 210px; top: 38px; }
.hero-orbit span:nth-child(2) { right: 87px; top: 100px; width: 5px; height: 5px; background: #93c1af; }
.hero-orbit span:nth-child(3) { right: 250px; bottom: 24px; width: 4px; height: 4px; }

.metric-ribbon { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 18px 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.metric-ribbon article { min-width: 0; padding: 20px 22px; border-right: 1px solid var(--border); }
.metric-ribbon article:last-child { border-right: 0; }
.metric-ribbon article > span { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.metric-ribbon strong { display: block; margin: 7px 0 2px; font-size: clamp(17px, 2vw, 23px); line-height: 1.25; letter-spacing: -.035em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.metric-ribbon small { color: var(--muted); font-size: 10px; }
.signal { display: inline-block; width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; }
.signal--income { background: var(--income); }
.signal--expense { background: var(--expense); }
.signal--saving { background: var(--saving); }
.signal--budget { background: var(--budget); }

.dashboard-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.panel { min-width: 0; padding: 23px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.panel--cashflow { grid-column: span 7; }
.panel--budget { grid-column: span 5; display: grid; grid-template-columns: 140px 1fr; align-items: center; column-gap: 24px; }
.panel--budget .panel-heading { grid-column: 1 / -1; }
.panel--budget .button { grid-column: 1 / -1; margin-top: 16px; }
.panel--accounts { grid-column: span 4; }
.panel--upcoming { grid-column: span 4; }
.panel--insights { grid-column: span 4; }
.panel--recent { grid-column: span 8; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 19px; }
.panel-heading .eyebrow { margin-bottom: 3px; }
.heading-icon { width: 24px; height: 24px; color: var(--accent-deep); }
.cashflow-rail { display: flex; width: 100%; height: 12px; overflow: hidden; border-radius: 999px; background: var(--surface-muted); }
.cashflow-income, .cashflow-expense { min-width: 2px; transition: width .5s var(--ease); }
.cashflow-income { background: var(--income); }
.cashflow-expense { background: var(--expense); }
.cashflow-legend { display: flex; justify-content: space-between; gap: 16px; margin: 10px 0 22px; }
.cashflow-legend span { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.cashflow-legend b { color: var(--text); font-variant-numeric: tabular-nums; }
.category-bars { display: grid; gap: 13px; }
.category-row { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(90px, 2fr) auto; align-items: center; gap: 12px; }
.category-name { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 11px; font-weight: 600; }
.category-name i { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 3px; background: var(--category-color, var(--muted)); }
.category-name span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 7px; overflow: hidden; border-radius: 99px; background: var(--surface-muted); }
.bar-track span { display: block; width: var(--bar, 0%); height: 100%; border-radius: inherit; background: var(--category-color, var(--primary)); transition: width .5s var(--ease); }
.category-row strong { min-width: 90px; text-align: right; font-size: 11px; font-variant-numeric: tabular-nums; }
.budget-ring { --ring-color: var(--budget); width: 128px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--ring-color) calc(min(var(--progress), 100) * 1%), var(--surface-muted) 0); position: relative; }
.budget-ring::after { content: ""; position: absolute; inset: 13px; border-radius: 50%; background: var(--surface); }
.budget-ring > div { position: relative; z-index: 1; text-align: center; }
.budget-ring strong, .budget-ring span { display: block; }
.budget-ring strong { font-size: 24px; letter-spacing: -.04em; }
.budget-ring span { color: var(--muted); font-size: 9px; }
.budget-ring.is-over { --ring-color: var(--expense); }
.budget-copy strong { display: block; margin-bottom: 7px; font-size: 16px; line-height: 1.35; }
.budget-copy span { color: var(--muted); font-size: 10px; line-height: 1.55; }
.account-stack { display: grid; gap: 10px; }
.account-line { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.account-line:last-child { border-bottom: 0; }
.account-dot { width: 10px; height: 28px; border-radius: 5px; background: var(--account-color, var(--primary)); }
.account-line span { min-width: 0; }
.account-line span strong, .account-line span small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-line span strong { font-size: 11px; }
.account-line span small { color: var(--muted); font-size: 9px; }
.account-line > strong { font-size: 12px; font-variant-numeric: tabular-nums; }
.compact-list { display: grid; }
.compact-item { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 11px; min-height: 57px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.compact-item:last-child { border-bottom: 0; }
.due-date { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: var(--primary); background: var(--primary-soft); }
.due-date strong, .due-date small { display: block; line-height: 1.05; text-align: center; }
.due-date strong { font-size: 14px; }
.due-date small { margin-top: 3px; font-size: 8px; text-transform: uppercase; }
.compact-copy { min-width: 0; }
.compact-copy strong, .compact-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compact-copy strong { font-size: 11px; }
.compact-copy small { color: var(--muted); font-size: 9px; }
.compact-amount { text-align: right; }
.compact-amount strong, .compact-amount small { display: block; }
.compact-amount strong { font-size: 11px; font-variant-numeric: tabular-nums; }
.compact-amount small { color: var(--muted); font-size: 9px; }
.transaction-list { display: grid; }
.transaction-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 62px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.transaction-item:last-child { border-bottom: 0; }
.transaction-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; color: var(--category-color, var(--primary)); background: color-mix(in srgb, var(--category-color, var(--primary)) 12%, var(--surface)); font-size: 15px; font-weight: 700; }
.transaction-copy { min-width: 0; }
.transaction-copy strong, .transaction-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.transaction-copy strong { font-size: 11px; }
.transaction-copy small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.transaction-amount { text-align: right; }
.transaction-amount strong, .transaction-amount small { display: block; font-variant-numeric: tabular-nums; }
.transaction-amount strong { font-size: 12px; }
.transaction-amount small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.transaction-amount.is-income strong, .transaction-amount.is-refund strong { color: var(--income); }
.transaction-amount.is-expense strong { color: var(--expense); }
.transaction-amount.is-transfer strong { color: var(--text-soft); }
.insight-list { display: grid; gap: 10px; }
.insight-item { position: relative; padding: 13px 14px 13px 35px; border-radius: 14px; background: var(--surface-muted); }
.insight-item::before { content: ""; position: absolute; left: 15px; top: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--budget); box-shadow: 0 0 0 4px var(--budget-soft); }
.insight-item[data-tone="positive"]::before { background: var(--income); box-shadow: 0 0 0 4px var(--income-soft); }
.insight-item[data-tone="warning"]::before { background: var(--warning); box-shadow: 0 0 0 4px var(--warning-soft); }
.insight-item strong, .insight-item span { display: block; }
.insight-item strong { font-size: 11px; }
.insight-item span { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.5; }

.empty-state { display: grid; place-items: center; min-height: 150px; padding: 24px; text-align: center; }
.empty-state--compact { min-height: 100px; padding: 12px; }
.empty-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 10px; border-radius: 16px; color: var(--muted); background: var(--surface-muted); }
.empty-icon svg { width: 22px; height: 22px; }
.empty-state strong { font-size: 12px; }
.empty-state p { max-width: 330px; margin: 5px 0 0; color: var(--muted); font-size: 10px; }

.filter-bar { display: grid; grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(140px, .36fr)); gap: 10px; margin-bottom: 14px; }
.filter-bar select, .data-panel-head select, .field input, .field select, .field textarea, .search-field, .money-field { border: 1px solid var(--border); border-radius: 13px; background: var(--surface); }
.filter-bar > select { width: 100%; min-height: 46px; padding: 0 12px; }
.search-field { display: flex; align-items: center; min-height: 46px; padding: 0 13px; }
.search-field svg { width: 17px; height: 17px; flex: 0 0 auto; color: var(--muted); }
.search-field input { min-width: 0; width: 100%; height: 42px; padding: 0 10px; border: 0; outline: 0; background: transparent; }
.data-panel { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; }
.data-panel-head { display: flex; align-items: center; justify-content: space-between; min-height: 58px; padding: 0 18px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 10px; font-weight: 600; }
.data-panel-head label { display: flex; align-items: center; gap: 8px; }
.data-panel-head select { min-height: 32px; padding: 0 8px; }
.transaction-table { min-height: 280px; }
.transaction-row { display: grid; grid-template-columns: minmax(170px, 1.2fr) minmax(130px, .9fr) minmax(130px, .8fr) minmax(120px, .7fr) auto; align-items: center; gap: 18px; min-height: 72px; padding: 10px 18px; border-bottom: 1px solid var(--border); transition: background .15s; }
.transaction-row:hover { background: var(--surface-muted); }
.transaction-row:last-child { border-bottom: 0; }
.transaction-row .transaction-item { min-height: auto; padding: 0; border: 0; grid-template-columns: auto minmax(0,1fr); }
.table-cell { min-width: 0; }
.table-cell span, .table-cell small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-cell span { font-size: 11px; font-weight: 600; }
.table-cell small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.row-amount { font-size: 12px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.row-actions { display: flex; gap: 3px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 62px; padding: 10px; border-top: 1px solid var(--border); }
.pagination button { display: grid; place-items: center; min-width: 36px; height: 36px; padding: 0 8px; border: 1px solid transparent; border-radius: 10px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 700; }
.pagination button:hover { background: var(--surface-muted); }
.pagination button.is-active { color: var(--primary); border-color: var(--border); background: var(--primary-soft); }
.pagination button:disabled { opacity: .35; cursor: not-allowed; }

.segmented-tabs { display: inline-flex; gap: 4px; margin-bottom: 20px; padding: 4px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.segmented-tabs button { min-height: 40px; padding: 0 18px; border-radius: 10px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 700; }
.segmented-tabs button.is-active { color: var(--primary); background: var(--primary-soft); }
.plan-pane { animation: view-in .2s var(--ease); }
.plan-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-bottom: 22px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--border); }
.plan-summary article { padding: 22px; background: var(--surface); }
.plan-summary span, .plan-summary small, .plan-summary strong { display: block; }
.plan-summary span { color: var(--muted); font-size: 10px; font-weight: 600; }
.plan-summary strong { margin: 6px 0 2px; font-size: 22px; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.plan-summary small { color: var(--muted); font-size: 9px; }
.budget-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.budget-card { padding: 18px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.budget-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.budget-category { display: flex; align-items: center; min-width: 0; gap: 9px; }
.budget-category i { width: 11px; height: 26px; border-radius: 5px; background: var(--category-color); }
.budget-category span { min-width: 0; font-size: 11px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.budget-values { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 18px 0 9px; }
.budget-values strong { font-size: 18px; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.budget-values span { color: var(--muted); font-size: 9px; }
.budget-card .bar-track { height: 8px; }
.budget-card-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; color: var(--muted); font-size: 9px; }
.recurring-list { display: grid; gap: 10px; }
.recurring-card { display: grid; grid-template-columns: auto minmax(0,1.3fr) minmax(110px,.45fr) minmax(110px,.45fr) auto; align-items: center; gap: 16px; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.recurring-badge { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; color: var(--category-color, var(--primary)); background: color-mix(in srgb, var(--category-color, var(--primary)) 12%, var(--surface)); font-weight: 800; }
.recurring-main { min-width: 0; }
.recurring-main strong, .recurring-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recurring-main strong { font-size: 12px; }
.recurring-main small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.recurring-meta span, .recurring-meta strong { display: block; }
.recurring-meta span { color: var(--muted); font-size: 9px; }
.recurring-meta strong { margin-top: 4px; font-size: 11px; font-variant-numeric: tabular-nums; }
.recurring-actions { display: flex; align-items: center; gap: 4px; }

.account-overview { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; margin-bottom: 20px; }
.account-card { position: relative; overflow: hidden; min-height: 170px; padding: 22px; border: 1px solid var(--border); border-radius: var(--radius-lg); color: #f7fbf9; background: var(--account-color, #477a6a); box-shadow: var(--shadow-sm); }
.account-card::after { content: ""; position: absolute; width: 180px; height: 180px; right: -85px; top: -95px; border: 1px solid rgba(255,255,255,.24); border-radius: 50%; box-shadow: 0 0 0 34px rgba(255,255,255,.05); }
.account-card-head { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 10px; }
.account-card-head span { color: rgba(255,255,255,.72); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.account-card-head .icon-button { color: #fff; background: rgba(0,0,0,.12); }
.account-card h3 { position: relative; z-index: 1; margin-top: 17px; color: #fff; }
.account-card .account-balance { position: relative; z-index: 1; display: block; margin-top: 8px; font-size: 25px; font-weight: 700; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.account-card small { position: absolute; z-index: 1; left: 22px; bottom: 18px; color: rgba(255,255,255,.75); font-size: 9px; }
.category-manager { padding: 22px; overflow: visible; }
.category-columns { display: grid; grid-template-columns: 1.4fr .8fr; gap: 28px; }
.chip-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.category-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 11px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-muted); font-size: 10px; font-weight: 600; }
.category-chip i { width: 8px; height: 8px; border-radius: 3px; background: var(--category-color); }
.category-chip small { color: var(--muted); font-size: 8px; }
.category-chip:hover { border-color: var(--category-color); }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.settings-card { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 16px; min-height: 190px; padding: 23px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.settings-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; color: var(--primary); background: var(--primary-soft); }
.settings-card p { max-width: 520px; margin: 7px 0 17px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.pending-copy { color: var(--muted); font-size: 10px; }

.sheet-dialog, .confirm-dialog { width: min(620px, calc(100vw - 30px)); max-width: none; max-height: min(88vh, 850px); padding: 0; border: 0; border-radius: var(--radius-lg); color: var(--text); background: transparent; box-shadow: var(--shadow-lg); overflow: visible; }
.sheet-dialog::backdrop, .confirm-dialog::backdrop { background: rgba(8, 23, 18, .56); backdrop-filter: blur(4px); }
.sheet-dialog[open], .confirm-dialog[open] { animation: dialog-in .22s var(--ease); }
.dialog-card { max-height: min(88vh, 850px); padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-strong); overflow: auto; }
.dialog-card--small { width: min(480px, 100%); margin: 0 auto; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.dialog-header h2 { font-size: 21px; }
.type-switch { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-bottom: 17px; padding: 4px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-muted); }
.type-switch--two { grid-template-columns: repeat(2, 1fr); }
.type-switch button { min-height: 39px; border-radius: 10px; color: var(--muted); background: transparent; font-size: 10px; font-weight: 700; }
.type-switch button.is-active { color: var(--primary); background: var(--surface-strong); box-shadow: 0 3px 10px rgba(0,0,0,.06); }
.amount-entry { display: block; margin-bottom: 18px; padding: 16px 18px; border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--border)); border-radius: 16px; background: var(--primary-soft); }
.amount-entry > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 10px; font-weight: 600; }
.amount-entry > div { display: flex; align-items: baseline; gap: 10px; }
.amount-entry input { min-width: 0; width: 100%; padding: 0; border: 0; outline: 0; color: var(--primary); background: transparent; font-size: 34px; font-weight: 700; line-height: 1.25; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.amount-entry em { color: var(--primary); font-size: 17px; font-style: normal; font-weight: 700; }
.amount-entry--compact input { font-size: 28px; }
.form-stack { display: grid; gap: 14px; }
.form-grid { display: grid; gap: 13px; }
.form-grid--2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.field { display: grid; gap: 7px; min-width: 0; }
.field > span { color: var(--text-soft); font-size: 10px; font-weight: 700; }
.field > span b { color: var(--danger); }
.field > span small, .field > small { color: var(--muted); font-size: 9px; font-weight: 400; }
.field input:not([type="color"]), .field select, .field textarea { width: 100%; min-height: 44px; padding: 10px 12px; outline: 0; }
.field textarea { resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus, .money-field:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 11%, transparent); }
.money-field { display: flex; align-items: center; overflow: hidden; }
.money-field input { flex: 1; min-width: 0; border: 0 !important; box-shadow: none !important; background: transparent; }
.money-field em { padding: 0 12px; color: var(--muted); font-style: normal; font-weight: 700; }
.color-input { width: 100%; min-height: 44px; padding: 5px; }
.check-row { display: flex; align-items: flex-start; gap: 11px; padding: 13px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-muted); cursor: pointer; }
.check-row input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--primary); }
.check-row span { min-width: 0; }
.check-row strong, .check-row small { display: block; }
.check-row strong { font-size: 10px; }
.check-row small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; padding-top: 17px; border-top: 1px solid var(--border); }
.confirm-dialog { width: min(420px, calc(100vw - 30px)); }
.confirm-card { padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-strong); text-align: center; }
.confirm-icon { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 15px; border-radius: 16px; color: var(--danger); background: var(--danger-soft); }
.confirm-card p { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.confirm-card .dialog-actions { justify-content: center; }
.toast-region { position: fixed; z-index: 100; right: 22px; bottom: 22px; display: grid; gap: 8px; width: min(360px, calc(100vw - 28px)); pointer-events: none; }
.toast { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 13px 14px; border: 1px solid var(--border); border-radius: 14px; color: var(--text); background: var(--surface-strong); box-shadow: var(--shadow-lg); pointer-events: auto; animation: toast-in .24s var(--ease); }
.toast::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--income); box-shadow: 0 0 0 4px var(--income-soft); }
.toast.is-error::before { background: var(--danger); box-shadow: 0 0 0 4px var(--danger-soft); }
.toast.is-warning::before { background: var(--warning); box-shadow: 0 0 0 4px var(--warning-soft); }
.toast span { font-size: 10px; font-weight: 600; }
.toast button { width: 28px; height: 28px; border-radius: 8px; color: var(--muted); background: transparent; }

.skeleton { position: relative; overflow: hidden; border-radius: 8px; background: var(--surface-muted); }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface-strong) 70%, transparent), transparent); animation: shimmer 1.4s infinite; }
.skeleton--row { height: 34px; }

.mobile-nav, .mobile-fab { display: none; }

.auth-body { min-height: 100vh; padding: 28px; background: #102c25; }
.auth-shell { display: grid; grid-template-columns: minmax(300px, .9fr) minmax(420px, 1fr); width: min(1060px, 100%); min-height: min(760px, calc(100vh - 56px)); margin: 0 auto; overflow: hidden; border-radius: 30px; background: var(--surface); box-shadow: 0 36px 100px rgba(0,0,0,.28); }
.auth-shell--login { min-height: min(650px, calc(100vh - 56px)); }
.auth-intro { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: space-between; padding: 42px; overflow: hidden; color: #eef6f2; background: #1c493d; }
.auth-intro::before, .auth-intro::after { content: ""; position: absolute; z-index: -1; border: 1px solid rgba(244,201,155,.25); border-radius: 50%; }
.auth-intro::before { width: 440px; height: 440px; right: -220px; top: -170px; }
.auth-intro::after { width: 290px; height: 290px; right: -120px; top: -80px; }
.auth-intro .eyebrow { color: #b4cdc3; }
.auth-intro h1 { max-width: 510px; margin-bottom: 18px; font-size: clamp(33px, 4vw, 50px); line-height: 1.13; }
.auth-intro p:not(.eyebrow) { max-width: 490px; margin-bottom: 0; color: #b9cec6; line-height: 1.75; }
.auth-points { display: grid; gap: 13px; margin: 28px 0 0; padding: 0; list-style: none; }
.auth-points li { display: flex; align-items: center; gap: 12px; color: #d6e3de; font-size: 11px; }
.auth-points span { display: grid; place-items: center; width: 34px; height: 28px; border-radius: 9px; color: var(--accent); background: rgba(255,255,255,.08); font-size: 9px; font-weight: 700; }
.auth-footnote { font-size: 10px; }
.auth-card { align-self: center; width: min(470px, 100%); margin: 0 auto; padding: 44px; }
.auth-card h2 { margin-bottom: 7px; font-size: 28px; }
.auth-card > .muted { margin-bottom: 25px; }
.auth-card code { padding: 2px 6px; border-radius: 5px; background: var(--surface-muted); }
.form-alert { margin-bottom: 17px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--danger) 30%, var(--border)); border-radius: 12px; color: var(--danger); background: var(--danger-soft); font-size: 10px; }
.status-pill { display: inline-flex; align-items: center; min-height: 28px; margin-bottom: 14px; padding: 0 10px; border-radius: 999px; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.status-pill--warning { color: var(--warning); background: var(--warning-soft); }
.status-pill--success { color: var(--income); background: var(--income-soft); }
.quiet-link { display: block; margin-top: 18px; color: var(--muted); font-size: 10px; text-align: center; }
.quiet-link:hover { color: var(--primary); text-decoration: underline; }

@keyframes view-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes pulse { 50% { opacity: .35; } }

@media (max-width: 1240px) {
  :root { --sidebar-width: 220px; }
  .main-content { padding-inline: 24px; }
  .panel--cashflow { grid-column: span 8; }
  .panel--budget { grid-column: span 4; grid-template-columns: 1fr; text-align: center; }
  .panel--budget .budget-ring { margin: 0 auto 14px; }
  .panel--accounts, .panel--upcoming, .panel--insights { grid-column: span 6; }
  .panel--recent { grid-column: span 6; }
  .budget-grid, .account-overview { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .transaction-row { grid-template-columns: minmax(160px,1.2fr) minmax(120px,.8fr) minmax(110px,.65fr) auto; }
  .transaction-row > .table-cell:nth-of-type(3) { display: none; }
}

@media (max-width: 1020px) {
  :root { --sidebar-width: 82px; }
  .sidebar { padding-inline: 12px; }
  .brand { justify-content: center; padding: 0; }
  .brand > span:last-child, .nav-item > span:nth-child(2), .side-balance, .user-copy { display: none; }
  .nav-item { justify-content: center; padding: 0; }
  .nav-item.is-active { box-shadow: inset 0 -3px 0 var(--accent); }
  .nav-badge { position: absolute; right: 8px; top: 5px; display: grid !important; }
  .user-menu { justify-content: center; flex-wrap: wrap; }
  .user-menu form { width: 100%; display: flex; justify-content: center; }
  .balance-hero { grid-template-columns: 1.2fr .8fr; }
  .metric-ribbon { grid-template-columns: repeat(2, 1fr); }
  .metric-ribbon article:nth-child(2) { border-right: 0; }
  .metric-ribbon article:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .panel--cashflow, .panel--budget, .panel--accounts, .panel--upcoming, .panel--recent, .panel--insights { grid-column: span 6; }
  .filter-bar { grid-template-columns: repeat(3, 1fr); }
  .search-field { grid-column: 1 / -1; }
  .auth-shell { grid-template-columns: .8fr 1fr; }
  .auth-intro { padding: 34px; }
  .auth-card { padding: 34px; }
}

@media (max-width: 820px) {
  body { font-size: 13px; }
  .app-shell { display: block; min-height: 100svh; }
  .sidebar { display: none; }
  .main-content { max-width: none; padding: 0 14px calc(96px + env(safe-area-inset-bottom)); }
  .topbar { min-height: 84px; gap: 10px; padding: 12px 0; }
  .topbar .eyebrow { display: none; }
  .topbar h1 { font-size: 22px; }
  .topbar-actions { gap: 6px; }
  .sync-status, .top-add { display: none; }
  .month-control { min-height: 42px; padding-inline: 9px; }
  .month-control svg { display: none; }
  .month-control input { width: 113px; font-size: 11px; }
  .topbar .icon-button { width: 42px; height: 42px; }
  .balance-hero { grid-template-columns: 1fr; gap: 22px; min-height: 0; padding: 27px 24px; border-radius: 24px; }
  .balance-main strong { font-size: clamp(34px, 10vw, 48px); }
  .forecast-block { padding: 17px 0 0; border-top: 1px solid rgba(255,255,255,.16); border-left: 0; }
  .forecast-block strong { font-size: 23px; }
  .hero-orbit::before { right: -180px; }
  .hero-orbit::after { right: -90px; }
  .metric-ribbon { margin: 14px 0; border-radius: 18px; }
  .metric-ribbon article { padding: 16px; }
  .metric-ribbon strong { font-size: 17px; }
  .metric-ribbon small { display: none; }
  .dashboard-grid { grid-template-columns: 1fr; gap: 14px; }
  .panel--cashflow, .panel--budget, .panel--accounts, .panel--upcoming, .panel--recent, .panel--insights { grid-column: 1; }
  .panel { padding: 19px; border-radius: 19px; }
  .panel--budget { grid-template-columns: 118px 1fr; text-align: left; }
  .panel--budget .budget-ring { width: 108px; margin: 0; }
  .panel--budget .budget-ring strong { font-size: 21px; }
  .panel--recent { order: 2; }
  .panel--upcoming { order: 3; }
  .panel--cashflow { order: 4; }
  .panel--budget { order: 1; }
  .panel--accounts { order: 5; }
  .panel--insights { order: 6; }
  .view-heading { align-items: center; margin-bottom: 18px; }
  .view-heading h2 { font-size: 21px; }
  .view-heading > .button { min-width: 44px; padding-inline: 12px; }
  .view-heading > .button svg + * { display: none; }
  .filter-bar { display: flex; gap: 8px; margin-inline: -14px; padding: 0 14px 4px; overflow-x: auto; scrollbar-width: none; }
  .filter-bar::-webkit-scrollbar { display: none; }
  .filter-bar .search-field { min-width: calc(100vw - 28px); }
  .filter-bar > select { min-width: 150px; }
  .data-panel { margin-inline: -14px; border-right: 0; border-left: 0; border-radius: 0; }
  .transaction-row { grid-template-columns: minmax(0,1fr) auto auto; gap: 9px; min-height: 68px; padding: 9px 14px; }
  .transaction-row > .table-cell { display: none; }
  .row-amount { min-width: 100px; }
  .row-actions .icon-button { width: 36px; height: 36px; }
  .segmented-tabs { width: 100%; }
  .segmented-tabs button { flex: 1; }
  .plan-summary { grid-template-columns: 1fr; }
  .plan-summary article { padding: 17px; }
  .budget-grid, .account-overview, .settings-grid { grid-template-columns: 1fr; }
  .recurring-card { grid-template-columns: auto minmax(0,1fr) auto; gap: 10px; }
  .recurring-card > .recurring-meta:nth-of-type(2) { display: none; }
  .recurring-actions { grid-column: 2 / -1; justify-content: flex-end; }
  .category-columns { grid-template-columns: 1fr; }
  .settings-card { min-height: 0; }
  .mobile-nav { position: fixed; z-index: 45; left: 10px; right: 10px; bottom: calc(8px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; min-height: 68px; padding: 5px 6px; border: 1px solid var(--border); border-radius: 22px; background: color-mix(in srgb, var(--surface-strong) 94%, transparent); box-shadow: 0 18px 50px rgba(16,43,35,.22); backdrop-filter: blur(18px); }
  .mobile-nav button { display: grid; place-items: center; gap: 2px; min-width: 0; min-height: 54px; padding: 4px; border-radius: 16px; color: var(--muted); background: transparent; }
  .mobile-nav button.is-active { color: var(--primary); background: var(--primary-soft); }
  .mobile-nav svg { width: 19px; height: 19px; }
  .mobile-nav span { font-size: 8px; font-weight: 700; }
  .mobile-fab { position: fixed; z-index: 50; left: 50%; bottom: calc(40px + env(safe-area-inset-bottom)); display: grid; place-items: center; width: 58px; height: 58px; transform: translate(-50%, 50%); border: 5px solid var(--bg); border-radius: 20px; color: #fff; background: var(--primary); box-shadow: 0 12px 28px rgba(23,59,50,.3); }
  :root[data-theme="dark"] .mobile-fab { color: #10231d; }
  .mobile-fab svg { width: 23px; height: 23px; }
  .sheet-dialog { width: 100%; max-height: calc(94svh - env(safe-area-inset-bottom)); margin: auto 0 0; border-radius: 24px 24px 0 0; }
  .sheet-dialog[open] { animation: sheet-in .25s var(--ease); }
  .dialog-card, .dialog-card--small { width: 100%; max-height: calc(94svh - env(safe-area-inset-bottom)); padding: 20px 17px calc(20px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; }
  .dialog-header { position: sticky; top: -20px; z-index: 2; margin: -20px -17px 15px; padding: 20px 17px 13px; background: var(--surface-strong); }
  .amount-entry input { font-size: 31px; }
  .toast-region { right: 14px; bottom: calc(88px + env(safe-area-inset-bottom)); }
  .auth-body { padding: 0; background: var(--surface); }
  .auth-shell, .auth-shell--login { display: block; width: 100%; min-height: 100svh; border-radius: 0; box-shadow: none; }
  .auth-intro { min-height: 330px; padding: 28px 24px; }
  .auth-intro h1 { font-size: 32px; }
  .auth-points { display: none; }
  .auth-card { width: 100%; padding: 30px 22px 40px; }
}

@media (max-width: 520px) {
  .balance-main strong { font-size: 34px; }
  .metric-ribbon article { padding: 14px 12px; }
  .metric-ribbon article > span { font-size: 8px; letter-spacing: .035em; }
  .metric-ribbon strong { font-size: 15px; }
  .panel--budget { grid-template-columns: 94px 1fr; gap: 13px; }
  .panel--budget .budget-ring { width: 92px; }
  .panel--budget .budget-ring::after { inset: 10px; }
  .category-row { grid-template-columns: minmax(86px,1fr) minmax(60px,1.4fr) auto; gap: 8px; }
  .category-row strong { min-width: 72px; font-size: 9px; }
  .form-grid--2 { grid-template-columns: 1fr; }
  .type-switch button { font-size: 9px; }
  .account-card { min-height: 155px; }
  .settings-card { grid-template-columns: 1fr; }
  .auth-intro { min-height: 300px; }
}

@keyframes sheet-in { from { opacity: 0; transform: translateY(35px); } to { opacity: 1; transform: none; } }

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