/* Samra & Co: visuele identiteit. Deep teal + goud, Playfair Display + Montserrat.
   Bron van waarheid: SAMRA_CO_Brand_Identity.md. Goud spaarzaam, nooit als leestekst. */
:root {
  /* Brand core */
  --color-primary: #1B6B5A;
  --color-secondary: #2A9D8F;
  --color-accent: #C9A84C;
  --color-text: #1E293B;
  --color-bg: #FAF8F5;

  /* Teal scale */
  --teal-50: #EEF7F5; --teal-100: #DCEFEC; --teal-200: #B5DDD7; --teal-300: #82C7BD;
  --teal-400: #4FB3A6; --teal-500: #2A9D8F; --teal-600: #237E6B; --teal-700: #1B6B5A;
  --teal-800: #145043; --teal-900: #0F3D33;

  /* Gold scale */
  --gold-pale: #F0E4C0; --gold-light: #DCC079; --gold: #C9A84C; --gold-dark: #A8893A;

  /* Neutrals (warm) */
  --white: #FFFFFF; --warm-white: #FAF8F5; --sand: #F4F1EC;
  --neutral-200: #E2E8F0; --neutral-300: #CBD5E1; --neutral-400: #94A3B8;
  --neutral-500: #64748B; --neutral-700: #334155; --charcoal: #1E293B;

  /* Semantic */
  --success: #2A9D8F; --success-bg: #EEF7F5;
  --warning: #C9A84C; --warning-bg: #F8F1DE;
  --error: #B5453A;   --error-bg: #F8ECEA;
  --info: #237E6B;    --info-bg: #E6F2EF;

  /* Surfaces: Samra & Co warm wit + wit; geen beige/zand */
  --surface: #FFFFFF; --surface-subtle: #F4F1EC;
  --border: #E4E0D7; --border-strong: #CDC8BD;
  --text-secondary: #64748B; --text-on-primary: #FAF8F5;
  --accent-soft: var(--teal-50);   /* zachte accent-tint (per thema instelbaar) */

  /* Geen gekleurde gradient: het canvas is gewoon warm wit. Diepte komt van de kaartschaduwen. */
  --bg-gradient: var(--color-bg);
  --panel-blur: 10px;

  /* Zijbalk: licht (wit), geen donkergroene kolom; teal + goud terug als accent */
  --sidebar-bg: #FFFFFF;
  --sidebar-text: #64748B;
  --sidebar-text-active: var(--color-text);
  --sidebar-active-bg: var(--accent-soft);
  --sidebar-hover-bg: rgba(27, 107, 90, 0.05);
  --sidebar-section: #94A3B8;
  --sidebar-accent: var(--gold);   /* goud op het actieve item (spaarzaam) */

  /* Typography */
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --display: var(--font-serif);  /* Playfair-koppen = de Samra & Co-signatuur (per look instelbaar) */
  --fs-display: 3rem; --fs-h1: 2rem; --fs-h2: 1.5rem; --fs-h3: 1.2rem; --fs-h4: 1.05rem;
  --fs-body-lg: 1.125rem; --fs-body: 1rem; --fs-small: 0.875rem; --fs-caption: 0.75rem;

  /* Spacing */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-6: 1.5rem; --space-8: 2rem; --space-12: 3rem; --space-16: 4rem;

  /* Radius: strak, iets minder rond (zakelijker) */
  --radius-sm: 5px; --radius-md: 9px; --radius-lg: 13px; --radius-pill: 999px;

  /* Shadows: zachte, diffuse diepte (genoeg om kaarten te laten zweven) */
  --shadow-sm: 0 2px 10px rgba(30,41,59,0.07);
  --shadow-md: 0 10px 30px rgba(30,41,59,0.11);
  --shadow-lg: 0 22px 50px rgba(30,41,59,0.15);

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 150ms; --dur: 250ms; --dur-slow: 400ms;

  /* Aanvullende rol-tokens (light defaults): voor dark mode (sectie 5.1) */
  --color-primary-hover: var(--teal-800);
  --surface-elevated: #FFFFFF;
  --input-bg: #FFFFFF;
  --text-tertiary: #94A3B8;

  /* Compat-aliassen: tokens die elders in de UI worden gebruikt maar niet apart waren
     gedefinieerd (zonder fallback maakt een onbekende var() de hele declaratie ongeldig).
     Via var() volgen ze het actieve thema, dus ze werken in light en dark. */
  --teal: var(--color-primary);
  --surface-2: var(--surface-subtle);
  --text-2: var(--text-secondary);
  --color-danger: var(--error);
  --motion: var(--dur) var(--ease);
}

/* ====================================================================
   THEMA-VARIANTEN: los kiesbaar voor light (data-light) en dark (data-dark).
   Default light = Klassiek (:root). Default dark = Cobalt. Accenten (teal/goud)
   en Playfair-koppen blijven over alle thema's: in-demand looks, maar on-brand.
   ==================================================================== */

/* --- LIGHT: Helder (clean SaaS, Stripe/Notion/Xero) --- */
:root[data-theme="light"][data-light="helder"] {
  --color-bg: #FAFAF8; --surface: #FFFFFF; --surface-subtle: #F4F4F1;
  --border: #ECEAE3; --border-strong: #D9D6CD;
  --color-text: #1C2126; --text-secondary: #6B7280; --text-tertiary: #9AA0A8;
  --accent-soft: #EAF3F1;
  --radius-sm: 5px; --radius-md: 9px; --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(20,30,40,.05);
  --shadow-md: 0 2px 6px rgba(20,30,40,.07);
  --shadow-lg: 0 8px 22px rgba(20,30,40,.10);
  --sidebar-bg: #FFFFFF; --sidebar-section: #9AA0A8;
}

/* --- LIGHT: Mercury (fintech soft, Mercury/Ramp) --- */
:root[data-theme="light"][data-light="mercury"] {
  --color-bg: #F5F4F1; --surface: #FFFFFF; --surface-subtle: #F0EFEB;
  --border: #E8E5DE; --border-strong: #D6D2C9;
  --color-text: #23262B; --text-secondary: #71757C; --text-tertiary: #9DA1A8;
  --accent-soft: #E9F4F1;
  --radius-sm: 7px; --radius-md: 12px; --radius-lg: 16px;
  --shadow-sm: 0 2px 8px rgba(30,41,59,.05);
  --shadow-md: 0 12px 30px rgba(30,41,59,.10);
  --shadow-lg: 0 24px 50px rgba(30,41,59,.14);
  --sidebar-bg: #FAF9F6; --sidebar-section: #9DA1A8;
}

