/* shell.css — VHC Bedrijfssysteem
   App-shell: kopbalk, zijbalk en gebruikersmenu (DESIGN.md §4, §6.1, §6.2).
   Gedeeld door alle modules; vraagt tokens.css. Module-eigen onderdelen
   (zoals het boekjaar in Transport) staan in de module zelf. */


/* Ruimte boven de kopbalk: 0, of de hoogte van de omgevingsbalk (testomgeving).
   Alles wat vast of plakkend onder de kopbalk staat, telt hem mee. */
:root { --boven: 0px; }
html.met-omgevingsbalk { --boven: 32px; }
html.met-omgevingsbalk body { padding-top: var(--boven); }
/* Omgevingsbalk: boven alles, over de volle breedte; de rest schuift
   evenveel op. Alleen in een testomgeving. */
.omgevingsbalk {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--boven); display: flex; align-items: center; justify-content: center; padding: 0 16px;
  background: var(--warning); color: var(--surface);
  font-size: var(--fs-sm); line-height: var(--lh-sm); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Kopbalk: 56px over de volle breedte, op elk scherm. */
.kopbalk {
  position: sticky; top: var(--boven); z-index: 40;
  height: 56px;
  display: flex; align-items: center; gap: 12px;
  padding: 0 12px 0 16px;
  background: var(--header); color: var(--on-header);
}
.kb-icoonknop {
  flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0;
  border: none; border-radius: var(--radius);
  background: transparent; color: var(--on-header); cursor: pointer;
}
.kb-icoonknop svg { width: 20px; height: 20px; }
.kb-icoonknop:hover, .kb-icoonknop[aria-expanded="true"] { background: var(--header-hover); }
.kb-menu { display: none; margin-left: -8px; }
.kb-logo {
  flex: none; display: inline-flex; align-items: center;
  height: 40px; padding: 0 4px; margin-right: 4px;
  border: none; border-radius: var(--radius); background: none;
  color: var(--on-header); cursor: pointer;
}
.kb-logo:hover { background: var(--header-hover); }
/* Alleen het beeldmerk: de viewBox snijdt de tekst "van helvoort company"
   boven het merk weg (§10: die is op 34px onleesbaar). */
.kb-logo svg { display: block; height: 34px; width: auto; }
.kb-kruimel {
  flex: 1 1 auto; min-width: 0;
  display: flex; align-items: baseline; gap: 8px;
  font-size: var(--fs-md); white-space: nowrap; overflow: hidden;
}
.kb-kruimel .kb-module { font-weight: 600; color: var(--on-header); }
.kb-kruimel .kb-sep { color: var(--on-header-2); }
.kb-kruimel .kb-pagina { color: var(--on-header-2); overflow: hidden; text-overflow: ellipsis; }
.kb-rechts { flex: none; display: flex; align-items: center; gap: 8px; }

.kb-gebruiker { position: relative; }
.kb-gebruiker-knop {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 10px 0 4px;
  border: none; border-radius: var(--radius);
  background: transparent; color: var(--on-header);
  font: inherit; font-size: var(--fs-md); font-weight: 500; cursor: pointer;
}
.kb-gebruiker-knop:hover, .kb-gebruiker-knop[aria-expanded="true"] { background: var(--header-hover); }
.kb-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 999px;
  background: var(--on-header); color: var(--header);
}
.kb-avatar svg { width: 18px; height: 18px; }
.kb-gebruiker-knop > svg { width: 16px; height: 16px; color: var(--on-header-2); }

