*, *::before, *::after { box-sizing: border-box; }

:root {
    
    --kleur-achtergrond: #f4f5f6;
    --kleur-vlak: #ffffff;
    --kleur-vlak-2: #fafafa;
    --kleur-rand: #d8d8d8;
    --kleur-rand-sterk: #b0b0b0;
    --kleur-tekst: #222222;
    --kleur-tekst-zwak: #6b6b6b;
    --kleur-kop: #111111;
    --kleur-accent: #2f5fa8;
    --kleur-accent-tekst: #ffffff;
    --kleur-accent-zacht: #e8eef8;
    --kleur-goed: #1f7a3f;
    --kleur-fout: #b02020;
    --kleur-letop: #9a6b00;

    --letter: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --letter-kop: var(--letter);
    --tekst-basis: 15px;
    --tekst-klein: 13px;
    --tekst-groot: 19px;
    --regelafstand: 1.5;
    --kop-gewicht: 600;
    --kop-transform: none;
    --kop-spatie: 0;

    --ruimte: 16px;
    --ruimte-klein: 8px;
    --ruimte-groot: 28px;

    --hoek: 4px;
    --hoek-groot: 6px;
    --rand-dikte: 1px;
    --schaduw: none;
    --schaduw-zwaar: 0 2px 8px rgba(0,0,0,.10);

    --kop-hoogte: 56px;
    --zijbalk-breedte: 232px;
    --knop-hoogte: 40px;     
    --veld-hoogte: 40px;
    --tabel-regel: 40px;
    --tabel-streep: transparent;
    --tabel-lijn: var(--kleur-rand);
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    background: var(--kleur-achtergrond);
    color: var(--kleur-tekst);
    font-family: var(--letter);
    font-size: var(--tekst-basis);
    line-height: var(--regelafstand);
    -webkit-text-size-adjust: 100%;
}

h1, h2, h3 {
    font-family: var(--letter-kop);
    font-weight: var(--kop-gewicht);
    text-transform: var(--kop-transform);
    letter-spacing: var(--kop-spatie);
    color: var(--kleur-kop);
    margin: 0 0 var(--ruimte-klein) 0;
}
h1 { font-size: calc(var(--tekst-groot) * 1.25); }
h2 { font-size: var(--tekst-groot); }
h3 { font-size: var(--tekst-basis); }

a { color: var(--kleur-accent); }

.e-werkblad {
    grid-area: werk;
    padding: var(--ruimte-groot);
    padding-bottom: calc(var(--ruimte-groot) + 28px);   
    min-width: 0;   
}

.e-titelregel {
    display: flex;
    align-items: flex-end;
    gap: var(--ruimte);
    flex-wrap: wrap;
    margin-bottom: var(--ruimte);
}
.e-titelregel__knoppen { margin-left: auto; display: flex; gap: var(--ruimte-klein); }
.e-onderschrift { color: var(--kleur-tekst-zwak); font-size: var(--tekst-klein); margin: 0; }

.e-kaart {
    background: var(--kleur-vlak);
    border: var(--rand-dikte) solid var(--kleur-rand);
    border-radius: var(--hoek-groot);
    box-shadow: var(--schaduw);
    padding: var(--ruimte);
    margin-bottom: var(--ruimte);
}
.e-kaart__kop {
    display: flex;
    align-items: center;
    gap: var(--ruimte-klein);
    margin: calc(var(--ruimte) * -1) calc(var(--ruimte) * -1) var(--ruimte);
    padding: var(--ruimte-klein) var(--ruimte);
    border-bottom: var(--rand-dikte) solid var(--kleur-rand);
    background: var(--kleur-vlak-2);
    border-radius: var(--hoek-groot) var(--hoek-groot) 0 0;
    font-family: var(--letter-kop);
    font-weight: var(--kop-gewicht);
    text-transform: var(--kop-transform);
    letter-spacing: var(--kop-spatie);
}
.e-kaart__kop .e-knop { margin-left: auto; }

