/* ============================================
   Kompas CMS — Global Design System
   Based on Kompas Brand Identity
   ============================================ */

/* ---- Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ---- CSS Variables (Design Tokens) ---- */
:root {
    /* Primary — Navy Blue */
    --primary: #1B2A6B;
    --primary-dark: #111D4E;
    --primary-light: #E8EBF5;
    --primary-rgb: 27, 42, 107;

    /* Accent — Orange */
    --accent: #F58220;
    --accent-dark: #D96E10;
    --accent-light: #FEF0E0;
    --accent-rgb: 245, 130, 32;

    /* Secondary — Blue */
    --secondary: #2E5FB7;
    --secondary-light: #EDF2FC;
    --secondary-rgb: 46, 95, 183;

    /* Neutrals */
    --bg: #F0F2F8;
    --bg-soft: #F7F8FB;
    --surface: #FFFFFF;
    --border: #D8DCE6;
    --border-light: #ECEEF5;

    /* Text */
    --text-primary: #1A1F36;
    --text-secondary: #6B7294;
    --text-muted: #9CA3BF;
    --text-inverse: #FFFFFF;

    /* Status */
    --success: #2D9D5C;
    --success-light: #E6F5ED;
    --warning: #E9A820;
    --warning-light: #FDF5E0;
    --danger: #DC3545;
    --danger-light: #FDEAEC;
    --info: #2E5FB7;
    --info-light: #EDF2FC;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(27, 42, 107, 0.04);
    --shadow-sm: 0 1px 3px rgba(27, 42, 107, 0.06), 0 1px 2px rgba(27, 42, 107, 0.04);
    --shadow-md: 0 4px 12px rgba(27, 42, 107, 0.08), 0 2px 4px rgba(27, 42, 107, 0.04);
    --shadow-lg: 0 8px 24px rgba(27, 42, 107, 0.10), 0 4px 8px rgba(27, 42, 107, 0.05);
    --shadow-xl: 0 16px 48px rgba(27, 42, 107, 0.14), 0 8px 16px rgba(27, 42, 107, 0.06);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms ease;

    /* Layout */
    --sidebar-width: 264px;
    --header-height: 64px;
    --topbar-h: 57px;
    --context-bar-h: 44px;
    --content-max-width: 1200px;
}

/* ---- Reset & Base ---- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
    /* Firefox: slanke pagina-scrollbar i.p.v. de dikke grijze systeembalk */
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 116, 139, 0.4) transparent;
}

/* WebKit/Chromium: slanke, meekleurende pagina-scrollbar */
html::-webkit-scrollbar {
    width: 10px;
}

html::-webkit-scrollbar-track {
    background: transparent;
}

html::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.35);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

html::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.55);
    background-clip: padding-box;
}

/* Slanke scrollbars voor álle scrollbare elementen (modals, panelen, lijsten).
   Specifiekere regels (pagina 10px, dropdowns 6px, .context-bar verborgen)
   winnen hier vanzelf van. */
* { scrollbar-width: thin; scrollbar-color: rgba(100, 116, 139, 0.4) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(100, 116, 139, 0.35); border-radius: 8px; }
*::-webkit-scrollbar-thumb:hover { background: rgba(100, 116, 139, 0.55); }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg);
}

a {
    color: var(--secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary);
}

img {
    max-width: 100%;
    height: auto;
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 1.35rem; font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
h4 { font-size: 1.05rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
}

.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }

/* ---- Layout ---- */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* ---- Top Bar ---- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    margin-left: var(--sidebar-width);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--topbar-h);
    padding: 0 var(--space-xl);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    transition: margin-left var(--transition-normal);
}

.topbar__title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 0;
    min-width: 0;
}

.topbar__title-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--accent-light);
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.topbar__title-text {
    font-size: 0.975rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar__right {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
}

.topbar__date {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px 5px 6px;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--border-light);
    background: var(--surface);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.topbar__date-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    flex-shrink: 0;
}

/* ── Context bar (second sticky row: back link + meta + tabs) ── */
.context-bar {
    position: sticky;
    top: var(--topbar-h);
    z-index: 49;
    margin-left: var(--sidebar-width);
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 0 var(--space-xl);
    background: var(--bg-soft);
    border-bottom: 1.5px solid var(--border);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: margin-left var(--transition-normal);
    overflow-x: auto;
    scrollbar-width: none;
    height: var(--context-bar-h);
}
.context-bar::-webkit-scrollbar { display: none; }

.context-bar__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: center;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 5px 16px 5px 12px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border);
    background: var(--bg-soft);
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
    flex-shrink: 0;
    white-space: nowrap;
    margin-right: var(--space-md);
}
.context-bar__back i { font-size: 0.7rem; }
.context-bar__back:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

.context-bar__sep {
    width: 1px;
    align-self: stretch;
    background: var(--border-light);
    flex-shrink: 0;
    margin: 8px 16px;
}

.context-bar__meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
    padding: 8px 0;
}

/* chips */
.cb-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-soft);
    border: 1.5px solid var(--border-light);
    padding: 3px 9px;
    border-radius: var(--radius-full);
    white-space: nowrap;
}
.cb-chip i { font-size: 0.68rem; color: var(--text-muted); }

.cb-chip--info {
    background: var(--primary-light);
    border-color: rgba(var(--primary-rgb), 0.25);
    color: var(--primary);
}
.cb-chip--info i { color: var(--primary); }

.cb-chip--pts {
    background: var(--accent-light);
    border-color: rgba(var(--accent-rgb), 0.3);
    color: var(--accent-dark);
}
.cb-chip--pts i { color: var(--accent); }

.cb-chip--empty {
    background: var(--danger-light);
    border-color: rgba(220, 53, 69, 0.25);
    color: var(--danger);
}
.cb-chip--empty i { color: var(--danger); }

.cb-chip--ok {
    background: var(--success-light, #eef8f2);
    border-color: rgba(45, 157, 92, 0.3);
    color: var(--success);
}
.cb-chip--ok i { color: var(--success); }

/* ── Context bar tabs ── */
.context-bar__tabs {
    display: flex;
    align-items: stretch;
    gap: 0;
}

.cb-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 16px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    box-shadow: inset 0 -2.5px 0 transparent;
    white-space: nowrap;
    transition: color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}
.cb-tab i { font-size: 0.72rem; }
.cb-tab:hover {
    color: var(--primary);
    background: var(--primary-light);
}
.cb-tab--active {
    color: var(--primary);
    font-weight: 600;
    box-shadow: inset 0 -2.5px 0 var(--accent);
}
.cb-tab__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: var(--radius-full);
    font-size: 0.67rem;
    font-weight: 700;
    background: var(--primary-light);
    color: var(--primary);
}
.cb-tab__count--warning {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 6px rgba(245,130,32,0.4), 0 1px 2px rgba(245,130,32,0.2);
}

/* ── Context bar breadcrumb ── */
.cb-crumb {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 1;
}
.cb-crumb i { font-size: 0.75rem; }
.cb-crumb:hover { color: var(--primary); }
.cb-crumb--current {
    color: var(--text-primary);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex-shrink: 2;
}
.cb-crumb__sep {
    font-size: 0.5rem;
    opacity: 0.35;
    color: var(--text-muted);
    flex-shrink: 0;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: var(--space-xl) var(--space-xl) 96px;
    min-height: 100vh;
    transition: margin-left var(--transition-normal);
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
    gap: var(--space-md);
}

/* Title is now in the topbar — hide it from the page content */
.page-header h1 { display: none; }
.page-header > div > h1:only-child { display: none; }

/* When h1 is the only content, collapse the header block */
.page-header:has(> h1:only-child),
.page-header:has(> div > h1:only-child) {
    margin-bottom: var(--space-md);
}

/* ── Sticky action bar ── */
.sticky-action-bar {
    position: fixed;
    bottom: 16px;
    left: calc(var(--sidebar-width) + var(--space-xl));
    right: var(--space-xl);
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-md) var(--space-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    z-index: 10;
}
.sticky-action-bar__info {
    display: flex;
    gap: var(--space-lg);
    font-size: 0.88rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
    align-items: center;
}
.sticky-action-bar__info i {
    margin-right: 5px;
    color: var(--primary);
}

