:root {
  --bg: #0E0E10;
  --bg-2: #16161A;
  --surface: #1A1A1F;
  --surface-2: #222228;
  --surface-3: #2A2A32;
  --border: rgba(255, 255, 255, .07);
  --border-strong: rgba(255, 255, 255, .14);
  --text: #F4F4F6;
  --text-muted: #9CA0AE;
  --text-faint: #6B6E7B;
  --primary: #FF6B3D;
  --primary-hover: #FF855E;
  --primary-soft: rgba(255, 107, 61, .12);
  --primary-grad: linear-gradient(135deg, #FF8A5C 0%, #FF6B3D 45%, #E45227 100%);
  --income: #28C76F;
  --income-soft: rgba(40, 199, 111, .15);
  --spend: #FF5A65;
  --spend-soft: rgba(255, 90, 101, .15);
  --warn: #FFB84D;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --radius-pill: 999px;
  --sidebar-w: 248px;
  --shadow-card: 0 2px 10px rgba(0, 0, 0, .25);
  --shadow-hero: 0 14px 40px rgba(255, 107, 61, .22);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }

.hero-balance, .tx-amount, .big-stat, .goal-card-target, .goal-card-pct,
.goal-hero-amounts, .goal-mini-sub, .goal-mini-pct, .contrib-amount,
.chip-text, .budget-actual, .hero-chip, .dash-stat .stat-value,
.dash-hero-v2 .hero-amount, .summary-card-value { font-variant-numeric: tabular-nums; }

/* ─── App shell: sidebar + main ──────────────────────────── */
.app-shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 30;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 0 6px 22px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--primary-grad);
  color: white; font-weight: 800;
  font-size: 17px;
  box-shadow: 0 4px 12px rgba(255, 107, 61, .35);
}
.sidebar-brand-text {
  font-weight: 700; font-size: 16px;
  letter-spacing: -0.01em; color: var(--text);
}
.sidebar-nav {
  display: flex; flex-direction: column; gap: 2px;
  flex: 1; overflow-y: auto; margin-top: 14px;
}
.sidebar-section-label {
  font-size: 11px; color: var(--text-faint);
  text-transform: uppercase; letter-spacing: 0.08em;
  font-weight: 600; padding: 12px 12px 8px;
}
.sidebar-section-spacer { margin-top: 12px; }
.sidebar-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500; font-size: 14px;
  transition: background .12s, color .12s;
}
.sidebar-link:hover {
  background: var(--surface);
  color: var(--text);
}
.sidebar-link.active {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--border);
}
.sidebar-link svg { flex-shrink: 0; color: currentColor; }
.sidebar-badge {
  margin-left: auto;
  background: var(--primary);
  color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  min-width: 18px; text-align: center;
  line-height: 1.4;
}

/* ─── Review page ──────────────────────────── */
.review-empty {
  text-align: center;
  padding: 50px 24px;
  max-width: 480px;
  margin: 24px auto 0;
}
.review-empty-icon {
  display: inline-flex;
  width: 72px; height: 72px;
  background: rgba(40, 199, 111, .15);
  color: var(--income);
  border-radius: 50%;
  align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.review-empty h2 { margin: 0 0 6px 0; font-size: 18px; }
.review-empty p { color: var(--text-muted); margin: 0 0 18px 0; font-size: 14px; }

.review-list {
  display: flex; flex-direction: column; gap: 18px;
  margin-top: 18px;
}
.review-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex; flex-direction: column; gap: 16px;
}
.review-card-head {
  display: flex; align-items: center; gap: 14px;
}
.review-card-swatch {
  width: 44px; height: 44px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.review-card-name { margin: 0; font-size: 18px; font-weight: 700; color: var(--text); }
.review-card-meta { margin: 4px 0 0 0; font-size: 13px; color: var(--text-muted); }
.review-card-meta strong { color: var(--text); font-weight: 600; }

.review-samples {
  background: var(--surface-2, rgba(255,255,255,.03));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}
.review-samples-label {
  display: block;
  font-size: 11px; font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.review-samples-list {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.review-sample-chip {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.review-sample-chip.muted { color: var(--text-muted); }

.review-actions-tabs {
  display: flex; gap: 4px;
  background: var(--surface-2, rgba(255,255,255,.04));
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
}
.review-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px; font-weight: 600;
  font-family: inherit;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
.review-tab:hover { color: var(--text); }
.review-tab.is-active {
  background: var(--primary);
  color: #fff;
}

.review-pane { display: none; flex-direction: column; gap: 14px; }
.review-pane.is-active { display: flex; }
.review-grid {
  display: grid; gap: 12px;
  grid-template-columns: 2fr 1fr 1fr 1fr;
}
@media (max-width: 720px) {
  .review-grid { grid-template-columns: 1fr 1fr; }
}
.review-reject-msg { color: var(--text-muted); font-size: 13px; margin: 0; }

.sidebar-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .55);
  z-index: 25;
}
.sidebar-backdrop.active { display: block; }

.app-main {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
}

/* ─── Topbar inside main ───────────────────────────────── */
.app-topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 28px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.hamburger {
  display: none;
  background: transparent; border: none;
  color: var(--text); cursor: pointer;
  padding: 6px;
  border-radius: 8px;
}
.hamburger:hover { background: var(--surface); }
.app-topbar-title {
  flex: 1;
  color: var(--text-muted);
  font-size: 13px; font-weight: 500;
}
.app-topbar-actions {
  display: flex; align-items: center; gap: 8px;
}
.topbar-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text-muted);
  transition: background .12s, color .12s;
}
.topbar-icon-btn:hover { background: var(--surface-2); color: var(--text); }

.app-content {
  padding: 28px;
  flex: 1;
  max-width: 1400px;
  width: 100%;
  align-self: center;
}

/* ─── Page header ─────────────────────────────────────── */
.page-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; margin-bottom: 24px;
}
.page-header h1 {
  font-size: 28px; margin: 0; font-weight: 700;
  letter-spacing: -0.02em; color: var(--text);
  line-height: 1.15;
}
.page-sub {
  color: var(--text-muted); font-size: 14px;
  margin: -16px 0 20px;
}
.back-link {
  color: var(--text-muted); font-size: 14px; font-weight: 500;
}
.back-link:hover { color: var(--text); text-decoration: none; }