.e-rooster { display: grid; gap: var(--ruimte); grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.e-kental { background: var(--kleur-vlak); border: var(--rand-dikte) solid var(--kleur-rand);
            border-radius: var(--hoek-groot); box-shadow: var(--schaduw); padding: var(--ruimte); }
.e-kental__getal { font-family: var(--letter-kop); font-size: calc(var(--tekst-groot) * 1.9);
                   font-weight: var(--kop-gewicht); line-height: 1.1; color: var(--kleur-kop); }
.e-kental__naam { font-size: var(--tekst-klein); text-transform: uppercase; letter-spacing: .06em;
                  color: var(--kleur-tekst-zwak); }

.e-knop {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: var(--knop-hoogte);
    padding: 0 var(--ruimte);
    border: var(--rand-dikte) solid var(--kleur-rand-sterk);
    border-radius: var(--hoek);
    background: var(--kleur-vlak);
    color: var(--kleur-tekst);
    font: inherit;
    font-family: var(--letter-kop);
    text-transform: var(--knop-transform, none);
    letter-spacing: var(--knop-spatie, 0);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}
.e-knop:hover { background: var(--kleur-vlak-2); }
.e-knop:focus-visible { outline: 2px solid var(--kleur-accent); outline-offset: 2px; }
.e-knop--hoofd {
    background: var(--kleur-accent);
    border-color: var(--kleur-accent);
    color: var(--kleur-accent-tekst);
    font-weight: 600;
}
.e-knop--hoofd:hover { filter: brightness(.92); background: var(--kleur-accent); }
.e-knop--gevaar { border-color: var(--kleur-fout); color: var(--kleur-fout); }
.e-knop--klein { min-height: calc(var(--knop-hoogte) - 8px); padding: 0 var(--ruimte-klein); font-size: var(--tekst-klein); }
.e-knop[disabled], .e-knop--uit {
    opacity: .45;
    cursor: not-allowed;
    pointer-events: none;
}

.e-veldgroep { display: flex; flex-direction: column; gap: 4px; margin-bottom: var(--ruimte-klein); min-width: 0; }
.e-veldgroep > label { font-size: var(--tekst-klein); color: var(--kleur-tekst-zwak); }
.e-veld {
    width: 100%;
    min-height: var(--veld-hoogte);
    padding: 0 var(--ruimte-klein);
    border: var(--rand-dikte) solid var(--kleur-rand-sterk);
    border-radius: var(--hoek);
    background: var(--kleur-vlak);
    color: var(--kleur-tekst);
    font: inherit;
}
textarea.e-veld { padding: var(--ruimte-klein); line-height: var(--regelafstand); resize: vertical; }
.e-veld:focus { outline: 2px solid var(--kleur-accent); outline-offset: -1px; border-color: var(--kleur-accent); }
.e-veld[readonly], .e-veld[disabled] { background: var(--kleur-vlak-2); color: var(--kleur-tekst-zwak); }
.e-veld--fout { border-color: var(--kleur-fout); }
.e-veldfout { color: var(--kleur-fout); font-size: var(--tekst-klein); }
.e-veldhulp { color: var(--kleur-tekst-zwak); font-size: var(--tekst-klein); }

.e-vinkje { display: inline-flex; align-items: center; gap: var(--ruimte-klein); min-height: var(--knop-hoogte); cursor: pointer; }
.e-vinkje input { width: 18px; height: 18px; accent-color: var(--kleur-accent); }

.e-velden { display: grid; gap: var(--ruimte-klein) var(--ruimte); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.e-velden--breed { grid-column: 1 / -1; }

.e-tabelomhulsel { overflow-x: auto; border: var(--rand-dikte) solid var(--kleur-rand);
                   border-radius: var(--hoek-groot); background: var(--kleur-vlak); }
.e-tabel { width: 100%; border-collapse: collapse; font-size: var(--tekst-basis); }
.e-tabel th {
    text-align: left;
    padding: 0 var(--ruimte-klein);
    height: var(--tabel-regel);
    background: var(--kleur-vlak-2);
    border-bottom: var(--rand-dikte) solid var(--kleur-rand-sterk);
    font-family: var(--letter-kop);
    font-weight: var(--kop-gewicht);
    text-transform: var(--kop-transform);
    letter-spacing: var(--kop-spatie);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 5;
}
.e-tabel th a {
    color: inherit; text-decoration: none;
    display: flex; align-items: center; gap: 6px;
    min-height: var(--knop-hoogte);
}
.e-tabel th.getal a { justify-content: flex-end; flex-direction: row-reverse; }
.e-tabel th a:hover { color: var(--kleur-accent); }

.e-sorteer {
    display: inline-block;
    width: 1em;
    text-align: center;
    flex: none;
    opacity: .3;
    font-size: .85em;
}
.e-tabel th a:hover .e-sorteer { opacity: .7; }
.e-tabel th.sorteert { background: var(--kleur-accent-zacht); }
.e-tabel th.sorteert .e-sorteer { opacity: 1; color: var(--kleur-accent); }
.e-tabel th.sorteert a { color: var(--kleur-accent); }
.e-tabel td {
    padding: 0 var(--ruimte-klein);
    height: var(--tabel-regel);
    border-bottom: var(--rand-dikte) solid var(--tabel-lijn);
    vertical-align: middle;
}
.e-tabel tbody tr:nth-child(even) { background: var(--tabel-streep); }
.e-tabel tbody tr:hover { background: var(--kleur-accent-zacht); }
.e-tabel--klikbaar tbody tr { cursor: default; }
.e-tabel--klikbaar tbody tr:hover { cursor: pointer; }
.e-persoon[ondblclick]:hover { border-color: var(--kleur-accent); cursor: pointer; }
.e-tabel td.getal, .e-tabel th.getal { text-align: right; font-variant-numeric: tabular-nums; }
.e-tabel td.knoppen { text-align: right; white-space: nowrap; }

.e-leeg { padding: var(--ruimte-groot); text-align: center; color: var(--kleur-tekst-zwak); }

.e-etiket {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: var(--tekst-klein);
    border: var(--rand-dikte) solid var(--kleur-rand-sterk);
    background: var(--kleur-vlak-2);
    color: var(--kleur-tekst-zwak);
    white-space: nowrap;
}
.e-etiket--goed  { border-color: var(--kleur-goed); color: var(--kleur-goed); background: transparent; }
.e-etiket--letop { border-color: var(--kleur-letop); color: var(--kleur-letop); background: transparent; }
.e-etiket--accent{ border-color: var(--kleur-accent); color: var(--kleur-accent); background: var(--kleur-accent-zacht); }

.e-code {
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    letter-spacing: .05em;
    font-weight: 600;
}

.e-melding {
    display: flex;
    gap: var(--ruimte-klein);
    align-items: flex-start;
    padding: var(--ruimte-klein) var(--ruimte);
    border: var(--rand-dikte) solid var(--kleur-rand-sterk);
    border-left: 4px solid var(--kleur-rand-sterk);
    border-radius: var(--hoek);
    background: var(--kleur-vlak);
    margin-bottom: var(--ruimte);
}
.e-melding--goed  { border-color: var(--kleur-goed);  border-left-color: var(--kleur-goed); }
.e-melding--fout  { border-color: var(--kleur-fout);  border-left-color: var(--kleur-fout); }
.e-melding--letop { border-color: var(--kleur-letop); border-left-color: var(--kleur-letop); }

.e-dialoogscherm {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.42);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: var(--ruimte);
    overflow-y: auto;
    z-index: 40;
}
.e-dialoog {
    background: var(--kleur-vlak);
    border: var(--rand-dikte) solid var(--kleur-rand-sterk);
    border-radius: var(--hoek-groot);
    box-shadow: var(--schaduw-zwaar);
    width: min(760px, 100%);
    margin: var(--ruimte-groot) 0;
}
.e-dialoog__kop {
    display: flex; align-items: center; gap: var(--ruimte-klein);
    padding: var(--ruimte-klein) var(--ruimte);
    border-bottom: var(--rand-dikte) solid var(--kleur-rand);
    background: var(--kleur-vlak-2);
    border-radius: var(--hoek-groot) var(--hoek-groot) 0 0;
    font-family: var(--letter-kop);
    font-weight: var(--kop-gewicht);
    text-transform: var(--kop-transform);
    letter-spacing: var(--kop-spatie);
}
.e-dialoog__kop .e-knop { margin-left: auto; }
.e-dialoog__lijf { padding: var(--ruimte); }
.e-dialoog__voet {
    display: flex; gap: var(--ruimte-klein); justify-content: flex-end;
    padding: var(--ruimte-klein) var(--ruimte);
    border-top: var(--rand-dikte) solid var(--kleur-rand);
    background: var(--kleur-vlak-2);
    border-radius: 0 0 var(--hoek-groot) var(--hoek-groot);
}

.e-tabbladen { display: flex; gap: 2px; border-bottom: var(--rand-dikte) solid var(--kleur-rand); margin-bottom: var(--ruimte); flex-wrap: wrap; }
.e-tabblad {
    padding: 0 var(--ruimte);
    line-height: var(--knop-hoogte);
    border: var(--rand-dikte) solid transparent;
    border-bottom: 0;
    border-radius: var(--hoek) var(--hoek) 0 0;
    color: var(--kleur-tekst-zwak);
    text-decoration: none;
    cursor: pointer;
    background: none;
    font: inherit;
}
.e-tabblad:hover { color: var(--kleur-tekst); background: var(--kleur-vlak-2); }
.e-tabblad.actief {
    background: var(--kleur-vlak);
    border-color: var(--kleur-rand);
    color: var(--kleur-tekst);
    font-weight: 600;
    margin-bottom: calc(var(--rand-dikte) * -1);
    border-bottom: var(--rand-dikte) solid var(--kleur-vlak);
}

.e-balk { display: flex; gap: var(--ruimte-klein); align-items: center; flex-wrap: wrap; margin-bottom: var(--ruimte); }

.e-balk .e-veld { width: auto; min-width: 220px; }
.e-balk select.e-veld { min-width: 210px; max-width: 320px; }
.e-veldgroep select.e-veld { min-width: 100%; }
select.e-veld {
    padding-right: calc(var(--ruimte-klein) + 14px);
    
}
.e-balk__rechts { margin-left: auto; display: flex; gap: var(--ruimte-klein); align-items: center; }
.e-telling { color: var(--kleur-tekst-zwak); font-size: var(--tekst-klein); }

@media (max-width: 900px) {
    
    .e-werkblad { padding: var(--ruimte); padding-bottom: calc(var(--ruimte) + 28px); }
    
}
@media (max-width: 560px) {
    .e-velden { grid-template-columns: 1fr; }
    .e-titelregel__knoppen { margin-left: 0; width: 100%; }
}

@media print {
.e-titelregel__knoppen, .e-balk { display: none; }
}

.e-meesterdetail {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(360px, 1.4fr);
    gap: var(--ruimte);
    align-items: start;
}
.e-tabel tbody tr.gekozen {
    background: var(--kleur-accent-zacht);
    box-shadow: inset 3px 0 0 var(--kleur-accent);
}
@media (max-width: 1100px) {
    
    .e-meesterdetail { grid-template-columns: 1fr; }
}

.e-personen {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--ruimte);
}
.e-persoon {
    background: var(--kleur-vlak);
    border: var(--rand-dikte) solid var(--kleur-rand);
    border-radius: var(--hoek-groot);
    box-shadow: var(--schaduw);
    padding: var(--ruimte);
    display: flex;
    flex-direction: column;
    gap: var(--ruimte-klein);
}
.e-persoon__kop { display: flex; align-items: center; gap: var(--ruimte-klein); }
.e-persoon__letters {
    width: 38px; height: 38px; flex: none;
    display: flex; align-items: center; justify-content: center;
    border-radius: 999px;
    background: var(--kleur-accent-zacht);
    color: var(--kleur-accent);
    font-family: var(--letter-kop);
    font-weight: 700;
}
.e-persoon__naam { font-family: var(--letter-kop); font-weight: var(--kop-gewicht); }
.e-persoon__functie { font-size: var(--tekst-klein); color: var(--kleur-tekst-zwak); }
.e-persoon__kop .e-code { margin-left: auto; }
.e-persoon__regels {
    display: grid; grid-template-columns: 1fr 1fr; gap: 2px var(--ruimte-klein);
    font-size: var(--tekst-klein);
    padding-top: var(--ruimte-klein);
    border-top: var(--rand-dikte) solid var(--kleur-rand);
}
.e-persoon__breed { grid-column: 1 / -1; }
.e-persoon__label { color: var(--kleur-tekst-zwak); }
.e-persoon__voet { display: flex; align-items: center; gap: var(--ruimte-klein); margin-top: auto; }