.sticky-action-bar .cb-filter,
.sticky-action-bar .users-filter {
    flex: 1;
    min-width: 0;
    flex-wrap: nowrap;
}
/* A generic list-search sitting inside the sticky bottom bar keeps its grey
   pill look, just fills the width and drops its own bottom margin. */
.sticky-action-bar .list-search { flex: 1; min-width: 0; margin-bottom: 0; }

/* ── Page meta / subheading stats row ── */
.page-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    row-gap: 4px;
    margin-top: 6px;
    font-size: 0.82rem;
    color: var(--text-muted);
}
.page-meta__item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}
.page-meta__item + .page-meta__item::before {
    content: '·';
    margin: 0 8px;
    color: var(--border);
    font-size: 1.1em;
}
.page-meta__item i {
    color: var(--primary);
    font-size: 0.85em;
}
.page-meta__badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.78rem;
}
.page-meta__badge--empty {
    background: var(--danger-light);
    color: var(--danger);
}
.page-meta__badge--pts {
    background: rgba(245, 130, 32, 0.12);
    color: var(--accent);
}
.page-meta__badge--pts i {
    color: var(--accent);
}

.container {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* ---- Cards ---- */
.card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: 0 1px 4px rgba(27, 42, 107, 0.03);
    padding: var(--space-xl);
    border: 1px solid var(--border-light);
    transition: box-shadow var(--transition-normal), border-color var(--transition-normal), transform var(--transition-normal);
}

.card:hover {
    box-shadow: 0 4px 16px rgba(27, 42, 107, 0.05);
}

.card--clickable:hover {
    border-left: 3px solid var(--accent);
    cursor: pointer;
    transform: translateY(-1px);
}

.card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-light);
}
/* Berichtenlijst sluit direct aan op de kop — geen lege ruimte erboven. */
.card--messages .card__header { margin-bottom: 0; }

.card__title {
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: var(--space-md);
    color: var(--primary);
}

.card__title i {
    color: var(--primary);
    background: rgba(27, 42, 107, 0.05);
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: inset 0 0 0 1px rgba(27, 42, 107, 0.08);
}

/* Notificatie-badge op het card-titel-icoon (zelfde idee als de sidebar). */
.card__title-icon { position: relative; display: inline-flex; flex-shrink: 0; }
.card__title-badge {
    position: absolute;
    top: -6px;
    right: -7px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 0.64rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--surface, #fff);
}
/* Neutrale telling (geen 'attentie'-oranje) — bv. aantal cursussen/examens. */
.card__title-badge--count { background: var(--primary-light); color: var(--primary); }

.card__body {
    padding: var(--space-sm) 0;
}

/* ---- Stat Cards (Dashboard) ---- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.stat-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 20px var(--space-xl);
    box-shadow: 0 2px 8px rgba(27, 42, 107, 0.04);
    border: 1.5px solid var(--border-light);
    border-top: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.stat-card::after {
    content: '\f054';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%) translateX(6px);
    font-size: 0.65rem;
    color: var(--text-muted);
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
}

.stat-card:hover::after {
    opacity: 0.5;
    transform: translateY(-50%) translateX(0);
}

.stat-card--primary { border-top-color: var(--primary); }
.stat-card--accent  { border-top-color: var(--accent); }
.stat-card--success { border-top-color: var(--success); }
.stat-card--danger  { border-top-color: var(--danger); }

.stat-card--primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(27, 42, 107, 0.10);
    border-color: rgba(27, 42, 107, 0.18);
    border-top-color: var(--primary);
}
.stat-card--accent:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(245, 130, 32, 0.12);
    border-color: rgba(245, 130, 32, 0.25);
    border-top-color: var(--accent);
}
.stat-card--success:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(45, 157, 92, 0.10);
    border-color: rgba(45, 157, 92, 0.22);
    border-top-color: var(--success);
}
.stat-card--danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(220, 53, 69, 0.10);
    border-color: rgba(220, 53, 69, 0.22);
    border-top-color: var(--danger);
}

.stat-card__icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.stat-card:hover .stat-card__icon {
    transform: scale(1.1);
}

.stat-card__icon--primary {
    background: var(--primary-light);
    color: var(--primary);
}

.stat-card__icon--accent {
    background: var(--accent-light);
    color: var(--accent);
}

.stat-card__icon--success {
    background: var(--success-light);
    color: var(--success);
}

.stat-card__icon--danger {
    background: var(--danger-light);
    color: var(--danger);
}

.stat-card__info h3 {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 5px;
    letter-spacing: -0.04em;
    color: var(--text-primary);
}

.stat-card__info p {
    font-size: 0.72rem;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.stat-card--primary .stat-card__info p {
    background: var(--primary-light);
    color: var(--primary);
}
.stat-card--accent .stat-card__info p {
    background: var(--accent-light);
    color: var(--accent-dark);
}
.stat-card--success .stat-card__info p {
    background: var(--success-light);
    color: var(--success);
}
.stat-card--danger .stat-card__info p {
    background: var(--danger-light);
    color: var(--danger);
}

/* ---- Context bar greeting ---- */
.cb-greeting {
    font-size: 0.82rem;
    color: var(--text-secondary);
}
.cb-greeting strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ---- Super Cards (Dashboard) ---- */
.super-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}
.super-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}
.super-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.super-card--primary { border-top: 3px solid var(--primary); }
.super-card--success  { border-top: 3px solid var(--success); }
.super-card--accent   { border-top: 3px solid var(--accent); }
.super-card--danger   { border-top: 3px solid var(--danger); }

.super-card__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: var(--space-md) var(--space-xl);
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-soft);
}
.super-card__icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.92rem; flex-shrink: 0;
}
.super-card__icon--primary { background: var(--primary-light); color: var(--primary); }
.super-card__icon--success  { background: var(--success-light);  color: var(--success); }
.super-card__icon--accent   { background: var(--accent-light);   color: var(--accent); }
.super-card__icon--danger   { background: var(--danger-light);   color: var(--danger); }

.super-card__title {
    font-size: 0.72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--text-muted); flex: 1;
}
/* Kop toont de belangrijkste telling (getal + label) i.p.v. een categorienaam. */
.super-card__title--lead {
    display: inline-flex; align-items: baseline; gap: 8px;
    text-transform: none; letter-spacing: normal;
}
.super-card__title-count {
    font-size: 1.4rem; font-weight: 800; line-height: 1;
    letter-spacing: -0.03em; color: var(--text-primary);
}
.super-card__title-name {
    font-size: 0.72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--text-muted);
}
.super-card__action {
    font-size: 0.75rem; font-weight: 600;
    color: var(--primary); text-decoration: none;
    display: inline-flex; align-items: center; gap: 5px;
    opacity: 0.7; transition: opacity 0.15s;
}
.super-card__action i { font-size: 0.65rem; }
.super-card__action:hover { opacity: 1; }

.super-card__stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
}
.super-card__stat {
    padding: var(--space-lg) var(--space-xl);
    display: flex; flex-direction: column; gap: 5px;
    border-right: 1px solid var(--border-light);
    text-decoration: none; color: inherit;
    transition: background 0.15s;
}
.super-card__stat:last-child { border-right: none; }
a.super-card__stat:hover { background: var(--bg-soft); }
.super-card__stat-val {
    font-size: 2rem; font-weight: 800; line-height: 1;
    letter-spacing: -0.04em; color: var(--text-primary);
}
.super-card__stat-label {
    font-size: 0.68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.07em;
    color: var(--text-muted);
}
.super-card__stat--alert .super-card__stat-val { color: var(--danger); }
.super-card__stat--alert .super-card__stat-label { color: var(--danger); }

@media (max-width: 768px) {
    .super-cards { grid-template-columns: 1fr; }
}

/* ---- User Stat Cards (Gebruikers Page Only) ---- */
.user-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.user-stat-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: var(--space-lg) var(--space-xl);
    border: 1.5px solid var(--border-light);
    border-top: 3px solid transparent;
    box-shadow: 0 2px 8px rgba(27, 42, 107, 0.04);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 135px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.user-stat-card--primary { border-top-color: var(--primary); }
.user-stat-card--accent  { border-top-color: var(--accent); }
.user-stat-card--success { border-top-color: var(--success); }
.user-stat-card--danger  { border-top-color: var(--danger); }