/* ─── Flash ──────────────────────────────────────────── */
.flash-wrap { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.flash {
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500;
  border-left: 4px solid transparent;
  background: var(--surface);
}
.flash-ok { color: #4ADE80; border-left-color: var(--income); background: var(--income-soft); }
.flash-error { color: #FCA5A5; border-left-color: var(--spend); background: var(--spend-soft); }

/* ─── Dashboard cards (Fintrixity style) ───────────────── */
.dash-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}
.summary-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  overflow: hidden;
  min-height: 170px;
  display: flex; flex-direction: column;
}
.summary-card.featured {
  background: var(--primary-grad);
  border: none;
  box-shadow: var(--shadow-hero);
  color: white;
}
.summary-card.featured::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 85% -10%, rgba(255, 255, 255, .25), transparent 55%);
  pointer-events: none;
}
.summary-card-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 18px;
  position: relative;
}
.summary-card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .12);
  color: white;
}
.summary-card:not(.featured) .summary-card-icon {
  background: var(--surface-3);
  color: var(--text);
}
.summary-card-title {
  font-size: 14px; font-weight: 600; opacity: .85;
  line-height: 1.2;
}
.summary-card-sub {
  font-size: 12px; opacity: .65; margin-top: 2px;
  line-height: 1.3;
}
.summary-card.featured .summary-card-title { color: white; opacity: 1; }
.summary-card.featured .summary-card-sub { color: rgba(255, 255, 255, .8); }
.summary-card-value {
  font-size: 34px; font-weight: 700;
  letter-spacing: -0.025em;
  position: relative;
}
.summary-card.featured .summary-card-value { color: white; }
.summary-card:not(.featured) .summary-card-value { color: var(--text); }
.summary-card-delta {
  display: inline-flex; align-items: center; gap: 4px;
  margin-left: 10px;
  font-size: 13px; font-weight: 600;
  padding: 3px 9px; border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .18);
}
.summary-card:not(.featured) .summary-card-delta.up { background: var(--income-soft); color: var(--income); }
.summary-card:not(.featured) .summary-card-delta.down { background: var(--spend-soft); color: var(--spend); }
.summary-card-foot {
  margin-top: auto; padding-top: 14px;
  position: relative;
  display: flex; justify-content: space-between; align-items: center;
}
.summary-card-foot-link {
  font-size: 13px; font-weight: 500;
  color: inherit; opacity: .8;
}
.summary-card.featured .summary-card-foot-link { color: white; }
.summary-card-foot-arrow {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
}
.summary-card:not(.featured) .summary-card-foot-arrow {
  background: var(--surface-3); color: var(--text-muted);
}

.dash-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 18px;
  margin-bottom: 22px;
}

/* ─── Generic cards ──────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 18px;
}
.card-title {
  font-size: 16px; font-weight: 600;
  margin: 0 0 16px; color: var(--text);
  letter-spacing: -0.005em;
}
.chart-card { padding: 22px; }
.chart-canvas-wrap { position: relative; height: 240px; }

/* ─── Month/segmented toggle ─────────────────────────── */
.segmented {
  display: inline-flex;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-pill); padding: 3px;
  gap: 2px;
}
.segmented label, .segmented button, .segmented .seg-btn {
  padding: 6px 14px; font-size: 13px; font-weight: 500;
  border-radius: var(--radius-pill);
  color: var(--text-muted); cursor: pointer; background: transparent;
  border: none;
}
.segmented .seg-btn.active {
  background: var(--primary); color: white; font-weight: 600;
}

/* ─── Month picker ───────────────────────────────────── */
.month-picker { margin: 0 0 16px; }
.month-picker.inline { margin: 0; }
.month-picker-label {
  font-size: 12px; color: var(--text-muted);
  display: block; margin-bottom: 6px; font-weight: 500;
}
.month-picker select, .month-picker input {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 9px 14px;
  font-size: 14px; color: var(--text); font-weight: 500;
  font-family: inherit; min-width: 140px;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%239CA0AE' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

/* ─── Empty states ───────────────────────────────────── */
.empty-state {
  color: var(--text-muted); text-align: center;
  padding: 28px 18px; background: var(--surface-2);
  border-radius: var(--radius); border: 1px dashed var(--border);
  font-size: 14px;
}
.empty-state-soft { color: var(--text-muted); font-size: 14px; }

/* ─── Forms ──────────────────────────────────────────── */
.form-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 24px; border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 16px;
  margin-bottom: 18px; max-width: 720px;
}
.form-inline { display: flex; gap: 8px; flex-wrap: wrap; }
.form-inline input { flex: 1; min-width: 120px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-size: 13px; color: var(--text-muted);
  font-weight: 500;
}
.field input, .field select {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 11px 14px; font-size: 14px; color: var(--text);
  background: var(--bg-2); font-family: inherit; width: 100%;
  transition: border-color .12s, box-shadow .12s;
  font-variant-numeric: tabular-nums;
}
.field input:focus, .field select:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.field input[type="color"] { padding: 4px; height: 44px; cursor: pointer; }
.field-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.4;
}

.form-actions { display: flex; gap: 10px; margin-top: 4px; }
.btn-primary {
  background: var(--primary); color: white;
  border: none; padding: 11px 22px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; cursor: pointer;
  font-family: inherit;
  transition: background .12s;
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary.small { padding: 7px 14px; font-size: 13px; }

.btn-ghost {
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); padding: 10px 18px;
  border-radius: var(--radius-sm); font-size: 14px;
  font-weight: 500; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: inherit;
  transition: background .12s;
}
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-ghost.small { padding: 6px 12px; font-size: 13px; }

.btn-danger {
  background: var(--spend-soft); color: var(--spend);
  border: 1px solid transparent; padding: 11px 18px;
  border-radius: var(--radius-sm); font-size: 14px;
  font-weight: 500; cursor: pointer; width: 100%;
  font-family: inherit;
}
.btn-danger:hover { background: rgba(255, 90, 101, .22); }
.delete-form { margin-top: 16px; }

.btn-link-danger {
  background: none; border: none; color: var(--text-faint);
  font-size: 18px; cursor: pointer; padding: 0 6px;
}
.btn-link-danger:hover { color: var(--spend); }

.inline-form { display: inline; }

.kind-toggle {
  display: flex; background: var(--surface-2);
  border-radius: var(--radius-sm); padding: 3px; gap: 3px;
}
.kind-option {
  flex: 1; text-align: center; padding: 10px;
  cursor: pointer; font-weight: 500; font-size: 13px;
  border-radius: 9px; color: var(--text-muted); user-select: none;
}
.kind-option input { display: none; }
.kind-option:has(input:checked) {
  background: var(--primary); color: white; font-weight: 600;
}