.e-formuliervoet {
    display: flex; gap: var(--ruimte-klein); justify-content: flex-end;
    margin-top: var(--ruimte);
    padding-top: var(--ruimte-klein);
    border-top: var(--rand-dikte) solid var(--kleur-rand);
}

.e-lijstkop {
    display: flex;
    align-items: center;
    gap: var(--ruimte-klein);
    flex-wrap: wrap;
    margin-bottom: var(--ruimte-klein);
}
.e-filterlabels { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.e-zoek { position: relative; flex: 1 1 240px; min-width: 200px; max-width: 420px; }
.e-zoek .e-veld { width: 100%; }

.e-tabel tbody tr.uitdienst td:not(:last-child) { opacity: .62; }
.e-persoon.uitdienst { opacity: .72; }

.htmx-request .e-tabelomhulsel { opacity: .55; transition: opacity .1s; }

.e-terug {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: var(--knop-hoogte);
    padding: 0 var(--ruimte-klein) 0 6px;
    margin-bottom: var(--ruimte-klein);
    border: var(--rand-dikte) solid transparent;
    border-radius: var(--hoek);
    color: var(--kleur-tekst-zwak);
    text-decoration: none;
    font-size: var(--tekst-klein);
}
.e-terug:hover {
    background: var(--kleur-vlak);
    border-color: var(--kleur-rand);
    color: var(--kleur-tekst);
}
.e-terug::before { content: "←"; font-size: 1.15em; }

.e-rubriek__uitleg {
    margin-left: auto;
    font-size: var(--tekst-klein);
    font-weight: 400;
    color: var(--kleur-tekst-zwak);
}

.e-dashkop {
    display: flex;
    align-items: center;
    gap: var(--ruimte);
    flex-wrap: wrap;
    margin-bottom: var(--ruimte-klein);
}
.e-dashkop__titel {
    margin: 0;
    display: flex;
    align-items: baseline;
    gap: var(--ruimte-klein);
    flex-wrap: wrap;
}
.e-dashkop__bron {
    font-family: var(--letter);
    font-size: var(--tekst-klein);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--kleur-tekst-zwak);
}
.e-dashkop__balk {
    display: flex;
    gap: var(--ruimte-klein);
    align-items: center;
    flex-wrap: wrap;
    margin-left: auto;
}
.e-dashkop__balk .e-veld { width: auto; min-height: 32px; }
.e-dashkop__balk .e-zoek { flex: 0 1 220px; min-width: 160px; }

