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

:root {
    
    --color-background: #f4f5f6;
    --color-surface: #ffffff;
    --color-surface-2: #fafafa;
    --color-border: #d8d8d8;
    --color-border-strong: #b0b0b0;
    --color-text: #222222;
    --color-text-faint: #6b6b6b;
    --color-heading: #111111;
    --color-accent: #2f5fa8;
    --color-accent-text: #ffffff;
    --color-accent-soft: #e8eef8;
    --color-ok: #1f7a3f;
    --color-error: #b02020;
    --color-warning: #9a6b00;

    --font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --font-heading: var(--font);
    --text-base: 15px;
    --text-small: 13px;
    --text-large: 19px;
    --line-height: 1.5;
    --heading-weight: 600;
    --heading-transform: none;
    --heading-spacing: 0;

    --space: 16px;
    --space-small: 8px;
    --space-large: 28px;

    --radius: 4px;
    --radius-large: 6px;
    --border-width: 1px;
    --shadow: none;
    --shadow-heavy: 0 2px 8px rgba(0,0,0,.10);

    --topbar-height: 56px;
    --sidebar-width: 232px;
    --button-height: 40px;     
    --field-height: 40px;
    --table-row: 40px;
    --table-stripe: transparent;
    --table-line: var(--color-border);
}

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

body {
    background: var(--color-background);
    color: var(--color-text);
    font-family: var(--font);
    font-size: var(--text-base);
    line-height: var(--line-height);
    -webkit-text-size-adjust: 100%;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: var(--heading-weight);
    text-transform: var(--heading-transform);
    letter-spacing: var(--heading-spacing);
    color: var(--color-heading);
    margin: 0 0 var(--space-small) 0;
}
h1 { font-size: calc(var(--text-large) * 1.25); }
h2 { font-size: var(--text-large); }
h3 { font-size: var(--text-base); }

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

.e-worksheet {
    grid-area: werk;
    padding: var(--space-large);
    padding-bottom: calc(var(--space-large) + 28px);   
    min-width: 0;   
}

.e-titlerow {
    display: flex;
    align-items: flex-end;
    gap: var(--space);
    flex-wrap: wrap;
    margin-bottom: var(--space);
}
.e-titlerow__buttons { margin-left: auto; display: flex; gap: var(--space-small); }
.e-caption { color: var(--color-text-faint); font-size: var(--text-small); margin: 0; }

.e-card {
    background: var(--color-surface);
    border: var(--border-width) solid var(--color-border);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow);
    padding: var(--space);
    margin-bottom: var(--space);
}
.e-card__head {
    display: flex;
    align-items: center;
    gap: var(--space-small);
    margin: calc(var(--space) * -1) calc(var(--space) * -1) var(--space);
    padding: var(--space-small) var(--space);
    border-bottom: var(--border-width) solid var(--color-border);
    background: var(--color-surface-2);
    border-radius: var(--radius-large) var(--radius-large) 0 0;
    font-family: var(--font-heading);
    font-weight: var(--heading-weight);
    text-transform: var(--heading-transform);
    letter-spacing: var(--heading-spacing);
}
.e-card__head .e-button { margin-left: auto; }

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

.e-figure { background: var(--color-surface); border: var(--border-width) solid var(--color-border);
            border-radius: var(--radius-large); box-shadow: var(--shadow); padding: var(--space); }
.e-figure__number { font-family: var(--font-heading); font-size: calc(var(--text-large) * 1.9);
                   font-weight: var(--heading-weight); line-height: 1.1; color: var(--color-heading); }
.e-figure__name { font-size: var(--text-small); text-transform: uppercase; letter-spacing: .06em;
                  color: var(--color-text-faint); }

.e-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: var(--button-height);
    padding: 0 var(--space);
    border: var(--border-width) solid var(--color-border-strong);
    border-radius: var(--radius);
    background: var(--color-surface);
    color: var(--color-text);
    font: inherit;
    font-family: var(--font-heading);
    text-transform: var(--button-transform, none);
    letter-spacing: var(--button-spacing, 0);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}
.e-button:hover { background: var(--color-surface-2); }
.e-button:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.e-button--main {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-accent-text);
    font-weight: 600;
}
.e-button--main:hover { filter: brightness(.92); background: var(--color-accent); }
.e-button--danger { border-color: var(--color-error); color: var(--color-error); }
.e-button--small { min-height: calc(var(--button-height) - 8px); padding: 0 var(--space-small); font-size: var(--text-small); }
.e-button[disabled], .e-button--off {
    opacity: .45;
    cursor: not-allowed;
    pointer-events: none;
}

