:root {
    --navy-950: #061936;
    --navy-900: #08244a;
    --navy-800: #0c2d59;
    --gold-500: #d99500;
    --gold-400: #f3b51b;
    --bg: #f7f9fc;
    --card: #ffffff;
    --line: #dfe7f1;
    --text: #0b1f44;
    --muted: #66728a;
    --green: #22c55e;
    --orange: #fb923c;
    --yellow: #fcd34d;
    --blue-soft: #eaf3ff;
    --shadow: 0 12px 32px rgba(15, 23, 42, .08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top left, #ffffff 0, var(--bg) 58%);
    color: var(--text);
    font-size: 14px;
}

a {
    color: inherit;
}

.topbar {
    height: 78px;
    padding: 0 28px;
    background: linear-gradient(135deg, var(--navy-950), var(--navy-900));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.brand-logo {
    width: 255px;
    max-width: 100%;
    height: 64px;
    object-fit: contain;
    object-position: left center;
    display: block;
    flex: 0 0 auto;
}

.brand-logo-wordmark {
    object-position: left center;
}

.topbar .brand-logo {
    width: 250px;
    height: 58px;
    object-fit: contain;
    object-position: left center;
}

.brand-copy {
    min-width: 0;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border: 3px solid var(--gold-400);
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-weight: 900;
    color: var(--gold-400);
}

.brand strong {
    display: block;
    font-size: 24px;
    line-height: 1;
}

.brand span {
    display: block;
    margin-top: 4px;
    color: var(--gold-400);
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: 12px;
    font-weight: 800;
}

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

.userbox strong,
.userbox span {
    display: block;
}

.userbox span {
    color: #c8d4e6;
    font-size: 12px;
}

.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #eef3fb;
    color: var(--navy-950);
    display: grid;
    place-items: center;
    font-weight: 900;
}

.notification-dot {
    background: var(--gold-400);
    color: var(--navy-950);
    border-radius: 999px;
    min-width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 12px;
}

.logout-link {
    color: #d8e3f4;
    text-decoration: none;
    font-size: 12px;
}

.nav {
    min-height: 50px;
    padding: 0 24px;
    background: var(--navy-950);
    display: flex;
    align-items: stretch;
    gap: 6px;
    border-top: 1px solid rgba(255,255,255,.08);
    overflow-x: auto;
}

.nav a {
    color: #f8fbff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 14px;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    font-weight: 750;
    font-size: 13px;
}

.nav a span {
    font-size: 19px;
}

.nav a.active {
    border-color: var(--gold-500);
    color: #fff;
}

.shell {
    width: min(1480px, calc(100% - 64px));
    margin: 32px auto 64px;
}

.page-hero {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-end;
    margin-bottom: 24px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff4cf;
    color: #7b5100;
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 850;
    margin-bottom: 18px;
}

h1 {
    margin: 0 0 8px;
    font-size: clamp(30px, 3vw, 42px);
    letter-spacing: -.04em;
}

h2 {
    margin: 0 0 8px;
    font-size: 20px;
    letter-spacing: -.02em;
}

h3 {
    margin: 22px 0 10px;
    font-size: 16px;
}

p {
    color: var(--muted);
    line-height: 1.55;
    margin: 0 0 14px;
}

.grid {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-admin {
    grid-template-columns: minmax(0, 2fr) minmax(360px, .95fr);
    align-items: start;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 22px;
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: #fff4cf;
    display: grid;
    place-items: center;
    margin-bottom: 14px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 18px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--gold-500), #c78300);
    color: #fff;
    text-decoration: none;
    font-weight: 850;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(217, 149, 0, .22);
}

.button-secondary {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--line);
    box-shadow: none;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    font-weight: 850;
    font-size: 12px;
}

.badge-green {
    background: #dcfce7;
    color: #166534;
}

.badge-orange {
    background: #ffedd5;
    color: #9a3412;
}

.status-list {
    display: grid;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
}

.status-list div {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}

.status-list div:last-child {
    border-bottom: 0;
}

.status-list strong {
    color: var(--text);
}

.status-list span {
    color: var(--muted);
}

.tabbar {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    margin-bottom: 20px;
}