/* --- LIGHT: Geist (monochroom, hoog contrast, Vercel) --- */
:root[data-theme="light"][data-light="geist"] {
  --color-bg: #FFFFFF; --surface: #FFFFFF; --surface-subtle: #FAFAF8;
  --border: #E6E4DE; --border-strong: #C9C6BE;
  --color-text: #0A0A0A; --text-secondary: #787774; --text-tertiary: #A8A6A0;
  --accent-soft: #F1F6F4;
  --radius-sm: 3px; --radius-md: 5px; --radius-lg: 7px;
  --shadow-sm: none; --shadow-md: 0 1px 2px rgba(0,0,0,.05); --shadow-lg: 0 2px 6px rgba(0,0,0,.07);
  --sidebar-bg: #FFFFFF; --sidebar-active-bg: transparent; --sidebar-accent: transparent; --sidebar-section: #A8A6A0;
}
:root[data-theme="light"][data-light="geist"] .nav button.active {
  text-decoration: underline; text-underline-offset: 4px; }

/* ====================================================================
   DARK: default = Cobalt (analytics-dark). Varianten: Linear, Soft.
   ==================================================================== */
[data-theme="dark"] {
  --color-bg: #08201B; --bg-gradient: var(--color-bg);
  --surface: #0E2A24; --surface-subtle: rgba(255,255,255,0.05); --surface-elevated: #123329;
  --input-bg: rgba(255,255,255,0.06); --border: rgba(255,255,255,0.08); --border-strong: rgba(255,255,255,0.16);

  --color-text: #EAF3EF; --text-secondary: #88ABA1; --text-tertiary: #6E8B82; --text-on-primary: #08201B;
  --color-primary: #34D8B6; --color-primary-hover: #5FE6C9; --color-secondary: #34D8B6; --color-accent: #DCC079;
  --accent-soft: rgba(52,216,182,0.14);

  --success: #34D8B6; --success-bg: #0E2A24;
  --warning: #DCC079; --warning-bg: #2A2415;
  --error:   #E08576; --error-bg:   #2E1A17;
  --info:    #34D8B6; --info-bg:    #0E2A24;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.40);
  --shadow-md: 0 14px 34px rgba(0,0,0,0.48);
  --shadow-lg: 0 22px 50px rgba(0,0,0,0.55);
  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 14px;

  --sidebar-bg: #0B2620; --sidebar-text: var(--text-secondary); --sidebar-text-active: var(--color-text);
  --sidebar-active-bg: var(--accent-soft); --sidebar-hover-bg: rgba(255,255,255,0.04);
  --sidebar-section: var(--text-tertiary); --sidebar-accent: var(--gold);
}

/* --- DARK: Linear (near-black, crisp, minimal) --- */
:root[data-theme="dark"][data-dark="linear"] {
  --color-bg: #0C0E0F; --surface: #16191B; --surface-elevated: #1D2123; --surface-subtle: rgba(255,255,255,0.05);
  --border: rgba(255,255,255,0.07); --border-strong: rgba(255,255,255,0.14);
  --color-text: #E7E9EB; --text-secondary: #8A9197; --text-tertiary: #6B7177;
  --color-primary: #4FB3A6; --color-primary-hover: #62C6B8; --color-secondary: #4FB3A6;
  --accent-soft: rgba(79,179,166,0.14);
  --success: #4FB3A6; --success-bg: #16221F; --info: #4FB3A6; --info-bg: #16221F;
  --radius-sm: 5px; --radius-md: 8px; --radius-lg: 10px;
  --shadow-sm: 0 1px 0 rgba(255,255,255,0.03);
  --shadow-md: 0 2px 10px rgba(0,0,0,0.40);
  --shadow-lg: 0 12px 30px rgba(0,0,0,0.50);
  --sidebar-bg: #0E1113; --sidebar-accent: transparent;
}

/* --- DARK: Soft (warm teal-glas) --- */
:root[data-theme="dark"][data-dark="soft"] {
  --color-bg: #0E1715; --surface: rgba(24,35,31,0.80); --surface-elevated: rgba(34,50,45,0.85);
  --surface-subtle: rgba(255,255,255,0.05); --input-bg: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.08); --border-strong: rgba(255,255,255,0.14);
  --color-text: #F2EFEA; --text-secondary: #A8B5B0; --text-tertiary: #7E8C87;
  --color-primary: #2A9D8F; --color-primary-hover: #4FB3A6; --color-secondary: #4FB3A6; --color-accent: #DCC079;
  --accent-soft: rgba(255,255,255,0.07);
  --radius-sm: 5px; --radius-md: 9px; --radius-lg: 13px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.40);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.45);
  --shadow-lg: 0 14px 36px rgba(0,0,0,0.55);
  --sidebar-bg: var(--surface-elevated); --sidebar-accent: transparent;
}

/* Component-tweaks die niet vanzelf goed vallen in dark mode */
[data-theme="dark"] .btn-primary:hover { background: var(--color-primary-hover); }
[data-theme="dark"] .btn-outline:hover,
[data-theme="dark"] .toolbar button:hover { background: var(--surface-subtle); }
[data-theme="dark"] .card-accent { border-top-color: var(--color-accent); }

* { box-sizing: border-box; }
html { font-size: 14px; }   /* compacte basisschaal (alle rem-maten schalen mee) */
body {
  margin: 0; background: var(--color-bg); color: var(--color-text);
  font-family: var(--font-sans); font-size: var(--fs-body); line-height: 1.55;
  letter-spacing: 0.005em; -webkit-font-smoothing: antialiased;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
h1, h2, h3 { font-family: var(--display); font-weight: 600; color: var(--color-text); letter-spacing: 0.01em; margin: 0; }
h1 { font-size: var(--fs-h1); line-height: 1.2; }
h2 { font-size: var(--fs-h2); line-height: 1.25; }
h3 { font-size: var(--fs-h3); line-height: 1.3; font-weight: 600; }
h4 { font-family: var(--font-sans); font-size: var(--fs-h4); font-weight: 600; margin: 0; }
.loading { padding: 80px; text-align: center; color: var(--text-secondary); }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }

.label {
  font-family: var(--font-sans); font-size: var(--fs-caption); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.15em; color: var(--text-secondary);
}

/* -- Knoppen -------------------------------------------------------------- */
.btn {
  font-family: var(--font-sans); font-size: var(--fs-small); font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; border-radius: var(--radius-md);
  padding: 0.5rem 1.1rem; transition: all var(--dur) var(--ease);
  border: 1px solid transparent; width: 100%;
}
.btn-primary { background: var(--color-primary); color: var(--text-on-primary); }
.btn-primary:hover { background: var(--teal-800); }
.btn-accent { background: var(--gold); color: var(--charcoal); }
.btn-accent:hover { background: var(--gold-dark); color: var(--warm-white); }
.btn-outline { background: transparent; color: var(--color-primary); border-color: var(--color-primary); }
.btn-outline:hover { background: var(--teal-50); }
.btn-ghost { background: transparent; color: var(--color-primary); border: none; }
.btn-ghost:hover { color: var(--teal-800); }