.e-fieldgroup { display: flex; flex-direction: column; gap: 4px; margin-bottom: var(--space-small); min-width: 0; }
.e-fieldgroup > label { font-size: var(--text-small); color: var(--color-text-faint); }
.e-field {
    width: 100%;
    min-height: var(--field-height);
    padding: 0 var(--space-small);
    border: var(--border-width) solid var(--color-border-strong);
    border-radius: var(--radius);
    background: var(--color-surface);
    color: var(--color-text);
    font: inherit;
}
textarea.e-field { padding: var(--space-small); line-height: var(--line-height); resize: vertical; }
.e-field:focus { outline: 2px solid var(--color-accent); outline-offset: -1px; border-color: var(--color-accent); }
.e-field[readonly], .e-field[disabled] { background: var(--color-surface-2); color: var(--color-text-faint); }
.e-field--error { border-color: var(--color-error); }
.e-fielderror { color: var(--color-error); font-size: var(--text-small); }
.e-fieldhelp { color: var(--color-text-faint); font-size: var(--text-small); }

.e-checkbox { display: inline-flex; align-items: center; gap: var(--space-small); min-height: var(--button-height); cursor: pointer; }
.e-checkbox input { width: 18px; height: 18px; accent-color: var(--color-accent); }

.e-fields { display: grid; gap: var(--space-small) var(--space); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.e-fields--wide { grid-column: 1 / -1; }

.e-tablewrap { overflow-x: auto; border: var(--border-width) solid var(--color-border);
                   border-radius: var(--radius-large); background: var(--color-surface); }

.e-listbox {
    max-height: var(--listbox-height, calc(100vh - 330px));
    overflow: auto;
    
    scrollbar-gutter: stable;
}
.e-listbox .e-table { margin: 0; }
.e-listbox .e-filterrow th { top: var(--listhead-height, var(--table-row)); z-index: 4; }
.e-table { width: 100%; border-collapse: collapse; font-size: var(--text-base); }
.e-table th {
    text-align: left;
    padding: 0 var(--space-small);
    height: var(--table-row);
    background: var(--color-surface-2);
    border-bottom: var(--border-width) solid var(--color-border-strong);
    font-family: var(--font-heading);
    font-weight: var(--heading-weight);
    text-transform: var(--heading-transform);
    letter-spacing: var(--heading-spacing);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 5;
}
.e-table th a {
    color: inherit; text-decoration: none;
    display: flex; align-items: center; gap: 6px;
    min-height: var(--button-height);
}
.e-table th.getal a { justify-content: flex-end; flex-direction: row-reverse; }
.e-table th a:hover { color: var(--color-accent); }

.e-sort {
    display: inline-block;
    width: 1em;
    text-align: center;
    flex: none;
    opacity: .3;
    font-size: .85em;
}
.e-table th a:hover .e-sort { opacity: .7; }
.e-table th.sorteert { background: var(--color-accent-soft); }
.e-table th.sorteert .e-sort { opacity: 1; color: var(--color-accent); }
.e-table th.sorteert a { color: var(--color-accent); }
.e-table td {
    padding: 0 var(--space-small);
    height: var(--table-row);
    border-bottom: var(--border-width) solid var(--table-line);
    vertical-align: middle;
}
.e-table tbody tr:nth-child(even) { background: var(--table-stripe); }
.e-table tbody tr:hover { background: var(--color-accent-soft); }
.e-table--clickable tbody tr { cursor: default; }
.e-table--clickable tbody tr:hover { cursor: pointer; }
.e-person[ondblclick]:hover { border-color: var(--color-accent); cursor: pointer; }
.e-table td.getal, .e-table th.getal { text-align: right; font-variant-numeric: tabular-nums; }

.e-table .smal { width: 1%; white-space: nowrap; text-align: center; padding-left: 6px; padding-right: 6px; font-variant-numeric: tabular-nums; }
.e-table th.smal a { justify-content: center; }
.e-table td.knoppen { text-align: right; white-space: nowrap; }

.e-empty { padding: var(--space-large); text-align: center; color: var(--color-text-faint); }

.e-tag {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: var(--text-small);
    border: var(--border-width) solid var(--color-border-strong);
    background: var(--color-surface-2);
    color: var(--color-text-faint);
    white-space: nowrap;
}
.e-tag--ok  { border-color: var(--color-ok); color: var(--color-ok); background: transparent; }
.e-tag--warning { border-color: var(--color-warning); color: var(--color-warning); background: transparent; }
.e-tag--accent{ border-color: var(--color-accent); color: var(--color-accent); background: var(--color-accent-soft); }

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

.e-message {
    display: flex;
    gap: var(--space-small);
    align-items: flex-start;
    padding: var(--space-small) var(--space);
    border: var(--border-width) solid var(--color-border-strong);
    border-left: 4px solid var(--color-border-strong);
    border-radius: var(--radius);
    background: var(--color-surface);
    margin-bottom: var(--space);
}
.e-message--ok  { border-color: var(--color-ok);  border-left-color: var(--color-ok); }
.e-message--error  { border-color: var(--color-error);  border-left-color: var(--color-error); }
.e-message--warning { border-color: var(--color-warning); border-left-color: var(--color-warning); }

.e-dialogscreen {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.42);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: var(--space);
    overflow-y: auto;
    z-index: 40;
}
.e-dialog {
    background: var(--color-surface);
    border: var(--border-width) solid var(--color-border-strong);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-heavy);
    width: min(760px, 100%);
    margin: var(--space-large) 0;
    
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 2 * var(--space) - 2 * var(--space-large));
    resize: both;
    overflow: hidden;
    min-width: 360px;
    min-height: 200px;
    max-width: 100%;
}
.e-dialog__head { flex: none; }
.e-dialog__foot { flex: none; }
.e-dialog__head {
    display: flex; align-items: center; gap: var(--space-small);
    padding: var(--space-small) var(--space);
    border-bottom: var(--border-width) solid var(--color-border);
    background: var(--color-surface-2);
    border-radius: var(--radius-large) var(--radius-large) 0 0;
    font-family: var(--font-heading);
    font-weight: var(--heading-weight);
    text-transform: var(--heading-transform);
    letter-spacing: var(--heading-spacing);
}
.e-dialog__head .e-button { margin-left: auto; }
.e-dialog__body { padding: var(--space); }
.e-dialog__foot {
    display: flex; gap: var(--space-small); justify-content: flex-end;
    padding: var(--space-small) var(--space);
    border-top: var(--border-width) solid var(--color-border);
    background: var(--color-surface-2);
    border-radius: 0 0 var(--radius-large) var(--radius-large);
}

