:root {
    --ink: #061126;
    --ink-2: #3c465c;
    --grijs: #6a7386;
    --blue: #3069fe;
    --blue-ink: #1f4fd6;
    --blue-bg: #eaf0ff;
    --surface: #f3f4f7;
    --lijn: #dde1ea;
    --wit: #fff;
    --rood: #b42318;
    --rood-bg: #fdecea;
    --geel: #8a5a00;
    --geel-bg: #fff4d6;
    --groen: #157a3a;
    --groen-bg: #e5f4ea;
    --r: 10px;
    font:
        15px/1.45 Inter,
        "Segoe UI",
        system-ui,
        -apple-system,
        sans-serif;
    color: var(--ink);
    background: var(--surface);
    color-scheme: light;
}
* {
    box-sizing: border-box;
}
[hidden] {
    display: none !important;
}
body {
    margin: 0;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 228px minmax(0, 1fr);
}
a {
    color: var(--blue-ink);
}
h1 {
    font-size: 22px;
    margin: 0 0 4px;
    letter-spacing: -0.01em;
}
h2 {
    font-size: 16px;
    margin: 0 0 10px;
}
h3 {
    font-size: 14px;
    margin: 14px 0 6px;
}
p {
    margin: 0 0 10px;
}
.skip {
    position: absolute;
    left: -999px;
}
.skip:focus {
    left: 8px;
    top: 8px;
    z-index: 50;
    background: #fff;
    padding: 8px 12px;
}

/* ---------- zijbalk ---------- */
.zij {
    background: var(--ink);
    color: #fff;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 16px 12px;
    gap: 14px;
    overflow-y: auto;
}
.merk {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    padding: 4px 8px;
}
.schild {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: var(--blue)
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 6l8 3v6c0 5-3.5 9-8 11-4.5-2-8-6-8-11V9z' fill='%23fff'/%3E%3C/svg%3E")
        center / 22px no-repeat;
    flex: none;
}
.menuknop {
    display: none;
}
#nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
#nav a {
    color: #c8cfdd;
    text-decoration: none;
    padding: 9px 10px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 40px;
}
#nav a:hover {
    background: #12203d;
    color: #fff;
}
#nav a.actief {
    background: var(--blue);
    color: #fff;
}
.navkop {
    color: #7f8aa3;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 14px 10px 4px;
}
.teller {
    background: #fff;
    color: var(--ink);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    padding: 1px 8px;
}
.wie {
    margin-top: auto;
    font-size: 13px;
    color: #9aa5bd;
    padding: 0 10px;
    overflow-wrap: anywhere;
}

/* ---------- hoofdvlak ---------- */
.hoofd {
    min-width: 0;
}
main {
    padding: 22px 26px 60px;
    max-width: 1320px;
    outline: none;
}
.balk {
    background: var(--rood);
    color: #fff;
    padding: 10px 26px;
    font-weight: 600;
}
.balk.geel {
    background: var(--geel-bg);
    color: var(--geel);
}
.melding {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 30;
    max-width: 420px;
}
.melding div {
    background: var(--ink);
    color: #fff;
    padding: 12px 16px;
    border-radius: 10px;
    margin-top: 8px;
    box-shadow: 0 8px 24px rgb(6 17 38 / 0.25);
}
.melding div.fout {
    background: var(--rood);
}
.kop {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.kop p {
    color: var(--grijs);
    margin: 0;
}
.laden {
    color: var(--grijs);
}

/* ---------- bouwstenen ---------- */
.kaart {
    background: var(--wit);
    border: 1px solid var(--lijn);
    border-radius: var(--r);
    padding: 16px 18px;
    margin-bottom: 16px;
    min-width: 0;
}
.raster {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.raster > .kaart {
    margin-bottom: 0;
}
.twee {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.tegels {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    margin-bottom: 16px;
}
.tegel {
    background: var(--wit);
    border: 1px solid var(--lijn);
    border-radius: var(--r);
    padding: 12px 14px;
}
.tegel .getal {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}
.tegel .label {
    font-size: 13px;
    color: var(--grijs);
}
.tegel .sub {
    font-size: 12px;
    color: var(--grijs);
}
.tegel.accent {
    border-color: var(--blue);
    box-shadow: inset 0 3px 0 var(--blue);
}
.btn {
    font: inherit;
    font-weight: 600;
    min-height: 40px;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--blue);
    background: var(--blue);
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.btn:hover {
    background: var(--blue-ink);
}
.btn.licht {
    background: #fff;
    color: var(--ink);
    border-color: var(--lijn);
}
.btn.licht:hover {
    border-color: var(--ink-2);
}
.btn.rood {
    background: var(--rood);
    border-color: var(--rood);
}
.btn.groen {
    background: var(--groen);
    border-color: var(--groen);
}
.btn.klein {
    min-height: 32px;
    padding: 4px 10px;
    font-size: 13px;
}
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.knoppen {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink-2);
    white-space: nowrap;
}
.badge.groen {
    background: var(--groen-bg);
    color: var(--groen);
}
.badge.rood {
    background: var(--rood-bg);
    color: var(--rood);
}
.badge.geel {
    background: var(--geel-bg);
    color: var(--geel);
}
.badge.blauw {
    background: var(--blue-bg);
    color: var(--blue-ink);
}
.stil {
    color: var(--grijs);
    font-size: 13px;
}
.tabelwrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
th {
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--grijs);
    font-weight: 600;
    padding: 8px 10px;
    border-bottom: 1px solid var(--lijn);
    white-space: nowrap;
}
td {
    padding: 9px 10px;
    border-bottom: 1px solid var(--surface);
    vertical-align: top;
}
td.num,
th.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
tr.klik {
    cursor: pointer;
}
tr.klik:hover td {
    background: #f8f9fc;
}
label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--ink-2);
}
input,
select,
textarea {
    font: inherit;
    font-size: 16px;
    width: 100%;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid var(--lijn);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
}
textarea {
    min-height: 160px;
    resize: vertical;
    line-height: 1.5;
}
input[type="checkbox"],
input[type="radio"] {
    width: auto;
    min-height: 0;
}
input:focus,
select:focus,
textarea:focus,
.btn:focus-visible,
a:focus-visible {
    outline: 3px solid rgb(48 105 254 / 0.35);
    outline-offset: 1px;
}
.veld {
    margin-bottom: 12px;
}
.velden {
    display: grid;
    gap: 0 14px;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.vink {
    display: flex;
    gap: 8px;
    align-items: center;
    font-weight: 500;
}
.filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-bottom: 14px;
}
.filters > * {
    flex: 1 1 160px;
    max-width: 260px;
}
.filters .zoek {
    flex: 2 1 240px;
    max-width: 380px;
}
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--lijn);
    margin-bottom: 16px;
    overflow-x: auto;
}
.tabs button {
    font: inherit;
    background: none;
    border: 0;
    border-bottom: 3px solid transparent;
    padding: 10px 14px;
    cursor: pointer;
    color: var(--grijs);
    font-weight: 600;
    white-space: nowrap;
    min-height: 44px;
}
.tabs button[aria-selected="true"] {
    color: var(--ink);
    border-bottom-color: var(--blue);
}
.lijst {
    list-style: none;
    margin: 0;
    padding: 0;
}
.lijst li {
    padding: 8px 0;
    border-bottom: 1px solid var(--surface);
}
.check li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.check .vk {
    flex: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: var(--lijn);
}
.check .vk.ja {
    background: var(--groen);
}
pre.mail {
    white-space: pre-wrap;
    font: inherit;
    font-size: 14px;
    background: var(--surface);
    border-radius: 8px;
    padding: 12px 14px;
    margin: 0;
    overflow-wrap: anywhere;
}
iframe.mailvoorbeeld {
    width: 100%;
    height: 560px;
    border: 1px solid var(--lijn);
    border-radius: 8px;
    background: #f0f2f6;
}

