:root {
  --bg: #f5f5f3;
  --surface: #ffffff;
  --text: #080808;
  --muted: #666666;
  --line: #e5e5e0;
  --soft: #f0f0ec;
  --black: #000000;
  --white: #ffffff;
  --good: #17633a;
  --bad: #8f2424;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.07);
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #080808;
    --surface: #141414;
    --text: #f4f4f1;
    --muted: #a0a09a;
    --line: #282824;
    --soft: #1e1e1b;
    --black: #ffffff;
    --white: #000000;
    --good: #7fdda7;
    --bad: #f0a09a;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.36);
  }
}

:root[data-theme="dark"] {
  --bg: #080808;
  --surface: #141414;
  --text: #f4f4f1;
  --muted: #a0a09a;
  --line: #282824;
  --soft: #1e1e1b;
  --black: #ffffff;
  --white: #000000;
  --good: #7fdda7;
  --bad: #f0a09a;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.36);
}

:root[data-theme="light"] {
  --bg: #f5f5f3;
  --surface: #ffffff;
  --text: #080808;
  --muted: #666666;
  --line: #e5e5e0;
  --soft: #f0f0ec;
  --black: #000000;
  --white: #ffffff;
  --good: #17633a;
  --bad: #8f2424;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.07);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  color-scheme: light dark;
  touch-action: pan-x pan-y;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  overscroll-behavior: none;
  touch-action: pan-x pan-y;
}

button,
input,
select {
  font: inherit;
}

input,
select {
  font-size: max(16px, 1rem);
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  display: none;
}

.content {
  width: min(100%, 1040px);
  margin: 0 auto;
  padding: 18px 18px calc(104px + env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

h1 {
  margin-bottom: 0;
  font-size: 1.35rem;
  line-height: 1.1;
}

h2 {
  margin-bottom: 4px;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}

h3 {
  margin-bottom: 8px;
  font-size: 0.98rem;
}

.offline-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--soft);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.offline-badge.is-offline {
  color: var(--good);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.45;
}

.balance-hero,
.transaction-panel,
.filter-panel,
.management-form,
.backup-card,
.status-box {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.balance-hero {
  padding: 24px;
  margin-bottom: 14px;
}

.demo-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  background: var(--surface);
}

.demo-banner div {
  display: grid;
  gap: 3px;
}

.demo-banner span {
  color: var(--muted);
  font-size: 0.78rem;
}

.hero-label {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.balance-hero > strong {
  display: block;
  overflow-wrap: anywhere;
  margin-bottom: 4px;
  font-size: clamp(2.65rem, 13vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.balance-hero > span {
  color: var(--muted);
  font-size: 0.92rem;
}

.month-chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 22px;
}

.month-chip {
  border-radius: var(--radius-md);
  background: var(--bg);
  padding: 13px;
}

.month-chip span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.month-chip strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 1rem;
}

.quiet-section {
  margin-top: 28px;
}

.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.section-row h2 {
  margin-bottom: 0;
}

.text-link {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.finance-list,
.menu-list {
  display: grid;
  gap: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.finance-row,
.menu-row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.finance-row:last-child,
.menu-row:last-child {
  border-bottom: 0;
}

.finance-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 16px;
}

.row-main {
  min-width: 0;
}

.row-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 5px;
  font-weight: 850;
  letter-spacing: -0.01em;
}

.row-sub,
.row-detail {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.row-side {
  display: grid;
  justify-items: end;
  gap: 6px;
  min-width: 92px;
}

.amount {
  font-size: 1rem;
  font-weight: 900;
  white-space: nowrap;
  letter-spacing: -0.02em;
}

.amount.income {
  color: var(--good);
}

.amount.outcome {
  color: var(--bad);
}

.pill {
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
}

.pill.income {
  color: var(--good);
}

.pill.outcome {
  color: var(--bad);
}

.delete-link {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.delete-link:hover,
.text-link:hover {
  color: var(--black);
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.empty {
  padding: 24px 18px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  color: var(--muted);
  text-align: center;
}

.empty strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 1rem;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 12px 13px;
  background: var(--bg);
  color: var(--text);
}

input:focus,
select:focus,
button:focus-visible {
  outline: 2px solid var(--black);
  outline-offset: 2px;
}

#viewTitle:focus,
.onboarding-step h2:focus {
  outline: none;
}

.transaction-panel {
  padding: 18px;
}

.amount-field {
  margin-bottom: 16px;
}

.amount-field input {
  min-height: 72px;
  padding: 12px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  font-size: clamp(2.4rem, 13vw, 4.4rem);
  font-weight: 900;
  letter-spacing: -0.06em;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 18px;
  padding: 4px;
  border: 0;
  border-radius: 999px;
  background: var(--bg);
}

.segmented label {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 48px;
  border-radius: 999px;
  color: var(--muted);
}

.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented label:has(input:checked) {
  background: var(--black);
  color: var(--white);
}

.segmented span {
  font-size: 0.94rem;
  font-weight: 900;
}

.form-grid,
.filter-grid {
  display: grid;
  gap: 12px;
}

.full {
  grid-column: 1 / -1;
}

.sticky-actions {
  position: sticky;
  bottom: calc(76px + env(safe-area-inset-bottom));
  margin-top: 18px;
  padding-top: 10px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--surface) 35%);
}

.button,
.file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: var(--surface);
  color: var(--black);
  font-size: 0.9rem;
  font-weight: 900;
  text-decoration: none;
  transition: transform 150ms ease, opacity 150ms ease;
}

.button:hover,
.file-button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--black);
  color: var(--white);
}