.e-tabs { display: flex; gap: 2px; border-bottom: var(--border-width) solid var(--color-border); margin-bottom: var(--space); flex-wrap: wrap; }
.e-tab {
    padding: 0 var(--space);
    line-height: var(--button-height);
    border: var(--border-width) solid transparent;
    border-bottom: 0;
    border-radius: var(--radius) var(--radius) 0 0;
    color: var(--color-text-faint);
    text-decoration: none;
    cursor: pointer;
    background: none;
    font: inherit;
}
.e-tab:hover { color: var(--color-text); background: var(--color-surface-2); }
.e-tab.actief {
    background: var(--color-surface);
    border-color: var(--color-border);
    color: var(--color-text);
    font-weight: 600;
    margin-bottom: calc(var(--border-width) * -1);
    border-bottom: var(--border-width) solid var(--color-surface);
}

.e-bar { display: flex; gap: var(--space-small); align-items: center; flex-wrap: wrap; margin-bottom: var(--space); }

.e-bar .e-field { width: auto; min-width: 220px; }
.e-bar select.e-field { min-width: 210px; max-width: 320px; }
.e-fieldgroup select.e-field { min-width: 100%; }
select.e-field {
    padding-right: calc(var(--space-small) + 14px);
    
}
.e-bar__right { margin-left: auto; display: flex; gap: var(--space-small); align-items: center; }
.e-count { color: var(--color-text-faint); font-size: var(--text-small); }

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

@media print {
.e-titlerow__buttons, .e-bar { display: none; }
}

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

.e-people {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space);
}
.e-person {
    background: var(--color-surface);
    border: var(--border-width) solid var(--color-border);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow);
    padding: var(--space);
    display: flex;
    flex-direction: column;
    gap: var(--space-small);
}
.e-person__head { display: flex; align-items: center; gap: var(--space-small); }
.e-person__initials {
    width: 38px; height: 38px; flex: none;
    display: flex; align-items: center; justify-content: center;
    border-radius: 999px;
    background: var(--color-accent-soft);
    color: var(--color-accent);
    font-family: var(--font-heading);
    font-weight: 700;
}
.e-person__name { font-family: var(--font-heading); font-weight: var(--heading-weight); }
.e-person__position { font-size: var(--text-small); color: var(--color-text-faint); }
.e-person__head .e-code { margin-left: auto; }
.e-person__rows {
    display: grid; grid-template-columns: 1fr 1fr; gap: 2px var(--space-small);
    font-size: var(--text-small);
    padding-top: var(--space-small);
    border-top: var(--border-width) solid var(--color-border);
}
.e-person__wide { grid-column: 1 / -1; }
.e-person__label { color: var(--color-text-faint); }
.e-person__foot { display: flex; align-items: center; gap: var(--space-small); margin-top: auto; }

.e-formfoot {
    display: flex; gap: var(--space-small); justify-content: flex-end;
    margin-top: var(--space);
    padding-top: var(--space-small);
    border-top: var(--border-width) solid var(--color-border);
}