.e-rubrieken {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 var(--ruimte);
    align-items: start;
}
.e-rubriek[data-breed="2"] { grid-column: 1 / -1; }
@media (max-width: 1100px) {
    .e-rubrieken { grid-template-columns: 1fr; }
    .e-rubriek[data-breed="2"] { grid-column: auto; }
}

.e-rubriek { margin-bottom: var(--ruimte); min-width: 0; }

.e-rubriek__kop {
    display: flex;
    align-items: baseline;
    gap: var(--ruimte-klein);
    margin: 0 0 7px;
    padding-bottom: 4px;
    border-bottom: 2px solid var(--kleur-rand);
    font-family: var(--letter-kop);
    font-size: var(--tekst-groot);
    font-weight: var(--kop-gewicht);
    text-transform: none;
    letter-spacing: -.01em;
    color: var(--kleur-kop);
}
.e-rubriek__kop .e-telling {
    font-family: var(--letter);
    font-weight: 400;
    font-size: var(--tekst-klein);
}
.e-rubriek__uitleg {
    margin-left: auto;
    font-size: var(--tekst-klein);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--kleur-tekst-zwak);
}

.e-dashvoet {
    margin-top: var(--ruimte-groot);
    padding-top: var(--ruimte);
    border-top: 2px solid var(--kleur-rand);
}
.e-dashvoet .e-rooster { margin-bottom: var(--ruimte); }

.e-tegelrij {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(214px, 1fr));
    gap: 6px;
}

.e-modtegel {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 10px 8px;
    min-height: 62px;               
    background: var(--kleur-vlak);
    border: var(--rand-dikte) solid var(--kleur-rand);
    border-radius: var(--hoek-groot);
    box-shadow: var(--schaduw);
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}
a.e-modtegel:focus-visible { outline: 2px solid var(--kleur-accent); outline-offset: 2px; }

.e-modtegel.op-slot {
    opacity: 1;
    cursor: not-allowed;
    background: var(--kleur-vlak-2);
    border: 2px dashed var(--kleur-rand-sterk);
    color: var(--kleur-tekst-zwak);
    box-shadow: none;
}
.e-modtegel.op-slot .e-modtegel__naam,
.e-modtegel.op-slot .e-code { color: var(--kleur-tekst-zwak); }
.e-modtegel.op-slot .e-stip { background: var(--kleur-rand-sterk); }

.e-modtegel__kop { display: flex; align-items: center; gap: 5px; min-height: 16px; }
.e-modtegel .e-code { font-size: var(--tekst-klein); }
.e-modtegel__prio {
    display: inline-flex; align-items: center; justify-content: center;
    width: 15px; height: 15px; border-radius: 999px;
    background: var(--kleur-accent); color: var(--kleur-accent-tekst);
    font-size: 10px; font-weight: 700; line-height: 1;
}
.e-modtegel__slotje::before { content: "\1F512"; font-size: 11px; }