.user-stat-card--primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(27, 42, 107, 0.10);
    border-color: rgba(27, 42, 107, 0.18);
    border-top-color: var(--primary);
}
.user-stat-card--accent:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(245, 130, 32, 0.12);
    border-color: rgba(245, 130, 32, 0.25);
    border-top-color: var(--accent);
}
.user-stat-card--success:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(45, 157, 92, 0.10);
    border-color: rgba(45, 157, 92, 0.22);
    border-top-color: var(--success);
}
.user-stat-card--danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(220, 53, 69, 0.10);
    border-color: rgba(220, 53, 69, 0.22);
    border-top-color: var(--danger);
}

.user-stat-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
}

.user-stat-card__title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.user-stat-card__icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    transition: transform var(--transition-normal);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.user-stat-card:hover .user-stat-card__icon {
    transform: scale(1.08);
}

.user-stat-card--primary .user-stat-card__icon {
    background: rgba(27, 42, 107, 0.06);
    color: var(--primary);
}

.user-stat-card--accent .user-stat-card__icon {
    background: rgba(245, 130, 32, 0.08);
    color: var(--accent);
}

.user-stat-card--success .user-stat-card__icon {
    background: rgba(40, 167, 69, 0.08);
    color: var(--success);
}

.user-stat-card--danger .user-stat-card__icon {
    background: rgba(220, 53, 69, 0.08);
    color: var(--danger);
}

.user-stat-card__body h3 {
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1;
    margin: 0 0 4px 0;
    letter-spacing: -0.04em;
    color: var(--text-primary);
}

.user-stat-card__label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    background: var(--bg);
}

.user-stat-card__label i {
    font-size: 0.7rem;
}

.user-stat-card--primary .user-stat-card__label {
    background: var(--primary-light);
    color: var(--primary);
}
.user-stat-card--primary .user-stat-card__label i { color: var(--primary); }

.user-stat-card--accent .user-stat-card__label {
    background: var(--accent-light);
    color: var(--accent-dark);
}
.user-stat-card--accent .user-stat-card__label i { color: var(--accent); }

.user-stat-card--success .user-stat-card__label {
    background: var(--success-light);
    color: var(--success);
}
.user-stat-card--success .user-stat-card__label i { color: var(--success); }

.user-stat-card--danger .user-stat-card__label {
    background: var(--danger-light);
    color: var(--danger);
}
.user-stat-card--danger .user-stat-card__label i { color: var(--danger); }

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 10px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
    position: relative;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.btn--primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--text-inverse);
    border-color: var(--primary);
}

.btn--primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), #0A1238);
    border-color: var(--primary-dark);
    color: var(--text-inverse);
}

.btn--accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: var(--text-inverse);
    border-color: var(--accent);
}

