/* ============================================================================
   Fin-App V2 mockup — design tokens + reusable components.
   Trust-first, private-bank-adjacent. Deep navy + muted gold + warm-white.
   ============================================================================ */

:root {
  /* Base palette */
  --ink:           #0F1B2D;   /* primary text, deepest */
  --ink-2:         #1F2D40;   /* primary surfaces, navbar */
  --ink-3:         #344157;   /* subtle hover on dark surfaces */
  --slate-900:     #1F2937;
  --slate-700:     #374151;
  --slate-600:     #4B5563;
  --slate-500:     #6B7280;
  --slate-400:     #9CA3AF;
  --slate-300:     #D1D5DB;
  --slate-200:     #E5E7EB;
  --slate-100:     #F1F2F5;
  --paper:         #FAFAF7;   /* warm white background */
  --card:          #FFFFFF;
  --line:          #E6E4DD;   /* warm border, not cold grey */
  --line-strong:   #C9C5BB;

  /* Brand */
  --gold:          #B08D3F;   /* muted gold accent — wealth without flash */
  --gold-light:    #DFCB97;
  --gold-tint:     #F5EFDB;
  --teal:          #2C7A7B;   /* secondary accent — data, links */
  --teal-light:    #4FB1B2;
  --teal-tint:     #D9EEEE;

  /* Semantic */
  --positive:      #2F7A4A;
  --positive-tint: #DBEFE3;
  --negative:      #B5413A;
  --negative-tint: #F5D9D7;
  --warn:          #B7791F;
  --warn-tint:     #F4E5C0;
  --info:          #2B5797;
  --info-tint:     #DCE5F0;

  /* Type */
  --font-sans:     'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display:  'Fraunces', Georgia, serif;          /* for headlines / hero */
  --font-mono:     'JetBrains Mono', ui-monospace, monospace;

  /* Spacing scale (4px base) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* Radius */
  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Shadow — soft, low opacity */
  --shadow-sm:   0 1px 2px rgba(15,27,45,0.05), 0 1px 1px rgba(15,27,45,0.04);
  --shadow:      0 4px 16px rgba(15,27,45,0.06), 0 1px 3px rgba(15,27,45,0.04);
  --shadow-lg:   0 16px 40px rgba(15,27,45,0.10), 0 4px 12px rgba(15,27,45,0.06);
  --shadow-gold: 0 4px 20px rgba(176,141,63,0.18);

  /* Transitions */
  --t-fast:   120ms ease;
  --t-base:   180ms ease;
  --t-slow:   240ms ease;
}

/* ============================================================================
   Base
   ============================================================================ */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11' on, 'ss01' on, 'cv02' on;
}

body { font-size: 14px; line-height: 1.5; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}

h1 { font-size: 32px; line-height: 1.2; letter-spacing: -0.02em; }
h2 { font-size: 22px; line-height: 1.3; }
h3 { font-size: 17px; line-height: 1.4; font-weight: 600; font-family: var(--font-sans); }
h4 { font-size: 14px; line-height: 1.4; font-weight: 600; font-family: var(--font-sans); }

p { margin: 0; }

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

/* Tabular nums on all data */
.num,
td.num, th.num,
[data-num] {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' on;
}

/* ============================================================================
   Layout: app shell with TOPBAR (Option C — private-bank topbar nav)
   The legacy `<aside data-sidebar>` element is reused as a horizontal top bar.
   Old `.sidebar__*` classes still render, but laid out horizontally.
   ============================================================================ */

.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.sidebar {
  background: var(--ink);
  color: #E8EAEE;
  padding: 0 var(--space-6);
  position: sticky;
  top: 0;
  height: 56px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-6);
  z-index: 30;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sidebar__brand {
  padding: 0;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.sidebar__brand-mark {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink); font-weight: 700;
  font-family: var(--font-display);
  font-size: 16px;
}

.sidebar__brand-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #fff;
}

.sidebar__nav {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-1);
  padding: 0;
}

.sidebar__section { display: none; }

.sidebar__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px var(--space-3);
  border-radius: var(--radius);
  color: rgba(255,255,255,0.80);
  font-size: 13px;
  transition: background var(--t-fast), color var(--t-fast);
  cursor: pointer;
  white-space: nowrap;
}

.sidebar__link:hover {
  background: var(--ink-3);
  color: #fff;
}

.sidebar__link[data-active="true"] {
  background: rgba(176,141,63,0.18);
  color: var(--gold-light);
  font-weight: 500;
}

.sidebar__link[data-active="true"] .sidebar__icon { color: var(--gold-light); }

.sidebar__icon {
  width: 18px; height: 18px;
  color: rgba(255,255,255,0.55);
  flex-shrink: 0;
}

.sidebar__footer { display: none; }

/* Topbar — right side cluster (lang switcher + profile dropdown) */
.topbar__right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.topbar__lang {
  display: inline-flex;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 2px;
  background: rgba(255,255,255,0.04);
}
.topbar__lang-btn {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 3px 7px;
  border-radius: 5px;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  background: transparent;
  border: 0;
  text-transform: uppercase;
}
.topbar__lang-btn:hover { color: #fff; }
.topbar__lang-btn.is-active { background: var(--gold); color: var(--ink); }

.topbar__profile {
  position: relative;
}
.topbar__avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--ink);
  font-weight: 700;
  font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  border: 0;
  cursor: pointer;
}
.topbar__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 12px 32px rgba(15,27,45,0.18);
  display: none;
  z-index: 50;
}
.topbar__menu[data-open="true"] { display: block; }
.topbar__menu-section {
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--slate-soft);
  padding: 6px 10px 4px;
}
.topbar__menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
}
.topbar__menu-item:hover { background: var(--paper); }
.topbar__menu-item i { width: 16px; height: 16px; color: var(--slate-soft); }
.topbar__menu-divider { height: 1px; background: var(--line); margin: 4px 0; }

/* Insight tiles on dashboard (Option C nav — deeper analyses) */
.insights-tiles { margin-top: var(--space-8); }
.insights-tiles__head { margin-bottom: var(--space-5); }
.insights-tiles__head h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 4px;
}
.insights-tiles__head .muted { color: var(--slate-soft); font-size: 14px; margin: 0; }
.insights-tiles__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}
.insight-tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: var(--space-5);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
  cursor: pointer;
  position: relative;
}
.insight-tile:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(15,27,45,0.06);
}
.insight-tile__icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--gold-tint) 0%, #fff 100%);
  border: 1px solid rgba(176,141,63,0.25);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
}
.insight-tile__icon i { width: 18px; height: 18px; }
.insight-tile h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}
.insight-tile p {
  font-size: 13px;
  color: var(--slate-soft);
  line-height: 1.5;
  margin: 0;
}
.insight-tile__metric {
  margin-top: auto;
  padding-top: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.insight-tile__cta {
  position: absolute;
  top: var(--space-5);
  right: var(--space-5);
  font-size: 12px;
  color: var(--gold);
  font-weight: 500;
}
@media (max-width: 900px) {
  .insights-tiles__grid { grid-template-columns: 1fr; }
}

.sidebar__privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: rgba(176,141,63,0.15);
  border: 1px solid rgba(176,141,63,0.30);
  border-radius: 999px;
  color: var(--gold-light);
  font-size: 11px;
  font-weight: 500;
  margin-bottom: var(--space-2);
}

.sidebar__privacy-badge svg { width: 12px; height: 12px; }

/* ============================================================================
   Main content
   ============================================================================ */

.main {
  padding: var(--space-8) var(--space-10);
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-8);
}

.topbar__title {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.topbar__title .greeting {
  font-size: 12px;
  color: var(--slate-500);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.search {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--slate-500);
  cursor: pointer;
  transition: border-color var(--t-fast);
  min-width: 220px;
}

.search:hover { border-color: var(--line-strong); }
.search kbd {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  background: var(--slate-100);
  border-radius: 4px;
  color: var(--slate-600);
}

.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink); font-weight: 600; font-size: 13px;
  cursor: pointer;
}

