:root {
  --bg: #f3f2ed;
  --surface: #fffefa;
  --surface-2: #f7f6f1;
  --ink: #17221e;
  --muted: #6e7772;
  --line: #e5e4dd;
  --green-950: #102d25;
  --green-800: #1d4f42;
  --green-600: #2f7f68;
  --green-300: #9fd2bd;
  --green-100: #dff1e8;
  --coral: #df735e;
  --coral-soft: #f8e5df;
  --gold: #e9b95d;
  --blue: #7198c9;
  --shadow: 0 18px 45px rgba(21, 37, 31, .07);
  --radius: 24px;
  --nav-height: 76px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--ink); }
button, input, select { font: inherit; }
button { color: inherit; }
button, select { cursor: pointer; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.app-shell { min-height: 100vh; }
.sidebar { display: none; }
.main-content { width: 100%; max-width: 1480px; margin: 0 auto; padding: 24px 16px calc(var(--nav-height) + 26px); }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.eyebrow { margin: 0 0 5px; color: var(--muted); font-size: .73rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.8rem, 6vw, 2.6rem); font-weight: 500; letter-spacing: -.035em; }
h2 { margin-bottom: 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.45rem; font-weight: 500; letter-spacing: -.025em; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.demo-badge { display: none; padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface); font-size: .72rem; font-weight: 700; }
.avatar { width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--green-950); color: #fff; font-size: .72rem; font-weight: 800; }
.view { display: none; animation: fade-in .25s ease; }
.view.active { display: block; }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } }
.period-row, .filter-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 1px 14px; scrollbar-width: none; }
.period-row::-webkit-scrollbar, .filter-chips::-webkit-scrollbar { display: none; }
.period, .filter-chips button { flex: 0 0 auto; border: 1px solid var(--line); background: rgba(255,255,255,.7); color: var(--muted); border-radius: 999px; padding: 9px 14px; font-size: .8rem; font-weight: 720; }
.period.active, .filter-chips button.active { border-color: var(--green-950); background: var(--green-950); color: #fff; }

.balance-card { position: relative; overflow: hidden; padding: 24px; border-radius: 28px; color: #fff; background: radial-gradient(circle at 88% 18%, rgba(159,210,189,.3), transparent 24%), linear-gradient(145deg, #173c32, #0d2821); box-shadow: 0 24px 55px rgba(18,48,39,.2); }
.balance-card::before { content: ""; position: absolute; width: 230px; height: 230px; right: -110px; bottom: -160px; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; box-shadow: 0 0 0 28px rgba(255,255,255,.035), 0 0 0 62px rgba(255,255,255,.025); }
.balance-top { position: relative; z-index: 1; display: flex; justify-content: space-between; min-height: 102px; }
.muted-on-dark { color: rgba(255,255,255,.7); font-size: .82rem; }
.balance-line { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.balance-line strong { font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.15rem, 10vw, 3.5rem); font-weight: 500; letter-spacing: -.04em; }
.icon-button { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); }
.icon-button.on-dark { width: 34px; height: 34px; border-color: rgba(255,255,255,.15); background: rgba(255,255,255,.08); color: rgba(255,255,255,.8); }
.icon-button svg { width: 18px; height: 18px; }
.balance-orbit { display: none; width: 70px; height: 70px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; place-items: center; }
.balance-orbit span { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--green-300), #4c987e); box-shadow: 0 0 30px rgba(159,210,189,.5); }
.balance-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-top: 17px; border-top: 1px solid rgba(255,255,255,.13); }
.balance-grid div { min-width: 0; }
.balance-grid span, .balance-grid strong { display: block; }
.balance-grid span { overflow: hidden; color: rgba(255,255,255,.65); font-size: .68rem; white-space: nowrap; text-overflow: ellipsis; }
.balance-grid strong { margin-top: 5px; font-size: .9rem; }
.income-dot, .expense-dot { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: var(--green-300); }
.expense-dot { background: var(--coral); }