.e-modtegel__extern::before { content: "\2197"; font-size: 12px; color: var(--kleur-accent); }
.e-modtegel.heeft-link .e-code { text-decoration: underline; text-underline-offset: 2px; }

.e-modtegel__loc {
    margin-left: auto;
    font-size: 11px;
    color: var(--kleur-tekst-zwak);
    white-space: nowrap;
}

.e-modtegel__naam {
    font-family: var(--letter-kop);
    font-weight: var(--kop-gewicht);
    line-height: 1.12;
    margin-top: 1px;
    overflow-wrap: anywhere;
    
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.25;
    padding-bottom: 2px;
}
.e-modtegel__naam--groot  { font-size: calc(var(--tekst-basis) * 2.00); }
.e-modtegel__naam--midden { font-size: calc(var(--tekst-basis) * 1.70); }
.e-modtegel__naam--lang   { font-size: calc(var(--tekst-basis) * 1.40); }

.e-modtegel__naam { margin-bottom: auto; }
.e-stip { width: 9px; height: 9px; border-radius: 999px; flex: none; background: var(--kleur-rand-sterk); }
.e-stip--draait { background: var(--kleur-goed); }
.e-stip--bezig  { background: var(--kleur-letop); }
.e-stip--todo   { background: var(--kleur-rand-sterk); }

.e-snelrij { display: flex; gap: var(--ruimte-klein); flex-wrap: wrap; }
.e-snel {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: var(--rand-dikte) solid var(--kleur-rand-sterk);
    border-radius: var(--hoek);
    background: var(--kleur-vlak);
    color: var(--kleur-tekst);
    text-decoration: none;
    font-size: var(--tekst-klein);
}
.e-snel:hover { border-color: var(--kleur-accent); color: var(--kleur-accent); }
.e-snel__naam { white-space: nowrap; max-width: 200px; overflow: hidden; text-overflow: ellipsis; }

.e-filterrij th { padding: 3px var(--ruimte-klein) 5px; background: var(--kleur-vlak-2); height: auto; }
.e-kolomfilter {
    width: 100%;
    min-height: 28px;
    padding: 0 6px;
    font-size: var(--tekst-klein);
    font-weight: 400;
    border-color: var(--kleur-rand);
}
.e-kolomfilter:focus { border-color: var(--kleur-accent); }

.e-keuze { position: relative; }
.e-keuze__veld { width: 100%; padding-right: 52px; cursor: pointer; }
.e-keuze__veld:focus { cursor: text; }

.e-keuze__wis, .e-keuze__pijl {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: none;
    cursor: pointer;
    padding: 0;
}
.e-keuze__wis {
    right: 26px;
    width: 22px; height: 22px;
    border-radius: var(--hoek);
    color: var(--kleur-tekst-zwak);
    font-size: 15px; line-height: 1;
}
.e-keuze__wis:hover { background: var(--kleur-vlak-2); color: var(--kleur-tekst); }
.e-keuze__pijl { right: 8px; width: 16px; height: 16px; }
.e-keuze__pijl::before {
    content: "";
    position: absolute;
    left: 3px; top: 6px;
    width: 0; height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--kleur-tekst-zwak);
}
.e-keuze__pijl:hover::before { border-top-color: var(--kleur-accent); }

.e-keuze__lijst {
    position: absolute;
    z-index: 45;
    left: 0; right: 0; top: calc(100% + 2px);
    margin: 0; padding: 4px 0;
    list-style: none;
    max-height: 260px;
    overflow-y: auto;
    background: var(--kleur-vlak);
    border: var(--rand-dikte) solid var(--kleur-rand-sterk);
    border-radius: var(--hoek);
    box-shadow: var(--schaduw-zwaar);
}
.e-keuze__regel {
    display: flex;
    align-items: center;
    gap: var(--ruimte-klein);
    padding: 5px var(--ruimte-klein);
    cursor: pointer;
    white-space: nowrap;
}
.e-keuze__regel:hover, .e-keuze__regel.aangewezen { background: var(--kleur-accent-zacht); }
.e-keuze__regel.gekozen { font-weight: 600; }
.e-keuze__regel.gekozen::after { content: "\2713"; margin-left: auto; color: var(--kleur-accent); }
.e-keuze__code {
    font-family: ui-monospace, Consolas, monospace;
    font-size: var(--tekst-klein);
    color: var(--kleur-tekst-zwak);
}
.e-keuze__leeg { padding: 8px var(--ruimte-klein); color: var(--kleur-tekst-zwak); font-size: var(--tekst-klein); }

.e-dialoog__lijf { overflow: visible; }

.e-veldstatus { margin-right: auto; min-height: 22px; display: flex; align-items: center; }
.e-veldmelding {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: var(--tekst-klein);
}
.e-veldmelding.goed { background: var(--kleur-accent-zacht); color: var(--kleur-goed); }
.e-veldmelding.goed::before { content: "\2713"; }
.e-veldmelding.fout { background: transparent; color: var(--kleur-fout); border: var(--rand-dikte) solid var(--kleur-fout); }
.e-veldmelding.fout::before { content: "!"; font-weight: 700; }

.e-boven {
    display: flex;
    align-items: center;
    gap: var(--ruimte-klein);
    padding: 0 var(--ruimte);
    height: var(--kop-hoogte);
    background: var(--kleur-kopbalk, var(--kleur-vlak));
    border-bottom: var(--rand-dikte) solid var(--kleur-rand);
    position: sticky;
    top: 0;
    z-index: 30;
}
.e-boven__merk { display: flex; align-items: center; }