/* ============================================================================
   Cards
   ============================================================================ */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: box-shadow var(--t-base), border-color var(--t-base);
}

.card--flat { box-shadow: none; }
.card--shadow { box-shadow: var(--shadow-sm); }
.card--padded-lg { padding: var(--space-8); }

.card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
}

.card__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-700);
  letter-spacing: 0.01em;
}

.card__subtitle {
  font-size: 12px;
  color: var(--slate-500);
  margin-top: 2px;
}

/* KPI cards */

.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  cursor: pointer;
  transition: border-color var(--t-base), box-shadow var(--t-base), transform var(--t-fast);
}

.kpi:hover {
  border-color: var(--gold-light);
  box-shadow: var(--shadow);
}

.kpi__label {
  font-size: 12px;
  color: var(--slate-500);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

.kpi__value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.kpi__sub {
  margin-top: var(--space-2);
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  font-size: 12px;
}

.kpi__delta {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.kpi__delta--up   { color: var(--positive); }
.kpi__delta--down { color: var(--negative); }
.kpi__delta--flat { color: var(--slate-500); }

.kpi__caption { color: var(--slate-500); }

.kpi--hero {
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 100%);
  border: none;
  color: #fff;
}
.kpi--hero:hover { transform: none; }
.kpi--hero .kpi__label { color: rgba(255,255,255,0.65); }
.kpi--hero .kpi__value { color: #fff; }
.kpi--hero .kpi__caption { color: rgba(255,255,255,0.65); }

/* ============================================================================
   Buttons
   ============================================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 9px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
  background: var(--card);
  color: var(--ink);
  border-color: var(--line);
  font-family: inherit;
}

.btn:hover { border-color: var(--line-strong); }

.btn--primary {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.btn--primary:hover { background: var(--ink-2); border-color: var(--ink-2); }

.btn--gold {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
}
.btn--gold:hover { background: #9C7A33; border-color: #9C7A33; }

.btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--slate-600);
}
.btn--ghost:hover { background: var(--slate-100); }

.btn--lg { padding: 12px 22px; font-size: 14px; }
.btn--sm { padding: 6px 12px; font-size: 12px; }

.btn .icon { width: 16px; height: 16px; }

/* ============================================================================
   Capital-structure panel
   ============================================================================ */

.capital-panel {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.capital-tile {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.capital-tile__title {
  font-size: 12px;
  font-weight: 600;
  color: var(--slate-600);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.capital-tile__big {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.capital-tile__sub {
  font-size: 12px;
  color: var(--slate-500);
  margin-top: var(--space-1);
}

/* Stacked bar */
.bar {
  height: 8px;
  border-radius: 4px;
  background: var(--slate-100);
  overflow: hidden;
  display: flex;
  margin-top: var(--space-3);
}
.bar__seg {
  height: 100%;
}
.bar__seg--equity   { background: var(--teal); }
.bar__seg--debt     { background: var(--negative); }
.bar__seg--re       { background: var(--gold); }
.bar__seg--movable  { background: var(--teal); }

.bar-legend {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-3);
  font-size: 12px;
  color: var(--slate-600);
}
.bar-legend__item {
  display: flex; align-items: center; gap: 6px;
}
.bar-legend__dot {
  width: 8px; height: 8px; border-radius: 2px;
}

.liquidity-band {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.band-dot {
  width: 10px; height: 10px; border-radius: 50%;
}
.band-dot--green { background: var(--positive); }
.band-dot--amber { background: var(--warn); }
.band-dot--red   { background: var(--negative); }

/* ============================================================================
   "Vrij voor uitgaven" hero
   ============================================================================ */

.free-card {
  background: linear-gradient(135deg, var(--gold) 0%, #D5B468 100%);
  color: var(--ink);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-gold);
}

.free-card__label {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
  opacity: 0.65;
  margin-bottom: var(--space-2);
}

.free-card__value {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.free-card__per-month {
  margin-top: var(--space-2);
  font-size: 14px;
  opacity: 0.75;
  font-variant-numeric: tabular-nums;
}

.free-card__breakdown {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  font-size: 12px;
  align-content: center;
}

.free-card__breakdown-item {
  background: rgba(15,27,45,0.08);
  border-radius: var(--radius);
  padding: 10px 12px;
}

.free-card__breakdown-item .label {
  opacity: 0.65;
  margin-bottom: 2px;
}

.free-card__breakdown-item .value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ============================================================================
   Chart panel
   ============================================================================ */

.chart-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
}

.chart-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
}

.chart-card__title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
}

.toggle-group {
  display: inline-flex;
  background: var(--slate-100);
  border-radius: var(--radius);
  padding: 3px;
  font-size: 12px;
}

.toggle-group__btn {
  padding: 5px 12px;
  border-radius: 5px;
  color: var(--slate-600);
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  transition: background var(--t-fast), color var(--t-fast);
}

.toggle-group__btn[data-active="true"] {
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.chart-canvas {
  position: relative;
  height: 280px;
}

.interpretation {
  margin-top: var(--space-5);
  padding: var(--space-4) var(--space-5);
  background: var(--slate-100);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--slate-700);
  line-height: 1.55;
  border-left: 3px solid var(--teal);
}

.interpretation__hint {
  margin-top: var(--space-2);
  font-size: 12px;
  color: var(--slate-500);
}

.interpretation__hint a {
  color: var(--teal);
  font-weight: 500;
}

/* ============================================================================
   Donut filter row
   ============================================================================ */

.donut-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.donut-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.donut-card__title {
  font-size: 12px;
  font-weight: 600;
  color: var(--slate-600);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.donut-card__chart {
  position: relative;
  height: 140px;
}

.donut-card__center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}
.donut-card__center .num {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.donut-card__center .lbl {
  font-size: 10px;
  color: var(--slate-500);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.donut-card__legend {
  margin-top: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--slate-600);
}
.donut-card__legend-row {
  display: flex; align-items: center; gap: 6px;
}
.donut-card__legend-row .dot { width: 8px; height: 8px; border-radius: 2px; }
.donut-card__legend-row .label { flex: 1; }
.donut-card__legend-row .pct { color: var(--slate-500); font-variant-numeric: tabular-nums; }

/* ============================================================================
   Asset table
   ============================================================================ */

.table-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.table-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--line);
}

.table-card__title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
}

.assets-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.assets-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--slate-500);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  background: var(--slate-100);
}

.assets-table th.num,
.assets-table td.num { text-align: right; }

.assets-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.assets-table tbody tr {
  cursor: pointer;
  transition: background var(--t-fast);
}
.assets-table tbody tr:hover { background: var(--slate-100); }

.assets-table tbody tr:last-child td { border-bottom: none; }

.asset-name {
  display: flex; align-items: center; gap: var(--space-3);
}

.asset-icon {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: var(--slate-100);
  display: flex; align-items: center; justify-content: center;
  color: var(--slate-600);
  flex-shrink: 0;
}
.asset-icon svg { width: 14px; height: 14px; }