.button.ghost {
  background: var(--soft);
  color: var(--text);
}

.button.danger {
  background: #f1e9e8;
  color: var(--bad);
}

.wide {
  width: 100%;
}

.file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.filter-panel,
.management-form {
  display: grid;
  gap: 12px;
  padding: 14px;
  margin-bottom: 16px;
}

.management-form {
  align-items: end;
}

.feature-form {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.calculated-total {
  display: grid;
  gap: 5px;
  align-self: stretch;
  align-content: center;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  background: var(--bg);
}

.calculated-total span,
.metric-card span,
.transport-metric span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
}

.metric-grid,
.analytics-grid,
.planning-grid {
  display: grid;
  gap: 14px;
}

.analytics-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.metric-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 14px;
}

.metric-card,
.panel-card {
  border-radius: var(--radius-lg);
  padding: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric-card strong,
.transport-metric strong {
  display: block;
  overflow-wrap: anywhere;
  margin-top: 7px;
  font-size: clamp(1.2rem, 5vw, 1.8rem);
}

.summary-note {
  margin: -3px 2px 16px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.chart-list {
  display: grid;
  gap: 14px;
}

.chart-heading,
.chart-legend {
  display: flex;
  align-items: center;
}

.chart-heading {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.chart-heading h3 {
  margin: 0;
}

.chart-legend {
  gap: 12px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
}

.chart-legend span::before {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--good);
  content: "";
}

.chart-legend .outcome-key::before {
  background: var(--bad);
}

.chart-row {
  display: grid;
  grid-template-columns: minmax(75px, 0.8fr) minmax(100px, 2fr) auto;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  font-weight: 800;
}

.chart-bar,
.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--bg);
}

.chart-bar span,
.progress-track span {
  display: block;
  width: var(--value, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--black);
}

.chart-bar .outcome-bar,
.progress-track .over-budget {
  background: var(--bad);
}

.trend-row {
  display: grid;
  grid-template-columns: 28px minmax(120px, 1fr) auto;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 800;
}

.trend-row strong {
  min-width: 74px;
  text-align: right;
}

.trend-bars {
  display: grid;
  gap: 3px;
}

.trend-bars span {
  display: block;
  width: var(--value, 0%);
  min-width: 2px;
  height: 6px;
  border-radius: 999px;
  background: var(--good);
}

.trend-bars .outcome-bar {
  background: var(--bad);
}

.insight-list {
  display: grid;
  gap: 0;
}