/* ─── Tables / lists ─────────────────────────────────── */
.day-group { margin-bottom: 18px; }
.day-heading {
  font-size: 12px; color: var(--text-muted); margin: 0 0 6px 4px;
  font-weight: 600; letter-spacing: 0.03em;
}
.tx-list {
  list-style: none; padding: 0; margin: 0;
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--border); overflow: hidden;
}
.tx-row + .tx-row { border-top: 1px solid var(--border); }
.tx-link {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; color: var(--text);
}
.tx-link:hover { background: var(--surface-2); color: var(--text); }
.tx-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px; font-size: 16px;
  flex-shrink: 0;
}
.tx-body { flex: 1; display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.tx-note {
  font-size: 14px; font-weight: 500; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tx-cat { font-size: 12px; color: var(--text-muted); }
.tx-amount {
  font-size: 14px; font-weight: 600; white-space: nowrap;
}
.tx-amount.neg { color: var(--text); }
.tx-amount.pos { color: var(--income); }

/* ─── Categories page ────────────────────────────────── */
.cats-page-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 16px; margin-bottom: 24px; flex-wrap: wrap;
}
.cats-page-head h1 { margin: 0 0 4px 0; }
.cats-page-head .page-sub { margin: 0; }

.empty-state-card {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.empty-state-card p { margin: 0; color: var(--text-muted); }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.cat-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color .15s ease, transform .15s ease;
}
.cat-card::before {
  content: ""; position: absolute;
  left: 0; top: 14px; bottom: 14px;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--cat-color);
  opacity: .65;
}
.cat-card:hover { border-color: rgba(255,255,255,.12); }
.cat-card-archived {
  opacity: .55;
  background: var(--surface-2, var(--surface));
}
.cat-card-archived:hover { opacity: .85; }

.cat-card-head { display: flex; align-items: center; gap: 12px; }
.cat-card-swatch {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 17px;
}
.cat-card-info { flex: 1; min-width: 0; }
.cat-card-name {
  font-size: 15px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cat-card-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 4px; }
.cat-tag {
  display: inline-block; padding: 2px 8px;
  border-radius: 999px; font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.02em;
}
.cat-tag-income { background: var(--income-soft, rgba(40, 199, 111, .14)); color: var(--income); }
.cat-tag-expense { background: rgba(255, 255, 255, .06); color: var(--text-muted); }
.cat-tag-xfer { background: rgba(99, 102, 241, .18); color: #A5B4FC; }
.cat-tag-archived { background: rgba(255, 255, 255, .04); color: var(--text-muted); border: 1px solid var(--border); }

.cat-card-desc {
  margin: 0;
  font-size: 13px; line-height: 1.45;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cat-card-desc-empty { font-style: italic; opacity: .55; }

.cat-card-actions {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-top: auto;
  padding-top: 4px;
}
.cat-action {
  display: inline-flex; align-items: center; gap: 5px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px; font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.cat-action:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, .15);
  background: rgba(255, 255, 255, .03);
}
.cat-action-edit:hover { color: var(--primary); border-color: var(--primary); }
.cat-action-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.cat-action-primary:hover { filter: brightness(1.08); color: #fff; }
.cat-action-danger:hover {
  color: var(--spend);
  border-color: var(--spend);
  background: rgba(255, 90, 101, .08);
}

.cats-archived-section {
  margin-top: 28px;
  background: transparent;
}
.cats-archived-section summary {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0;
  cursor: pointer;
  list-style: none;
  user-select: none;
  color: var(--text-muted);
}
.cats-archived-section summary::-webkit-details-marker { display: none; }
.cats-archived-section summary::before {
  content: "▸";
  font-size: 11px;
  transition: transform .2s ease;
  color: var(--text-muted);
}
.cats-archived-section[open] summary::before { transform: rotate(90deg); }
.cats-archived-title {
  font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.cats-archived-count {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px; font-weight: 600;
}
.cats-archived-section > .cat-grid { margin-top: 12px; }

/* ─── Form actions: split layout + subtle danger link ── */
.form-actions-split {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
.form-actions-left { display: flex; gap: 10px; align-items: center; }

.btn-link-danger {
  background: transparent;
  border: none;
  color: var(--spend);
  font-family: inherit;
  font-size: 13px; font-weight: 600;
  padding: 8px 4px;
  cursor: pointer;
  text-decoration: none;
  transition: opacity .15s ease;
}
.btn-link-danger:hover {
  text-decoration: underline;
  opacity: .85;
}

/* ─── Budgets ────────────────────────────────────────── */
/* ─── Budget page ──────────────────────────────────── */
.budget-page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 22px; flex-wrap: wrap;
}
.budget-page-head h1 { margin: 0 0 4px 0; }
.budget-page-head .page-sub { margin: 0; }

.budget-month-nav { display: flex; align-items: center; gap: 6px; }
.budget-month-arrow {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text-muted);
  text-decoration: none;
  transition: border-color .15s ease, color .15s ease;
}
.budget-month-arrow:hover { color: var(--primary); border-color: var(--primary); }
.budget-month-select {
  position: relative;
  display: inline-flex; align-items: center;
}
.budget-month-select select {
  appearance: none; -webkit-appearance: none;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-size: 14px; font-weight: 600;
  font-family: inherit;
  padding: 8px 32px 8px 14px;
  border-radius: 10px; min-width: 170px;
  cursor: pointer; text-align: center;
}
.budget-month-select select:focus { outline: none; border-color: var(--primary); }
.budget-month-select select option { background: var(--surface); color: var(--text); }
.budget-month-chevron {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); pointer-events: none;
}

.budget-form { display: flex; flex-direction: column; gap: 22px; }

/* Hero card with total budget + progress ring */
.budget-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
.budget-hero-grid {
  display: grid; grid-template-columns: 1fr auto; gap: 30px;
  align-items: center;
}
@media (max-width: 720px) {
  .budget-hero-grid { grid-template-columns: 1fr; gap: 20px; }
}
.budget-hero-label {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 10px;
}
.budget-hero-input-row {
  display: flex; align-items: baseline; gap: 10px;
}
.budget-hero-input {
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 38px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 6px 0;
  flex: 1; min-width: 0;
  letter-spacing: -0.02em;
  outline: none;
  transition: border-color .15s ease;
}
.budget-hero-input:focus { border-bottom-color: var(--primary); }
.budget-hero-input::placeholder { color: var(--text-muted); opacity: .35; }
.budget-hero-kr {
  font-size: 18px; color: var(--text-muted); font-weight: 500;
}

.budget-hero-right {
  display: flex; align-items: center; gap: 20px;
  min-width: 280px;
}
@media (max-width: 720px) {
  .budget-hero-right { min-width: 0; flex-wrap: wrap; }
}

.budget-hero-ring {
  position: relative;
  width: 92px; height: 92px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.budget-hero-ring svg { transform: rotate(-90deg); }
.budget-hero-ring .ring-bg {
  fill: none; stroke: var(--border); stroke-width: 6;
}
.budget-hero-ring .ring-fill {
  fill: none; stroke: var(--income); stroke-width: 6; stroke-linecap: round;
  transition: stroke-dasharray .4s ease;
}
.budget-hero-ring.is-warn .ring-fill { stroke: #F5A623; }
.budget-hero-ring.is-over .ring-fill { stroke: var(--spend); }
.budget-hero-ring-pct {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700; color: var(--text);
  font-variant-numeric: tabular-nums;
}

.budget-hero-stats {
  display: flex; flex-direction: column; gap: 8px;
  min-width: 130px;
}
.budget-hero-stat {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px;
}
.budget-hero-stat-label {
  font-size: 12px; color: var(--text-muted); font-weight: 500;
}
.budget-hero-stat-value {
  font-size: 16px; font-weight: 700; color: var(--text);
  font-variant-numeric: tabular-nums;
}
.budget-hero-stat-value.is-over { color: var(--spend); }
.budget-hero-stat-value.is-good { color: var(--income); }

.budget-hero-empty {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--text-muted);
  padding: 14px 16px;
  background: var(--surface-2, rgba(255,255,255,.03));
  border-radius: 10px;
  border: 1px dashed var(--border);
}

/* Per-category section */
.budget-cats-section { display: flex; flex-direction: column; gap: 18px; }
.budget-cats-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; flex-wrap: wrap;
}
.budget-cats-head h2 {
  margin: 0; font-size: 18px; font-weight: 700; color: var(--text);
}
.budget-cats-sub {
  margin: 4px 0 0 0; font-size: 13px; color: var(--text-muted);
}
.budget-cats-legend {
  display: flex; gap: 14px;
  font-size: 12px; color: var(--text-muted);
}
.budget-cats-legend .legend-dot {
  display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; margin-right: 6px; vertical-align: middle;
}
.budget-cats-legend .legend-dot.good { background: var(--income); }
.budget-cats-legend .legend-dot.over { background: var(--spend); }

.budget-cats-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.budget-cat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color .15s ease;
}
.budget-cat-card:hover { border-color: rgba(255,255,255,.12); }
.budget-cat-card.is-over { border-color: rgba(255, 90, 101, .35); }