.asset-meta {
  display: flex; flex-direction: column; gap: 2px;
}
.asset-meta__name { font-weight: 500; color: var(--ink); }
.asset-meta__inst { font-size: 11px; color: var(--slate-500); }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.badge--cat-investment   { background: var(--info-tint);     color: var(--info); }
.badge--cat-savings      { background: var(--teal-tint);     color: var(--teal); }
.badge--cat-realestate   { background: var(--gold-tint);     color: var(--gold); }
.badge--cat-loan         { background: var(--negative-tint); color: var(--negative); }
.badge--cat-pension      { background: #E8E4F0;              color: #5B3F8B; }
.badge--cat-current      { background: var(--slate-100);     color: var(--slate-600); }
.badge--cat-personal     { background: #FFE8D6;              color: #B25C1A; }
.badge--cat-gift         { background: #FFE2EC;              color: #B33E6B; }

.return-pos { color: var(--positive); font-weight: 500; }
.return-neg { color: var(--negative); font-weight: 500; }

.liquidity-pips {
  display: inline-flex; gap: 2px;
}
.liquidity-pips .pip {
  width: 6px; height: 12px; border-radius: 1px;
  background: var(--slate-200);
}
.liquidity-pips .pip[data-on="true"] { background: var(--teal); }

/* ============================================================================
   Onboarding pages
   ============================================================================ */

.onboarding {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 480px 1fr;
}

.onboarding__panel {
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
  color: #fff;
  padding: var(--space-12) var(--space-10);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.onboarding__brand {
  display: flex; align-items: center; gap: var(--space-3);
}
.onboarding__brand-mark {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink); font-weight: 700; font-family: var(--font-display);
}
.onboarding__brand-name {
  font-family: var(--font-display);
  font-size: 22px;
  color: #fff;
}

.onboarding__tagline {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #fff;
  margin-bottom: var(--space-4);
}

.onboarding__sub {
  font-size: 14px;
  color: rgba(255,255,255,0.72);
  line-height: 1.55;
  margin-bottom: var(--space-8);
}

.onboarding__quote {
  font-style: italic;
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  border-left: 2px solid var(--gold);
  padding-left: var(--space-4);
  margin-top: var(--space-6);
  line-height: 1.5;
}

.onboarding__progress {
  display: flex; gap: 6px;
  margin-bottom: var(--space-6);
}
.onboarding__progress-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.20);
}
.onboarding__progress-dot[data-active="true"] {
  background: var(--gold-light);
  box-shadow: 0 0 0 4px rgba(176,141,63,0.20);
}

.onboarding__form {
  padding: var(--space-12) var(--space-12);
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  justify-content: center;
}

.onboarding__step-label {
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.onboarding__title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: var(--space-3);
  line-height: 1.15;
}

.onboarding__lede {
  font-size: 15px;
  color: var(--slate-600);
  line-height: 1.6;
}

/* Mode picker tiles */

.mode-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-top: var(--space-3);
}

.mode-tile {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  cursor: pointer;
  transition: border-color var(--t-base), box-shadow var(--t-base), background var(--t-base);
  position: relative;
  display: flex;
  flex-direction: column;
}

.mode-tile:hover {
  border-color: var(--gold-light);
  box-shadow: var(--shadow);
}

.mode-tile[data-active="true"] {
  border-color: var(--gold);
  background: var(--gold-tint);
  box-shadow: var(--shadow-gold);
}

.mode-tile__badge {
  position: absolute;
  top: var(--space-3); right: var(--space-3);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--ink);
  color: #fff;
  padding: 3px 8px;
  border-radius: 999px;
}

.mode-tile__icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-4);
}
.mode-tile__icon svg { width: 22px; height: 22px; }

.mode-tile[data-active="true"] .mode-tile__icon {
  background: var(--gold);
}

.mode-tile__title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--space-2);
}

.mode-tile__lede {
  font-size: 13px;
  color: var(--slate-600);
  line-height: 1.5;
  margin-bottom: var(--space-4);
}

.mode-tile__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.mode-tile__list li {
  font-size: 12px;
  color: var(--slate-700);
  line-height: 1.4;
  display: flex;
  align-items: start;
  gap: var(--space-2);
}

.mode-tile__list li svg {
  width: 12px; height: 12px;
  margin-top: 4px;
  flex-shrink: 0;
  color: var(--positive);
}

.mode-tile__warn {
  margin-top: var(--space-4);
  padding: var(--space-3);
  background: var(--warn-tint);
  border-radius: var(--radius);
  font-size: 12px;
  color: #6B5223;
  line-height: 1.4;
  border-left: 3px solid var(--warn);
}

/* Recovery phrase reveal */

.recovery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin: var(--space-4) 0;
  padding: var(--space-5);
  background: var(--slate-100);
  border: 1px dashed var(--slate-300);
  border-radius: var(--radius-lg);
}

.recovery-word {
  display: flex; align-items: baseline; gap: var(--space-2);
  padding: 8px 12px;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
}

.recovery-word__n {
  font-size: 10px;
  color: var(--slate-400);
  width: 16px;
}

.checkbox-row {
  display: flex;
  align-items: start;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}
.checkbox-row:hover { border-color: var(--line-strong); }
.checkbox-row input { margin-top: 2px; cursor: pointer; }
.checkbox-row label { font-size: 13px; color: var(--slate-700); cursor: pointer; line-height: 1.5; }
.checkbox-row label strong { color: var(--ink); }

/* Action row */

.action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-6);
  gap: var(--space-3);
}

.action-row__back { color: var(--slate-500); font-size: 13px; cursor: pointer; }
.action-row__back:hover { color: var(--ink); }

/* ============================================================================
   Asset detail page
   ============================================================================ */

.asset-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  gap: var(--space-6);
}

.asset-detail-header__main {
  display: flex; align-items: center; gap: var(--space-4);
  min-width: 0;
}

.asset-detail-header__icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  background: var(--info-tint);
  color: var(--info);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.asset-detail-header__icon svg { width: 22px; height: 22px; }

.asset-detail-header__text { min-width: 0; }

.asset-detail-header__name {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 4px;
}

.asset-detail-header__sub {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  font-size: 13px;
  color: var(--slate-500);
}
.asset-detail-header__sub a,
.asset-detail-header__sub button {
  background: none;
  border: none;
  font: inherit;
  padding: 0;
  color: var(--slate-500);
  cursor: pointer;
  transition: color var(--t-fast);
}
.asset-detail-header__sub a:hover,
.asset-detail-header__sub button:hover {
  color: var(--ink);
  text-decoration: underline;
}
.asset-detail-header__sub .dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--slate-300);
}

.asset-detail-header__actions {
  display: flex; align-items: center; gap: var(--space-2);
  flex-shrink: 0;
}

.prev-next {
  display: flex;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.prev-next button {
  background: var(--card);
  border: none;
  padding: 8px 12px;
  font: inherit;
  color: var(--slate-600);
  cursor: pointer;
  display: flex; align-items: center;
  transition: background var(--t-fast);
}
.prev-next button:hover { background: var(--slate-100); }
.prev-next button svg { width: 16px; height: 16px; }
.prev-next__counter {
  padding: 0 12px;
  font-size: 12px;
  color: var(--slate-500);
  font-variant-numeric: tabular-nums;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

/* Indicator cards (6-up for investments) */
.indicators {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.indicator {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}

.indicator__label {
  font-size: 11px;
  color: var(--slate-500);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
  line-height: 1.3;
}

.indicator__value {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.indicator__sub {
  margin-top: 4px;
  font-size: 11px;
  color: var(--slate-500);
  font-variant-numeric: tabular-nums;
}
.indicator__sub.return-pos { color: var(--positive); font-weight: 500; }
.indicator__sub.return-neg { color: var(--negative); font-weight: 500; }

/* Asset detail layout grid */
.asset-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

@media (max-width: 1200px) {
  .asset-grid { grid-template-columns: 1fr; }
  .indicators { grid-template-columns: repeat(3, 1fr); }
}

/* Side panel cards */
.side-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.side-card__header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--space-4);
}

.side-card__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-700);
}

.side-card__action {
  background: none; border: none; padding: 0;
  font-size: 12px; color: var(--teal); cursor: pointer;
  font-family: inherit;
}
.side-card__action:hover { color: var(--ink); }

.kv-list {
  display: flex; flex-direction: column;
  gap: var(--space-3);
}
.kv-row {
  display: flex; align-items: baseline; justify-content: space-between;
  font-size: 13px;
}
.kv-row__label { color: var(--slate-500); }
.kv-row__value {
  color: var(--ink); font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.risk-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--warn-tint);
  color: #6B5223;
  font-size: 11px;
  font-weight: 500;
}
.risk-pill__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--warn);
}