.e-boven__logo { height: 34px; width: auto; display: block; }

.e-boven__streep {
    width: 1px; height: 26px;
    background: var(--kleur-rand-sterk);
    margin: 0 var(--ruimte-groot) 0 var(--ruimte);
    flex: none;
}

.e-boven__items { display: flex; gap: var(--ruimte-klein); align-items: center; }
.e-boven__item {
    display: flex; align-items: center;
    min-height: 34px;
    padding: 0 var(--ruimte);
    border: var(--rand-dikte) solid transparent;
    border-radius: 999px;
    color: var(--kleur-tekst);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    
    font-weight: 700;
}
.e-boven__item:hover {
    background: var(--kleur-vlak-2);
    border-color: var(--kleur-rand);
}
.e-boven__item.actief {
    background: var(--kleur-accent-zacht);
    border-color: var(--kleur-accent);
    color: var(--kleur-accent);
}
.e-boven__item.actief::after {
    content: "";
    position: absolute;
    left: 20%; right: 20%; bottom: -9px;
    height: 3px;
    border-radius: 2px;
    background: var(--kleur-accent);
}

.e-boven__rechts { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.e-boven__wie { font-size: var(--tekst-klein); color: var(--kleur-tekst-zwak); white-space: nowrap; }
.e-boven__knop {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border-radius: var(--hoek);
    color: var(--kleur-tekst-zwak);
}
.e-boven__knop:hover { background: var(--kleur-vlak-2); color: var(--kleur-accent); }

.e-tweede {
    display: flex;
    align-items: stretch;
    gap: var(--ruimte);
    padding: 5px var(--ruimte);
    background: var(--kleur-vlak-2);
    border-bottom: var(--rand-dikte) solid var(--kleur-rand);
    position: sticky;
    top: var(--kop-hoogte);
    z-index: 29;
    overflow: visible;
}
.e-tweede__main, .e-tweede__sub { display: flex; gap: 4px; align-items: stretch; }

.e-tweede__sub {
    padding-left: var(--ruimte-groot);
    margin-left: var(--ruimte-klein);
    border-left: var(--rand-dikte) solid var(--kleur-rand-sterk);
}

.e-tt {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 62px;
    padding: 4px 8px;
    border: var(--rand-dikte) solid transparent;
    
    border-radius: 10px;
    background: none;
    color: var(--kleur-tekst);
    text-decoration: none;
    font: inherit;
    font-size: var(--tekst-klein);
    cursor: pointer;
    white-space: nowrap;
}
.e-tt:hover { background: var(--kleur-vlak); border-color: var(--kleur-rand); }
.e-tt.actief { background: var(--kleur-accent-zacht); border-color: var(--kleur-accent); color: var(--kleur-accent); font-weight: 600; }

.e-teken { width: 20px; height: 20px; flex: none; }
.e-tt .e-teken { width: 20px; height: 20px; }
.e-tt--terug { color: var(--kleur-tekst-zwak); }

.e-tt__pijl {
    position: absolute; right: 4px; top: 4px;
    width: 0; height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 9px solid var(--kleur-accent);
    opacity: .85;
}
.e-tt--meer:hover .e-tt__pijl,
.e-tt--meer:focus-within .e-tt__pijl { opacity: 1; }

.e-tt--meer { padding-right: 20px; }

.e-tweede[data-stand="klein"] .e-tt--meer { padding-right: 12px; }
.e-tweede[data-stand="klein"] .e-tt__pijl { top: auto; bottom: 2px; right: 2px; }

.e-tt__lijst {
    display: none;
    position: absolute;
    left: 0; top: calc(100% + 2px);
    min-width: 200px;
    padding: 4px 0;
    background: var(--kleur-vlak);
    border: var(--rand-dikte) solid var(--kleur-rand-sterk);
    border-radius: var(--hoek);
    box-shadow: var(--schaduw-zwaar);
    z-index: 40;
}
.e-tt--meer:hover .e-tt__lijst, .e-tt--meer:focus-within .e-tt__lijst { display: block; }
.e-tt__lijst a {
    display: block;
    padding: 6px var(--ruimte);
    color: var(--kleur-tekst);
    text-decoration: none;
    text-align: left;
}
.e-tt__lijst a:hover { background: var(--kleur-accent-zacht); }
.e-tt__lijst a.actief { color: var(--kleur-accent); font-weight: 600; }

.e-tweede__knop {
    margin-left: auto;
    align-self: center;
    width: 26px; height: 26px;
    border: var(--rand-dikte) solid transparent;
    border-radius: var(--hoek);
    background: none;
    cursor: pointer;
    position: relative;
}
.e-tweede__knop:hover { background: var(--kleur-vlak); border-color: var(--kleur-rand); }
.e-tweede__knop::before {
    content: ""; position: absolute; left: 8px; top: 10px;
    width: 0; height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid var(--kleur-tekst-zwak);
}

.e-tweede[data-stand="klein"] .e-tt__woord { display: none; }
.e-tweede[data-stand="klein"] .e-tt { min-width: 40px; }

.e-tweede[data-stand="verborgen"] { padding: 0 var(--ruimte); }
.e-tweede[data-stand="verborgen"] .e-tweede__main,
.e-tweede[data-stand="verborgen"] .e-tweede__sub { display: none; }
.e-tweede[data-stand="verborgen"] .e-tweede__knop::before { border-top: 0; border-bottom: 5px solid var(--kleur-tekst-zwak); }

.e-werkblad { padding: var(--ruimte-groot); padding-bottom: calc(var(--ruimte-groot) + 28px); }

@media (max-width: 900px) {
    .e-boven__wie { display: none; }
    .e-tweede { overflow-x: auto; }
    .e-werkblad { padding: var(--ruimte); padding-bottom: calc(var(--ruimte) + 28px); }
}

.e-keuzerij { display: flex; gap: var(--ruimte-klein); flex-wrap: wrap; }
.e-keuzeknop {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: var(--knop-hoogte);
    padding: 0 var(--ruimte);
    border: 2px solid var(--kleur-rand-sterk);
    border-radius: var(--hoek-groot);
    background: var(--kleur-vlak);
    color: var(--kleur-tekst);
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}
.e-keuzeknop:hover { border-color: var(--kleur-accent); color: var(--kleur-accent); }
.e-keuzeknop.actief {
    background: var(--kleur-accent);
    border-color: var(--kleur-accent);
    color: var(--kleur-accent-tekst);
    font-weight: 600;
}
.e-keuzeknop.actief::before { content: "\2713"; }
.e-keuzeknop__code {
    font-family: ui-monospace, Consolas, monospace;
    font-size: var(--tekst-klein);
    opacity: .7;
}

.e-modtegel__icoon { display: inline-flex; color: var(--rub, var(--kleur-accent)); }
.e-modtegel__icoon .e-teken { width: 15px; height: 15px; }

.e-icoonrij { display: flex; flex-wrap: wrap; gap: var(--ruimte-klein); align-items: center; }
.e-icoonknop {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    width: 88px;
    padding: 8px 4px;
    border: 2px solid var(--kleur-rand);
    border-radius: var(--hoek-groot);
    background: var(--kleur-vlak);
    color: var(--kleur-tekst);
    text-decoration: none;
    font-size: var(--tekst-klein);
    text-align: center;
}
.e-icoonknop .e-teken { width: 26px; height: 26px; }
.e-icoonknop:hover { border-color: var(--kleur-accent); color: var(--kleur-accent); }
.e-icoonknop.actief {
    border-color: var(--kleur-accent);
    background: var(--kleur-accent-zacht);
    color: var(--kleur-accent);
    font-weight: 600;
}
.e-icoonknop__naam { line-height: 1.15; }

.e-koppeling {
    display: flex;
    align-items: center;
    gap: var(--ruimte-klein);
    flex-wrap: wrap;
    padding: var(--ruimte-klein) 0;
}
.e-koppeling__kant {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: var(--rand-dikte) solid var(--kleur-rand-sterk);
    border-radius: var(--hoek-groot);
    background: var(--kleur-vlak);
}
.e-koppeling__pijl { font-size: calc(var(--tekst-groot) * 1.2); color: var(--kleur-accent); }
.e-koppeling__lijst { margin: 4px 0 0; padding-left: var(--ruimte); font-size: var(--tekst-klein); }
.e-koppeling__lijst li { margin-bottom: 2px; }
.e-koppeling__lijst--niet { color: var(--kleur-tekst-zwak); }

.e-matrixvak {
    max-height: calc(100vh - 300px);
    overflow: auto;
    border: var(--rand-dikte) solid var(--kleur-rand);
    border-radius: var(--hoek-groot);
    background: var(--kleur-vlak);
}
.e-matrix { table-layout: auto; border-collapse: separate; border-spacing: 0; }
.e-matrix thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: var(--kleur-vlak-2);
}
.e-matrix__hoek {
    position: sticky;
    left: 0;
    z-index: 4;                       
    background: var(--kleur-vlak-2);
}
.e-matrix__item {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--kleur-vlak);
    border-right: var(--rand-dikte) solid var(--kleur-rand);
}
.e-matrix__hoek { min-width: 300px; }
.e-matrix__rol {
    width: 38px;
    padding: 0;
    vertical-align: bottom;
    height: 130px;
}
.e-matrix__rol span {
    display: block;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    white-space: nowrap;
    padding: 8px 0;
    font-size: var(--tekst-klein);
}
.e-matrix__item { vertical-align: top; padding-top: 8px; padding-bottom: 8px; }
.e-matrix__item .e-veldhulp { max-width: 420px; margin-top: 2px; }
.e-matrix__vak { text-align: center; padding: 4px; }