.budget-cat-top { display: flex; align-items: center; gap: 12px; }
.budget-cat-swatch {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.budget-cat-meta { flex: 1; min-width: 0; }
.budget-cat-name {
  font-size: 14px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.budget-cat-actual {
  font-size: 12px; color: var(--text-muted); margin-top: 2px;
}
.budget-cat-actual strong { color: var(--text); font-weight: 600; }
.budget-cat-over {
  color: var(--spend); font-weight: 600; margin-left: 6px;
}
.budget-cat-left {
  color: var(--income); font-weight: 600; margin-left: 6px;
}

.budget-cat-input-row {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-2, rgba(255,255,255,.03));
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 12px;
  transition: border-color .15s ease;
}
.budget-cat-input-row:focus-within { border-color: var(--primary); }
.budget-cat-input {
  flex: 1; min-width: 0;
  background: transparent; border: none; outline: none;
  color: var(--text); font-family: inherit;
  font-size: 15px; font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding: 4px 0;
}
.budget-cat-input::placeholder { color: var(--text-muted); opacity: .45; font-weight: 500; }
.budget-cat-kr {
  font-size: 12px; color: var(--text-muted); font-weight: 500;
}

.budget-cat-bar {
  width: 100%; height: 4px; border-radius: 999px;
  background: var(--border); overflow: hidden;
}
.budget-cat-bar-fill {
  height: 100%; border-radius: 999px;
  transition: width .4s ease;
}
.budget-cat-bar-fill.is-warn { filter: brightness(1.1); }
.budget-cat-bar-fill.is-over { background-color: var(--spend) !important; }

/* Save bar */
.budget-save-bar {
  position: sticky; bottom: 0;
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 18px;
  backdrop-filter: blur(8px);
  flex-wrap: wrap;
}
.budget-save-hint {
  font-size: 13px; color: var(--text-muted);
}

/* ─── Goals ──────────────────────────────────────────── */
.goal-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 14px;
}
.goal-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 18px; border: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.goal-card-link { color: var(--text); display: block; }
.goal-card-link:hover { color: var(--text); }
.goal-card-head {
  display: flex; align-items: center; gap: 14px; margin-bottom: 14px;
}
.goal-card-icon {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  color: white;
}
.goal-card-title { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.goal-card-name { font-size: 16px; font-weight: 600; color: var(--text); }
.goal-card-target { font-size: 13px; color: var(--text-muted); }
.goal-card-pct { font-weight: 700; font-size: 15px; color: var(--text); }

.progress-bar {
  height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden;
  border: 1px solid var(--border);
}
.progress-bar.lg { height: 10px; }
.progress-fill { height: 100%; border-radius: 999px; transition: width .4s; }

.goal-hero {
  background: var(--surface); border-radius: var(--radius);
  padding: 30px 22px; text-align: center; margin-bottom: 18px;
  border: 1px solid var(--border);
}
.goal-hero-icon {
  width: 60px; height: 60px; border-radius: 14px; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: white;
}
.goal-hero-name { margin: 0 0 12px; font-size: 22px; font-weight: 700; color: var(--text); }
.goal-hero-amounts { margin-bottom: 16px; }
.goal-hero-amounts .big {
  font-size: 32px; font-weight: 700; letter-spacing: -0.02em; color: var(--text);
}
.goal-hero-amounts .of { font-size: 16px; color: var(--text-muted); }
.goal-hero-pct { margin-top: 8px; font-weight: 600; font-size: 13px; color: var(--text-muted); }
.goal-hero-date { margin-top: 8px; color: var(--text-muted); font-size: 13px; }

.goal-mini-list {
  list-style: none; padding: 0; margin: 14px 0 0;
  display: flex; flex-direction: column; gap: 2px;
}
.goal-mini-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 8px; border-radius: var(--radius-sm); color: var(--text);
}
.goal-mini-link:hover { background: var(--surface-2); color: var(--text); }
.goal-mini-icon {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: white;
}
.goal-mini-body { flex: 1; display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.goal-mini-name { font-size: 14px; font-weight: 500; color: var(--text); }
.goal-mini-sub { font-size: 12px; color: var(--text-muted); }
.goal-mini-pct { font-weight: 600; font-size: 14px; color: var(--text); }

.contrib-list { list-style: none; padding: 0; margin: 0; }
.contrib-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-top: 1px solid var(--border); font-size: 14px;
}
.contrib-row:first-child { border-top: none; padding-top: 0; }
.contrib-date {
  color: var(--text-muted); font-size: 12px; width: 88px; flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.contrib-amount { font-weight: 600; color: var(--income); }
.contrib-note { flex: 1; color: var(--text-muted); font-size: 13px; }

/* ─── Stats ──────────────────────────────────────────── */
.big-stat {
  font-size: 32px; font-weight: 700; margin: 0;
  letter-spacing: -0.02em; color: var(--text);
}
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li {
  padding: 12px 0; border-top: 1px solid var(--border);
}
.link-list li:first-child { border-top: none; padding-top: 0; }
.link-list a { font-size: 14px; font-weight: 500; color: var(--primary); }

/* ─── FAB ──────────────────────────────────────────── */
.fab {
  position: fixed; right: 24px; bottom: 24px;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--primary); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 300; line-height: 1;
  box-shadow: 0 6px 20px rgba(255, 107, 61, .45);
  z-index: 90;
}
.fab:hover { background: var(--primary-hover); transform: translateY(-1px); color: white; }

