:root, html.thema-kantoor {
    --bg: #dfe6ee;
    --panel: #f3f6fa;
    --line: #9aabc0;
    --text: #121826;
    --muted: #4a5568;
    --accent: #1c5ad6;
    --signal: #1a7f8c;
    --ink: #eef3f8;
    --nav: #d4dde8;
    --topbar: rgba(223, 230, 238, 0.94);
    --shadow: 0 6px 18px rgba(18, 24, 38, 0.10);
}

html.thema-nacht {
    --bg: #0a0c0e;
    --panel: rgba(18, 22, 26, 0.92);
    --line: rgba(212, 175, 106, 0.18);
    --text: #ece8e1;
    --muted: #a8a39b;
    --accent: #d4af6a;
    --signal: #3dcdc0;
    --ink: #070809;
    --nav: rgba(8, 10, 12, 0.94);
    --topbar: rgba(10, 12, 14, 0.88);
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}

html.thema-contrast {
    --bg: #000000;
    --panel: #111111;
    --line: #ffe566;
    --text: #ffffff;
    --muted: #f0f0f0;
    --accent: #ffe566;
    --signal: #7affef;
    --ink: #000000;
    --nav: #000000;
    --topbar: #000000;
    --shadow: none;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: "Instrument Sans", "Segoe UI", Arial, sans-serif;
}

html.thema-nacht body {
    background-image:
        radial-gradient(ellipse 90% 60% at 50% -15%, rgba(61, 205, 192, 0.08), transparent 55%),
        radial-gradient(ellipse 55% 40% at 100% 0%, rgba(212, 175, 106, 0.07), transparent 50%);
    background-attachment: fixed;
}

html.thema-kantoor body {
    background-image:
        radial-gradient(ellipse 100% 70% at 50% -25%, rgba(255, 255, 255, 0.92), transparent 58%),
        radial-gradient(ellipse 45% 35% at 100% 0%, rgba(28, 90, 210, 0.06), transparent 50%),
        radial-gradient(ellipse 40% 30% at 0% 100%, rgba(26, 127, 140, 0.05), transparent 48%);
    background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }

.shell {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: 60px;
    border-bottom: 1px solid var(--line);
    background: var(--topbar);
    backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 0 22px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.brand-mark {
    width: 38px;
    height: 38px;
    object-fit: contain;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.brand-copy {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand strong {
    font-size: 15px;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: var(--text);
}

.brand-rule {
    width: 1px;
    height: 16px;
    background: var(--signal);
    animation: signal 2.8s ease-in-out infinite;
}

@keyframes signal {
    0%, 100% { opacity: 0.28; box-shadow: none; }
    50% { opacity: 1; box-shadow: 0 0 10px var(--signal); }
}

.brand-tag {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 13px;
    letter-spacing: 0.04em;
    font-weight: 600;
    text-transform: none;
    color: var(--text);
    white-space: nowrap;
}

.search {
    flex: 1;
}

.search input {
    width: 100%;
    max-width: 640px;
    border: 1px solid var(--line);
    background: var(--ink);
    color: var(--text);
    border-radius: 999px;
    padding: 9px 16px;
    font-size: 15px;
    font-weight: 500;
}
.search input::placeholder {
    color: var(--muted);
    opacity: 1;
}

.search input:focus {
    outline: 2px solid var(--signal);
    outline-offset: 2px;
    border-color: var(--accent);
}

.user {
    color: var(--text);
    font-size: 13px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}
.berichten-box {
    position: relative;
}
.berichten-box > summary {
    list-style: none;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px 12px;
    color: var(--text);
    font-weight: 600;
    letter-spacing: 0.02em;
    font-size: 13px;
    text-transform: uppercase;
    cursor: pointer;
}
.berichten-box > summary::-webkit-details-marker { display: none; }
.berichten-lijst {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: min(380px, 80vw);
    max-height: 70vh;
    overflow: auto;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 12px;
    z-index: 40;
    white-space: normal;
}
.berichten-lijst article {
    margin: 0 0 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}
.berichten-lijst article:last-of-type { border-bottom: 0; }
.berichten-lijst p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.bericht-nieuw { box-shadow: inset 3px 0 0 var(--accent); padding-left: 10px; }
.user a { color: var(--accent); }
.help-knop,
.aanmeld-knop,
.uitlog-knop {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px 12px;
    color: var(--text) !important;
    font-weight: 600;
    letter-spacing: 0.02em;
    font-size: 13px;
    text-transform: uppercase;
    background: transparent;
}
.aanmeld-knop {
    background: var(--accent);
    color: var(--ink) !important;
    border-color: var(--accent);
}
.uitlog-knop { border-color: var(--line); color: var(--text) !important; }
.help-doc { margin-top: 12px; }
.help-doc h3 { margin-top: 0; }
.help-doc h4 { margin: 16px 0 8px; font-size: 14px; letter-spacing: 0.04em; }
.help-doc ol, .help-doc ul { margin: 8px 0 0 1.2em; padding: 0; }
.help-doc li { margin: 6px 0; color: var(--muted); }
.help-doc li strong { color: var(--text); }
.help-toc { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 8px; padding: 0; list-style: none; }
.help-toc a { color: var(--accent); font-size: 13px; }
.viewer-title {
    margin: 0 0 0 auto;
    color: var(--muted);
    font-size: 13px;
    letter-spacing: 0.04em;
}

.body {
    flex: 1;
    display: flex;
    min-height: 0;
}

.sidebar {
    width: 228px;
    border-right: 1px solid var(--line);
    background: var(--nav);
    padding: 18px 12px;
    overflow: auto;
}

.nav a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--text);
    margin-bottom: 3px;
    font-size: 14px;
    font-weight: 500;
    border-left: 2px solid transparent;
}

.nav a:hover, .nav-pulldown summary:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--text); }
.nav a.active, .nav-pulldown summary.active {
    background: color-mix(in srgb, var(--accent) 16%, transparent);
    color: var(--text);
    border-left-color: var(--accent);
}
.nav-pulldown { margin-bottom: 3px; }
.nav-pulldown summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    list-style: none;
    border-left: 2px solid transparent;
}
.nav-pulldown summary::-webkit-details-marker { display: none; }
.nav-pulldown summary::after {
    content: "▾";
    font-size: 11px;
    color: var(--accent);
    margin-left: 8px;
}
.nav-pulldown[open] summary::after { content: "▴"; }
.nav-sub {
    padding: 4px 0 6px 8px;
    max-height: 280px;
    overflow: auto;
}
.nav-sub a {
    font-size: 12px;
    padding: 6px 10px;
    margin-bottom: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pulldown-label {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin: 8px 0 6px;
}
select.pulldown {
    width: min(100%, 420px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--ink);
    color: var(--text);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    margin-bottom: 16px;
}
.nav .count {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 10px;
    color: var(--signal);
    background: rgba(61, 205, 192, 0.1);
    border-radius: 999px;
    padding: 1px 7px;
}

.sidebar-project {
    margin-top: 18px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel);
}