.e-listhead {
    display: flex;
    align-items: center;
    gap: var(--space-small);
    flex-wrap: wrap;
    margin-bottom: var(--space-small);
}
.e-filterlabels { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.e-search { position: relative; flex: 1 1 240px; min-width: 200px; max-width: 420px; }
.e-search .e-field { width: 100%; }

.e-suggestbox { position: relative; }
.e-voorstel {
    position: absolute; z-index: 20; left: 0; top: 100%; min-width: 24em; max-width: 44em;
    list-style: none; margin: 2px 0 0; padding: 0; max-height: 26rem; overflow: auto;
    background: var(--color-surface); border: var(--border-width) solid var(--color-border-strong); border-radius: var(--radius);
    box-shadow: var(--shadow-heavy);
}
.e-voorstel li + li { border-top: 1px solid var(--color-border); }
.e-suggest__button {
    display: flex; gap: 6px; align-items: baseline; width: 100%;
    border: 0; background: none; cursor: pointer; text-align: left;
    padding: 4px 8px; font: inherit; font-size: var(--text-small); color: inherit;
}
.e-suggest__button:hover { background: var(--color-surface-2); }
.e-suggest__name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.e-picker .e-picker__field { width: 100%; padding-right: 30px; }
.e-picker .e-picker__clear { right: 6px; }
.e-picker .e-voorstel { min-width: 100%; }

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

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

.e-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: var(--button-height);
    padding: 0 var(--space-small) 0 6px;
    margin-bottom: var(--space-small);
    border: var(--border-width) solid transparent;
    border-radius: var(--radius);
    color: var(--color-text-faint);
    text-decoration: none;
    font-size: var(--text-small);
}
.e-back:hover {
    background: var(--color-surface);
    border-color: var(--color-border);
    color: var(--color-text);
}
.e-back::before { content: "←"; font-size: 1.15em; }

.e-section__note {
    margin-left: auto;
    font-size: var(--text-small);
    font-weight: 400;
    color: var(--color-text-faint);
}

.e-dashhead {
    display: flex;
    align-items: center;
    gap: var(--space);
    flex-wrap: wrap;
    margin-bottom: var(--space-small);
}
.e-dashhead__title {
    margin: 0;
    display: flex;
    align-items: baseline;
    gap: var(--space-small);
    flex-wrap: wrap;
}
.e-dashhead__source {
    font-family: var(--font);
    font-size: var(--text-small);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--color-text-faint);
}
.e-dashhead__bar {
    display: flex;
    gap: var(--space-small);
    align-items: center;
    flex-wrap: wrap;
    margin-left: auto;
}
.e-dashhead__bar .e-field { width: auto; min-height: 32px; }
.e-dashhead__bar .e-search { flex: 0 1 220px; min-width: 160px; }

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

.e-section { margin-bottom: var(--space); min-width: 0; }

.e-section__head {
    display: flex;
    align-items: baseline;
    gap: var(--space-small);
    margin: 0 0 7px;
    padding-bottom: 4px;
    border-bottom: 2px solid var(--color-border);
    font-family: var(--font-heading);
    font-size: var(--text-large);
    font-weight: var(--heading-weight);
    text-transform: none;
    letter-spacing: -.01em;
    color: var(--color-heading);
}
.e-section__head .e-count {
    font-family: var(--font);
    font-weight: 400;
    font-size: var(--text-small);
}
.e-section__note {
    margin-left: auto;
    font-size: var(--text-small);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--color-text-faint);
}

.e-dashfoot {
    margin-top: var(--space-large);
    padding-top: var(--space);
    border-top: 2px solid var(--color-border);
}
.e-dashfoot .e-grid { margin-bottom: var(--space); }

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

.e-modtile {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 10px 8px;
    min-height: 62px;               
    background: var(--color-surface);
    border: var(--border-width) solid var(--color-border);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow);
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}
a.e-modtile:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.e-modtile.op-slot {
    opacity: 1;
    cursor: not-allowed;
    background: var(--color-surface-2);
    border: 2px dashed var(--color-border-strong);
    color: var(--color-text-faint);
    box-shadow: none;
}
.e-modtile.op-slot .e-modtile__name,
.e-modtile.op-slot .e-code { color: var(--color-text-faint); }
.e-modtile.op-slot .e-dot { background: var(--color-border-strong); }

.e-modtile__head { display: flex; align-items: center; gap: 5px; min-height: 16px; }
.e-modtile .e-code { font-size: var(--text-small); }
.e-modtile__prio {
    display: inline-flex; align-items: center; justify-content: center;
    width: 15px; height: 15px; border-radius: 999px;
    background: var(--color-accent); color: var(--color-accent-text);
    font-size: 10px; font-weight: 700; line-height: 1;
}
.e-modtile__lock::before { content: "\1F512"; font-size: 11px; }

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

.e-modtile__loc {
    margin-left: auto;
    font-size: 11px;
    color: var(--color-text-faint);
    white-space: nowrap;
}

