/* SVOAZ Speeltuin — simpel dark dashboard */
:root {
    --bg: #0b1020;
    --bg-2: #111827;
    --panel: #151c2f;
    --panel-2: #1b2438;
    --line: #2a3550;
    --line-strong: #3b4865;
    --text: #eef3ff;
    --muted: #9aa7bd;
    --muted-2: #6f7c92;
    --accent: #e11d48;
    --accent-2: #be123c;
    --accent-soft: rgba(225, 29, 72, .14);
    --ok: #22c55e;
    --ok-soft: rgba(34, 197, 94, .13);
    --warn: #f59e0b;
    --warn-soft: rgba(245, 158, 11, .14);
    --err: #fb7185;
    --err-soft: rgba(251, 113, 133, .13);
    --shadow: 0 20px 50px rgba(0, 0, 0, .28);
    --mono: "Cascadia Mono", Consolas, "Courier New", monospace;
    --sans: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--sans);
    font-size: 15px;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(225, 29, 72, .18), transparent 28rem),
        radial-gradient(circle at bottom right, rgba(37, 99, 235, .12), transparent 26rem),
        var(--bg);
}
button, input { font: inherit; }
button { color: inherit; }
a { color: inherit; }
.hidden { display: none !important; }

/* Login */
.login-body, .auth-error {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}
.login-card {
    width: min(100%, 390px);
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(21, 28, 47, .92);
    box-shadow: var(--shadow);
    text-align: center;
}
.login-logo, .brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent), #7c3aed);
    color: #fff;
    font-weight: 900;
    letter-spacing: -.04em;
}
.login-logo {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    margin-bottom: 14px;
    font-size: 25px;
}
.login-card h1 { margin: 0 0 8px; font-size: 28px; letter-spacing: -.04em; }
.login-sub, .login-note, .login-version { color: var(--muted); }
.login-sub { margin: 0 0 22px; }
.login-note { margin: 18px 0 0; font-size: 13px; }
.login-version { margin: 6px 0 0; font-size: 12px; }
.btn-ms { width: 100%; display: inline-flex !important; gap: 10px; justify-content: center; align-items: center; }

/* Buttons */
.btn {
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 10px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
    transition: transform .12s ease, background .12s ease, border-color .12s ease, opacity .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid rgba(225, 29, 72, .4); outline-offset: 2px; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 12px 28px rgba(225, 29, 72, .22); }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { background: rgba(255,255,255,.04); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: rgba(255,255,255,.07); border-color: var(--line-strong); }
