/* ==========================================================================
   Dashboard-thema (2026-10-30, naar Ronas IT "Portify" op Dribbble): een warm
   perzik-crème verloop als doek, witte kaarten met een zachte rand, een lichte
   zwevende balk met een zwarte pil voor het actieve tabblad. Laadt na style.css
   en overschrijft alleen kleuren, ronding en de nieuwe dashboardblokken.
   ========================================================================== */
:root {
  --bg: #fbf3ea;
  --panel: #fffdfa;
  --text: #17130f;
  --muted: #8a8178;
  --border: #f0e6db;
  --ink: #17130f;
  --accent: #1f9d55;
  --green: #1f9d55;
  --red: #e0453a;
  --radius: 22px;
  --card: rgba(255, 253, 250, 0.82);
  --card-edge: rgba(255, 255, 255, 0.9);
  --dash-muted-fill: #e3d9cf;
  --shadow-sm: 0 1px 2px rgba(80, 50, 20, 0.04), 0 8px 24px rgba(120, 70, 30, 0.05);
  --shadow-md: 0 12px 32px rgba(120, 70, 30, 0.1);
  --wash: radial-gradient(1200px 700px at 0% 0%, #f9d6c4 0%, transparent 60%),
          radial-gradient(1000px 700px at 100% 10%, #fbe5bf 0%, transparent 55%),
          linear-gradient(160deg, #fbe7dc 0%, #fbf3ea 45%, #f8f1e6 100%);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15110e;
    --panel: #1f1a16;
    --text: #f3ece4;
    --muted: #a39789;
    --border: #2e2722;
    --ink: #f3ece4;
    --accent: #4fd17f;
    --green: #4fd17f;
    --red: #f26a5f;
    --card: rgba(36, 30, 25, 0.82);
    --card-edge: rgba(255, 255, 255, 0.05);
    --dash-muted-fill: #4a4038;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.4);
    --wash: radial-gradient(1100px 700px at 0% 0%, #3a2318 0%, transparent 60%),
            radial-gradient(900px 600px at 100% 10%, #3a2e17 0%, transparent 55%),
            linear-gradient(160deg, #1d1510 0%, #15110e 60%);
  }
}

body {
  background: var(--wash) fixed, var(--bg);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.page, .topbar-inner { max-width: 1320px; }

/* --- Kaarten ------------------------------------------------------------ */
.card, .chart-box, .insight, .exemption, table, .banner, .payday-banner, .dash-card, .kpi {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
}

/* --- Bovenbalk: licht en zwevend, actieve tab als zwarte pil -------------- */
.topbar { background: transparent; padding: 0.9rem 1rem 0; }
.topbar-inner {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--card-edge);
  box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  border-radius: 22px;
  height: 64px;
}
.brand { color: var(--text); }
.built-at, .value-pill-main small, .value-pill-sub { color: var(--muted); }
.value-pill { background: var(--bg); border: 1px solid var(--border); }
.value-pill-main { color: var(--text); }
#syncButton { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
#syncButton:hover:not(:disabled) { color: var(--text); }

@media (min-width: 681px) {
  .tabs { margin-inline: auto; background: var(--bg); border-radius: 999px; padding: 4px; gap: 2px; border: 1px solid var(--border); }
  .tab-btn { color: var(--muted); }
  .tab-btn:hover:not(.active) { color: var(--text); background: color-mix(in srgb, var(--text) 6%, transparent); }
  .tab-btn.active { background: var(--ink); color: var(--panel); }
}

/* --- Koppen ---------------------------------------------------------------- */
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 2rem 0 0.8rem; }
.dash-head h2 { margin: 0; font-size: 1.05rem; }
#tab-overview > .dash-events .dash-head { margin-top: 0.5rem; }
.dash-card .dash-head { margin: 0 0 1rem; }
.dash-link { background: none; border: 0; color: var(--muted); font: inherit; font-size: 0.8rem; cursor: pointer; padding: 0.2rem 0; }
.dash-link:hover { color: var(--text); }
.up { color: var(--green); }
.down { color: var(--red); }

/* --- Logo's en lettertegels ------------------------------------------------ */
.ev-logo, .tile-logo, .tx-logo, .next-logo, .dash-logo {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; object-fit: contain; background: #fff;
}
.is-letter {
  display: inline-flex; align-items: center; justify-content: center;
  background: hsl(var(--hue) 70% 90%); color: hsl(var(--hue) 55% 32%);
  font-weight: 700; font-size: 0.9rem;
}
.is-letter[hidden], img[hidden] { display: none; }
@media (prefers-color-scheme: dark) { .is-letter { background: hsl(var(--hue) 35% 24%); color: hsl(var(--hue) 70% 80%); } }

/* --- Komt eraan: horizontale strook ---------------------------------------- */
.dash-events-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(190px, 1fr);
  gap: 0.75rem; overflow-x: auto; padding-bottom: 0.4rem; scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.ev-card {
  all: unset; box-sizing: border-box; cursor: pointer; scroll-snap-align: start;
  display: flex; flex-direction: column; gap: 0.35rem; padding: 0.9rem 1rem;
  background: var(--card); border: 1px solid var(--card-edge); border-radius: 18px; box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
}
.ev-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.ev-card:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.ev-top { display: flex; align-items: center; gap: 0.55rem; }
.ev-top .ev-logo { width: 26px; height: 26px; border-radius: 8px; font-size: 0.75rem; }
.ev-top b { font-size: 0.9rem; }
.ev-date { margin-left: auto; font-size: 0.75rem; color: var(--muted); white-space: nowrap; }
.ev-kind { font-size: 0.75rem; color: var(--muted); }
.ev-amt { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ev-amt small { display: block; font-size: 0.72rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.ev-when { font-size: 0.72rem; font-weight: 600; color: var(--accent); }
.ev-card.is-ex .ev-amt { font-size: 0.85rem; font-weight: 500; color: var(--muted); }
.ev-card.is-ex .ev-when { color: #c47a12; }
.ev-card.is-ex { border-style: dashed; border-color: color-mix(in srgb, var(--muted) 35%, transparent); }

/* --- Raster: hoofdkolom en zijkolom ---------------------------------------- */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.25rem; align-items: start; }
.dash-side { display: flex; flex-direction: column; gap: 1.25rem; margin-top: calc(2rem + 1.6rem); }
.dash-card { padding: 1.25rem 1.35rem; }
@media (max-width: 1020px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .dash-side { margin-top: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}

/* --- KPI-kaarten ---------------------------------------------------------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; }
.kpi { display: flex; flex-direction: column; gap: 0.3rem; padding: 1rem 1.15rem; min-width: 0; }
.kpi-label { font-size: 0.8rem; color: var(--muted); }
.kpi-value { font-size: 1.65rem; font-weight: 700; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi-value small { font-size: 0.8rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.kpi-sub { font-size: 0.76rem; color: var(--muted); }
.kpi-sub b { font-weight: 600; }
@media (max-width: 860px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* --- De grafiekkaart: de cijfers staan nu in de KPI's erboven ---------------- */
.dash-curve { margin-top: 1.25rem; padding: 1.25rem 1.35rem 1rem; }
.dash-curve > h2 { margin: 0 0 0.75rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.dash-curve > h2 .money-mode { margin-left: auto; }
.dash-curve .chart-box { background: none; border: 0; box-shadow: none; padding: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
.dash-curve .curve-totals { display: none; }
.money-mode { background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.money-mode button, .dash-switch button {
  background: transparent; color: var(--muted); border: 0; border-radius: 999px;
  padding: 0.3rem 0.7rem; font-size: 0.75rem; cursor: pointer;
}
.money-mode button.is-active, .dash-switch button.is-active { background: var(--ink); color: var(--panel); }
.goal-bar span { background: var(--green); }
.curve-swatch { background: var(--green); }

/* --- Positietegels -------------------------------------------------------- */
.pos-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.75rem; }
.pos-tile {
  all: unset; box-sizing: border-box; cursor: pointer; min-width: 0;
  display: flex; flex-direction: column; gap: 0.4rem; padding: 1rem 1.05rem;
  background: var(--card); border: 1px solid var(--card-edge); border-radius: 20px; box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
}
.pos-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.pos-tile:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.tile-top { display: flex; align-items: center; gap: 0.6rem; min-width: 0; margin-bottom: 0.35rem; }
.tile-id { display: flex; flex-direction: column; min-width: 0; }
.tile-id b { font-size: 0.92rem; display: flex; align-items: center; gap: 0.35rem; }
.tile-id small { font-size: 0.72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-flag { width: 7px; height: 7px; border-radius: 50%; background: #e3a21a; display: inline-block; }
.tile-value { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.tile-value small { font-size: 0.72rem; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.tile-ret { font-size: 0.78rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.tile-inc { display: flex; flex-direction: column; gap: 0.3rem; margin-top: 0.35rem; }
.tile-inc small { font-size: 0.72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tile-inc-bar { height: 6px; border-radius: 99px; background: color-mix(in srgb, var(--muted) 15%, transparent); overflow: hidden; }
.tile-inc-bar i { display: block; height: 100%; border-radius: 99px; background: hsl(var(--hue) 65% 58%); }

/* --- Volgende betaling: de enige donkere kaart ------------------------------ */
.dash-next { background: #17130f; color: #fbf3ea; border-color: #17130f; display: flex; flex-direction: column; gap: 0.6rem; }
@media (prefers-color-scheme: dark) { .dash-next { background: #f3ece4; color: #17130f; border-color: #f3ece4; } }
.next-label { font-size: 0.78rem; opacity: 0.65; }
.next-body { display: flex; align-items: center; gap: 0.7rem; cursor: pointer; }
.next-body b { display: block; font-size: 1rem; }
.next-body span { font-size: 0.75rem; opacity: 0.65; }
.next-logo { width: 40px; height: 40px; border-radius: 12px; }
.next-amt { font-size: 2rem; font-weight: 700; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.next-amt small { font-size: 0.85rem; opacity: 0.6; letter-spacing: 0; }
.next-when { font-size: 0.78rem; font-weight: 600; color: #7fe0a4; }
@media (prefers-color-scheme: dark) { .next-when { color: #1f9d55; } }

/* --- Verdeling: één balk ----------------------------------------------------- */
.dash-switch { display: inline-flex; background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.alloc-bar { display: flex; gap: 4px; height: 40px; margin-bottom: 1rem; }
.alloc-bar i { border-radius: 10px; min-width: 6px; }
.alloc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.alloc-list li { display: flex; align-items: center; gap: 0.55rem; font-size: 0.82rem; }
.alloc-list li[data-pos] { cursor: pointer; }
.alloc-list li > i { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.alloc-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alloc-name small { color: var(--muted); margin-left: 0.25rem; }
.alloc-val { font-variant-numeric: tabular-nums; font-weight: 600; }

/* --- Recent ontvangen --------------------------------------------------------- */
.tx-list { list-style: none; margin: 0; padding: 0; }
.tx-list li { display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0; border-top: 1px solid var(--border); cursor: pointer; }
.tx-list li:first-child { border-top: 0; padding-top: 0; }
.tx-id, .tx-amt { display: flex; flex-direction: column; min-width: 0; }
.tx-id { flex: 1; }
.tx-id b, .tx-amt b { font-size: 0.88rem; }
.tx-id small, .tx-amt small { font-size: 0.72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-amt { align-items: flex-end; font-variant-numeric: tabular-nums; }

/* --- Inzichten en kalender in dezelfde stijl ------------------------------------ */
.insights { gap: 0.75rem; }
.insight { border-radius: 18px; }
.cal-cell { border-radius: 12px; }

@media (max-width: 680px) {
  .topbar { padding: 0; }
  /* Geen blur hier: backdrop-filter maakt van de balk het kader voor de vaste
     tabbalk, die dan bovenaan plakt in plaats van onderaan. */
  .topbar-inner { border-radius: 0; border-width: 0 0 1px; height: auto; background: var(--panel); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .page { padding-inline: 16px; }
  .kpi-value { font-size: 1.35rem; }
  .dash-events-row { grid-auto-columns: 170px; }
  .pos-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-curve > h2 .money-mode { margin-left: 0; }
  /* Overzicht op de telefoon: korter, de volledige lijsten staan op hun eigen tab. */
  .kpis { gap: 0.6rem; }
  .kpi { padding: 0.8rem 0.9rem; gap: 0.15rem; }
  .kpi-sub { font-size: 0.72rem; }
  .dash-events-row { grid-auto-columns: 150px; gap: 0.6rem; }
  .ev-card { padding: 0.75rem 0.85rem; border-radius: 16px; gap: 0.25rem; }
  .pos-tiles { gap: 0.6rem; }
  .pos-tiles > :nth-child(n+7) { display: none; }
  .pos-tile { padding: 0.8rem 0.85rem; gap: 0.25rem; border-radius: 16px; }
  .tile-top { margin-bottom: 0.15rem; }
  .tile-value { font-size: 1.1rem; }
  .tile-inc { margin-top: 0.2rem; }
  .next-amt { font-size: 1.6rem; }
  .tx-list li:nth-child(n+5) { display: none; }
}

/* --- Uitgeklapte positie: drie kaarten ---------------------------------------- */
.holding-detail > td { padding: 0.5rem 1rem 1.25rem !important; background: color-mix(in srgb, var(--bg) 60%, transparent); }
.hd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 0.75rem; align-items: start; }
.hd-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 16px;
  padding: 1rem 1.1rem; min-width: 0; display: block;
}
.hd-card h3 { margin: 0 0 0.6rem; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.hd-card h3 small { font-weight: 500; margin-left: 0.3rem; opacity: 0.7; }
.holding-market.hd-card span, .holding-market.hd-card b { margin: 0; }
.hd-big { margin: 0; font-size: 1.5rem; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--text); }
.hd-big small { font-size: 0.75rem; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.hd-sub { margin: 0.15rem 0 0.75rem; font-size: 0.8rem; color: var(--muted); }
.hd-list { margin: 0.25rem 0 0; display: flex; flex-direction: column; }
.hd-list > div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.42rem 0; border-top: 1px solid var(--border); font-size: 0.85rem; }
.hd-list > div:first-child { border-top: 0; }
.hd-list dt { color: var(--muted); }
.hd-list dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text); text-align: right; white-space: nowrap; }
.hd-list dd.is-text { font-weight: 500; white-space: normal; }
.hd-list dd small { color: inherit; opacity: 0.8; font-weight: 500; }
.hd-list .is-sub dt { padding-left: 0.8rem; font-size: 0.8rem; }
.hd-list .is-total { border-top: 1.5px solid var(--text); margin-top: 0.15rem; }
.hd-list .is-total dt { color: var(--text); font-weight: 600; }
.hd-list dd.positive, .hd-card .positive { color: var(--green); }
.hd-list dd.negative, .hd-card .negative { color: var(--red); }
.hd-shares { margin-top: 0.85rem; display: flex; flex-direction: column; gap: 0.55rem; }
.hd-shares > div { display: grid; grid-template-columns: 1fr auto; gap: 0.25rem 0.5rem; font-size: 0.8rem; }
.hd-shares span { color: var(--muted); }
.hd-shares b { font-variant-numeric: tabular-nums; }
.hd-shares i { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: color-mix(in srgb, var(--muted) 15%, transparent); overflow: hidden; }
.hd-shares em { display: block; height: 100%; border-radius: 99px; background: var(--green); }
.hd-shares em.is-cap { background: #c9a36a; }
.hd-card .risk-list { margin: 0 0 0.8rem; padding: 0.55rem 0.75rem; list-style: none; border-radius: 10px; font-size: 0.8rem; }
.hd-bars { display: flex; }
.hd-bars svg { width: 100%; height: 64px; }
.hd-legend { margin: 0.35rem 0 0.5rem; font-size: 0.72rem; color: var(--muted); display: flex; align-items: center; gap: 0.35rem; }
.hd-legend i { width: 8px; height: 8px; border-radius: 2px; background: var(--green); display: inline-block; }
.hd-legend i.is-down { background: var(--red); margin-left: 0.5rem; }
.hd-card .payment-history { width: 100%; min-width: 0; background: none; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; border-radius: 0; }
.hd-card .payment-history th { font-size: 0.7rem; padding: 0 0 0.4rem; }
.hd-card .payment-history td { padding: 0.42rem 0; font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.hd-card .payment-history td small { color: var(--muted); }
.hd-card .payment-history .num-cell, .hd-card .payment-history .amount-cell { text-align: right; }
.hd-dim { color: var(--muted); }

/* --- Posities als lijst --------------------------------------------------------- */
.is-hidden-table { display: none !important; }
#tab-holdings .table-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
#tab-holdings .table-controls .search-input { flex: 1 1 240px; }
.pos-list {
  margin-top: 1rem; background: var(--card); border: 1px solid var(--card-edge);
  border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden;
}
.pl-head, .pl-row {
  display: grid; grid-template-columns: minmax(180px, 2.2fr) 1fr 1fr 1.3fr 1fr;
  gap: 1rem; align-items: center; padding: 0.8rem 1.25rem;
}
.pl-head { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); border-bottom: 1px solid var(--border); padding-block: 0.7rem; }
.pl-head span:not(:first-child) { text-align: right; }
.pl-row { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: grid; grid-template-columns: minmax(180px, 2.2fr) 1fr 1fr 1.3fr 1fr; gap: 1rem; align-items: center; padding: 0.8rem 1.25rem; border-top: 1px solid var(--border); transition: background 0.12s; }
.pl-head + .pl-row { border-top: 0; }
.pl-row:hover { background: color-mix(in srgb, var(--text) 4%, transparent); }
.pl-row:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.pl-row.is-closed { opacity: 0.55; }
.pl-id { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.pl-id > span { display: flex; flex-direction: column; min-width: 0; }
.pl-id b { font-size: 0.92rem; display: flex; align-items: center; gap: 0.4rem; }
.pl-id small, .pl-num small, .pl-inc small { font-size: 0.74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-logo { width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; object-fit: contain; background: #fff; border: 1px solid var(--border); }
.pl-flag { font-style: normal; font-size: 0.65rem; font-weight: 700; width: 15px; height: 15px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #f6e2b8; color: #9a6a0c; }
.pl-num, .pl-inc > span { display: flex; flex-direction: column; align-items: flex-end; text-align: right; font-variant-numeric: tabular-nums; min-width: 0; }
.pl-num b, .pl-inc b { font-size: 0.92rem; font-weight: 600; }
.pl-inc { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.pl-inc i { height: 5px; border-radius: 99px; background: color-mix(in srgb, var(--muted) 15%, transparent); overflow: hidden; }
.pl-inc em { display: block; height: 100%; margin-left: auto; border-radius: 99px; background: hsl(var(--hue) 65% 58%); }
@media (max-width: 760px) {
  .pl-head { display: none; }
  /* Drie regels: symbool + waarde, naam + resultaat, inkomen over de volle breedte. */
  .pl-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "id val" "id ret" "inc inc"; gap: 0.1rem 0.75rem; padding: 0.7rem 1rem; }
  .pl-id { grid-area: id; } .pl-row > :nth-child(2) { grid-area: val; } .pl-row > :nth-child(3) { grid-area: ret; }
  .pl-row > .pl-num:not(.pl-next) small { display: none; }
  .pl-inc { grid-area: inc; flex-direction: row-reverse; align-items: center; gap: 0.6rem; margin-top: 0.45rem; }
  .pl-inc i { flex: 1; } .pl-inc em { margin-left: 0; }
  .pl-inc > span { flex-direction: row; align-items: baseline; gap: 0.4rem; text-align: left; }
  .pl-inc b { font-size: 0.8rem; }
  .pl-next { display: none; }
}
.pos-panel table { background: none; border: 0; box-shadow: none; border-radius: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }

/* --- Jaaroverzicht ------------------------------------------------------------------ */
.recap { margin-bottom: 2.5rem; }
#tab-history > .recap .dash-head { margin-top: 0.5rem; }
.recap-years { margin: 0; background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 3px; gap: 2px; }
.recap-years button { background: transparent; padding: 0.3rem 0.8rem; font-size: 0.8rem; }
.recap-years button[aria-selected="true"] { background: var(--ink); color: var(--panel); }
.recap-card { background: var(--card); border: 1px solid var(--card-edge); padding: 1.4rem 1.5rem; }
.rc-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; margin-bottom: 1.25rem; }
.rc-hero { display: flex; flex-direction: column; gap: 0.25rem; }
.rc-label { font-size: 0.8rem; color: var(--muted); }
.rc-big { font-size: 2.2rem; font-weight: 700; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.rc-big small { font-size: 0.9rem; color: var(--muted); letter-spacing: 0; font-weight: 600; }
.rc-big.is-soft { color: color-mix(in srgb, var(--text) 55%, transparent); }
.rc-sub { font-size: 0.8rem; color: var(--muted); }
.rc-progress { height: 6px; border-radius: 99px; background: color-mix(in srgb, var(--muted) 15%, transparent); overflow: hidden; margin-top: 0.3rem; }
.rc-progress i { display: block; height: 100%; background: var(--green); border-radius: 99px; }
.rc-chart { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; height: 150px; }
.rc-chart > span { display: flex; flex-direction: column; align-items: stretch; text-align: center; min-width: 0; }
.rc-val { font-style: normal; font-size: 0.68rem; color: var(--muted); height: 1rem; font-variant-numeric: tabular-nums; }
.rc-col { position: relative; flex: 1; display: flex; flex-direction: column-reverse; }
.rc-bar { display: block; background: var(--green); border-radius: 5px 5px 0 0; min-height: 2px; }
.rc-exp { display: block; border-radius: 5px 5px 0 0; background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--green) 45%, transparent) 0 2px, transparent 2px 5px); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--green) 50%, transparent); }
.rc-col .rc-exp + .rc-bar { border-radius: 0; }
.rc-prev { position: absolute; left: 12%; right: 12%; height: 2px; background: var(--text); opacity: 0.45; border-radius: 2px; z-index: 1; }
.rc-chart small { font-size: 0.68rem; color: var(--muted); margin-top: 4px; }
.rc-legend { display: flex; gap: 1rem; font-size: 0.72rem; color: var(--muted); margin: 0.6rem 0 0; }
.rc-legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.rc-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.rc-k-bar { background: var(--green); }
.rc-k-exp { background: repeating-linear-gradient(-45deg, var(--green) 0 2px, transparent 2px 4px); box-shadow: inset 0 0 0 1px var(--green); }
.rc-k-prev { height: 2px !important; background: var(--text); opacity: 0.45; }
.rc-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.rc-block h4 { margin: 0 0 0.75rem; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.rc-share { display: flex; gap: 3px; height: 14px; margin-bottom: 0.75rem; }
.rc-share i { border-radius: 4px; min-width: 4px; }
.rc-payers { list-style: none; margin: 0; padding: 0; }
.rc-payers li { display: grid; grid-template-columns: 10px auto minmax(0, 1fr) auto 2.6rem; gap: 0.5rem; align-items: center; padding: 0.42rem 0; border-top: 1px solid var(--border); font-size: 0.85rem; }
.rc-payers li:first-child { border-top: 0; }
.rc-payers li > i { width: 9px; height: 9px; border-radius: 50%; }
.rc-payers .muted { font-size: 0.78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-payers b { font-variant-numeric: tabular-nums; }
.rc-payers small { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.rc-block .hd-list dd small { color: var(--muted); font-weight: 500; margin-left: 0.2rem; }
.rc-new { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin: 0.75rem 0 0; font-size: 0.78rem; }
.rc-new > span:first-child { color: var(--muted); margin-right: 0.2rem; }
.rc-chip { background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 0.1rem 0.55rem; }

/* ==========================================================================
   Herindeling (2026-11-13): Overzicht met één hoofdcijfer, een agenda in de
   zijkolom, en pagina's binnen de lange tabbladen.
   ========================================================================== */

/* --- Overzicht: kolommen --------------------------------------------------- */
.ov { margin-top: 0.5rem; }
.ov .dash-main { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
.ov .dash-side { margin-top: 0; }
.ov .dash-main > section > .dash-head { margin-top: 0.5rem; }
.ov .dash-curve { margin: 0; }

/* --- Hoofdcijfer ------------------------------------------------------------ */
.ov-hero { display: flex; flex-direction: column; gap: 1.1rem; padding: 1.4rem 1.6rem 1.5rem; }
.ov-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.ov-label { margin: 0; font-size: 0.95rem; font-weight: 600; }
.ov-label .hint { margin-left: 0.3rem; }
.ov-hero .money-mode { margin: 0; }
.ov-hero-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 0.8fr); gap: 1.5rem 2.5rem; align-items: end; }
.ov-figure { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.ov-big { font-size: clamp(2.6rem, 5.2vw, 3.8rem); font-weight: 700; letter-spacing: -0.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.ov-big small { font-size: 0.32em; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.ov-sub { font-size: 0.86rem; color: var(--muted); line-height: 1.5; }
.ov-sub b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.ov-sub b.up { color: var(--green); }
.ov-hero .goal-strip { margin: 0; padding: 0; border: 0; }
.ov-hero .goal-head { font-size: 0.82rem; }
.ov-hero .goal-bar { height: 10px; margin: 0.5rem 0 0.4rem; }
.ov-hero .goal-sub { text-align: right; }
.ov-hero .bills { margin-top: 0.4rem; font-size: 0.8rem; }

/* Drie bijcijfers in plaats van vier gelijke tegels: het vierde is het hoofdcijfer. */
.ov .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* --- Agenda ---------------------------------------------------------------- */
.ag-list { list-style: none; margin: 0; padding: 0; }
.ag-list li + li { border-top: 1px solid var(--border); }
.ag-row { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: grid; grid-template-columns: 2.3rem 30px minmax(0, 1fr) auto; align-items: center; gap: 0.7rem; padding: 0.6rem 0; }
.ag-list li:first-child .ag-row { padding-top: 0; }
.ag-list li:last-child .ag-row { padding-bottom: 0; }
.ag-row:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 8px; }
.ag-row:hover .ag-id b { text-decoration: underline; }
.ag-date { display: flex; flex-direction: column; align-items: center; line-height: 1.05; }
.ag-date b { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.ag-date small { font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.ag-row .ev-logo { width: 30px; height: 30px; border-radius: 9px; }
.ag-id, .ag-amt { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.ag-id b { font-size: 0.9rem; }
.ag-id small, .ag-amt small { font-size: 0.73rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-amt { text-align: right; }
.ag-amt b { font-size: 0.9rem; font-variant-numeric: tabular-nums; color: var(--green); }
.ag-row.is-ex .ag-date b, .ag-row.is-ex .ag-id b { font-weight: 500; }
.ag-row.is-ex .ag-amt small { color: #c47a12; font-weight: 600; }

/* --- Grafiek: uitleg en filter achter een klik ----------------------------- */
.curve-help { margin-top: 0.6rem; font-size: 0.8rem; color: var(--muted); }
.curve-help summary { cursor: pointer; width: max-content; }
.curve-help summary:hover { color: var(--text); }
.curve-help .curve-note { margin-top: 0.5rem; }
.curve-box .curve-help .curve-note { display: block; }
.curve-legend-toggle { display: inline-flex; margin-top: 0.3rem; padding: 0.3rem 0.7rem; border: 1px solid var(--border); border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 0.75rem; cursor: pointer; }
.curve-legend-toggle:hover { color: var(--text); }
.curve-legend { display: none; }
.curve-legend.is-open { display: flex; }

/* --- Pagina's binnen een tabblad -------------------------------------------- */
.section-nav { gap: 0.4rem; padding: 0.6rem 0; margin-bottom: 0.4rem; background: transparent; }
.section-nav button { flex: none; border: 1px solid var(--border); background: var(--panel); color: var(--muted); font: inherit; font-size: 0.86rem; font-weight: 500; padding: 0.45rem 0.95rem; border-radius: 999px; cursor: pointer; white-space: nowrap; min-height: 36px; }
.section-nav button:hover { color: var(--text); }
.section-nav button.is-active { background: var(--ink); border-color: var(--ink); color: var(--panel); }
.section-nav button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.subpage > section:first-child > h2:first-child, .subpage > section:first-child > .section-head:first-child, .subpage > section:first-child > .dash-head:first-child { margin-top: 0.6rem; }
.subpage > .search-input:first-child { margin-top: 0.6rem; }

@media (max-width: 1020px) {
  /* Smal: beide kolommen lossen op in één rij, zodat de volgende betaling en de
     agenda vlak onder het hoofdcijfer komen en niet onder de grafiek. */
  .ov { display: flex; flex-direction: column; }
  .ov .dash-main, .ov .dash-side { display: contents; }
  .ov-hero { order: 1; } .ov .dash-next { order: 2; } .ov .kpis { order: 3; } .ov-agenda { order: 4; }
  .ov .dash-curve { order: 5; } .ov-insights { order: 6; } #dashAllocSection { order: 7; } #dashRecentSection { order: 8; }
}
@media (max-width: 680px) {
  .ov { gap: 0.9rem; }
  .ov-hero { padding: 1.1rem 1.1rem 1.2rem; gap: 0.9rem; }
  .ov-hero-body { grid-template-columns: minmax(0, 1fr); gap: 1.1rem; }
  .ov-label .hint { display: inline; }
  .ov .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
  .ov .kpi { padding: 0.7rem 0.75rem; }
  .ov .kpi-value { font-size: 1.05rem; }
  .ov .kpi-value small { display: none; }
  .ov .kpi-label { font-size: 0.7rem; }
  .ov .kpi-sub { font-size: 0.68rem; }
  .ov-insights .dash-head { margin: 0.4rem 0 0; }
  .section-nav { margin-inline: -16px; padding-inline: 16px; background: var(--bg); }
}
.ov-insights .dash-head { margin: 0.5rem 0 0.8rem; }
.ov-insights .insights { margin-top: 0; }
@media (max-width: 1020px) { .ov { align-items: stretch; } .ov > .dash-main > *, .ov > .dash-side > * { min-width: 0; } }

/* ==========================================================================
   Analyse (herbouwd 2026-11-13): antwoord eerst, onderbouwing eronder.
   ========================================================================== */
.an { display: flex; flex-direction: column; gap: 1.25rem; margin-top: 0.6rem; }
.an h2 { margin: 0; font-size: 1.05rem; }
.an h2 .hint { margin-left: 0.3rem; }
.an .up, .an-figure .up { color: var(--green); } .an .down { color: var(--red); }
.an-top { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.an-hero { display: flex; flex-direction: column; gap: 1.1rem; padding: 1.4rem 1.6rem 1.5rem; }
.an-hero-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 1.5rem 2.5rem; align-items: end; }
.an-figure { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.an-sum { display: flex; align-items: stretch; gap: 0.6rem; }
.an-part { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; padding: 0.7rem 0.85rem; border-radius: 14px; background: var(--bg); }
.an-part.is-total { background: transparent; box-shadow: inset 0 0 0 1.5px var(--border); }
.an-part-label { font-size: 0.75rem; color: var(--muted); }
.an-part b { font-size: 1.15rem; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.an-part small { font-size: 0.7rem; color: var(--muted); line-height: 1.3; }
.an-op { align-self: center; color: var(--muted); font-weight: 600; }
.an-verdict { margin: 0; padding-top: 0.9rem; border-top: 1px solid var(--border); font-size: 0.9rem; color: var(--muted); }
.an-verdict b, .an-compare p b, .an-payback p b, .an-facts b { color: var(--text); font-weight: 600; }

.an-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 1.25rem; }
.an-grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 1.25rem; align-items: start; }
.an-compare .dash-head { align-items: flex-start; }
.an-compare p { margin: 0.9rem 0 0; font-size: 0.82rem; line-height: 1.5; color: var(--muted); }
.an-pill { flex: none; font-size: 0.72rem; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: 999px; white-space: nowrap; }
.an-pill.is-win { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green); }
.an-pill.is-lose { background: var(--bg); color: var(--muted); }
.an-bars { display: flex; flex-direction: column; gap: 0.55rem; }
.an-bar-row { display: grid; grid-template-columns: 4.2rem minmax(0, 1fr) 4.6rem; align-items: center; gap: 0.7rem; font-size: 0.85rem; color: var(--muted); }
.an-bar-row b { text-align: right; font-variant-numeric: tabular-nums; color: var(--text); }
.an-bar-row.is-mine span:first-child { color: var(--text); font-weight: 600; }
.an-bar { display: block; height: 10px; border-radius: 999px; background: var(--bg); overflow: hidden; }
.an-bar i { display: block; height: 100%; border-radius: inherit; background: var(--dash-muted-fill); }
.an-bar-row.is-mine .an-bar i { background: var(--ink); }

.an-pay-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.an-pay-head b { font-size: 1.3rem; font-variant-numeric: tabular-nums; color: #c8901a; }
.an-pay-bar { height: 10px; margin: 0.7rem 0 0.6rem; border-radius: 999px; background: var(--bg); overflow: hidden; }
.an-pay-bar span { display: block; height: 100%; min-width: 4px; border-radius: inherit; background: #e0a52e; }
.an-payback p { margin: 0; font-size: 0.82rem; color: var(--muted); }

.an-legend { display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; font-size: 0.74rem; color: var(--muted); }
.an-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 0.35rem; }
.an-legend .is-up, .an-diverge .is-up { background: var(--green); }
.an-legend .is-down, .an-diverge .is-down { background: var(--red); }
.an-legend .is-div, .an-diverge .is-div { background: #e0a52e; }
.an-legend .is-income { background: var(--ink); } .an-legend .is-capital { background: var(--dash-muted-fill); }

.an-rows { list-style: none; margin: 0; padding: 0; }
.an-rows li + li { border-top: 1px solid var(--border); }
.an-row { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: grid; grid-template-columns: minmax(0, 13rem) minmax(0, 1fr) 6.5rem; align-items: center; gap: 1rem; padding: 0.6rem 0; position: relative; }
.an-row:hover .an-id b { text-decoration: underline; }
.an-row:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 8px; }
.an-row.is-closed { opacity: 0.55; }
.an-id { display: flex; align-items: center; gap: 0.65rem; min-width: 0; }
.an-id > span { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.an-id b { font-size: 0.9rem; }
.an-id small { font-size: 0.73rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.an-logo { width: 30px; height: 30px; border-radius: 9px; flex: none; object-fit: contain; background: #fff; }
.an-logo.is-letter { display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.8rem; background: hsl(var(--hue) 70% 92%); color: hsl(var(--hue) 55% 32%); }
.an-logo[hidden] { display: none; }
.an-num { display: flex; flex-direction: column; text-align: right; line-height: 1.3; }
.an-num b { font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.an-num small { font-size: 0.73rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.an-diverge { display: grid; grid-template-columns: 1fr 1fr; height: 12px; }
.an-neg, .an-pos { display: flex; gap: 1px; }
.an-neg { justify-content: flex-end; border-right: 1.5px solid var(--muted); }
.an-diverge i { display: block; height: 100%; min-width: 2px; }
.an-neg i { border-radius: 4px 0 0 4px; } .an-pos i:last-child { border-radius: 0 4px 4px 0; }
.an-pair { display: flex; flex-direction: column; gap: 4px; }
.an-pair .an-bar { height: 8px; background: transparent; }
.an-pair .is-income i { background: hsl(var(--hue) 62% 55%); }
.an-flag { position: absolute; left: 20px; top: 0.35rem; width: 15px; height: 15px; border-radius: 50%; background: #f3c14b; color: #5a3d00; font-size: 0.65rem; font-weight: 700; font-style: normal; display: flex; align-items: center; justify-content: center; }
.an-row.is-weight .an-id small { white-space: normal; }
.an-foot { margin: 0.9rem 0 0; font-size: 0.78rem; color: var(--muted); }
.an-foot.stale { color: var(--red); }
.an-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.86rem; color: var(--muted); line-height: 1.45; }
.an-facts li { padding-left: 0.9rem; border-left: 2px solid var(--border); }

.an-spread h2 { margin-bottom: 0.9rem; }
.an-lead { display: flex; align-items: baseline; gap: 0.6rem; margin-bottom: 1rem; }
.an-lead b { font-size: 2.2rem; font-weight: 700; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.an-lead b small { font-size: 0.45em; color: var(--muted); letter-spacing: 0; }
.an-lead span { font-size: 0.95rem; font-weight: 600; }
.an-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.an-list li { display: grid; grid-template-columns: minmax(0, 1fr) 4.5rem 3.2rem; align-items: center; gap: 0.6rem; font-size: 0.84rem; }
.an-list-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.an-list .an-bar { height: 8px; } .an-list .is-first i { background: var(--ink); }
.an-list b { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--muted); }
.an-spread .dash-link { margin-top: 0.9rem; text-align: left; }
@media (prefers-color-scheme: dark) { .an-logo.is-letter { background: hsl(var(--hue) 35% 24%); color: hsl(var(--hue) 70% 80%); } }

@media (max-width: 760px) {
  .an { gap: 0.9rem; }
  .an-hero { padding: 1.1rem 1.1rem 1.2rem; }
  .an-hero-body { grid-template-columns: minmax(0, 1fr); gap: 1.1rem; }
  .an-sum { gap: 0.35rem; }
  .an-part { padding: 0.55rem 0.6rem; }
  .an-part b { font-size: 0.98rem; }
  .an-part small { display: none; }
  .an-op { font-size: 0.8rem; }
  .an-row { grid-template-columns: minmax(0, 1fr) auto; gap: 0.35rem 0.8rem; padding: 0.7rem 0; }
  .an-row .an-diverge, .an-row .an-pair { grid-column: 1 / -1; grid-row: 2; }
  .an .dash-card > .dash-head { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
  .an-compare .dash-head { flex-direction: row !important; }
}