.e-modtile__name {
    font-family: var(--font-heading);
    font-weight: var(--heading-weight);
    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-modtile__name--large  { font-size: calc(var(--text-base) * 2.00); }
.e-modtile__name--mid { font-size: calc(var(--text-base) * 1.70); }
.e-modtile__name--long   { font-size: calc(var(--text-base) * 1.40); }

.e-modtile__name { margin-bottom: auto; }
.e-dot { width: 9px; height: 9px; border-radius: 999px; flex: none; background: var(--color-border-strong); }
.e-dot--running { background: var(--color-ok); }
.e-dot--busy  { background: var(--color-warning); }
.e-dot--todo   { background: var(--color-border-strong); }

.e-quickrow { display: flex; gap: var(--space-small); flex-wrap: wrap; }
.e-quick {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: var(--border-width) solid var(--color-border-strong);
    border-radius: var(--radius);
    background: var(--color-surface);
    color: var(--color-text);
    text-decoration: none;
    font-size: var(--text-small);
}
.e-quick:hover { border-color: var(--color-accent); color: var(--color-accent); }
.e-quick__name { white-space: nowrap; max-width: 200px; overflow: hidden; text-overflow: ellipsis; }

.e-filterrow th { padding: 3px var(--space-small) 5px; background: var(--color-surface-2); height: auto; }
.e-columnfilter {
    width: 100%;
    min-height: 28px;
    padding: 0 6px;
    font-size: var(--text-small);
    font-weight: 400;
    border-color: var(--color-border);
}
.e-columnfilter:focus { border-color: var(--color-accent); }

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

.e-choice__clear, .e-choice__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: none;
    cursor: pointer;
    padding: 0;
}
.e-choice__clear {
    right: 26px;
    width: 22px; height: 22px;
    border-radius: var(--radius);
    color: var(--color-text-faint);
    font-size: 15px; line-height: 1;
}
.e-choice__clear:hover { background: var(--color-surface-2); color: var(--color-text); }
.e-choice__arrow { right: 8px; width: 16px; height: 16px; }
.e-choice__arrow::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(--color-text-faint);
}
.e-choice__arrow:hover::before { border-top-color: var(--color-accent); }

.e-choice__list {
    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(--color-surface);
    border: var(--border-width) solid var(--color-border-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow-heavy);
}
.e-choice__row {
    display: flex;
    align-items: center;
    gap: var(--space-small);
    padding: 5px var(--space-small);
    cursor: pointer;
    white-space: nowrap;
}
.e-choice__row:hover, .e-choice__row.aangewezen { background: var(--color-accent-soft); }
.e-choice__row.gekozen { font-weight: 600; }
.e-choice__row.gekozen::after { content: "\2713"; margin-left: auto; color: var(--color-accent); }
.e-choice__code {
    font-family: ui-monospace, Consolas, monospace;
    font-size: var(--text-small);
    color: var(--color-text-faint);
}
.e-choice__empty { padding: 8px var(--space-small); color: var(--color-text-faint); font-size: var(--text-small); }

.e-dialog__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }

.e-fieldstatus { margin-right: auto; min-height: 22px; display: flex; align-items: center; }
.e-fieldmessage {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: var(--text-small);
}
.e-fieldmessage.goed { background: var(--color-accent-soft); color: var(--color-ok); }
.e-fieldmessage.goed::before { content: "\2713"; }
.e-fieldmessage.fout { background: transparent; color: var(--color-error); border: var(--border-width) solid var(--color-error); }
.e-fieldmessage.fout::before { content: "!"; font-weight: 700; }

.e-top {
    display: flex;
    align-items: center;
    gap: var(--space-small);
    padding: 0 var(--space);
    height: var(--topbar-height);
    background: var(--color-topbar, var(--color-surface));
    border-bottom: var(--border-width) solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 30;
}
.e-top__brand { display: flex; align-items: center; }

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

.e-top__rule {
    width: 1px; height: 26px;
    background: var(--color-border-strong);
    margin: 0 var(--space-large) 0 var(--space);
    flex: none;
}

.e-top__items { display: flex; gap: var(--space-small); align-items: center; }
.e-top__item {
    display: flex; align-items: center;
    min-height: 34px;
    padding: 0 var(--space);
    border: var(--border-width) solid transparent;
    border-radius: 999px;
    color: var(--color-text);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    
    font-weight: 700;
}
.e-top__item:hover {
    background: var(--color-surface-2);
    border-color: var(--color-border);
}
.e-top__item.actief {
    background: var(--color-accent-soft);
    border-color: var(--color-accent);
    color: var(--color-accent);
}
.e-top__item.actief::after {
    content: "";
    position: absolute;
    left: 20%; right: 20%; bottom: -9px;
    height: 3px;
    border-radius: 2px;
    background: var(--color-accent);
}

.e-top__right { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.e-top__who { font-size: var(--text-small); color: var(--color-text-faint); white-space: nowrap; }
.e-top__button {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border-radius: var(--radius);
    color: var(--color-text-faint);
}
.e-top__button:hover { background: var(--color-surface-2); color: var(--color-accent); }

.e-second {
    display: flex;
    align-items: stretch;
    gap: var(--space);
    padding: 5px var(--space);
    background: var(--color-surface-2);
    border-bottom: var(--border-width) solid var(--color-border);
    position: sticky;
    top: var(--topbar-height);
    z-index: 29;
    overflow: visible;
}
.e-second__main, .e-second__sub { display: flex; gap: 4px; align-items: stretch; }

.e-second__sub {
    padding-left: var(--space-large);
    margin-left: var(--space-small);
    border-left: var(--border-width) solid var(--color-border-strong);
}

.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(--border-width) solid transparent;
    
    border-radius: 10px;
    background: none;
    color: var(--color-text);
    text-decoration: none;
    font: inherit;
    font-size: var(--text-small);
    cursor: pointer;
    white-space: nowrap;
}
.e-tt:hover { background: var(--color-surface); border-color: var(--color-border); }
.e-tt.actief { background: var(--color-accent-soft); border-color: var(--color-accent); color: var(--color-accent); font-weight: 600; }