/* -- Gecentreerde kaarten (setup / naming) -------------------------------- */
.center { min-height: 100vh; display: grid; place-items: center; padding: var(--space-6); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--space-8); box-shadow: var(--shadow-sm); width: 100%; max-width: 460px;
}
.card .logo { display: flex; justify-content: center; margin: 0 auto var(--space-6); }
.card .logo svg { height: 58px; width: auto; display: block; }
.logo svg .wm { fill: #1B6B5A; }  /* SAMRA in deep teal op lichte achtergrond (merktrouw) */
[data-theme="dark"] .logo svg .wm { fill: #FAF8F5; }  /* reversed: warm wit op donker */
.powered { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: var(--space-2); }
.pw-label { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 600; color: var(--text-secondary); opacity: 0.7; white-space: nowrap; }
.pw-mark { display: flex; align-items: center; }
.pw-mark svg { height: 30px; width: auto; display: block; }
.card h1 { text-align: center; margin-bottom: var(--space-2); }
.card .sub { color: var(--text-secondary); margin: 0 0 var(--space-6); line-height: 1.6; text-align: center; }
.field { margin-bottom: var(--space-4); }
.field label { display: block; font-size: var(--fs-caption); text-transform: uppercase;
  letter-spacing: 0.15em; color: var(--text-secondary); margin-bottom: var(--space-2); }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.75rem 1rem; border: 1px solid var(--border-strong);
  border-radius: var(--radius-md); background: var(--input-bg); color: var(--color-text);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(42, 157, 143, 0.18);
}
.field input::placeholder, .field textarea::placeholder { color: var(--neutral-400); }

/* Horizontale invoerrij. De labels krijgen een vaste hoogte van twee regels, zodat een
   label dat over twee regels loopt (bv. "Waarschuw (dagen vooraf)") de andere velden niet
   laat verspringen; alle velden lijnen zo onderaan netjes uit. */
.inline-form { display: flex; gap: var(--space-2); align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { margin: 0; }
.inline-form .field label { min-height: 3.1em; }

/* -- Dashboard ------------------------------------------------------------ */
.shell { display: grid; grid-template-columns: 250px 1fr; height: 100vh; }
.sidebar { background: var(--sidebar-bg); color: var(--sidebar-text); padding: var(--space-6) var(--space-4);
  display: flex; flex-direction: column; border-right: 1px solid var(--border);
  transition: background var(--dur) var(--ease); }
.sidebar-foot { margin-top: auto; padding-top: var(--space-6); }
.theme-toggle {
  display: flex; align-items: center; gap: var(--space-3); width: 100%; text-align: left;
  background: none; border: none; padding: 0.45rem 0.7rem; border-radius: var(--radius-md);
  color: var(--sidebar-text); font-family: var(--font-sans); font-size: var(--fs-caption);
  font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  transition: all var(--dur) var(--ease);
}
.theme-toggle .ic { width: 18px; height: 18px; flex: none; }
.theme-toggle:hover { background: var(--sidebar-hover-bg); color: var(--sidebar-text-active); }
.brand-row { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-8); padding: 0 var(--space-2); }
.brand-row .av { width: 42px; height: 42px; border-radius: var(--radius-md); overflow: hidden; flex: none; box-shadow: var(--shadow-sm); }
.brand-row .av svg, .brand-row .av img { width: 100%; height: 100%; display: block; }
.brand-row .name { font-family: var(--display); font-weight: 600; font-size: 1.05rem; color: var(--sidebar-text-active); }
.brand-row .role { font-size: var(--fs-caption); letter-spacing: 0.12em; text-transform: uppercase; color: var(--sidebar-section); }
.nav button {
  display: flex; align-items: center; gap: var(--space-3); width: 100%; text-align: left;
  background: none; border: none; padding: 0.45rem 0.7rem; border-radius: var(--radius-md);
  color: var(--sidebar-text); font-family: var(--font-sans); font-size: var(--fs-small);
  font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; margin-bottom: 2px;
  border-left: 3px solid transparent; transition: all var(--dur) var(--ease);
}
.nav button .ic { width: 18px; height: 18px; flex: none; }
.entity-switch { display: inline-flex; gap: 4px; background: var(--surface-subtle);
  border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 3px; margin-bottom: var(--space-6); }
.entity-switch button { border: none; background: transparent; color: var(--text-secondary);
  padding: 0.35rem 0.85rem; border-radius: var(--radius-pill); font-size: var(--fs-caption);
  font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; transition: all var(--dur) var(--ease); }
.entity-switch button.active { background: var(--color-primary); color: var(--text-on-primary); }
.entity-switch button:hover:not(.active) { color: var(--color-text); }
.entity-switch button.entity-add { color: var(--color-primary); }
.entity-switch button.entity-add:hover { background: var(--surface); }
/* Onderneming toevoegen: inline vorm */
.add-co { display: none; gap: var(--space-2); align-items: center; margin: 0 0 var(--space-6); flex-wrap: wrap; }
.add-co.open { display: flex; }
.add-co input { padding: 0.55rem 0.85rem; border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  background: var(--input-bg); color: var(--color-text); min-width: 240px; font: inherit; }
.add-co input:focus { outline: none; border-color: var(--color-secondary); box-shadow: 0 0 0 3px rgba(42,157,143,0.18); }

.nav-section { font-size: var(--fs-caption); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--sidebar-section); padding: var(--space-4) var(--space-3) var(--space-2); }
.nav > button:first-child { margin-top: var(--space-3); }
/* Info-tooltip ('i') voor uitleg bij vaktermen */
.info-i { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px;
  border-radius: 50%; border: 1px solid var(--border); color: var(--text-secondary);
  font-size: 10px; font-style: italic; font-weight: 700; cursor: help; position: relative;
  vertical-align: middle; margin-left: 4px; user-select: none; line-height: 1; }
.info-i:hover, .info-i:focus { border-color: var(--color-primary); color: var(--color-primary); outline: none; }
.info-i::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px);
  transform: translateX(-50%); width: max-content; max-width: 260px; background: var(--charcoal, #1E293B);
  color: #FAF8F5; padding: 8px 10px; border-radius: var(--radius-md); font-size: 12px; font-style: normal;
  font-weight: 400; line-height: 1.4; text-align: left; box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  opacity: 0; visibility: hidden; transition: opacity var(--dur) var(--ease); z-index: 50; pointer-events: none; }