/* Document list */
.doc-list {
  display: flex; flex-direction: column;
  gap: var(--space-2);
}
.doc-item {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.doc-item:hover { border-color: var(--gold-light); background: var(--card); }
.doc-item__icon {
  width: 36px; height: 36px;
  background: var(--gold-tint);
  color: var(--gold);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.doc-item__icon svg { width: 16px; height: 16px; }
.doc-item__meta { flex: 1; min-width: 0; }
.doc-item__name {
  font-size: 13px; color: var(--ink); font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.doc-item__sub {
  font-size: 11px; color: var(--slate-500);
}

.doc-dropzone {
  border: 1.5px dashed var(--slate-300);
  border-radius: var(--radius);
  padding: var(--space-4);
  text-align: center;
  font-size: 12px;
  color: var(--slate-500);
  cursor: pointer;
  transition: border-color var(--t-fast), color var(--t-fast);
}
.doc-dropzone:hover { border-color: var(--gold); color: var(--ink); }

/* Transaction / valuation tables */
.detail-tabs {
  display: flex;
  gap: var(--space-1);
  border-bottom: 1px solid var(--line);
  padding: 0 var(--space-5);
}
.detail-tab {
  background: none; border: none; padding: 12px 16px;
  font: inherit; font-size: 13px; font-weight: 500;
  color: var(--slate-500); cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--t-fast), border-color var(--t-fast);
  display: flex; align-items: center; gap: 8px;
}
.detail-tab:hover { color: var(--ink); }
.detail-tab[data-active="true"] {
  color: var(--ink);
  border-bottom-color: var(--gold);
}
.detail-tab__count {
  font-size: 11px;
  color: var(--slate-500);
  background: var(--slate-100);
  border-radius: 999px;
  padding: 1px 6px;
  font-variant-numeric: tabular-nums;
}

.detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.detail-table th {
  text-align: left;
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--slate-500);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.detail-table th.num, .detail-table td.num { text-align: right; }
.detail-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.detail-table tbody tr:last-child td { border-bottom: none; }
.detail-table tbody tr:hover { background: var(--slate-100); }

.row-source {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--slate-100);
  color: var(--slate-600);
}

.txn-type {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px;
  font-weight: 500;
}
.txn-type__icon {
  width: 18px; height: 18px;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
}
.txn-type__icon svg { width: 11px; height: 11px; }
.txn-type--deposit .txn-type__icon { background: var(--positive-tint); color: var(--positive); }
.txn-type--withdrawal .txn-type__icon { background: var(--negative-tint); color: var(--negative); }
.txn-type--dividend .txn-type__icon { background: var(--gold-tint); color: var(--gold); }
.txn-type--fee .txn-type__icon { background: var(--slate-200); color: var(--slate-600); }

.row-actions {
  display: flex; gap: 4px;
  opacity: 0.6;
}
.row-actions button {
  background: none; border: none; padding: 4px;
  color: var(--slate-500); cursor: pointer; border-radius: 4px;
  transition: background var(--t-fast), color var(--t-fast);
}
.row-actions button:hover { background: var(--slate-100); color: var(--ink); }
.row-actions button svg { width: 14px; height: 14px; }

.detail-table-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.detail-table-card__actions {
  padding: var(--space-4) var(--space-5);
  background: var(--paper);
  border-top: 1px solid var(--line);
  display: flex; gap: 8px; justify-content: flex-end;
}

/* Notes block */
.notes-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  font-size: 13px;
  color: var(--slate-700);
  line-height: 1.6;
}
.notes-card h4 {
  font-size: 11px;
  color: var(--slate-500);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 8px;
  font-family: var(--font-sans);
}

/* ============================================================================
   Modals + forms + topbar dropdowns
   ============================================================================ */

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,27,45,0.45);
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-6);
  z-index: 100;
  animation: fadeIn 150ms ease;
}
.modal-overlay[hidden] { display: none; }

@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes slideUp { from { transform: translateY(8px); opacity: 0 } to { transform: translateY(0); opacity: 1 } }

.modal {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 560px;
  max-height: calc(100vh - 96px);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: slideUp 180ms ease;
}

.modal--wide  { max-width: 760px; }
.modal--narrow { max-width: 420px; }

.modal__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.modal__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.modal__title small {
  display: block;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--slate-500);
  margin-top: 4px;
  font-weight: 400;
}

.modal__close {
  background: none; border: none; padding: 6px;
  color: var(--slate-500); cursor: pointer;
  border-radius: var(--radius);
  transition: background var(--t-fast), color var(--t-fast);
}
.modal__close:hover { background: var(--slate-100); color: var(--ink); }
.modal__close svg { width: 18px; height: 18px; }

.modal__body {
  padding: var(--space-6);
  overflow-y: auto;
  flex: 1;
}

.modal__footer {
  padding: var(--space-4) var(--space-6);
  background: var(--paper);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-shrink: 0;
}

.modal__footer .left { font-size: 12px; color: var(--slate-500); }
.modal__footer .right { display: flex; gap: 8px; }

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
.form-grid--full { grid-template-columns: 1fr; }
.form-row.full { grid-column: 1 / -1; }

.form-row label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--slate-700);
  margin-bottom: 6px;
}

.form-row .hint {
  display: block;
  font-size: 11px;
  color: var(--slate-500);
  margin-top: 4px;
}

.input,
.select,
textarea.input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  background: var(--card);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.input:focus,
.select:focus,
textarea.input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(176,141,63,0.15);
}
textarea.input { resize: vertical; min-height: 80px; }

.input--num { text-align: right; font-variant-numeric: tabular-nums; }

.input-group {
  display: flex; align-items: stretch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.input-group:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(176,141,63,0.15);
}
.input-group__prefix,
.input-group__suffix {
  padding: 10px 12px;
  background: var(--paper);
  color: var(--slate-500);
  font-size: 13px;
  display: flex; align-items: center;
}
.input-group__prefix { border-right: 1px solid var(--line); }
.input-group__suffix { border-left: 1px solid var(--line); }
.input-group .input {
  border: none;
  border-radius: 0;
  flex: 1;
}
.input-group .input:focus { box-shadow: none; }

/* Type picker (segmented buttons) — for transaction type, etc. */
.type-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-2);
}
.type-picker__option {
  display: flex; flex-direction: column;
  align-items: center; gap: 6px;
  padding: var(--space-3);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--card);
  text-align: center;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.type-picker__option:hover { border-color: var(--gold-light); }
.type-picker__option[data-active="true"] {
  border-color: var(--gold);
  background: var(--gold-tint);
}
.type-picker__option svg { width: 18px; height: 18px; color: var(--slate-600); }
.type-picker__option[data-active="true"] svg { color: var(--gold); }
.type-picker__option .name {
  font-size: 12px; font-weight: 500;
  color: var(--ink);
}
.type-picker__option .hint {
  font-size: 10px; color: var(--slate-500);
  line-height: 1.3;
}

/* Danger / confirm modals */
.modal--danger .modal__title { color: var(--negative); }
.modal-danger-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--negative-tint);
  color: var(--negative);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--space-4);
}
.modal-danger-icon svg { width: 22px; height: 22px; }