.kb-paneel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 80;
  width: 280px; padding: 8px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 8px 24px rgb(0 0 0 / .14);
}
.kb-paneel[hidden] { display: none; }
.kb-paneel-kop { padding: 8px 8px 12px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.kb-paneel-kop #rolLabel { font-size: var(--fs-md); font-weight: 600; }
.kb-paneel-kop .kb-co { font-size: var(--fs-sm); color: var(--text-2); margin-top: 2px; }
.kb-paneel-label { font-size: var(--fs-sm); font-weight: 500; color: var(--text-2); padding: 4px 8px 6px; }
.kb-thema { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 0 8px 8px; }
.kb-thema button {
  height: 36px; border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--text); font: inherit; font-size: var(--fs-sm); cursor: pointer;
}
.kb-thema button:hover { background: var(--surface-2); }
.kb-thema button[aria-pressed="true"] {
  background: var(--primary-soft); border-color: var(--primary); color: var(--primary); font-weight: 600;
}
.kb-paneel-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  height: 40px; padding: 0 8px; margin-top: 4px;
  border: none; border-top: 1px solid var(--border); border-radius: 0;
  background: none; color: var(--text); font: inherit; font-size: var(--fs-md); text-align: left; cursor: pointer;
}
.kb-paneel-item:hover { background: var(--surface-2); }
.kb-paneel-item svg { width: 20px; height: 20px; color: var(--text-2); }

.kopbalk button:focus-visible, .kopbalk select:focus-visible {
  outline: 2px solid var(--on-header); outline-offset: 2px;
}
.kb-paneel button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Onder de kopbalk: zijbalk + inhoud */
.app { display: flex; min-height: calc(100vh - 56px - var(--boven)); }

.zijbalk {
  width: 240px;
  flex-shrink: 0;
  background: var(--sidebar);
  color: var(--on-sidebar);
  border-right: 1px solid var(--sidebar-border);
  padding: 16px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: calc(56px + var(--boven));
  height: calc(100vh - 56px - var(--boven));
  overflow-y: auto;
}

.zb-kop {
  font-size: var(--fs-xs); font-weight: 500; color: var(--on-sidebar);
  padding: 16px 12px 4px;
}
.zb-kop:first-child { padding-top: 0; }

/* De inhoud is hoogstens 1440px breed (anders raakt het oog bij brede
   tabellen de regel kwijt) en staat in het midden van de ruimte naast de
   ingeklapte zijbalk. Niets herindeelt hem: de uitgeklapte zijbalk en het
   zijpaneel leggen zich eroverheen (DESIGN.md §4, §6.8). */
.shell {
  flex: 1;
  min-width: 0;
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 24px 64px;
}

nav.tabs {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
}
/* Beheer (Instellingen) staat onderaan, gescheiden van de werkpagina's,
   direct boven de inklapknop (DESIGN.md §6.2). */
.zb-kop.zb-beheer { margin-top: auto; }
.app:not(.ingeklapt) .zb-kop.zb-beheer { border-top: 1px solid var(--sidebar-border); }
/* Ingeklapt zetten de regels hieronder de marge van kopjes op 0; deze
   (zwaardere) regel houdt Beheer onderaan. De scheidingslijn komt daar van
   de ingeklapte kopstijl zelf. */
.app.ingeklapt .zijbalk .zb-kop.zb-beheer { margin-top: auto; }
nav.tabs button {
  position: relative;
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 40px;
  border: none;
  background: transparent;
  color: var(--on-sidebar);
  padding: 0 12px;
  text-align: left;
  font-family: inherit;
  font-size: var(--fs-md);
  font-weight: 400;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
}
nav.tabs button > svg { flex: none; width: 20px; height: 20px; }
nav.tabs .zb-naam { flex: 1 1 auto; }
nav.tabs button:hover:not(.active) { background: var(--sidebar-hover); color: var(--text); }
nav.tabs button.active {
  background: var(--sidebar-active);
  color: var(--on-sidebar-active);
  font-weight: 500;
}
nav.tabs button:focus-visible, .zb-klap:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }

.zb-klap {
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 40px;
  margin-top: auto; padding: 0 12px; border: none; background: none;
  color: var(--on-sidebar); font: inherit; font-size: var(--fs-md);
  border-radius: var(--radius); cursor: pointer;
}
.zb-klap:hover { background: var(--sidebar-hover); color: var(--text); }
.zb-klap svg { flex: none; width: 20px; height: 20px; }
.zb-klap[aria-expanded="false"] svg { transform: rotate(180deg); }

/* Ingeklapt: alleen iconen, 64px. De naam verschijnt bij aanwijzen of
   focus; schermlezers lezen hem gewoon voor. */
