/* Money Dashboard. Phone first; the sidebar appears from 900px. */

@font-face {
  font-family: 'Manrope';
  src: url('/fonts/manrope.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --ground: #F2F4F0;
  --card: #FFFFFF;
  --line: #DFE3DC;
  --line-soft: #EDF0EA;
  --line-strong: #CDD3CA;
  --track: #E7EBE4;
  --soft: #F7F8F5;
  --chip: #EEF1EC;
  --ink: #16201A;
  --ink-2: #2E3832;
  --muted: #59625C;
  --past: #8C978F;
  --accent: #1E6B47;
  --accent-tint: color-mix(in srgb, var(--accent) 10%, #FFFFFF);
  --over: #A84B08;
  --over-bar: #C2610F;
  --over-tint: #FFF8F1;
  --over-line: #F1CFAE;
  --radius: 16px;
  --font: Manrope, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
}
a { color: inherit; }
a:hover { opacity: 0.85; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.strong { font-weight: 700; }
.over-text { color: var(--over); }
.in-text { color: var(--accent); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
[hidden] { display: none !important; }

/* Shell */

.shell { display: flex; min-height: 100vh; }
.sidebar { display: none; }
.main {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 1200px;
  padding: calc(16px + env(safe-area-inset-top)) 16px calc(112px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.topbar-actions { display: flex; gap: 8px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 800; letter-spacing: -0.02em; text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: #FFFFFF;
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px;
}
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; align-items: center; gap: 4px;
  padding: 6px 10px calc(8px + env(safe-area-inset-bottom));
  background: var(--card); border-top: 1px solid var(--line);
}
.tab {
  flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 52px; font-size: 12px; font-weight: 600; color: var(--muted); text-decoration: none;
}
.tab[aria-current="page"] { color: var(--accent); font-weight: 800; }
.tab-add {
  flex: 0 0 56px; width: 56px; height: 56px; border-radius: 18px;
  background: var(--accent); color: #FFFFFF; display: flex; align-items: center; justify-content: center;
}

@media (min-width: 900px) {
  .sidebar {
    display: flex; flex-direction: column; gap: 28px;
    flex: 0 0 248px; padding: 24px 16px;
    background: var(--card); border-right: 1px solid var(--line);
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
  }
  .sidebar .brand { padding: 0 8px; font-size: 18px; }
  .nav { display: flex; flex-direction: column; gap: 4px; }
  .nav a {
    display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px;
    border-radius: 10px; color: #3A443E; font-size: 15px; font-weight: 600; text-decoration: none;
  }
  .nav a[aria-current="page"] { background: var(--accent-tint); color: var(--accent); font-weight: 700; }
  .private { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 12px; background: var(--ground); }
  .private p { font-size: 14px; color: var(--muted); }
  .main { padding: 32px 40px 56px; gap: 24px; }
  .topbar, .tabbar { display: none; }
}

/* Page heading */

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-head-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kicker { font-size: 14px; font-weight: 600; color: var(--muted); }
.page-title { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
.page-sub { font-size: 15px; color: var(--muted); }
.month-switch { display: flex; align-items: center; gap: 10px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (min-width: 900px) { .page-title { font-size: 34px; } }

/* Buttons and fields */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: var(--card); color: var(--ink);
  font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.btn-primary { border-color: var(--accent); background: var(--accent); color: #FFFFFF; font-weight: 700; }
.btn-soft { border-color: transparent; background: var(--accent-tint); color: var(--accent); font-weight: 700; }
.btn-danger { border-color: var(--over-line); color: var(--over); }
.btn-quiet { border-color: transparent; background: transparent; color: var(--accent); font-weight: 700; padding: 0 4px; }
.btn-block { width: 100%; }
.btn-big { min-height: 56px; border-radius: 16px; font-size: 16px; font-weight: 800; }
.btn:disabled { background: #E1E5DE; border-color: #E1E5DE; color: var(--muted); }
.icon-btn {
  width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
}
.link { color: var(--accent); font-weight: 700; font-size: 15px; text-decoration: none; }
.link:hover { text-decoration: underline; }
.inline-form { display: inline; }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 700; color: var(--muted); }
.field-hint { font-size: 14px; font-weight: 500; color: var(--muted); }
.field-error { font-size: 14px; font-weight: 700; color: var(--over); }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: 10px; background: var(--card);
  color: var(--ink); font-size: 16px; font-weight: 600;
}
.textarea { padding: 10px 12px; min-height: 80px; }
.input-money { display: flex; align-items: center; gap: 6px; padding: 0 12px; min-height: 44px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--card); }
.input-money span { color: var(--muted); }
.input-money input { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; font-size: 16px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; padding: 0; min-height: 42px; }
.input-money:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.input-money input:focus-visible { outline: none; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; color: var(--ink-2); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: 0 0 20px; accent-color: var(--ink); }
.check-box { padding: 12px 14px; border-radius: 12px; background: var(--ground); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 14px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* Cards */

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0;
}
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.card-title { font-size: 17px; font-weight: 800; }
.card-flush { padding: 0; gap: 0; overflow: hidden; }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); align-items: start; }
.grid-3 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); align-items: start; }
.stats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; }
.stat-label { font-size: 14px; font-weight: 600; color: var(--muted); }
.stat-value { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-warn { background: var(--over-tint); border-color: var(--over-line); }
@media (max-width: 600px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 12px 14px; }
  .stat-value { font-size: 20px; }
  .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (min-width: 900px) { .card { padding: 24px; } .grid, .grid-3 { gap: 24px; } }

/* Lists */

.rows > li, .rows > .row-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-soft); }
.rows > li:first-child, .rows > .row-item:first-child { border-top: 0; }
.row-main { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.row-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-meta { font-size: 14px; color: var(--muted); }
.row-amount { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.date-block { flex: 0 0 44px; display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
.date-block b { font-size: 17px; font-weight: 800; }
.date-block span { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.payday-row { margin: 4px -12px; padding: 10px 12px !important; border-radius: 12px; background: var(--accent-tint); border-top: 0 !important; }
.payday-row + li { border-top: 0; }
.pill {
  display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px;
  background: var(--chip); color: var(--ink-2); font-size: 14px; font-weight: 600; white-space: nowrap;
}
.pill-in { background: var(--accent-tint); color: var(--accent); }
.pill-warn { background: var(--over-tint); color: var(--over); font-weight: 700; text-decoration: none; }

/* Bars */

.bar { height: 8px; border-radius: 4px; background: var(--track); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; background: var(--accent); }
.bar-fill.over { background: var(--over-bar); }
.bar-thick { height: 10px; border-radius: 5px; }
.bar-thick .bar-fill { border-radius: 5px; }
.budget-line { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.budget-line:first-child { border-top: 0; }
.budget-line-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.budget-line-bottom { display: flex; align-items: center; gap: 12px; }
.budget-line-bottom .bar { flex: 1 1 auto; }
.left-text { min-width: 104px; text-align: right; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Banners and messages */

.banner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  padding: 16px 18px; border-radius: var(--radius); background: var(--ink); color: #FFFFFF;
}
.banner-text { flex: 1 1 300px; display: flex; flex-direction: column; gap: 4px; }
.banner-text span { color: #C9D1CB; font-size: 15px; }
.banner .btn { border-color: #5E6A62; background: transparent; color: #FFFFFF; }
.banner .btn-light { border-color: #FFFFFF; background: #FFFFFF; color: var(--ink); font-weight: 700; }
.flash {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius);
  background: var(--ink); color: #FFFFFF;
}
.flash-icon { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; background: #FFFFFF; color: var(--ink); display: flex; align-items: center; justify-content: center; }
.flash-text { flex: 1 1 auto; display: flex; flex-direction: column; line-height: 1.35; }
.flash-text span { font-size: 14px; color: #C9D1CB; }
.flash form { margin: 0; }
.flash .btn { border-color: #5E6A62; background: transparent; color: #FFFFFF; }
.notice { padding: 14px 16px; border-radius: 12px; background: var(--accent-tint); color: var(--ink-2); font-size: 15px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.notice-warn { background: var(--over-tint); border: 1px solid var(--over-line); color: var(--ink-2); }
.notice > span { flex: 1 1 240px; }

/* Overview hero and the pace chart */

.hero { display: flex; flex-wrap: wrap; gap: 28px; }
.hero-main { flex: 1 1 260px; display: flex; flex-direction: column; gap: 8px; }
.hero-number { font-size: 48px; font-weight: 800; letter-spacing: -0.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.hero-sub { font-size: 16px; color: var(--muted); text-wrap: pretty; }
.hero-sub strong { color: var(--ink); }
.figures { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: auto 0 0; padding-top: 16px; border-top: 1px solid var(--track); }
.figures div { display: flex; flex-direction: column; gap: 2px; }
.figures dt { font-size: 14px; font-weight: 600; color: var(--muted); }
.figures dd { margin: 0; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hero-chart { flex: 2 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 900px) { .hero-number { font-size: 60px; } }

.chart { position: relative; }
.pace { height: 170px; display: flex; align-items: flex-end; gap: 3px; padding-top: 44px; border-bottom: 1px solid var(--line-strong); }
.pace-day { flex: 1 1 0; height: 100%; display: flex; align-items: flex-end; }
.pace-bar { width: 100%; border-radius: 4px 4px 0 0; background: var(--past); }
.pace-day.today .pace-bar { background: var(--accent); }
.pace-day.future .pace-bar { background: var(--accent-tint); border: 1.5px dashed var(--accent); border-bottom: 0; }
.pace-day:hover .pace-bar { filter: brightness(0.8); }
.pace-small { height: 56px; padding-top: 0; gap: 2px; }
.axis { position: relative; height: 18px; font-size: 13px; color: var(--muted); }
.axis span { position: absolute; top: 0; white-space: nowrap; }
.axis .axis-today { transform: translateX(-50%); font-weight: 700; color: var(--ink); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 10px; height: 10px; border-radius: 3px; background: var(--past); }
.swatch-today { background: var(--accent); }
.swatch-future { background: var(--accent-tint); border: 1.5px dashed var(--accent); }
.tooltip {
  position: absolute; top: 0; z-index: 5; transform: translateX(-50%);
  padding: 6px 10px; border-radius: 8px; background: var(--ink); color: #FFFFFF;
  font-size: 13px; line-height: 1.3; white-space: nowrap; pointer-events: none;
  display: flex; flex-direction: column;
}
.line-chart { height: 120px; }
.line-chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.line-chart .area { fill: var(--accent); fill-opacity: 0.1; }
.line-chart .line { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.dot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px #FFFFFF; pointer-events: none; }
.hits { position: absolute; inset: 0; display: flex; }
.hits span { flex: 1 1 0; }
.big-chart { display: flex; gap: 12px; min-width: 0; }
.y-axis { position: relative; flex: 0 0 52px; height: 240px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.y-axis span { position: absolute; right: 0; transform: translateY(-50%); }
.plot { position: relative; flex: 1 1 auto; height: 240px; }
.gridline { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line-soft); }
.gridline.base { border-color: var(--line-strong); }
.crosshair { position: absolute; top: 0; bottom: 0; border-left: 1px dashed var(--past); pointer-events: none; }
.x-axis { position: relative; height: 18px; font-size: 13px; color: var(--muted); }
.x-axis span { position: absolute; top: 0; transform: translateX(-50%); }
.x-axis span:first-child { transform: none; }
.x-axis span:last-child { transform: translateX(-100%); }
@media (max-width: 520px) { .x-axis span:nth-child(even) { display: none; } }

/* Budget table */

.budget-table { min-width: 760px; }
.budget-row {
  display: grid; grid-template-columns: minmax(170px, 1.5fr) 150px 116px 136px minmax(130px, 1.2fr);
  align-items: center; gap: 16px; padding: 6px 24px; min-height: 58px; border-top: 1px solid var(--line-soft);
}
.budget-row > span:nth-child(2), .budget-row > span:nth-child(3), .budget-row > span:nth-child(4) { text-align: right; font-variant-numeric: tabular-nums; }
.budget-head { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; min-height: 44px; border-top: 0; }
.budget-group { background: var(--soft); border-top: 1px solid var(--line); font-weight: 800; }
.scroll-x { overflow-x: auto; }

/* Transactions table */

.tx-table { min-width: 780px; }
.tx-row {
  display: grid; grid-template-columns: 112px minmax(190px, 1.5fr) minmax(210px, 1.3fr) 150px 120px;
  align-items: center; gap: 12px; padding: 8px 24px; min-height: 54px; border-top: 1px solid var(--line-soft);
}
.tx-head { background: var(--soft); border-top: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; min-height: 44px; }
.tx-row > :last-child { text-align: right; }
.tx-row.needs { background: var(--over-tint); }
.tx-payee { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.tx-payee:hover { text-decoration: underline; }
.sort-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sort-form .select { width: auto; min-width: 170px; border: 1.5px solid var(--over-bar); }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 20px 24px; }
.filters .field { flex: 1 1 140px; }
.filters .field-search { flex: 2 1 100%; }
@media (min-width: 900px) { .filters .field-search { flex-basis: 260px; } }
@media (max-width: 600px) { .filters { padding: 16px; } }
.table-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; border-top: 1px solid var(--line); }

/* Phone list of payments by day */

.day-group { display: flex; flex-direction: column; gap: 6px; }
.day-head { display: flex; justify-content: space-between; padding: 0 4px; font-size: 14px; font-weight: 700; color: var(--muted); }
.day-head h3 { font-size: 14px; font-weight: 800; color: var(--ink); }
.phone-list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 16px; }
.only-phone { display: block; }
.only-desk { display: none; }
@media (min-width: 900px) { .only-phone { display: none; } .only-desk { display: block; } }

/* Add a payment */

.add-form { display: flex; flex-direction: column; gap: 14px; max-width: 560px; width: 100%; margin: 0 auto; }
.segmented { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 14px; background: #E4E8E1; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label { min-height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 10px; font-weight: 700; cursor: pointer; }
.segmented input:checked + label { background: var(--card); box-shadow: 0 1px 2px rgba(22, 32, 26, 0.12); }
.segmented input:focus-visible + label { outline: 2px solid var(--ink); outline-offset: 2px; }
.amount-box { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.amount-row { display: flex; justify-content: center; align-items: baseline; max-width: 100%; }
.amount-symbol, .amount-input { font-size: 54px; font-weight: 800; letter-spacing: -0.045em; line-height: 1.15; }
.amount-input {
  width: 4.2ch; max-width: 80vw; min-width: 1.4ch; padding: 0; border: 0; background: transparent; text-align: left;
  font-variant-numeric: tabular-nums;
}
.amount-row:focus-within { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 8px; }
.amount-input:focus-visible { outline: none; }
.amount-input::placeholder { color: var(--past); }
.amount-hint { min-height: 22px; font-size: 15px; font-weight: 600; color: var(--muted); }
.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); gap: 8px; border: 0; margin: 0; padding: 0; }
.chips legend { padding: 0 0 6px; font-size: 14px; font-weight: 700; color: var(--muted); }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips label {
  min-height: 44px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 4px 6px;
  border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); font-size: 14px; font-weight: 700; cursor: pointer;
}
.chips input:checked + label { border-color: var(--accent); background: var(--accent-tint); color: var(--accent); }
.chips input:focus-visible + label { outline: 2px solid var(--ink); outline-offset: 2px; }
.add-form:has(#kind-out:checked) .chips-in, .add-form:has(#kind-in:checked) .chips-out { display: none; }
.keypad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.keypad button { min-height: 56px; border-radius: 14px; border: 0; background: var(--card); font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.keypad button:active { background: var(--track); }
.more { border-top: 1px solid var(--line); padding-top: 12px; }
.more summary { min-height: 44px; display: flex; align-items: center; font-weight: 700; color: var(--accent); cursor: pointer; }
.more[open] summary { margin-bottom: 8px; }

/* Savings */

.account-group-head { display: flex; justify-content: space-between; padding: 16px 0 6px; font-size: 13px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.account-group-head:first-child { padding-top: 4px; }
.goal { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--line-soft); border-radius: 14px; }
.goal-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.goal-pct { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.goal-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.goal-add { display: flex; gap: 8px; align-items: center; }
.goal-add .input-money { width: 130px; }
.net-toggle { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }

/* Import */

.steps { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.steps li { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 600; }
.steps li[aria-current="step"] { color: var(--ink); font-weight: 800; }
.step-dot { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: flex; align-items: center; justify-content: center; font-size: 14px; }
.step-done .step-dot { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
[aria-current="step"] .step-dot { border: 2px solid var(--accent); color: var(--accent); }
.sheet-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.sheet { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 14px; }
.sheet th, .sheet td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.sheet thead th { background: var(--chip); color: var(--muted); font-weight: 500; text-align: center; font-size: 13px; }
.sheet .rownum { width: 44px; background: var(--chip); color: var(--muted); text-align: center; font-size: 13px; }
.sheet .pick td { background: var(--card); padding: 8px; font-family: var(--font); }
.sheet .pick select { min-width: 140px; }
.sheet .heading-row td { background: var(--soft); font-weight: 600; }
.sheet .skipped { color: #A3ACA5; }
.map-row { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.map-row .from { font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--ink); }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 32px 20px; border: 2px dashed var(--line-strong); border-radius: var(--radius); background: var(--card); }

/* Sign-in and setup */

.bare-page { min-height: 100vh; display: flex; justify-content: center; padding: calc(48px + env(safe-area-inset-top)) 20px 32px; }
.bare-inner { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 24px; }
.unlock-head { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding-top: 24px; }
.unlock-mark { width: 80px; height: 80px; border-radius: 24px; background: var(--accent); color: #FFFFFF; display: flex; align-items: center; justify-content: center; }
.unlock-title { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }

/* Settings */

.settings-section { scroll-margin-top: 24px; }
.cat-edit { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line-soft); }
.cat-edit:first-child { border-top: 0; }
@media (max-width: 560px) { .cat-edit { grid-template-columns: 1fr; } }

.error-page { text-align: center; align-items: center; }