code {
  background: var(--surface-2); padding: 2px 6px; border-radius: 4px;
  font-size: 13px; font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--text);
}

/* ─── Økonomi page (transactions table on dark) ────── */
.econ-header {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px; margin-bottom: 22px;
}
.econ-header h1 {
  font-size: 28px; font-weight: 700; margin: 0; color: var(--text);
  letter-spacing: -0.02em;
}
.econ-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-econ-income, .btn-econ-expense {
  display: inline-flex; align-items: center; gap: 4px;
  border: none; padding: 10px 18px; border-radius: 10px;
  font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit;
  color: white;
}
.btn-econ-income { background: var(--income); }
.btn-econ-income:hover { background: #1FAA5C; color: white; }
.btn-econ-expense { background: var(--surface-3); }
.btn-econ-expense:hover { background: #34343E; color: white; }

.econ-summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px; margin-bottom: 18px;
}
.econ-summary-label {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-muted); font-weight: 600; margin-bottom: 14px;
}
.econ-summary-stats {
  display: flex; gap: 36px; flex-wrap: wrap; align-items: baseline;
}
.econ-stat { display: flex; flex-direction: column; gap: 4px; }
.econ-stat-label { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.econ-stat-value {
  font-size: 22px; font-weight: 700; color: var(--text);
  font-variant-numeric: tabular-nums; letter-spacing: -0.015em;
}
.econ-stat.highlight .econ-stat-value { font-size: 26px; color: var(--income); }
.econ-stat-value.negative,
.econ-stat.highlight .econ-stat-value.negative { color: var(--spend); }

.econ-grid {
  display: grid; gap: 18px;
  grid-template-columns: 1fr; margin-bottom: 18px;
}
@media (min-width: 980px) {
  .econ-grid { grid-template-columns: 1fr 1fr; }
}
.econ-chart {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
}
.econ-chart h3 {
  font-size: 16px; font-weight: 600; margin: 0 0 14px; color: var(--text);
}
.econ-chart .chart-canvas-wrap { height: 280px; }

.econ-list {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
}
.econ-list-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap; margin-bottom: 16px;
}
.econ-list-head h3 {
  font-size: 16px; font-weight: 600; margin: 0; color: var(--text);
}
.econ-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.econ-filter-form { display: inline-block; margin: 0; }
.econ-filters select {
  padding: 7px 28px 7px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background-color: var(--surface-2);
  color: var(--text); font-family: inherit; font-size: 13px; font-weight: 500;
  cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%239CA0AE' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.econ-filters select:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.econ-table-wrap { overflow-x: auto; }
.econ-table { width: 100%; border-collapse: collapse; }
.econ-table th, .econ-table td {
  text-align: left; padding: 12px 10px;
  border-bottom: 1px solid var(--border); font-size: 13px;
}
.econ-table th {
  color: var(--text-muted); font-weight: 600;
  text-transform: uppercase; font-size: 11px; letter-spacing: 0.05em;
}
.econ-table tbody tr:hover td { background: var(--surface-2); }
.econ-table .econ-cell-date {
  font-variant-numeric: tabular-nums; color: var(--text-muted); white-space: nowrap;
}
.econ-table td.num {
  text-align: right; font-variant-numeric: tabular-nums;
  font-weight: 600; white-space: nowrap;
}
.econ-table td.num.negative { color: var(--text); }
.econ-table td.num.positive { color: var(--income); }
.econ-table td.num.transfer { color: var(--text-muted); font-weight: 500; }

.econ-tx-link { color: var(--text); font-weight: 500; }
.econ-tx-link:hover { color: var(--primary); }

.econ-tag {
  display: inline-block; padding: 3px 9px;
  border-radius: 999px; font-size: 12px; font-weight: 600;
  white-space: nowrap;
}
.econ-tag-kind {
  display: inline-block; padding: 3px 9px;
  border-radius: 999px; font-size: 12px; font-weight: 600;
}
.econ-tag-kind.income { background: var(--income-soft); color: var(--income); }
.econ-tag-kind.expense { background: var(--surface-3); color: var(--text-muted); }
.econ-tag-kind.transfer { background: rgba(99, 102, 241, .18); color: #A5B4FC; }
.econ-muted { color: var(--text-muted); font-size: 13px; }

.econ-cat-select {
  appearance: none;
  -webkit-appearance: none;
  display: inline-block;
  padding: 5px 26px 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background-color: transparent;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 10px 10px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  max-width: 220px;
  text-overflow: ellipsis;
  overflow: hidden;
  transition: box-shadow .15s ease, transform .12s ease;
}
.econ-cat-select:hover { filter: brightness(1.08); }
.econ-cat-select:focus { outline: none; box-shadow: 0 0 0 2px rgba(255, 107, 61, .35); }
.econ-cat-select.is-saving { opacity: .55; cursor: progress; }
.econ-cat-select.is-saved { box-shadow: 0 0 0 2px var(--income); }
.econ-cat-select.is-error { box-shadow: 0 0 0 2px var(--spend); }
.econ-cat-select option { background: var(--surface); color: var(--text); }

.econ-sum-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 14px 18px;
  background: var(--surface-2, var(--surface));
  border: 1px solid var(--border);
  border-radius: 12px;
  flex-wrap: wrap;
}
.econ-sum-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.01em;
}
.econ-sum-count {
  font-size: 12px;
  color: var(--text-muted);
  opacity: .75;
}
.econ-sum-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  margin-left: auto;
}
.econ-sum-value.positive { color: var(--income); }
.econ-sum-value.negative { color: var(--spend); }

