/* =========================================================
   EventBeheer — Stijlblad
   Dutch Event Management System
   ========================================================= */

/* ---------------------------------------------------------
   1. Normalisatie & Box-sizing
   --------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: #333333;
    background-color: #f5f6fa;
}

a {
    color: #1e3a5f;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.25;
    color: #1e3a5f;
}

/* ---------------------------------------------------------
   2. App Layout — Sidebar + Main Content
   --------------------------------------------------------- */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ---------------------------------------------------------
   3. Sidebar
   --------------------------------------------------------- */
.sidebar {
    width: 220px;
    min-width: 220px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    background-color: #1e3a5f;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 100;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
}

.sidebar-logo {
    padding: 20px 16px 16px;
    font-size: 1.125rem;
    font-weight: 700;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    letter-spacing: 0.01em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-logo span {
    opacity: 0.85;
    font-size: 0.75rem;
    font-weight: 400;
    display: block;
    margin-top: 2px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.sidebar-logo-inner {
    display: flex;
    flex-direction: column;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 0;
}

.sidebar-nav li {
    margin: 0;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 0.15s ease, color 0.15s ease;
    border-left: 3px solid transparent;
    white-space: nowrap;
}

.sidebar-nav li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    text-decoration: none;
}

.sidebar-nav li a.actief {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border-left-color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

.sidebar-nav li a::before {
    font-style: normal;
    font-size: 1rem;
    line-height: 1;
    flex-shrink: 0;
}

.sidebar-sectie-label {
    padding: 12px 16px 4px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
}

.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.55);
}

/* ---------------------------------------------------------
   4. Main Content Area
   --------------------------------------------------------- */
.main-content {
    flex: 1;
    margin-left: 220px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
}

/* ---------------------------------------------------------
   5. Topbar
   --------------------------------------------------------- */
.topbar {
    width: 100%;
    background-color: #ffffff;
    border-bottom: 1px solid #dee2e6;
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 90;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.topbar-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-titel {
    font-size: 1rem;
    font-weight: 600;
    color: #1e3a5f;
}

.countdown-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background-color: #1e3a5f;
    color: #ffffff;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.countdown-badge.vandaag {
    background-color: #27ae60;
}

.countdown-badge.bijna {
    background-color: #e67e22;
}

.countdown-badge.verstreken {
    background-color: #e74c3c;
}

/* ---------------------------------------------------------
   6. Page Content Area
   --------------------------------------------------------- */
.page-content {
    padding: 24px;
    flex: 1;
}

/* ---------------------------------------------------------
   7. Page Header
   --------------------------------------------------------- */