.info-i:hover::after, .info-i:focus::after { opacity: 1; visibility: visible; }
.cat-tot th, .cat-tot td { padding: 6px 8px; border-bottom: 1px solid var(--border); text-align: left; }
.cat-tot th.r, .cat-tot td.r { text-align: right; }
.cat-tot th { font-size: var(--fs-caption); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-secondary); }
.nav button.active { background: var(--sidebar-active-bg); color: var(--sidebar-text-active); border-left-color: var(--sidebar-accent); }
.nav button:hover:not(.active) { background: var(--sidebar-hover-bg); color: var(--sidebar-text-active); }

.main { padding: var(--space-6) var(--space-8); overflow: auto; background: var(--color-bg);
  font-size: var(--fs-body); line-height: 1.5;
  /* Compactere content-schaal: alleen de rechterkant. CSS-variabelen cascaden, dus de
     zijbalk (buiten .main) houdt de basisschaal. De expliciete font-size laat ook
     ge-erfde lopende tekst meeschalen met de kleinere --fs-body. */
  --fs-display: 2.2rem; --fs-h1: 1.55rem; --fs-h2: 1.25rem; --fs-h3: 1.05rem; --fs-h4: 0.92rem;
  --fs-body-lg: 1rem; --fs-body: 0.9rem; --fs-small: 0.8rem; --fs-caption: 0.7rem;
  --space-3: 0.6rem; --space-4: 0.8rem; --space-5: 1rem; --space-6: 1.1rem; --space-8: 1.4rem;
  --space-12: 2rem; --space-16: 2.6rem; }
/* Compactere formuliervelden in de content-area (inputs zijn de grootste visuele massa). */
.main .field { margin-bottom: var(--space-3); }
.main .field input, .main .field select, .main .field textarea { padding: 0.5rem 0.7rem; }
.greeting { font-family: var(--display); font-size: 1.5rem; font-weight: 600; letter-spacing: 0.01em; margin: 0 0 var(--space-1); }
.greeting-sub { color: var(--text-secondary); margin: 0 0 var(--space-8); font-size: var(--fs-small); }

.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-4); }
.section-head h2 { font-size: var(--fs-h3); }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }

.row { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-3) var(--space-6); border-bottom: 1px solid var(--border); }
.row:last-child { border-bottom: none; }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 600; }
.row .meta { font-size: var(--fs-small); color: var(--text-secondary); }
.row .amount { font-variant-numeric: tabular-nums; font-weight: 600; }

/* Verzekeringen: vast kolomraster (type | verzekeraar | verwijderen) zodat de regels
   netjes uitlijnen i.p.v. verspringen door wisselende type-breedtes. */
.pol-row { display: grid; grid-template-columns: 150px 1fr auto; gap: var(--space-4);
  align-items: start; padding: var(--space-3) var(--space-6); border-bottom: 1px solid var(--border);
  transition: background var(--dur) var(--ease); }
.pol-row:last-child { border-bottom: none; }
.pol-row:hover { background: var(--surface-subtle); }
.pol-row .pol-type { font-size: var(--fs-caption); font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-secondary); padding-top: 3px; }
.pol-row .pol-main { min-width: 0; }
.pol-row .pol-main .title { font-weight: 600; }
.pol-row .pol-main .meta { font-size: var(--fs-small); color: var(--text-secondary); }
.pol-row .pol-del { width: auto; align-self: start; }
.pol-row .pol-cover { grid-column: 1 / -1; }
@media (max-width: 640px) { .pol-row { grid-template-columns: 1fr auto; }
  .pol-row .pol-type { grid-column: 1 / -1; padding-top: 0; margin-bottom: 2px; } }

.badge { font-size: var(--fs-caption); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.25rem 0.6rem; border-radius: var(--radius-pill); white-space: nowrap; }
.badge.kritiek { background: var(--error-bg); color: var(--error); }
.badge.normaal { background: var(--info-bg); color: var(--info); }
.badge.laag { background: var(--surface-subtle); color: var(--text-secondary); }
.badge.muted { background: var(--surface-subtle); color: var(--text-secondary); }
.badge.attentie { background: var(--warning-bg); color: var(--warning); }

.progress { height: 8px; background: var(--surface-subtle); border-radius: var(--radius-pill); overflow: hidden; margin: var(--space-1) 0 var(--space-6); }
.progress > i { display: block; height: 100%; background: var(--color-secondary); transition: width var(--dur) var(--ease); }

.q { padding: var(--space-4) var(--space-6); border-bottom: 1px solid var(--border); }
.q:last-child { border-bottom: none; }
.q .section { font-size: var(--fs-caption); text-transform: uppercase; letter-spacing: 0.12em; color: var(--color-primary); font-weight: 600; margin-bottom: var(--space-1); }
.q .prompt { margin-bottom: var(--space-3); }
.q .answer { display: flex; gap: var(--space-2); }
.q .answer input { flex: 1; padding: 0.6rem 0.85rem; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--input-bg); color: var(--color-text); }
.q .answer input:focus { outline: none; border-color: var(--color-secondary); box-shadow: 0 0 0 3px rgba(42,157,143,0.18); }
/* Legacy enkel-tekstveld-layout (niet de getypeerde controls). */
.q .answer:not(.answer-typed) button { background: var(--color-primary); color: var(--text-on-primary); border: none; border-radius: var(--radius-md);
  padding: 0 1.1rem; font-weight: 600; font-size: var(--fs-caption); letter-spacing: 0.1em; text-transform: uppercase; }
.q .answer:not(.answer-typed) button:hover { background: var(--teal-800); }
/* Getypeerde onboarding-controls */
.q .answer-typed { display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; }
.q .answer-typed > textarea, .q .answer-typed > input { flex: 1; min-width: 240px; padding: 0.5rem 0.7rem;
  border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--input-bg);
  color: var(--color-text); font: inherit; }
.q .answer-typed textarea { resize: vertical; align-self: stretch; }
.q .answer-typed .chips { flex: 1; min-width: 240px; display: flex; flex-wrap: wrap; gap: 6px; }
.q .answer-typed .chips .look-chip { display: inline-flex; flex-direction: row; align-items: center;
  width: auto; padding: 4px 10px; font-size: 12px; gap: 0; line-height: 1.3; }
/* De 'Opslaan'-knop bij een getypeerde vraag: standaard knopmaat (alleen niet full-width). */
.q .answer-typed .btn { width: auto; }
.q .answer-typed .euro-field { flex: 1; min-width: 160px; display: flex; align-items: center; gap: 6px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--input-bg); padding: 0 0.6rem; }
.q .answer-typed .euro-field span { color: var(--text-secondary); }
.q .answer-typed .euro-field input { flex: 1; border: none; background: transparent; color: var(--color-text);
  padding: 0.6rem 0; font: inherit; }
.q .answer-typed .euro-field input:focus { outline: none; }
/* Installatie-akkoord (consent) */
.consent-list { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-2); }
.consent-item { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3);
  border: 1px solid var(--border); border-radius: var(--radius-md); cursor: pointer; }