.app.ingeklapt .zijbalk { width: 64px; padding-left: 8px; padding-right: 8px; overflow: visible; }
.app.ingeklapt .zb-kop { font-size: 0; padding: 8px 0; margin: 0 8px; border-top: 1px solid var(--sidebar-border); }
.app.ingeklapt .zb-kop:first-child { display: none; }
.app.ingeklapt nav.tabs button,
.app.ingeklapt .zb-klap { justify-content: center; padding: 0; gap: 0; }
.app.ingeklapt .zb-klap { position: relative; }
.app.ingeklapt .zb-naam {
  position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%);
  padding: 4px 8px; border-radius: 6px;
  background: var(--text); color: var(--surface);
  font-size: var(--fs-sm); font-weight: 500; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 70;
}
.app.ingeklapt nav.tabs button:hover .zb-naam,
.app.ingeklapt nav.tabs button:focus-visible .zb-naam,
.app.ingeklapt .zb-klap:hover .zb-naam,
.app.ingeklapt .zb-klap:focus-visible .zb-naam { opacity: 1; }

/* Vanaf 960px houdt de inhoud altijd 64px vrij en ligt de zijbalk vast.
   Uitklappen (knop) en uitschuiven (aanwijzen) leggen hem óver de inhoud
   heen (zoals in Basecone), zodat er niets meeschuift (DESIGN.md §4).
   Ingeklapt en uitgeschoven hebben dezelfde opmaak: iconen en tekst staan
   al op hun eindplek en de rand van de zijbalk snijdt ze af. Breedte,
   tekst en schaduw delen één duur, curve en vertraging (--zb-*), zodat het
   één beweging is. */
@media (min-width: 960px) {
  .app.ingeklapt { padding-left: 64px; }
  .app.ingeklapt .zijbalk {
    --zb-duur: .16s; --zb-curve: cubic-bezier(.23, 1, .32, 1); --zb-wacht: 0s; --zb-tekst: 0;
    position: fixed; left: 0; top: calc(56px + var(--boven)); z-index: 45;
    height: calc(100vh - 56px - var(--boven));
    /* Links dezelfde 12px als uitgeklapt, zodat de iconen nooit
       verplaatsen; rechts 8px, zodat het icoon midden in zijn
       actieve vlak (44px) staat. */
    padding-left: 12px; padding-right: 8px;
    overflow-x: hidden; overflow-y: auto;
    transition: width var(--zb-duur) var(--zb-curve) var(--zb-wacht),
                box-shadow var(--zb-duur) var(--zb-curve) var(--zb-wacht);
  }
  /* Uitschuiven: korte vertraging, zodat wie er alleen langs beweegt hem
     niet uitklapt. Inklappen gaat sneller en zonder wachttijd. */
  /* Uitgeklapt met de knop: meteen, zonder wachttijd. */
  .app.ingeklapt.zb-uit .zijbalk,
  .app.ingeklapt .zijbalk:has(:focus-visible) {
    --zb-duur: .2s; --zb-curve: cubic-bezier(.32, .72, 0, 1); --zb-wacht: 0s; --zb-tekst: 1;
    width: 240px; padding-right: 12px;
    box-shadow: 0 8px 24px rgb(0 0 0 / .14);
  }
  /* Iconen staan altijd waar ze uitgeklapt staan: 12px zijbalk + 12px
     knop, net als de gewone uitgeklapte zijbalk. */
  .app.ingeklapt .zijbalk nav.tabs > button,
  .app.ingeklapt .zijbalk .zb-klap { justify-content: flex-start; padding: 0 12px; gap: 12px; }
  .app.ingeklapt .zijbalk nav.tabs button .zb-naam,
  .app.ingeklapt .zijbalk .zb-klap .zb-naam {
    position: static; transform: none; padding: 0; border-radius: 0;
    background: none; color: inherit; font-size: inherit; font-weight: inherit;
    opacity: var(--zb-tekst);
    transition: opacity var(--zb-duur) var(--zb-curve) var(--zb-wacht);
  }
  /* Kopjes houden hun hoogte, zodat er niets verticaal verspringt.
     Ingeklapt staat er een scheidingslijn op hun plek. */
  .app.ingeklapt .zijbalk .zb-kop {
    position: relative; font-size: var(--fs-xs); padding: 16px 12px 4px; margin: 0; border-top: none;
    color: color-mix(in srgb, var(--on-sidebar) calc(var(--zb-tekst) * 100%), transparent);
    transition: color var(--zb-duur) var(--zb-curve) var(--zb-wacht);
  }
  .app.ingeklapt .zijbalk .zb-kop::before {
    content: ""; position: absolute; left: 6px; right: 6px; top: 50%;
    border-top: 1px solid var(--sidebar-border);
    opacity: calc(1 - var(--zb-tekst));
    transition: opacity var(--zb-duur) var(--zb-curve) var(--zb-wacht);
  }
  .app.ingeklapt .zijbalk .zb-kop:first-child { display: block; padding-top: 0; }
  .app.ingeklapt .zijbalk .zb-kop:first-child::before { display: none; }
  /* Beheer: altijd een lijn erboven, ingeklapt en uitgeklapt. */
  .app.ingeklapt .zijbalk .zb-kop.zb-beheer { border-top: 1px solid var(--sidebar-border); }
  .app.ingeklapt .zijbalk .zb-kop.zb-beheer::before { display: none; }
}
/* Met de muis schuift hij bij aanwijzen uit, met een korte vertraging, zodat
   wie er alleen langs beweegt hem niet uitklapt. */