.btn--danger {
  background: var(--negative);
  color: #fff;
  border-color: var(--negative);
}
.btn--danger:hover { background: #963530; border-color: #963530; }

/* Topbar dropdown (banker mode + others) */
.topbar-dropdown {
  position: relative;
}
.topbar-dropdown__trigger {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit; font-size: 13px;
  color: var(--ink);
  transition: border-color var(--t-fast);
}
.topbar-dropdown__trigger:hover { border-color: var(--line-strong); }
.topbar-dropdown__trigger[data-active="true"] {
  background: var(--gold-tint);
  border-color: var(--gold);
  color: var(--ink);
}
.topbar-dropdown__trigger svg { width: 14px; height: 14px; }

.topbar-dropdown__menu {
  position: absolute;
  right: 0; top: calc(100% + 6px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 320px;
  padding: var(--space-4);
  z-index: 50;
  animation: slideUp 150ms ease;
}

.topbar-dropdown__menu[hidden] { display: none; }

.dropdown-section {
  display: flex; flex-direction: column;
  gap: var(--space-2);
}
.dropdown-header {
  font-size: 12px; font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--space-2);
}
.dropdown-sub {
  font-size: 12px; color: var(--slate-500);
  line-height: 1.5;
  margin-bottom: var(--space-3);
}

/* Banker mode banner */
.banker-banner {
  background: linear-gradient(90deg, var(--gold-tint) 0%, #FBF6E2 100%);
  border: 1px solid var(--gold-light);
  border-radius: var(--radius);
  padding: 10px 16px;
  display: flex; align-items: center; gap: var(--space-3);
  font-size: 12px;
  color: #6B5223;
  margin-bottom: var(--space-5);
}
.banker-banner i, .banker-banner svg { width: 14px; height: 14px; flex-shrink: 0; }
.banker-banner strong { font-weight: 600; }
.banker-banner button {
  margin-left: auto;
  background: none; border: none; padding: 4px 8px;
  font: inherit; font-size: 12px; font-weight: 500;
  color: #6B5223; cursor: pointer;
  text-decoration: underline;
}
.banker-banner button:hover { color: var(--ink); }

.banker-anon {
  font-style: italic; color: var(--slate-500);
}

/* Mode switch (Settings) */
.mode-switch-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-5);
}

.mode-switch-card__header {
  display: flex; align-items: center; gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.mode-switch-card__pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.mode-switch-card__pill--A { background: var(--positive-tint); color: var(--positive); }
.mode-switch-card__pill--B { background: var(--warn-tint); color: #6B5223; }
.mode-switch-card__pill svg { width: 12px; height: 12px; }

.mode-switch-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.mode-row {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.mode-row:hover { border-color: var(--gold-light); }
.mode-row[data-active="true"] {
  border-color: var(--gold);
  background: var(--gold-tint);
}
.mode-row__icon {
  width: 36px; height: 36px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.mode-row[data-active="true"] .mode-row__icon { background: var(--gold); }
.mode-row__icon svg { width: 18px; height: 18px; }
.mode-row__text { flex: 1; min-width: 0; }
.mode-row__title { font-weight: 600; font-size: 13px; color: var(--ink); }
.mode-row__sub { font-size: 12px; color: var(--slate-500); margin-top: 2px; }

/* Activity log */
.activity-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.activity-table th {
  text-align: left;
  padding: 10px 16px;
  font-size: 11px; font-weight: 600;
  color: var(--slate-500);
  letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.activity-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.activity-table tbody tr:last-child td { border-bottom: none; }

.activity-event {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.activity-event--mode    { background: var(--info-tint); color: var(--info); }
.activity-event--unwrap  { background: var(--negative-tint); color: var(--negative); }
.activity-event--login   { background: var(--slate-200); color: var(--slate-700); }
.activity-event--success { background: var(--positive-tint); color: var(--positive); }

.activity-detail { color: var(--slate-700); }
.activity-detail strong { color: var(--ink); }
.activity-meta { font-size: 11px; color: var(--slate-500); margin-top: 4px; }

/* Estate planning page bits */

.estate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}

.partner-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  position: relative;
  overflow: hidden;
}

.partner-card__head {
  display: flex; align-items: center; gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.partner-card__avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ink-2) 0%, var(--ink-3) 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
  font-family: var(--font-display);
}

.partner-card__avatar--inge {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-light) 100%);
}

.partner-card__name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
}
.partner-card__sub {
  font-size: 12px; color: var(--slate-500);
}

.partner-card__tax-headline {
  margin-bottom: var(--space-4);
}
.partner-card__tax-label {
  font-size: 12px; color: var(--slate-500);
  letter-spacing: 0.02em; text-transform: uppercase;
  font-weight: 500;
  margin-bottom: var(--space-2);
}
.partner-card__tax-amount {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--negative);
  font-variant-numeric: tabular-nums;
}
.partner-card__tax-pct {
  font-size: 13px; color: var(--slate-500);
  margin-top: 4px;
}

.partner-breakdown {
  display: flex; flex-direction: column;
  gap: var(--space-2);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
}
.partner-breakdown__row {
  display: flex; align-items: baseline; justify-content: space-between;
  font-size: 12px;
}
.partner-breakdown__row .label { color: var(--slate-600); }
.partner-breakdown__row .value {
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  font-weight: 500;
}

.gift-planner {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
}