.e-vink {
    display: inline-block;
    width: 22px; height: 22px;
    border: 2px solid var(--kleur-rand-sterk);
    border-radius: var(--hoek);
    background: var(--kleur-vlak);
    cursor: pointer;
    padding: 0;
    position: relative;
}
button.e-vink:hover { border-color: var(--kleur-accent); }
.e-vink.aan { background: var(--kleur-accent); border-color: var(--kleur-accent); }
.e-vink.aan::after {
    content: "\2713";
    position: absolute;
    inset: 0;
    color: var(--kleur-accent-tekst);
    font-size: 14px;
    line-height: 18px;
    font-weight: 700;
}

.e-kopzoek {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 300px;
    padding: 0 14px;
    height: 34px;
    border: var(--rand-dikte) solid var(--kleur-rand-sterk);
    border-radius: 999px;
    background: var(--kleur-vlak);
    margin-right: var(--ruimte);
}
.e-kopzoek:focus-within { border-color: var(--kleur-accent); }
.e-kopzoek .e-teken { width: 17px; height: 17px; color: var(--kleur-tekst-zwak); }
.e-kopzoek__veld {
    border: 0; background: none; font: inherit;
    font-size: var(--tekst-basis);
    width: 100%; height: 100%;
    color: var(--kleur-tekst);
}
.e-kopzoek__veld:focus { outline: none; }