.main {
    flex: 1;
    overflow: auto;
    padding: 24px 28px;
    min-width: 0;
}

.viewer-window .main {
    padding: 0;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 58px);
    overflow: hidden;
}

.viewer-window .drawing-viewer {
    margin: 0;
    border: 0;
    border-radius: 0;
    height: calc(100vh - 58px);
    display: flex;
    flex-direction: column;
}
.viewer-window .bestek-kader {
    display: block;
    flex: 1;
    width: 100%;
    height: auto;
    min-height: 0;
    border: 0;
    background: var(--panel);
}
.bestek-kader {
    display: block;
    width: 100%;
    height: calc(100vh - 220px);
    min-height: 480px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel);
}
.bestek-viewer-balk { padding: 8px 12px; flex: 0 0 auto; }
.bestek-scroll {
    flex: 1;
    overflow: auto;
    background: #3a3a3a;
    padding: 16px 0 48px;
}
.bestek-blad {
    margin: 0 auto 18px;
    width: min(920px, calc(100% - 32px));
}
.bestek-blad-nr {
    color: #ddd;
    font-size: 12px;
    margin: 0 0 6px;
}
.bestek-blad-kader {
    position: relative;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.bestek-blad-kader img {
    display: block;
    width: 100%;
    height: auto;
    min-height: 200px;
}
.bestek-markering { position: absolute; inset: 0; pointer-events: none; }
.bestek-markering span {
    position: absolute;
    background: rgba(255, 220, 40, 0.38);
    outline: 2px solid #e6c200;
}
.viewer-window .drawing-canvas {
    flex: 1;
    height: auto;
    background:
        radial-gradient(ellipse 70% 40% at 8% 0%, rgba(61, 205, 192, 0.06), transparent 50%),
        radial-gradient(ellipse 50% 30% at 100% 0%, rgba(212, 175, 106, 0.05), transparent 45%),
        #070809;
}

.chat-panel {
    width: 360px;
    border-left: 1px solid var(--line);
    background: var(--nav);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.chat-panel.full {
    width: auto;
    flex: 1;
    border-left: 0;
}

.chat-head, .chat-input {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}

.chat-input { border-bottom: 0; border-top: 1px solid var(--line); }

.chat-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.chat-head h2 { margin: 0; font-size: 16px; color: var(--accent); letter-spacing: 0.04em; }

.chat-log {
    flex: 1;
    overflow: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bubble {
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.45;
    white-space: pre-wrap;
}

.bubble.user {
    background: rgba(212, 175, 106, 0.16);
    border: 1px solid rgba(212, 175, 106, 0.28);
    align-self: flex-end;
    max-width: 90%;
}
.bubble.assistant {
    background: rgba(18, 22, 26, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.meta { font-size: 11px; color: var(--muted); margin-top: 6px; font-family: "IBM Plex Mono", ui-monospace, monospace; }

.feedback { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.feedback button, .quick button, .btn, .primary-button, .secondary-button {
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--text);
    border-radius: 2px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 12px;
}

.primary-button, .btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--ink);
    font-weight: 600;
}

.primary-button:hover, .btn-primary:hover {
    filter: brightness(1.06);
}

a.primary-button, a.secondary-button {
    display: inline-block;
}

.chat-input form { display: flex; gap: 8px; }
.chat-input input {
    flex: 1;
    border: 1px solid var(--line);
    background: var(--ink);
    color: var(--text);
    border-radius: 8px;
    padding: 10px;
}

.quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; }

.kpis, .grid-3, .grid-4, .cards {
    display: grid;
    gap: 14px;
}

.kpis { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: 2fr 1fr; }
.grid-4 { grid-template-columns: repeat(3, 1fr); }
.cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-top: 16px; }

.training-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 16px;
    align-items: stretch;
}
.training-grid .card {
    display: flex;
    flex-direction: column;
    min-height: 292px;
}
.training-grid .card h3 {
    flex: 0 0 auto;
    min-height: 2.7em;
    display: flex;
    align-items: flex-end;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    overflow: visible;
}
.training-grid .card-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.training-grid .card-body > * { margin: 0; }
.training-grid .card-stat {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 13px;
    color: var(--text);
}
.training-grid .card-body .form-group { margin-bottom: 0; }
.training-grid .card-acties {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 14px;
}
.training-grid .card-acties .primary-button,
.training-grid .card-acties .secondary-button {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}
@media (max-width: 1280px) {
    .training-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .training-grid { grid-template-columns: 1fr; }
}