@media (min-width: 960px) and (hover: hover) and (pointer: fine) {
  .app.ingeklapt .zijbalk:hover {
    --zb-duur: .2s; --zb-curve: cubic-bezier(.32, .72, 0, 1); --zb-wacht: .1s; --zb-tekst: 1;
    width: 240px; padding-right: 12px;
    box-shadow: 0 8px 24px rgb(0 0 0 / .14);
  }
}
/* Minder beweging: de zijbalk springt open, de tekst vloeit nog zacht in. */
@media (min-width: 960px) and (prefers-reduced-motion: reduce) {
  .app.ingeklapt .zijbalk { transition: none; }
}

/* Onder 960px: de zijbalk zit achter een menuknop in de kopbalk. */
@media (max-width: 959px) {
  .kb-menu { display: inline-flex; }
  .zijbalk,
  .app.ingeklapt .zijbalk {
    position: fixed; left: 0; top: calc(56px + var(--boven)); z-index: 50;
    width: 240px; height: calc(100vh - 56px - var(--boven));
    padding-left: 12px; padding-right: 12px; overflow-y: auto;
    transform: translateX(-100%); visibility: hidden;
    transition: transform .2s, visibility 0s .2s;
    box-shadow: 0 8px 24px rgb(0 0 0 / .14);
  }
  /* Even zwaar als de regel hierboven: .app heeft altijd .ingeklapt. */
  .zijbalk.open,
  .app.ingeklapt .zijbalk.open { transform: none; visibility: visible; transition: transform .2s; }
  .zb-klap { display: none; }
  /* Ingeklapt geldt alleen op desktop; in het menu staan de namen er altijd. */
  .app.ingeklapt .zb-naam { position: static; transform: none; opacity: 1; padding: 0; background: none; color: inherit; font-size: inherit; }
  .app.ingeklapt nav.tabs button { justify-content: flex-start; padding: 0 12px; gap: 12px; }
  .app.ingeklapt .zb-kop { font-size: var(--fs-xs); padding: 16px 12px 4px; margin: 0; border-top: none; }
  .app.ingeklapt .zb-kop:first-child { display: block; padding-top: 0; }
  .app.ingeklapt .zijbalk .zb-kop.zb-beheer { border-top: 1px solid var(--sidebar-border); }
  .shell { padding: 16px 16px 64px; }
}
@media (max-width: 639px) {
  .kopbalk { gap: 4px; padding: 0 8px 0 12px; }
  .kb-gebruiker-naam { display: none; }
  .kb-gebruiker-knop { padding-right: 4px; }
  /* Telefoon- en tabletregels (§9): tikdoelen van 48px op de telefoon. */
  .kb-icoonknop, .kb-gebruiker-knop, .kb-logo { height: 48px; }
  .kb-icoonknop { width: 48px; }
  .kb-kruimel .kb-module, .kb-kruimel .kb-sep { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .zijbalk, .app.ingeklapt .zb-naam { transition: none; }
}

/* ---------- gedeelde componenten: knop, dialoog, toast, laadstaat, veldfout (DESIGN.md §7) ---------- */

/* Knoppen in dialogen en toasts. Hoogte 36px, padding 0 16px, 14px 500. */
.vhc-knop {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 16px;
  border: 1px solid transparent; border-radius: var(--radius);
  font: inherit; font-size: var(--fs-md); line-height: var(--lh-md); font-weight: 500;
  cursor: pointer; white-space: nowrap;
}
.vhc-knop:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.vhc-knop:disabled { opacity: .4; cursor: not-allowed; }
.vhc-knop-primair { background: var(--primary); color: var(--on-primary); }
.vhc-knop-primair:hover { background: var(--primary-hover); }
.vhc-knop-secundair { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.vhc-knop-secundair:hover { background: var(--surface-2); }
.vhc-knop-stil { background: none; color: var(--primary); padding: 0 8px; }
.vhc-knop-stil:hover { background: var(--primary-soft); }
/* Gevaar: alleen in de bevestigingsdialoog zelf. Tekst in --on-primary in
   plaats van wit: wit op --danger haalt in donker geen 4,5:1 (open punt §7). */
.vhc-knop-gevaar { background: var(--danger); color: var(--on-primary); }
.vhc-knop-gevaar:hover { filter: brightness(.92); }

/* Dialoog: max 560px, --radius-lg, --shadow-2. Titel zegt de actie,
   knoppen benoemen het gevolg. */
.vhc-dialoog {
  width: calc(100% - 32px); max-width: 560px; padding: 0;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); color: var(--text);
  box-shadow: 0 8px 24px rgb(0 0 0 / .14);
}
.vhc-dialoog::backdrop { background: rgb(0 0 0 / .4); }
.vhc-dialoog-binnen { padding: 24px; }
.vhc-dialoog-titel { margin: 0 0 12px; font-size: var(--fs-lg); line-height: var(--lh-lg); font-weight: 600; }
.vhc-dialoog-tekst { font-size: var(--fs-md); line-height: var(--lh-md); color: var(--text-2); }
.vhc-dialoog-tekst p { margin: 0 0 8px; }
.vhc-dialoog-tekst p:last-child { margin-bottom: 0; }
.vhc-dialoog-veld { margin-top: 16px; }
.vhc-dialoog-veld label { display: block; margin-bottom: 4px; font-size: var(--fs-sm); line-height: var(--lh-sm); font-weight: 500; color: var(--text-2); }
.vhc-dialoog-veld input, .vhc-dialoog-veld select {
  width: 100%; height: 40px; padding: 0 12px;
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--text);
  font: inherit; font-size: var(--fs-base);
}
.vhc-dialoog-veld input:focus-visible, .vhc-dialoog-veld select:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.vhc-dialoog-hulp { margin: 6px 0 0; font-size: var(--fs-sm); line-height: var(--lh-sm); color: var(--text-2); }

