/* =============================================================================
   Haven VP-platform -- Werkgever-portaal stijlen
   Gebruikt een lichtere, toegankelijkere kleurstelling dan het VP-portaal.
   Topbalk-layout i.p.v. zijbalk (werkgevers bezoeken het portaal minder frequent).
   ============================================================================= */

/* =============================================================================
   Portaal-shell
   ============================================================================= */

/* Huisstijl (110): de haven.css-variabelen wijzen onder body.wg-portaal naar de --hs-variabelen uit het
   <style id="huisstijl">-blok (Beheer > Organisatie en huisstijl). De huidige waarden zijn de fallback,
   zodat het portaal ook zonder dat blok blijft werken. Het VP-portaal merkt hier niets van. */
body.wg-portaal,
body.wg-inloggen {
    --kleur-achtergrond:  var(--hs-achtergrond, #f0f4f8);
    --kleur-wit:          var(--hs-vlak, #ffffff);
    --kleur-vlak:         var(--hs-vlak-zacht, #f8fafc);
    --kleur-tekst:        var(--hs-tekst, #1a2332);
    --kleur-tekst-zacht:  var(--hs-tekst-zacht, #5a6880);
    --kleur-rand:         var(--hs-rand, #dde3ec);
    --kleur-rand-licht:   var(--hs-rand-licht, #edf2f7);
    /* --kleur-accent wordt ook voor links en accenttekst gebruikt: de tekstvariant (minstens 4,5:1).
       Vlakken in het accent gebruiken expliciet --hs-accent (zie de knoppen hieronder). */
    --kleur-accent:       var(--hs-accent-tekst, #2563eb);
    --kleur-accent-hover: var(--hs-accent-tekst, #1d4ed8);
    --kleur-primair:      var(--hs-accent-tekst, #1a3a5c);
    --kleur-succes:       var(--hs-succes, #16a34a);
    --kleur-gevaar:       var(--hs-gevaar, #dc2626);
    --kleur-waarschuwing: var(--hs-waarschuwing, #d97706);
    --grijs-100:          var(--hs-vlak-zacht, #f1f5f9);
    --rood-200:           var(--hs-gevaar-rand, #fecaca);
    --rood-700:           var(--hs-gevaar, #b91c1c);
    --lettertype:         var(--hs-lettertype-tekst, "Inter", "Segoe UI", system-ui, -apple-system, sans-serif);
}

body.wg-portaal {
    background: var(--kleur-achtergrond);
    color: var(--kleur-tekst);
    font-family: var(--lettertype);
}

.wg-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =============================================================================
   Topbalk
   ============================================================================= */

.wg-topbalk {
    display: flex;
    align-items: center;
    gap: 8px 16px;
    min-height: 60px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--kleur-rand);
    background: var(--kleur-wit);
    margin: 0 -24px;
    padding: 6px 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.wg-topbalk-merk {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.wg-merk-logo {
    width: 32px;
    height: 32px;
    background: var(--hs-accent, var(--kleur-primair));
    color: var(--hs-op-accent, #fff);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    flex-shrink: 0;
}

.wg-merk-logo--groot {
    width: 56px;
    height: 56px;
    font-size: 1.75rem;
    border-radius: var(--radius-groot);
    margin: 0 auto 12px;
}

.wg-merk-naam {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--kleur-tekst);
    line-height: 1.2;
}

.wg-merk-sub {
    font-size: 0.7rem;
    color: var(--kleur-tekst-zacht);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* =============================================================================
   Navigatie
   ============================================================================= */

.wg-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    flex: 1;
}

.wg-nav a {
    padding: 6px 10px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    white-space: nowrap;
    font-weight: 500;
    color: var(--kleur-tekst-zacht);
    text-decoration: none;
    transition: background 0.12s, color 0.12s;
}

.wg-nav a:hover {
    background: var(--kleur-achtergrond);
    color: var(--kleur-tekst);
    text-decoration: none;
}

.wg-nav a.actief {
    background: var(--hs-accent-zacht, #e8f0fe);
    color: var(--kleur-accent);
    font-weight: 600;
}

/* =============================================================================
   Gebruikersbalk rechts
   ============================================================================= */

.wg-gebruiker {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    margin-left: auto;
    flex-shrink: 0;
}

.wg-org-naam {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
    color: var(--kleur-tekst);
}

.wg-scheider { color: var(--kleur-rand); }

.wg-naam { color: var(--kleur-tekst-zacht); }

.wg-uitloggen {
    display: flex;
    align-items: center;
    color: var(--kleur-tekst-zacht);
    padding: 4px 6px;
    border-radius: var(--radius);
    transition: background 0.12s;
    text-decoration: none;
}

.wg-uitloggen:hover {
    background: var(--kleur-achtergrond);
    color: var(--kleur-gevaar);
    text-decoration: none;
}

/* =============================================================================
   Meldingen (flashberichten)
   ============================================================================= */

.wg-melding {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    margin: 16px 0;
    border-left: 4px solid transparent;
}

.wg-melding--succes    { background: var(--hs-succes-zacht, #f0faf0); border-color: var(--kleur-succes); color: var(--kleur-succes); }
.wg-melding--fout      { background: var(--hs-gevaar-zacht, #fdf3f3); border-color: var(--kleur-gevaar); color: var(--kleur-gevaar); }
.wg-melding--waarschuwing { background: var(--hs-waarschuwing-zacht, #fff8f0); border-color: var(--kleur-waarschuwing); color: var(--kleur-waarschuwing); }

/* =============================================================================
   Hoofdinhoud en footer
   ============================================================================= */

.wg-inhoud {
    flex: 1;
    padding: 32px 0;
}

.wg-inhoud-wrapper {
    max-width: none;
}

.wg-pagina-header > div:only-child {
    flex: 1;
    width: 100%;
}

.wg-footer {
    border-top: 1px solid var(--kleur-rand);
    padding: 16px 0;
    font-size: 0.8125rem;
    color: var(--kleur-tekst-zacht);
    text-align: center;
}

/* =============================================================================
   Inlogpagina
   ============================================================================= */

.wg-login-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 0;
}

.wg-login-kaart {
    background: var(--kleur-wit);
    border: 1px solid var(--kleur-rand);
    border-radius: var(--radius-groot);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--schaduw-kaart);
}

.wg-login-header {
    text-align: center;
    margin-bottom: 28px;
}

.wg-login-titel {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--kleur-tekst);
    margin-bottom: 6px;
}

.wg-login-sub {
    font-size: 0.875rem;
    color: var(--kleur-tekst-zacht);
}

.wg-login-hulp {
    margin-top: 20px;
    font-size: 0.8125rem;
    color: var(--kleur-tekst-zacht);
    text-align: center;
    line-height: 1.5;
}

/* Volle breedte knop */
.knop--vol { width: 100%; justify-content: center; }

/* =============================================================================
   Paginaheader
   ============================================================================= */

.wg-pagina-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.wg-pagina-titel {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--kleur-tekst);
}

.wg-pagina-sub {
    font-size: 0.875rem;
    color: var(--kleur-tekst-zacht);
    margin-top: 4px;
    line-height: 1.5;
}

.wg-dpa-acties {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* =============================================================================
   KPI-raster (dashboard)
   ============================================================================= */

.wg-kpi-raster {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.wg-kpi-kaart {
    background: var(--kleur-wit);
    border: 1px solid var(--kleur-rand);
    border-radius: var(--radius-groot);
    padding: 20px 24px;
    box-shadow: var(--schaduw-kaart);
}

.wg-kpi-waarde {
    font-size: 2rem;
    font-weight: 700;
    color: var(--kleur-accent);
    line-height: 1.1;
}

.wg-kpi-label {
    font-size: 0.8125rem;
    color: var(--kleur-tekst-zacht);
    margin-top: 4px;
}

/* =============================================================================
   Grafiekraster
   ============================================================================= */

.wg-grafiek-raster {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.wg-grafiek-kaart { padding: 20px; }

@media (max-width: 680px) {
    .wg-grafiek-raster { grid-template-columns: 1fr; }
}

/* =============================================================================
   Attentiekaart (DPA-actie vereist)
   ============================================================================= */

.wg-attentie {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--hs-waarschuwing-zacht, #fff8e1);
    border: 1px solid var(--hs-waarschuwing-rand, #f9a825);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 24px;
    font-size: 0.875rem;
    color: var(--kleur-tekst);
}

.wg-attentie a { color: var(--hs-waarschuwing, #f57c00); font-weight: 600; text-decoration: underline; }
.wg-attentie svg { flex-shrink: 0; color: var(--hs-waarschuwing, #f57c00); }

/* =============================================================================
   Privacy noot onderaan dashboard
   ============================================================================= */

.wg-privacy-noot {
    font-size: 0.8125rem;
    color: var(--kleur-tekst-zacht);
    margin-top: 32px;
    padding: 12px 16px;
    background: var(--kleur-achtergrond);
    border-radius: var(--radius);
    border-left: 3px solid var(--kleur-rand);
    line-height: 1.6;
}

/* =============================================================================
   Kaarten (contracten / DPA)
   ============================================================================= */

.wg-kaarten-lijst {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wg-contract-kaart,
.wg-dpa-kaart {
    padding: 20px 24px;
}

.wg-contract-periode {
    font-size: 0.8125rem;
    color: var(--kleur-tekst-zacht);
    display: block;
    margin-top: 2px;
}

/* =============================================================================
   DPA-document weergave (gegenereerde HTML)
   ============================================================================= */

.wg-dpa-document {
    padding: 32px;
}

.wg-dpa-inhoud h1 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--kleur-tekst);
    margin-bottom: 4px;
}

.wg-dpa-inhoud h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--kleur-tekst);
    margin: 24px 0 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--kleur-rand-licht);
}

.wg-dpa-inhoud p   { margin-bottom: 10px; line-height: 1.65; }
.wg-dpa-inhoud ul  { margin: 8px 0 12px 20px; }
.wg-dpa-inhoud li  { margin-bottom: 4px; }

.dpa-datum { color: var(--kleur-tekst-zacht); font-size: 0.875rem; margin-bottom: 20px; }

.dpa-handtekening-blok {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 2px solid var(--kleur-rand);
}

.dpa-handtekening-raster {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-top: 16px;
}

.dpa-handtekening-raster p { margin-bottom: 16px; line-height: 1.8; }

/* Preview in VP-portaal (dpa_genereer.html) */
.dpa-preview {
    font-size: 0.8rem;
    max-height: 600px;
    overflow-y: auto;
    padding: 16px;
    background: var(--kleur-achtergrond);
    border-radius: var(--radius);
}

.dpa-preview h1 { font-size: 1.1rem; }
.dpa-preview h2 { font-size: 0.9rem; }

/* =============================================================================
   Ondertekend-balk (bevestiging bovenaan DPA)
   ============================================================================= */

.wg-ondertekend-balk {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--hs-succes-zacht, #f0faf0);
    border: 1px solid var(--kleur-succes);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 0.875rem;
    color: var(--kleur-succes);
}

.wg-ondertekend-balk strong { color: var(--kleur-succes); }

/* =============================================================================
   Ondertekeningsformulier
   ============================================================================= */

.wg-onderteken-kaart {
    margin-top: 24px;
    padding: 24px;
    border: 2px solid var(--kleur-accent);
}

/* =============================================================================
   Help-knop in topbalk
   ============================================================================= */

.wg-help-knop {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--kleur-tekst-zacht);
    border: 1px solid var(--kleur-rand);
    text-decoration: none;
    transition: background 0.12s, color 0.12s;
}

.wg-help-knop:hover {
    background: var(--kleur-achtergrond);
    color: var(--kleur-accent);
    text-decoration: none;
}

/* =============================================================================
   Onboarding overlay — werkgever portaal
   ============================================================================= */

.wg-onboarding {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: wg-ob-verschijnen 0.2s ease;
}

@keyframes wg-ob-verschijnen {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.wg-onboarding[hidden] { display: none; }

.wg-onboarding__kaart {
    background: var(--kleur-wit);
    border: 1px solid var(--kleur-rand);
    color: var(--kleur-tekst);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    padding: 36px 32px 24px;
    width: 100%;
    max-width: 420px;
    position: relative;
    animation: wg-ob-opkomen 0.25s ease;
}

@keyframes wg-ob-opkomen {
    from { transform: translateY(16px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.wg-onboarding__illustratie {
    text-align: center;
    margin-bottom: 16px;
}

.wg-onboarding__titel {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--kleur-tekst);
    margin-bottom: 10px;
    text-align: center;
}

.wg-onboarding__tekst {
    font-size: 0.875rem;
    color: var(--kleur-tekst-zacht);
    line-height: 1.6;
    text-align: center;
}

.wg-onboarding__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 20px 0 16px;
}

.wg-onboarding__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: var(--kleur-rand);
    cursor: pointer;
    padding: 0;
    transition: background 0.15s, transform 0.15s;
}

.wg-onboarding__dot--actief {
    background: var(--hs-accent, var(--kleur-accent));
    transform: scale(1.25);
}

.wg-onboarding__acties {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 14px;
}

.wg-ob-vorige {
    padding: 8px 18px;
    border: 1px solid var(--kleur-rand);
    border-radius: var(--radius);
    background: var(--kleur-wit);
    color: var(--kleur-tekst-zacht);
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.12s;
}
.wg-ob-vorige:hover { background: var(--kleur-achtergrond); }

.wg-ob-volgende, .wg-ob-sluit {
    padding: 8px 22px;
    border: none;
    border-radius: var(--radius);
    background: var(--hs-accent, var(--kleur-accent));
    color: var(--hs-op-accent, #fff);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.12s;
}
.wg-ob-volgende:hover, .wg-ob-sluit:hover { background: var(--hs-accent-hover, var(--kleur-accent-hover)); }

.wg-onboarding__niet-meer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 0.78rem;
    color: var(--kleur-tekst-zacht);
    cursor: pointer;
}

.wg-onboarding__kruis {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--kleur-tekst-zacht);
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}
.wg-onboarding__kruis:hover { color: var(--kleur-tekst); }

/* =============================================================================
   Help-pagina's — werkgever portaal
   ============================================================================= */

.wg-help-zoekbalk {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--kleur-wit);
    border: 1px solid var(--kleur-rand);
    border-radius: var(--radius);
    padding: 10px 14px;
    margin-bottom: 24px;
}

.wg-help-zoekbalk svg { flex-shrink: 0; color: var(--kleur-tekst-zacht); }

.wg-help-zoekbalk input {
    border: none;
    outline: none;
    flex: 1;
    font-size: 0.9rem;
    font-family: var(--lettertype);
    color: var(--kleur-tekst);
    background: transparent;
    padding: 0;
}

#wg-zoekresultaten { min-height: 2px; }

.wg-help-categorie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.wg-help-categorie-kaart {
    background: var(--kleur-wit);
    border: 1px solid var(--kleur-rand);
    border-radius: var(--radius-groot);
    padding: 16px;
    text-decoration: none;
    color: var(--kleur-tekst);
    transition: box-shadow 0.12s, border-color 0.12s;
}

.wg-help-categorie-kaart:hover {
    box-shadow: var(--schaduw-kaart);
    border-color: var(--kleur-accent);
    text-decoration: none;
}

.wg-help-categorie-kaart__icoon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.wg-help-categorie-kaart__naam {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 4px;
}

.wg-help-categorie-kaart__aantal {
    font-size: 0.78rem;
    color: var(--kleur-tekst-zacht);
}

.wg-help-artikel-lijst {
    list-style: none;
    padding: 0;
}

.wg-help-artikel-item {
    border-bottom: 1px solid var(--kleur-rand-licht);
}

.wg-help-artikel-item:last-child { border-bottom: none; }

.wg-help-artikel-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    color: var(--kleur-tekst);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.12s;
}

.wg-help-artikel-link:hover {
    color: var(--kleur-accent);
    text-decoration: none;
}

.wg-help-artikel-link svg { flex-shrink: 0; opacity: 0.4; }

.wg-help-zoek-lijst { margin-bottom: 8px; }

.wg-help-zoek-resultaat {
    display: block;
    padding: 10px 14px;
    background: var(--kleur-wit);
    border: 1px solid var(--kleur-rand);
    border-radius: var(--radius);
    margin-bottom: 6px;
    text-decoration: none;
    color: var(--kleur-tekst);
    transition: border-color 0.12s;
}

.wg-help-zoek-resultaat:hover { border-color: var(--kleur-accent); text-decoration: none; }

.wg-help-zoek-cat {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--kleur-accent);
    margin-bottom: 2px;
}

.wg-help-zoek-titel {
    display: block;
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 2px;
}

.wg-help-zoek-samen {
    display: block;
    font-size: 0.8rem;
    color: var(--kleur-tekst-zacht);
}

.wg-help-zoek-leeg {
    padding: 16px;
    text-align: center;
    color: var(--kleur-tekst-zacht);
    font-size: 0.875rem;
}

.wg-help-zoek-info {
    font-size: 0.82rem;
    color: var(--kleur-tekst-zacht);
    margin-bottom: 10px;
}

/* Artikel-layout: 2 kolommen (artikel + sidebar) */
.wg-help-layout {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 24px;
    align-items: start;
}

@media (max-width: 700px) {
    .wg-help-layout { grid-template-columns: 1fr; }
}

.wg-help-artikel-body {
    background: var(--kleur-wit);
    border: 1px solid var(--kleur-rand);
    border-radius: var(--radius-groot);
    padding: 28px 32px;
}

.wg-help-artikel-body h1 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.wg-help-artikel-body .wg-help-meta {
    font-size: 0.78rem;
    color: var(--kleur-tekst-zacht);
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--kleur-rand-licht);
}

.wg-help-artikel-body h2 {
    font-size: 1rem;
    font-weight: 600;
    margin: 20px 0 8px;
}

.wg-help-artikel-body p {
    font-size: 0.875rem;
    line-height: 1.65;
    color: var(--kleur-tekst);
    margin-bottom: 12px;
}

.wg-help-artikel-body ul {
    padding-left: 20px;
    margin-bottom: 12px;
    font-size: 0.875rem;
    line-height: 1.65;
}

.wg-help-sidebar .kaart {
    font-size: 0.875rem;
}

/* =============================================================================
   Huisstijl (110): onderdelen uit haven.css die vaste kleuren gebruiken, onder
   body.wg-portaal opnieuw op de huisstijl gezet. Alles is gescoped op
   body.wg-portaal, zodat het VP-portaal niets merkt. Statuskleuren (succes,
   gevaar, waarschuwing, info) komen als vlak plus tekst uit het thema; de
   tekstkleur haalt daar minstens 4,5:1 op.
   ============================================================================= */

/* Koppen in het koplettertype, lopende tekst in het tekstlettertype (via --lettertype) */
body.wg-portaal :is(h1, h2, h3, h4, .wg-pagina-titel, .kaart__titel, .kaart__header h3, .kaart-titel,
                    .wg-kpi-waarde, .wg-merk-naam, .wg-onboarding__titel, .casecode-kaart h2,
                    .formulier__sectie-titel, .wg-help-categorie-kaart__naam, .wg-help-zoek-titel) {
    font-family: var(--hs-lettertype-koppen, var(--lettertype));
}
body.wg-portaal .wg-merk-naam { letter-spacing: 0.01em; }

/* Invoervelden zonder eigen klasse (bijvoorbeeld de link in de Monitor): zonder specificiteit,
   zodat elke eigen regel voorrang houdt. */
:where(body.wg-portaal) :where(input:not([type="checkbox"], [type="radio"], [type="file"], [type="hidden"],
        [type="submit"], [type="button"], [type="reset"], [type="color"], [type="range"], [type="image"]),
        select, textarea) {
    background-color: var(--hs-veld, #fff);
    color: var(--kleur-tekst);
    border: 1px solid var(--kleur-rand);
    border-radius: var(--radius);
    padding: 7px 10px;
    font: inherit;
}
body.wg-portaal ::placeholder { color: var(--kleur-tekst-zacht); opacity: 0.8; }
body.wg-portaal :where(input[type="checkbox"], input[type="radio"]) { accent-color: var(--hs-accent-tekst, currentColor); }

/* Focus: zichtbaar in elk thema */
body.wg-portaal :focus-visible { outline: 2px solid var(--hs-accent-tekst, var(--kleur-accent)); outline-offset: 2px; }
body.wg-portaal .formulier__groep input:focus,
body.wg-portaal .formulier__groep select:focus,
body.wg-portaal .formulier__groep textarea:focus,
body.wg-portaal .hr-vraag textarea:focus,
body.wg-portaal .hr-vraag input[type="text"]:focus {
    outline: 2px solid var(--hs-accent-tekst, var(--kleur-accent));
    outline-offset: 1px;
    border-color: var(--hs-accent-tekst, var(--kleur-accent));
    box-shadow: none;
}
body.wg-portaal .wg-help-zoekbalk:focus-within { border-color: var(--hs-accent-tekst, var(--kleur-accent)); }
body.wg-portaal .wg-help-zoekbalk input:focus-visible { outline: none; }

/* Formulieren */
body.wg-portaal .formulier__groep input[type="text"],
body.wg-portaal .formulier__groep input[type="email"],
body.wg-portaal .formulier__groep input[type="url"],
body.wg-portaal .formulier__groep input[type="number"],
body.wg-portaal .formulier__groep input[type="tel"],
body.wg-portaal .formulier__groep input[type="password"],
body.wg-portaal .formulier__groep input[type="date"],
body.wg-portaal .formulier__groep input[type="time"],
body.wg-portaal .formulier__groep input[type="datetime-local"],
body.wg-portaal .formulier__groep input[type="search"],
body.wg-portaal .formulier__groep select,
body.wg-portaal .formulier__groep textarea {
    background: var(--hs-veld, #fff);
    color: var(--kleur-tekst);
    border-color: var(--kleur-rand);
}
body.wg-portaal .formulier__sectie,
body.wg-portaal .formulier__sectie-titel { background: var(--kleur-wit); color: var(--kleur-tekst); }
body.wg-portaal .formulier__vinkjes { color: var(--kleur-tekst); }

/* Kaarten */
body.wg-portaal .kaart,
body.wg-portaal .casecode-kaart { background: var(--kleur-wit); color: var(--kleur-tekst); border-color: var(--kleur-rand); }
body.wg-portaal .kaart__footer { background: var(--hs-vlak-zacht, #faf9f8); border-top-color: var(--kleur-rand-licht); }
body.wg-portaal .kaart--werkgever { border-left-color: var(--hs-accent, var(--kleur-accent)); }
body.wg-portaal .kaart__omschrijving { color: var(--kleur-tekst-zacht); }
body.wg-portaal .contact-lijst__item { border-color: var(--kleur-rand-licht); }
body.wg-portaal .leeg-scherm { color: var(--kleur-tekst-zacht); }

/* Knoppen: primair is een accentvlak met tekst in de op-accentkleur */
body.wg-portaal .knop--primair {
    background: var(--hs-accent, var(--kleur-accent));
    border-color: var(--hs-accent, var(--kleur-accent));
    color: var(--hs-op-accent, #fff);
    box-shadow: none;
}
body.wg-portaal .knop--primair:hover {
    background: var(--hs-accent-hover, var(--kleur-accent-hover));
    border-color: var(--hs-accent-hover, var(--kleur-accent-hover));
    color: var(--hs-op-accent, #fff);
    box-shadow: none;
}
body.wg-portaal .knop--secundair { background: var(--kleur-wit); color: var(--kleur-tekst); border-color: var(--kleur-rand); }
body.wg-portaal .knop--secundair:hover { background: var(--hs-vlak-zacht, #f3f2f1); border-color: var(--kleur-tekst-zacht); color: var(--kleur-tekst); }
body.wg-portaal .knop--gevaar { background: var(--kleur-wit); color: var(--hs-gevaar, var(--kleur-gevaar)); border-color: var(--kleur-rand); }
body.wg-portaal .knop--gevaar:hover { background: var(--hs-gevaar-zacht, #fde7e9); border-color: var(--hs-gevaar, var(--kleur-gevaar)); }
body.wg-portaal .knop--waarschuwing { background: var(--hs-waarschuwing-zacht, #fff7ed); color: var(--hs-waarschuwing, #c2410c); border-color: var(--hs-waarschuwing-rand, #fed7aa); }
body.wg-portaal .knop--waarschuwing:hover { background: var(--hs-waarschuwing-zacht, #ffedd5); border-color: var(--hs-waarschuwing, #c2410c); }

/* Badges: vlak en tekst per status. Ook de dpa- en contractstatussen die haven.css niet kent (concept, verlopen,
   waarschuwing, gevaar) krijgen hier een kleur, zodat de badge niet als kale tekst verschijnt. */
body.wg-portaal .badge { border: 1px solid transparent; }
body.wg-portaal :is(.badge--actief, .badge--succes, .badge--crm-actief) {
    background: var(--hs-succes-zacht, #dff6dd); color: var(--hs-succes, #107c10); border-color: var(--hs-succes-rand, transparent);
}
body.wg-portaal :is(.badge--info, .badge--portal, .badge--crm-prospect, .badge--crm-email) {
    background: var(--hs-info-zacht, #dce9f7); color: var(--hs-info, #004578); border-color: var(--hs-info-rand, transparent);
}
body.wg-portaal :is(.badge--waarschuwing, .badge--crm-waarschuwing, .badge--crm-suspect, .badge--crm-lead, .badge--nieuw) {
    background: var(--hs-waarschuwing-zacht, #fff4ce); color: var(--hs-waarschuwing, #7d5a00); border-color: var(--hs-waarschuwing-rand, transparent);
}
body.wg-portaal :is(.badge--gevaar, .badge--crm-gevaar, .badge--crm-opgezegd) {
    background: var(--hs-gevaar-zacht, #fde8e8); color: var(--hs-gevaar, #b91c1c); border-color: var(--hs-gevaar-rand, transparent);
}
body.wg-portaal :is(.badge--inactief, .badge--neutraal, .badge--crm-inactief, .badge--crm-concept, .badge--crm-verlopen) {
    background: var(--hs-vlak-zacht, #f3f2f1); color: var(--kleur-tekst-zacht); border-color: var(--kleur-rand);
}
/* Een badge zonder variant (bijvoorbeeld de status van een meting) krijgt de neutrale weergave */
body.wg-portaal .badge:not([class*="badge--"]) {
    background: var(--hs-vlak-zacht, #f3f2f1); color: var(--kleur-tekst); border-color: var(--kleur-rand);
}

/* Tabellen */
body.wg-portaal .tabel thead th { background: var(--hs-vlak-zacht, #faf9f8); color: var(--kleur-tekst-zacht); border-bottom-color: var(--kleur-rand); }
body.wg-portaal .tabel tbody tr { border-bottom-color: var(--kleur-rand-licht); }
body.wg-portaal .tabel tbody tr:nth-child(even) { background: var(--hs-vlak-zacht, #f8fafc); }
body.wg-portaal .tabel tbody tr:hover,
body.wg-portaal .tabel tbody tr:nth-child(even):hover { background: var(--hs-accent-zacht, #f0f4f8); }

/* Eenmalig scherm (tijdelijk wachtwoord) */
body.wg-portaal .casecode-weergave { background: var(--hs-vlak-zacht, #f3f2f1); border-color: var(--kleur-rand); color: var(--kleur-accent); }
body.wg-portaal .casecode-waarschuwing { background: var(--hs-gevaar-zacht, #fde7e9); border-color: var(--hs-gevaar-rand, #f4b8bc); color: var(--hs-gevaar, var(--kleur-gevaar)); }
body.wg-portaal .casecode-kaart p { color: var(--kleur-tekst-zacht); }

/* Rapportbalken en grafieken (dashboard) */
body.wg-portaal .rapport-balk-baan,
body.wg-portaal .rapport-balk-wrapper { background: var(--hs-rand, var(--kleur-rand-licht)); }
body.wg-portaal .rapport-balk { background: var(--hs-accent, var(--kleur-accent)); }
body.wg-portaal .rapport-balk--categorie { background: var(--hs-info, #7c4dff); }
body.wg-portaal .rapport-balk--uren { background: var(--hs-succes, var(--kleur-succes)); }
body.wg-portaal .rapport-balk--status { background: var(--hs-accent, var(--kleur-accent)); }
body.wg-portaal .rapport-balk-label,
body.wg-portaal .rapport-balk-waarde,
body.wg-portaal .rapport-aantal { color: var(--kleur-tekst); }

/* Uitklap en kleine onderdelen */
body.wg-portaal .uitklap--gevaar[open] .uitklap__inhoud { background: var(--hs-gevaar-zacht, #fff5f5); }
body.wg-portaal .wg-nav a:hover { background: var(--hs-vlak-zacht, var(--kleur-achtergrond)); }
body.wg-portaal .wg-help-knop:hover,
body.wg-portaal .wg-uitloggen:hover { background: var(--hs-vlak-zacht, var(--kleur-achtergrond)); }
body.wg-portaal .wg-merk-logo { background: var(--hs-accent, var(--kleur-primair)); color: var(--hs-op-accent, #fff); }
body.wg-portaal .wg-topbalk-merk img { border-radius: 2px; }
body.wg-portaal .wg-help-artikel-body h1,
body.wg-portaal .wg-help-artikel-body h2 { color: var(--kleur-tekst); }
body.wg-portaal .wg-help-artikel-body a { color: var(--kleur-accent); text-decoration: underline; }
body.wg-portaal .wg-help-artikel-body code { background: var(--hs-vlak-zacht, #f3f2f1); padding: 1px 5px; border-radius: 3px; }
body.wg-portaal .dpa-preview { background: var(--hs-vlak-zacht, var(--kleur-achtergrond)); }
body.wg-portaal .wg-dpa-document { color: var(--kleur-tekst); }
body.wg-portaal hr { border: 0; border-top: 1px solid var(--kleur-rand); }

/* Smalle schermen: de gebruikersregel van de topbalk mag omslaan in plaats van buiten beeld te vallen */
@media (max-width: 600px) {
    body.wg-portaal .wg-gebruiker { flex-wrap: wrap; flex-shrink: 1; min-width: 0; max-width: 100%; }
    body.wg-portaal .wg-org-naam { max-width: 100%; }
}

/* =============================================================================
   Werkgever-inlog en wachtwoordpagina (body.wg-inloggen)
   De --hv-variabelen van de inlogschermen voeden hier vanuit de huisstijl. Alleen op deze pagina's: de
   VP-inlog deelt de klassen en de basispagina, maar heeft geen body.wg-inloggen en blijft dus ongewijzigd.
   ============================================================================= */

body.wg-inloggen {
    --hv-nacht:      var(--hs-achtergrond, #0A0A0A);
    --hv-inkt:       var(--hs-vlak, #141414);
    --hv-inkt2:      var(--hs-vlak-zacht, #1b1a18);
    --hv-goud:       var(--hs-accent, #EFA92C);
    --hv-amber:      var(--hs-accent-hover, #C4801A);
    --hv-wit:        var(--hs-tekst, #FFFFFF);
    --hv-grijs:      var(--hs-tekst-zacht, #C5BFB6);
    --hv-grijs-dim:  var(--hs-tekst-zacht, #8E8880);
    --hv-lijn:       var(--hs-rand, rgba(239,169,44,.16));
    --hv-lijn-zwak:  var(--hs-rand, rgba(255,255,255,.09));
    --hv-lettertype-koppen: var(--hs-lettertype-koppen, "Cardo", Georgia, "Times New Roman", serif);
    --hv-lettertype-tekst:  var(--hs-lettertype-tekst, "Libre Franklin", "Segoe UI", system-ui, -apple-system, sans-serif);
    background: var(--hs-achtergrond, #0A0A0A);
}
body.wg-inloggen .inloggen-pagina {
    background: radial-gradient(ellipse 120% 80% at 50% -10%, var(--hs-vlak-zacht, #1b1a18) 0%, var(--hs-achtergrond, #0A0A0A) 70%);
}
body.wg-inloggen .inloggen-kaart { background: var(--hs-vlak, #141414); border-color: var(--hs-rand, rgba(239,169,44,.16)); }
body.wg-inloggen .inloggen-logo-img--donker { filter: brightness(0); opacity: 0.85; }
body.wg-inloggen .inloggen-subtitel { color: var(--hs-tekst-zacht, #C5BFB6); }
body.wg-inloggen .inloggen-invoer {
    background: var(--hs-veld, rgba(255,255,255,0.04)); color: var(--hs-tekst, #fff); border-color: var(--hs-rand, rgba(255,255,255,.09));
}
body.wg-inloggen .inloggen-invoer::placeholder { color: var(--hs-tekst-zacht, #8E8880); }
body.wg-inloggen .inloggen-invoer:focus {
    outline: 2px solid var(--hs-accent-tekst, #EFA92C); outline-offset: 1px;
    border-color: var(--hs-accent-tekst, #EFA92C); box-shadow: none;
}
body.wg-inloggen .inloggen-knop { background: var(--hs-accent, #EFA92C); color: var(--hs-op-accent, #0A0A0A); }
body.wg-inloggen .inloggen-knop:hover { background: var(--hs-accent-hover, #C4801A); }
body.wg-inloggen .inloggen-knop:focus-visible { outline: 2px solid var(--hs-accent-tekst, #EFA92C); outline-offset: 2px; }
body.wg-inloggen .inloggen-fout {
    background: var(--hs-gevaar-zacht, rgba(220,38,38,0.12)); border-color: var(--hs-gevaar-rand, rgba(220,38,38,0.35));
    color: var(--hs-gevaar, #f0a3a3);
}
body.wg-inloggen .inloggen-terug:hover { color: var(--hs-accent-tekst, #EFA92C); }

/* =============================================================================
   Afdrukstijlen (print als PDF)
   ============================================================================= */

@media print {
    .wg-topbalk, .wg-footer, .wg-dpa-acties,
    .knop, form, .wg-onderteken-kaart { display: none !important; }
    .wg-dpa-document { padding: 0; }
    .kaart { box-shadow: none; border: none; }
}

/* Afdrukken: altijd licht op wit, ook bij een donkere huisstijl */
@media print {
    body.wg-portaal {
        --kleur-achtergrond: #ffffff; --kleur-wit: #ffffff; --kleur-vlak: #ffffff;
        --kleur-tekst: #000000; --kleur-tekst-zacht: #444444;
        --kleur-rand: #cccccc; --kleur-rand-licht: #dddddd;
        --kleur-accent: #000000; --kleur-primair: #000000;
        background: #ffffff; color: #000000;
    }
    body.wg-portaal .kaart, body.wg-portaal .wg-dpa-document { background: #ffffff; color: #000000; }
}