.bracket-bar {
  height: 36px;
  border-radius: var(--radius);
  background: var(--slate-100);
  overflow: hidden;
  display: flex;
  position: relative;
  margin: var(--space-5) 0 var(--space-3);
}
.bracket-bar__seg {
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  color: rgba(15,27,45,0.55);
  font-weight: 500;
  position: relative;
}
.bracket-bar__seg + .bracket-bar__seg::before {
  content: ''; position: absolute; left: 0; top: 4px; bottom: 4px;
  border-left: 1px dashed rgba(255,255,255,0.5);
}
.bracket-bar__seg--3  { background: #DBEFE3; color: var(--positive); }
.bracket-bar__seg--9  { background: #FFF3CB; color: #6B5223; }
.bracket-bar__seg--18 { background: #F5DAB3; color: #8B5A22; }
.bracket-bar__seg--27 { background: #F5C5C0; color: var(--negative); }
.bracket-bar__marker {
  position: absolute; top: -6px; bottom: -6px;
  width: 3px; background: var(--ink);
  border-radius: 2px;
}
.bracket-bar__marker::after {
  content: attr(data-label);
  position: absolute; bottom: -22px; left: 50%;
  transform: translateX(-50%);
  font-size: 11px; font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.bracket-legend {
  display: flex; gap: var(--space-4);
  font-size: 11px; color: var(--slate-600);
  margin-top: var(--space-5);
}
.bracket-legend__row { display: flex; align-items: center; gap: 6px; }
.bracket-legend__dot {
  width: 10px; height: 4px; border-radius: 2px;
}

/* Slider */
.slider-row {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: var(--space-4);
  align-items: center;
}

.slider {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: var(--slate-200);
  border-radius: 4px;
  outline: none;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
  border: 3px solid var(--card);
  box-shadow: 0 1px 4px rgba(15,27,45,0.20);
}
.slider::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
  border: 3px solid var(--card);
  box-shadow: 0 1px 4px rgba(15,27,45,0.20);
}

/* Vruchtgebruik calc */
.vg-calc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}

.vg-split {
  display: flex;
  height: 60px;
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: var(--space-3);
}
.vg-split__seg {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 0 var(--space-3);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
}
.vg-split__seg .big {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.vg-split__seg--vg { background: var(--gold); }
.vg-split__seg--be { background: var(--ink-2); }

/* ============================================================================
   Login + invite acceptance
   ============================================================================ */

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  background: var(--paper);
  padding: var(--space-6);
  align-items: center;
  justify-items: center;
}

.login-card {
  background: var(--card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 440px;
  padding: var(--space-10) var(--space-10);
  text-align: center;
}

.login-card__mark {
  width: 64px; height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 100%);
  margin: 0 auto var(--space-5);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 28px;
  color: var(--gold-light);
}

.login-card h1 {
  font-size: 26px;
  letter-spacing: -0.015em;
  margin-bottom: var(--space-2);
}

.login-card__sub {
  font-size: 13px;
  color: var(--slate-500);
  margin-bottom: var(--space-6);
  line-height: 1.5;
}

.login-card__email {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  background: var(--slate-100);
  border-radius: 999px;
  font-size: 12px;
  color: var(--slate-600);
  font-family: var(--font-mono);
  margin-bottom: var(--space-6);
}
.login-card__email svg { width: 12px; height: 12px; }
.login-card__email a {
  font-family: var(--font-sans);
  color: var(--teal);
  font-size: 11px;
  margin-left: 4px;
}

.passkey-btn {
  width: 100%;
  display: flex; align-items: center; justify-content: center;
  gap: 12px;
  padding: 18px var(--space-6);
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  transition: background var(--t-fast), transform var(--t-fast);
  margin-bottom: var(--space-4);
}
.passkey-btn:hover { background: var(--ink-2); }
.passkey-btn:active { transform: scale(0.99); }
.passkey-btn .icon { width: 22px; height: 22px; color: var(--gold-light); }

.passkey-btn__sub {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.7;
}

.divider {
  display: flex; align-items: center; gap: var(--space-3);
  margin: var(--space-5) 0;
  font-size: 11px;
  color: var(--slate-400);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}

.alt-method {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px var(--space-5);
  background: transparent;
  color: var(--slate-700);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.alt-method:hover { border-color: var(--line-strong); background: var(--slate-100); }
.alt-method svg { width: 16px; height: 16px; color: var(--slate-500); }

.login-help {
  margin-top: var(--space-6);
  font-size: 12px;
  color: var(--slate-500);
  text-align: center;
}
.login-help a { color: var(--teal); }

/* OS-style biometric prompt overlay */
.biometric-overlay {
  position: fixed; inset: 0;
  background: rgba(15,27,45,0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  animation: fadeIn 200ms ease;
}
.biometric-overlay[hidden] { display: none; }

.biometric-prompt {
  background: linear-gradient(180deg, #FFFFFF 0%, #F1F2F5 100%);
  border-radius: 14px;
  width: 100%; max-width: 360px;
  padding: 36px 28px 24px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(15,27,45,0.30);
  border: 1px solid rgba(255,255,255,0.7);
  animation: slideUp 220ms ease;
}

.biometric-prompt__app {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 11px;
  color: var(--slate-500);
  margin-bottom: 18px;
}
.biometric-prompt__app .mark {
  width: 14px; height: 14px; border-radius: 3px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--ink); font-weight: 700; font-family: var(--font-display);
  font-size: 10px;
  display: flex; align-items: center; justify-content: center;
}

.biometric-prompt__title {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 6px;
}

.biometric-prompt__sub {
  font-size: 12px;
  color: var(--slate-600);
  margin-bottom: 28px;
}

.biometric-prompt__icon {
  width: 86px; height: 86px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(176,141,63,0.15) 0%, rgba(176,141,63,0) 70%);
  display: flex; align-items: center; justify-content: center;
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.85; }
}
.biometric-prompt__icon svg {
  width: 48px; height: 48px;
  color: var(--gold);
}

.biometric-prompt__actions {
  display: flex;
  border-top: 1px solid var(--line);
  margin: 0 -28px -24px;
}
.biometric-prompt__actions button {
  flex: 1;
  padding: 12px;
  background: transparent;
  border: none;
  font: inherit;
  font-size: 13px;
  color: var(--info);
  cursor: pointer;
  transition: background var(--t-fast);
}
.biometric-prompt__actions button:hover { background: rgba(43,87,151,0.06); }
.biometric-prompt__actions button + button {
  border-left: 1px solid var(--line);
  font-weight: 500;
}

/* Invite acceptance */
.invite-hero {
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 100%);
  color: #fff;
  padding: var(--space-8);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-6);
  text-align: center;
}
.invite-hero__from {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  margin-bottom: 12px;
}
.invite-hero__name {
  font-family: var(--font-display);
  font-size: 28px;
  margin-bottom: 8px;
}
.invite-hero__sub {
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  line-height: 1.5;
  max-width: 460px;
  margin: 0 auto;
}

.role-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px;
  background: rgba(176,141,63,0.18);
  border: 1px solid rgba(176,141,63,0.40);
  color: var(--gold-light);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  margin-top: 16px;
}
.role-badge svg { width: 12px; height: 12px; }

/* ============================================================================
   Scenario wizards
   ============================================================================ */

.wizard-steps {
  display: flex; align-items: center;
  margin-bottom: var(--space-8);
}
.wizard-step {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px;
  color: var(--slate-500);
  flex: 1;
}
.wizard-step__num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--slate-200);
  color: var(--slate-500);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}
.wizard-step__connector {
  flex: 1;
  height: 1px;
  background: var(--slate-200);
  margin: 0 var(--space-3);
}
.wizard-step[data-active="true"] .wizard-step__num {
  background: var(--gold);
  color: #fff;
}
.wizard-step[data-active="true"] {
  color: var(--ink);
  font-weight: 500;
}
.wizard-step[data-done="true"] .wizard-step__num {
  background: var(--positive);
  color: #fff;
}

/* Section blocks within scenarios */
.scenario-section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-5);
}
.scenario-section__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-700);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

/* Liquid asset picker (Buy Real Estate) */
.liquid-picker-row {
  display: grid;
  grid-template-columns: 32px 1fr 100px 90px 130px;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  align-items: center;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.liquid-picker-row:last-child { border-bottom: none; }

.liquid-picker-row input[type="checkbox"] {
  width: 18px; height: 18px; cursor: pointer; accent-color: var(--gold);
}

.liquid-picker-row .asset-info { display: flex; flex-direction: column; gap: 2px; }
.liquid-picker-row .asset-info strong { font-size: 13px; color: var(--ink); font-weight: 500; }
.liquid-picker-row .asset-info span { font-size: 11px; color: var(--slate-500); }

.liquid-picker-row .pip-strip {
  display: inline-flex; gap: 2px;
}
.liquid-picker-row .pip {
  width: 5px; height: 10px; border-radius: 1px;
  background: var(--slate-200);
}
.liquid-picker-row .pip[data-on="true"] { background: var(--teal); }

.liquid-picker-row .available {
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--slate-700);
  font-size: 12px;
}

.liquid-picker-row .use-input {
  display: flex;
  align-items: center;
}
.liquid-picker-row .use-input input {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-align: right;
  font-family: inherit;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.progress-bar {
  height: 8px;
  border-radius: 4px;
  background: var(--slate-100);
  overflow: hidden;
  margin-top: var(--space-3);
}
.progress-bar__fill {
  height: 100%;
  background: var(--gold);
  transition: width var(--t-base);
}
.progress-bar--success .progress-bar__fill { background: var(--positive); }

/* Comparison columns (Swap) */
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-6);
}
.comparison-col {
  background: var(--card);
  padding: var(--space-6);
}
.comparison-col + .comparison-col {
  border-left: 1px solid var(--line);
}
.comparison-col__head {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--line);
}
.comparison-col__icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--slate-100);
  color: var(--slate-600);
  display: flex; align-items: center; justify-content: center;
}
.comparison-col__icon svg { width: 18px; height: 18px; }
.comparison-col__title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
}
.comparison-col__sub {
  font-size: 12px;
  color: var(--slate-500);
}
.comparison-col--baseline .comparison-col__icon { background: var(--info-tint); color: var(--info); }
.comparison-col--swap .comparison-col__icon { background: var(--gold-tint); color: var(--gold); }