.tabbar a {
    text-align: center;
    padding: 16px 12px;
    text-decoration: none;
    font-weight: 850;
    border-right: 1px solid var(--line);
}

.tabbar a:last-child {
    border-right: 0;
}

.tabbar a.active {
    color: #8a5a00;
    box-shadow: inset 0 -3px 0 var(--gold-500);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr auto;
    gap: 16px;
    align-items: end;
    margin-bottom: 18px;
}

label {
    display: grid;
    gap: 7px;
    font-weight: 850;
    color: var(--text);
}

input,
select {
    width: 100%;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 0 12px;
    color: var(--text);
    background: #fff;
}

.toggle-line {
    display: flex;
    gap: 10px;
    align-items: center;
}

.toggle-line input {
    width: 42px;
}

.scale-editor {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.scale-row {
    display: grid;
    grid-template-columns: 48px 1fr 1.25fr 42px 110px;
    gap: 10px;
    align-items: center;
}

.scale-order {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #fff4cf;
    color: #8a5a00;
    font-weight: 900;
}

.color-dot {
    --dot-color: var(--gold-400);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--dot-color);
    display: inline-grid;
    place-items: center;
    font-size: 12px;
    font-weight: 900;
    color: var(--navy-950);
}

.color-input {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.preview-box {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px;
    margin: 14px 0;
}

.preview-row {
    display: grid;
    grid-template-columns: 42px 140px 1fr;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.preview-row:last-child {
    border-bottom: 0;
}

.card-subtle {
    background: #f9fbfe;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: radial-gradient(circle at top, #0b2e62 0, #061936 42%, #f7f9fc 42%);
}

.auth-card {
    width: min(460px, 100%);
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: 20px;
    padding: 28px;
}

.auth-card-wide {
    width: min(720px, 100%);
}

.auth-brand {
    color: var(--navy-950);
    margin-bottom: 24px;
}

.stack {
    display: grid;
    gap: 14px;
}

.alert {
    border-radius: 12px;
    padding: 12px 14px;
    margin: 14px 0;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}

.alert-info {
    background: #eaf3ff;
    color: #1d4ed8;
}

.error-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
}

.error-card {
    width: min(520px, calc(100% - 48px));
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 28px;
    box-shadow: var(--shadow);
}

@media (max-width: 1100px) {
    .grid-3,
    .grid-2,
    .grid-admin,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .tabbar {
        grid-template-columns: repeat(2, 1fr);
    }

    .shell {
        width: min(100% - 32px, 1480px);
    }

    .page-hero {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 700px) {
    .topbar {
        height: auto;
        padding: 18px;
        align-items: flex-start;
        gap: 18px;
        flex-direction: column;
    }

    .nav {
        padding: 0 12px;
    }

    .status-list div,
    .scale-row,
    .preview-row {
        grid-template-columns: 1fr;
    }
}

.auth-brand .brand-logo {
    width: 300px;
    height: 100px;
    max-height: none;
    object-fit: contain;
    object-position: left center;
}

/* Fase 1 basis: scholen, klassen en leerlingen */
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.brand {
    text-decoration: none;
}

.school-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #d8e3f4;
    font-size: 12px;
    font-weight: 800;
}

.school-switcher select {
    width: 190px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.20);
    background: rgba(255,255,255,.08);
    color: #ffffff;
    padding: 0 12px;
    font-weight: 750;
}

.school-switcher option {
    color: var(--text);
}