/* ---------- inbox ---------- */
.inbox {
    display: grid;
    grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}
.berichten {
    background: #fff;
    border: 1px solid var(--lijn);
    border-radius: var(--r);
    overflow: hidden;
}
.berichten button {
    font: inherit;
    text-align: left;
    width: 100%;
    background: #fff;
    border: 0;
    border-bottom: 1px solid var(--surface);
    padding: 12px 14px;
    cursor: pointer;
    display: block;
    color: var(--ink);
}
.berichten button:hover {
    background: #f8f9fc;
}
.berichten button.gekozen {
    background: var(--blue-bg);
}
.berichten .r1 {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
    color: var(--grijs);
}
.berichten .van {
    font-weight: 600;
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.berichten .ongelezen .van::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--blue);
    margin-right: 6px;
    vertical-align: middle;
}
.berichten .ond {
    font-weight: 600;
    font-size: 14px;
    margin: 2px 0;
}
.berichten .frag {
    font-size: 13px;
    color: var(--grijs);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.draad {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}
.draad .b {
    border: 1px solid var(--lijn);
    border-radius: 10px;
    padding: 10px 14px;
    max-width: 92%;
}
.draad .b.in {
    background: #fff;
    align-self: flex-start;
    border-left: 4px solid var(--blue);
}
.draad .b.uit {
    background: var(--surface);
    align-self: flex-end;
}
.draad .meta {
    font-size: 12px;
    color: var(--grijs);
    margin-bottom: 4px;
}
.draad .b pre {
    white-space: pre-wrap;
    font: inherit;
    font-size: 14px;
    margin: 0;
    overflow-wrap: anywhere;
}
details.uitklap summary {
    cursor: pointer;
    color: var(--blue-ink);
    font-size: 13px;
}

/* ---------- grafiek ---------- */
.staaf {
    width: 100%;
    height: 180px;
    display: block;
}
.legenda {
    display: flex;
    gap: 14px;
    font-size: 13px;
    color: var(--grijs);
    flex-wrap: wrap;
}
.legenda i {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    margin-right: 5px;
}
.trechter {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.trechter .r {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr) 60px;
    gap: 10px;
    align-items: center;
    font-size: 14px;
}
.trechter .bar {
    height: 14px;
    background: var(--blue);
    border-radius: 3px;
    min-width: 2px;
}

/* ---------- mobiel ---------- */
@media (max-width: 900px) {
    body {
        grid-template-columns: minmax(0, 1fr);
    }
    .zij {
        position: sticky;
        top: 0;
        height: auto;
        z-index: 20;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        padding: 10px 14px;
    }
    .menuknop {
        display: inline-flex;
        align-items: center;
        font: inherit;
        font-weight: 600;
        background: #12203d;
        color: #fff;
        border: 0;
        border-radius: 8px;
        min-height: 44px;
        padding: 0 16px;
    }
    #nav {
        display: none;
        width: 100%;
    }
    #nav.open {
        display: flex;
    }
    .wie {
        display: none;
    }
    main {
        padding: 16px 16px 60px;
    }
    .twee,
    .inbox {
        grid-template-columns: minmax(0, 1fr);
    }
    .trechter .r {
        grid-template-columns: 100px minmax(0, 1fr) 50px;
    }
    .filters > * {
        max-width: none;
    }
}