.btn-small { min-height: 34px; padding: 7px 12px; border-radius: 10px; font-size: 13px; }
.btn-danger { background: var(--err-soft); color: #fecaca; border-color: rgba(251, 113, 133, .4); }
.btn-danger:hover { background: rgba(251, 113, 133, .22); border-color: var(--err); }

/* Topbar / layout */
.dashboard-body { min-height: 100vh; }
.topbar {
    height: 66px;
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 22px;
    border-bottom: 1px solid var(--line);
    background: rgba(11, 16, 32, .82);
    backdrop-filter: blur(14px);
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 0;
    text-align: left;
}
.brand-mark { width: 36px; height: 36px; border-radius: 12px; font-size: 18px; }
.brand strong { display: block; font-size: 16px; letter-spacing: -.02em; }
.brand small { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }
.topbar-user { display: flex; align-items: center; gap: 12px; min-width: 0; }
.user-name { font-weight: 750; white-space: nowrap; }
.user-upn { color: var(--muted); font: 12.5px var(--mono); max-width: 270px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-shell {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 24px;
    width: min(1440px, 100%);
    margin: 0 auto;
    padding: 24px;
}
.sidebar { position: sticky; top: 90px; align-self: start; }
.app-nav {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(21, 28, 47, .72);
}
.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 11px 12px;
    border: 1px solid transparent;
    border-radius: 13px;
    background: transparent;
    color: var(--muted);
    font-weight: 750;
    text-align: left;
    cursor: pointer;
}
.nav-link span { width: 24px; text-align: center; }
.nav-link:hover { color: var(--text); background: rgba(255,255,255,.04); }
.nav-link.active { color: #fff; background: var(--accent-soft); border-color: rgba(225, 29, 72, .35); }
.main { min-width: 0; }
.module-section { display: grid; gap: 18px; }

/* Dashboard */
.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(21, 28, 47, .96), rgba(17, 24, 39, .78));
    box-shadow: var(--shadow);
}
.page-head.compact { padding: 18px 20px; border-radius: 20px; box-shadow: none; }
.eyebrow {
    margin: 0 0 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .11em;
    text-transform: uppercase;
}
h1, h2, h3 { color: var(--text); }
.page-head h1 { margin: 0; font-size: clamp(30px, 5vw, 56px); line-height: 1; letter-spacing: -.065em; }
.page-head.compact h1 { font-size: clamp(26px, 4vw, 40px); }
.status-strip { display: flex; flex-wrap: wrap; gap: 10px; }
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(21, 28, 47, .72);
    color: var(--muted);
    font-weight: 750;
}
.status-pill strong { color: var(--text); }
.status-pill.ok { color: #b7f7ca; border-color: rgba(34, 197, 94, .25); background: var(--ok-soft); }
.status-pill.ok span { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 5px rgba(34, 197, 94, .11); }
.status-pill.muted { color: var(--muted); }
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
}
.tool-card {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(21, 28, 47, .76);
    box-shadow: 0 16px 36px rgba(0, 0, 0, .14);
}
.tool-card.ready { border-color: rgba(225, 29, 72, .55); background: linear-gradient(145deg, rgba(225, 29, 72, .14), rgba(21, 28, 47, .8)); }
.tool-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(255,255,255,.06);
    font-size: 24px;
}
.tool-card h2 { margin: 0; font-size: 21px; letter-spacing: -.03em; }
.tool-card p { margin: -4px 0 8px; color: var(--muted); line-height: 1.45; }
.tool-card .btn { margin-top: auto; }
.pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 11.5px;
    font-weight: 850;
    line-height: 1.1;
    border: 1px solid var(--line);
    color: var(--muted);
    background: rgba(255,255,255,.04);
}
.pill.ok { color: #bbf7d0; border-color: rgba(34, 197, 94, .27); background: var(--ok-soft); }
.pill.planned { color: #c7d2fe; border-color: rgba(129, 140, 248, .25); background: rgba(99, 102, 241, .12); }

/* Panels */
.panel {
    background: rgba(21, 28, 47, .86);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 16px 36px rgba(0,0,0,.12);
}
.panel h2 { margin: 0 0 8px; font-size: 22px; letter-spacing: -.035em; }
.panel-intro { color: var(--muted); margin: 0 0 18px; line-height: 1.5; }
.process-summary { color: var(--muted); margin: 0 0 14px; font-size: 13px; }
.panel-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}
.placeholder-panel { min-height: 250px; }
.simple-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
    margin-top: 18px;
}
.simple-list > div {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255,255,255,.035);
}
.simple-list strong, .simple-list span { display: block; }
.simple-list span { color: var(--muted); margin-top: 5px; font-size: 13px; }