.training-strip {
    margin-top: 14px;
}
.training-strip .verwijder-rij {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}
.training-strip select { width: 100%; }
.danger-button {
    background: transparent;
    border: 1px solid rgba(232, 120, 96, 0.55);
    color: #f0b4a4;
    font-weight: 600;
}
.danger-button:hover { background: rgba(232, 120, 96, 0.12); }
.confirm-laag {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(4, 5, 6, 0.72);
    padding: 24px;
}
.confirm-laag[hidden] { display: none; }
.confirm-kaart {
    width: min(440px, 100%);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 22px 20px 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.confirm-kaart p {
    margin: 0 0 18px;
    font-size: 16px;
    line-height: 1.45;
}
.confirm-kaart .form-actions { justify-content: flex-end; }
.confirm-kaart .keuze-acties {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.confirm-kaart .keuze-acties a,
.confirm-kaart .keuze-acties button {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}
.confirm-kaart h3 { margin: 0 0 8px; }
.viewer-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 16px;
    min-width: 0;
    overflow: hidden;
    box-shadow: var(--shadow);
}

a.card {
    display: flex;
    flex-direction: column;
    min-height: 132px;
}

a.card.fab-card {
    padding: 0;
    min-height: 0;
}
.fab-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 108px;
    background: #f4efe6;
    border-bottom: 1px solid var(--line);
}
.fab-thumb img {
    max-width: 70%;
    max-height: 64px;
    object-fit: contain;
}
.fab-card h3 {
    margin: 12px 14px 14px;
    text-align: center;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.symbool-plaatje {
    width: 72px;
    height: 48px;
    object-fit: contain;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 6px;
    margin-bottom: 10px;
    display: block;
}
.voortgang-balk {
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    overflow: hidden;
    margin: 10px 0 6px;
}
.voortgang-balk span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--signal));
    min-width: 0;
}
.symbool-plaatje.leeg {
    font-size: 10px;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4px;
}

.card h2, .card h3 {
    margin: 0 0 8px;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.35;
}

.card h3 {
    font-size: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card p {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.melding {
    margin: 12px 0;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 106, 0.35);
    background: rgba(212, 175, 106, 0.08);
}

.melding-blok {
    border-color: #8a2b2b;
    background: rgba(138, 43, 43, 0.12);
}

.import-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.import-form select,
.import-form input[type="url"] {
    flex: 1;
    min-width: 220px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--ink);
    color: var(--text);
    border-radius: 8px;
    padding: 10px;
}
.kpi-value {
    font-size: 32px;
    margin: 0;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-weight: 500;
    letter-spacing: -0.03em;
}
.muted { color: var(--muted); }

.page-header h2 {
    margin: 0 0 6px;
    overflow-wrap: anywhere;
    word-break: break-word;
    font-weight: 600;
    letter-spacing: -0.02em;
}
.eyebrow {
    color: var(--signal);
    font-size: 11px;
    letter-spacing: 0.18em;
    margin: 0;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    text-transform: uppercase;
}

.project-tabs { display: flex; gap: 8px; margin: 16px 0; flex-wrap: wrap; }
.project-tab {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--line);
    color: var(--muted);
}
.project-tab.active { background: var(--accent); color: var(--ink); border-color: var(--accent); }

.keten-rail {
    display: flex;
    gap: 0;
    list-style: none;
    margin: 8px 0 6px;
    padding: 0;
    overflow-x: auto;
}
.keten-stap {
    flex: 1 1 0;
    min-width: 88px;
    position: relative;
}
.keten-stap a {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px 10px 16px;
    border: 1px solid var(--line);
    background: var(--panel);
    min-height: 58px;
}
.keten-stap + .keten-stap a { border-left: 0; }
.keten-stap:first-child a { border-radius: 10px 0 0 10px; }
.keten-stap:last-child a { border-radius: 0 10px 10px 0; }
.keten-naam {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
}
.keten-stand { font-size: 11px; color: var(--muted); }
.keten-klaar a { box-shadow: inset 0 -2px 0 var(--signal); }
.keten-bezig a { box-shadow: inset 0 -2px 0 var(--accent); }
.keten-nu a { border-color: var(--accent); }
.keten-regel { margin: 0 0 8px; font-size: 13px; }
.project-tile-keten {
    margin: 10px 0 0;
    font-size: 12px;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    color: var(--muted);
}