/* ─── Day calendar popover ──────────────────────────── */
.econ-day-control { position: relative; }
.econ-day-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 11px;
  background: var(--surface-2, var(--surface));
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 13px; font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.econ-day-btn:hover { border-color: var(--primary); }
.econ-day-btn.is-active {
  background: rgba(255, 107, 61, .12);
  border-color: var(--primary);
  color: var(--primary);
}
.econ-day-btn svg { flex-shrink: 0; }

.econ-day-pop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 50;
  width: 296px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .5);
  padding: 14px;
}
.econ-day-pop[hidden] { display: none; }

.econ-day-pop-nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 6px; margin-bottom: 10px;
}
.econ-day-nav-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 28px; height: 28px;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.econ-day-nav-btn:hover { color: var(--primary); border-color: var(--primary); }
.econ-day-pop-title {
  flex: 1;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text);
  font-size: 14px; font-weight: 600;
  font-family: inherit;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  text-transform: capitalize;
}
.econ-day-pop-title:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.econ-day-pop-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 4px; margin-bottom: 4px;
}
.econ-day-pop-weekdays span {
  text-align: center;
  font-size: 10px; font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.04em;
  padding: 4px 0;
}

.econ-day-pop-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.econ-day-blank { aspect-ratio: 1; }
.econ-day-cell {
  position: relative;
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text);
  font-size: 13px; font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.econ-day-cell:hover { background: var(--surface-2, rgba(255,255,255,.05)); border-color: var(--border); }