.e-icon { width: 20px; height: 20px; flex: none; }
.e-tt .e-icon { width: 20px; height: 20px; }
.e-tt--back { color: var(--color-text-faint); }

.e-tt__arrow {
    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(--color-accent);
    opacity: .85;
}
.e-tt--more:hover .e-tt__arrow,
.e-tt--more:focus-within .e-tt__arrow { opacity: 1; }

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

.e-second[data-stand="klein"] .e-tt--more { padding-right: 12px; }
.e-second[data-stand="klein"] .e-tt__arrow { top: auto; bottom: 2px; right: 2px; }

.e-tt__list {
    display: none;
    position: absolute;
    left: 0; top: calc(100% + 2px);
    min-width: 200px;
    padding: 4px 0;
    background: var(--color-surface);
    border: var(--border-width) solid var(--color-border-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow-heavy);
    z-index: 40;
}
.e-tt--more:hover .e-tt__list, .e-tt--more:focus-within .e-tt__list { display: block; }
.e-tt__list a {
    display: block;
    padding: 6px var(--space);
    color: var(--color-text);
    text-decoration: none;
    text-align: left;
}
.e-tt__list a:hover { background: var(--color-accent-soft); }
.e-tt__list a.actief { color: var(--color-accent); font-weight: 600; }

.e-second__button {
    margin-left: auto;
    align-self: center;
    width: 26px; height: 26px;
    border: var(--border-width) solid transparent;
    border-radius: var(--radius);
    background: none;
    cursor: pointer;
    position: relative;
}
.e-second__button:hover { background: var(--color-surface); border-color: var(--color-border); }
.e-second__button::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(--color-text-faint);
}

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

.e-second[data-stand="verborgen"] { padding: 0 var(--space); }
.e-second[data-stand="verborgen"] .e-second__main,
.e-second[data-stand="verborgen"] .e-second__sub { display: none; }
.e-second[data-stand="verborgen"] .e-second__button::before { border-top: 0; border-bottom: 5px solid var(--color-text-faint); }

.e-worksheet { padding: var(--space-large); padding-bottom: calc(var(--space-large) + 28px); }

@media (max-width: 900px) {
    .e-top__who { display: none; }
    .e-second { overflow-x: auto; }
    .e-worksheet { padding: var(--space); padding-bottom: calc(var(--space) + 28px); }
}

.e-choicerow { display: flex; gap: var(--space-small); flex-wrap: wrap; }
.e-choicebutton {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: var(--button-height);
    padding: 0 var(--space);
    border: 2px solid var(--color-border-strong);
    border-radius: var(--radius-large);
    background: var(--color-surface);
    color: var(--color-text);
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}
.e-choicebutton:hover { border-color: var(--color-accent); color: var(--color-accent); }
.e-choicebutton.actief {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-accent-text);
    font-weight: 600;
}
.e-choicebutton.actief::before { content: "\2713"; }
.e-choicebutton__code {
    font-family: ui-monospace, Consolas, monospace;
    font-size: var(--text-small);
    opacity: .7;
}

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

.e-iconrow { display: flex; flex-wrap: wrap; gap: var(--space-small); align-items: center; }
.e-iconbutton {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    width: 88px;
    padding: 8px 4px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-large);
    background: var(--color-surface);
    color: var(--color-text);
    text-decoration: none;
    font-size: var(--text-small);
    text-align: center;
}
.e-iconbutton .e-icon { width: 26px; height: 26px; }
.e-iconbutton:hover { border-color: var(--color-accent); color: var(--color-accent); }
.e-iconbutton.actief {
    border-color: var(--color-accent);
    background: var(--color-accent-soft);
    color: var(--color-accent);
    font-weight: 600;
}
.e-iconbutton__name { line-height: 1.15; }

.e-link {
    display: flex;
    align-items: center;
    gap: var(--space-small);
    flex-wrap: wrap;
    padding: var(--space-small) 0;
}
.e-link__side {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: var(--border-width) solid var(--color-border-strong);
    border-radius: var(--radius-large);
    background: var(--color-surface);
}
.e-link__arrow { font-size: calc(var(--text-large) * 1.2); color: var(--color-accent); }
.e-link__list { margin: 4px 0 0; padding-left: var(--space); font-size: var(--text-small); }
.e-link__list li { margin-bottom: 2px; }
.e-link__list--none { color: var(--color-text-faint); }