/* Zoekbare keuzelijst (§7): één lijst onder het actieve veld, vast
   gepositioneerd zodat hij niet wordt afgeknipt door een kaart of tabel. */
.vhc-keuzelijst {
  position: fixed; z-index: 260;
  max-height: 336px; overflow-y: auto; padding: 4px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 8px 24px rgb(0 0 0 / .14);
}
.vhc-keuzelijst[hidden] { display: none; }
.vhc-kl-groep { padding: 6px 10px 4px; font-size: var(--fs-xs); line-height: var(--lh-xs); font-weight: 500; color: var(--text-2); }
.vhc-kl-leeg { padding: 8px 10px; font-size: var(--fs-md); line-height: var(--lh-md); color: var(--text-2); }
.vhc-kl-optie {
  display: flex; align-items: baseline; gap: 12px;
  min-height: 36px; padding: 8px 10px; border-radius: var(--radius);
  font-size: var(--fs-md); line-height: var(--lh-md); cursor: pointer;
}
.vhc-kl-optie:hover, .vhc-kl-optie[aria-selected="true"] { background: var(--surface-2); }
.vhc-kl-optie mark { background: none; color: inherit; font-weight: 600; }
.vhc-kl-sub { margin-left: auto; white-space: nowrap; font-size: var(--fs-sm); color: var(--text-2); }
.vhc-kl-nieuw { margin-top: 4px; color: var(--primary); font-weight: 500; box-shadow: 0 -1px 0 var(--border); border-radius: 0 0 var(--radius) var(--radius); }
.vhc-kl-groep + .vhc-kl-nieuw, .vhc-kl-leeg + .vhc-kl-nieuw, .vhc-kl-nieuw:first-child { margin-top: 0; box-shadow: none; border-radius: var(--radius); }
.vhc-dialoog-knoppen { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 24px; }
.vhc-dialoog-knoppen .vhc-knop-stil { margin-right: auto; }