.econ-day-cell.has-tx { color: var(--text); font-weight: 600; }
.econ-day-cell:not(.has-tx) { color: var(--text-muted); opacity: .55; }
.econ-day-dot {
  position: absolute; bottom: 4px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0;
}
.econ-day-cell.has-tx .econ-day-dot { opacity: 1; }
.econ-day-cell.is-selected,
.econ-day-cell.is-range-start,
.econ-day-cell.is-range-end {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.econ-day-cell.is-selected .econ-day-dot,
.econ-day-cell.is-range-start .econ-day-dot,
.econ-day-cell.is-range-end .econ-day-dot { background: #fff; }
.econ-day-cell.is-in-range {
  background: rgba(255, 107, 61, .15);
  color: var(--text);
  border-radius: 0;
}
.econ-day-cell.is-in-range.has-tx { color: var(--text); }
.econ-day-cell.is-range-start:not(.is-single) {
  border-radius: 8px 0 0 8px;
}
.econ-day-cell.is-range-end:not(.is-single) {
  border-radius: 0 8px 8px 0;
}
.econ-day-cell.is-single { border-radius: 8px; }
.econ-day-cell.is-pending {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  border-radius: 8px;
}

.econ-day-pop-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px; padding-top: 10px;
  border-top: 1px solid var(--border);
}
.econ-day-hint { font-size: 11px; color: var(--text-muted); }
.econ-day-done-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px; font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.econ-day-done-btn:hover { filter: brightness(1.08); }

@media (max-width: 520px) {
  .econ-day-pop {
    left: auto; right: 0;
    width: min(320px, calc(100vw - 32px));
  }
}

/* ─── Activities table (dashboard bottom) ──────────── */
.activities-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.activities-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; margin-bottom: 16px;
}
.activities-title { font-size: 16px; font-weight: 600; color: var(--text); margin: 0; }
.activities-table { width: 100%; border-collapse: collapse; }
.activities-table th, .activities-table td {
  text-align: left; padding: 12px 10px; font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.activities-table th {
  color: var(--text-muted); font-weight: 600;
  text-transform: uppercase; font-size: 11px; letter-spacing: 0.05em;
}
.activities-table tbody tr:hover td { background: var(--surface-2); }
.activities-table td.num {
  text-align: right; font-variant-numeric: tabular-nums; font-weight: 600;
}
.activities-table td.num.positive { color: var(--income); }
.activities-table td.num.negative { color: var(--text); }
.activities-table td.num.transfer { color: var(--text-muted); }

/* ─── Loading overlay (CSV import) ─────────────────── */
.loading-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: none; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .65);
  backdrop-filter: blur(6px);
  padding: 20px;
}
.loading-overlay.active { display: flex; }
.loading-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px; text-align: center;
  max-width: 360px; width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
}
.spinner {
  width: 44px; height: 44px; margin: 0 auto 18px;
  border: 4px solid var(--surface-2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-title { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.loading-sub { font-size: 14px; color: var(--text-muted); line-height: 1.45; margin-bottom: 14px; min-height: 2.9em; }
.loading-timer { font-size: 13px; color: var(--text-faint); font-variant-numeric: tabular-nums; font-weight: 600; }

/* ─── Category form: transfer checkbox row ─────────── */
.field-checkbox {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px; background: var(--surface-2);
  border-radius: var(--radius-sm); border: 1px solid var(--border);
}
.field-checkbox input[type="checkbox"] {
  margin-top: 2px; width: 18px; height: 18px;
  flex-shrink: 0; cursor: pointer; accent-color: var(--primary);
}
.field-checkbox .field-label { display: block; margin-bottom: 2px; }
.field-checkbox .field-hint {
  display: block; font-size: 13px; color: var(--text-muted);
  font-weight: 400; line-height: 1.4;
}

/* ─── Cat-changes list (dashboard) ─────────────────── */
.cat-changes-list { list-style: none; padding: 0; margin: 0; }
.cat-change-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.cat-change-row:last-child { border-bottom: none; }
.cat-change-swatch { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.cat-change-name { flex: 1; font-size: 14px; font-weight: 500; color: var(--text); }
.cat-change-delta { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cat-change-delta.delta-good { color: var(--income); }
.cat-change-delta.delta-bad { color: var(--spend); }

.budget-status-line { margin: 0; font-size: 14px; color: var(--text); line-height: 1.55; }
.budget-status-line strong { font-weight: 700; }

/* ─── Stat-card (dashboard) ────────────────────────── */
.dash-stats-row {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
@media (min-width: 720px) { .dash-stats-row { grid-template-columns: repeat(4, 1fr); } }
.dash-stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px 18px;
}
.dash-stat .stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; margin-bottom: 6px; }
.dash-stat .stat-value {
  font-size: 22px; font-weight: 700; color: var(--text);
  letter-spacing: -0.01em; line-height: 1.15;
}
.dash-stat .stat-value.income { color: var(--income); }
.dash-stat .stat-value.spend { color: var(--text); }
.dash-stat .stat-unit { font-size: 14px; font-weight: 600; color: var(--text-muted); }
.dash-stat .stat-sub { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.dash-stat .stat-delta { font-size: 11px; font-weight: 600; margin-top: 4px; font-variant-numeric: tabular-nums; }
.dash-stat .delta-good { color: var(--income); }
.dash-stat .delta-bad { color: var(--spend); }
.dash-stat .stat-value-text { font-size: 18px; font-weight: 700; line-height: 1.2; }

/* ─── Mobile ───────────────────────────────────────── */
@media (max-width: 960px) {
  .sidebar {
    position: fixed; top: 0; left: 0;
    transform: translateX(-100%);
    transition: transform .25s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .hamburger { display: inline-flex; }
  .app-content { padding: 20px; }
  .dash-summary { grid-template-columns: 1fr; }
  .dash-row { grid-template-columns: 1fr; }
  .summary-card { min-height: auto; }
}

/* ─── Auth pages ─────────────────────────────────────── */
.auth-body {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at top, rgba(255, 107, 61, .08) 0%, transparent 50%), var(--bg);
  padding: 32px 20px;
}
.auth-shell {
  width: 100%; max-width: 420px;
  display: flex; flex-direction: column; gap: 22px;
}
.auth-brand {
  display: flex; align-items: center; gap: 11px;
  justify-content: center;
}
.auth-logo {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, #FF8A5C 0%, #FF6B3D 45%, #E45227 100%);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px;
  box-shadow: 0 6px 20px rgba(255, 107, 61, .35);
}
.auth-brand-text {
  font-size: 17px; font-weight: 700; color: var(--text);
  letter-spacing: -0.01em;
}
.auth-flash-wrap { margin-bottom: 0; }
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 34px 30px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
.auth-title {
  font-size: 22px; font-weight: 700; color: var(--text);
  margin: 0 0 6px 0; letter-spacing: -0.01em;
}
.auth-sub {
  margin: 0 0 22px 0;
  color: var(--text-muted); font-size: 14px; line-height: 1.5;
}
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form .field input,
.auth-form .field textarea {
  background: rgba(255,255,255,.03);
}
.auth-btn { width: 100%; margin-top: 6px; padding: 12px; font-size: 14px; }
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 22px 0 14px;
  color: var(--text-muted); font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--border);
}
.auth-secondary-link {
  display: block; text-align: center;
  padding: 11px 14px;
  border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); text-decoration: none;
  font-size: 14px; font-weight: 600;
  transition: border-color .15s ease, color .15s ease;
}
.auth-secondary-link:hover {
  border-color: var(--primary); color: var(--primary);
}
.auth-icon-circle {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(255, 107, 61, .12);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.auth-icon-circle .spinner {
  width: 28px; height: 28px;
  border: 3px solid rgba(255, 107, 61, .2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.auth-pending-body strong { color: var(--text); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Sidebar user/account section ──────────────────── */
.sidebar-user {
  padding: 6px 12px 10px;
}
.sidebar-user-email {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  word-break: break-all;
  line-height: 1.4;
}

/* ─── Approvals page ────────────────────────────────── */
.approvals-head {
  margin-bottom: 22px;
}
.approvals-head h1 { margin: 0 0 4px 0; }
.approvals-head .page-sub { margin: 0; }

.approvals-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
}

.approval-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  display: flex; flex-direction: column; gap: 12px;
}

.approval-head { display: flex; align-items: center; gap: 12px; }
.approval-icon {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: rgba(255, 107, 61, .12);
  color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.approval-meta { flex: 1; min-width: 0; }
.approval-email {
  font-size: 14px; font-weight: 600; color: var(--text);
  word-break: break-all; line-height: 1.3;
}
.approval-time {
  font-size: 11.5px; color: var(--text-muted); margin-top: 3px;
}
.approval-note {
  margin: 0;
  padding: 10px 12px;
  background: rgba(255, 255, 255, .03);
  border-left: 2px solid var(--primary);
  border-radius: 4px;
  font-size: 13px; line-height: 1.45;
  color: var(--text-muted);
  font-style: italic;
}
.approval-actions {
  display: flex; align-items: center; gap: 14px;
  margin-top: auto;
}
.btn-sm { padding: 7px 14px; font-size: 13px; }

/* ─── Users (admin) page ────────────────────────────── */
.users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 14px;
}
.user-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  display: flex; flex-direction: column; gap: 14px;
}
.user-card.is-admin {
  border-color: rgba(255, 107, 61, .3);
}
.user-head { display: flex; align-items: center; gap: 12px; }
.user-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF8A5C 0%, #FF6B3D 45%, #E45227 100%);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700;
  flex-shrink: 0;
}
.user-meta { flex: 1; min-width: 0; }
.user-email {
  font-size: 14px; font-weight: 600; color: var(--text);
  word-break: break-all; line-height: 1.3;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.user-sub {
  font-size: 11.5px; color: var(--text-muted); margin-top: 3px;
}
.user-badge {
  display: inline-block; padding: 2px 7px;
  border-radius: 999px; font-size: 10px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.user-badge.admin {
  background: rgba(255, 107, 61, .15); color: var(--primary);
}
.user-badge.self {
  background: rgba(99, 102, 241, .18); color: #A5B4FC;
}

.user-households {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.user-household {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, .03);
  border-radius: 8px;
  font-size: 12.5px;
}
.user-household-role {
  display: inline-block; padding: 2px 7px;
  border-radius: 999px; font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em;
  flex-shrink: 0;
}
.user-household-role.owner {
  background: rgba(40, 199, 111, .14); color: var(--income);
}
.user-household-role.member {
  background: rgba(255, 255, 255, .06); color: var(--text-muted);
}
.user-household-name {
  flex: 1; color: var(--text); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-household-stat {
  color: var(--text-muted); font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.user-households-empty {
  margin: 0;
  font-size: 12px; color: var(--text-muted);
  font-style: italic;
  padding: 8px 10px;
}
.user-actions {
  margin-top: auto;
  padding-top: 4px;
  display: flex; align-items: center; justify-content: flex-end;
}
.user-actions-note {
  font-size: 11.5px; color: var(--text-muted); font-style: italic;
}

/* ─── Landing page ──────────────────────────────────── */
.landing-body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, system-ui, sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex; flex-direction: column;
}

.lp-nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 32px;
  background: rgba(14, 14, 16, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.lp-brand {
  display: inline-flex; align-items: center; gap: 11px;
  text-decoration: none; color: var(--text);
}
.lp-logo {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #FF8A5C 0%, #FF6B3D 45%, #E45227 100%);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px;
  box-shadow: 0 4px 16px rgba(255, 107, 61, .35);
}
.lp-logo-small { width: 24px; height: 24px; font-size: 12px; border-radius: 7px; }
.lp-brand-text {
  font-size: 17px; font-weight: 700; letter-spacing: -0.01em;
}
.lp-nav-actions { display: flex; align-items: center; gap: 8px; }
.lp-nav-link {
  padding: 9px 14px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px; font-weight: 500;
  border-radius: 9px;
  transition: color .15s ease;
}
.lp-nav-link:hover { color: var(--text); }
.lp-nav-cta {
  padding: 9px 16px;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  font-size: 14px; font-weight: 600;
  border-radius: 9px;
  transition: opacity .15s ease;
}
.lp-nav-cta:hover { opacity: .88; }

.lp-hero {
  text-align: center;
  padding: 88px 24px 60px;
  max-width: 880px;
  margin: 0 auto;
  position: relative;
}
.lp-hero::before {
  content: "";
  position: absolute;
  top: -120px; left: 50%;
  transform: translateX(-50%);
  width: 720px; height: 480px;
  background: radial-gradient(ellipse at center, rgba(255, 107, 61, .18) 0%, transparent 60%);
  pointer-events: none; z-index: -1;
}
.lp-hero-pill {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(255, 107, 61, .12);
  border: 1px solid rgba(255, 107, 61, .25);
  color: var(--primary);
  font-size: 12px; font-weight: 600;
  border-radius: 999px;
  letter-spacing: 0.02em;
  margin-bottom: 28px;
}
.lp-hero-title {
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin: 0 0 24px 0;
  color: var(--text);
}
.lp-accent {
  background: linear-gradient(135deg, #FF8A5C 0%, #FF6B3D 50%, #E45227 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lp-hero-sub {
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 36px;
}
.lp-hero-cta {
  display: inline-flex; align-items: center; gap: 16px;
  flex-wrap: wrap; justify-content: center;
}
.lp-btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px; font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(255, 107, 61, .35);
  transition: transform .12s ease, box-shadow .15s ease;
}
.lp-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 32px rgba(255, 107, 61, .45);
}
.lp-btn-secondary {
  color: var(--text);
  text-decoration: none;
  font-size: 15px; font-weight: 500;
  padding: 14px 8px;
  border-bottom: 1px solid transparent;
  transition: border-color .15s ease;
}
.lp-btn-secondary:hover { border-bottom-color: var(--primary); }
.lp-btn-ghost {
  padding: 14px 22px;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  border-radius: 12px;
  font-size: 15px; font-weight: 500;
  transition: border-color .15s ease;
}
.lp-btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.lp-hero-note {
  margin-top: 24px;
  font-size: 13px;
  color: var(--text-muted);
  max-width: 480px;
  margin-left: auto; margin-right: auto;
  line-height: 1.5;
}

/* App mockup preview */
.lp-mockup {
  max-width: 920px;
  margin: 0 auto 80px;
  padding: 0 24px;
}
.lp-mockup-frame {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}
.lp-mockup-chrome {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, .02);
  border-bottom: 1px solid var(--border);
}
.lp-mockup-dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
}
.lp-mockup-url {
  margin-left: 14px;
  font-size: 12px;
  color: var(--text-muted);
  font-family: "Inter", monospace;
}
.lp-mockup-body {
  padding: 28px;
  display: flex; flex-direction: column; gap: 16px;
}
.lp-mock-card {
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
}
.lp-mock-featured {
  background: linear-gradient(135deg, #FF8A5C 0%, #FF6B3D 45%, #E45227 100%);
  border-color: transparent;
  color: #fff;
}
.lp-mock-label {
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  opacity: .85;
}
.lp-mock-amount {
  font-size: 36px; font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.lp-mock-delta {
  font-size: 13px; font-weight: 500;
  opacity: .85;
  margin-top: 2px;
}
.lp-mock-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.lp-mock-mini {
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}
.lp-mock-mini-label {
  font-size: 11px; font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.lp-mock-mini-val {
  font-size: 18px; font-weight: 700;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.lp-mock-bars {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: end;
  gap: 10px;
  height: 110px;
  padding: 16px;
  background: rgba(255, 255, 255, .02);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.lp-mock-bar {
  background: rgba(255, 107, 61, .25);
  border-radius: 6px;
  min-height: 14px;
}
.lp-mock-bar-now { background: var(--primary); }

/* Features */
.lp-features {
  max-width: 1080px;
  margin: 0 auto;
  padding: 60px 24px;
}
.lp-section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.025em;
  text-align: center;
  margin: 0 0 48px;
}
.lp-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.lp-feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  transition: border-color .2s ease, transform .15s ease;
}
.lp-feature:hover {
  border-color: rgba(255, 107, 61, .3);
  transform: translateY(-2px);
}
.lp-feature-icon {
  width: 42px; height: 42px;
  border-radius: 11px;
  background: rgba(255, 107, 61, .12);
  color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.lp-feature h3 {
  font-size: 17px; font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.lp-feature p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px; line-height: 1.55;
}

/* How-it-works steps */
.lp-how {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 24px;
}
.lp-steps {
  list-style: none;
  padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 18px;
}
.lp-steps li {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 24px;
}
.lp-step-num {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255, 107, 61, .14);
  color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px;
}
.lp-steps h4 {
  margin: 4px 0 6px;
  font-size: 16px; font-weight: 700;
}
.lp-steps p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px; line-height: 1.5;
}

/* Final CTA */
.lp-final-cta {
  max-width: 640px;
  margin: 40px auto 80px;
  padding: 56px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.lp-final-cta::before {
  content: "";
  position: absolute;
  top: -40%; left: 50%;
  transform: translateX(-50%);
  width: 120%; height: 220px;
  background: radial-gradient(ellipse at center, rgba(255, 107, 61, .15) 0%, transparent 60%);
  pointer-events: none;
}
.lp-final-title {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  position: relative;
}
.lp-final-sub {
  font-size: 15px;
  color: var(--text-muted);
  margin: 0 0 28px;
  line-height: 1.55;
  position: relative;
}
.lp-final-actions {
  display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center;
  position: relative;
}

/* Footer */
.lp-footer {
  margin-top: auto;
  padding: 28px 32px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 14px;
  color: var(--text-muted);
  font-size: 13px;
}
.lp-footer-left, .lp-footer-right {
  display: inline-flex; align-items: center; gap: 10px;
}
.lp-footer a { color: var(--text-muted); text-decoration: none; }
.lp-footer a:hover { color: var(--primary); }

@media (max-width: 640px) {
  .lp-nav { padding: 14px 18px; }
  .lp-nav-link { display: none; }
  .lp-hero { padding: 60px 18px 40px; }
  .lp-mockup-body { padding: 18px; }
  .lp-mock-row { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .lp-mock-mini { padding: 10px; }
  .lp-mock-mini-val { font-size: 15px; }
  .lp-final-cta { margin: 24px 16px 60px; padding: 40px 24px; border-radius: 18px; }
  .lp-footer { padding: 22px 18px; }
}
