:root {
  --ink: #182033;
  --ink-2: #30394c;
  --horizon: #3d5afe;
  --horizon-dark: #2945d8;
  --balance: #168271;
  --attention: #d85b4b;
  --mist: #edf1f7;
  --white: #fcfcfe;
  --paper: #ffffff;
  --yellow: #f2c94c;
  --muted: #6f7788;
  --line: #dde2eb;
  --sidebar: 248px;
  --shadow: 0 16px 50px rgba(24, 32, 51, 0.08);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  font-family: 'Spline Sans', 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--mist);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body { margin: 0; min-width: 320px; min-height: 100vh; overflow-x: hidden; background: var(--mist); }
button, input, select { font: inherit; }
button { color: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(61, 90, 254, .3); outline-offset: 2px; }
button { border: 0; cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3, strong { text-wrap: balance; }
.icon { width: 21px; height: 21px; flex: 0 0 auto; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); padding: 26px 18px 20px; display: flex; flex-direction: column; background: var(--ink); color: var(--white); z-index: 20; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 34px; background: none; color: var(--white); font: 700 24px/1 'Anybody', sans-serif; letter-spacing: -.03em; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px 11px 11px 3px; color: var(--ink); background: var(--yellow); font: 800 24px/1 'Anybody', sans-serif; transform: rotate(-3deg); }
.side-nav { display: grid; gap: 5px; }
.nav-item { position: relative; width: 100%; min-height: 48px; display: flex; align-items: center; gap: 13px; padding: 0 14px; border-radius: 12px; color: #acb4c6; background: transparent; text-align: left; font-weight: 600; transition: .2s ease; }
.nav-item:hover { color: var(--white); background: rgba(255,255,255,.06); }
.nav-item.active { color: var(--white); background: rgba(255,255,255,.1); }
.nav-item.active::before { content: ''; position: absolute; left: -18px; width: 4px; height: 25px; border-radius: 0 3px 3px 0; background: var(--yellow); }
.sidebar-bottom { margin-top: auto; display: grid; gap: 18px; }
.profile { padding: 18px 9px 0; border-top: 1px solid rgba(255,255,255,.11); display: flex; align-items: center; gap: 10px; }
.profile .avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--horizon); font: 500 11px/1 'DM Mono', monospace; }
.profile strong, .profile small { display: block; }
.profile strong { font-size: 13px; }
.profile small { margin-top: 3px; color: #8f99ad; font-size: 11px; }

.main-content { margin-left: var(--sidebar); padding: 42px clamp(28px, 4vw, 64px) 70px; min-height: 100vh; max-width: 1680px; }
.page-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 34px; }
.page-header h1 { margin: 5px 0 0; font: 650 clamp(2.3rem, 4vw, 4.25rem)/.98 'Anybody', sans-serif; letter-spacing: -.055em; font-stretch: 90%; }
.eyebrow { display: block; color: var(--muted); font: 500 11px/1.2 'DM Mono', monospace; letter-spacing: .09em; text-transform: uppercase; }
.eyebrow.light { color: rgba(255,255,255,.65); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-button { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
.button { min-height: 46px; padding: 0 18px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-weight: 700; transition: transform .2s ease, background .2s ease; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: white; background: var(--horizon); box-shadow: 0 10px 24px rgba(61,90,254,.2); }
.button.primary:hover { background: var(--horizon-dark); }
.button.secondary { background: var(--paper); border: 1px solid var(--line); }
.button.ghost { background: transparent; border: 1px solid var(--line); }
.button.light { color: var(--ink); background: var(--white); }
.button.full { width: 100%; }

.overview-hero { display: grid; grid-template-columns: minmax(240px, .65fr) minmax(580px, 1.75fr); gap: 16px; }
.free-balance { min-height: 285px; padding: 30px; border-radius: var(--radius-lg); display: flex; flex-direction: column; background: var(--paper); border: 1px solid rgba(24,32,51,.04); box-shadow: var(--shadow); }
.free-balance > strong { margin-top: auto; font: 650 clamp(2.4rem, 4vw, 4.6rem)/.95 'Anybody', sans-serif; letter-spacing: -.055em; }
.free-balance > p { margin: 8px 0 20px; color: var(--muted); }
.balance-status { display: flex; align-items: center; gap: 6px; color: var(--balance); font-size: 12px; font-weight: 700; }
.balance-status .icon { width: 16px; height: 16px; }

.breath-ruler { position: relative; width: 100%; min-width: 0; min-height: 285px; padding: 30px; border-radius: var(--radius-lg); overflow: hidden; color: white; background: var(--horizon); box-shadow: 0 18px 45px rgba(61,90,254,.2); }
.breath-ruler::after { content: 'F'; position: absolute; right: -20px; top: -53px; color: rgba(255,255,255,.055); font: 800 270px/1 'Anybody', sans-serif; pointer-events: none; }
.ruler-heading { position: relative; z-index: 1; min-width: 0; display: flex; justify-content: space-between; gap: 20px; }
.ruler-heading > div { min-width: 0; }
.ruler-heading h2 { margin: 6px 0 0; max-width: 430px; font: 550 22px/1.08 'Anybody', sans-serif; letter-spacing: -.025em; }
.daily-limit { text-align: right; font: 600 19px/1 'DM Mono', monospace; }
.daily-limit small { display: block; margin-top: 7px; color: rgba(255,255,255,.65); font: 400 10px/1 'DM Mono', monospace; text-transform: uppercase; letter-spacing: .08em; }
.ruler-track { position: relative; height: 98px; margin: 28px 5px 0; }
.ruler-track::before { content: ''; position: absolute; top: 17px; left: 0; right: 0; height: 2px; background: rgba(255,255,255,.26); }
.track-progress { position: absolute; left: 0; top: 17px; width: 2%; height: 2px; background: var(--yellow); }
.track-node { position: absolute; top: 9px; display: grid; gap: 4px; white-space: nowrap; transform: translateX(-50%); }
.track-node:first-of-type { transform: none; }
.track-node i { display: block; width: 18px; height: 18px; margin-left: calc(50% - 9px); border-radius: 50%; background: var(--horizon); border: 4px solid white; box-shadow: 0 0 0 4px rgba(255,255,255,.1); }
.track-node.today i { background: var(--yellow); border-color: var(--yellow); }
.track-node.income i { border-radius: 4px 4px 4px 1px; background: var(--balance); border-color: white; transform: rotate(45deg); }
.track-node b { margin-top: 7px; font-size: 12px; }
.track-node small { color: rgba(255,255,255,.63); font: 400 10px 'DM Mono', monospace; }
.ruler-note { position: absolute; left: 30px; right: 30px; bottom: 22px; z-index: 1; display: flex; align-items: center; gap: 8px; margin: 0; padding-top: 15px; border-top: 1px solid rgba(255,255,255,.16); color: rgba(255,255,255,.72); font-size: 12px; }
.ruler-note .icon { width: 16px; }
.ruler-note strong { color: white; }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 16px 0; }
.stat-card { min-height: 127px; padding: 22px 24px; border-radius: var(--radius-md); background: var(--paper); border: 1px solid rgba(24,32,51,.05); }
.stat-card span, .stat-card small { display: block; color: var(--muted); font-size: 12px; }
.stat-card strong { display: block; margin: 13px 0 8px; font: 600 25px/1 'DM Mono', monospace; letter-spacing: -.04em; }
.stat-card.positive strong { color: var(--balance); }
.dashboard-grid { display: grid; grid-template-columns: 1.55fr .85fr; gap: 16px; }
.panel { padding: 27px; border-radius: var(--radius-md); background: var(--paper); border: 1px solid rgba(24,32,51,.05); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.section-heading h2 { margin: 5px 0 0; font: 600 22px/1.1 'Anybody', sans-serif; letter-spacing: -.025em; }
.text-button { display: inline-flex; align-items: center; gap: 3px; background: transparent; color: var(--horizon); font-weight: 700; font-size: 12px; }
.text-button .icon { width: 16px; }
.transaction-list { display: grid; }
.transaction-row { min-height: 69px; padding: 10px 0; display: flex; align-items: center; gap: 12px; background: transparent; border-bottom: 1px solid var(--line); text-align: left; }
.transaction-row:last-child { border-bottom: 0; }
.transaction-row > .icon:last-child { width: 16px; color: #adb4c0; }
.transaction-icon { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 13px; }
.transaction-icon.expense { color: var(--attention); background: #fff0ed; }
.transaction-icon.income { color: var(--balance); background: #e7f5f1; }
.transaction-icon .icon { width: 18px; }
.transaction-copy { min-width: 0; flex: 1; }
.transaction-copy strong, .transaction-copy small, .transaction-meta strong, .transaction-meta small { display: block; }
.transaction-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.transaction-copy small, .transaction-meta small { margin-top: 5px; color: var(--muted); font-size: 11px; }
.transaction-meta { text-align: right; }
.transaction-meta strong { font: 500 13px 'DM Mono', monospace; }
.transaction-meta strong.income { color: var(--balance); }
.bill-row, .simple-row { min-height: 66px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.bill-row > span:nth-child(2), .simple-row > span { flex: 1; }
.bill-row strong, .bill-row small, .simple-row strong, .simple-row small { display: block; }
.bill-row small, .simple-row small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.bill-row > b, .simple-row > b { font: 500 12px 'DM Mono', monospace; }
.date-tile { width: 41px; height: 44px; display: grid; place-content: center; text-align: center; border-radius: 11px; color: var(--horizon); background: #eef0ff; }
.date-tile b { font: 600 16px/1 'DM Mono', monospace; }
.date-tile small { margin-top: 2px; font: 500 9px 'DM Mono', monospace; text-transform: uppercase; }
.next-bills .button { margin-top: 18px; }

.toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.search-field { flex: 1; max-width: 520px; height: 48px; display: flex; align-items: center; gap: 10px; padding: 0 15px; border-radius: 13px; background: var(--paper); border: 1px solid var(--line); }
.search-field .icon { color: var(--muted); }
.search-field input { width: 100%; border: 0; outline: 0; background: transparent; }
.filter-pills { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; }
.pill { min-height: 39px; padding: 0 15px; border-radius: 999px; white-space: nowrap; background: transparent; border: 1px solid #cbd1dc; font-size: 12px; font-weight: 700; }
.pill.active { color: white; background: var(--ink); border-color: var(--ink); }
.compact-stats { margin-top: 0; }
.transactions-panel { margin-top: 16px; }
.empty-state { padding: 70px 20px; text-align: center; }
.empty-state > span { width: 52px; height: 52px; margin: 0 auto 15px; display: grid; place-items: center; border-radius: 50%; color: var(--horizon); background: #eef0ff; }
.empty-state h3 { margin-bottom: 7px; }
.empty-state p { color: var(--muted); font-size: 13px; }

.planning-summary, .goals-intro, .accounts-total { min-height: 220px; padding: 34px 38px; border-radius: var(--radius-lg); color: white; background: var(--ink); display: flex; align-items: center; justify-content: space-between; gap: 30px; overflow: hidden; position: relative; }
.planning-summary::after, .accounts-total::after { content: ''; position: absolute; width: 320px; height: 320px; right: -110px; top: -190px; border: 55px solid rgba(255,255,255,.035); border-radius: 50%; }
.planning-summary > div:first-child > strong, .goals-intro > div > strong, .accounts-total > div > strong { display: block; margin: 14px 0 10px; font: 600 clamp(2.2rem, 4vw, 4.2rem)/1 'Anybody', sans-serif; letter-spacing: -.05em; }
.planning-summary strong small { color: #9da7ba; font-size: .48em; }
.planning-summary p, .goals-intro p, .accounts-total p { margin: 0; color: #b2bac9; }
.budget-ring { --percent: 75; width: 138px; height: 138px; position: relative; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--yellow) calc(var(--percent) * 1%), rgba(255,255,255,.12) 0); }
.budget-ring::before { content: ''; position: absolute; inset: 13px; border-radius: 50%; background: var(--ink); }
.budget-ring span { position: relative; display: grid; text-align: center; }
.budget-ring b { font: 600 26px 'DM Mono', monospace; }
.budget-ring small { color: #aeb6c6; font-size: 10px; text-transform: uppercase; }
.section-heading.standalone { margin: 36px 0 17px; }
.budget-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.budget-card { padding: 25px; border-radius: var(--radius-md); background: var(--paper); }
.budget-top { display: flex; align-items: center; gap: 12px; }
.category-dot { width: 12px; height: 12px; border-radius: 50%; }
.category-dot.blue { background: var(--horizon); }.category-dot.teal { background: var(--balance); }.category-dot.coral { background: var(--attention); }
.budget-top > div { flex: 1; }
.budget-top h3 { margin: 0 0 4px; font-size: 15px; }
.budget-top small { color: var(--muted); font-size: 10px; }
.budget-top > strong { font: 500 15px 'DM Mono', monospace; }
.progress { height: 7px; margin: 21px 0 12px; overflow: hidden; border-radius: 999px; background: var(--mist); }
.progress span { display: block; height: 100%; border-radius: inherit; }
.progress .blue { background: var(--horizon); }.progress .teal { background: var(--balance); }.progress .coral { background: var(--attention); }
.budget-values, .goal-values { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
.budget-values b { color: var(--ink); font: 500 12px 'DM Mono', monospace; }
.planning-grid { display: grid; grid-template-columns: 1.55fr .85fr; gap: 16px; margin-top: 16px; }
.breath-ruler.compact { min-height: 290px; }

.goals-intro { background: var(--horizon); }
.goals-intro::after { content: '↗'; position: absolute; right: 20%; top: -40px; color: rgba(255,255,255,.06); font: 600 250px/1 'Anybody', sans-serif; }
.goals-intro > * { position: relative; z-index: 1; }
.goals-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 16px 0; }
.goal-card { min-height: 385px; padding: 16px; display: grid; grid-template-columns: .82fr 1.18fr; gap: 25px; border-radius: var(--radius-lg); background: var(--paper); }
.goal-visual { min-height: 100%; border-radius: 18px; display: grid; place-items: center; overflow: hidden; position: relative; background: #dfe5ff; }
.goal-visual::before, .goal-visual::after { content: ''; position: absolute; border-radius: 50%; }
.goal-visual::before { width: 260px; height: 260px; left: -95px; top: -60px; border: 42px solid rgba(61,90,254,.18); }
.goal-visual::after { width: 110px; height: 110px; right: -30px; bottom: -15px; background: var(--yellow); }
.goal-visual.mountain { background: #dcefe9; }
.goal-visual.mountain::before { width: 180px; height: 180px; left: -50px; top: 50px; border-radius: 15px; border: 0; background: var(--balance); transform: rotate(45deg); }
.goal-visual.mountain::after { background: var(--ink); }
.goal-visual span { position: relative; z-index: 2; width: 80px; height: 80px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--ink); font: 500 17px 'DM Mono', monospace; }
.goal-content { padding: 22px 20px 12px 0; display: flex; flex-direction: column; }
.goal-content h2 { margin: 12px 0 auto; font: 600 27px/1.05 'Anybody', sans-serif; letter-spacing: -.035em; }
.goal-values { margin-bottom: 20px; align-items: baseline; }
.goal-values strong { color: var(--ink); font: 500 18px 'DM Mono', monospace; }
.insight-panel { min-height: 145px; display: flex; align-items: center; gap: 25px; }
.insight-mark { width: 74px; height: 74px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: var(--horizon); background: #eef0ff; font: 500 32px 'Anybody', sans-serif; }
.insight-panel h2 { margin: 8px 0; font: 550 23px 'Anybody', sans-serif; }
.insight-panel p { margin: 0; color: var(--muted); font-size: 13px; }

.accounts-total { background: var(--ink); }
.accounts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 16px 0; }
.account-card { min-height: 285px; padding: 24px; border-radius: var(--radius-md); display: flex; flex-direction: column; background: var(--paper); }
.account-symbol { width: 48px; height: 48px; margin-bottom: 26px; display: grid; place-items: center; border-radius: 15px; color: white; }
.account-symbol.navy { background: var(--ink); }.account-symbol.blue { background: var(--horizon); }.account-symbol.teal { background: var(--balance); }.account-symbol.yellow { color: var(--ink); background: var(--yellow); }
.account-card h2 { margin: 7px 0 13px; font: 600 19px 'Anybody', sans-serif; }
.account-value { font: 500 19px 'DM Mono', monospace; }
.account-card > small { margin: 7px 0 auto; color: var(--muted); }
.account-card .text-button { justify-content: space-between; padding: 12px 0 0; border-top: 1px solid var(--line); }
.distribution-bar { display: flex; gap: 3px; height: 14px; margin: 25px 0 17px; overflow: hidden; border-radius: 999px; }
.distribution-bar span:first-child { border-radius: 999px 0 0 999px; }.distribution-bar span:last-child { border-radius: 0 999px 999px 0; }
.dist-main { background: var(--ink); }.dist-reserve { background: var(--balance); }.dist-cash { background: var(--yellow); }
.distribution-legend { display: flex; flex-wrap: wrap; gap: 20px; color: var(--muted); font-size: 11px; }
.distribution-legend span { display: flex; align-items: center; gap: 7px; }
.distribution-legend i { width: 8px; height: 8px; border-radius: 50%; }.distribution-legend i.navy { background: var(--ink); }.distribution-legend i.teal { background: var(--balance); }.distribution-legend i.yellow { background: var(--yellow); }

.mobile-nav { display: none; }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; padding: 20px; display: flex; justify-content: flex-end; background: rgba(12,17,28,.55); backdrop-filter: blur(5px); animation: fade .2s ease; }
.modal { width: min(520px, 100%); height: 100%; overflow-y: auto; padding: 32px; border-radius: 24px; background: var(--white); animation: slide .3s cubic-bezier(.2,.8,.2,1); }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 25px; }
.modal-header h2 { margin: 6px 0 0; font: 600 29px 'Anybody', sans-serif; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; margin-bottom: 24px; border-radius: 14px; background: var(--mist); }
.segmented label { cursor: pointer; }
.segmented input { position: absolute; opacity: 0; }
.segmented span { min-height: 42px; display: grid; place-items: center; border-radius: 10px; font-weight: 700; font-size: 13px; }
.segmented input:checked + span { background: white; box-shadow: 0 3px 12px rgba(24,32,51,.1); }
.field { display: grid; gap: 8px; margin-bottom: 16px; color: var(--ink-2); font-size: 12px; font-weight: 700; }
.field > input, .field > select { width: 100%; height: 48px; padding: 0 13px; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--ink); }
.money-input { height: 67px; padding: 0 17px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 14px; background: white; font: 500 24px 'DM Mono', monospace; }
.money-input input { min-width: 0; flex: 1; border: 0; outline: 0; font: 500 30px 'DM Mono', monospace; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check-field { display: flex; gap: 12px; padding: 15px; margin: 5px 0 17px; border-radius: 13px; background: var(--mist); }
.check-field input { width: 18px; height: 18px; accent-color: var(--horizon); }
.check-field b, .check-field small { display: block; }
.check-field b { font-size: 12px; }.check-field small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.impact-preview { padding: 15px; border-left: 3px solid var(--horizon); background: #eef0ff; }
.impact-preview span, .impact-preview strong { display: block; font-size: 11px; }.impact-preview span { margin-bottom: 5px; color: var(--muted); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }
#toast-root { position: fixed; right: 24px; bottom: 24px; z-index: 200; }
.toast { padding: 15px 18px; display: flex; align-items: center; gap: 10px; border-radius: 13px; color: white; background: var(--ink); box-shadow: 0 14px 40px rgba(0,0,0,.25); font-size: 13px; animation: toast .3s ease; }
.toast span { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); background: var(--yellow); font-weight: 900; }

@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { opacity: 0; transform: translateX(30px); } }
@keyframes toast { from { opacity: 0; transform: translateY(12px); } }

@media (max-width: 1180px) {
  :root { --sidebar: 210px; }
  .overview-hero { grid-template-columns: 1fr; }
  .free-balance { min-height: 205px; }
  .accounts-grid { grid-template-columns: repeat(2, 1fr); }
  .goal-card { grid-template-columns: 1fr; }
  .goal-visual { min-height: 190px; }
  .goal-content { padding: 12px; }
  .goal-content h2 { margin-bottom: 25px; }
}

@media (max-width: 840px) {
  :root { --radius-lg: 23px; }
  .sidebar { display: none; }
  .main-content { margin-left: 0; padding: 26px 18px 110px; }
  .page-header { align-items: center; margin-bottom: 25px; }
  .page-header h1 { font-size: clamp(2.25rem, 10vw, 3.3rem); }
  .desktop-add { display: none; }
  .overview-hero, .dashboard-grid, .planning-grid { grid-template-columns: 1fr; }
  .overview-hero > *, .dashboard-grid > *, .planning-grid > * { min-width: 0; }
  .free-balance { min-height: 190px; padding: 25px; order: 0; }
  .breath-ruler { min-height: 310px; padding: 25px; }
  .ruler-note { left: 25px; right: 25px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid .stat-card:last-child { grid-column: 1 / -1; }
  .budget-grid, .goals-grid { grid-template-columns: 1fr; }
  .planning-summary, .goals-intro, .accounts-total { padding: 28px; }
  .goal-card { grid-template-columns: .85fr 1.15fr; min-height: 330px; }
  .goal-visual { min-height: 100%; }
  .goal-content { padding: 20px 12px 10px 0; }
  .accounts-grid { grid-template-columns: 1fr 1fr; }
  .mobile-nav { position: fixed; inset: auto 10px 10px; z-index: 50; height: 70px; padding: 6px 8px; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; border-radius: 20px; color: #7f8798; background: rgba(24,32,51,.96); box-shadow: 0 14px 40px rgba(0,0,0,.28); backdrop-filter: blur(15px); }
  .mobile-nav-item { height: 56px; display: grid; place-items: center; align-content: center; gap: 4px; color: #9ba4b6; background: transparent; font-size: 9px; }
  .mobile-nav-item .icon { width: 19px; height: 19px; }
  .mobile-nav-item.active { color: white; }
  .mobile-nav-item.active::after { content: ''; position: absolute; bottom: 6px; width: 16px; height: 2px; border-radius: 2px; background: var(--yellow); }
  .mobile-add { grid-column: 3; grid-row: 1; width: 52px; height: 52px; justify-self: center; display: grid; place-items: center; border-radius: 17px 17px 17px 5px; color: white; background: var(--horizon); transform: rotate(-2deg); box-shadow: 0 8px 20px rgba(61,90,254,.35); }
  .mobile-add .icon { transform: rotate(2deg); }
  .mobile-nav-item:nth-child(1) { grid-column: 1; grid-row: 1; }
  .mobile-nav-item:nth-child(2) { grid-column: 2; grid-row: 1; }
  .mobile-nav-item:nth-child(3) { grid-column: 4; grid-row: 1; }
  .mobile-nav-item:nth-child(4) { grid-column: 5; grid-row: 1; }
  .mobile-nav-item:nth-child(5) { display: none; }
  #toast-root { left: 14px; right: 14px; bottom: 92px; }
  .toast { justify-content: center; }
}

@media (max-width: 600px) {
  .main-content { padding-inline: 14px; }
  .page-header .eyebrow { max-width: 190px; }
  .page-header h1 { font-size: 2.6rem; }
  .overview-hero { gap: 12px; }
  .free-balance > strong { font-size: 3.25rem; }
  .ruler-heading h2 { max-width: 210px; font-size: 19px; }
  .daily-limit { display: none; }
  .ruler-track { margin-top: 34px; }
  .track-node.bill b { max-width: 58px; overflow: hidden; text-overflow: ellipsis; }
  .ruler-note { align-items: flex-start; line-height: 1.5; }
  .stats-grid, .compact-stats { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin-right: -14px; padding-right: 14px; scrollbar-width: none; }
  .stat-card { min-width: 205px; scroll-snap-align: start; }
  .stats-grid .stat-card:last-child { grid-column: auto; }
  .panel { padding: 22px 18px; }
  .section-heading { align-items: flex-start; }
  .section-heading .button { min-height: 40px; padding: 0 12px; font-size: 11px; }
  .transaction-row { gap: 9px; }
  .transaction-icon { width: 38px; height: 38px; }
  .transaction-copy small { max-width: 135px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .transaction-meta strong { font-size: 11px; }
  .toolbar { display: grid; }
  .search-field { max-width: none; }
  .filter-pills { margin-right: -14px; padding-right: 14px; }
  .planning-summary, .goals-intro, .accounts-total { min-height: 265px; align-items: flex-start; flex-direction: column; }
  .planning-summary { flex-direction: row; align-items: center; padding: 25px 22px; }
  .planning-summary > div:first-child > strong { font-size: 2rem; }
  .budget-ring { width: 105px; height: 105px; }
  .budget-ring::before { inset: 10px; }
  .budget-ring b { font-size: 20px; }
  .section-heading.standalone { align-items: flex-end; }
  .goal-card { grid-template-columns: 1fr; padding: 13px; }
  .goal-visual { min-height: 195px; }
  .goal-content { padding: 18px 8px 8px; }
  .accounts-grid { grid-template-columns: 1fr; }
  .account-card { min-height: 260px; }
  .distribution-legend { gap: 10px; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal { width: 100%; height: min(92vh, 800px); padding: 25px 20px; border-radius: 24px 24px 0 0; }
  .modal-actions { position: sticky; bottom: -25px; margin: 20px -20px -25px; padding: 15px 20px 20px; background: var(--white); }
  .modal-actions .button.primary { flex: 1; }
}

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