.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 18px 0; }
.quick-actions button { min-width: 0; padding: 0; border: 0; background: transparent; font-size: .7rem; font-weight: 700; }
.quick-actions button > span:last-child { display: block; overflow: hidden; margin-top: 7px; white-space: nowrap; text-overflow: ellipsis; }
.quick-icon { display: grid; place-items: center; width: 48px; height: 48px; margin: auto; border-radius: 17px; }
.quick-icon svg { width: 19px; height: 19px; }
.quick-icon.expense { color: #9c4939; background: var(--coral-soft); }
.quick-icon.income { color: #236752; background: var(--green-100); }
.quick-icon.transfer { color: #705818; background: #f8edcf; font-size: 1.25rem; }
.quick-icon.location { color: #355e8c; background: #e5edf7; }

.dashboard-grid { display: grid; gap: 15px; }
.card { position: relative; border: 1px solid rgba(222,221,214,.9); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.cashflow-card, .category-card, .budget-card, .map-card, .recent-card, .settings-card { padding: 20px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.chart-legend { display: none; align-items: center; gap: 12px; color: var(--muted); font-size: .72rem; }
.chart-wrap { position: relative; min-height: 215px; overflow: hidden; }
.chart-svg { width: 100%; height: 220px; overflow: visible; }
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-label { fill: var(--muted); stroke: none; font-size: 10px; font-weight: 400; }
.chart-income { fill: none; stroke: var(--green-600); stroke-width: 3; }
.chart-expense { fill: none; stroke: var(--coral); stroke-width: 3; }
.chart-area { fill: url(#incomeGradient); }
.chart-point { cursor: pointer; fill: var(--surface); stroke-width: 2.5; transition: r .15s ease; }
.chart-point:hover, .chart-point:focus { r: 6; }
.chart-tooltip { position: absolute; z-index: 4; display: none; pointer-events: none; padding: 9px 11px; border-radius: 11px; background: var(--green-950); color: #fff; font-size: .72rem; box-shadow: var(--shadow); }
.text-button { padding: 4px 0; border: 0; background: transparent; color: var(--green-600); font-size: .78rem; font-weight: 800; }
.category-content { display: grid; grid-template-columns: 132px 1fr; align-items: center; gap: 16px; }
.donut { display: grid; width: 130px; height: 130px; border-radius: 50%; place-items: center; }
.donut > div { display: grid; width: 78px; height: 78px; padding: 8px; border-radius: 50%; background: var(--surface); text-align: center; place-content: center; }
.donut strong, .donut span { display: block; }
.donut strong { font-family: Georgia, "Times New Roman", serif; font-size: 1.13rem; }
.donut span { color: var(--muted); font-size: .65rem; }
.category-legend { display: grid; gap: 10px; min-width: 0; }
.category-legend button { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 7px; min-width: 0; padding: 0; border: 0; background: transparent; font-size: .72rem; text-align: left; }
.category-legend i { width: 8px; height: 8px; border-radius: 50%; }
.category-legend span { overflow: hidden; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; }
.category-legend strong { font-size: .72rem; }
.status-pill { padding: 6px 9px; border-radius: 999px; background: var(--green-100); color: var(--green-800); font-size: .68rem; font-weight: 800; }
.status-pill.warning { color: #884a2d; background: #f9e3d8; }
.budget-summary strong { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 1.85rem; font-weight: 500; }
.budget-summary span { color: var(--muted); font-size: .76rem; }
.progress-track { overflow: hidden; height: 8px; border-radius: 999px; background: #e9e8e1; }
.progress-track.large { margin: 20px 0 9px; height: 11px; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green-300), var(--green-600)); transition: width .4s ease; }
.progress-track span.warning { background: linear-gradient(90deg, var(--gold), var(--coral)); }
.budget-meta { display: flex; justify-content: space-between; margin-bottom: 18px; color: var(--muted); font-size: .72rem; }
.secondary-button, .primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 43px; padding: 10px 15px; border-radius: 13px; font-size: .78rem; font-weight: 800; }
.secondary-button { border: 1px solid var(--line); background: var(--surface); }
.primary-button { border: 1px solid var(--green-950); background: var(--green-950); color: #fff; }
.secondary-button svg, .primary-button svg { width: 17px; height: 17px; }
.full { width: 100%; }
.card-intro { margin-bottom: 15px; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.live-dot { display: inline-block; width: 7px; height: 7px; margin-right: 4px; border-radius: 50%; background: #42a77d; box-shadow: 0 0 0 4px rgba(66,167,125,.14); }
.map-count { padding: 7px 10px; border-radius: 999px; color: var(--muted); background: var(--surface-2); font-size: .7rem; font-weight: 750; }
#spendingMap { z-index: 1; min-height: 270px; overflow: hidden; border-radius: 18px; background: #e8eee9; }
.map-loading { display: grid; min-height: 270px; color: var(--muted); place-items: center; }
.leaflet-control-attribution { font-size: 8px !important; }
.finance-marker { display: grid; width: 34px !important; height: 34px !important; border: 3px solid #fff; border-radius: 50% 50% 50% 8px; background: var(--coral); color: #fff; box-shadow: 0 5px 14px rgba(40,40,40,.25); transform: rotate(-45deg); place-items: center; }
.finance-marker span { transform: rotate(45deg); font-size: 11px; font-weight: 900; }
.map-footer { display: flex; justify-content: space-between; margin-top: 9px; color: var(--muted); font-size: .63rem; }
.transaction-list { display: grid; }
.transaction-row { display: grid; grid-template-columns: 43px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.transaction-row:last-child { border-bottom: 0; padding-bottom: 0; }
.transaction-icon { display: grid; width: 43px; height: 43px; border-radius: 14px; color: var(--green-800); background: var(--green-100); font-size: 1rem; place-items: center; }
.transaction-icon.expense { color: #9a4b3a; background: var(--coral-soft); }
.transaction-icon.transfer { color: #765c18; background: #f8edcf; }
.transaction-main { min-width: 0; }
.transaction-main strong, .transaction-main span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.transaction-main strong { font-size: .82rem; }
.transaction-main span, .transaction-amount small { margin-top: 3px; color: var(--muted); font-size: .68rem; }
.transaction-amount { text-align: right; }
.transaction-amount strong, .transaction-amount small { display: block; }
.transaction-amount strong { font-size: .8rem; }
.transaction-amount strong.negative { color: #a04b3d; }
.transaction-amount strong.positive { color: var(--green-600); }
.empty-state { padding: 38px 20px; color: var(--muted); text-align: center; }

.view-toolbar { display: flex; gap: 10px; margin-bottom: 10px; }
.search-box { display: flex; flex: 1; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.search-box svg { width: 18px; color: var(--muted); }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
.desktop-add { display: none; }
.transaction-page-card { padding: 8px 20px 20px; }
.section-lead { display: flex; flex-direction: column; gap: 15px; margin-bottom: 20px; }
.section-lead h2 { font-size: 1.9rem; }
.section-lead p:not(.eyebrow) { margin: 7px 0 0; color: var(--muted); font-size: .85rem; }
.budget-grid { display: grid; gap: 14px; }
.budget-item { padding: 19px; }
.budget-item-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.budget-item-name { display: flex; align-items: center; gap: 10px; }
.budget-item-name i { display: grid; width: 37px; height: 37px; border-radius: 12px; font-style: normal; place-items: center; }
.budget-item-name strong, .budget-item-name span { display: block; }
.budget-item-name strong { font-size: .86rem; }
.budget-item-name span { margin-top: 2px; color: var(--muted); font-size: .67rem; }
.budget-numbers { text-align: right; }
.budget-numbers strong, .budget-numbers span { display: block; }
.budget-numbers strong { font-size: .82rem; }
.budget-numbers span { margin-top: 3px; color: var(--muted); font-size: .66rem; }
.settings-grid { display: grid; gap: 15px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.setting-row strong, .setting-row small { display: block; }
.setting-row strong { font-size: .83rem; }
.setting-row small { max-width: 205px; margin-top: 4px; color: var(--muted); font-size: .67rem; line-height: 1.4; }
.setting-row select { max-width: 150px; padding: 9px 28px 9px 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--ink); }
.switch { width: 43px; height: 24px; accent-color: var(--green-600); }
.setting-action { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: 15px 0; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; }
.setting-action > span { display: flex; align-items: center; gap: 11px; }
.setting-action svg, .reset-icon { width: 20px; color: var(--green-600); }
.setting-action > svg { width: 17px; color: var(--muted); }
.setting-action strong, .setting-action small { display: block; }
.setting-action strong { font-size: .83rem; }
.setting-action small { margin-top: 3px; color: var(--muted); font-size: .67rem; }
.setting-action.danger strong, .setting-action.danger .reset-icon { color: #a04b3d; }
.about-card { text-align: center; }
.brand-mark { display: grid; width: 42px; height: 42px; flex: 0 0 auto; border-radius: 14px; background: var(--green-950); color: #fff; font-family: Georgia, serif; font-size: 1.25rem; place-items: center; }
.brand-mark.large { width: 58px; height: 58px; margin: 0 auto 14px; border-radius: 19px; }
.about-card p { max-width: 390px; margin: 10px auto; color: var(--muted); font-size: .78rem; line-height: 1.6; }
.version { color: var(--muted); font-size: .65rem; }

.bottom-nav { position: fixed; z-index: 50; right: 0; bottom: 0; left: 0; display: grid; height: calc(var(--nav-height) + env(safe-area-inset-bottom)); grid-template-columns: repeat(5, 1fr); padding: 8px 5px env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: rgba(255,254,250,.94); backdrop-filter: blur(18px); }
.bottom-nav button { display: flex; min-width: 0; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 0; background: transparent; color: #89908c; font-size: .63rem; font-weight: 750; }
.bottom-nav button.active { color: var(--green-800); }
.bottom-nav svg { width: 21px; height: 21px; }
.bottom-nav .add-nav { position: relative; color: var(--green-800); }
.bottom-nav .add-nav > span { display: grid; width: 51px; height: 51px; margin-top: -30px; border: 5px solid var(--bg); border-radius: 50%; background: var(--green-950); color: #fff; box-shadow: 0 8px 20px rgba(16,45,37,.2); place-items: center; }
.bottom-nav .add-nav small { font-size: .63rem; font-weight: 750; }

.modal { position: fixed; z-index: 100; inset: 0; visibility: hidden; opacity: 0; transition: .22s ease; }
.modal.open { visibility: visible; opacity: 1; }
.modal-backdrop { position: absolute; inset: 0; width: 100%; border: 0; background: rgba(11,23,19,.52); backdrop-filter: blur(3px); }
.sheet { position: absolute; right: 0; bottom: 0; left: 0; max-height: 94vh; overflow-y: auto; padding: 9px 20px calc(24px + env(safe-area-inset-bottom)); border-radius: 27px 27px 0 0; background: var(--surface); transform: translateY(102%); transition: transform .27s ease; }
.modal.open .sheet { transform: translateY(0); }
.sheet-handle { width: 42px; height: 5px; margin: 0 auto 17px; border-radius: 999px; background: #d6d5ce; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.type-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 4px; border-radius: 15px; background: var(--surface-2); }
.type-switch button { padding: 10px 7px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font-size: .76rem; font-weight: 800; }
.type-switch button.active { background: var(--surface); color: var(--ink); box-shadow: 0 3px 12px rgba(20,40,33,.08); }
.amount-field { display: block; padding: 20px 0; text-align: center; }
.amount-field > span, .form-grid label > span { display: block; margin-bottom: 7px; color: var(--muted); font-size: .7rem; font-weight: 750; }
.amount-field div { display: flex; align-items: center; justify-content: center; }
.amount-field div > span { color: var(--muted); font-family: Georgia, serif; font-size: 1.6rem; }
.amount-field input { width: min(70%, 280px); border: 0; outline: 0; background: transparent; color: var(--ink); font-family: Georgia, serif; font-size: 2.7rem; text-align: center; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-grid label { min-width: 0; }
.form-grid input, .form-grid select { width: 100%; min-height: 45px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 12px; outline: 0; background: var(--surface); color: var(--ink); font-size: .78rem; }
.form-grid input:focus, .form-grid select:focus { border-color: var(--green-600); box-shadow: 0 0 0 3px rgba(47,127,104,.12); }
.location-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0; padding: 13px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-2); }
.location-box > div { display: flex; min-width: 0; align-items: center; gap: 9px; }
.location-box svg { flex: 0 0 auto; width: 20px; color: var(--blue); }
.location-box strong, .location-box small { display: block; }
.location-box strong { font-size: .76rem; }
.location-box small { overflow: hidden; max-width: 210px; margin-top: 3px; color: var(--muted); font-size: .61rem; white-space: nowrap; text-overflow: ellipsis; }
.location-box button { flex: 0 0 auto; padding: 8px 10px; font-size: .66rem; }
.save-button { min-height: 51px; }
.toast { position: fixed; z-index: 200; right: 16px; bottom: calc(var(--nav-height) + 17px); left: 16px; visibility: hidden; padding: 13px 16px; border-radius: 14px; background: var(--green-950); color: #fff; font-size: .78rem; font-weight: 700; text-align: center; opacity: 0; transform: translateY(8px); transition: .22s ease; }
.toast.show { visibility: visible; opacity: 1; transform: translateY(0); }
.privacy .money-value, .privacy #totalBalance, .privacy #incomeValue, .privacy #expenseValue, .privacy #safeValue, .privacy #donutTotal, .privacy .transaction-amount strong { filter: blur(7px); user-select: none; }

body.dark { --bg: #101713; --surface: #18201c; --surface-2: #202924; --ink: #f0f3ef; --muted: #9da7a1; --line: #303a35; --green-100: #263f35; --coral-soft: #402b27; --shadow: 0 18px 45px rgba(0,0,0,.2); }
body.dark .bottom-nav { background: rgba(24,32,28,.94); }
body.dark .period, body.dark .filter-chips button { background: rgba(24,32,28,.8); }
body.dark .chart-label { fill: var(--muted); }

@media (min-width: 640px) {
  .main-content { padding-right: 24px; padding-left: 24px; }
  .demo-badge, .balance-orbit, .chart-legend { display: flex; }
  .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cashflow-card, .map-card, .recent-card { grid-column: 1 / -1; }
  .budget-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-card { grid-column: 1 / -1; }
  .section-lead { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .section-lead .primary-button { width: auto; }
}

@media (min-width: 1024px) {
  .app-shell { display: grid; grid-template-columns: 246px 1fr; }
  .sidebar { position: sticky; top: 0; display: flex; height: 100vh; flex-direction: column; padding: 30px 22px; border-right: 1px solid var(--line); background: var(--surface); }
  .brand { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
  .brand strong, .brand small { display: block; }
  .brand strong { font-family: Georgia, serif; font-size: 1.08rem; }
  .brand small { margin-top: 2px; color: var(--muted); font-size: .64rem; }
  .side-nav { display: grid; gap: 7px; margin-top: 44px; }
  .nav-item { display: flex; align-items: center; gap: 12px; padding: 12px 13px; border: 0; border-radius: 13px; background: transparent; color: var(--muted); font-size: .82rem; font-weight: 730; text-align: left; }
  .nav-item svg { width: 19px; }
  .nav-item.active { background: var(--green-100); color: var(--green-800); }
  .side-tip { margin-top: auto; padding: 17px; border-radius: 18px; background: var(--surface-2); }
  .tip-icon { display: grid; width: 30px; height: 30px; margin-bottom: 11px; border-radius: 10px; background: #f7e8b9; color: #745b13; place-items: center; }
  .side-tip strong { font-size: .77rem; }
  .side-tip p { margin: 6px 0 0; color: var(--muted); font-size: .67rem; line-height: 1.5; }
  .main-content { padding: 36px 38px 50px; }
  .bottom-nav { display: none; }
  .balance-card { padding: 30px 32px; }
  .quick-actions { display: flex; justify-content: flex-start; gap: 18px; padding: 8px 0; }
  .quick-actions button { display: flex; align-items: center; gap: 9px; min-width: 138px; padding: 9px 13px 9px 9px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); text-align: left; }
  .quick-actions button > span:last-child { margin: 0; }
  .quick-icon { width: 38px; height: 38px; margin: 0; border-radius: 12px; }
  .dashboard-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .cashflow-card { grid-column: span 8; }
  .category-card { grid-column: span 4; }
  .budget-card { grid-column: span 4; }
  .map-card { grid-column: span 8; }
  .recent-card { grid-column: 1 / -1; }
  .cashflow-card, .category-card, .budget-card, .map-card, .recent-card, .settings-card { padding: 24px; }
  .recent-card .transaction-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
  .recent-card .transaction-row:nth-last-child(-n+2) { border-bottom: 0; }
  .desktop-add { display: inline-flex; }
  .budget-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-card { grid-column: span 2; }
  .sheet { top: 0; bottom: 0; left: auto; width: min(520px, 92vw); max-height: none; padding: 28px; border-radius: 0; transform: translateX(102%); }
  .modal.open .sheet { transform: translateX(0); }
  .sheet-handle { display: none; }
  .toast { right: 24px; bottom: 24px; left: auto; width: max-content; max-width: 360px; }
}

@media (min-width: 1280px) {
  .app-shell { grid-template-columns: 268px 1fr; }
  .main-content { padding-right: 52px; padding-left: 52px; }
  .recent-card { grid-column: span 4; }
  .map-card { grid-column: span 4; }
  .budget-card { grid-column: span 4; }
  .recent-card .transaction-list { grid-template-columns: 1fr; }
  .recent-card .transaction-row { border-bottom: 1px solid var(--line); }
  .recent-card .transaction-row:last-child { border-bottom: 0; }
}

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