.comparison-rows {
  display: flex; flex-direction: column;
  gap: var(--space-4);
}
.comparison-row__label {
  font-size: 11px;
  color: var(--slate-500);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 4px;
}
.comparison-row__value {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.comparison-row__sub {
  font-size: 12px;
  color: var(--slate-500);
  margin-top: 2px;
}

/* Net trade-off banner */
.tradeoff-banner {
  margin-top: var(--space-6);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  text-align: left;
}
.tradeoff-banner--win {
  background: linear-gradient(90deg, var(--positive-tint) 0%, #E8F4ED 100%);
  border: 1px solid #BFE0CB;
}
.tradeoff-banner--lose {
  background: linear-gradient(90deg, var(--negative-tint) 0%, #F8E3E0 100%);
  border: 1px solid #EFC4BF;
}
.tradeoff-banner__icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tradeoff-banner__icon svg { width: 22px; height: 22px; }
.tradeoff-banner--win .tradeoff-banner__icon svg { color: var(--positive); }
.tradeoff-banner--lose .tradeoff-banner__icon svg { color: var(--negative); }
.tradeoff-banner__text {
  flex: 1;
  font-size: 13px;
  color: var(--slate-700);
  line-height: 1.55;
}
.tradeoff-banner__text strong {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 4px;
}

/* Risk-step schedule (Investment plan) */
.risk-step-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 32px;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.risk-step-row:last-child { border-bottom: none; }
.risk-step-row label { font-size: 11px; color: var(--slate-500); display: block; margin-bottom: 2px; }
.risk-step-row .risk-value {
  display: flex; align-items: center; gap: 8px;
}
.risk-step-row .risk-pip {
  display: inline-block;
  width: 18px; height: 18px;
  border-radius: 4px;
  text-align: center; line-height: 18px;
  font-size: 11px; font-weight: 600;
  color: #fff;
}

.risk-1, .risk-2 { background: #2E7D32; }
.risk-3, .risk-4 { background: #B7791F; }
.risk-5, .risk-6, .risk-7 { background: #B5413A; }

/* Import wizard */
.import-dropzone {
  border: 2px dashed var(--slate-300);
  border-radius: var(--radius-lg);
  background: var(--card);
  padding: var(--space-12);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--t-base), background var(--t-base);
}
.import-dropzone:hover {
  border-color: var(--gold);
  background: var(--gold-tint);
}
.import-dropzone__icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--slate-100);
  color: var(--slate-500);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--space-4);
}
.import-dropzone__icon svg { width: 26px; height: 26px; }
.import-dropzone:hover .import-dropzone__icon {
  background: var(--gold);
  color: #fff;
}
.import-dropzone__title {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 8px;
}
.import-dropzone__sub {
  font-size: 13px;
  color: var(--slate-500);
  line-height: 1.5;
}

.import-analyzing {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-12);
  text-align: center;
}
.import-analyzing__spinner {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  margin: 0 auto var(--space-5);
  display: flex; align-items: center; justify-content: center;
  animation: spinner 2s ease-in-out infinite;
}
.import-analyzing__spinner svg {
  width: 26px; height: 26px;
  color: var(--ink);
}
@keyframes spinner {
  0%, 100% { transform: rotate(0); }
  50% { transform: rotate(180deg); }
}

.import-step-log {
  text-align: left;
  max-width: 480px;
  margin: var(--space-6) auto 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--slate-600);
  background: var(--paper);
  border-radius: var(--radius);
  padding: var(--space-4);
}
.import-step-log .step {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 0;
  opacity: 0.5;
}
.import-step-log .step[data-done="true"] { opacity: 1; color: var(--positive); }
.import-step-log .step[data-active="true"] { opacity: 1; color: var(--ink); font-weight: 500; }
.import-step-log .step svg { width: 12px; height: 12px; }

/* Import review cards */
.review-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.review-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  position: relative;
  cursor: pointer;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.review-card:hover {
  border-color: var(--gold-light);
  box-shadow: var(--shadow);
}
.review-card[data-confirmed="true"] {
  border-color: var(--positive);
  background: var(--positive-tint);
}

.review-card__status {
  position: absolute; top: 14px; right: 14px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--slate-200);
  color: var(--slate-500);
  display: flex; align-items: center; justify-content: center;
}
.review-card[data-confirmed="true"] .review-card__status {
  background: var(--positive);
  color: #fff;
}
.review-card__status svg { width: 12px; height: 12px; }

.review-card__head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: var(--space-3);
}
.review-card__icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--slate-100);
  color: var(--slate-600);
  display: flex; align-items: center; justify-content: center;
}
.review-card__icon svg { width: 16px; height: 16px; }
.review-card__name { font-weight: 600; font-size: 14px; color: var(--ink); }
.review-card__inst { font-size: 11px; color: var(--slate-500); }