/* Toast: rechtsonder, 5 seconden, met "Ongedaan maken" waar het kan.
   Kas (onder 640px): onderaan over de volle breedte. */
.vhc-toasts {
  position: fixed; right: 24px; bottom: 24px; z-index: 300;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
  width: min(420px, calc(100vw - 48px));
  pointer-events: none;
}
.vhc-toast {
  display: flex; align-items: flex-start; gap: 12px; width: 100%;
  padding: 12px 8px 12px 16px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgb(0 0 0 / .14);
  font-size: var(--fs-md); line-height: var(--lh-md);
  pointer-events: auto;
}
.vhc-toast > svg { flex: none; width: 20px; height: 20px; }
.vhc-toast-succes > svg { color: var(--success); }
.vhc-toast-fout > svg { color: var(--danger); }
.vhc-toast-info > svg { color: var(--info); }
.vhc-toast-tekst { flex: 1 1 auto; padding-top: 0; align-self: center; }
.vhc-toast .vhc-knop { height: 28px; flex: none; }
.vhc-toast-sluit {
  flex: none; width: 28px; height: 28px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; border-radius: var(--radius); background: none; color: var(--text-3); cursor: pointer;
}
.vhc-toast-sluit:hover { background: var(--surface-2); color: var(--text); }
.vhc-toast-sluit:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.vhc-toast-sluit svg { width: 16px; height: 16px; }
@media (max-width: 639px) {
  .vhc-toasts { left: 8px; right: 8px; bottom: 8px; width: auto; }
  .vhc-toast { min-height: 48px; }
  .vhc-toast .vhc-knop, .vhc-toast-sluit { height: 48px; min-width: 48px; }
  .vhc-knop { height: 48px; }
  .vhc-dialoog-veld select { height: 48px; }
  .vhc-kl-optie { min-height: 48px; align-items: center; }
  .vhc-dialoog-veld input { height: 48px; }
}

/* Laden: tekst blijft, spinner ervoor, knop uitgeschakeld. */
.vhc-spinner {
  display: inline-block; flex: none;
  width: 1em; height: 1em; margin-right: 8px; vertical-align: -.15em;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: vhc-draai .7s linear infinite;
}
@keyframes vhc-draai { to { transform: rotate(360deg); } }

/* Veldfout: rand --danger en een melding met icoon eronder. Rand met
   !important, omdat elke module zijn velden eigen randen geeft; dit is een
   toestand die altijd voorgaat. */
[aria-invalid="true"] { border-color: var(--danger) !important; }
.vhc-veldfout {
  display: flex; align-items: flex-start; gap: 6px; margin-top: 6px;
  font-size: var(--fs-sm); line-height: var(--lh-sm); color: var(--danger);
}
.vhc-veldfout svg { flex: none; width: 16px; height: 16px; margin-top: 1px; }
/* Fout over een heel formulier (bijvoorbeeld een balans die niet klopt). */
.vhc-formfout {
  display: flex; align-items: flex-start; gap: 8px;
  margin: 0 0 12px; padding: 12px;
  border: 1px solid var(--danger); border-radius: var(--radius);
  background: var(--danger-soft); color: var(--text);
  font-size: var(--fs-md); line-height: var(--lh-md);
}
.vhc-formfout > svg { flex: none; width: 20px; height: 20px; color: var(--danger); }
.vhc-formfout p { margin: 0 0 6px; }
.vhc-formfout p:last-child { margin-bottom: 0; }
.vhc-formfout[hidden] { display: none; }