.consent-item:hover { border-color: var(--color-primary); }
.consent-item input { margin-top: 3px; }
.consent-doc { font-size: var(--fs-small); color: var(--color-primary); }
/* Btw-aangifte rubrieken-tabel */
.rub-table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
.rub-table th { text-align: left; font-size: var(--fs-caption); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-secondary); padding: 6px 8px; border-bottom: 1px solid var(--border); }
.rub-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.rub-table td.r, .rub-table th.r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rub-table tr.rub-tot td { font-weight: 600; border-top: 1px solid var(--border-strong); }
/* Juridische documenten */
.legal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-3); }
.legal-card { display: flex; flex-direction: column; text-align: left; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-4);
  cursor: pointer; box-shadow: var(--shadow-sm); transition: border-color var(--dur) var(--ease); width: 100%; }
.legal-card:hover { border-color: var(--color-primary); }
.legal-card .title { font-weight: 600; margin-bottom: 4px; min-height: 3em; line-height: 1.5; }
.legal-card .meta { font-size: var(--fs-small); color: var(--text-secondary); margin-bottom: var(--space-3); }
.legal-card .badge { margin-top: auto; align-self: flex-start; }
.legal-layout { display: grid; grid-template-columns: 320px 1fr; gap: var(--space-4); align-items: start; }
@media (max-width: 900px) { .legal-layout { grid-template-columns: 1fr; } }
.legal-preview { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--space-6); box-shadow: var(--shadow-sm); }
.legal-doc h2 { font-size: var(--fs-h3); margin-bottom: var(--space-2); }
.legal-doc h3 { font-size: var(--fs-body); margin: var(--space-3) 0 var(--space-1); }
.legal-doc p { font-size: var(--fs-small); margin-bottom: var(--space-2); }
.legal-doc .legal-intro { font-style: italic; color: var(--text-secondary); }
.legal-accepted { font-size: var(--fs-caption); color: var(--color-primary); background: var(--accent-soft);
  border-radius: var(--radius-sm); padding: 6px 10px; margin-bottom: var(--space-2); display: inline-block; }
.legal-accepted.pending { color: var(--text-secondary); background: var(--surface-subtle); }
.legal-doc .legal-party-name { font-weight: 600; font-style: normal; color: var(--color-text); }
.legal-basis { margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px solid var(--border); }
.legal-basis h4 { font-size: var(--fs-caption); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-secondary); margin-bottom: var(--space-1); }
.legal-basis ul { margin: 0; padding-left: 1.1rem; font-size: var(--fs-small); color: var(--text-secondary); }
.legal-disclaimer { margin-top: var(--space-4); padding: var(--space-3); background: var(--surface-subtle);
  border: 1px solid var(--border); border-radius: var(--radius-md); font-size: var(--fs-caption); color: var(--text-secondary); }
/* Onboarding fase 4: 'Later'-groep */
.onb-later { margin-top: var(--space-4); border-top: 1px solid var(--border); padding-top: var(--space-3); }
.onb-later > summary { cursor: pointer; font-weight: 600; color: var(--color-primary);
  font-size: var(--fs-caption); text-transform: uppercase; letter-spacing: 0.08em; padding: var(--space-2) 0; }
.onb-later[open] > summary { margin-bottom: var(--space-2); }

.empty { padding: var(--space-12); text-align: center; color: var(--text-secondary); }
.toolbar { display: flex; gap: var(--space-2); }
.toolbar button { background: transparent; color: var(--color-primary); border: 1px solid var(--color-primary);
  border-radius: var(--radius-md); padding: 0.38rem 0.85rem; font-weight: 600; font-size: var(--fs-caption);
  letter-spacing: 0.06em; text-transform: uppercase; transition: all var(--dur) var(--ease); }
.toolbar button:hover { background: var(--teal-50); }

.audit-line { display: flex; gap: var(--space-4); padding: 0.6rem var(--space-6); border-bottom: 1px solid var(--border); font-size: var(--fs-small); }
.audit-line:last-child { border-bottom: none; }
.audit-line .seq { color: var(--text-secondary); width: 40px; font-variant-numeric: tabular-nums; }
.audit-line .ts { color: var(--text-secondary); width: 170px; font-variant-numeric: tabular-nums; }
.audit-line .actor { width: 92px; color: var(--text-secondary); }
.audit-line .action { font-weight: 600; }
.hint { font-size: var(--fs-small); color: var(--text-secondary); margin-top: var(--space-3); line-height: 1.6; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.muted-val { color: var(--neutral-400); }

/* Noor: conversationeel paneel (rechtsonder) */
.noor-fab { position: fixed; right: 24px; bottom: 24px; z-index: 1500; width: 56px; height: 56px;
  border-radius: 50%; border: none; cursor: pointer; background: var(--color-primary);
  color: var(--text-on-primary); box-shadow: var(--shadow-lg); display: grid; place-items: center; }
.noor-fab .av, .noor-fab svg { width: 30px; height: 30px; }
.noor-panel { position: fixed; right: 24px; bottom: 92px; z-index: 1500; width: 360px;
  max-width: calc(100vw - 48px); height: 480px; max-height: calc(100vh - 140px); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; overflow: hidden; }
.noor-panel[hidden] { display: none; }
.noor-head { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4);
  background: var(--color-primary); color: var(--text-on-primary); }
.noor-head .av { width: 32px; height: 32px; border-radius: var(--radius-sm); overflow: hidden; flex: none; }
.noor-head .av svg { width: 100%; height: 100%; }
.noor-head .name { font-family: var(--display); font-weight: 600; }
.noor-head .role { font-size: var(--fs-caption); opacity: 0.85; text-transform: uppercase; letter-spacing: 0.1em; }
.noor-head button { margin-left: auto; background: none; border: none; color: inherit; cursor: pointer;
  font-size: 1.3rem; line-height: 1; }
.noor-msgs { flex: 1; overflow: auto; padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); }
.noor-msg { max-width: 85%; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md);
  font-size: var(--fs-small); line-height: 1.5; }
.noor-msg.user { align-self: flex-end; background: var(--color-primary); color: var(--text-on-primary); }
.noor-msg.noor { align-self: flex-start; background: var(--surface-subtle); color: var(--color-text); }
.noor-msg .gotab { margin-top: var(--space-2); font-size: var(--fs-caption); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-primary); background: none;
  border: none; cursor: pointer; padding: 0; }
.noor-msg.noor .gotab { color: var(--color-primary); }
.noor-input { display: flex; gap: var(--space-2); padding: var(--space-3); border-top: 1px solid var(--border); }
.noor-input input { flex: 1; padding: 0.6rem 0.85rem; border: 1px solid var(--border-strong);
  border-radius: var(--radius-md); background: var(--input-bg); color: var(--color-text); }