.alert {
    border-radius: 14px;
    padding: 13px 16px;
    margin-bottom: 18px;
    border: 1px solid transparent;
    font-weight: 700;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.alert-info {
    background: #eaf3ff;
    color: #0b3b75;
    border-color: #bfdbfe;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th,
.data-table td {
    border-bottom: 1px solid var(--line);
    padding: 13px 12px;
    text-align: left;
    vertical-align: middle;
}

.data-table th {
    color: #536178;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 850;
    background: #fbfdff;
}

.data-table td strong {
    display: block;
    color: var(--text);
    font-size: 14px;
}

.table-subtext {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.actions-col {
    width: 1%;
    white-space: nowrap;
}

.inline-form {
    display: inline;
    margin: 0;
}

.button-small {
    min-height: 34px;
    padding: 0 13px;
    border-radius: 9px;
    font-size: 12px;
}

.button-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.button-row.compact {
    gap: 7px;
}

.full-width {
    width: 100%;
}

.empty-state {
    border: 1px dashed var(--line);
    border-radius: 16px;
    background: #fbfdff;
    padding: 22px;
    color: var(--muted);
    margin: 16px 0;
}

.empty-state strong,
.empty-state span {
    display: block;
}

.empty-state strong {
    color: var(--text);
    font-size: 17px;
    margin-bottom: 6px;
}

.filter-bar {
    margin: 0 0 16px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fbfdff;
}

.compact-filter {
    display: flex;
    align-items: end;
    gap: 12px;
}

.compact-filter label {
    max-width: 340px;
}

.class-tabs {
    display: flex;
    gap: 28px;
    border-bottom: 1px solid var(--line);
    margin: -4px 0 22px;
    overflow-x: auto;
}

.class-tabs a {
    color: var(--text);
    text-decoration: none;
    padding: 14px 0;
    border-bottom: 3px solid transparent;
    font-weight: 850;
    white-space: nowrap;
}

.class-tabs a.active {
    border-color: var(--gold-500);
}

.class-hero {
    align-items: center;
}

.dashboard-card {
    min-height: 210px;
}

@media (max-width: 980px) {
    .topbar {
        height: auto;
        padding: 16px;
        align-items: flex-start;
        gap: 16px;
    }

    .topbar-actions {
        width: 100%;
        justify-content: space-between;
        gap: 12px;
    }

    .school-switcher span {
        display: none;
    }

    .school-switcher select {
        width: 150px;
    }
}

@media (max-width: 760px) {
    .topbar {
        flex-direction: column;
    }

    .topbar-actions,
    .userbox {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .school-switcher select {
        width: 100%;
    }

    .compact-filter {
        display: block;
    }

    .data-table th,
    .data-table td {
        padding: 11px 9px;
    }
}

.connector-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.connector-card,
.connector-row {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.connector-card {
    padding: 16px;
}

.connector-title,
.connector-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.connector-title strong,
.connector-title span,
.connector-row strong,
.connector-row span {
    display: block;
}

.connector-title span,
.connector-row span {
    color: var(--muted);
    font-size: 12px;
    margin-top: 3px;
}

.connector-list {
    display: grid;
    gap: 10px;
    margin: 14px 0 18px;
}

.connector-row {
    padding: 12px 14px;
}

.compact-connectors .connector-row {
    min-height: 0;
}

.clean-list {
    margin: 12px 0 8px;
    padding-left: 18px;
    color: var(--muted);
    line-height: 1.5;
}

.clean-list li + li {
    margin-top: 4px;
}

.badge-blue {
    background: #dbeafe;
    color: #1d4ed8;
}

.compact-empty {
    min-height: 120px;
}

@media (max-width: 900px) {
    .connector-grid {
        grid-template-columns: 1fr;
    }
}

/* Schoolbeheer: beoordelingsschalen */
.form-grid-tight {
    margin-bottom: 8px;
}

.compact-form .data-table td {
    padding: 9px 8px;
}

.editable-scale-table input[type="text"] {
    min-width: 120px;
    padding: 9px 10px;
    font-size: 13px;
}

.editable-scale-table .short-input {
    width: 78px;
    min-width: 78px;
}

.color-editor {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.color-editor input[type="color"] {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.color-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    color: var(--muted);
    font-size: 12px;
}

.checkline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 750;
    color: var(--text);
}

.checkline-compact {
    white-space: nowrap;
}

.form-note {
    color: var(--muted);
    font-size: 13px;
}

.optional-row {
    background: #fbfdff;
}

.scale-preview-list {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.scale-preview-item {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    gap: 12px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 11px;
    background: #fff;
}

.scale-preview-dot {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 2px solid rgba(255,255,255,.9);
    box-shadow: 0 0 0 1px var(--line);
}

.scale-preview-item strong,
.scale-preview-item span {
    display: block;
}

.scale-preview-item span {
    color: var(--muted);
    font-size: 12px;
    margin-top: 2px;
}

.scale-preview-item em {
    font-style: normal;
    font-weight: 900;
    color: var(--navy-900);
    background: #f3f6fb;
    border-radius: 999px;
    padding: 5px 9px;
}

.mini-info {
    margin-top: 16px;
    border-top: 1px solid var(--line);
    padding-top: 14px;
}

.mini-info strong,
.mini-info span {
    display: block;
}

.mini-info span {
    color: var(--muted);
    font-size: 13px;
    margin-top: 3px;
}

/* Schoolstructuur patch */
.tabbar-wrap {
    flex-wrap: wrap;
}

.field-label {
    display: block;
    font-weight: 700;
    color: var(--navy, #17213f);
    margin-bottom: 8px;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 8px;
}

.check-card {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(23, 33, 63, 0.12);
    border-radius: 12px;
    background: #fff;
    padding: 9px 10px;
    font-weight: 600;
    cursor: pointer;
}

.check-card input {
    width: auto;
    margin: 0;
}

.check-card:hover {
    border-color: rgba(196, 151, 71, 0.65);
    box-shadow: 0 8px 18px rgba(23, 33, 63, 0.06);
}

.form-note {
    color: #64748b;
    font-size: 0.9rem;
    align-self: center;
}

/* Doelenbeheer patch */
textarea {
    width: 100%;
    min-height: 86px;
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 10px 12px;
    color: var(--text);
    background: #fff;
    font: inherit;
    resize: vertical;
}

.goal-domain-form {
    grid-template-columns: 1.35fr .75fr .55fr auto;
    margin-top: 18px;
    margin-bottom: 0;
}

.form-grid-simple {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.compact-status-list div {
    grid-template-columns: 1fr 1.2fr;
    padding: 11px 14px;
}

.goal-table td {
    vertical-align: top;
}

.goal-table th:nth-child(2),
.goal-table td:nth-child(2) {
    min-width: 280px;
}

.goal-table th:nth-child(5),
.goal-table td:nth-child(5) {
    min-width: 260px;
}

@media (max-width: 900px) {
    .goal-domain-form,
    .form-grid-simple {
        grid-template-columns: 1fr;
    }
}

/* Planningfundament patch */
.planning-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, .55fr);
}

.planning-main-card {
    min-width: 0;
}

.planning-table td {
    vertical-align: top;
}

.planning-table th:nth-child(2),
.planning-table td:nth-child(2) {
    min-width: 310px;
}

.planning-table th:nth-child(6),
.planning-table td:nth-child(6) {
    min-width: 175px;
}

.badge-muted {
    background: #e5e7eb;
    color: #475569;
}

.status-form select {
    min-width: 130px;
    padding: 7px 9px;
    font-size: .9rem;
}

@media (max-width: 1100px) {
    .planning-grid {
        grid-template-columns: 1fr;
    }
}

/* Beoordelenfundament patch */
.assessment-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 18px;
}

.scale-chip,
.current-pill {
    --chip-color: #e5e7eb;
    --pill-color: #e5e7eb;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 999px;
    border: 1px solid rgba(15, 38, 70, .11);
    background: color-mix(in srgb, var(--chip-color) 22%, #ffffff);
    color: #092855;
    padding: 7px 11px;
    font-size: .88rem;
    font-weight: 700;
}

.scale-chip strong,
.current-pill {
    background: color-mix(in srgb, var(--chip-color) 48%, #ffffff);
}

.assessment-matrix-wrap {
    overflow: auto;
    border: 1px solid #dbe6f3;
    border-radius: 18px;
    max-height: 70vh;
    background: #ffffff;
}

.assessment-matrix {
    border-collapse: separate;
    border-spacing: 0;
    width: max-content;
    min-width: 100%;
}

.assessment-matrix th,
.assessment-matrix td {
    border-right: 1px solid #e2eaf5;
    border-bottom: 1px solid #e2eaf5;
    padding: 12px;
    vertical-align: top;
    background: #ffffff;
}

.assessment-matrix thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    min-width: 230px;
    background: #f8fbff;
    color: #092855;
}

.assessment-matrix .sticky-col {
    position: sticky;
    left: 0;
    z-index: 4;
    min-width: 220px;
    max-width: 260px;
    background: #ffffff;
    box-shadow: 7px 0 12px rgba(9, 40, 85, .05);
}

.assessment-matrix thead .sticky-col {
    z-index: 5;
    background: #f8fbff;
}

.assessment-matrix th strong,
.assessment-matrix th span,
.assessment-matrix th em {
    display: block;
}

.assessment-matrix th em,
.assessment-matrix .sticky-col span {
    margin-top: 5px;
    color: #64748b;
    font-style: normal;
    font-size: .82rem;
    line-height: 1.35;
}

.goal-code {
    color: #d89400;
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.cell-assessment-form {
    display: grid;
    gap: 8px;
    min-width: 190px;
}

.cell-assessment-form select {
    width: 100%;
    min-height: 36px;
    padding: 7px 9px;
    border: 1px solid #d8e3f1;
    border-radius: 10px;
    background: #ffffff;
    color: #092855;
    font-weight: 700;
}

.cell-assessment-form details {
    border: 1px dashed #d8e3f1;
    border-radius: 12px;
    padding: 7px 9px;
    background: #fbfdff;
}

.cell-assessment-form summary {
    cursor: pointer;
    color: #506587;
    font-size: .82rem;
    font-weight: 800;
}

.cell-assessment-form textarea {
    width: 100%;
    margin-top: 6px;
    min-height: 54px;
    font-size: .86rem;
}

.current-pill {
    justify-content: center;
    background: color-mix(in srgb, var(--pill-color) 35%, #ffffff);
    border-color: color-mix(in srgb, var(--pill-color) 55%, #d8e3f1);
    padding: 5px 9px;
    font-size: .82rem;
}

.compact-timeline {
    display: grid;
    gap: 10px;
}

.compact-timeline div {
    border: 1px solid #e2eaf5;
    border-radius: 14px;
    padding: 10px 12px;
    background: #fbfdff;
}

.compact-timeline strong,
.compact-timeline span,
.compact-timeline small {
    display: block;
}

.compact-timeline span,
.compact-timeline small {
    color: #64748b;
    line-height: 1.4;
}

.muted {
    color: #64748b;
}

/* Overzichtfundament patch */
.overview-class-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 14px;
}

.overview-class-card {
    display: grid;
    gap: 8px;
    padding: 16px;
    border: 1px solid #dbe6f3;
    border-radius: 18px;
    background: #fbfdff;
    color: #092855;
    text-decoration: none;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.overview-class-card:hover {
    transform: translateY(-1px);
    border-color: #d89400;
    box-shadow: 0 16px 30px rgba(9, 40, 85, .10);
}

.overview-class-card strong {
    font-size: 1.15rem;
}

.mini-label {
    color: #d89400;
    font-weight: 900;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.progress-bar,
.progress-line {
    overflow: hidden;
    height: 10px;
    border-radius: 999px;
    background: #e5edf7;
}

.progress-bar i,
.progress-line i {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #d89400, #f6c557);
}

.progress-line {
    width: 150px;
    max-width: 100%;
    margin-bottom: 5px;
}

.progress-line-mastered i {
    background: linear-gradient(90deg, #16a34a, #86efac);
}

.overview-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.stat-card {
    display: grid;
    gap: 6px;
    padding: 18px;
    border: 1px solid #dbe6f3;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(9, 40, 85, .06);
}

.stat-card span {
    color: #64748b;
    font-weight: 800;
}

.stat-card strong {
    font-size: 2rem;
    letter-spacing: -.04em;
    color: #092855;
}

.stat-card small {
    color: #64748b;
}

.overview-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
    margin-bottom: 20px;
}

.overview-table td {
    vertical-align: middle;
}

.block {
    display: block;
    margin-top: 4px;
}

.distribution-list {
    display: grid;
    gap: 12px;
}

.distribution-item {
    --dist-color: #e5e7eb;
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid #e2eaf5;
    border-radius: 16px;
    background: color-mix(in srgb, var(--dist-color) 16%, #ffffff);
}

.distribution-item span {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.distribution-item em {
    color: #64748b;
    font-style: normal;
    font-weight: 700;
}

.distribution-item .progress-line i {
    background: var(--dist-color);
}

.mini-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.mini-chip {
    --chip-color: #e5e7eb;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 8px;
    border: 1px solid color-mix(in srgb, var(--chip-color) 65%, #d8e3f1);
    background: color-mix(in srgb, var(--chip-color) 28%, #ffffff);
    font-size: .8rem;
    font-weight: 850;
}

.mt-large {
    margin-top: 24px;
}

.empty-state.compact {
    padding: 14px;
}

@media (max-width: 1100px) {
    .overview-stats,
    .overview-grid {
        grid-template-columns: 1fr;
    }
}

/* Historiefundament patch */
.history-class-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 14px;
}

.history-class-card {
    display: grid;
    gap: 8px;
    padding: 16px;
    border: 1px solid #dbe6f3;
    border-radius: 18px;
    background: #fbfdff;
    color: #092855;
    text-decoration: none;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.history-class-card:hover {
    transform: translateY(-1px);
    border-color: #d89400;
    box-shadow: 0 16px 30px rgba(9, 40, 85, .10);
}

.history-class-card strong {
    font-size: 1.15rem;
}

.history-stats .stat-date {
    font-size: 1.15rem;
    letter-spacing: -.02em;
}

.history-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, .55fr);
    margin-bottom: 20px;
}

.history-grid-secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.history-table td {
    vertical-align: top;
}

.history-table th:nth-child(3),
.history-table td:nth-child(3) {
    min-width: 280px;
}

.history-table th:nth-child(5),
.history-table td:nth-child(5) {
    min-width: 260px;
}

.history-timeline {
    display: grid;
    gap: 10px;
    max-height: 620px;
    overflow: auto;
    padding-right: 4px;
}

.history-event {
    display: grid;
    gap: 5px;
    border: 1px solid #e2eaf5;
    border-radius: 14px;
    padding: 11px 12px;
    background: #fbfdff;
}

.history-event strong,
.history-event span,
.history-event small {
    display: block;
}

.history-event span,
.history-event small {
    color: #64748b;
    line-height: 1.4;
}

.history-event-type {
    width: fit-content;
    border-radius: 999px;
    padding: 4px 8px;
    background: #fff2cc;
    color: #8a5d00 !important;
    font-size: .75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}

@media (max-width: 1100px) {
    .history-grid,
    .history-grid-secondary,
    .history-stats {
        grid-template-columns: 1fr;
    }
}

/* Exportfundament patch */
.export-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
    margin-bottom: 20px;
}

.export-class-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 14px;
}

.export-class-card {
    display: grid;
    gap: 8px;
    padding: 16px;
    border: 1px solid #dbe6f3;
    border-radius: 18px;
    background: #fbfdff;
    color: #092855;
    text-decoration: none;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.export-class-card:hover {
    transform: translateY(-1px);
    border-color: #d89400;
    box-shadow: 0 16px 30px rgba(9, 40, 85, .10);
}

.export-class-card strong {
    font-size: 1.15rem;
}

.export-class-card span,
.export-class-card small {
    color: #64748b;
}

.export-actions {
    display: grid;
    gap: 14px;
}

.export-action-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px;
    border: 1px solid #e2eaf5;
    border-radius: 18px;
    background: #fbfdff;
}

.export-action-card div {
    display: grid;
    gap: 5px;
}

.export-action-card strong {
    color: #061f45;
    font-size: 1.05rem;
}

.export-action-card span {
    color: #64748b;
    line-height: 1.45;
}

.export-preview-table td {
    vertical-align: middle;
}

.compact-list div {
    align-items: flex-start;
}

@media (max-width: 1100px) {
    .export-grid,
    .export-stats {
        grid-template-columns: 1fr;
    }

    .export-action-card {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Importpreview en koppelingen */
.import-section {
    align-items: stretch;
}

.import-upload-form input[type="file"],
.import-upload-form select {
    width: 100%;
}

.hint-card {
    border: 1px dashed var(--border);
    border-radius: 16px;
    padding: 14px 16px;
    background: rgba(248, 250, 252, 0.8);
    color: var(--muted);
    display: grid;
    gap: 5px;
}

.hint-card strong {
    color: var(--navy);
}

.import-preview-card {
    margin-top: 22px;
}

.import-preview-table td,
.import-preview-table th {
    vertical-align: top;
}

.selected-row {
    background: rgba(217, 143, 0, 0.08);
}

.audit-rules {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1100px) {
    .audit-rules {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 700px) {
    .audit-rules {
        grid-template-columns: 1fr;
    }
}

/* Bronbeleid koppelingen */
.compact-section-header {
    align-items: flex-start;
}

.source-policy-form {
    display: grid;
    gap: 14px;
}

.source-policy-row {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px;
    background: rgba(248, 250, 252, 0.65);
    display: grid;
    gap: 8px;
}

.source-policy-title {
    display: grid;
    gap: 4px;
    margin-bottom: 2px;
}

.source-policy-title strong {
    color: var(--navy);
}

.source-policy-title span {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.35;
}

.source-policy-row label {
    font-weight: 800;
    color: var(--navy);
    font-size: 0.86rem;
}

.source-policy-row select {
    width: 100%;
}

/* Resultaten/cijfers fundament */
.results-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, .55fr);
    margin-bottom: 22px;
}

.results-detail-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, .55fr);
    margin-top: 22px;
}

.result-create-form {
    align-items: end;
    grid-template-columns: minmax(220px, 1.35fr) minmax(150px, .7fr) minmax(180px, .9fr) minmax(180px, .9fr) minmax(150px, .7fr) auto;
    margin-bottom: 18px;
}

.result-entry-table input,
.result-entry-table select {
    min-width: 90px;
    width: 100%;
}

.result-entry-table td {
    vertical-align: top;
}

.points-cell {
    display: grid;
    grid-template-columns: minmax(70px, 1fr) auto minmax(70px, 1fr);
    gap: 6px;
    align-items: center;
}

.points-cell span {
    color: var(--muted);
    font-weight: 900;
}

.checkbox-stack {
    display: grid;
    gap: 10px;
    max-height: 460px;
    overflow: auto;
    padding-right: 4px;
}

.checkbox-stack label {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: start;
    border: 1px solid var(--border);
    background: rgba(248, 250, 252, 0.7);
    border-radius: 14px;
    padding: 10px 12px;
}

.checkbox-stack span,
.checkbox-stack strong {
    display: block;
}

.checkbox-stack strong {
    color: var(--navy);
    margin-bottom: 2px;
}

.goal-link-form {
    display: grid;
    gap: 14px;
}

.muted-text {
    color: var(--muted);
    line-height: 1.45;
}

@media (max-width: 1200px) {
    .result-create-form,
    .results-grid,
    .results-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* Patch 009: sneller beoordelen en bulkimport leerdoelen */
.assessment-bulk-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.assessment-bulk-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border, #d9e3f0);
    border-radius: 1rem;
    background: #f8fbff;
}

.assessment-bulk-toolbar div {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.assessment-bulk-toolbar span {
    color: var(--muted, #5f6f8d);
    font-size: 0.9rem;
}

.bottom-toolbar {
    position: sticky;
    bottom: 1rem;
    z-index: 5;
    box-shadow: 0 18px 40px rgba(2, 24, 59, 0.12);
}

.assessment-matrix-bulk .assessment-cell {
    transition: background 0.18s ease, box-shadow 0.18s ease;
}

.assessment-matrix-bulk .assessment-cell.is-dirty {
    background: #fff8df;
    box-shadow: inset 0 0 0 2px #e0a000;
}

.assessment-matrix-bulk select {
    min-width: 190px;
}

.quick-fill-label {
    display: block;
    margin-top: 0.65rem;
    font-size: 0.78rem;
    color: var(--muted, #5f6f8d);
}

.quick-fill-label select {
    margin-top: 0.25rem;
    min-width: 160px;
    font-size: 0.8rem;
}

.muted-pill {
    --pill-color: #e5eaf2;
    color: #607089;
}

.help-text {
    display: block;
    margin-top: 0.35rem;
    color: var(--muted, #5f6f8d);
    font-size: 0.85rem;
    line-height: 1.4;
}

.import-form input[type="file"] {
    width: 100%;
    padding: 0.85rem;
    border: 1px dashed var(--border, #d9e3f0);
    border-radius: 0.85rem;
    background: #f8fbff;
}

.import-batch-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.import-batch-card {
    border: 1px solid var(--border, #d9e3f0);
    border-radius: 1rem;
    padding: 0.9rem;
    background: #ffffff;
}

.import-batch-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.import-batch-header div {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.import-batch-header span:not(.badge) {
    color: var(--muted, #5f6f8d);
    font-size: 0.85rem;
}

.import-warning {
    margin: 0.5rem 0;
    padding: 0.65rem 0.75rem;
    border-radius: 0.75rem;
    background: #fff5d8;
    color: #6f4a00;
    font-size: 0.85rem;
    line-height: 1.4;
}

.mini-list {
    list-style: none;
    padding: 0;
    margin: 0.65rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.mini-list li {
    display: grid;
    grid-template-columns: minmax(90px, 0.35fr) 1fr;
    gap: 0.65rem;
    padding: 0.55rem 0.65rem;
    border-radius: 0.75rem;
    background: #f8fbff;
    font-size: 0.86rem;
}

.mini-list li span {
    color: var(--muted, #5f6f8d);
}

.compact-section-header {
    margin-bottom: 0.85rem;
}

.small-button-row {
    margin-top: 0.75rem;
    justify-content: flex-start;
}

/* Patch: compacte acties in doelenbeheer */
.compact-actions {
    align-items: center;
    gap: .45rem;
    flex-wrap: nowrap;
}

.compact-actions .inline-form {
    margin: 0;
}

.import-warning {
    line-height: 1.45;
}

/* Patch: groot controlescherm voor bulkimports */
.import-upload-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
    align-items: start;
}

.import-review-hero {
    align-items: flex-end;
}

.import-review-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.import-review-card {
    margin-top: 1rem;
}

.large-table-wrap {
    width: 100%;
    overflow: auto;
    border: 1px solid var(--border, #d9e3f0);
    border-radius: 1rem;
}

.import-review-table {
    min-width: 1120px;
}

.import-review-table th,
.import-review-table td {
    vertical-align: top;
}

.import-review-table th:nth-child(1),
.import-review-table td:nth-child(1) {
    width: 64px;
    white-space: nowrap;
}

.import-review-table th:nth-child(2),
.import-review-table td:nth-child(2) {
    width: 300px;
}

.import-review-table th:nth-child(3),
.import-review-table td:nth-child(3) {
    width: 140px;
    white-space: nowrap;
}

.import-review-table th:nth-child(4),
.import-review-table td:nth-child(4) {
    min-width: 420px;
}

.import-review-table-wrap thead th {
    position: sticky;
    top: 0;
    background: #f8fbff;
    z-index: 2;
}

.pagination-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    margin-top: 1rem;
    color: var(--muted, #5f6f8d);
    font-weight: 800;
}

.import-review-publishbar {
    position: sticky;
    bottom: 1rem;
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    box-shadow: 0 18px 40px rgba(2, 24, 59, 0.12);
}

.import-review-publishbar h2,
.import-review-publishbar p {
    margin: 0;
}

.import-review-publishbar p {
    color: var(--muted, #5f6f8d);
}

.alert-warning {
    border: 1px solid #f2cf72;
    background: #fff7df;
    color: #694700;
}

@media (max-width: 1200px) {
    .import-upload-grid,
    .import-review-summary {
        grid-template-columns: 1fr;
    }

    .import-review-publishbar {
        align-items: stretch;
        flex-direction: column;
    }
}

/* Succescriteria beheer */
.success-criteria-layout {
    align-items: start;
}

.success-criteria-main {
    min-width: 0;
}

.criteria-list,
.review-list {
    display: grid;
    gap: 1rem;
}

.criteria-goal-card,
.review-card {
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface-soft, #f8fbff);
    padding: 1rem;
}

.criteria-goal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.criteria-goal-header h3,
.review-card h3 {
    margin: 0.2rem 0 0;
    font-size: 1rem;
    line-height: 1.35;
}

.criteria-status-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
    min-width: 120px;
}

.criteria-edit-form textarea {
    min-height: 110px;
    resize: vertical;
}

.criteria-preview {
    margin: 0.75rem 0;
    padding: 0.75rem;
    border-radius: 14px;
    background: #fff;
    border: 1px dashed var(--border);
    line-height: 1.45;
    color: var(--text-muted);
}

.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.badge-blue {
    background: #dbeafe;
    color: #1d4ed8;
}

@media (max-width: 980px) {
    .criteria-goal-header {
        flex-direction: column;
    }

    .criteria-status-stack {
        align-items: flex-start;
    }
}