.pagina-koptekst {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.pagina-titel {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e3a5f;
    margin: 0;
}

.pagina-koptekst-acties {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ---------------------------------------------------------
   8. Cards
   --------------------------------------------------------- */
.card {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.card-titel {
    font-size: 1rem;
    font-weight: 600;
    color: #1e3a5f;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-subtitel {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: -12px;
    margin-bottom: 16px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

/* ---------------------------------------------------------
   9. Stats Grid
   --------------------------------------------------------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-getal {
    font-size: 2rem;
    font-weight: 700;
    color: #1e3a5f;
    line-height: 1;
    margin-bottom: 6px;
}

.stat-getal.groen {
    color: #27ae60;
}

.stat-getal.oranje {
    color: #e67e22;
}

.stat-getal.rood {
    color: #e74c3c;
}

.stat-label {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 500;
}

/* ---------------------------------------------------------
   10. Tables
   --------------------------------------------------------- */
.table-wrapper {
    overflow-x: auto;
    border-radius: 6px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.table th {
    background-color: #f5f6fa;
    text-align: left;
    padding: 10px 12px;
    font-weight: 600;
    color: #333333;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
}

.table td {
    padding: 10px 12px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:hover {
    background-color: #f8f9ff;
}

.table-striped tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

.table-striped tbody tr:nth-child(even):hover {
    background-color: #f8f9ff;
}

/* Table row status colors */
.rij-groen {
    background-color: #d4edda !important;
}

.rij-groen:hover {
    background-color: #c3e6cb !important;
}

.rij-oranje {
    background-color: #fff3cd !important;
}

.rij-oranje:hover {
    background-color: #ffeeba !important;
}

.rij-rood {
    background-color: #f8d7da !important;
}

.rij-rood:hover {
    background-color: #f5c6cb !important;
}

/* Sortable table headers */
.table th.sorteerbaar {
    cursor: pointer;
    user-select: none;
}

.table th.sorteerbaar:hover {
    background-color: #eaecf0;
}

.table th.sorteerbaar::after {
    content: ' ⇅';
    opacity: 0.4;
    font-size: 0.75rem;
}

.table th.oplopend::after {
    content: ' ↑';
    opacity: 1;
}

.table th.aflopend::after {
    content: ' ↓';
    opacity: 1;
}

/* ---------------------------------------------------------
   11. Buttons
   --------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
    line-height: 1.4;
    white-space: nowrap;
    vertical-align: middle;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.2);
}

.btn:disabled,
.btn[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-primair {
    background-color: #1e3a5f;
    color: #ffffff;
}

.btn-primair:hover {
    background-color: #162d4a;
    color: #ffffff;
    text-decoration: none;
}

.btn-primair:active {
    background-color: #0f2035;
}

.btn-gevaarlijk {
    background-color: #e74c3c;
    color: #ffffff;
}

.btn-gevaarlijk:hover {
    background-color: #c0392b;
    color: #ffffff;
    text-decoration: none;
}

.btn-secundair {
    background-color: #6c757d;
    color: #ffffff;
}

.btn-secundair:hover {
    background-color: #545b62;
    color: #ffffff;
    text-decoration: none;
}

.btn-success {
    background-color: #27ae60;
    color: #ffffff;
}

.btn-success:hover {
    background-color: #1e8449;
    color: #ffffff;
    text-decoration: none;
}

.btn-omlijnd {
    background-color: transparent;
    color: #1e3a5f;
    border: 1px solid #1e3a5f;
}

.btn-omlijnd:hover {
    background-color: #1e3a5f;
    color: #ffffff;
    text-decoration: none;
}

.btn-licht {
    background-color: #f5f6fa;
    color: #333333;
    border: 1px solid #dee2e6;
}

.btn-licht:hover {
    background-color: #e9ecef;
    color: #333333;
    text-decoration: none;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 0.8125rem;
    gap: 4px;
    border-radius: 5px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 1rem;
    border-radius: 8px;
}

.btn-blok {
    width: 100%;
    justify-content: center;
}

/* ---------------------------------------------------------
   12. Pills / Badges
   --------------------------------------------------------- */
.pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.5;
    white-space: nowrap;
}

.pill-blauw {
    background-color: #dbeafe;
    color: #1e3a5f;
}

.pill-groen {
    background-color: #d4edda;
    color: #155724;
}

.pill-oranje {
    background-color: #fff3cd;
    color: #856404;
}

.pill-rood {
    background-color: #f8d7da;
    color: #721c24;
}

.pill-grijs {
    background-color: #e9ecef;
    color: #495057;
}

.pill-paars {
    background-color: #e8d5f5;
    color: #5b2c8d;
}

/* ---------------------------------------------------------
   13. Modals
   --------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-overlay.actief {
    display: flex;
}

.modal {
    background-color: #ffffff;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    animation: modalInsturen 0.2s ease;
}

@keyframes modalInsturen {
    from {
        opacity: 0;
        transform: translateY(-16px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-sm {
    max-width: 400px;
}

.modal-lg {
    max-width: 800px;
}

.modal-xl {
    max-width: 1000px;
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-header h2,
.modal-header h3 {
    font-size: 1.0625rem;
    font-weight: 600;
    color: #1e3a5f;
    margin: 0;
}

.modal-sluiten {
    background: none;
    border: none;
    cursor: pointer;
    color: #6c757d;
    font-size: 1.25rem;
    padding: 4px;
    border-radius: 4px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.modal-sluiten:hover {
    color: #333333;
    background-color: #f5f6fa;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* ---------------------------------------------------------
   14. Forms
   --------------------------------------------------------- */
.form-groep {
    margin-bottom: 16px;
}

.form-groep:last-child {
    margin-bottom: 0;
}

.form-label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    font-size: 0.875rem;
    color: #333333;
}

.form-label.vereist::after {
    content: ' *';
    color: #e74c3c;
}

.form-invoer {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.875rem;
    background-color: #ffffff;
    color: #333333;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    appearance: auto;
}

.form-invoer:focus {
    outline: none;
    border-color: #1e3a5f;
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.form-invoer:disabled,
.form-invoer[readonly] {
    background-color: #f5f6fa;
    color: #6c757d;
    cursor: not-allowed;
}

.form-invoer::placeholder {
    color: #adb5bd;
}

.form-invoer-fout {
    border-color: #e74c3c;
}

.form-invoer-fout:focus {
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15);
}

.form-hulptekst {
    font-size: 0.8125rem;
    color: #6c757d;
    margin-top: 4px;
}

.form-fout-tekst {
    font-size: 0.8125rem;
    color: #e74c3c;
    margin-top: 4px;
}

textarea.form-invoer {
    min-height: 80px;
    resize: vertical;
}

select.form-invoer {
    cursor: pointer;
}

.form-rij {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-rij-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

/* ---------------------------------------------------------
   15. Filter Tabs
   --------------------------------------------------------- */
.filter-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 0;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 8px 16px;
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    color: #6c757d;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
}

.filter-tab:hover {
    color: #1e3a5f;
}

.filter-tab.actief {
    color: #1e3a5f;
    border-bottom-color: #1e3a5f;
    font-weight: 600;
}

.filter-tab .tab-teller {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    background-color: #e9ecef;
    color: #6c757d;
    border-radius: 9px;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0 5px;
    margin-left: 4px;
}

.filter-tab.actief .tab-teller {
    background-color: #1e3a5f;
    color: #ffffff;
}

/* ---------------------------------------------------------
   16. Progress Bar
   --------------------------------------------------------- */
.voortgang {
    background-color: #dee2e6;
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
}

.voortgang-balk {
    background-color: #1e3a5f;
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.voortgang-balk.groen {
    background-color: #27ae60;
}

.voortgang-balk.oranje {
    background-color: #e67e22;
}

.voortgang-balk.rood {
    background-color: #e74c3c;
}

.voortgang-label {
    font-size: 0.8125rem;
    color: #6c757d;
    margin-top: 4px;
}

/* ---------------------------------------------------------
   17. Bevestigd Toggle Button
   --------------------------------------------------------- */
.bevestigd-toggle {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    border: none;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.bevestigd-toggle.bevestigd {
    background-color: #d4edda;
    color: #155724;
}

.bevestigd-toggle.bevestigd:hover {
    background-color: #c3e6cb;
}

.bevestigd-toggle.onbevestigd {
    background-color: #e9ecef;
    color: #6c757d;
}

.bevestigd-toggle.onbevestigd:hover {
    background-color: #dee2e6;
}

/* ---------------------------------------------------------
   18. Countdown (Dashboard)
   --------------------------------------------------------- */
.countdown-groot {
    font-size: 3rem;
    font-weight: 700;
    color: #1e3a5f;
    text-align: center;
    padding: 20px 20px 8px;
    line-height: 1;
}

.countdown-groot.vandaag {
    color: #27ae60;
}

.countdown-groot.morgen {
    color: #e67e22;
}

.countdown-groot.verstreken {
    color: #e74c3c;
}

.countdown-label {
    font-size: 1rem;
    color: #6c757d;
    text-align: center;
    margin-top: -10px;
    margin-bottom: 20px;
}

/* ---------------------------------------------------------
   19. Uitklapbare Rij (Expandable Row)
   --------------------------------------------------------- */
.uitklap-rij {
    display: none;
    background-color: #f8f9ff;
}

.uitklap-rij.zichtbaar {
    display: table-row;
}

.uitklap-inhoud {
    padding: 12px 16px;
    font-size: 0.875rem;
    color: #495057;
}

.uitklap-knop {
    background: none;
    border: none;
    cursor: pointer;
    color: #6c757d;
    font-size: 0.875rem;
    padding: 2px 4px;
    border-radius: 4px;
    transition: color 0.15s ease;
}

.uitklap-knop:hover {
    color: #1e3a5f;
}

.uitklap-knop.open {
    color: #1e3a5f;
}

/* ---------------------------------------------------------
   20. Meldingen (Notifications/Alerts)
   --------------------------------------------------------- */
.melding {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 0.875rem;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.melding-succes {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.melding-fout {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.melding-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.melding-waarschuwing {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.melding-dicht {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.6;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
    color: inherit;
}

.melding-dicht:hover {
    opacity: 1;
}

/* Auto-fade melding */
.melding-tijdelijk {
    animation: meldingVerdwijnen 0.4s ease 4.6s forwards;
}

@keyframes meldingVerdwijnen {
    from { opacity: 1; max-height: 200px; margin-bottom: 16px; }
    to   { opacity: 0; max-height: 0; margin-bottom: 0; overflow: hidden; }
}

/* ---------------------------------------------------------
   21. Login Page
   --------------------------------------------------------- */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f6fa;
    padding: 24px;
}

.login-box {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1), 0 1px 4px rgba(0, 0, 0, 0.06);
    padding: 40px;
    max-width: 400px;
    width: 100%;
}

.login-titel {
    text-align: center;
    color: #1e3a5f;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.login-subtitel {
    text-align: center;
    color: #6c757d;
    margin-bottom: 24px;
    font-size: 0.9375rem;
}

.login-logo {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 8px;
    line-height: 1;
}

/* ---------------------------------------------------------
   22. User Info (Topbar)
   --------------------------------------------------------- */
.gebruiker-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gebruiker-naam {
    font-weight: 500;
    font-size: 0.875rem;
    color: #333333;
}

.gebruiker-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #1e3a5f;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 700;
    flex-shrink: 0;
    text-transform: uppercase;
}

/* ---------------------------------------------------------
   23. Checkbox Lijst (Multi-select)
   --------------------------------------------------------- */
.checkbox-lijst {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 8px;
    background-color: #ffffff;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.1s ease;
    user-select: none;
}

.checkbox-item:hover {
    background-color: #f5f6fa;
}

.checkbox-item input[type="checkbox"] {
    cursor: pointer;
    flex-shrink: 0;
    accent-color: #1e3a5f;
    width: 15px;
    height: 15px;
}

/* ---------------------------------------------------------
   24. Event Popup / Tooltip
   --------------------------------------------------------- */
.event-popup {
    position: fixed;
    z-index: 2000;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 16px;
    max-width: 300px;
    display: none;
    font-size: 0.875rem;
}

.event-popup.zichtbaar {
    display: block;
}

.event-popup-titel {
    font-weight: 600;
    color: #1e3a5f;
    margin-bottom: 8px;
    font-size: 0.9375rem;
}

.event-popup-rij {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
    color: #495057;
}

.event-popup-rij strong {
    min-width: 80px;
    color: #333333;
}

/* ---------------------------------------------------------
   25. Divider
   --------------------------------------------------------- */
.scheidslijn {
    border: none;
    border-top: 1px solid #dee2e6;
    margin: 16px 0;
}

/* ---------------------------------------------------------
   26. Empty State
   --------------------------------------------------------- */
.leeg-staat {
    text-align: center;
    padding: 48px 24px;
    color: #6c757d;
}

.leeg-staat-icoon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.leeg-staat-tekst {
    font-size: 1rem;
    margin-bottom: 4px;
    color: #495057;
}

.leeg-staat-subtekst {
    font-size: 0.875rem;
}

/* ---------------------------------------------------------
   27. Search / Filter Bar
   --------------------------------------------------------- */
.zoekbalk {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.zoekbalk .form-invoer {
    max-width: 300px;
    width: auto;
    flex: 1;
}

/* ---------------------------------------------------------
   28. Dropdown Menu
   --------------------------------------------------------- */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 160px;
    z-index: 500;
    display: none;
    overflow: hidden;
}

.dropdown-menu.actief {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 8px 16px;
    color: #333333;
    font-size: 0.875rem;
    text-decoration: none;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    transition: background-color 0.1s ease;
}

.dropdown-item:hover {
    background-color: #f5f6fa;
    color: #1e3a5f;
    text-decoration: none;
}

.dropdown-item.gevaarlijk {
    color: #e74c3c;
}

.dropdown-item.gevaarlijk:hover {
    background-color: #f8d7da;
}

.dropdown-scheidslijn {
    border: none;
    border-top: 1px solid #dee2e6;
    margin: 4px 0;
}

/* ---------------------------------------------------------
   29. Loading Spinner
   --------------------------------------------------------- */
.lader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #dee2e6;
    border-top-color: #1e3a5f;
    border-radius: 50%;
    animation: draaien 0.7s linear infinite;
}

.lader-sm {
    width: 14px;
    height: 14px;
    border-width: 2px;
}

.lader-lg {
    width: 32px;
    height: 32px;
    border-width: 3px;
}

@keyframes draaien {
    to { transform: rotate(360deg); }
}

.lader-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    color: #6c757d;
    gap: 12px;
}

/* ---------------------------------------------------------
   30. Utility Classes
   --------------------------------------------------------- */
.tekst-links   { text-align: left; }
.tekst-midden  { text-align: center; }
.tekst-rechts  { text-align: right; }

.tekst-gedempt { color: #6c757d; }
.tekst-primair { color: #1e3a5f; }
.tekst-gevaar  { color: #e74c3c; }
.tekst-succes  { color: #27ae60; }
.tekst-klein   { font-size: 0.8125rem; }
.tekst-groot   { font-size: 1.125rem; }
.tekst-vet     { font-weight: 600; }

.mb-0  { margin-bottom: 0; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mt-0  { margin-top: 0; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }

.d-flex         { display: flex; }
.d-flex-midden  { display: flex; align-items: center; }
.gap-4  { gap: 4px; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.flex-1 { flex: 1; }

.verborgen { display: none !important; }
.zichtbaar { display: block !important; }

.afgeknot {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.no-wrap { white-space: nowrap; }

/* ---------------------------------------------------------
   31. Responsive — Tablet & Mobile
   --------------------------------------------------------- */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-220px);
        transition: transform 0.25s ease;
    }

    .sidebar.mobiel-open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .pagina-koptekst {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-rij,
    .form-rij-3 {
        grid-template-columns: 1fr;
    }

    .modal {
        width: 95%;
        max-height: 95vh;
    }

    .topbar {
        padding: 0 16px;
    }

    .page-content {
        padding: 16px;
    }

    .login-box {
        padding: 28px 24px;
    }
}

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

    .countdown-groot {
        font-size: 2.25rem;
    }

    .filter-tabs {
        gap: 0;
    }

    .filter-tab {
        padding: 8px 10px;
        font-size: 0.8125rem;
    }
}

/* ---------------------------------------------------------
   32. Print Styles
   --------------------------------------------------------- */
@media print {
    .sidebar,
    .topbar,
    .btn,
    .modal-overlay,
    .filter-tabs,
    .zoekbalk,
    .pagina-koptekst-acties {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
    }

    .page-content {
        padding: 0 !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
        break-inside: avoid;
    }

    .table th,
    .table td {
        font-size: 0.8125rem;
    }

    body {
        background-color: #ffffff !important;
        color: #000000 !important;
        font-size: 0.875rem;
    }

    .rij-groen { background-color: #d4edda !important; }
    .rij-oranje { background-color: #fff3cd !important; }
    .rij-rood { background-color: #f8d7da !important; }

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

    @page {
        margin: 1.5cm;
    }
}

/* ── Evenement-switcher in sidebar ─────────────────────── */
.event-switcher {
    padding: 8px 16px 4px;
}
.event-switcher-select {
    width: 100%;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-size: 0.85rem;
    cursor: pointer;
}
.event-switcher-select option {
    background: #1e3a5f;
    color: #fff;
}
.event-naam-label {
    padding: 8px 16px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.75);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── Dienstrooster rij-kleuren ──────────────────────────── */
tr.rij-bevestigd td:first-child {
    border-left: 3px solid #27ae60;
}
tr.rij-onbevestigd td:first-child {
    border-left: 3px solid #95a5a6;
}

/* ── Pill blauw ─────────────────────────────────────────── */
.pill-blauw {
    background: #3b82f6;
    color: #fff;
}

/* ── Melding waarschuwing ───────────────────────────────── */
.melding-waarschuwing {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 12px;
}

/* ── Form hint ──────────────────────────────────────────── */
.form-hint {
    font-size: 0.8rem;
    color: #6c757d;
    display: block;
    margin-top: 4px;
}