.noor-input button { background: var(--color-primary); color: var(--text-on-primary); border: none;
  border-radius: var(--radius-md); padding: 0 1rem; font-weight: 600; cursor: pointer; }

/* Inklapbare secties (native <details>, toegankelijk + geen JS-state) */
.collapse { margin-top: var(--space-8); }
.collapse > summary { list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; justify-content: space-between; padding: var(--space-2) 0; }
.collapse > summary::-webkit-details-marker { display: none; }
.collapse > summary .sum-left { display: flex; align-items: center; gap: var(--space-2); }
.collapse > summary .ic { width: 18px; height: 18px; color: var(--text-secondary); transition: transform var(--dur) var(--ease); }
.collapse[open] > summary .ic { transform: rotate(90deg); }
.collapse > summary h2 { font-size: var(--fs-h3); }
.collapse > summary:hover h2 { color: var(--color-primary); }
.collapse-body { margin-top: var(--space-3); }

.error-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  display: flex; align-items: center; gap: var(--space-3);
  background: var(--surface); border: 1px solid var(--error);
  border-left: 4px solid var(--error); color: var(--color-text);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  padding: 0.75rem 1rem; max-width: 90vw; z-index: 1000;
}
.error-toast button {
  background: var(--error); color: #fff; border: none; border-radius: var(--radius-sm);
  padding: 0.4rem 0.8rem; font-size: var(--fs-caption); font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.error-toast button#et-close { background: transparent; color: var(--text-secondary); padding: 0.4rem 0.5rem; }

.ok-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  display: flex; align-items: center; gap: var(--space-3);
  background: var(--surface); border: 1px solid var(--success);
  border-left: 4px solid var(--success); color: var(--color-text);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  padding: 0.75rem 1rem; max-width: 90vw; z-index: 1000;
}
.ok-toast button#ok-close { background: transparent; color: var(--text-secondary);
  border: none; padding: 0.4rem 0.5rem; }

/* Bonnen-archief (documentkluis): uitklapbaar jaar -> kwartaal -> maand */
.arch-year { border-bottom: 1px solid var(--border); }
.arch-year:last-child { border-bottom: none; }
.arch-year > summary { display: flex; align-items: center; gap: var(--space-3);
  padding: 0.7rem 0.6rem; cursor: pointer; list-style: none; font-size: var(--fs-body); }
.arch-q > summary { display: flex; align-items: center; gap: var(--space-3);
  padding: 0.5rem 0.6rem 0.5rem 1.4rem; cursor: pointer; list-style: none; color: var(--text-secondary); }
.arch-year > summary::-webkit-details-marker, .arch-q > summary::-webkit-details-marker { display: none; }
.arch-year > summary::before, .arch-q > summary::before { content: "\25B8"; color: var(--text-secondary);
  transition: transform 0.15s ease; }
.arch-year[open] > summary::before, .arch-q[open] > summary::before { transform: rotate(90deg); }
.arch-year .grow, .arch-q .grow { flex: 1; }

/* Demo-banner */
.demo-banner {
  display: flex; align-items: center; gap: var(--space-4); justify-content: space-between;
  background: var(--warning-bg); border: 1px solid var(--gold);
  border-radius: var(--radius-md); padding: 0.7rem 1rem; margin-bottom: var(--space-6);
}
.demo-banner span { color: var(--color-text); font-size: var(--fs-small); }
.demo-banner button {
  flex: none; background: var(--gold); color: var(--charcoal); border: none;
  border-radius: var(--radius-sm); padding: 0.45rem 0.9rem; font-size: var(--fs-caption);
  font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
}
.demo-banner button:hover { background: var(--gold-dark); color: var(--warm-white); }

/* Guided tour */
.tour-overlay { position: fixed; inset: 0; z-index: 1900; }
.tour-ring {
  position: fixed; z-index: 2000; border-radius: var(--radius-md); pointer-events: none;
  border: 2px solid var(--gold); box-shadow: 0 0 0 9999px rgba(14, 23, 21, 0.60);
  transition: all var(--dur) var(--ease);
}
.tour-card {
  position: fixed; z-index: 2100; width: 316px; background: var(--surface);
  border: 1px solid var(--border); border-top: 3px solid var(--gold);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: var(--space-4) var(--space-5);
}
.tour-title { font-family: var(--display); font-size: 1.1rem; margin-bottom: var(--space-2); }
.tour-text { font-size: var(--fs-small); color: var(--text-secondary); line-height: 1.55; margin-bottom: var(--space-4); }
.tour-foot { display: flex; align-items: center; justify-content: space-between; }
.tour-progress { font-size: var(--fs-caption); color: var(--text-tertiary); letter-spacing: 0.1em; }
.tour-card button {
  border: none; border-radius: var(--radius-sm); padding: 0.45rem 0.9rem; font-size: var(--fs-caption);
  font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin-left: var(--space-2);
}
.tour-skip { background: transparent; color: var(--text-secondary); }
.tour-next { background: var(--color-primary); color: var(--text-on-primary); }
.tour-next:hover { background: var(--color-primary-hover); }

/* Abonnement */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-4); }
.plan-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: var(--space-6); display: flex; flex-direction: column;
}
.plan-card.current { border-color: var(--color-primary); border-top: 3px solid var(--color-primary); }
.plan-name { font-family: var(--display); font-size: 1.25rem; margin-bottom: var(--space-2); }
.plan-price { font-size: 1.1rem; font-weight: 600; margin-bottom: var(--space-4); }
.plan-included { margin: 0 0 var(--space-3); padding-bottom: var(--space-3); border-bottom: 1px solid var(--border); font-size: var(--fs-small); }
.plan-feat { list-style: none; padding: 0; margin: 0 0 var(--space-6); flex: 1; }
.plan-feat li { font-size: var(--fs-small); color: var(--text-secondary); padding: 0.25rem 0 0.25rem 1.2rem; position: relative; }
.plan-feat li::before { content: "✓"; position: absolute; left: 0; color: var(--color-secondary); font-weight: 700; }

/* =====================================================================
   Soft depth: gekozen standaard-look. Zwevende oppervlakken op een zachte
   gradient, glas-blur (vooral in dark mode), ruimere afronding en zachte
   micro-interacties. Werkt op de rol-tokens, dus thema-wissels blijven mogelijk.
   ===================================================================== */
body { background: var(--bg-gradient); background-attachment: fixed; }
.main { background: transparent; }

/* Zwevende oppervlakken: zachte schaduw + glas-blur op wat achter ze ligt */
.panel, .card, .plan-card, .noor-panel, .tour-card, .error-toast {
  backdrop-filter: blur(var(--panel-blur));
  -webkit-backdrop-filter: blur(var(--panel-blur));
}
.panel { box-shadow: var(--shadow-md); border-radius: var(--radius-lg); }