/* Workflow */
.workflow-layout {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 18px;
}
.steprail {
    position: sticky;
    top: 90px;
    align-self: start;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 12px;
    background: rgba(21, 28, 47, .72);
}
.steprail ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.steprail li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    padding: 10px;
    border-radius: 13px;
    font-weight: 750;
}
.steprail .dot {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,.05);
    border: 1px solid var(--line-strong);
    color: var(--muted);
    font-size: 12px;
}
.steprail li.active { color: #fff; background: var(--accent-soft); }
.steprail li.active .dot { color: #fff; background: var(--accent); border-color: var(--accent); }
.steprail li.done .dot { color: #06210f; background: var(--ok); border-color: var(--ok); }
.content { min-width: 0; }

/* Forms */
.dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 138px;
    padding: 22px;
    border: 2px dashed var(--line-strong);
    border-radius: 18px;
    background: rgba(255,255,255,.025);
    text-align: center;
    cursor: pointer;
    transition: background .14s ease, border-color .14s ease;
}
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.dropzone.has-file { border-style: solid; border-color: var(--ok); background: var(--ok-soft); }
.dz-icon { color: var(--accent); font-size: 24px; }
.dz-text { font-size: 16px; }
.dz-file { color: var(--muted); font: 13px var(--mono); }
.dropzone.has-file .dz-file { color: #bbf7d0; font-weight: 750; }
.opt-card {
    margin: 16px 0 0;
    padding: 14px 16px 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255,255,255,.025);
}
.opt-card legend {
    padding: 0 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .11em;
    text-transform: uppercase;
}
.radio, .check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    line-height: 1.35;
    cursor: pointer;
}
.radio input, .check input { margin-top: 3px; flex: none; accent-color: var(--accent); }
.radio strong, .check span { color: var(--text); }
.radio small { display: block; color: var(--muted); margin-top: 2px; }
.check.indent { margin-left: 28px; }
.check input:disabled + span { color: var(--muted-2); }
.field-inline { display: flex; flex-direction: column; gap: 7px; max-width: 460px; padding: 8px 0 4px; }
.field-inline label { color: var(--text); font-weight: 750; }

/* Module Gebruikersbeheer */
.gbh-inline-row { display: flex; flex-direction: row; gap: 8px; align-items: center; }
.gbh-inline-row input { flex: 1; min-width: 0; }
.gbh-filters { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-top: 10px; }
.gbh-field { display: flex; flex-direction: column; gap: 4px; color: var(--text); font-weight: 750; font-size: 13px; }
.gbh-btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.gbh-tab-head { margin-bottom: 8px; }
.gbh-subhead { margin: 16px 0 6px; font-size: 14px; color: var(--text); }
.gbh-result {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px;
    background: rgba(255,255,255,.03); cursor: pointer; text-align: left; width: 100%;
}
.gbh-result:hover { border-color: var(--accent); }
.gbh-result strong { color: var(--text); display: block; }
.gbh-result small { color: var(--muted); font: 12px var(--mono); }
input[type="text"] {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: #0f172a;
    color: var(--text);
    font-family: var(--mono);
    font-size: 13.5px;
}
input[type="text"]::placeholder { color: var(--muted-2); }
input[type="text"]:focus { outline: 3px solid rgba(225, 29, 72, .25); border-color: var(--accent); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 20px; }
.form-msg { color: var(--err); font-weight: 800; }

/* Controle */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255,255,255,.03);
}
.stat .n { display: block; color: var(--text); font-size: 30px; font-weight: 900; letter-spacing: -.05em; }
.stat .t { color: var(--muted); font-size: 12.5px; }
.stat.warn { border-color: rgba(245, 158, 11, .32); background: var(--warn-soft); }
.stat.warn .n { color: #fcd34d; }
.stat.err { border-color: rgba(251, 113, 133, .35); background: var(--err-soft); }
.stat.err .n { color: var(--err); }
.col-status { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 16px; }
.col-chip {
    padding: 4px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255,255,255,.03);
    font: 12px var(--mono);
}
.col-chip.found { color: #bbf7d0; border-color: rgba(34, 197, 94, .28); background: var(--ok-soft); }
.col-chip.missing { color: #fcd34d; border-color: rgba(245, 158, 11, .30); background: var(--warn-soft); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.tab {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(255,255,255,.035);
    color: var(--muted);
    font-weight: 800;
    cursor: pointer;
}
.tab.active { color: #fff; background: var(--accent); border-color: var(--accent); }
.tab .badge { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: rgba(255,255,255,.12); font-size: 11px; }
.tab.has-errors:not(.active) { border-color: rgba(251, 113, 133, .35); color: var(--err); }
.table-wrap {
    max-height: 420px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #0f172a;
}
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th, table.data td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
table.data th { position: sticky; top: 0; background: #111827; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; z-index: 1; }
table.data td.mono, .mono-cell { font-family: var(--mono); }
.table-empty, .table-more { padding: 18px; color: var(--muted); text-align: center; }
.table-more { padding: 10px 14px; text-align: left; border-top: 1px solid var(--line); font-size: 12.5px; }
.confirm-bar { margin-top: 16px; }
.confirm-warning {
    margin-bottom: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(245, 158, 11, .34);
    border-radius: 14px;
    background: var(--warn-soft);
    color: #fde68a;
}

/* File info boxes (below dropzone) */
.file-info-box {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 8px;
    padding: 10px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: rgba(255,255,255,.03);
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.4;
}
.file-info-box.ok { border-color: rgba(34,197,94,.3); background: var(--ok-soft); color: #bbf7d0; }
.fib-icon { flex: none; font-style: normal; }

/* Help card (Magister export guide) */
.help-card {
    margin: 16px 0 0;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255,255,255,.025);
    overflow: hidden;
}
.help-card > summary {
    padding: 13px 16px;
    cursor: pointer;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
}
.help-card > summary::-webkit-details-marker { display: none; }
.help-card > summary::before { content: '▶'; font-size: 10px; transition: transform .15s ease; display: inline-block; }
.help-card[open] > summary::before { transform: rotate(90deg); }
.help-card > summary:hover { color: var(--text); }
.help-body {
    padding: 4px 16px 16px;
    border-top: 1px solid var(--line);
}
.help-steps {
    margin: 12px 0 0;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: var(--text);
    font-size: 13.5px;
    line-height: 1.5;
}
.help-steps li { padding-left: 4px; }
.help-steps ul { margin: 5px 0 0; padding-left: 18px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; }
.col-list {
    columns: 2;
    margin: 6px 0 0;
    padding-left: 18px;
    color: var(--muted);
    font-size: 12.5px;
    font-family: var(--mono);
}
.mono-path {
    font-family: var(--mono);
    font-size: 12px;
    padding: 2px 7px;
    border-radius: 7px;
    background: rgba(255,255,255,.07);
    color: var(--text);
    display: inline;
}
.help-video-player {
    display: block;
    width: 100%;
    margin-top: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #000;
    max-height: 340px;
}

/* Mode badges inside radio labels */
.mode-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    vertical-align: middle;
    letter-spacing: .03em;
}
.mode-badge.test { background: var(--warn-soft); color: #fcd34d; border: 1px solid rgba(245,158,11,.3); }
.mode-badge.full { background: var(--ok-soft); color: #bbf7d0; border: 1px solid rgba(34,197,94,.28); }

/* Sub-descriptions inside check/radio labels */
.check span small, .radio span small { display: block; color: var(--muted); margin-top: 3px; font-size: 12px; line-height: 1.4; }

/* Progress / log / downloads */
.progress-block { display: grid; gap: 8px; margin-bottom: 14px; }
.progress-meta { display: flex; justify-content: space-between; color: var(--muted); font-weight: 750; }
.progress {
    height: 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #0f172a;
}
.progress-bar { width: 0%; height: 100%; background: linear-gradient(90deg, var(--accent), #8b5cf6); transition: width .18s ease; }
.log {
    min-height: 170px;
    max-height: 360px;
    overflow: auto;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #050816;
    color: #dbeafe;
    font: 12.5px/1.5 var(--mono);
}
.log > div { display: grid; grid-template-columns: 75px 1fr; gap: 8px; padding: 2px 0; align-items: baseline; }
.log .ts { color: var(--muted-2); }
.log .ok { color: #86efac; }
.log .warn { color: #fcd34d; }
.log .err { color: #fda4af; }
.log-cell { display: flex; flex-direction: column; min-width: 0; }
.log-toggle {
    background: none;
    border: 1px solid rgba(255,255,255,.12);
    color: var(--muted);
    cursor: pointer;
    font: 11px/1 var(--mono);
    padding: 3px 7px;
    opacity: 0.75;
    border-radius: 999px;
    min-width: 30px;
}
.log-toggle:hover { opacity: 1; color: var(--text); }
.log-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}
.log-message {
    display: block;
    white-space: pre-wrap;
    word-break: break-word;
}
.log-cell:hover .log-toggle { opacity: 1; }
.log-detail {
    margin-top: 5px;
    padding: 6px 10px;
    background: rgba(255,255,255,.04);
    border-radius: 6px;
    border-left: 2px solid rgba(255,255,255,.12);
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.log-drow { display: grid; grid-template-columns: 130px 1fr; gap: 8px; font-size: 11.5px; line-height: 1.5; }
.log-dk { color: var(--muted-2); }
.log-dv { color: #c7d2fe; word-break: break-all; }
.files { display: grid; gap: 10px; }
.file-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255,255,255,.03);
}
.file-row.is-errors { border-color: rgba(251, 113, 133, .32); background: var(--err-soft); }
.file-info strong, .file-info span { display: block; }
.file-name { margin-top: 3px; color: var(--muted); font: 12.5px var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-count { color: var(--muted); font-weight: 750; white-space: nowrap; }
.log-details { margin-top: 16px; color: var(--muted); }
.log-details summary { cursor: pointer; font-weight: 800; margin-bottom: 10px; color: var(--text); }

/* Responsief */
@media (max-width: 980px) {
    .app-shell { grid-template-columns: 1fr; padding: 16px; }
    .sidebar, .steprail { position: static; }
    .app-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .workflow-layout { grid-template-columns: 1fr; }
    .steprail ol { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .steprail li { justify-content: center; }
    .step-label { display: none; }
}
@media (max-width: 700px) {
    .topbar { height: auto; padding: 14px; align-items: flex-start; flex-direction: column; }
    .topbar-user { width: 100%; flex-wrap: wrap; }
    .user-upn { max-width: 100%; width: 100%; }
    .page-head { align-items: flex-start; flex-direction: column; padding: 20px; }
    .app-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .panel { padding: 18px; }
    .panel-title-row { flex-direction: column; }
    .check.indent { margin-left: 0; }
    .file-row { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
    .app-nav { grid-template-columns: 1fr; }
    .tool-grid { grid-template-columns: 1fr; }
    .steprail ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Beheer */
.nav-link:disabled { opacity: .45; cursor: not-allowed; }
.pill.warn { color: #fde68a; border-color: rgba(245, 158, 11, .30); background: var(--warn-soft); }
.pill.off { color: #fecdd3; border-color: rgba(251, 113, 133, .30); background: var(--err-soft); }
.tool-card.limited { opacity: .9; }
.tool-icon.small { width: 38px; height: 38px; border-radius: 12px; font-size: 19px; }
.muted-text { color: var(--muted); line-height: 1.5; }
.danger-panel { border-color: rgba(251, 113, 133, .35); background: linear-gradient(145deg, var(--err-soft), rgba(21, 28, 47, .84)); }
code { font-family: var(--mono); color: #fda4af; }

.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.admin-panel.full { grid-column: 1 / -1; }
.admin-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.admin-head h2 { margin: 0; }
.admin-form { display: grid; gap: 12px; }
.compact-form {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255,255,255,.025);
    margin-bottom: 12px;
}
.form-grid { display: grid; gap: 10px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-form label, .module-admin-row label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
input[type="text"], input[type="email"], select, textarea, .mini-row input, .school-card input:not([type="checkbox"]) {
    width: 100%;
    padding: 10px 11px;
    border: 1px solid var(--line-strong);
    border-radius: 11px;
    background: #0f172a;
    color: var(--text);
    font: 13px var(--mono);
}
select { font-family: var(--sans); }
input[type="email"]::placeholder, .admin-form input::placeholder { color: var(--muted-2); }
input[type="text"]:focus, input[type="email"]:focus, select:focus, .mini-row input:focus { outline: 3px solid rgba(225, 29, 72, .25); border-color: var(--accent); }
.check-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
}
.check-grid.compact { max-width: 520px; }
.inline-check { align-content: end; padding-top: 24px; }
.mini-table, .user-list, .module-admin-list { display: grid; gap: 8px; }
.mini-row, .module-admin-row {
    display: grid;
    grid-template-columns: 110px 150px minmax(140px, 1fr) auto auto;
    gap: 8px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255,255,255,.025);
}
.switch { display: inline-flex !important; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.switch input { accent-color: var(--accent); }
.admin-detail {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255,255,255,.025);
    overflow: hidden;
}
.admin-detail summary {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) minmax(160px, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 12px 14px;
    cursor: pointer;
}
.admin-detail summary span { color: var(--muted); font: 12px var(--mono); }
.admin-detail .admin-form { margin: 0 12px 12px; }
.module-admin-row {
    grid-template-columns: minmax(190px, 1fr) 160px minmax(180px, 1.4fr) auto minmax(100px, auto);
}
.module-admin-title { display: flex; align-items: center; gap: 10px; }
.module-admin-title strong, .module-admin-title small { display: block; }
.module-admin-title small { color: var(--muted); font: 12px var(--mono); margin-top: 2px; }
.log-table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 16px; position: relative; transition: opacity .2s ease; }
.log-table-wrap.loading { opacity: .55; }
.audit-table { width: 100%; border-collapse: collapse; min-width: 760px; font-size: 13px; }
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 16px;
    background: rgba(255,255,255,.03);
    border-top: 1px solid var(--line);
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}
.pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    background: rgba(255,255,255,.05);
    color: var(--text);
    font: 13px/1 var(--sans);
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease;
}
.pagination .page-link:hover {
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.2);
}
.pagination .page-info {
    color: var(--muted);
    font: 12px var(--mono);
}
.audit-td-toggle { white-space: nowrap; text-align: right !important; }
.audit-table th, .audit-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.audit-table th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; background: rgba(255,255,255,.03); }
.audit-th-log { width: 90px; }
.audit-table td { color: var(--text); }
.audit-table td:nth-child(1), .audit-table td:nth-child(2), .audit-table td:nth-child(3) { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.audit-action.ok { color: #86efac; font-weight: 700; }
.audit-meta { display: block; font: 11.5px/1.4 var(--mono); color: var(--muted); margin-top: 2px; }
.audit-td-toggle { white-space: nowrap; text-align: right !important; }
.btn-audit-toggle {
    background: rgba(255,255,255,.06);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    cursor: pointer;
    font: 12px/1 var(--mono);
    padding: 4px 9px;
    white-space: nowrap;
}
.btn-audit-toggle:hover { background: rgba(255,255,255,.12); color: var(--text); }
.audit-row-expandable:hover td { background: rgba(255,255,255,.02); }
.audit-log-detail td { background: #050816 !important; padding: 0 !important; border-bottom: 2px solid var(--accent) !important; }
.audit-log-body {
    padding: 14px 16px;
    max-height: 420px;
    overflow: auto;
    font: 12.5px/1.5 var(--mono);
    color: #dbeafe;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.alog-entry { display: flex; flex-direction: column; padding: 1px 0; }
.alog-entry .ok  { color: #86efac; }
.alog-entry .warn { color: #fcd34d; }
.alog-entry .err  { color: #fda4af; }
.alog-sub { margin-top: 3px; margin-left: 12px; }
.alog-sub summary { cursor: pointer; font-size: 11px; color: var(--muted); letter-spacing: .04em; list-style: none; }
.alog-sub summary::before { content: '▶ '; font-size: 9px; }
.alog-sub[open] summary::before { content: '▼ '; }
.alog-sub-rows { margin-top: 4px; padding: 6px 10px; background: rgba(255,255,255,.04); border-radius: 6px; border-left: 2px solid rgba(255,255,255,.1); display: flex; flex-direction: column; gap: 2px; }
.admin-form .form-msg, .module-admin-row .form-msg { color: #bbf7d0; font-size: 12px; font-weight: 800; }

/* School list */
.school-list { display: grid; gap: 8px; }
.school-domains { display: grid; gap: 8px; }
.school-domain-label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.school-save-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.school-save-row .form-msg { color: #bbf7d0; font-size: 12px; font-weight: 800; }

/* School toevoegen toggle */
.school-add-wrap { margin-bottom: 10px; }
.school-add-toggle {
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255,255,255,.04);
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
    user-select: none;
    transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.school-add-toggle::-webkit-details-marker,
.school-add-toggle::marker { display: none; }
.school-add-toggle:hover { background: rgba(255,255,255,.07); border-color: var(--line-strong); color: var(--text); }
.school-add-wrap[open] .school-add-toggle { border-color: var(--accent); color: var(--text); }
.school-add-wrap .compact-form { margin-top: 8px; }

/* Toegestane IP-adressen */
.ip-subhead { margin: 4px 0 8px; font-size: 12px; font-weight: 750; color: var(--muted); }
.ip-config-list { margin: 6px 0 16px; }
.ip-config-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255,255,255,.03);
    margin-bottom: 6px;
}
.ip-config-row span { font: 13px var(--mono); color: var(--text); display: inline-flex; align-items: baseline; gap: 8px; }
.ip-config-label { font: 12px var(--ui, inherit); color: var(--muted); }
.ip-list { margin-top: 10px; }
.ip-delete-form { margin-top: 8px; }

@media (max-width: 1100px) {
    .admin-grid { grid-template-columns: 1fr; }
    .mini-row, .module-admin-row, .admin-detail summary { grid-template-columns: 1fr; }
    .form-grid.two { grid-template-columns: 1fr; }
}

/* ── Module Apparaatbeheer ─────────────────────────────────────────────────── */
.apb-hint { margin-top: 4px; font-size: 12.5px; }

.apb-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 12px 0 4px; }
.apb-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 10px; border-radius: 999px;
    font-size: 11.5px; font-weight: 800; letter-spacing: .02em; white-space: nowrap;
    border: 1px solid var(--line-strong); color: var(--text);
}
.apb-chip::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; opacity: .9; }

/* Kleurcategorieën (dark-variant van de PowerShell-legenda) */
.apb-pres-all             { --apb-c: #22c55e; }
.apb-pres-entra-intune    { --apb-c: #84cc16; }
.apb-pres-entra           { --apb-c: #eab308; }
.apb-pres-intune          { --apb-c: #f97316; }
.apb-pres-autopilot       { --apb-c: #38bdf8; }
.apb-pres-entra-autopilot { --apb-c: #c084fc; }
.apb-pres-intune-autopilot{ --apb-c: #2dd4bf; }
.apb-pres-other           { --apb-c: #fb7185; }

.apb-chip.apb-pres-all, .apb-chip.apb-pres-entra-intune, .apb-chip.apb-pres-entra,
.apb-chip.apb-pres-intune, .apb-chip.apb-pres-autopilot, .apb-chip.apb-pres-entra-autopilot,
.apb-chip.apb-pres-intune-autopilot, .apb-chip.apb-pres-other {
    color: var(--apb-c); border-color: color-mix(in srgb, var(--apb-c) 45%, transparent);
    background: color-mix(in srgb, var(--apb-c) 12%, transparent);
}

/* Resultatentabel: linkerrand toont de categorie */
table.data.apb-results td:first-child { border-left: 3px solid transparent; }
.apb-row { cursor: pointer; }
/* Elke rij draagt altijd zijn statuskleur (zachte tint + gekleurde linkerrand). */
.apb-row td { background: color-mix(in srgb, var(--apb-c) 13%, transparent); }
.apb-row td:first-child { border-left-color: var(--apb-c) !important; }
.apb-row:hover td { background: color-mix(in srgb, var(--apb-c) 22%, transparent); }
/* Geselecteerde rij: statuskleur blijft zichtbaar, maar duidelijk gemarkeerd. */
.apb-row.selected td { background: color-mix(in srgb, var(--apb-c) 34%, transparent); }
.apb-row.selected td:first-child { border-left-width: 5px; }
.apb-row.selected td strong { color: #fff; }
.apb-row.selected { outline: 2px solid rgba(255, 255, 255, .8); outline-offset: -2px; }

.apb-yn { font-weight: 800; font-size: 11.5px; letter-spacing: .04em; }
.apb-yn.yes { color: #bbf7d0; }
.apb-yn.no  { color: var(--muted); font-weight: 700; }

/* Pill met categoriekleur in de detailkop */
.pill.apb-pres-all, .pill.apb-pres-entra-intune, .pill.apb-pres-entra, .pill.apb-pres-intune,
.pill.apb-pres-autopilot, .pill.apb-pres-entra-autopilot, .pill.apb-pres-intune-autopilot, .pill.apb-pres-other {
    color: var(--apb-c); border-color: color-mix(in srgb, var(--apb-c) 40%, transparent);
    background: color-mix(in srgb, var(--apb-c) 12%, transparent);
}

.apb-actions-head { margin-top: 16px; }
.apb-action-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }

.apb-subpanel {
    margin-top: 14px; padding: 14px;
    border: 1px solid var(--line); border-radius: 12px;
    background: rgba(255,255,255,.02);
}
.apb-cleanup-opts { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 14px; }
.check.disabled { opacity: .45; }

/* Activiteitenlog */
.apb-log {
    max-height: 220px; overflow-y: auto;
    display: flex; flex-direction: column; gap: 4px;
    font: 12.5px var(--mono); color: var(--text);
}
.apb-log-empty { color: var(--muted); padding: 6px 0; }
.apb-log-line { display: flex; gap: 10px; padding: 3px 0; border-bottom: 1px solid rgba(255,255,255,.04); }
.apb-log-time { color: var(--muted); flex: none; }
.apb-log-line.ok  > span:last-child { color: #bbf7d0; }
.apb-log-line.err > span:last-child { color: var(--err); }

/* Rij wordt live aangevuld (kruislingse koppeling) */
.apb-row.apb-enriching td:first-child { position: relative; }
.apb-row.apb-enriching td:first-child::after {
    content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px;
    margin-top: -5px; border: 2px solid var(--line-strong); border-top-color: var(--accent);
    border-radius: 50%; animation: apb-spin .7s linear infinite;
}
@keyframes apb-spin { to { transform: rotate(360deg); } }

/* Statusoverzicht (donut + klikbare legenda met aantallen) */
.apb-overview {
    display: flex; gap: 20px; align-items: center; flex-wrap: wrap;
    margin: 14px 0 4px; padding: 16px;
    border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.02);
}
.apb-donut { position: relative; width: 124px; height: 124px; flex: none; }
.apb-donut-svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.apb-donut-track { stroke: var(--line); }
.apb-seg { stroke-linecap: butt; transition: opacity .12s ease; }
.apb-donut-center {
    position: absolute; inset: 17px; border-radius: 50%;
    background: var(--panel); border: 1px solid var(--line); cursor: pointer;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; color: var(--text);
}
.apb-donut-center:hover { border-color: var(--line-strong); }
.apb-donut-center strong { font-size: 26px; line-height: 1; letter-spacing: -.03em; }
.apb-donut-center small { color: var(--muted); font-size: 11px; }
.apb-chart-legend { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 240px; }
.apb-leg-item {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 6px 9px; border: 1px solid transparent; border-radius: 9px;
    background: transparent; color: var(--text); cursor: pointer; text-align: left;
    font-weight: 700; font-size: 13px;
}
.apb-leg-item:hover { background: rgba(255,255,255,.05); }
.apb-leg-item.active { border-color: var(--line-strong); background: rgba(255,255,255,.07); }
.apb-leg-dot { width: 11px; height: 11px; border-radius: 50%; flex: none; box-shadow: 0 0 0 3px rgba(255,255,255,.04); }
.apb-leg-label { flex: 1; }
.apb-leg-count { font: 13px var(--mono); font-weight: 800; color: var(--muted); }
.apb-leg-clear {
    margin-top: 5px; align-self: flex-start; padding: 5px 11px;
    border: 1px solid var(--line); border-radius: 9px; background: transparent;
    color: var(--muted); font-size: 12px; font-weight: 750; cursor: pointer;
}
.apb-leg-clear:hover { color: var(--text); border-color: var(--line-strong); }
.apb-row.apb-hidden { display: none; }