.review-card__kv {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 12px;
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
}
.review-card__kv .label { color: var(--slate-500); }
.review-card__kv .value {
  color: var(--ink); font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.confidence-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.confidence-pill--high { background: var(--positive-tint); color: var(--positive); }
.confidence-pill--medium { background: var(--warn-tint); color: #6B5223; }
.confidence-pill--low { background: var(--negative-tint); color: var(--negative); }

/* Schedule table (amortization, pension contributions) */
.schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.schedule-table th {
  text-align: left;
  padding: 10px 16px;
  font-size: 11px; font-weight: 600;
  color: var(--slate-500);
  background: var(--paper);
  letter-spacing: 0.04em; text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}
.schedule-table th.num, .schedule-table td.num { text-align: right; }
.schedule-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.schedule-table tbody tr:nth-child(even) { background: var(--paper); }
.schedule-table tbody tr.past { opacity: 0.55; }
.schedule-table tbody tr.today td { font-weight: 600; }
.schedule-table .year-row {
  background: var(--ink);
  color: #fff;
  font-weight: 600;
}
.schedule-table .year-row td {
  padding: 8px 16px;
  font-size: 11px;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--gold-light);
  border-bottom: none;
}

/* ============================================================================
   Portfolio Risk (gauge + alerts + bucket distribution)
   ============================================================================ */

.risk-overview {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

.risk-gauge-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-align: center;
}

.risk-gauge {
  position: relative;
  width: 220px; height: 110px;
  margin: 0 auto var(--space-4);
}
.risk-gauge svg { width: 100%; height: 100%; overflow: visible; }
.risk-gauge__readout {
  position: absolute;
  top: 70px; left: 50%;
  transform: translateX(-50%);
  text-align: center;
}
.risk-gauge__value {
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.risk-gauge__label {
  font-size: 11px;
  color: var(--slate-500);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 4px;
}

.risk-bucket-bar {
  height: 36px;
  border-radius: var(--radius);
  background: var(--slate-100);
  overflow: hidden;
  display: flex;
  margin-bottom: var(--space-3);
}
.risk-bucket-bar__seg {
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 500;
  color: #fff;
}
.risk-bucket-bar__seg--cons   { background: #2E7D32; }
.risk-bucket-bar__seg--bal    { background: #B7791F; }
.risk-bucket-bar__seg--agg    { background: #B5413A; }
.risk-bucket-bar__seg--unrated { background: var(--slate-400); }

.alert-list {
  display: flex; flex-direction: column;
  gap: var(--space-3);
}
.alert-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-4);
  display: flex; gap: var(--space-3);
  align-items: start;
}
.alert-item--warn  { border-left: 3px solid var(--warn); }
.alert-item--neg   { border-left: 3px solid var(--negative); }
.alert-item--ok    { border-left: 3px solid var(--positive); }
.alert-item__icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.alert-item--warn .alert-item__icon { background: var(--warn-tint); color: #6B5223; }
.alert-item--neg .alert-item__icon { background: var(--negative-tint); color: var(--negative); }
.alert-item--ok .alert-item__icon { background: var(--positive-tint); color: var(--positive); }
.alert-item__icon svg { width: 16px; height: 16px; }
.alert-item__body { flex: 1; min-width: 0; }
.alert-item__title { font-weight: 600; font-size: 13px; color: var(--ink); margin-bottom: 2px; }
.alert-item__sub { font-size: 12px; color: var(--slate-600); line-height: 1.45; }
.alert-item__pct {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.ai-narrative {
  background: linear-gradient(180deg, var(--card) 0%, var(--gold-tint) 100%);
  border: 1px solid var(--gold-light);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
}
.ai-narrative__title {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}
.ai-narrative__title svg { width: 14px; height: 14px; }
.ai-narrative__text {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.65;
  max-width: 760px;
}
.ai-narrative__text strong { color: var(--ink); font-weight: 600; }

/* ============================================================================
   Scan page
   ============================================================================ */

.scan-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: var(--space-6);
}

.scan-viewfinder {
  background: var(--ink);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  min-height: 460px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.scan-viewfinder__placeholder {
  text-align: center;
  padding: var(--space-8);
}
.scan-viewfinder__icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--space-5);
}
.scan-viewfinder__icon svg { width: 36px; height: 36px; color: rgba(255,255,255,0.7); }
.scan-viewfinder__title {
  font-family: var(--font-display);
  font-size: 22px;
  margin-bottom: 8px;
}
.scan-viewfinder__sub {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  margin-bottom: var(--space-6);
  line-height: 1.5;
}

/* Crosshair overlay corners */
.scan-corners {
  position: absolute;
  inset: var(--space-6);
  pointer-events: none;
  border: 1px dashed rgba(255,255,255,0.15);
}
.scan-corners::before, .scan-corners::after,
.scan-corners > span::before, .scan-corners > span::after {
  content: '';
  position: absolute;
  width: 28px; height: 28px;
  border: 2px solid var(--gold);
}
.scan-corners::before { top: -2px; left: -2px; border-right: none; border-bottom: none; }
.scan-corners::after  { top: -2px; right: -2px; border-left: none; border-bottom: none; }
.scan-corners > span::before { bottom: -2px; left: -2px; border-right: none; border-top: none; }
.scan-corners > span::after  { bottom: -2px; right: -2px; border-left: none; border-top: none; }

/* Recognition card */
.recognition-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
}
.recognition-card__head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: var(--space-3);
}
.recognition-card__confidence {
  margin-left: auto;
}
.recognition-card__match {
  display: flex; flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: var(--paper);
  border-radius: var(--radius);
  font-size: 12px;
}
.recognition-card__match .label {
  font-size: 10px;
  color: var(--slate-500);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
}
.recognition-card__match .name {
  display: flex; justify-content: space-between;
  color: var(--ink); font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.recognition-card__actions {
  display: flex; gap: 6px;
  margin-top: var(--space-3);
}
.recognition-card__actions button { flex: 1; }

/* ============================================================================
   Bulk update
   ============================================================================ */

.bulk-group {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
  overflow: hidden;
}

.bulk-group__head {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.bulk-group__logo {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--gold-light);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}
.bulk-group__name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
}
.bulk-group__sub {
  font-size: 12px; color: var(--slate-500);
  margin-top: 2px;
}
.bulk-group__total {
  margin-left: auto;
  text-align: right;
}
.bulk-group__total .num {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.bulk-group__total .lbl {
  font-size: 11px; color: var(--slate-500);
  letter-spacing: 0.04em; text-transform: uppercase;
  font-weight: 600;
}

.bulk-row {
  display: grid;
  grid-template-columns: 1fr 140px 140px 80px;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-6);
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.bulk-row:last-child { border-bottom: none; }
.bulk-row__name { font-weight: 500; font-size: 13px; color: var(--ink); }
.bulk-row__sub { font-size: 11px; color: var(--slate-500); }
.bulk-row__current {
  font-size: 12px; color: var(--slate-500);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.bulk-row__new {
  display: flex; align-items: center;
}
.bulk-row__new input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: inherit; font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.bulk-row__new input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(176,141,63,0.15);
}
.bulk-row__delta {
  font-size: 12px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

/* ============================================================================
   Settings (tabbed)
   ============================================================================ */

.settings-tabs {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--space-6);
}
.settings-tabs__btn {
  padding: 12px var(--space-5);
  background: none; border: none;
  font: inherit; font-size: 13px; font-weight: 500;
  color: var(--slate-500); cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  display: flex; align-items: center; gap: 8px;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.settings-tabs__btn:hover { color: var(--ink); }
.settings-tabs__btn[data-active="true"] {
  color: var(--ink);
  border-bottom-color: var(--gold);
}
.settings-tabs__btn svg { width: 14px; height: 14px; }

.users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.users-table th {
  text-align: left; padding: 10px 16px;
  font-size: 11px; font-weight: 600;
  color: var(--slate-500);
  background: var(--paper);
  letter-spacing: 0.04em; text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}
.users-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.users-table .user-cell {
  display: flex; align-items: center; gap: 10px;
}
.users-table .user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--slate-100); color: var(--slate-700);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
}
.role-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px; font-weight: 500;
}
.role-pill--manager { background: var(--gold-tint); color: #6B5223; }
.role-pill--editor  { background: var(--info-tint); color: var(--info); }
.role-pill--viewer  { background: var(--slate-100); color: var(--slate-600); }

.online-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
}
.online-dot--on  { background: var(--positive); box-shadow: 0 0 0 2px rgba(47,122,74,0.20); }
.online-dot--off { background: var(--slate-300); }

/* ============================================================================
   SuperAdmin
   ============================================================================ */

.health-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.health-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.health-card__head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: var(--space-3);
}
.health-card__label {
  font-size: 11px; color: var(--slate-500);
  letter-spacing: 0.04em; text-transform: uppercase;
  font-weight: 600;
}
.health-card__value {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.health-card__sub {
  font-size: 12px; color: var(--slate-500);
  margin-top: 2px;
}

.usage-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--slate-100);
  margin-top: var(--space-3);
  overflow: hidden;
}
.usage-bar__fill { height: 100%; transition: width var(--t-base); }
.usage-bar__fill--ok    { background: var(--positive); }
.usage-bar__fill--warn  { background: var(--warn); }
.usage-bar__fill--neg   { background: var(--negative); }

.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px; font-weight: 500;
}
.status-pill--ok    { background: var(--positive-tint); color: var(--positive); }
.status-pill--warn  { background: var(--warn-tint); color: #6B5223; }
.status-pill--neg   { background: var(--negative-tint); color: var(--negative); }
.status-pill__dot {
  width: 6px; height: 6px; border-radius: 50%;
}
.status-pill--ok .status-pill__dot { background: var(--positive); }
.status-pill--warn .status-pill__dot { background: var(--warn); }
.status-pill--neg .status-pill__dot { background: var(--negative); }

/* ============================================================================
   Mobile guard
   ============================================================================ */

@media (max-width: 900px) {
  .sidebar { padding: 0 var(--space-3); gap: var(--space-3); overflow-x: auto; }
  .sidebar__nav .sidebar__link span:not(.sidebar__link-badge) { display: none; }
  .topbar__lang { display: none; }
  .main { padding: var(--space-4); }
  .kpi-row, .capital-panel, .donut-row { grid-template-columns: 1fr 1fr; }
  .free-card { grid-template-columns: 1fr; padding: var(--space-6); }
  .free-card__value { font-size: 36px; }
  .onboarding { grid-template-columns: 1fr; }
  .onboarding__panel { padding: var(--space-6); }
  .onboarding__form { padding: var(--space-6); }
  .mode-picker { grid-template-columns: 1fr; }
  .indicators { grid-template-columns: repeat(2, 1fr); }
  .asset-detail-header { flex-direction: column; align-items: stretch; }
  .asset-detail-header__actions { flex-wrap: wrap; }
  .estate-grid, .vg-calc { grid-template-columns: 1fr; }
  .mode-switch-toggle { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .comparison-grid { grid-template-columns: 1fr; }
  .comparison-col + .comparison-col { border-left: none; border-top: 1px solid var(--line); }
  .review-grid { grid-template-columns: 1fr; }
  .wizard-steps { flex-wrap: wrap; }
  .risk-overview, .scan-grid { grid-template-columns: 1fr; }
  .health-cards { grid-template-columns: 1fr 1fr; }
  .bulk-row { grid-template-columns: 1fr; }
  .settings-tabs { overflow-x: auto; }
}