/* Zachte hover-lift op klikbare kaarten */
.card, .plan-card {
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.card:hover, .plan-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

/* Rijen lichten subtiel op bij hover (interactief gevoel) */
.row { transition: background var(--dur) var(--ease); }
.row:hover { background: var(--surface-subtle); }

/* Knoppen en focus voelen zachter en dieper */
.btn { box-shadow: var(--shadow-sm); }
.btn-ghost { box-shadow: none; }
.field input:focus, .field select:focus, .field textarea:focus,
.q .answer input:focus { box-shadow: 0 0 0 4px rgba(42, 157, 143, 0.16); }

/* Sidebar krijgt diepte t.o.v. het canvas */
.sidebar { box-shadow: var(--shadow-md); position: relative; z-index: 1; }

/* -- Overzicht-dashboard (widgets) ----------------------------------------- */
.dash-top{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);flex-wrap:wrap;margin-bottom:var(--space-4)}
.seg{display:inline-flex;background:var(--surface-subtle);border:1px solid var(--border);border-radius:10px;padding:3px;gap:2px}
.seg button{font-family:var(--font-sans);font-size:12px;font-weight:600;letter-spacing:.03em;border:0;background:transparent;color:var(--text-secondary);padding:6px 14px;border-radius:7px;cursor:pointer}
.seg button.on{background:var(--surface);color:var(--color-primary);box-shadow:var(--shadow-sm)}
.dash-grid{display:grid;grid-template-columns:repeat(12,1fr);gap:var(--space-4)}
.dw{min-width:0;display:flex;flex-direction:column}
.dw>.card{flex:1;height:auto;max-width:none;width:100%}
.dash-grid.editing .dw{outline:2px dashed var(--color-primary);outline-offset:3px;border-radius:var(--radius-md)}
.dw-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px;padding:0 2px}
.dw-name{font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--text-secondary)}
.dw-ctrl{display:flex;gap:4px}
.dw-ctrl button{width:24px;height:24px;border:1px solid var(--border);background:var(--surface);border-radius:6px;color:var(--text-secondary);cursor:pointer;font-size:12px;line-height:1;padding:0}
.dw-ctrl button:hover{border-color:var(--color-primary);color:var(--color-primary)}
.dsec{font-family:var(--display);font-size:15px;padding:14px 16px 8px}
.dkpi{padding:15px 16px}
.dkpi .label{font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--text-secondary);margin-bottom:8px;display:block}
.dkpi .big,.dnoor + *{}
.big{font-family:var(--display);font-size:26px;font-weight:700;letter-spacing:-.5px;line-height:1.1}
.delta{font-size:12px;font-weight:600;margin-top:4px}
.delta.up{color:var(--success)}.delta.down{color:var(--error)}.delta.flat{color:var(--text-secondary)}
.dnoor{display:flex;gap:14px;align-items:flex-start;padding:16px 18px;background:linear-gradient(180deg,var(--accent-soft),var(--surface))}
.dnoor .av{width:40px;height:40px;border-radius:11px;background:var(--color-primary);color:#fff;display:grid;place-items:center;font-family:var(--display);font-weight:700;flex:0 0 auto}
.dnoor .txt b{font-family:var(--display);font-size:15px}
.dnoor .txt p{margin-top:3px;color:var(--color-text);opacity:.85}
.datt{display:flex;align-items:center;gap:12px;padding:11px 16px;border-top:1px solid var(--border)}
.card>.datt:first-of-type{border-top:1px solid var(--border)}
.datt .grow{flex:1;min-width:0}
.datt .dttl{font-weight:600;font-size:13.5px}
.datt .dmeta{color:var(--text-secondary);font-size:12px}
.datt .damt{font-weight:700;font-family:var(--display)}
.ddot{width:9px;height:9px;border-radius:50%;flex:0 0 auto}
.ddot.r{background:#B3261E}.ddot.a{background:var(--gold)}.ddot.g{background:var(--color-primary)}
.dtag{font-size:10.5px;font-weight:600;padding:3px 8px;border-radius:999px;letter-spacing:.03em}
.dtag.r{background:#FBEAE8;color:#B3261E}
.dash-libpanel{margin-top:var(--space-4);border:1px solid var(--border);border-radius:var(--radius-md);padding:14px 16px;background:var(--surface-subtle)}
.dash-libpanel .chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.dash-libpanel .chip{font-size:12px;font-weight:600;padding:7px 12px;border-radius:999px;background:var(--surface);border:1px solid var(--border);color:var(--color-text);cursor:pointer;display:flex;gap:7px;align-items:center}
.dash-libpanel .chip:hover{border-color:var(--color-primary)}
.dash-libpanel .chip .p{color:var(--color-primary);font-weight:700}
.cfwrap{display:flex;align-items:flex-end;gap:18px;height:110px;padding:6px 4px 0}
.cfcol{flex:1;display:flex;justify-content:center;align-items:flex-end}
.cfbar{width:100%;max-width:56px;border-radius:8px 8px 0 0}
.cfbar.in{background:var(--color-primary)}.cfbar.out{background:var(--gold)}
.cfbar.net{background:var(--accent-soft);border:1px dashed var(--color-primary)}
.cflabels{display:flex;justify-content:space-between;gap:8px;margin-top:8px;font-size:11.5px;color:var(--text-secondary);font-weight:600}
.ring{width:120px;height:120px;border-radius:50%;display:grid;place-items:center;margin:0 auto}
.ring .rin{width:90px;height:90px;border-radius:50%;background:var(--surface);display:grid;place-items:center;text-align:center}
.ring .rin b{font-family:var(--display);font-size:24px;line-height:1}
@media(max-width:820px){.dash-grid{grid-template-columns:repeat(2,1fr)}.dw{grid-column:span 2 !important}}

/* -- Onboarding-interview: inklapbaar (dropdown) --------------------------- */
.onb-details { margin-top: var(--space-8); border: 1px solid var(--border);
  border-radius: var(--radius-md); background: var(--surface); overflow: hidden; }
.onb-details > summary { list-style: none; cursor: pointer; display: flex;
  align-items: center; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-4) var(--space-5); }
.onb-details > summary::-webkit-details-marker { display: none; }
.onb-summary-head { font-family: var(--display); font-size: var(--fs-h3); display: flex;
  align-items: center; gap: var(--space-2); }
.onb-chevron { display: inline-block; color: var(--text-secondary);
  transition: transform var(--motion); }
.onb-details[open] .onb-chevron { transform: rotate(90deg); }
.onb-body { padding: 0 var(--space-5) var(--space-5); }

/* -- Relaties: selectie + bulk-bewerkbalk ---------------------------------- */
.bulk-bar { align-items: center; gap: var(--space-3); flex-wrap: wrap;
  padding: var(--space-3) var(--space-4); margin-bottom: var(--space-3);
  border: 1px solid var(--color-primary); }
.bulk-bar select, .bulk-bar input { padding: 0.4rem 0.6rem; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--color-text);
  font-family: var(--font-sans); font-size: var(--fs-small); }
.bulk-count { font-size: var(--fs-small); color: var(--text-secondary); }
.rel-head { background: transparent; cursor: default; }
.row input.rel-sel, #rel-all { width: 16px; height: 16px; margin-right: var(--space-3);
  accent-color: var(--color-primary); flex: 0 0 auto; cursor: pointer; }