.form-group { margin-bottom: 14px; }
.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
}
.badge {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 0.04em;
    border-radius: 999px;
    padding: 3px 8px;
    margin-right: 6px;
}
.badge.a { background: rgba(61, 205, 192, 0.15); color: #9af0e8; }
.badge.b { background: rgba(212, 175, 106, 0.16); color: #ead7a8; }
.badge.c { background: rgba(255, 255, 255, 0.06); color: #c5c0b8; }
.badge.status-akkoord { background: rgba(61, 205, 192, 0.12); color: #9af0e8; }
.badge.status-vastgelegd { background: rgba(61, 205, 192, 0.08); color: #9af0e8; }
.badge.status-open { background: rgba(255, 255, 255, 0.06); color: #c5c0b8; }
.badge.status-nvt { background: rgba(255, 255, 255, 0.04); color: #8a8680; }
.badge.status-discutabel { background: rgba(212, 175, 106, 0.16); color: #ead7a8; }

.form-group select,
.form-group input:not([type="file"]),
.form-group textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1.5px solid var(--line);
    background: var(--panel);
    color: var(--text);
    border-radius: 8px;
    padding: 10px 12px;
    min-height: 42px;
}
.form-group select:focus,
.form-group input:not([type="file"]):focus,
.form-group textarea:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
    border-color: var(--accent);
}
html.thema-kantoor .form-group select,
html.thema-kantoor .form-group input:not([type="file"]),
html.thema-kantoor .form-group textarea {
    background: #ffffff;
    border-color: #b8b0a0;
}
.gate-card .form-group {
    padding-bottom: 4px;
}

.form-group .file-drop,
.file-drop {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 128px;
    padding: 22px 18px;
    margin: 0;
    text-transform: none;
    letter-spacing: 0;
    font-family: "Instrument Sans", system-ui, sans-serif;
    border: 1px dashed rgba(212, 175, 106, 0.38);
    border-radius: 10px;
    background:
        linear-gradient(180deg, rgba(212, 175, 106, 0.05), rgba(7, 8, 9, 0.35));
    cursor: pointer;
    overflow: hidden;
    box-sizing: border-box;
}
.file-drop:hover,
.file-drop:focus-within,
.file-drop.is-over {
    border-color: var(--accent);
    background: rgba(212, 175, 106, 0.09);
}
.file-drop.has-file {
    min-height: 96px;
    border-style: solid;
    border-color: rgba(61, 205, 192, 0.35);
}
.file-drop-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    font-size: 0;
}
.file-drop-input::-webkit-file-upload-button,
.file-drop-input::file-selector-button {
    display: none;
}
.file-drop-body {
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    max-width: 100%;
}
.file-drop-cta {
    color: var(--text);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0;
    text-transform: none;
    border: 0;
    background: none;
    padding: 0;
}
.file-drop-hint {
    color: var(--muted);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.file-drop.has-file .file-drop-cta,
.file-drop.has-file .file-drop-hint {
    display: none;
}
.file-drop-name {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 12px;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}
.file-drop-name:empty { display: none; }

.form-actions { display: flex; gap: 10px; }

.drawing-viewer {
    background: var(--ink);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 16px;
}
#training-components {
    display: none;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
#component-zoek, #component-type {
    background: var(--ink);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 6px 8px;
    max-width: 320px;
}
#component-type { min-width: 280px; max-width: 420px; }

.drawing-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
    gap: 10px;
    flex-wrap: wrap;
    background: rgba(10, 12, 14, 0.94);
}
.analyse-voortgang {
    padding: 10px 16px 12px;
    border-bottom: 1px solid var(--line);
    background: rgba(8, 10, 12, 0.96);
}
.analyse-voortgang[hidden] { display: none; }
.analyse-voortgang p {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--gold, #d4af6a);
    letter-spacing: 0.02em;
}
.analyse-balk {
    height: 8px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}
.analyse-balk span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 99px;
    background: linear-gradient(90deg, #3dcdc0, #d4af6a);
    transition: width 0.25s ease;
}
.drawing-canvas {
    height: 70vh;
    overflow: auto;
    background:
        radial-gradient(ellipse 70% 40% at 8% 0%, rgba(61, 205, 192, 0.06), transparent 50%),
        #070809;
    padding: 16px;
}
.image-wrapper {
    position: relative;
    display: inline-block;
    line-height: 0;
    box-shadow: 0 0 0 1px rgba(212, 175, 106, 0.28), 0 24px 70px rgba(0, 0, 0, 0.5);
}
.drawing-image {
    display: block;
    max-width: 100%;
    filter: invert(0.92) hue-rotate(172deg) saturate(0.45) brightness(0.78) contrast(1.12);
    background: #0a0c0e;
}
.annotation-layer { position: absolute; inset: 0; pointer-events: none; }
.annotation-layer.training-active { pointer-events: auto; cursor: crosshair; }
.annotation-box {
    position: absolute;
    border: 2px solid var(--accent);
    background: rgba(212, 175, 106, 0.14);
}
.annotation-box.voorstel {
    border-style: dashed;
    border-color: #3dcdc0;
    background: rgba(61, 205, 192, 0.16);
    cursor: pointer;
}
.annotation-box.gekozen {
    border-color: #3dcdc0;
    box-shadow: 0 0 0 2px #3dcdc0;
    z-index: 2;
}
.annotation-box.van-type {
    border-color: #3dcdc0;
    box-shadow: 0 0 0 1px #3dcdc0;
    z-index: 1;
}
.annotation-layer.type-filter .annotation-box:not(.van-type):not(.voorstel) {
    opacity: 0.28;
}
.kader-naam {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    margin-bottom: 2px;
    padding: 1px 5px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
    color: #1a1814;
    background: #d4af6a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}

.gate {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
    min-height: calc(100vh - 120px);
    max-width: 1080px;
    margin: 0 auto;
}
.gate-copy h1 {
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin: 0 0 12px;
    font-weight: 600;
}
.gate-links { margin-top: 16px; }
.gate-enkel {
    grid-template-columns: 1fr;
    max-width: 400px;
    align-items: center;
    padding-top: 24px;
}
.merk-watermerk { display: none; }
.auth-gate .shell { position: relative; z-index: 1; }
html:has(body.auth-gate) {
    height: auto;
    min-height: 100%;
    background: #050814;
}
body.auth-gate {
    height: auto;
    min-height: 100vh;
    background:
        radial-gradient(ellipse 70% 55% at 50% 42%, rgba(28, 90, 210, 0.22), transparent 58%),
        radial-gradient(ellipse 40% 30% at 50% 78%, rgba(0, 180, 255, 0.08), transparent 50%),
        #050814;
    color: #e8eef8;
}
body.auth-gate .shell {
    height: auto;
    min-height: 100vh;
}
body.auth-gate .topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: transparent;
    border-bottom: none;
    backdrop-filter: none;
    z-index: 2;
}
body.auth-gate .brand-tag,
body.auth-gate .brand-rule { display: none; }
body.auth-gate .brand strong { color: #f4f7fb; letter-spacing: 0.22em; font-weight: 600; }
body.auth-gate .help-knop {
    color: rgba(232, 238, 248, 0.45) !important;
    border-color: transparent;
    background: transparent;
}
body.auth-gate .help-knop:hover { color: #f4f7fb !important; }
body.auth-gate .main {
    background: transparent;
    padding: 0;
    display: flex;
}
body.auth-gate .body { background: transparent; }
body.landing .topbar { display: none; }
.poort {
    flex: 1;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    padding: 56px 24px 40px;
}
.poort-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 40em;
    gap: 0;
}
.poort-logo {
    width: min(22vmin, 168px);
    height: auto;
    display: block;
    background: transparent;
    mix-blend-mode: normal;
    filter: none;
    margin: 0 auto 14px;
}
.poort-woord {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.38em;
    text-transform: uppercase;
    color: #f4f7fb;
}
.poort-slagzin {
    margin: 10px 0 0;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: #f4f7fb;
}
.poort-lead {
    margin: 14px 0 0;
    font-size: 16px;
    line-height: 1.45;
    color: rgba(232, 238, 248, 0.78);
    max-width: 32em;
}
.poort-herkomst {
    margin: 10px 0 0;
    font-size: 13px;
    line-height: 1.45;
    color: rgba(232, 238, 248, 0.48);
    max-width: 34em;
}
.poort-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 240px;
    height: 48px;
    margin-top: 28px;
    padding: 0 28px;
    border-radius: 6px;
    border: 1px solid rgba(160, 200, 255, 0.35);
    background: linear-gradient(180deg, #3a86ff 0%, #1c5ad6 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    box-shadow: 0 10px 40px rgba(28, 90, 214, 0.45);
}
.poort-cta:hover {
    filter: brightness(1.08);
    box-shadow: 0 12px 48px rgba(56, 140, 255, 0.55);
}
.poort-cta-hint {
    margin: 10px 0 0;
    font-size: 12px;
    letter-spacing: 0.04em;
    color: rgba(232, 238, 248, 0.4);
}
.poort-pilaren {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    width: min(920px, 100%);
}
.poort-pilaren li {
    text-align: left;
    padding: 18px 18px 16px;
    border: 1px solid rgba(160, 200, 255, 0.14);
    border-radius: 10px;
    background: rgba(8, 14, 28, 0.45);
}
.poort-pilaren strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #f4f7fb;
    margin-bottom: 6px;
}
.poort-pilaren span {
    display: block;
    font-size: 13px;
    line-height: 1.45;
    color: rgba(232, 238, 248, 0.62);
}
.poort-beheer {
    margin: 0;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.poort-beheer a { color: rgba(232, 238, 248, 0.28); }
.poort-beheer a:hover { color: rgba(232, 238, 248, 0.7); }
.poort-install {
    width: min(560px, 100%);
    color: rgba(232, 238, 248, 0.72);
    font-size: 14px;
    line-height: 1.45;
}
.poort-install summary {
    cursor: pointer;
    color: rgba(232, 238, 248, 0.55);
    letter-spacing: 0.02em;
}
.poort-install ol {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: stap;
    text-align: left;
}
.poort-install li {
    counter-increment: stap;
    position: relative;
    padding: 8px 0 8px 36px;
}
.poort-install li::before {
    content: counter(stap);
    position: absolute;
    left: 0;
    top: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid rgba(160, 200, 255, 0.35);
    color: #9ec4ff;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}
.poort-install strong { color: #f4f7fb; font-weight: 600; }
@media (max-width: 720px) {
    .poort-pilaren { grid-template-columns: 1fr; }
}
body.auth-gate .gate-card {
    background: rgba(8, 14, 28, 0.72);
    color: #e8eef8;
    border: 1px solid rgba(160, 200, 255, 0.16);
    border-radius: 12px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    text-align: left;
    padding: 28px 26px;
    backdrop-filter: blur(18px);
}
body.auth-gate .gate-card p { margin: 0; }
body.auth-gate .gate-card .muted,
body.auth-gate .gate-card label {
    color: rgba(232, 238, 248, 0.62);
}
body.auth-gate .primary-button {
    border-radius: 6px;
    background: linear-gradient(180deg, #3a86ff 0%, #1c5ad6 100%);
    border-color: transparent;
    color: #fff;
}
body.auth-gate .form-group select,
body.auth-gate .form-group input:not([type="file"]),
body.auth-gate .form-group textarea {
    border-radius: 6px;
    background: rgba(5, 8, 20, 0.55);
    border: 1px solid rgba(160, 200, 255, 0.22);
    color: #f4f7fb;
}
.auth-gate .search,
.auth-gate .weergave-kort { display: none; }
.auth-gate .server-strip { display: none; }
.auth-popup {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(5, 8, 20, 0.55);
}
.auth-popup-kaart {
    max-width: 420px;
    width: 100%;
    padding: 28px 24px;
    border-radius: 12px;
    border: 1px solid rgba(160, 200, 255, 0.16);
    background: rgba(8, 14, 28, 0.92);
    color: #e8eef8;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}
.auth-popup-kaart h1 {
    font-size: 22px;
    margin: 0 0 12px;
    font-weight: 600;
}
.auth-popup-kaart .primary-button { margin-top: 16px; display: inline-block; }
.server-strip { margin: 0 0 12px; font-size: 13px; }
.gate-copy .muted { font-size: 16px; line-height: 1.55; max-width: 34em; }
.gate-card { max-width: none; }
body.auth-gate .sidebar,
body.auth-gate .chat-panel { display: none !important; }
body.auth-gate .body { display: block; }
body.auth-gate .main > .melding,
body.auth-gate .main > .server-strip { display: none; }

.gate-scherm {
    min-height: 100vh;
    margin: 0;
}
.gate-scherm-main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
}
body.gate-voorwaarden .gate-kaart {
    width: min(640px, 100%);
    text-align: left;
}
.voorwaarden-kop {
    margin: 8px 0 8px;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(232, 238, 248, 0.55);
    text-align: left;
}
.voorwaarden-kader {
    height: 220px;
    overflow: auto;
    padding: 12px 14px;
    margin: 0 0 10px;
    text-align: left;
    border: 1px solid rgba(160, 200, 255, 0.22);
    border-radius: 8px;
    background: rgba(5, 8, 20, 0.55);
    color: rgba(232, 238, 248, 0.82);
    font-size: 13px;
    line-height: 1.45;
}
.voorwaarden-kader h3 {
    margin: 12px 0 6px;
    font-size: 13px;
    color: #f4f7fb;
}
.voorwaarden-kader h3:first-child { margin-top: 0; }
.voorwaarden-kader p { margin: 0 0 8px; }
.voorwaarden-einde {
    margin-top: 16px !important;
    color: rgba(158, 196, 255, 0.9);
    font-weight: 600;
}
.val-honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.captcha-rij { position: relative; }
.captcha-nieuw {
    margin-top: 8px;
    font-size: 13px;
}
.licentie-sluit {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}
.licentie-sluit select {
    width: 100%;
    padding: 8px;
}
.voorwaarden-hint { margin: 0 0 10px; font-size: 12px; color: rgba(232, 238, 248, 0.5); text-align: left; }
.voorwaarden-check span { text-align: left; }
.voorwaarden-lees { text-align: left; max-height: 60vh; overflow: auto; }
.voorwaarden-lees h3 { font-size: 14px; margin: 16px 0 6px; color: #f4f7fb; }
.voorwaarden-lees p { margin: 0 0 8px; font-size: 14px; line-height: 1.5; color: rgba(232, 238, 248, 0.78); }
.gate-kaart {
    width: min(420px, 100%);
    padding: 36px 32px 28px;
    border-radius: 16px;
    border: 1px solid rgba(160, 200, 255, 0.18);
    background: rgba(8, 14, 28, 0.78);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(18px);
    text-align: center;
}
.gate-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    mix-blend-mode: normal;
    background: transparent;
    filter: drop-shadow(0 12px 32px rgba(40, 130, 255, 0.45));
    margin: 0 auto 8px;
    display: block;
}
.gate-merk {
    margin: 0 0 18px;
    letter-spacing: 0.28em;
    font-size: 12px;
    font-weight: 600;
    color: rgba(232, 238, 248, 0.7);
}
.gate-kaart h1 {
    margin: 0 0 8px;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: #f4f7fb;
}
.gate-lead,
.gate-ok,
.gate-voet {
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(232, 238, 248, 0.68);
    text-align: left;
}
.gate-ok { color: #9ec4ff; }
.gate-kaart form { text-align: left; }
.gate-kaart .form-group { margin-bottom: 14px; }
.gate-kaart .form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(232, 238, 248, 0.55);
}
.gate-kaart .form-group input {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    box-sizing: border-box;
}
.gate-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 4px 0 18px;
    font-size: 13px;
    line-height: 1.4;
    color: rgba(232, 238, 248, 0.78);
    cursor: pointer;
    text-align: left;
}
.gate-check input {
    width: 18px;
    height: 18px;
    margin-top: 1px;
    flex-shrink: 0;
    accent-color: #3a86ff;
    cursor: pointer;
}
.gate-knop {
    width: 100%;
    height: 44px;
    margin-top: 4px;
}
.gate-knop:disabled,
.voorwaarden-check input:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.gate-voet {
    margin: 18px 0 0;
    text-align: center;
}
.gate-voet a,
.gate-kaart a {
    color: #9ec4ff;
}
.gate-kaart .melding {
    text-align: left;
    margin: 0 0 14px;
}

@media (max-width: 1100px) {
    .chat-panel:not(.full) { display: none; }
    .kpis, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .sidebar { width: 200px; }
    .gate { grid-template-columns: 1fr; gap: 24px; min-height: auto; }
}

.licentie-code {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    letter-spacing: 0.06em;
    font-size: 14px;
}
.citaat { border-left: 3px solid var(--accent); padding-left: 12px; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.citaat a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.dossier-voorblad {
    margin: 16px 0 24px;
    padding: 20px 18px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
}
.dossier-voorblad h2 { margin: 6px 0 4px; }
.dossier-meta {
    display: grid;
    gap: 10px 24px;
    margin: 16px 0 0;
    grid-template-columns: 1fr 1fr;
}
.dossier-meta dt {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}
.dossier-meta dd { margin: 2px 0 0; }
.dossier-disclaimer {
    margin: 16px 0 0;
    padding: 12px 0 0;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}
.dossier-paraaf {
    width: 100%;
    margin-top: 16px;
    border-collapse: collapse;
    font-size: 13px;
}
.dossier-paraaf th, .dossier-paraaf td {
    border: 1px solid var(--line);
    padding: 10px 8px;
    text-align: left;
}
.dossier-paraaf td:nth-child(n+2) { height: 36px; min-width: 18%; }
.paraaf-stempel {
    display: inline-block;
    font-family: "Georgia", "Times New Roman", serif;
    font-weight: 700;
    letter-spacing: 0.12em;
    font-size: 18px;
    padding: 2px 8px;
    border-bottom: 2px solid var(--text);
}
.dossier-acties { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.dossier-punt.status-akkoord { border-color: #2f9e7a; }
.dossier-punt.status-vastgelegd { border-color: #3dcdc0; }
.dossier-punt.status-onjuist { border-color: #c4893a; }
.dossier-punt.status-ontbreekt { border-color: #c45c5c; }
.dossier-punt.status-nvt { border-color: #6b7280; }
.dossier-punt.status-vraag { border-color: #c47b14; }
.badge.status-vraag { background: rgba(196, 123, 20, 0.18); color: #ead7a8; }
.dossier-tak { margin: 20px 0 8px; }
.dossier-tak > summary, .dossier-doc > summary { cursor: pointer; list-style: disclosure-closed; }
.dossier-tak[open] > summary, .dossier-doc[open] > summary { list-style: disclosure-open; }
.dossier-doc { margin: 10px 0 10px 8px; padding-left: 8px; border-left: 1px solid var(--line); }

@media print {
    .topbar, .sidebar, .chat-panel, .project-tabs, .page-header, .nav,
    #training-toggle, #training-components, #viewer-fullscreen,
    #print-fysiek, .viewer-controls a, .dossier-niet-printen, .kpis {
        display: none !important;
    }
    .shell, .body, .main, .drawing-viewer, .drawing-canvas {
        height: auto !important;
        overflow: visible !important;
        background: #fff !important;
        color: #000 !important;
        display: block !important;
    }
    .dossier-voorblad {
        break-after: page;
        border-color: #222;
        background: #fff;
        color: #111;
        box-shadow: none;
    }
    .dossier-disclaimer, .dossier-meta dt, .muted { color: #333 !important; }
    .dossier-paraaf th, .dossier-paraaf td { border-color: #222; }
    .dossier-punt { break-inside: avoid; box-shadow: none; }
    .drawing-toolbar { border: 0; }
    .drawing-image {
        max-width: 100% !important;
        filter: none !important;
        background: #fff !important;
    }
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 8px;
    z-index: 200;
    padding: 8px 12px;
    background: var(--accent);
    color: var(--ink);
    border-radius: 6px;
}
.skip-link:focus {
    left: 8px;
}
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--signal);
    outline-offset: 2px;
}
.weergave-kort {
    display: flex;
    align-items: center;
    gap: 6px;
}
.weergave-kort select {
    max-width: 110px;
    border: 1px solid var(--line);
    background: var(--ink);
    color: var(--text);
    border-radius: 8px;
    padding: 4px 6px;
    font-size: 12px;
}
html.tekst-groot { font-size: 18px; }
html.layout-compact .topbar { height: 48px; }
html.layout-compact .sidebar { width: 188px; padding: 10px 8px; }
html.layout-compact .main { padding: 16px 18px; }
html.layout-compact .card { padding: 12px; border-radius: 10px; }

@media (prefers-reduced-motion: reduce) {
    .brand-rule { animation: none; }
}

.bestek-embed {
    display: block;
    width: 100%;
    height: calc(100vh - 220px);
    min-height: 480px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel);
}
.bestek-split {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.2fr);
    gap: 16px;
    align-items: stretch;
}
.bestek-tekst {
    max-height: calc(100vh - 220px);
    min-height: 320px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel);
    padding: 12px 16px 16px 8px;
}
.bestek-regels {
    margin: 0;
    padding-left: 2.2em;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 13px;
    line-height: 1.55;
    white-space: pre-wrap;
}
.bestek-regels li { padding: 1px 6px; border-radius: 4px; }
.regel-treffer {
    background: #fff3a3;
    outline: 2px solid #e6c200;
}
html.nacht .regel-treffer,
html.contrast .regel-treffer {
    background: #5a4a00;
    outline-color: #ffd400;
    color: #fff;
}
@media (max-width: 900px) {
    .bestek-split { grid-template-columns: 1fr; }
    .bestek-tekst, .bestek-embed { max-height: 50vh; min-height: 240px; }
}

@media (max-width: 720px) {
    .topbar {
        height: auto;
        flex-wrap: wrap;
        padding: 8px 12px;
        gap: 8px;
    }
    .search { order: 3; flex: 1 1 100%; }
    .search input { max-width: none; }
    .brand-tag, .brand-rule { display: none; }
    .body { flex-direction: column; }
    .sidebar {
        width: 100%;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        max-height: none;
        padding: 8px;
    }
    .nav { display: flex; flex-wrap: wrap; gap: 4px; }
    .nav a { margin: 0; }
    .weergave-kort select { max-width: 88px; }
}

.start-scherm {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    margin: 8px 0 32px;
    padding: 12px 24px 8px;
    background: transparent;
}
.start-logo {
    width: min(42vmin, 320px);
    height: auto;
    mix-blend-mode: normal;
    background: transparent;
    filter: drop-shadow(0 10px 24px rgba(28, 90, 214, 0.18));
}
.start-acties {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0;
}
.start-link {
    color: var(--muted);
    font-size: 14px;
}
.start-link:hover { color: var(--text); }
.home { max-width: 1120px; }
.home-hero {
    margin: 8px 0 28px;
    padding: 8px 0 4px;
}
.home-kicker {
    margin: 0 0 10px;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--signal);
}
.home-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(32px, 4.6vw, 52px);
    line-height: 1.08;
    letter-spacing: -0.04em;
    font-weight: 700;
    max-width: 16ch;
}
.home-lead {
    margin: 0 0 22px;
    max-width: 38em;
    font-size: 17px;
    line-height: 1.5;
    color: var(--muted);
}
.home-acties { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.home-acties .primary-button,
.home-acties .secondary-button {
    padding: 11px 18px;
    font-size: 13px;
    letter-spacing: 0.02em;
}
.home-kpis {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    margin: 0 0 28px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    background: var(--line);
}
.home-kpis li {
    margin: 0;
    padding: 18px 20px 16px;
    background: var(--panel);
    font-size: 13px;
    color: var(--muted);
}
.home-kpis span {
    display: block;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 28px;
    font-weight: 500;
    color: var(--text);
    letter-spacing: -0.03em;
    margin-bottom: 4px;
}
.ontwikkel-kader {
    margin: 0 0 28px;
    padding: 20px 22px 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
}
.ontwikkel-kop {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
    flex-wrap: wrap;
}
.ontwikkel-kader h2 {
    margin: 0 0 8px;
    font-size: 18px;
    letter-spacing: -0.02em;
}
.ontwikkel-doel {
    margin: 0;
    max-width: 52em;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}
.ontwikkel-cijfers {
    display: flex;
    gap: 22px;
}
.ontwikkel-cijfers p {
    margin: 0;
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.ontwikkel-cijfers span {
    display: block;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 28px;
    font-weight: 500;
    color: var(--text);
    letter-spacing: -0.03em;
    text-transform: none;
}
.calc-tabel {
    width: 100%;
    margin-top: 20px;
    border-collapse: collapse;
    font-size: 14px;
}
.calc-tabel th,
.calc-tabel td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}
.calc-tabel input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--text);
    border-radius: 4px;
    padding: 6px 8px;
}
.blokschema { margin-top: 8px; max-width: 720px; }
.calc-tabel th {
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
}
.ontwikkel-balk { margin: 16px 0 8px; height: 10px; }
.ontwikkel-bron { margin: 0 0 16px; font-size: 12px; }
.ontwikkel-releases {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 0 0 18px;
}
.ontwikkel-releases article {
    margin: 0;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.12);
}
.ontwikkel-releases .muted {
    margin: 0 0 4px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 11px;
}
.ontwikkel-datum {
    margin: 0 0 8px;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 20px;
    font-weight: 500;
    letter-spacing: -0.02em;
}
.ontwikkel-releases article p:last-child {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.4;
}
@media (max-width: 900px) {
    .ontwikkel-releases { grid-template-columns: 1fr; }
}
.ontwikkel-kolommen {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.ontwikkel-kolommen h3 {
    margin: 0 0 8px;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.ontwikkel-kolommen ul {
    margin: 0;
    padding: 0;
    list-style: none;
}
.ontwikkel-kolommen li {
    margin: 0 0 8px;
    padding-left: 12px;
    border-left: 2px solid var(--line);
    font-size: 13px;
    line-height: 1.35;
    color: var(--text);
}
.ontwikkel-kolommen div:first-child li { border-color: var(--signal, #3dcdc0); }
.ontwikkel-kolommen div:nth-child(2) li { border-color: var(--accent); }
.ontwikkel-kolommen em {
    font-style: normal;
    color: var(--muted);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 12px;
}
@media (max-width: 900px) {
    .ontwikkel-kolommen { grid-template-columns: 1fr; }
}
.home-kolommen {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(240px, 0.7fr);
    gap: 22px;
    align-items: start;
}
.home-bord-kop {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 12px;
}
.home-bord-kop h2,
.home-niveaus h2 {
    margin: 0;
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 600;
}
.home-bord-kop a {
    font-size: 13px;
    color: var(--accent);
    font-weight: 600;
}
.home-bord-acties { display: flex; gap: 16px; margin: 0; }
.home-bord-acties a { font-size: 13px; font-weight: 600; color: var(--accent); }
.project-board {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.project-tile {
    display: flex;
    flex-direction: column;
    min-height: 148px;
    padding: 16px 16px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
    box-shadow: var(--shadow);
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.project-tile:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}
.project-tile-nr {
    margin: 0 0 8px;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--muted);
}
.project-tile h3 {
    margin: 0 0 6px;
    font-size: 18px;
    line-height: 1.25;
    display: block;
    overflow: hidden;
    -webkit-line-clamp: unset;
    line-clamp: unset;
}
.project-tile-meta {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    flex: 1;
}
.project-tile-go {
    margin-top: 14px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
}
.home-leeg {
    padding: 28px 24px;
    border: 1px dashed var(--line);
    border-radius: 14px;
    background: var(--panel);
}
.home-niveaus {
    padding: 18px 18px 8px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
}
.home-niveaus ol {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
}
.home-niveaus li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 0;
    border-top: 1px solid var(--line);
}
.home-niveaus li:first-of-type { border-top: 0; }
.home-niveaus strong { display: block; margin-bottom: 2px; }
.home-niveaus p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.4; }
@media (max-width: 900px) {
    .home-kpis { grid-template-columns: 1fr 1fr; }
    .home-kolommen, .project-board { grid-template-columns: 1fr; }
}

.stand-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 8px 0 20px; }
.stand-balken { display: grid; gap: 12px; margin: 0 0 20px; }
.stand-balk {
    height: 10px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--line) 45%, transparent);
    overflow: hidden;
}
.stand-balk span {
    display: block;
    height: 100%;
    background: #1c5ad6;
    border-radius: inherit;
}
.stand-balk-waarschuw span { background: #c47b14; }
.stand-balk-fout span { background: #b42318; }
.stand-balk-sm { margin-top: 6px; height: 6px; }
.stand-kpis a.card { text-decoration: none; color: inherit; }
.stand-kpis a.card:hover { border-color: var(--accent); }
.stand-kpis a.card.is-gekozen { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.stand-zoek {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(160px, 1fr) auto auto;
    gap: 12px;
    align-items: end;
    margin: 20px 0 8px;
    padding: 14px 16px;
}
.stand-zoek .form-group { margin: 0; }
.stand-acties { margin: 16px 0 20px; padding: 12px 16px; }
.stand-acties summary { cursor: pointer; font-weight: 600; }
.stand-pagina { display: flex; gap: 8px; margin: 16px 0 0; }
@media (max-width: 800px) {
    .stand-zoek { grid-template-columns: 1fr; }
}
.stand-tabel {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.stand-tabel th, .stand-tabel td {
    text-align: left;
    padding: 10px 8px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}
.stand-tabel th {
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}
.stand-stip {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.stand-stip-verloopt, .stand-stip-wacht { background: rgba(196, 123, 20, 0.18); }
.stand-stip-verlopen, .stand-stip-ingetrokken { background: rgba(180, 35, 24, 0.14); }
.stand-stip-geen-licentie { background: rgba(255, 255, 255, 0.06); }
.rol-kolommen {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 8px;
    align-items: start;
}
.rol-kolom h3 { margin: 4px 0 12px; font-size: 28px; }
.rol-lijst { list-style: none; margin: 0; padding: 0; }
.rol-lijst li { margin: 0 0 8px; }
.rol-lijst a {
    display: grid;
    gap: 2px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel) 80%, transparent);
}
.rol-lijst a:hover { border-color: var(--accent); }
.rol-lijst span { display: block; font-size: 13px; color: var(--muted); }
.rol-lijst .stand-stip { margin-top: 6px; }
@media (max-width: 900px) {
    .rol-kolommen { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
    .stand-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .stand-tabel { display: block; overflow-x: auto; }
}
.voet-afspraak {
    margin: 0;
    padding: 10px 22px 14px;
    font-size: 12px;
    color: var(--muted);
    border-top: 1px solid var(--line);
}
.punt-kaart h3 { margin: 0 0 8px; font-size: 16px; }
.punt-strip, .punt-kort {
    max-width: 72em;
    margin: 20px auto 0;
    text-align: left;
    font-size: 13px;
    line-height: 1.45;
    color: var(--muted);
}
.punt-strip p, .punt-kort p { margin: 0 0 10px; }
.punt-strip-poort { max-width: 36em; color: rgba(232, 238, 248, 0.72); }
.punt-kort { margin-top: 20px; }
body.auth-gate .voet-afspraak { display: none; }