.insight-list p {
  margin: 0;
  border-bottom: 1px solid var(--line);
  padding: 11px 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.insight-list p:first-child {
  padding-top: 2px;
}

.insight-list p:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.compact-field {
  min-width: 150px;
}

.stack-form {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.budget-row,
.goal-row {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.budget-row:last-child,
.goal-row:last-child {
  border-bottom: 0;
}

.budget-head,
.goal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.budget-head p,
.goal-head p {
  margin: 0;
  font-weight: 850;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.small-button {
  min-height: 34px;
  padding: 6px 12px;
  font-size: 0.75rem;
}

.menu-row {
  display: grid;
  gap: 5px;
  padding: 18px;
}

.menu-row span {
  font-weight: 900;
}

.menu-row strong {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.theme-card,
.about-card {
  margin-top: 16px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.theme-card p,
.about-card p {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.currency-form {
  display: grid;
  gap: 12px;
}

.currency-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  background: var(--bg);
}

.currency-preview span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.currency-preview strong {
  font-size: 1.1rem;
}

.theme-card .setting-status {
  margin: 14px 0 0;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 800;
}

.theme-card .privacy-note {
  margin: 8px 0 0;
  font-size: 0.74rem;
}

.theme-toggle {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  background: var(--bg);
}

.theme-option {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
}

.theme-option.active {
  background: var(--black);
  color: var(--white);
}

.about-links {
  display: grid;
  gap: 8px;
}

.about-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 850;
  text-decoration: none;
}

.about-links a::after {
  content: "↗";
  color: var(--muted);
  font-size: 0.82rem;
}

.about-links a[href^="mailto"]::after {
  content: "Email";
}

.backup-grid {
  display: grid;
  gap: 14px;
}

.backup-card {
  padding: 18px;
}

.snapshot-card {
  margin-top: 18px;
  border-radius: var(--radius-lg);
  padding: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.snapshot-card .section-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.snapshot-card .finance-list {
  background: var(--bg);
}

.amount-dialog {
  width: min(440px, calc(100vw - 28px));
  border: 0;
  border-radius: var(--radius-lg);
  padding: 0;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.28);
}

.onboarding-dialog {
  width: min(620px, calc(100vw - 28px));
  max-height: min(760px, calc(100dvh - 28px));
  border: 0;
  border-radius: var(--radius-lg);
  padding: 0;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.32);
}

.onboarding-dialog::backdrop {
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(5px);
}

.onboarding-shell {
  display: grid;
  gap: 22px;
  overflow-y: auto;
  max-height: min(760px, calc(100dvh - 28px));
  padding: 24px;
}

.onboarding-progress {
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--soft);
}

.onboarding-progress span {
  display: block;
  width: 20%;
  height: 100%;
  border-radius: inherit;
  background: var(--black);
  transition: width 180ms ease;
}

.onboarding-step {
  display: none;
}

.onboarding-step.active {
  display: grid;
  gap: 16px;
}

.onboarding-step h2 {
  margin: 0;
  font-size: clamp(1.7rem, 6vw, 2.5rem);
  letter-spacing: -0.04em;
}

.onboarding-step > p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.onboarding-feature-list {
  display: grid;
  gap: 8px;
}

.onboarding-feature-list span {
  border-radius: var(--radius-md);
  padding: 12px 14px;
  background: var(--bg);
  font-size: 0.86rem;
  font-weight: 800;
}

.onboarding-feature-list span::before {
  margin-right: 8px;
  color: var(--good);
  content: "✓";
}

.onboarding-actions,
.onboarding-actions > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.onboarding-actions {
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.onboarding-actions .button {
  min-width: 112px;
}

.amount-dialog::backdrop {
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(4px);
}

.amount-dialog form {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.dialog-heading,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dialog-heading h2 {
  margin: 0;
}

.dialog-close {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--soft);
  color: var(--text);
  font-size: 1.5rem;
}

.dialog-description {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.dialog-actions {
  justify-content: flex-end;
}

.dialog-actions .button {
  min-width: 112px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.backup-card p {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.danger-zone {
  box-shadow: none;
}

.status-box {
  display: none;
  margin-top: 14px;
  padding: 16px;
  color: var(--muted);
}

.status-box.active {
  display: block;
}

.bottom-nav {
  position: fixed;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  padding: 6px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(14px);
}

.nav-link {
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  padding: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.nav-link.active {
  background: var(--black);
  color: var(--white);
}

.toast {
  position: fixed;
  right: 16px;
  bottom: calc(90px + env(safe-area-inset-bottom));
  z-index: 20;
  max-width: min(360px, calc(100vw - 32px));
  border-radius: var(--radius-md);
  padding: 12px 14px;
  background: var(--black);
  color: var(--white);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast button {
  border: 0;
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--white);
  color: var(--black);
  font-size: 0.78rem;
  font-weight: 900;
}

.toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@media (prefers-color-scheme: dark) {
  .danger-zone {
    background: #1d1414;
  }

  .button.danger {
    background: #2a1717;
  }

  .bottom-nav {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(20, 20, 20, 0.9);
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (min-width: 740px) {
  .content {
    padding: 28px 28px calc(112px + env(safe-area-inset-bottom));
  }

  .balance-hero {
    padding: 30px;
  }

  .form-grid,
  .filter-grid,
  .management-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .management-form .button {
    align-self: end;
  }

  .backup-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .asset-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .analytics-grid,
  .planning-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

@media (min-width: 980px) {
  .app-shell {
    display: grid;
    grid-template-columns: 248px 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    display: block;
    height: 100vh;
    border-right: 1px solid var(--line);
    padding: 24px;
    background: #fbfbf9;
  }

  .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    display: block;
  }

  .brand span {
    display: block;
    color: var(--muted);
    font-size: 0.84rem;
  }

  .nav-list {
    display: grid;
    gap: 6px;
  }

  .nav-list .nav-link {
    justify-content: flex-start;
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    text-align: left;
    font-size: 0.9rem;
  }

  .bottom-nav {
    display: none;
  }

  .content {
    padding: 34px;
  }

  .dashboard-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 22px;
  }

  .sticky-actions {
    position: static;
    background: transparent;
  }

  .toast {
    bottom: 16px;
  }
}

@media (min-width: 980px) and (prefers-color-scheme: dark) {
  .sidebar {
    background: #10100f;
  }
}

@media (max-width: 430px) {
  .content {
    padding-right: 16px;
    padding-left: 16px;
  }

  .month-chips {
    grid-template-columns: 1fr;
  }

  .finance-row {
    padding: 15px;
  }

  .onboarding-shell {
    padding: 20px;
  }

  .onboarding-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .onboarding-actions > div,
  .onboarding-actions .button,
  .onboarding-actions .text-link {
    width: 100%;
  }
}