.e-matrixbox {
    max-height: calc(100vh - 300px);
    overflow: auto;
    border: var(--border-width) solid var(--color-border);
    border-radius: var(--radius-large);
    background: var(--color-surface);
}
.e-matrix { table-layout: auto; border-collapse: separate; border-spacing: 0; }
.e-matrix thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: var(--color-surface-2);
}
.e-matrix__corner {
    position: sticky;
    left: 0;
    z-index: 4;                       
    background: var(--color-surface-2);
}
.e-matrix__item {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--color-surface);
    border-right: var(--border-width) solid var(--color-border);
}
.e-matrix__corner { min-width: 300px; }
.e-matrix__role {
    width: 38px;
    padding: 0;
    vertical-align: bottom;
    height: 130px;
}
.e-matrix__role span {
    display: block;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    white-space: nowrap;
    padding: 8px 0;
    font-size: var(--text-small);
}
.e-matrix__item { vertical-align: top; padding-top: 8px; padding-bottom: 8px; }
.e-matrix__item .e-fieldhelp { max-width: 420px; margin-top: 2px; }
.e-matrix__cell { text-align: center; padding: 4px; }

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

.e-headsearch {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 300px;
    padding: 0 14px;
    height: 34px;
    border: var(--border-width) solid var(--color-border-strong);
    border-radius: 999px;
    background: var(--color-surface);
    margin-right: var(--space);
}
.e-headsearch:focus-within { border-color: var(--color-accent); }
.e-headsearch .e-icon { width: 17px; height: 17px; color: var(--color-text-faint); }
.e-headsearch__field {
    border: 0; background: none; font: inherit;
    font-size: var(--text-base);
    width: 100%; height: 100%;
    color: var(--color-text);
}
.e-headsearch__field:focus { outline: none; }

.e-signin {
    max-width: 26rem;
    margin: 8vh auto;
    padding: 2rem;
    border: var(--border-width) solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
}
.e-signin__logo { max-height: 2.4rem; margin-bottom: 1rem; }
.e-signin h1 { margin: 0 0 1rem; }
.e-signin .e-fields { margin-bottom: 1rem; }

.e-tool {
    display: flex;
    
    align-items: baseline;
    gap: 8px;
    padding: 4px 14px 4px 10px;
    
    border: var(--border-width) solid var(--color-accent);
    border-radius: 999px;
    background: var(--color-accent-soft);
    white-space: nowrap;
    flex: none;
}
.e-tool__icon { display: inline-flex; color: var(--color-accent); align-self: center; }
.e-tool__icon .e-icon { width: 24px; height: 24px; }
.e-tool__name {
    font-family: var(--font-heading);
    font-size: calc(var(--text-large) * 1.1);
    font-weight: 700;
    color: var(--color-accent);
    letter-spacing: -.01em;
}
.e-tool__version {
    font-size: var(--text-small);
    color: var(--color-accent);
    opacity: .75;
}

@media (max-width: 1200px) {
    .e-tool__version { display: none; }
    .e-headsearch { min-width: 200px; }
}
@media (max-width: 900px) {
    .e-tool__name { display: none; }
    .e-headsearch { min-width: 130px; }
}

.e-etkbody table { width: 100%; border-collapse: collapse; margin: var(--space-small) 0; }
.e-etkbody th, .e-etkbody td {
    border: var(--border-width) solid var(--color-border);
    padding: 5px 9px;
    text-align: left;
    vertical-align: top;
    font-size: var(--text-small);
}
.e-etkbody th { background: var(--color-surface-2); font-weight: 600; }
.e-etkbody h3 { margin: var(--space) 0 var(--space-small); font-size: var(--text-large); }
.e-etkbody ul, .e-etkbody ol { padding-left: var(--space-large); }
.e-etkbody li { margin-bottom: 3px; }
.e-etksection { scroll-margin-top: 120px; }
.e-etkfield { font-family: ui-monospace, Consolas, monospace; font-size: var(--text-small); }

.e-rolerow { display: flex; flex-wrap: wrap; gap: 3px;
    
    height: auto; min-height: var(--table-row); }
.e-rolebutton {
    padding: 2px 8px;
    border: var(--border-width) solid var(--color-border);
    border-radius: 999px;
    background: var(--color-surface);
    color: var(--color-text-faint);
    font: inherit;
    font-size: 11px;
    cursor: pointer;
}
.e-rolebutton:hover { border-color: var(--color-accent); }
.e-rolebutton.aan {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-accent-text);
    font-weight: 600;
}

.e-qr { background: #fff; padding: var(--space); border-radius: var(--radius); display: inline-block; }
.e-qr svg { width: 210px; height: 210px; display: block; }
.e-backupcodes { display: flex; flex-wrap: wrap; gap: var(--space-small); margin-top: var(--space); }
.e-backupcodes .e-code { font-size: var(--text-large); padding: 6px 12px; }

.e-top__mock {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--color-surface-2);
    border: var(--border-width) solid var(--color-border);
    color: var(--color-text-faint);
}