.e-tool {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 14px 4px 10px;
    
    border: var(--rand-dikte) solid var(--kleur-accent);
    border-radius: 999px;
    background: var(--kleur-accent-zacht);
    white-space: nowrap;
    flex: none;
}
.e-tool__icoon { display: inline-flex; color: var(--kleur-accent); }
.e-tool__icoon .e-teken { width: 24px; height: 24px; }
.e-tool__naam {
    font-family: var(--letter-kop);
    font-size: calc(var(--tekst-groot) * 1.1);
    font-weight: 700;
    color: var(--kleur-accent);
    letter-spacing: -.01em;
}
.e-tool__versie {
    font-size: var(--tekst-klein);
    color: var(--kleur-accent);
    opacity: .75;
    align-self: center;
}

@media (max-width: 1200px) {
    .e-tool__versie { display: none; }
    .e-kopzoek { min-width: 200px; }
}
@media (max-width: 900px) {
    .e-tool__naam { display: none; }
    .e-kopzoek { min-width: 130px; }
}

.e-etkinhoud table { width: 100%; border-collapse: collapse; margin: var(--ruimte-klein) 0; }
.e-etkinhoud th, .e-etkinhoud td {
    border: var(--rand-dikte) solid var(--kleur-rand);
    padding: 5px 9px;
    text-align: left;
    vertical-align: top;
    font-size: var(--tekst-klein);
}
.e-etkinhoud th { background: var(--kleur-vlak-2); font-weight: 600; }
.e-etkinhoud h3 { margin: var(--ruimte) 0 var(--ruimte-klein); font-size: var(--tekst-groot); }
.e-etkinhoud ul, .e-etkinhoud ol { padding-left: var(--ruimte-groot); }
.e-etkinhoud li { margin-bottom: 3px; }
.e-etksectie { scroll-margin-top: 120px; }
.e-etkveld { font-family: ui-monospace, Consolas, monospace; font-size: var(--tekst-klein); }

.e-rolrij { display: flex; flex-wrap: wrap; gap: 3px; }
.e-rolknop {
    padding: 2px 8px;
    border: var(--rand-dikte) solid var(--kleur-rand);
    border-radius: 999px;
    background: var(--kleur-vlak);
    color: var(--kleur-tekst-zwak);
    font: inherit;
    font-size: 11px;
    cursor: pointer;
}
.e-rolknop:hover { border-color: var(--kleur-accent); }
.e-rolknop.aan {
    background: var(--kleur-accent);
    border-color: var(--kleur-accent);
    color: var(--kleur-accent-tekst);
    font-weight: 600;
}

.e-qr { background: #fff; padding: var(--ruimte); border-radius: var(--hoek); display: inline-block; }
.e-qr svg { width: 210px; height: 210px; display: block; }
.e-reservecodes { display: flex; flex-wrap: wrap; gap: var(--ruimte-klein); margin-top: var(--ruimte); }
.e-reservecodes .e-code { font-size: var(--tekst-groot); padding: 6px 12px; }

.e-boven__nagemaakt {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--kleur-vlak-2);
    border: var(--rand-dikte) solid var(--kleur-rand);
    color: var(--kleur-tekst-zwak);
}

.e-balkproef { margin-bottom: var(--ruimte); max-width: 720px; }
.e-balkproef__balk {
    display: flex; align-items: center; gap: 10px;
    height: 34px; padding: 0 12px;
    border-radius: var(--hoek) var(--hoek) 0 0;
    font-size: var(--tekst-klein);
}
.e-balkproef__stip {
    width: 15px; height: 15px; border-radius: 4px; flex: none;
    background: var(--kleur-accent);
    border: 1px solid rgba(255,255,255,.5);
}
.e-balkproef__titel { flex: 1; }
.e-balkproef__knoppen { opacity: .8; letter-spacing: 2px; }
.e-balkproef__regel {
    display: flex; align-items: center; gap: var(--ruimte-klein);
    padding: 8px 12px;
    background: var(--kleur-vlak);
    border: var(--rand-dikte) solid var(--kleur-rand);
    border-top: 0;
    border-radius: 0 0 var(--hoek) var(--hoek);
    flex-wrap: wrap;
}
.e-balkproef__regel input[type="color"] {
    width: 44px; height: 30px; padding: 0; border: 0; background: none; cursor: pointer;
}

.e-tt--uit { opacity: .35; cursor: not-allowed; }

@media print {
    .e-boven, .e-tweede,
    .e-titelregel__knoppen, .knoppen, .e-formuliervoet { display: none !important; }
    .e-werkblad { padding: 0; }
    body { background: #fff; }
    .e-kaart, .e-tabelomhulsel { border: 0; box-shadow: none; padding: 0; }
    .e-tabel { font-size: 10pt; }
    tr, h1, h2, h3 { page-break-inside: avoid; }
    
    .e-matrixvak, .e-tabelomhulsel { max-height: none; overflow: visible; }
    .e-veld { border: 0; padding: 0; }
    a { color: inherit; text-decoration: none; }
}

.e-pdfhint {
    position: fixed;
    left: 50%; bottom: 24px;
    transform: translateX(-50%);
    z-index: 70;
    max-width: 460px;
    padding: 10px 16px;
    background: var(--kleur-accent-zacht);
    border: 2px solid var(--kleur-accent);
    border-radius: var(--hoek-groot);
    box-shadow: var(--schaduw-zwaar);
    font-size: var(--tekst-klein);
}
@media print { .e-pdfhint { display: none !important; } }