/* -- Thema-kiezer (Instellingen) ------------------------------------------- */
.look-chooser { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); }
@media (max-width: 720px) { .look-chooser { grid-template-columns: 1fr; } }
.look-group { border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-4); background: var(--surface-subtle); transition: border-color var(--motion), opacity var(--motion); }
.look-group:not(.look-group-active) { opacity: 0.72; }
.look-group-active { border-color: var(--color-primary); background: var(--surface); }
.look-group-head { display: flex; align-items: center; gap: var(--space-2); font-family: var(--font-sans); font-size: var(--fs-small); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-secondary); margin-bottom: var(--space-3); }
.look-now { font-size: 12px; letter-spacing: 0.06em; padding: 0.1rem 0.45rem; border-radius: 999px; background: var(--accent-soft); color: var(--color-primary); }
.look-grid { display: flex; flex-direction: column; gap: var(--space-2); }
.look-chip { display: flex; flex-direction: column; align-items: flex-start; gap: 0.15rem; text-align: left; width: 100%; padding: 0.6rem 0.8rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; box-shadow: none; transition: border-color var(--motion), background var(--motion); }
.look-chip:hover { border-color: var(--color-primary); }
.look-chip.active { border-color: var(--color-primary); background: var(--accent-soft); }
.look-name { display: flex; align-items: center; gap: var(--space-2); font-family: var(--font-sans); font-weight: 600; font-size: 0.86rem; color: var(--color-text); text-transform: none; letter-spacing: 0; }
.look-rec { font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; padding: 0.08rem 0.4rem; border-radius: 999px; background: var(--gold); color: #2A2418; }
.look-desc { font-size: var(--fs-small); color: var(--text-secondary); }

/* =====================================================================
   Responsive (fase 4, stap 1): onder de breakpoint wordt de vaste zijbalk
   een inschuifbare drawer met een hamburger in een sticky topbar. Boven de
   breakpoint blijft het 250px-raster ongewijzigd.
   ===================================================================== */
.app-topbar { display: none; }
.nav-backdrop { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; height: auto; min-height: 100vh; }
  .sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: 280px; max-width: 84vw;
    transform: translateX(-100%); transition: transform var(--dur) var(--ease); z-index: 60; overflow-y: auto; }
  .shell.nav-open .sidebar { transform: translateX(0); }
  .nav-backdrop { position: fixed; inset: 0; background: rgba(14, 23, 21, 0.5); z-index: 55; }
  .shell.nav-open .nav-backdrop { display: block; }
  .main { padding: var(--space-4); overflow: visible; }
  .app-topbar { display: flex; align-items: center; gap: var(--space-3); position: sticky; top: 0; z-index: 40;
    background: var(--surface); border-bottom: 1px solid var(--border); padding: 10px 12px;
    margin: calc(-1 * var(--space-4)) calc(-1 * var(--space-4)) var(--space-4); }
  .app-topbar .ham { width: 42px; height: 42px; display: grid; place-items: center; flex: none; cursor: pointer;
    border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); color: var(--color-text); }
  .app-topbar .tb-brand { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
  .app-topbar .tb-brand .av { width: 30px; height: 30px; border-radius: var(--radius-sm); overflow: hidden; flex: none; }
  .app-topbar .tb-brand .av svg, .app-topbar .tb-brand .av img { width: 100%; height: 100%; display: block; }
  .app-topbar .tb-brand .nm { font-family: var(--display); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* Responsive stap 2: comfortabele touch-doelen en formulieren die stapelen op klein scherm. */
@media (max-width: 860px) {
  .nav button { padding: 0.7rem 0.7rem; }
  .btn { min-height: 44px; }
  .main .field input, .main .field select, .main .field textarea { min-height: 44px; }
  .main input[type="checkbox"], .main input[type="radio"] { width: 20px; height: 20px; }
}
@media (max-width: 640px) {
  /* Brede formulier-rijen stapelen: elk veld volle breedte (overschrijft inline-breedtes). */
  .main .field { width: 100% !important; min-width: 0 !important; flex: 1 1 100% !important; }
  .grid2 { grid-template-columns: 1fr; }
  /* Stap 3: brede tabellen horizontaal scrollbaar i.p.v. afgekapt. */
  .rub-table, .cat-tot { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  /* Auditlogboek: vaste kolommen mogen afbreken naar een volgende regel. */
  .audit-line { flex-wrap: wrap; }
  .audit-line .ts { width: auto; }
}

/* ---- Expertpanel ronde 1: toegankelijkheid en mobiel (P0-15, P1-35 t/m 39) ---- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
/* Minimaal 12px tekst, ook in de compacte content-schaal. */
:root, .main { --fs-caption: 12px; --fs-small: 12.5px; }
.nav-section, .brand-row .role, .look-chip, .badge, th, label, .tour-progress, .tour-skip, .tour-next,
.nav button, summary, .section, .look-desc, .look-group-head { font-size: 12px; }
.dw-name, .dkpi .label { font-size: 12px; }
.info-i { font-size: 12px; }
/* Zichtbare focus overal, ook op donkere achtergrond. */
:focus-visible { outline: 2px solid var(--gold, #C9A84C); outline-offset: 2px; }
/* Mobiel: lijstregels mogen afbreken in plaats van de pagina breder te maken. */
@media (max-width: 640px) {
  .row { flex-wrap: wrap; padding: var(--space-3) var(--space-4); }
  .row .grow { flex: 1 1 100%; }
  .row .amount { margin-right: auto; }
  .row .btn { flex: 0 0 auto; }
  .main { padding: var(--space-4); }
  table.data, table.cat-tot { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .main .panel { max-width: 100%; }
}
button.look-chip, button.look-chip .look-name { font-size: 12px; }
@media (max-width: 640px) {
  .section-head { flex-wrap: wrap; gap: var(--space-2); }
  .main .card.dkpi { min-width: 0 !important; flex: 1 1 calc(50% - 8px) !important; }
}
/* Een te breed kind mag de hoofdkolom niet oprekken (P0-15). */
.main { min-width: 0; }
.profile-pick label.pf-opt { text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--color-text); font-weight: 400; }
.profile-pick label.pf-opt input { width: auto; flex: 0 0 auto; }
.profile-pick label.pf-opt .hint { font-size: 12.5px; }