.e-barproof { margin-bottom: var(--space); max-width: 720px; }
.e-barproof__bar {
    display: flex; align-items: center; gap: 10px;
    height: 34px; padding: 0 12px;
    border-radius: var(--radius) var(--radius) 0 0;
    font-size: var(--text-small);
}
.e-barproof__dot {
    width: 15px; height: 15px; border-radius: 4px; flex: none;
    background: var(--color-accent);
    border: 1px solid rgba(255,255,255,.5);
}
.e-barproof__title { flex: 1; }
.e-barproof__buttons { opacity: .8; letter-spacing: 2px; }
.e-barproof__row {
    display: flex; align-items: center; gap: var(--space-small);
    padding: 8px 12px;
    background: var(--color-surface);
    border: var(--border-width) solid var(--color-border);
    border-top: 0;
    border-radius: 0 0 var(--radius) var(--radius);
    flex-wrap: wrap;
}
.e-barproof__row input[type="color"] {
    width: 44px; height: 30px; padding: 0; border: 0; background: none; cursor: pointer;
}

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

@media print {
    .e-top, .e-second,
    .e-titlerow__buttons, .knoppen, .e-formfoot { display: none !important; }
    .e-worksheet { padding: 0; }
    body { background: #fff; }
    .e-card, .e-tablewrap { border: 0; box-shadow: none; padding: 0; }
    .e-table { font-size: 10pt; }
    tr, h1, h2, h3 { page-break-inside: avoid; }
    
    .e-matrixbox, .e-tablewrap, .e-listbox { max-height: none; overflow: visible; }
    .e-field { 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(--color-accent-soft);
    border: 2px solid var(--color-accent);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-heavy);
    font-size: var(--text-small);
}
@media print { .e-pdfhint { display: none !important; } }

.e-releasebox { position: relative; cursor: help; }
.e-releasecard {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 60;
    
    width: min(52em, 92vw);
    white-space: normal;
    overflow-wrap: anywhere;
    padding: var(--space-small) var(--space);
    text-align: left;
    background: var(--color-surface);
    color: var(--color-text);
    border: var(--border-width) solid var(--color-border-strong);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-heavy);
    opacity: 1;
    cursor: default;
}
.e-releasebox:hover .e-releasecard,
.e-releasebox:focus-within .e-releasecard { display: block; }

.e-inlineform { display: inline; margin: 0; padding: 0; }

.e-fb {
    display: flex;
    flex-direction: column;
    gap: var(--space-small);
    margin-bottom: var(--space-large);
}
.e-fb__item {
    display: flex;
    gap: var(--space-small);
    padding: var(--space-small) var(--space);
    background: var(--color-surface);
    border: var(--border-width) solid var(--color-border);
    border-left: 4px solid var(--color-warning);   
    border-radius: var(--radius);
}
.e-fb__item--bezig { border-left-color: var(--color-accent); }
.e-fb__item--klaar { border-left-color: var(--color-ok); background: var(--color-surface-2); }

.e-fb__item--klaar .e-fb__body { color: var(--color-text-faint); }
.e-fb__pick { padding-top: 2px; }

.e-fb__tick { cursor: pointer; }
.e-fb__copyone, .e-fb__editopen { white-space: nowrap; }
.e-fb__copy { display: none; }
.e-fb__main { flex: 1; min-width: 0; }
.e-fb__margin {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}
.e-fb__number {
    font-weight: 600;
    color: var(--color-text-faint);
    min-width: 2.2em;
}

.e-fb__body { white-space: pre-wrap; overflow-wrap: anywhere; }
.e-fb__note {
    margin-top: 6px;
    padding: 4px 8px;
    background: var(--color-accent-soft);
    border-radius: var(--radius);
    font-size: var(--text-small);
}
.e-fb__images {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-small);
    margin-top: var(--space-small);
}

.e-fb__images img, .e-fb__thumb img {
    max-height: 180px;
    max-width: 100%;
    border: var(--border-width) solid var(--color-border);
    border-radius: var(--radius);
    display: block;
}
.e-fb__buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: var(--space-small);
}
.e-fb__noteform { display: flex; gap: 4px; align-items: center; }
.e-fb__noteform input { min-width: 220px; }
.e-fb__edit { margin-top: var(--space-small); }
.e-fb__edit textarea { width: 100%; }

.e-fb__new { margin-bottom: var(--space-large); }
.e-fb__text { width: 100%; min-height: 160px; font-family: var(--font); }
.e-fb__thumbs { display: flex; flex-wrap: wrap; gap: var(--space-small); margin-top: var(--space-small); }
.e-fb__thumb { position: relative; display: inline-block; }
.e-fb__thumbaway {
    position: absolute;
    top: -8px; right: -8px;
    width: 22px; height: 22px;
    line-height: 20px;
    padding: 0;
    border: var(--border-width) solid var(--color-border-strong);
    border-radius: 50%;
    background: var(--color-surface);
    color: var(--color-error);
    cursor: pointer;
    font-size: 15px;
}
@media print {
    .e-fb__buttons, .e-fb__pick, .e-fb__new { display: none !important; }
}