.btn--accent:hover {
    background: linear-gradient(135deg, var(--accent-dark), #C05A08);
    border-color: var(--accent-dark);
    color: var(--text-inverse);
}

.btn--secondary {
    background: transparent;
    color: var(--secondary);
    border-color: var(--secondary);
}

.btn--secondary:hover {
    background: var(--secondary);
    color: var(--text-inverse);
}

.btn--success {
    background: linear-gradient(135deg, var(--success), #208A4A);
    color: var(--text-inverse);
    border-color: var(--success);
}

.btn--success:hover {
    background: linear-gradient(135deg, #208A4A, #187A3E);
    border-color: #208A4A;
    color: var(--text-inverse);
}

.btn--warning {
    background: linear-gradient(135deg, var(--warning), #D09418);
    color: var(--text-inverse);
    border-color: var(--warning);
}

.btn--warning:hover {
    background: linear-gradient(135deg, #D09418, #B88010);
    border-color: #D09418;
    color: var(--text-inverse);
}

.btn--danger {
    background: linear-gradient(135deg, var(--danger), #C82333);
    color: var(--text-inverse);
    border-color: var(--danger);
}

.btn--danger:hover {
    background: linear-gradient(135deg, #C82333, #A71D2A);
    border-color: #C82333;
    color: var(--text-inverse);
}

.btn--ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border);
}

.btn--ghost:hover {
    background: var(--bg-soft);
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.btn--sm {
    padding: 6px 14px;
    font-size: 0.78rem;
    border-radius: var(--radius-sm);
}

.btn--lg {
    padding: 14px 28px;
    font-size: 1rem;
}

.btn--block {
    width: 100%;
}

.btn--icon {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: var(--radius-md);
}

/* Outline actions for table rows */
.table .btn--sm {
    padding: 5px 10px;
    border-radius: 6px;
    box-shadow: none;
    transition: all var(--transition-fast);
}
.table .btn--ghost.btn--sm {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid rgba(27, 42, 107, 0.15);
}
.table .btn--ghost.btn--sm:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(27, 42, 107, 0.05);
    box-shadow: 0 2px 6px rgba(27, 42, 107, 0.08);
    transform: none;
}
.table .btn--danger.btn--sm {
    background: transparent;
    color: var(--danger);
    border: 1.5px solid rgba(220, 53, 69, 0.2);
}
.table .btn--danger.btn--sm:hover {
    color: var(--danger);
    border-color: var(--danger);
    background: rgba(220, 53, 69, 0.06);
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.08);
    transform: none;
}
.table .btn--warning.btn--sm {
    background: transparent;
    color: var(--warning);
    border: 1.5px solid rgba(233, 168, 32, 0.28);
}
.table .btn--warning.btn--sm:hover {
    color: var(--warning);
    border-color: var(--warning);
    background: rgba(233, 168, 32, 0.08);
    box-shadow: 0 2px 6px rgba(233, 168, 32, 0.10);
    transform: none;
}

.btn[disabled],
.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ---- Forms ---- */
.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    /* Expliciet, niet geërfd van body (1.6): anders berekent elk soort control
       (input, textarea, select, en de <button> van de custom select) z'n hoogte
       net iets anders en staan ze niet op één lijn. */
    line-height: 1.4;
    color: var(--text-primary);
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
    outline: none;
}

.form-control:hover {
    border-color: #B0B6CC;
}

.form-control:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(var(--secondary-rgb), 0.12);
    background: #FAFBFF;
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control--error {
    border-color: var(--danger);
}

.form-control--error:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

.form-error {
    font-size: 0.8rem;
    color: var(--danger);
    margin-top: var(--space-xs);
}

/* Input met icoon (gedeeld met login/registratie — zie ook login.css) */
.input-group {
    position: relative;
}

/* Alleen het icoon dat direct kind van .input-group is; `> i` voorkomt dat het
   oog-icoontje BINNEN de toggle-knop ook absoluut gepositioneerd wordt. */
.input-group > i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color var(--transition-fast);
    pointer-events: none;
}

.input-group .form-control {
    padding-left: 40px;
}

/* Inputs met een wachtwoord-toggle krijgen rechts extra ruimte zodat de
   tekst nooit onder het oog-knopje loopt. */
.input-group:has(.toggle-password) .form-control {
    padding-right: 42px;
}

.input-group .form-control:focus ~ i,
.input-group:focus-within > i {
    color: var(--secondary);
}

/* Wachtwoord-toggle: cirkelvormig knopje rechts in het veld. */
.input-group .toggle-password {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.95rem;
    padding: 0;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.input-group .toggle-password:hover {
    color: var(--secondary);
    background: var(--bg-soft, rgba(27, 42, 107, 0.06));
}

.input-group .toggle-password:focus-visible {
    outline: none;
    color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(27, 42, 107, 0.15);
}

.input-group .toggle-password i {
    pointer-events: none;
}

textarea.form-control {
    min-height: 100px;
    max-height: 280px;
    resize: none !important;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
}

textarea.form-control.form-control--autosize {
    max-height: 480px;
    min-height: 96px;
    overflow-x: hidden;
    overflow-y: hidden;
    resize: none !important;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    textarea.form-control.form-control--autosize {
        max-height: 70vh;
    }
}

textarea.form-control.form-control--autosize.form-control--option {
    min-height: 44px;
    max-height: 200px;
    line-height: 1.45;
}

@media (max-width: 768px) {
    textarea.form-control.form-control--autosize.form-control--option {
        max-height: 40vh;
    }
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7294' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

input[type="radio"],
input[type="checkbox"] {
    accent-color: var(--accent);
    cursor: pointer;
}

.kompas-check,
.pool-row__option--correct,
.option--correct::after,
.exam-option--selected::after {
    color: var(--accent) !important;
}

.pool-row__option--correct {
    font-weight: 700;
}

.option--correct {
    background: var(--accent-light) !important;
    border-color: var(--accent) !important;
}

.option--correct .option__bubble {
    background: var(--accent) !important;
    color: #fff !important;
}

.option--correct .option__text {
    color: var(--accent-dark) !important;
    font-weight: 600;
}

/* ---- Tables ---- */
.table-wrapper {
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: 0 1px 4px rgba(27, 42, 107, 0.03);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background: var(--primary);
}

.table thead th {
    padding: 14px 18px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.95);
    text-align: left;
    white-space: nowrap;
    border-bottom: none;
}

.table thead th:first-child {
    border-radius: var(--radius-xl) 0 0 0;
}

.table thead th:last-child {
    border-radius: 0 var(--radius-xl) 0 0;
}

.table tbody tr {
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition-fast);
}

.table tbody tr:last-child {
    border-bottom: none;
}

.table tbody tr:hover {
    background: rgba(27, 42, 107, 0.015);
}

.table tbody td {
    padding: 14px 18px;
    font-size: 0.88rem;
    color: var(--text-primary);
    vertical-align: middle;
}

.table--compact tbody td {
    padding: 8px 14px;
    font-size: 0.85rem;
}

/* ---- Pagination (table footer: record count + page nav) ---- */
.pagination {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px;
    padding: 14px var(--space-lg);
    border-top: 1px solid var(--border-light);
}
.pagination__info { font-size: 0.85rem; color: var(--text-muted); }
.pagination__info strong { color: var(--text-primary); }
.pagination__controls { display: flex; align-items: center; gap: 4px; }
.pagination__btn {
    min-width: 34px; height: 34px; padding: 0 8px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--border); border-radius: var(--radius-md);
    background: var(--surface); color: var(--text-secondary);
    font-size: 0.85rem; font-weight: 600; text-decoration: none;
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}
.pagination__btn:hover { background: var(--bg-soft); border-color: var(--primary); color: var(--primary); }
.pagination__btn--active { background: var(--surface); border: 2px solid var(--accent); color: var(--accent); cursor: default; }
.pagination__btn--active:hover { background: var(--surface); border-color: var(--accent); color: var(--accent); }
.pagination__btn--disabled { opacity: 0.4; pointer-events: none; }
.pagination__ellipsis { padding: 0 4px; color: var(--text-muted); }
.pagination__btn:disabled { opacity: 0.4; pointer-events: none; cursor: default; }
.pagination[hidden] { display: none !important; }

/* ---- Course/exam filter dropdown (custom, fully styled) — searchable pill
   trigger + panel, used by any page that filters a list by course or exam. ---- */
.cfilter { position: relative; user-select: none; flex-shrink: 0; }
.cfilter__trigger {
    display: inline-flex; align-items: center; gap: 9px;
    background: var(--primary-light, #E8EBF5);
    border: 1.5px solid rgba(27, 42, 107, 0.12);
    border-radius: var(--radius-full, 50px);
    padding: 8px 14px; cursor: pointer; white-space: nowrap;
    font-size: 0.85rem; line-height: 1.4; font-weight: 700; color: var(--primary, #1b2a6b);
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.cfilter__trigger:hover,
.cfilter.open .cfilter__trigger {
    background: var(--surface, #fff);
    border-color: var(--primary, #1b2a6b);
    box-shadow: 0 0 0 3px rgba(27, 42, 107, 0.08);
}
.cfilter__lead { color: var(--primary, #1b2a6b); opacity: 0.5; font-size: 0.82rem; flex-shrink: 0; }
.cfilter__text { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.cfilter__icon {
    font-size: 0.68rem; color: var(--primary, #1b2a6b); opacity: 0.65;
    margin-left: 2px; transition: transform 0.2s;
}
.cfilter.open .cfilter__icon { transform: rotate(180deg); }
.cfilter__dropdown {
    position: absolute; top: calc(100% + 8px); right: 0; min-width: 260px; max-width: 360px;
    background: var(--surface, #fff); border-radius: var(--radius-lg, 12px);
    box-shadow: 0 14px 40px rgba(0,0,0,0.16), 0 0 0 1px rgba(0,0,0,0.05);
    padding: 6px; z-index: 50;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
}
.cfilter.open .cfilter__dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.cfilter__search {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px; margin-bottom: 4px;
    background: #f1f3f9; border-radius: 8px;
    border: 1.5px solid transparent; transition: border-color 0.2s, background 0.2s;
}
.cfilter__search:focus-within { background: var(--surface, #fff); border-color: var(--primary, #1b2a6b); }
.cfilter__search i { color: var(--text-muted, #6b7280); font-size: 0.78rem; flex-shrink: 0; }
.cfilter__search-input {
    flex: 1; min-width: 0; border: none; outline: none; background: transparent;
    font-family: inherit; font-size: 0.85rem; font-weight: 500; color: var(--text-primary, #1e293b);
}
.cfilter__search-input::placeholder { color: var(--text-muted, #6b7280); }
.cfilter__options { max-height: 240px; overflow-y: auto; }
.cfilter__option {
    padding: 10px 14px; font-size: 0.85rem; font-weight: 600; line-height: 1.3;
    color: var(--text-primary, #1e293b); cursor: pointer; border-radius: 8px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; text-overflow: ellipsis;
    transition: background 0.15s, color 0.15s;
}
.cfilter__option:hover { background: rgba(27, 42, 107, 0.05); }
.cfilter__option.selected { background: rgba(27, 42, 107, 0.12); color: var(--primary, #1b2a6b); font-weight: 700; }
.cfilter__empty { padding: 14px; text-align: center; color: var(--text-muted, #6b7280); font-size: 0.82rem; }
.cfilter__options::-webkit-scrollbar { width: 6px; }
.cfilter__options::-webkit-scrollbar-thumb { background: var(--border, #cbd5e1); border-radius: 10px; }

/* Thin scrollbars for all scrollable dropdown menus (matches .cfilter__options) */
.cfilter__options,
.cdd__panel,
.rfilter__list,
#dateFilterList,
#courseFilterOptions,
.cur-dd__menu,
.status-filter__panel,
.course-filter__panel {
    scrollbar-width: thin;
    scrollbar-color: var(--border, #cbd5e1) transparent;
}
.cdd__panel::-webkit-scrollbar,
.rfilter__list::-webkit-scrollbar,
#dateFilterList::-webkit-scrollbar,
#courseFilterOptions::-webkit-scrollbar,
.cur-dd__menu::-webkit-scrollbar,
.status-filter__panel::-webkit-scrollbar,
.course-filter__panel::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.cdd__panel::-webkit-scrollbar-thumb,
.rfilter__list::-webkit-scrollbar-thumb,
#dateFilterList::-webkit-scrollbar-thumb,
#courseFilterOptions::-webkit-scrollbar-thumb,
.cur-dd__menu::-webkit-scrollbar-thumb,
.status-filter__panel::-webkit-scrollbar-thumb,
.course-filter__panel::-webkit-scrollbar-thumb {
    background: var(--border, #cbd5e1);
    border-radius: 10px;
}
.cfilter__options::-webkit-scrollbar-track,
.cdd__panel::-webkit-scrollbar-track,
.rfilter__list::-webkit-scrollbar-track,
#dateFilterList::-webkit-scrollbar-track,
#courseFilterOptions::-webkit-scrollbar-track,
.cur-dd__menu::-webkit-scrollbar-track,
.status-filter__panel::-webkit-scrollbar-track,
.course-filter__panel::-webkit-scrollbar-track {
    background: transparent;
}
.cfilter__count {
    float: right; min-width: 18px; padding: 0 5px; text-align: center;
    border-radius: var(--radius-full, 50px); background: rgba(27,42,107,0.08);
    color: var(--text-muted, #6b7280); font-size: 0.72rem; font-weight: 700; line-height: 18px;
}
.cfilter__option.selected .cfilter__count { background: rgba(27,42,107,0.18); color: var(--primary, #1b2a6b); }

/* ---- Filter reset ("Wis filters") — subtle text button next to a filter
   control that clears search/status/dropdown filters back to their default. ---- */
.filter-reset {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
    border: none; border-radius: var(--radius-full, 50px); margin-left: 4px;
    background: transparent; font-family: inherit; font-size: 0.8rem;
    font-weight: 600; color: var(--text-muted); cursor: pointer;
    transition: background 0.15s, color 0.15s; white-space: nowrap; flex-shrink: 0;
    text-decoration: none;
}
.filter-reset:hover { background: rgba(220,53,69,0.08); color: var(--danger, #dc3545); }

/* ---- Badges ---- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    line-height: 1.4;
    letter-spacing: 0.02em;
    /* Een pil met volledig ronde hoeken wordt een blok zodra het label
       afbreekt; badges houden hun label daarom altijd op één regel. */
    white-space: nowrap;
}

.badge i { font-size: 0.65rem; }

.badge--primary { background: var(--primary-light); color: var(--primary); }
.badge--accent { background: var(--accent); color: #fff; box-shadow: 0 2px 6px rgba(245,130,32,0.4), 0 1px 2px rgba(245,130,32,0.2); }
.badge--success { background: var(--success-light); color: var(--success); }
.badge--warning { background: var(--accent); color: #fff; box-shadow: 0 2px 6px rgba(245,130,32,0.4), 0 1px 2px rgba(245,130,32,0.2); }
.badge--danger { background: var(--danger-light); color: var(--danger); }
.badge--info { background: var(--info-light); color: var(--info); }
.badge--secondary { background: #ECEEF5; color: var(--text-secondary); }
.badge--expired { background: var(--warning-light); color: var(--warning); }

/* ---- Alerts ---- */
.alert {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    border-left: 4px solid transparent;
}
.alert > i:first-child { flex-shrink: 0; font-size: 1rem; }
.alert > span { flex: 1; }
.alert__close {
    flex-shrink: 0;
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    color: currentColor;
    opacity: .5;
    font-size: 0.85rem;
    padding: 2px 4px;
    border-radius: var(--radius-sm);
    line-height: 1;
    transition: opacity 0.15s;
}
.alert__close:hover { opacity: 1; }
.alert--dismissing {
    transition: opacity 0.2s ease, transform 0.2s ease, margin 0.2s ease, padding 0.2s ease, max-height 0.2s ease;
    opacity: 0;
    transform: translateY(-4px);
    max-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    overflow: hidden;
}

.alert--success {
    background: var(--success-light);
    color: var(--success);
    border-left-color: var(--success);
}

.alert--warning {
    background: var(--warning-light);
    color: var(--warning);
    border-left-color: var(--warning);
}

.alert--danger {
    background: var(--danger-light);
    color: var(--danger);
    border-left-color: var(--danger);
}

.alert--info {
    background: var(--info-light);
    color: var(--info);
    border-left-color: var(--info);
}

/* ---- Modal ---- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 29, 78, 0.45);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 90%;
    max-width: 560px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px) scale(0.95);
    transition: transform var(--transition-normal);
}

.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
}

.modal > form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.modal__header {
    padding: var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--primary);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    flex-shrink: 0;
}

.modal__header h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header-badge {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.22);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    color: #ffffff !important;
}
.modal-header-badge i {
    color: #ffffff !important;
}

.modal__close,
.fs-toggle {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 1rem;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.75);
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
}

.modal__close:hover,
.fs-toggle:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.32);
    color: #ffffff;
    transform: scale(1.05);
}

.modal__close:active,
.fs-toggle:active {
    transform: scale(0.94);
}

.modal__body {
    padding: var(--space-lg);
    overflow-y: auto;
    /* Modals never scroll sideways — clip any stray sub-pixel overflow so no
       modal shows a horizontal scrollbar (course, user, exam-answers, …). */
    overflow-x: hidden;
    flex: 1;
}

.modal__footer {
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
    background: var(--bg-soft);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    flex-shrink: 0;
}

/* ---- Empty State ---- */
.empty-state {
    text-align: center;
    padding: var(--space-2xl) var(--space-xl);
    background: var(--surface);
    border-radius: var(--radius-xl);
    border: 1.5px dashed var(--border);
    box-shadow: var(--shadow-sm);
}

.empty-state__icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: var(--space-lg);
}

.empty-state__icon--primary {
    background: var(--primary-light);
    color: var(--primary);
    box-shadow: inset 0 0 0 1.5px rgba(27, 42, 107, 0.12);
}

.empty-state__icon--accent {
    background: var(--accent-light);
    color: var(--accent);
    box-shadow: inset 0 0 0 1.5px rgba(245, 130, 32, 0.15);
}

.empty-state__icon--success {
    background: var(--success-light);
    color: var(--success);
    box-shadow: inset 0 0 0 1.5px rgba(45, 157, 92, 0.15);
}

.empty-state__icon--danger {
    background: var(--danger-light);
    color: var(--danger);
    box-shadow: inset 0 0 0 1.5px rgba(220, 53, 69, 0.15);
}

.empty-state__icon--warning {
    background: var(--warning-light);
    color: var(--warning);
    box-shadow: inset 0 0 0 1.5px rgba(233, 168, 32, 0.15);
}

.empty-state__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--space-sm);
}

.empty-state__text {
    font-size: 0.875rem;
    color: var(--text-muted);
    max-width: 360px;
    margin: 0 auto var(--space-lg);
    line-height: 1.6;
}

.empty-state__text:last-child {
    margin-bottom: 0;
}

/* Compact — for use inside modals and card bodies */
.empty-state--compact {
    padding: var(--space-xl) var(--space-lg);
    border: none;
    box-shadow: none;
    background: transparent;
}

.empty-state--compact .empty-state__icon {
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
    margin-bottom: var(--space-md);
}

/* ---- Loading Spinner ---- */
.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Actiekolom met de knoppen onder elkaar: gebruik dit waar de rij te veel
   kolommen heeft om twee knoppen naast elkaar te laten passen. De knoppen
   krijgen dezelfde breedte als de breedste knop. */
.table-actions--stack {
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-sm);
}

/* ---- Utilities ---- */
.d-flex { display: flex; }
.d-grid { display: grid; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ---- Responsive ---- */

/* Desktop: sidebar always visible — hide the hamburger so title aligns with content */
@media (min-width: 1025px) {
    .sidebar-toggle { display: none; }
}

@media (max-width: 1024px) {
    .topbar {
        margin-left: 0;
        padding: 10px var(--space-md);
        gap: var(--space-sm);
    }

    /* On mobile the hamburger is shown — give title a small gap after it */
    .topbar__title {
        flex: 1;
        min-width: 0;
        margin-left: var(--space-sm);
    }

    .topbar__title-text {
        max-width: 200px;
    }

    .context-bar {
        margin-left: 0;
        padding: 0 var(--space-md);
    }

    /* Op mobiel mag de meta (o.a. breadcrumb) niet wrappen: de balk heeft een
       vaste hoogte (--context-bar-h) en overlopende regels vielen over de lesinhoud heen.
       De balk scrollt al horizontaal (overflow-x:auto), dus houd één regel. */
    .context-bar__meta {
        flex-wrap: nowrap;
    }
    /* Crumbs niet laten krimpen → één nette regel die horizontaal scrollt
       i.p.v. crumbs die over elkaar heen schuiven. */
    .context-bar__meta .cb-crumb {
        flex-shrink: 0;
    }
    .context-bar__meta .cb-crumb--current {
        flex-shrink: 0;
        overflow: visible;
        text-overflow: clip;
    }

    .main-content {
        margin-left: 0;
        padding: var(--space-md) var(--space-md) 96px;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .sticky-action-bar {
        left: var(--space-md);
        right: var(--space-md);
    }
}

@media (max-width: 768px) {
    .topbar__date { display: none; }
}

@media (max-width: 768px) {
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .table-wrapper {
        overflow-x: auto;
    }

    .btn--lg {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 640px) {
    .stats-grid {
        gap: var(--space-md);
    }

    .stat-card {
        padding: 14px;
        gap: var(--space-sm);
    }

    .stat-card__icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .stat-card__info h3 {
        font-size: 1.5rem;
    }

    .stat-card__info p {
        font-size: 0.68rem;
        padding: 2px 6px;
    }
}

/* Last: reinforce no native resize grip on CMS textareas */
body textarea.form-control {
    resize: none !important;
}

/* ---- Input with icon badge prefix ---- */
.input-wrap {
    position: relative;
}

.input-badge {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 1;
    flex-shrink: 0;
}

.input-badge--top {
    top: 10px;
    transform: none;
}

.form-control--icon {
    padding-left: 46px;
}

/* ---- Modal author badge ---- */
.modal-author-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--primary-light);
    border-radius: var(--radius);
    border: 1px solid rgba(var(--primary-rgb), 0.12);
}

.modal-author-badge__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.modal-author-badge__text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.modal-author-badge__label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.modal-author-badge__name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
}

/* ---- Notification list (Berichten) ---- */
.notification-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}
/* Rows with expandable content are clickable to toggle */
.notification-item--clickable { cursor: pointer; }
.notification-item--clickable:hover { background: var(--bg-soft, #F7F8FB); }

/* Verborgen berichten (alleen admin ziet ze): gedimd met een subtiele
   achtergrond, zodat in één oogopslag duidelijk is dat deelnemers ze niet zien.
   Bewust geen opacity op de hele rij — dat zou ook de actieknoppen en de
   'Verborgen'-badge vervagen. */
.notification-item--hidden { background: var(--bg-soft, #F7F8FB); }
.notification-item--hidden .notification-item__avatar { opacity: 0.5; }
.notification-item--hidden .notification-item__title { color: var(--text-muted); }
.notification-item--hidden .notification-item__title .badge { color: var(--text-secondary); }

.notification-item:first-child {
    border-radius: var(--radius) var(--radius) 0 0;
}

.notification-item:last-child {
    border-bottom: none;
    border-radius: 0 0 var(--radius) var(--radius);
}

.notification-item:only-child {
    border-radius: var(--radius);
}

.notification-item:hover {
    background: var(--bg);
}

.notification-item__avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.notification-item__body {
    flex: 1;
    min-width: 0;
}

.notification-item__title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 4px;
}

.notification-item__preview {
    font-size: 0.83rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin-bottom: 6px;
}

.notification-item__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.72rem;
}
/* Audit-velden (auteur, datum, bijgewerkt) als goed zichtbare badges. */
.notification-item__meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: var(--radius-full, 50px);
    background: var(--bg-soft, #f4f6fb);
    border: 1px solid var(--border-light, #ECEEF5);
    color: var(--text-secondary);
    font-weight: 600;
    white-space: nowrap;
}
/* Namen/datums (de waarde) donkerder + vetter dan het label, voor leesbaarheid. */
.notification-item__meta strong { color: var(--text-primary); font-weight: 700; }
.notification-item__meta span em { font-style: italic; font-weight: 500; }
.notification-item__meta i {
    margin-right: 0;
    opacity: 1;
    font-size: 0.72rem;
    color: var(--primary);
}
.notification-item__meta .fa-pen { color: var(--accent); }

.notification-item__actions {
    flex-shrink: 0;
    display: flex;
    gap: 6px;
    align-items: center;
}

@media (max-width: 600px) {
    .notification-item {
        flex-wrap: wrap;
    }
    .notification-item__actions {
        margin-left: auto;
    }
}

/* ---- Collapsible message body ---- */
.msg-collapse-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
}

.notification-item.is-open .msg-collapse-body {
    max-height: 1200px;
}

.msg-collapse-text {
    padding: 10px 0 4px;
    font-size: 0.88rem;
    line-height: 1.7;
    color: var(--text);
    white-space: pre-wrap;
    word-break: break-word;
    border-top: 1px solid var(--border-light);
    margin-top: 8px;
}

.msg-chevron-btn {
    all: unset;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px 6px;
    border-radius: 4px;
    line-height: 1;
    transition: background 0.12s, color 0.12s;
}

.msg-chevron-btn:hover {
    background: var(--bg-soft);
    color: var(--text);
}

.msg-chevron-btn i {
    font-size: 0.7rem;
    display: block;
    transition: transform 0.2s ease;
}

.notification-item.is-open .msg-chevron-btn i {
    transform: rotate(180deg);
}

/* ---- Audit trail (aangemaakt / gewijzigd) ---- */
.cb-course__audit {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.cb-audit-item {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.cb-audit-item i {
    opacity: 0.75;
}

.cb-audit-item strong {
    color: var(--text-secondary);
    font-weight: 600;
}

/* ============================================
   Sidebar Navigation
   ============================================ */
/* ============================================
   Kompas CMS — Sidebar Navigation
   ============================================ */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    /* 100vh op mobiel Safari/Chrome rekent de balk-zone mee, waardoor de footer
       (uitloggen) onder de vouw valt. 100dvh volgt de zichtbare hoogte. */
    height: 100vh;
    height: 100dvh;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--text-inverse);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform var(--transition-normal);
    /* Scrollen gebeurt binnen .sidebar__nav zodat de footer vast onderaan blijft */
    overflow: hidden;
}

/* ---- Logo ---- */
.sidebar__logo {
    padding: var(--space-lg) var(--space-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.sidebar__logo img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: contain;
    background: white;
    padding: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.sidebar__logo span {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #ffffff;
}

/* ---- Navigation ---- */
.sidebar__nav {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: var(--space-sm) 0;
    /* Firefox: dunne scrollbar die past bij het donkerblauwe thema */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

/* WebKit/Chromium: slanke, meekleurende scrollbar i.p.v. de grijze systeembalk */
.sidebar__nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar__nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar__nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.sidebar__nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}

.sidebar__section {
    padding: var(--space-xs) var(--space-lg);
    margin-top: var(--space-lg);
}

.sidebar__section:first-child {
    margin-top: var(--space-sm);
}

.sidebar__section-title {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: var(--space-sm);
}

.sidebar__divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.10);
    margin: var(--space-sm) var(--space-lg);
}

.sidebar__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px var(--space-lg);
    margin: 2px 10px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.88rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    text-decoration: none;
    border-radius: var(--radius-md);
    position: relative;
}

.sidebar__link i {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.sidebar__icon-wrap {
    position: relative;
    display: inline-flex;
}

.sidebar__icon-badge {
    position: absolute;
    top: -5px;
    right: -6px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--primary-dark);
}

.sidebar__link:hover {
    color: var(--text-inverse);
    background: rgba(255, 255, 255, 0.08);
}

.sidebar__link:hover i {
    background: rgba(255, 255, 255, 0.14);
    color: var(--text-inverse);
}

.sidebar__link.active {
    color: var(--text-inverse);
    background: rgba(245, 130, 32, 0.15);
    font-weight: 600;
}

.sidebar__link.active i {
    background: rgba(245, 130, 32, 0.25);
    color: var(--accent);
}

.sidebar__link.active::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 6px;
    bottom: 6px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--accent);
}

/* Badge counter on nav items */
.sidebar__badge {
    margin-left: auto;
    background: var(--accent);
    color: var(--text-inverse);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    line-height: 1.4;
    box-shadow: 0 2px 6px rgba(245,130,32,0.4), 0 1px 2px rgba(245,130,32,0.2);
}

/* ---- Sidebar Footer / User Info ---- */
.sidebar__footer {
    padding: var(--space-md) var(--space-lg);
    /* iOS safe-area zodat 'uitloggen' niet onder de home-indicator/balk valt */
    padding-bottom: calc(var(--space-md) + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.1);
}

.sidebar__user-menu {
    position: relative;
}

.sidebar__user {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    width: calc(100% + 12px);
    margin: -6px;
    padding: 6px;
    background: none;
    border: none;
    border-radius: var(--radius-md);
    color: inherit;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.sidebar__user:hover {
    background: rgba(255, 255, 255, 0.06);
}

.sidebar__avatar {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(245, 130, 32, 0.25);
}

.sidebar__user-info {
    flex: 1;
    min-width: 0;
}

.sidebar__user-name {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar__user-role {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.45);
    text-transform: capitalize;
}

/* Dropdown-indicator (chevron) rechts van de gebruikersnaam */
.sidebar__user-caret {
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.75rem;
    padding: var(--space-xs);
    transition: transform var(--transition-fast), color var(--transition-fast);
}

.sidebar__user:hover .sidebar__user-caret {
    color: var(--text-inverse);
}

.sidebar__user-menu.open .sidebar__user-caret {
    transform: rotate(180deg);
}

/* Menu klapt omhoog open (footer zit onderaan de sidebar) */
.sidebar__user-dropdown {
    position: absolute;
    left: -6px;
    right: -6px;
    bottom: calc(100% + 12px);
    padding: 6px;
    background: var(--primary-dark);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
    z-index: 10;
}

.sidebar__user-menu.open .sidebar__user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sidebar__user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.sidebar__user-dropdown-item i {
    width: 16px;
    text-align: center;
    font-size: 0.85rem;
}

.sidebar__user-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-inverse);
}

.sidebar__user-dropdown-item--danger:hover {
    background: rgba(220, 53, 69, 0.18);
    color: #FF8A94;
}

/* ---- Mobile Toggle ---- */
.sidebar-toggle {
    display: none;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--text-inverse);
    border: none;
    border-radius: var(--radius-md);
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.sidebar-toggle:hover {
    background: linear-gradient(135deg, var(--primary-dark), #0A1238);
    transform: scale(1.05);
}

/* ---- Mobile Overlay ---- */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(17, 29, 78, 0.45);
    backdrop-filter: blur(4px);
    z-index: 99;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .sidebar-overlay.active {
        display: block;
    }
}

/* ============================================
   Notifications (bell dropdown)
   ============================================ */
.notif-bell {
    position: relative;
    z-index: 100;
}

.notif-bell__btn {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border, #E5E7EB);
    background: #fff;
    color: var(--primary, #1B2A6B);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.notif-bell__btn:hover {
    background: var(--bg-soft, #F7F8FA);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.notif-bell__btn:active { transform: translateY(0); }
.notif-bell.is-open .notif-bell__btn {
    background: var(--primary-light, #E8EBF5);
    color: var(--primary, #1B2A6B);
}

/* Rinkel-animatie zodra er ongelezen zijn. */
.notif-bell--has-unread .notif-bell__btn i {
    animation: notifShake 2.4s ease-in-out infinite;
    transform-origin: 50% 4px;
}
.notif-bell.is-open .notif-bell__btn i { animation: none; }

@keyframes notifShake {
    0%, 70%, 100% { transform: rotate(0); }
    72%  { transform: rotate(14deg); }
    74%  { transform: rotate(-12deg); }
    76%  { transform: rotate(10deg); }
    78%  { transform: rotate(-8deg); }
    80%  { transform: rotate(6deg); }
    82%  { transform: rotate(-4deg); }
    84%  { transform: rotate(2deg); }
    86%  { transform: rotate(0); }
}

.notif-bell__badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--danger, #D9534F);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    box-shadow: 0 0 0 2px #fff;
    animation: notifBadgePop 0.3s ease-out;
}
@keyframes notifBadgePop {
    0%   { transform: scale(0); }
    70%  { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.notif-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 360px;
    max-width: calc(100vw - 32px);
    background: #fff;
    border: 1px solid var(--border, #E5E7EB);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.15s;
    overflow: hidden;
}
.notif-bell.is-open .notif-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s;
}

.notif-dropdown__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border, #E5E7EB);
}
.notif-dropdown__header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}
.notif-dropdown__count {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--accent-light, #FEF0E0);
    color: var(--accent-dark, #B85F00);
}

.notif-dropdown__empty {
    padding: 28px 16px;
    text-align: center;
    color: var(--text-muted);
}
.notif-dropdown__empty i {
    font-size: 1.6rem;
    margin-bottom: 8px;
    opacity: 0.5;
}
.notif-dropdown__empty p {
    margin: 0;
    font-size: 0.9rem;
}

.notif-dropdown__list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 380px;
    overflow-y: auto;
}
.notif-item + .notif-item { border-top: 1px solid var(--border, #E5E7EB); }
.notif-item__link {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: inherit;
    transition: background 0.12s ease;
}
.notif-item__link:hover { background: var(--bg-soft, #F7F8FA); }
.notif-item__icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-light, #FEF0E0);
    color: var(--accent, #F58220);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.85rem;
}
.notif-item__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}
.notif-item__title {
    font-size: 0.9rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.notif-item__preview {
    font-size: 0.8rem;
    color: var(--text-secondary, var(--text-muted));
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.notif-item__meta {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.notif-dropdown__footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
    background: var(--bg-soft, #F7F8FA);
    border-top: 1px solid var(--border, #E5E7EB);
    text-decoration: none;
    color: var(--primary, #1B2A6B);
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.12s ease;
}
.notif-dropdown__footer:hover { background: var(--primary-light, #E8EBF5); }

/* ============================================
   Confirm Modal (reusable confirmation dialog)
   ============================================ */
.confirm-modal { max-width: 480px; }
.confirm-modal__body {
    padding: var(--space-lg);
    text-align: center;
}
.confirm-modal__icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}
.confirm-modal__icon--accent  { background: #FEF0E0; color: #F58220; }
.confirm-modal__icon--danger  { background: #FDECEC; color: #D9534F; }
.confirm-modal__icon--primary { background: #E8EBF5; color: #1B2A6B; }
.confirm-modal__icon--success { background: #E6F5ED; color: #2D9D5C; }

.confirm-modal__message {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.5;
    margin: 0 0 8px;
}
.confirm-modal__detail {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}
.confirm-modal__note { margin-top: var(--space-md); text-align: left; }
.confirm-modal__note label {
    display: block; font-size: 0.8rem; font-weight: 600;
    color: var(--text-secondary); margin-bottom: 6px;
}

/* ── Generic list search bar (filters items by their data-search text) ──
   Pill-styled bar matching the admin users/exam-request filter bar. */
.list-search {
    display: flex; align-items: center;
    margin-bottom: var(--space-md);
    padding: 7px 10px 7px 18px;
    background: #f1f3f9;
    border: 1.5px solid var(--border, #D8DCE6);
    border-radius: var(--radius-full, 50px);
    transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}
.list-search:focus-within {
    background: var(--surface, #fff);
    border-color: var(--primary, #1b2a6b);
    box-shadow: 0 0 0 3px rgba(27, 42, 107, 0.08);
}
.list-search__icon {
    color: var(--primary, #1b2a6b); font-size: 0.95rem; opacity: 0.55;
    pointer-events: none; flex-shrink: 0; margin-right: 12px;
}
.list-search__input {
    flex: 1; min-width: 0;
    border: none !important; background: transparent !important;
    border-radius: 0 !important; padding: 5px 0 !important;
    box-shadow: none !important; outline: none !important;
    font-size: 0.95rem; font-weight: 500; color: var(--text-primary) !important;
}
.list-search__input::placeholder { color: var(--text-muted); font-weight: 400; }
.list-search__clear {
    flex-shrink: 0; width: 26px; height: 26px;
    display: flex; align-items: center; justify-content: center;
    border: none; background: none; cursor: pointer;
    border-radius: 50%; color: var(--text-muted); font-size: 1.15rem; line-height: 1;
    transition: background 0.15s, color 0.15s;
}
.list-search__clear:hover { background: rgba(0,0,0,0.06); color: var(--text-primary); }
.list-search__empty { color: var(--text-muted); font-size: 0.9rem; margin: -6px 0 var(--space-md); padding-left: 6px; }

/* ── Custom select — skins a native <select data-select> so its option list is styleable ── */
.nsel { position: relative; }
.nsel > select.nsel__native {
    position: absolute; inset: 0; width: 100%; height: 100%;
    opacity: 0; pointer-events: none; margin: 0;
}
.nsel__trigger {
    position: relative; z-index: 1;
    display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
    width: 100%; text-align: left; cursor: pointer; background: #fff;
    /* Alleen de family overnemen — `font: inherit` overschreef ook font-size en
       line-height van .form-control, waardoor deze knop groter uitviel dan een
       gewoon invoerveld ernaast. */
    font-family: inherit;
}
.nsel__trigger:disabled,
.nsel--disabled .nsel__trigger { cursor: not-allowed; opacity: 0.6; }
.nsel__value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nsel__value--placeholder { color: var(--text-muted, #9AA0B8); }
.nsel__caret { flex-shrink: 0; font-size: 0.7rem; color: var(--text-muted, #9AA0B8); transition: transform 0.15s; }
.nsel.is-open .nsel__caret { transform: rotate(180deg); }
.nsel.is-open .nsel__trigger { border-color: var(--primary, #1B2A6B); box-shadow: 0 0 0 3px var(--primary-light, #E8EBF5); }
.nsel__panel {
    position: fixed; z-index: 2000; max-height: 240px; overflow-y: auto;
    background: #fff; border: 1px solid var(--border, #D8DCE6);
    border-radius: var(--radius-md, 10px); box-shadow: 0 12px 32px rgba(27, 42, 107, 0.18);
    padding: 4px; display: none;
    scrollbar-width: thin; scrollbar-color: var(--border, #cbd5e1) transparent;
}
.nsel__panel::-webkit-scrollbar { width: 6px; }
.nsel__panel::-webkit-scrollbar-thumb { background: var(--border, #cbd5e1); border-radius: 10px; }
.nsel__panel::-webkit-scrollbar-track { background: transparent; }
.nsel__option {
    padding: 0.5rem 0.7rem; border-radius: var(--radius-sm, 6px);
    font-size: 0.88rem; color: var(--text-primary, #1F2433); cursor: pointer;
    white-space: normal; overflow-wrap: anywhere; line-height: 1.35;
    transition: background 0.12s, color 0.12s;
}
.nsel__option:hover { background: var(--primary-light, #E8EBF5); color: var(--primary, #1B2A6B); }
.nsel__option.is-selected { font-weight: 700; background: rgba(27, 42, 107, 0.08); color: var(--primary, #1B2A6B); }

/* ============================================
   VALUTA-SWITCHER (website + deelnemersapp)
   Gedeeld: includes/widgets/currency_switcher.php wordt op beide kanten
   ingeladen, dus de opmaak hoort in global.css en niet in website/home.css.
   ============================================ */
/* Valuta-switcher — eigen dropdown (<details>) met een gestylede lijst.
   De toggle (chip) volgt de .btn--ghost.btn--sm-look. */
.currency-switcher {
    position: relative;
    display: inline-block;
    margin: 0;
}
.currency-switcher__toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    background: transparent;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: all var(--transition-fast);
}
.currency-switcher__toggle::-webkit-details-marker { display: none; }
.currency-switcher__toggle::marker { content: ''; }
.currency-switcher__toggle:hover,
.currency-switcher[open] .currency-switcher__toggle {
    background: var(--bg-soft);
    border-color: var(--text-muted);
    color: var(--text-primary);
}
.currency-switcher__icon { font-size: 0.78rem; color: inherit; }
.currency-switcher__current { letter-spacing: 0.02em; }
.currency-switcher__chevron {
    font-size: 0.6rem;
    opacity: 0.7;
    transition: transform var(--transition-fast);
}
.currency-switcher[open] .currency-switcher__chevron { transform: rotate(180deg); }

/* Dropdown-paneel */
.currency-switcher__menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 190px;
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 200;
    animation: cs-menu-in 0.12s ease-out;
}
@keyframes cs-menu-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.currency-switcher__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.1;
    transition: background var(--transition-fast), color var(--transition-fast);
}
.currency-switcher__item:hover { background: var(--bg-soft); color: var(--text-primary); }
.currency-switcher__item-sym {
    width: 20px;
    text-align: center;
    font-weight: 700;
    color: var(--accent);
    flex-shrink: 0;
}
.currency-switcher__item-code { font-weight: 700; color: var(--text-primary); }
.currency-switcher__item-label {
    color: var(--text-secondary);
    font-size: 0.76rem;
    margin-left: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.currency-switcher__item-check { margin-left: auto; color: var(--primary); font-size: 0.72rem; }
.currency-switcher__item.is-active {
    background: var(--primary-light);
}
.currency-switcher__item.is-active .currency-switcher__item-code { color: var(--primary); }

/* ============================================
   COURSE CARD — omvangchip (website + deelnemersapp)
   Zelfde component op index.php en de Ontdek-tab, dus gedeeld.
   ============================================ */
/* Omvang (modules · lessen) als één donkere chip linksboven op de thumbnail.
   Bewust een ander register dan de perk-pills eronder: dit is feitelijke
   omvang, geen verkoopargument. */
.course-card__scope {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 11px;
    border-radius: var(--radius-full);
    background: rgba(13, 19, 51, 0.62);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 600;
    white-space: nowrap;
}
.course-card__scope span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.course-card__scope i { font-size: 0.6rem; opacity: 0.8; }
.course-card__scope-sep { opacity: 0.45; }

/* ============================================
   WIJZIGINGSINFO-PILL (.qaudit) — knop met popover
   Gedeeld door de cursus-, vragen- en planningschermen; stond viermaal
   gedupliceerd in de admin-stylesheets.
   ============================================ */
.qaudit { position:relative; display:inline-flex; }
.qaudit__btn { display:inline-flex; align-items:center; gap:5px; padding:2px 9px; border:1px solid var(--border-light); border-radius:var(--radius-full); background:var(--bg-soft); color:var(--text-muted); font-size:0.7rem; font-weight:600; line-height:1.5; cursor:pointer; transition:background .15s, color .15s, border-color .15s; }
.qaudit__btn i { font-size:0.68rem; opacity:.8; }
.qaudit__btn:hover { background:rgba(99,102,241,0.12); color:var(--primary); border-color:transparent; }
.qaudit.open .qaudit__btn { background:var(--primary); color:#fff; border-color:var(--primary); }
.qaudit.open .qaudit__btn i { opacity:1; }
.qaudit__pop { position:fixed; z-index:2100; min-width:235px; max-width:min(340px, calc(100vw - 24px)); padding:11px 13px; background:#fff; border:1px solid var(--border-light); border-radius:10px; box-shadow:0 10px 28px rgba(15,23,42,0.16); display:none; flex-direction:column; gap:9px; }
.qaudit.open .qaudit__pop,
.qaudit__pop--open { display:flex; }
.qaudit__row { display:flex; align-items:flex-start; gap:9px; }
.qaudit__row i { margin-top:1px; color:var(--primary); font-size:0.8rem; width:14px; text-align:center; flex-shrink:0; }
.qaudit__txt { display:flex; flex-direction:column; line-height:1.3; min-width:0; }
.qaudit__txt span { font-size:0.62rem; color:var(--text-muted); text-transform:uppercase; letter-spacing:0.04em; font-weight:600; }
.qaudit__txt strong { font-size:0.8rem; color:var(--text-primary); font-weight:600; overflow-wrap:anywhere; }
/* Caret voor pillen die als uitklapper gebruikt worden. */
.qaudit__btn .qaudit__caret { font-size:0.55rem; opacity:.7; margin-left:2px; transition:transform .18s; }
.qaudit.open .qaudit__caret { transform:rotate(180deg); }
/* Variant voor een donkere ondergrond (modalkoppen): de lichtgrijze basisstijl
   valt daar weg tegen de achtergrond. */
.qaudit--onDark .qaudit__btn { background:rgba(255,255,255,0.14); border-color:rgba(255,255,255,0.28); color:#fff; }
.qaudit--onDark .qaudit__btn:hover,
.qaudit--onDark.open .qaudit__btn { background:rgba(255,255,255,0.26); border-color:rgba(255,255,255,0.45); color:#fff; }

/* ============================================
   SEARCH BAR — actiebalk van de vragenpagina.s
   Gedeeld door les-, examen- en beoordelingsvragen.
   ============================================ */
.aq-search-bar {
    display:flex; align-items:center;
    background:#f1f3f9; border-radius:var(--radius-full);
    border:1.5px solid var(--border);
    padding:6px 8px 6px 16px;
    transition:border-color 0.25s, background 0.25s, box-shadow 0.25s;
}
.aq-search-bar:focus-within {
    background:var(--surface);
    border-color:var(--primary);
    box-shadow:0 0 0 3px rgba(27,42,107,0.08);
}
.aq-search-bar i { color:var(--primary); font-size:0.9rem; opacity:0.55; flex-shrink:0; margin-right:10px; }
.aq-search-bar input {
    flex:1; min-width:0; border:none; outline:none; background:transparent;
    padding:5px 8px; font-size:0.92rem; font-weight:500; color:var(--text-primary);
}
.aq-search-bar input::placeholder { color:var(--text-muted); }
