@charset "UTF-8";

:root {
  color-scheme: light;
  --canvas: #f5f6f3;
  --surface: #ffffff;
  --ink: #263c33;
  --muted: #657061;
  --forest: #214d3e;
  --forest-dark: #183d32;
  --sage: #e7eee4;
  --sage-strong: #c6d8bd;
  --clay: #a95039;
  --clay-soft: #f5e9e2;
  --line: #e5e9e2;
  --danger: #aa392e;
  --warning: #8d590d;
  --shadow: 0 12px 35px rgb(29 57 43 / 4%);
  --radius: 20px;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-size: 16px; line-height: 1.5; }
button, input, textarea, select { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .56; }
button, input, select, textarea { outline-offset: 4px; }
:focus-visible { outline: 3px solid #8baf70; outline-offset: 4px; }
a { color: inherit; text-decoration: none; }
svg { width: 22px; height: 22px; display: block; flex-shrink: 0; }
button svg, a svg { pointer-events: none; }
h1, h2, h3, p { margin: 0; }
button { color: inherit; }
input, select, textarea { min-width: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

.app-shell { min-height: 100dvh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 242px; display: flex; flex-direction: column; gap: 48px; padding: 35px 20px 22px; background: #fcfdfa; border-right: 1px solid var(--line); z-index: 20; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--forest); }
.sidebar > .brand { padding: 0 10px; }
.brand-mark { display: grid; place-items: center; width: 43px; height: 43px; flex: 0 0 43px; border-radius: 14px; background: var(--forest); color: #fff; }
.brand-mark svg { width: 26px; height: 26px; }
.brand-name { font-size: 22px; font-weight: 750; letter-spacing: -.8px; line-height: 1.2; }
.brand-caption { font-size: 12px; font-weight: 500; letter-spacing: .5px; color: var(--muted); margin-top: 3px; }
.sidebar-nav { display: flex; flex-direction: column; gap: 9px; }
.nav-link { display: flex; align-items: center; gap: 13px; padding: 13px 17px; min-height: 49px; border: 0; border-radius: 12px; font-size: 15px; font-weight: 600; color: #6a776f; background: transparent; transition: background .16s, color .16s; text-align: left; }
.nav-link svg { width: 21px; height: 21px; }
.nav-link:hover { background: #eef1ea; color: var(--forest); }
.nav-link.active, .nav-link[aria-current="page"] { background: #e7eee2; color: var(--forest); }
.nav-link.active svg { stroke-width: 2; }
.sidebar-bottom { margin-top: auto; padding-top: 22px; border-top: 1px solid var(--line); }
.household-button { width: 100%; border: 0; background: transparent; border-radius: 12px; padding: 10px; display: flex; gap: 10px; align-items: center; text-align: left; }
.household-button:hover { background: var(--sage); }
.household-button > div { flex: 1; min-width: 0; }
.household-button strong { display: block; font-size: 14px; overflow-wrap: anywhere; }
.household-button small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.sidebar-note { font-size: 12px; color: var(--muted); text-align: center; margin-top: 20px; }
.main-content { margin-left: 242px; padding: 0 42px 48px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 101px; max-width: 1240px; margin: 0 auto; border-bottom: 1px solid var(--line); }
.topbar-date { color: var(--muted); font-size: 14px; text-transform: capitalize; }
.topbar-actions { display: flex; align-items: center; gap: 16px; }
.topbar-greeting { font-size: 14px; color: var(--muted); }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; background: #e4ebdd; color: var(--forest); font-size: 14px; font-weight: 700; border: 2px solid var(--surface); }
.avatar.small { width: 32px; height: 32px; font-size: 12px; }
.page { max-width: 1240px; margin: 0 auto; padding-top: 34px; }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 29px; }
.eyebrow { color: var(--clay); text-transform: uppercase; letter-spacing: 1.7px; font-size: 12px; font-weight: 750; margin-bottom: 7px; }
.page-title { color: var(--ink); font-size: clamp(28px, 2.8vw, 36px); font-weight: 700; line-height: 1.2; letter-spacing: -1.3px; }
.page-subtitle { color: var(--muted); font-size: 15px; margin-top: 9px; }
.header-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 45px; padding: 10px 18px; border: 1px solid transparent; border-radius: 10px; font-size: 14px; font-weight: 650; line-height: 1.4; transition: background .16s, border-color .16s, transform .16s; white-space: nowrap; }
.button svg { width: 18px; height: 18px; }
.button.primary { background: var(--forest); color: #fff; border-color: var(--forest); }
.button.primary:hover { background: var(--forest-dark); border-color: var(--forest-dark); }
.button.secondary { background: var(--surface); border-color: #dce3d8; color: var(--forest); }
.button.secondary:hover { background: #eff3ec; border-color: #bdcbb7; }
.button.ghost { color: var(--forest); background: transparent; }
.button.ghost:hover { background: var(--sage); }
.button.danger { color: var(--danger); background: #fff0ed; border-color: #f3d4ce; }
.button.danger:hover { background: #fbe2dc; }
.button.small { min-height: 40px; padding: 8px 12px; font-size: 14px; }
.button.full { width: 100%; }
.button.light { color: var(--forest-dark); background: #e7eedf; }
.button.light:hover { background: #fff; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid transparent; border-radius: 11px; color: var(--muted); background: transparent; flex: 0 0 44px; }
.icon-button svg { width: 19px; height: 19px; }
.icon-button:hover { background: var(--sage); color: var(--forest); }
.icon-button.danger:hover { color: var(--danger); background: #fcece8; }
.icon-button.bordered { background: var(--surface); border-color: var(--line); }

.dashboard-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 22px; align-items: stretch; }
.dashboard-grid > * { min-width: 0; grid-column: span 6; }
.dashboard-grid > .balance-card { grid-column: span 8; }
.dashboard-grid > .stat-card { grid-column: span 2; }
.dashboard-grid > .budget-card { grid-column: span 4; }
.dashboard-grid > .span-4 { grid-column: span 4; }
.dashboard-grid > .span-6 { grid-column: span 6; }
.dashboard-grid > .span-8 { grid-column: span 8; }
.dashboard-grid > .span-12 { grid-column: 1 / -1; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); gap: 22px; margin-bottom: 22px; }
.balance-card { position: relative; overflow: hidden; padding: 30px 32px 25px; border-radius: var(--radius); background: var(--forest-dark); color: white; min-height: 238px; }
.balance-card::after { content: ""; position: absolute; width: 240px; height: 240px; border: 1px solid #ffffff0c; border-radius: 50%; right: -95px; top: -100px; box-shadow: 0 0 0 34px #ffffff03, 0 0 0 70px #ffffff03, 0 0 0 106px #ffffff03; pointer-events: none; }
.balance-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; position: relative; z-index: 1; }
.balance-label { font-size: 14px; font-weight: 500; color: #c8d9ce; }
.balance-amount { font-size: clamp(34px, 3.5vw, 48px); font-weight: 650; letter-spacing: -1.8px; line-height: 1.2; margin: 11px 0 3px; overflow-wrap: anywhere; }
.balance-meta { font-size: 13px; color: #b6cfc0; }
.balance-card .badge { background: #ffffff14; color: #d9e9d2; border: 1px solid #ffffff15; }
.balance-stats { display: flex; gap: 30px; margin-top: 25px; padding-top: 19px; border-top: 1px solid #ffffff24; }
.balance-stat { display: flex; align-items: center; gap: 11px; min-width: 0; }
.balance-stat .stat-icon { width: 35px; height: 35px; border-radius: 11px; background: #ffffff10; color: #c7e0b6; }
.balance-stat .stat-icon.expense { color: #ecc6b6; }
.balance-stat small { display: block; font-size: 12px; color: #b9cec2; }
.balance-stat strong { display: block; font-weight: 600; font-size: 17px; margin-top: 1px; }
.stat-card { display: flex; flex-direction: column; justify-content: space-between; gap: 18px; padding: 24px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat-icon { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 13px; color: var(--forest); background: var(--sage); flex-shrink: 0; }
.stat-icon.clay, .stat-icon.expense { color: var(--clay); background: var(--clay-soft); }
.stat-label { color: var(--muted); font-size: 14px; margin-top: 12px; }
.stat-value { font-weight: 650; letter-spacing: -.7px; font-size: 30px; line-height: 1.2; }
.stat-caption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 24px; }
.stats-grid .stat-card { flex-direction: row; justify-content: flex-start; align-items: center; gap: 16px; }
.stats-grid .stat-label { margin-top: 0; margin-bottom: 5px; }
.stats-grid .stat-value { font-size: 26px; }

.card { min-width: 0; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card + .card { margin-top: 22px; }
.dashboard-grid .card + .card { margin-top: 0; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 22px 24px 17px; }
.card-header > div { min-width: 0; }
.card-title { font-size: 17px; font-weight: 650; letter-spacing: -.3px; }
.card-title.with-icon { display: flex; gap: 10px; align-items: center; }
.card-title.with-icon svg { color: var(--forest); width: 20px; height: 20px; }
.card-subtitle { margin-top: 4px; color: var(--muted); font-size: 13px; }
.card-body { padding: 0 24px 22px; }
.card-body.padded { padding-top: 20px; }
.card-footer { padding: 14px 24px; border-top: 1px solid var(--line); background: #fafbf8; font-size: 14px; color: var(--muted); display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.card-footer .button { padding-top: 6px; padding-bottom: 6px; min-height: 38px; }
.budget-card { display: flex; flex-direction: column; }
.budget-card .card-body { margin-top: auto; }
.budget-number { font-weight: 650; font-size: 31px; letter-spacing: -.8px; margin: 2px 0 4px; }
.budget-number small { font-size: 15px; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.progress { width: 100%; height: 8px; background: #edf0e9; border-radius: 20px; overflow: hidden; margin: 17px 0 9px; }
.progress-bar { height: 100%; border-radius: inherit; background: var(--forest); max-width: 100%; min-width: 0; transition: width .3s ease; }
.progress-bar.warning { background: #c28736; }
.progress-bar.danger { background: #b85540; }
.budget-labels { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; color: var(--muted); }
.budget-labels strong { font-weight: 600; color: var(--ink); }
.budget-note { margin-top: 18px; font-size: 13px; color: var(--muted); }

.list-row { display: flex; align-items: center; gap: 13px; min-height: 75px; padding: 15px 0; border-bottom: 1px solid #edf0e9; }
.list-row:last-child { border-bottom: 0; }
.list-row.compact { min-height: 67px; padding: 12px 0; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 15px; font-weight: 550; overflow-wrap: anywhere; }
.row-meta { font-size: 14px; color: var(--muted); margin-top: 4px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.row-meta svg { width: 14px; height: 14px; }
.row-actions { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.row-actions .icon-button { width: 44px; height: 44px; flex-basis: 44px; }
.row-amount { font-weight: 650; font-size: 16px; white-space: nowrap; text-align: right; }
.row-amount.income, .positive { color: var(--forest); }
.row-amount.expense { color: var(--ink); }
.negative { color: var(--danger); }
.row-icon { display: grid; place-items: center; width: 42px; height: 42px; background: var(--sage); color: var(--forest); border-radius: 13px; flex-shrink: 0; }
.row-icon.expense { background: #f4eee7; color: #9f7050; }
.row-icon.income { background: var(--sage); color: var(--forest); }
.row-check { display: grid; place-items: center; background: #fff; border: 1.5px solid #cbd5c5; width: 25px; height: 25px; min-width: 25px; border-radius: 7px; padding: 0; position: relative; }
.row-check::before { content: ""; position: absolute; inset: -10px; }
.row-check svg { width: 17px; height: 17px; }
.row-check:hover { border-color: var(--forest); background: #f0f4eb; }
.row-check.checked, .row-check[aria-checked="true"] { background: var(--forest); color: #fff; border-color: var(--forest); }
.list-row.completed .row-title { color: #7b857e; text-decoration: line-through; }
.list-row.completed .row-icon { opacity: .65; }
.list-row.overdue .row-meta, .overdue-text { color: var(--danger); }
.date-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 43px; height: 48px; background: #f5f3ed; color: #92714b; border-radius: 10px; flex-shrink: 0; }
.date-tile strong { font-size: 19px; line-height: 1.2; font-weight: 650; }
.date-tile small { font-size: 10px; text-transform: uppercase; letter-spacing: .4px; }
.date-tile.overdue { background: #f9e9e3; color: var(--danger); }
.date-tile.today { background: var(--sage); color: var(--forest); }
.section-label { display: flex; align-items: center; gap: 9px; font-size: 12px; letter-spacing: 1.15px; text-transform: uppercase; font-weight: 700; color: var(--muted); padding: 25px 0 9px; }
.section-label:first-child { padding-top: 8px; }
.section-label > span { background: #eef1e9; padding: 1px 7px; border-radius: 5px; color: var(--muted); letter-spacing: 0; font-size: 11px; }
.badge { display: inline-flex; align-items: center; justify-content: center; gap: 5px; border-radius: 6px; padding: 3px 7px; font-size: 14px; font-weight: 550; line-height: 1.5; white-space: nowrap; }
.badge.neutral { background: #edf0e9; color: #5c6a5e; }
.badge.success { background: #e5efde; color: #355f2b; }
.badge.warning { background: #faf0d9; color: var(--warning); }
.badge.danger { background: #fbe6df; color: var(--danger); }
.badge.clay { background: var(--clay-soft); color: var(--clay); }

.empty-state { padding: 36px 18px 34px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 19px; background: #f0f4eb; color: #78916b; margin-bottom: 15px; }
.empty-icon svg { width: 27px; height: 27px; }
.empty-state h2, .empty-state h3, .empty-state strong { font-size: 16px; font-weight: 650; margin: 0 0 7px; }
.empty-state p { font-size: 14px; color: var(--muted); max-width: 290px; }
.empty-state .button { margin-top: 19px; }
.empty-state.large { padding: 62px 22px; }
.empty-state.large .empty-icon { width: 70px; height: 70px; border-radius: 23px; margin-bottom: 20px; }
.empty-state.large h2 { font-size: 20px; letter-spacing: -.4px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.toolbar-group { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.segmented { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 11px; background: #e9ede5; max-width: 100%; }
.segmented button { min-height: 39px; border: 0; border-radius: 8px; padding: 8px 15px; background: transparent; color: #6b766d; font-size: 14px; font-weight: 600; white-space: nowrap; }
.segmented button.active, .segmented button[aria-pressed="true"] { background: #fff; color: var(--forest); box-shadow: 0 1px 4px #214d3e0a; }
.segmented button:hover:not(.active) { color: var(--forest); background: #f1f4ed; }
.field-control { min-height: 46px; border: 1px solid #dce2d7; background: white; border-radius: 10px; padding: 9px 13px; color: var(--ink); max-width: 100%; }
select.field-control { padding-right: 35px; }
.month-control { display: inline-flex; align-items: center; gap: 8px; padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.month-control input { border: 0; background: transparent; max-width: 190px; font-size: 15px; padding: 7px; color: var(--ink); }
.month-control .icon-button { width: 37px; flex-basis: 37px; height: 39px; }
.summary-note { color: var(--muted); font-size: 14px; }
.filter-count { font-size: 14px; color: var(--muted); }
.budget-overview { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; margin-bottom: 24px; }
.budget-summary { display: flex; align-items: center; gap: 22px; }
.category-list { display: grid; gap: 16px; }
.category-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.category-row strong { font-weight: 600; }
.category-item .progress { margin: 7px 0 0; height: 6px; }
.inline-note { padding: 14px 17px; border: 1px solid #dee7d8; background: #f0f5eb; border-radius: 12px; color: #53664c; font-size: 14px; display: flex; align-items: flex-start; gap: 10px; margin-bottom: 22px; }
.inline-note svg { width: 19px; height: 19px; margin-top: 1px; }
.inline-note p { flex: 1; }
.bottom-nav { display: none; }

.dialog { width: min(520px, calc(100% - 32px)); max-height: calc(100dvh - 48px); padding: 0; border: 1px solid #e5eadf; border-radius: 22px; color: var(--ink); background: #fff; box-shadow: 0 25px 100px #153c3233; overflow-x: hidden; overflow-y: auto; }
.dialog::backdrop { background: rgb(17 37 29 / 43%); backdrop-filter: blur(4px); }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 24px 26px 18px; }
.dialog-header h2 { font-size: 23px; letter-spacing: -.65px; font-weight: 650; padding-top: 6px; line-height: 1.3; }
.dialog-header p { font-size: 14px; color: var(--muted); margin-top: 6px; }
.dialog-header .icon-button { margin: -3px -10px 0 0; }
.dialog-body { padding: 4px 26px 25px; }
.dialog-footer { display: flex; justify-content: flex-end; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding: 18px 26px 22px; background: #fbfcf9; }
.dialog form { margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
.field { display: flex; flex-direction: column; align-items: stretch; gap: 7px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field > label, .field > span, .field-label { font-size: 14px; font-weight: 600; }
.field input, .field select, .field textarea { display: block; width: 100%; min-height: 47px; border: 1px solid #d8e0d1; border-radius: 10px; background: #fff; padding: 11px 13px; color: var(--ink); font-size: 16px; line-height: 1.4; transition: border-color .15s, box-shadow .15s; }
.field textarea { min-height: 94px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #b3c1aa; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: #6e915c; box-shadow: 0 0 0 3px #e4eddd; }
.field input::placeholder, .field textarea::placeholder { color: #6e796a; opacity: 1; }
.field input[type="date"], .field input[type="month"] { min-width: 0; min-height: 47px; -webkit-appearance: none; }
.field input[type="date"]::-webkit-date-and-time-value { text-align: left; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235a6f60' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") !important; background-repeat: no-repeat !important; background-position: right 12px center !important; padding-right: 38px !important; }
.field small, .field-help { font-size: 12px; color: var(--muted); line-height: 1.5; font-weight: 400; }
.form-error { padding: 11px 14px; background: #fceee9; border: 1px solid #f1d4c9; border-radius: 10px; color: #a23b2b; font-size: 14px; margin-bottom: 17px; }
.form-error:empty { display: none; }
.form-grid > .form-error { grid-column: 1 / -1; margin: 0; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 23px; }
.invite-box { padding: 20px; border: 1px dashed #c7d3bd; background: #f4f7ef; border-radius: 13px; margin: 20px 0 24px; text-align: center; }
.invite-box > p { color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.invite-code { display: block; font-family: "SFMono-Regular", Consolas, monospace; font-size: 24px; line-height: 1.5; font-weight: 650; color: var(--forest); letter-spacing: 2px; overflow-wrap: anywhere; }
.invite-box .button { margin-top: 12px; }
.member-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.member-row:last-child { border-bottom: 0; }
.member-row > div { flex: 1; min-width: 0; }
.member-row strong { display: block; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.member-row small { font-size: 13px; color: var(--muted); }
.household-description { color: var(--muted); font-size: 14px; }
.confirm-description { color: var(--muted); font-size: 15px; line-height: 1.7; }
.toast { position: fixed; left: calc(50% + 121px); bottom: 25px; transform: translateX(-50%); max-width: min(500px, calc(100vw - 32px)); z-index: 100; padding: 14px 20px; background: var(--forest-dark); color: #fff; border-radius: 13px; box-shadow: 0 8px 30px #173c342b; font-size: 14px; display: flex; align-items: center; gap: 10px; animation: toast-in .2s ease-out; }
.toast.error { background: #9e3e31; }
.toast svg { width: 19px; height: 19px; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

.auth-shell { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); background: #fcfdfa; }
.auth-story { position: relative; padding: 48px 11%; background: var(--forest-dark); color: #f6f7ee; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; }
.auth-story > * { position: relative; z-index: 1; }
.auth-story .brand { color: #fff; }
.auth-story .brand-mark { background: #ffffff12; border: 1px solid #ffffff20; color: #deebd4; }
.auth-story .brand-caption { color: #c1d1c4; }
.auth-story h1 { max-width: 450px; margin-top: 60px; font-size: clamp(35px, 3.8vw, 54px); line-height: 1.15; font-weight: 550; letter-spacing: -1.9px; }
.auth-story h1 em { font-family: Georgia, "Times New Roman", serif; color: #c4d4ad; font-weight: 400; }
.auth-story h1 + p { max-width: 370px; color: #c1d3c5; font-size: 16px; line-height: 1.7; margin-top: 22px; }
.auth-story::after { content: ""; width: 550px; height: 550px; position: absolute; bottom: -330px; left: -120px; border-radius: 50%; background: #7d9b6422; pointer-events: none; }
.auth-story-footer { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #b4cbb8; margin-top: 35px; }
.auth-story-footer svg { width: 18px; height: 18px; }
.auth-art { width: 100%; max-width: 350px; height: 215px; margin: 30px auto 0; position: relative; display: grid; place-items: center; }
.auth-art svg { width: 100%; height: 100%; color: #adc69c; }
.auth-features { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 27px; }
.auth-feature { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; border: 1px solid #ffffff20; border-radius: 20px; padding: 6px 10px; color: #d1e0cb; }
.auth-feature svg { width: 14px; height: 14px; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 50px 40px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card > .brand { display: none; }
.auth-card h2 { font-weight: 650; font-size: 30px; letter-spacing: -.9px; line-height: 1.3; }
.auth-card > p, .auth-intro { color: var(--muted); margin-top: 10px; font-size: 15px; }
.auth-tabs { display: flex; gap: 4px; border-radius: 11px; padding: 4px; background: #e9eee4; margin: 27px 0; }
.auth-tabs button { flex: 1; min-height: 42px; border: 0; border-radius: 8px; font-size: 14px; font-weight: 650; color: var(--muted); background: transparent; }
.auth-tabs button.active, .auth-tabs button[aria-selected="true"] { background: #fff; color: var(--forest); box-shadow: 0 1px 4px #233d2b0c; }
.auth-form { display: grid; gap: 19px; }
.auth-form .button.primary { min-height: 48px; width: 100%; margin-top: 4px; }
.auth-form .form-error { margin: 0; }
.auth-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-choice > button, .auth-choice > label { border: 1px solid #dce3d5; background: #fff; border-radius: 11px; padding: 12px 10px; color: #677461; font-size: 14px; text-align: center; min-height: 46px; cursor: pointer; }
.auth-choice > button.active, .auth-choice > label:has(input:checked) { border-color: var(--forest); background: #eaf0e3; color: var(--forest); box-shadow: inset 0 0 0 1px var(--forest); }
.auth-choice svg { display: inline-block; width: 18px; height: 18px; vertical-align: middle; margin-right: 4px; }
.auth-choice input[type="radio"] { accent-color: var(--forest); margin-right: 5px; }
.auth-footnote { margin-top: 25px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); line-height: 1.7; }
.auth-footnote svg { display: inline; vertical-align: middle; width: 15px; height: 15px; margin-right: 4px; }
.auth-loading, .app-loading { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 17px; color: var(--muted); }
.loading-spinner { width: 28px; height: 28px; border: 3px solid #d8e4ce; border-top-color: var(--forest); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { border-radius: 10px; background: linear-gradient(90deg, #e8ede4 25%, #f3f6f0 50%, #e8ede4 75%); background-size: 200% 100%; animation: shimmer 1.6s infinite; min-height: 20px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Shared shell and the content-specific details. */
.skip-link { position: fixed; top: -100px; left: 15px; z-index: 150; padding: 12px 20px; border-radius: 9px; background: var(--forest); color: white; }
.skip-link:focus { top: 15px; }
.brand-name { display: inline-block; }
.brand-caption { display: block; }
.brand-dot, .greeting-dot { color: #c07c58; }
.sidebar { gap: 0; }
.sidebar > .brand { margin-bottom: 44px; }
.nav-section-label { margin: 0 17px 15px; font-size: 11px; color: #6e7c6c; letter-spacing: 1.6px; font-weight: 650; }
.nav-count { margin-left: auto; background: #d8e3ce; color: var(--forest); padding: 1px 7px; border-radius: 6px; font-size: 12px; line-height: 1.7; }
.sidebar-bottom { border-top: 0; }
.sidebar-note { display: flex; gap: 12px; text-align: left; padding: 16px; margin: 0 0 20px; color: #6c7a64; background: #f0f4e9; border-radius: 13px; font-size: 13px; line-height: 1.65; }
.sidebar-note svg { width: 25px; height: 25px; color: #93a67b; margin-top: 4px; }
.household-button { border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; padding-top: 17px; }
.household-icon { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid #dbe3d4; border-radius: 11px; color: var(--forest); flex-shrink: 0; }
.household-icon svg { width: 20px; height: 20px; }
.household-button > span:not(.household-icon) { flex: 1; min-width: 0; }
.household-button > svg { width: 15px; height: 15px; }
.topbar-date { display: inline-flex; align-items: center; gap: 9px; }
.topbar-date svg { width: 17px; height: 17px; color: #83917f; }
.topbar-household { font-size: 13px; color: var(--muted); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { cursor: pointer; }
button.avatar { border: 2px solid white; }
.app-footer { max-width: 1240px; margin: 36px auto 0; color: #6d7769; font-size: 12px; padding-top: 21px; border-top: 1px solid var(--line); }
.app-footer > span { font-weight: 650; color: #71806a; margin-right: 7px; }
.eyebrow { display: block; }
.hero-kicker { display: inline-flex; gap: 8px; align-items: center; color: #d6e3d0; font-size: 14px; }
.hero-kicker svg { width: 19px; height: 19px; }
.balance-month { color: #bbd0bf; font-size: 12px; text-transform: capitalize; }
.balance-card .balance-label { margin-top: 24px; color: #b7cdbd; font-size: 13px; }
.balance-card .balance-amount { margin: 4px 0; }
.balance-caption { color: #b0c9b8; font-size: 13px; }
.balance-meta { display: flex; align-items: flex-end; gap: 29px; margin-top: 24px; padding-top: 19px; border-top: 1px solid #ffffff24; }
.balance-meta .balance-stat { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.balance-meta .balance-stat > span { display: inline-flex; align-items: center; gap: 5px; color: #b9cec1; font-size: 12px; }
.balance-meta .balance-stat > span svg { width: 14px; height: 14px; color: #b5cf9b; }
.balance-meta .balance-stat:nth-child(2) > span svg { color: #e0ab90; }
.balance-meta .balance-stat strong { font-size: 18px; font-weight: 600; color: #f5f7ee; }
.balance-link { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; color: #c0d4b6; font-size: 12px; min-height: 30px; }
.balance-link:hover { color: white; }
.balance-link svg { width: 14px; height: 14px; }
.card-icon { display: inline-flex; color: #7b9070; }
.card-icon svg { width: 21px; height: 21px; }
.budget-main-value { font-weight: 650; font-size: 31px; line-height: 1.25; letter-spacing: -1px; margin-bottom: 6px; padding-top: 10px; }
.muted { color: var(--muted); font-size: 14px; line-height: 1.6; }
.budget-hint { font-size: 13px; color: var(--muted); margin-top: 14px; line-height: 1.5; }
.budget-edit { margin: 9px 0 -6px -12px; }
.progress-native { display: block; appearance: none; width: 100%; height: 100%; border: 0; background: transparent; border-radius: inherit; color: var(--forest); }
.progress-native::-webkit-progress-bar { background: #edf0e9; border-radius: 20px; }
.progress-native::-webkit-progress-value { background: var(--forest); border-radius: 20px; transition: width .25s; }
.progress-native::-moz-progress-bar { background: var(--forest); border-radius: 20px; }
.over-budget .progress-native::-webkit-progress-value { background: #b45e44; }
.over-budget .progress-native::-moz-progress-bar { background: #b45e44; }
.stats-grid .stat-card { display: grid; grid-template-columns: 42px 1fr; gap: 14px; }
.stats-grid .stat-card > div { min-width: 0; }
.stats-grid .stat-value, .stats-grid .stat-label { display: block; }
.stats-grid .stat-label { margin: 4px 0 0; font-size: 14px; }
.stats-grid .stat-detail { grid-column: 1 / -1; font-size: 12px; color: #6c7963; padding-top: 12px; border-top: 1px solid #edf0e7; }
.stat-icon.peach { color: #b2724e; background: #f7ece2; }
.stat-icon.lavender { color: #81738d; background: #f0ecf5; }
a.stat-card { transition: border-color .18s, box-shadow .18s; }
a.stat-card:hover { border-color: #c7d5bd; box-shadow: 0 4px 20px #214d3e08; }
.card-footer > svg { width: 16px; height: 16px; }
a.card-footer:hover { color: var(--forest); background: #f4f7ef; }
.list-body { padding-top: 0; }
.list-body > .list-row:first-child { padding-top: 12px; }
.date-label, .repeat-label, .assignee-label { display: inline-flex; align-items: center; gap: 4px; }
.date-label svg, .repeat-label svg, .assignee-label svg, .badge svg { width: 13px; height: 13px; }
.row-title { display: block; }
.repeat-label { color: #7d8975; }
.row-meta > * + * { margin-left: 3px; }
.empty-state.compact { padding-top: 23px; padding-bottom: 29px; }
.empty-state.compact .empty-icon { width: 49px; height: 49px; border-radius: 16px; }
.empty-state.compact .empty-icon svg { width: 24px; height: 24px; }
.toolbar-caption { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); }
.toolbar-caption svg { width: 16px; height: 16px; }
.page-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 20px; color: var(--muted); font-size: 13px; }
.page-note svg { width: 16px; height: 16px; margin-top: 2px; }
.segmented button > span { margin-left: 5px; opacity: .7; font-size: 12px; }
.shopping-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.shopping-grid .card + .card { margin-top: 0; }
.finance-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 24px; }
.finance-stat { display: grid; grid-template-columns: 40px 1fr; column-gap: 15px; row-gap: 3px; padding: 24px; }
.finance-grid .card + .card { margin-top: 0; }
.finance-stat .stat-icon { grid-row: span 2; align-self: center; }
.finance-stat .stat-label { margin: 0; }
.finance-value { display: block; font-size: 28px; font-weight: 650; line-height: 1.4; letter-spacing: -.8px; overflow-wrap: anywhere; }
.month-selector { display: inline-flex; gap: 0; align-items: center; background: white; border: 1px solid #dce2d7; border-radius: 10px; padding-left: 13px; max-width: 100%; }
.month-selector > svg { width: 18px; height: 18px; color: #7b8a72; }
.month-selector .field-control { border: 0; background: transparent; font-size: 15px; padding-left: 10px; }
.budget-side { display: flex; flex-direction: column; min-width: 0; gap: 22px; }
.budget-side .card + .card { margin-top: 0; }
.category-row { justify-content: flex-start; padding: 11px 0; gap: 9px; border-bottom: 1px solid #eff1eb; }
.category-row:first-child { padding-top: 6px; }
.category-row:last-child { border-bottom: 0; padding-bottom: 3px; }
.category-row > strong { margin-left: auto; white-space: nowrap; font-size: 14px; }
.category-dot { width: 8px; height: 8px; border-radius: 3px; background: #4f7654; flex-shrink: 0; }
.category-dot.color-1 { background: #c38d64; }
.category-dot.color-2 { background: #a498b1; }
.category-dot.color-3 { background: #839971; }
.category-dot.color-4 { background: #c5b47b; }
.category-dot.color-5 { background: #83a5a0; }
.category-dot.color-6 { background: #b6a08e; }
.transaction-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0; }
.transaction-icon svg { width: 18px; height: 18px; }
.transaction-icon.income { background: #eaf0e3; color: #5d7a49; }
.transaction-icon.expense { background: #f8eee7; color: #b67b53; }
.transaction-amount { font-size: 15px; font-weight: 650; white-space: nowrap; }
.transaction-amount.income { color: #4b7443; }
.transaction-amount.expense { color: #465541; }
.delete-button:hover { color: var(--danger); background: #fbece7; }
.household-choice { min-width: 0; margin: 0; border: 0; padding: 0; }
.household-choice legend { padding: 0; font-size: 14px; font-weight: 600; margin-bottom: 9px; }
.household-choice #household-field { margin-top: 18px; }
.auth-form > .field, .auth-form #household-field > .field { font-size: 14px; font-weight: 600; }
.auth-main { flex-direction: column; }
.auth-welcome { display: block; color: var(--clay); font-size: 11px; font-weight: 700; letter-spacing: 1.5px; margin-bottom: 10px; }
.auth-story .eyebrow { color: #b8cca0; margin-bottom: 15px; }
.auth-story h1 { margin-top: 0; }
.auth-story-content { margin-top: 48px; }
.auth-story-content h1 + p { margin-top: 20px; }
.auth-features { margin-top: 24px; justify-content: space-between; gap: 10px; }
.auth-features > span { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: #b9cebc; }
.auth-features > span svg { width: 16px; height: 16px; }
.auth-art { height: 220px; margin-top: 42px; margin-bottom: 26px; color: #a9c191; }
.auth-art-caption { position: absolute; bottom: -25px; left: 0; right: 0; color: #b0c6b2; text-align: center; font-size: 11px; }
.auth-footer { font-size: 12px; color: #6d7866; margin-top: 29px; }
.auth-help { font-size: 13px; color: var(--muted); text-align: center; line-height: 1.7; }
.auth-card .auth-tabs { margin-top: 23px; margin-bottom: 24px; }
.auth-card h2 { font-size: 29px; }
.household-heading { display: flex; gap: 13px; align-items: center; margin: 0 0 22px; }
.household-heading h3 { font-size: 18px; letter-spacing: -.3px; margin-bottom: 3px; }
.household-heading + p { font-size: 14px; line-height: 1.7; color: var(--muted); }
.invite-code { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px dashed #c5d0bb; border-radius: 11px; padding: 10px 12px 10px 17px; background: #f4f7ef; margin: 17px 0 8px; }
.invite-code code { font-family: inherit; font-size: 22px; letter-spacing: 1.6px; }
.member-row > strong { flex: 1; }
.account-details { margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.dialog-intro { color: var(--muted); font-size: 14px; margin: 0 0 20px; line-height: 1.7; }
.dialog-body > .field-help { margin-top: 11px; display: block; }
.form-grid > .full { grid-column: 1 / -1; }
.form-grid > .field-help { margin: -3px 0 0; }
.loading-screen { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 17px; padding: 30px; color: var(--muted); }
.loading-screen h1 { font-size: 25px; letter-spacing: -.6px; color: var(--ink); }
.loading-screen > svg { width: 45px; height: 45px; color: var(--forest); }
.loading-mark { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 19px; color: white; background: var(--forest); font-weight: 650; letter-spacing: -1px; font-size: 23px; }

@media (min-width: 1600px) {
  .main-content { padding-right: 60px; padding-left: 60px; }
  .page { padding-top: 42px; }
  .balance-card { padding: 32px 35px; }
}

@media (max-width: 1199px) {
  .sidebar { width: 218px; padding-right: 14px; padding-left: 14px; }
  .main-content { margin-left: 218px; padding-right: 28px; padding-left: 28px; }
  .brand-name { font-size: 21px; }
  .dashboard-grid { gap: 18px; }
  .dashboard-grid > .balance-card { grid-column: span 8; }
  .dashboard-grid > .stat-card { grid-column: span 2; padding: 20px 16px; }
  .dashboard-grid > .stat-card .stat-value { font-size: 25px; }
  .dashboard-grid > .stat-card .stat-label { font-size: 14px; }
  .balance-card { padding: 27px; }
  .balance-stats { gap: 22px; }
  .card-header { padding-right: 20px; padding-left: 20px; }
  .card-body { padding-right: 20px; padding-left: 20px; }
  .card-footer { padding-right: 20px; padding-left: 20px; }
  .toast { left: calc(50% + 109px); }
  .auth-story { padding: 38px 10%; }
}

@media (max-width: 1000px) {
  .dashboard-grid > .balance-card { grid-column: span 12; }
  .dashboard-grid > .stat-card { grid-column: span 6; flex-direction: row; align-items: center; justify-content: flex-start; gap: 16px; padding: 20px; }
  .dashboard-grid > .stat-card .stat-label { margin-top: 0; }
  .overview-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
  .dashboard-grid > .span-4 { grid-column: span 6; }
  .stats-grid { gap: 13px; }
  .stats-grid .stat-card { flex-direction: column; align-items: flex-start; gap: 12px; padding: 20px; }
  .stats-grid .stat-value { font-size: 23px; }
  .budget-overview { grid-template-columns: 1fr; }
  .budget-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .finance-stat { padding: 20px; grid-template-columns: 1fr; row-gap: 6px; }
  .finance-stat .stat-icon { grid-row: auto; margin-bottom: 5px; }
  .finance-value { font-size: 25px; }
  .auth-story h1 { font-size: 38px; }
  .auth-main { padding-right: 30px; padding-left: 30px; }
}

@media (max-width: 800px) {
  .sidebar { display: none; }
  .main-content { margin: 0; padding: 0 24px calc(105px + env(safe-area-inset-bottom, 0px)); }
  .topbar { min-height: 80px; }
  .topbar-date { font-size: 13px; }
  .topbar-actions { gap: 10px; }
  .page { padding-top: 27px; }
  .page-header { margin-bottom: 24px; }
  .page-title { font-size: 30px; letter-spacing: -1px; }
  .page-subtitle { font-size: 14px; }
  .bottom-nav { display: flex; justify-content: space-around; align-items: stretch; position: fixed; z-index: 30; bottom: 0; inset-inline: 0; padding: 6px 10px calc(7px + env(safe-area-inset-bottom, 0px)); background: rgb(253 254 251 / 96%); border-top: 1px solid #e1e7dc; backdrop-filter: blur(14px); box-shadow: 0 -3px 20px #214d3e04; }
  .bottom-nav .nav-link { flex: 1; max-width: 110px; min-width: 0; display: flex; flex-direction: column; gap: 4px; justify-content: center; padding: 8px 1px 5px; min-height: 55px; border-radius: 11px; font-size: 14px; font-weight: 650; }
  .bottom-nav .nav-link svg { width: 21px; height: 21px; }
  .bottom-nav .nav-link.active { background: transparent; color: var(--forest); }
  .bottom-nav .nav-link.active svg { background: #e4eddc; box-sizing: content-box; padding: 4px 13px; margin: -4px -13px; border-radius: 11px; }
  .bottom-nav .nav-link:hover { background: #edf2e7; }
  .toast { left: 50%; bottom: calc(90px + env(safe-area-inset-bottom, 0px)); }
  .auth-shell { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
  .auth-story { padding: 33px 9%; }
  .auth-story h1 { font-size: 32px; letter-spacing: -1px; }
  .auth-story h1 + p { font-size: 14px; }
  .auth-art { height: 180px; }
  .auth-features { display: none; }
  .auth-story-footer { font-size: 12px; }
  .auth-main { padding: 35px 24px; }
  .auth-art { height: 180px; }
  .auth-story-content { margin-top: 44px; }
}

@media (max-width: 600px) {
  .main-content { padding-right: 18px; padding-left: 18px; }
  .topbar { min-height: 75px; }
  .topbar-greeting { display: none; }
  .topbar .brand-name { font-size: 19px; }
  .topbar .brand-mark { width: 36px; height: 36px; flex-basis: 36px; border-radius: 12px; }
  .topbar .brand-mark svg { width: 23px; height: 23px; }
  .page { padding-top: 24px; }
  .page-header { gap: 16px; align-items: flex-start; flex-wrap: wrap; }
  .page-header > div:first-child { flex: 1; min-width: 200px; }
  .eyebrow { font-size: 11px; letter-spacing: 1.5px; margin-bottom: 5px; }
  .page-title { font-size: 29px; }
  .page-subtitle { line-height: 1.6; margin-top: 7px; }
  .header-actions { width: 100%; }
  .header-actions .button { flex: 1; }
  .header-actions .month-control { flex: 1; justify-content: space-between; }
  .dashboard-grid { gap: 16px; }
  .dashboard-grid > * { grid-column: 1 / -1; }
  .dashboard-grid > .balance-card, .dashboard-grid > .budget-card, .dashboard-grid > .span-4, .dashboard-grid > .span-6, .dashboard-grid > .span-8 { grid-column: 1 / -1; }
  .dashboard-grid > .stat-card { grid-column: span 6; gap: 10px; flex-direction: column; align-items: flex-start; padding: 20px; }
  .dashboard-grid > .stat-card .stat-value { font-size: 28px; }
  .dashboard-grid > .stat-card .stat-label { font-size: 14px; }
  .overview-grid { grid-template-columns: 1fr; gap: 16px; margin-bottom: 16px; }
  .balance-card { min-height: 235px; padding: 24px; border-radius: 18px; }
  .balance-amount { font-size: 39px; letter-spacing: -1.5px; margin-top: 12px; }
  .balance-top { gap: 12px; }
  .hero-kicker { font-size: 13px; gap: 6px; }
  .balance-month { font-size: 11px; }
  .balance-card .balance-label { margin-top: 23px; }
  .balance-meta { margin-top: 21px; padding-top: 16px; gap: 30px; }
  .balance-meta .balance-stat strong { font-size: 17px; }
  .balance-link { font-size: 12px; }
  .balance-stats { gap: 23px; padding-top: 17px; margin-top: 23px; }
  .balance-stat { gap: 9px; }
  .balance-stat .stat-icon { width: 32px; height: 32px; border-radius: 10px; }
  .balance-stat .stat-icon svg { width: 17px; height: 17px; }
  .balance-stat strong { font-size: 16px; }
  .balance-stat small { font-size: 11px; }
  .card { border-radius: 17px; }
  .card + .card { margin-top: 18px; }
  .card-header { padding: 20px 20px 14px; }
  .card-title { font-size: 17px; }
  .card-header .button { padding: 7px 9px; min-height: 44px; font-size: 14px; }
  .card-body { padding: 0 20px 17px; }
  .card-footer { padding: 12px 20px; font-size: 13px; }
  .list-row { gap: 11px; padding: 14px 0; }
  .row-title { font-size: 15px; }
  .row-meta { font-size: 14px; gap: 4px; }
  .row-actions { gap: 0; }
  .row-actions .icon-button { width: 44px; flex-basis: 44px; }
  .row-actions .icon-button svg { width: 17px; height: 17px; }
  .row-icon { width: 37px; height: 37px; border-radius: 11px; }
  .row-icon svg { width: 19px; height: 19px; }
  .row-amount { font-size: 15px; }
  .row-check { width: 24px; height: 24px; min-width: 24px; }
  .date-tile { width: 40px; height: 45px; }
  .stats-grid { gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 18px; }
  .stats-grid .stat-card { grid-template-columns: 1fr; padding: 16px 11px; border-radius: 14px; gap: 10px; }
  .stats-grid .stat-icon { width: 34px; height: 34px; border-radius: 10px; }
  .stats-grid .stat-icon svg { width: 18px; height: 18px; }
  .stats-grid .stat-label { font-size: 14px; line-height: 1.45; overflow-wrap: break-word; min-height: 41px; }
  .stats-grid .stat-value { font-size: 28px; letter-spacing: -.6px; overflow-wrap: anywhere; }
  .stats-grid .stat-detail { display: none; }
  .stats-grid .stat-caption { font-size: 11px; }
  .toolbar { gap: 13px; margin-bottom: 18px; }
  .toolbar .segmented { width: 100%; }
  .toolbar .segmented button { flex: 1; padding-inline: 9px; }
  .toolbar > .field-control, .toolbar > select { width: 100%; }
  .toolbar-group { width: 100%; }
  .toolbar .filter-count { font-size: 13px; }
  .empty-state { padding: 30px 7px; }
  .empty-state p { font-size: 14px; }
  .empty-state.large { padding: 45px 15px; }
  .budget-overview { gap: 16px; margin-bottom: 18px; }
  .budget-side { grid-template-columns: 1fr; gap: 16px; }
  .finance-grid { grid-template-columns: 1fr; gap: 10px; margin-bottom: 18px; }
  .finance-stat { grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; padding: 16px; border-radius: 14px; column-gap: 13px; row-gap: 0; }
  .finance-stat .stat-icon { grid-column: 1; grid-row: 1; width: 34px; height: 34px; margin: 0; border-radius: 10px; }
  .finance-stat .stat-icon svg { width: 18px; height: 18px; }
  .finance-stat .stat-label { grid-column: 2; grid-row: 1; font-size: 14px; }
  .finance-value { grid-column: 3; grid-row: 1; font-size: 22px; letter-spacing: -.8px; line-height: 1.5; white-space: nowrap; overflow-wrap: normal; text-align: right; }
  .shopping-grid { grid-template-columns: 1fr; gap: 16px; }
  .toolbar .month-selector { flex: auto; width: 100%; min-width: 0; }
  .month-selector .field-control { width: 100%; }
  .toolbar .month-selector + .button { width: 100%; font-size: 14px; padding-right: 10px; padding-left: 10px; }
  .transaction-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; column-gap: 10px; row-gap: 5px; }
  .transaction-row .transaction-icon { grid-column: 1; grid-row: 1 / span 2; width: 36px; height: 36px; align-self: start; margin-top: 3px; }
  .transaction-row .row-main { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .transaction-row .transaction-amount { grid-column: 3; grid-row: 1; text-align: right; font-size: 15px; }
  .transaction-row .row-actions { grid-column: 3; grid-row: 2; justify-content: flex-end; }
  .transaction-row:not(:has(.row-actions)) { display: flex; }
  .transaction-row:not(:has(.row-actions)) .transaction-icon { align-self: center; margin-top: 0; }
  .dialog { max-height: calc(100dvh - 28px); width: calc(100% - 24px); border-radius: 20px; }
  .dialog-header { padding: 20px 20px 16px; }
  .dialog-header h2 { font-size: 22px; }
  .dialog-body { padding: 2px 20px 21px; }
  .dialog-footer { padding: 16px 20px 20px; }
  .dialog-footer .button { flex: 1; }
  .form-grid { gap: 17px 13px; }
  .field input, .field select, .field textarea { padding: 11px 12px; }
  .invite-code { font-size: 21px; letter-spacing: 1.2px; }
  .auth-shell { display: flex; flex-direction: column; min-height: 100dvh; background: var(--canvas); }
  .auth-story { display: none; }
  .auth-main { flex: 1; display: block; padding: 35px 24px 40px; }
  .auth-card { margin: 0 auto; max-width: 410px; }
  .auth-card > .brand { display: flex; margin-bottom: 43px; }
  .auth-card h2 { font-size: 29px; }
  .auth-card > p, .auth-intro { font-size: 15px; }
  .auth-tabs { margin: 25px 0; }
  .auth-form { gap: 18px; }
  .auth-footnote { margin-top: 25px; padding-top: 18px; }
  .auth-footer { text-align: center; margin-top: 30px; }
  .auth-welcome { margin-bottom: 12px; }
  .invite-code { padding-left: 13px; }
  .invite-code code { font-size: 20px; letter-spacing: 1.2px; }
}

@media (max-width: 359px) {
  .main-content { padding-right: 13px; padding-left: 13px; }
  .balance-card { padding: 21px; }
  .balance-stats { gap: 15px; }
  .balance-stat .stat-icon { display: none; }
  .balance-amount { font-size: 35px; }
  .card-header, .card-body { padding-right: 16px; padding-left: 16px; }
  .row-actions .icon-button { width: 44px; flex-basis: 44px; }
  .stats-grid { grid-template-columns: 1fr; }
  .stats-grid .stat-value { font-size: 25px; }
  .stats-grid .stat-card { padding: 15px 18px; grid-template-columns: 34px 1fr; gap: 14px; }
  .stats-grid .stat-label { min-height: auto; }
  .finance-grid { grid-template-columns: 1fr; }
  .finance-stat { column-gap: 11px; padding: 14px; }
  .finance-value { font-size: 21px; }
  .balance-meta { gap: 25px; flex-wrap: wrap; }
  .balance-link { display: none; }
  .toolbar .month-selector { width: 100%; flex: auto; }
  .toolbar .month-selector + .button { width: 100%; }
  .auth-main { padding-right: 19px; padding-left: 19px; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .dialog-header, .dialog-body, .dialog-footer { padding-right: 17px; padding-left: 17px; }
}

@media (max-width: 480px) {
  .dialog-footer { flex-direction: column; align-items: stretch; }
  .dialog-footer .button { width: 100%; flex: auto; white-space: normal; text-align: center; }
}

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

@media print {
  .sidebar, .bottom-nav, .topbar-actions, .header-actions, .row-actions, .toast { display: none !important; }
  .main-content { margin: 0; padding: 0; }
  .card, .balance-card { break-inside: avoid; box-shadow: none; }
  body { background: #fff; }
}
