/* ============================================
   cursus.reanimatie.nl — Cursus Styles
   Accent: #3b82f6 (blue)
   ============================================ */

:root {
    --accent:         #3b82f6;
    --accent-dark:    #1d4ed8;
    --accent-light:   #eff6ff;
    --green:          #2a9d8f;
    --orange:         #f59e0b;
    --red:            #e63946;
    --bg-primary:     #ffffff;
    --bg-secondary:   #f8fafc;
    --border:         #e2e8f0;
    --text-primary:   #1e293b;
    --text-secondary: #64748b;
    --text-muted:     #94a3b8;
    --shadow-sm:      0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md:      0 4px 16px rgba(0,0,0,.08);
    --shadow-lg:      0 10px 40px rgba(0,0,0,.12);
    --radius:         12px;
    --radius-sm:      8px;
    --transition:     0.2s ease;
}

/* ---- Base reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
}

/* ---- Container ---- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---- Sections ---- */
.section         { padding: 64px 0; }
.section-sm      { padding: 48px 0; }
.section-bg      { background: var(--bg-secondary); }

/* ---- Section header ---- */
.section__header {
    text-align: center;
    margin-bottom: 40px;
}
.section__header h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
}
.section__header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ---- Grids ---- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .section { padding: 40px 0; }
    .section-sm { padding: 32px 0; }
}

/* ---- Card ---- */
.card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}
.card-icon-blue   { background: #eff6ff; color: var(--accent); }
.card-icon-green  { background: #d1fae5; color: #059669; }
.card-icon-red    { background: #fee2e2; color: #dc2626; }
.card-icon-orange { background: #fef3c7; color: #d97706; }

/* ---- Hero ---- */
.module-hero {
    padding: 80px 0 60px;
    background: linear-gradient(135deg, #0d2137 0%, #1e3a5f 60%, #1d4ed8 100%);
    color: #fff;
}
.module-hero__content {
    max-width: 640px;
}
.module-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(59, 130, 246, 0.25);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 99px;
    padding: 4px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    margin-bottom: 16px;
}
.module-hero__content h1 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 12px;
}
.module-hero__accent { color: #60a5fa; }
.module-hero__content p {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.78);
    margin-bottom: 28px;
    line-height: 1.65;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}
.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-dark {
    background: #1e293b;
    color: #fff;
}
.btn-dark:hover { background: #0f172a; }
.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text-primary);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    gap: 5px;
}
.w-full { width: 100%; justify-content: center; }

/* ---- Welcome bar ---- */
.welcome-bar {
    background: var(--accent-light);
    border-bottom: 1px solid #bfdbfe;
    padding: 10px 0;
}
.welcome-bar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.welcome-bar__text {
    font-size: 0.875rem;
    color: #1e40af;
}
.welcome-bar__text strong { font-weight: 700; }

/* ---- Filter bar ---- */
.filter-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}
.filter-btn {
    padding: 7px 16px;
    border-radius: 99px;
    border: 1.5px solid var(--border);
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.filter-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ---- Cursus cards ---- */
.cursus-card {
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
    position: relative;
}
.cursus-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}
.cursus-card-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.cursus-datum {
    font-size: 0.78rem;
    color: var(--accent);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}
.cursus-org {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 2px;
}
.cursus-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    margin: 4px 0;
}
.cursus-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}
.cursus-meta-item {
    font-size: 0.78rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}
.cursus-prijs {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent);
}
.cursus-prijs-gratis {
    color: var(--green);
}

/* ---- Deelnemers bar ---- */
.deelnemers-bar {
    margin-top: 10px;
}
.deelnemers-bar__track {
    height: 6px;
    background: #e2e8f0;
    border-radius: 99px;
    overflow: hidden;
}
.deelnemers-bar__fill {
    height: 100%;
    border-radius: 99px;
    background: var(--green);
    transition: width 0.5s ease;
}
.deelnemers-bar__fill--warning { background: var(--orange); }
.deelnemers-bar__fill--full    { background: var(--red); }
.deelnemers-bar__label {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    margin-bottom: 3px;
}

/* ---- Badges ---- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}
.badge-active  { background: #dcfce7; color: #166534; }
.badge-pending { background: #fef9c3; color: #854d0e; }
.badge-inactive { background: #fee2e2; color: #991b1b; }

/* ---- Forms ---- */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 0;
}
.form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.form-row .form-group { margin-bottom: 0; }
.form-group { margin-bottom: 16px; }
.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}
.form-control {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: border-color var(--transition);
}
.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}
select.form-control { appearance: none; cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }

/* ---- Alerts ---- */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    margin-bottom: 16px;
}
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info    { background: var(--accent-light); color: #1e40af; border: 1px solid #bfdbfe; }

/* ---- Pending notice ---- */
.pending-notice {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    background: #fef9c3;
    border: 1px solid #fde68a;
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: #78350f;
    margin-bottom: 20px;
}
.pending-notice > i { font-size: 1.3rem; margin-top: 2px; flex-shrink: 0; }

/* ---- Dashboard layout ---- */
.dashboard-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 28px;
    align-items: start;
}
@media (max-width: 768px) {
    .dashboard-layout { grid-template-columns: 1fr; }
}

/* ---- Sidebar ---- */
.sidebar {
    position: sticky;
    top: 80px;
}
.sidebar-nav {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
}
.sidebar-nav a:last-child { border-bottom: none; }
.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: var(--accent-light);
    color: var(--accent);
}
.sidebar-nav a i { width: 16px; text-align: center; }

/* ---- Dashboard panel ---- */
.dashboard-main {
    min-width: 0;
}

/* ---- Table ---- */
.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.table th {
    background: var(--bg-secondary);
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border);
}
.table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-primary);
    vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--bg-secondary); }

/* ---- Empty state ---- */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}
.empty-state > i {
    font-size: 2.5rem;
    opacity: 0.3;
    display: block;
    margin-bottom: 12px;
}
.empty-state h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.empty-state p {
    font-size: 0.875rem;
}

/* ---- Modals ---- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,0.52);
    overflow-y: auto;
    padding: 32px 16px;
}
.modal-overlay.is-open { display: block; }
.modal-inner {
    max-width: 520px;
    margin: 0 auto;
    position: relative;
}
.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--text-muted);
    z-index: 2;
    line-height: 1;
    padding: 4px;
}
.modal-close:hover { color: var(--text-primary); }

/* ---- Cursus info modal specifiek ---- */
#cursusInfoModal .modal-inner { max-width: 640px; }
.cursus-info-map {
    height: 200px;
    background: #e5e7eb;
    border-radius: var(--radius) var(--radius) 0 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
}
.cursus-info-body { padding: 24px; }
.cursus-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}
.cursus-info-cell {
    padding: 14px;
    background: var(--bg-secondary);
    border-radius: 10px;
}
.cursus-info-cell__label {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.cursus-info-cell__value {
    font-weight: 600;
    font-size: 0.9rem;
}

/* ---- Inschrijf form modal ---- */
.inschrijf-user-card {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 10px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.inschrijf-user-avatar {
    width: 40px;
    height: 40px;
    background: #1e3a5f;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}
.inschrijf-keuze-btns {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
.inschrijf-keuze-btns .btn { flex: 1; justify-content: center; padding: 12px; }

/* ---- Topbar ---- */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 900;
    background: rgba(13, 33, 55, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 16px;
}
.topbar__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
    color: #fff;
    text-decoration: none;
}
.topbar__logo-icon {
    width: 36px;
    height: 36px;
    background: var(--accent);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #fff;
    flex-shrink: 0;
}
.topbar__user {
    display: flex;
    align-items: center;
    gap: 12px;
}
.topbar__greeting {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.65);
}
.topbar__nav {
    display: flex;
    align-items: center;
    gap: 8px;
}
.topbar__nav a,
.topbar__nav button {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    background: none;
    cursor: pointer;
    transition: var(--transition);
}
.topbar__nav a:hover,
.topbar__nav button:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

/* ---- Footer ---- */
.site-footer {
    background: #0d2137;
    color: rgba(255,255,255,0.55);
    padding: 32px 0;
    font-size: 0.82rem;
    margin-top: auto;
}
.site-footer a {
    color: rgba(255,255,255,0.65);
    text-decoration: none;
}
.site-footer a:hover { color: #fff; }
.site-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

/* ---- Page body spacing ---- */
body { padding-top: 64px; }
.page-main { min-height: calc(100vh - 64px); display: flex; flex-direction: column; }

/* ---- Login page ---- */
.login-page {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    background: linear-gradient(160deg, #0d2137 0%, #1e3a5f 40%, #1a2f4e 100%);
}
.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}
.login-card__icon {
    width: 56px;
    height: 56px;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
}
.login-card h1 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 6px;
}
.login-card .subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 28px;
    line-height: 1.5;
}

/* ---- MFA code inputs ---- */
.code-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}
.code-input {
    width: 46px;
    height: 54px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--bg-secondary);
    transition: var(--transition);
}
.code-input:focus {
    outline: none;
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

/* ---- Verplaats / cursist portaal ---- */
.portaal-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #1d4ed8 100%);
    color: #fff;
    padding: 28px 0;
    margin-bottom: 0;
}
.portaal-header h1 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 4px;
}
.portaal-header p {
    font-size: 0.875rem;
    opacity: 0.75;
}

/* ---- Certificaat download ---- */
.certificaat-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #dcfce7;
    color: #166534;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}
.certificaat-download:hover {
    background: #bbf7d0;
    color: #14532d;
}

/* ---- Instelling toggle ---- */
.toggle-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}
.toggle-switch input[type="checkbox"] {
    position: relative;
    width: 44px;
    height: 24px;
    appearance: none;
    background: #e2e8f0;
    border-radius: 99px;
    cursor: pointer;
    transition: background var(--transition);
    flex-shrink: 0;
}
.toggle-switch input[type="checkbox"]::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: left var(--transition);
}
.toggle-switch input[type="checkbox"]:checked {
    background: var(--accent);
}
.toggle-switch input[type="checkbox"]:checked::after {
    left: 23px;
}

/* ---- Roles uitleg section ---- */
.rol-card {
    text-align: center;
    padding: 28px 20px;
}
.rol-card h4 {
    font-weight: 700;
    margin: 8px 0 4px;
    font-size: 1rem;
}
.rol-card p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ---- GPS badge ---- */
.afstand-label {
    background: #eff6ff;
    color: var(--accent);
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 600;
}

/* ---- Responsive topbar ---- */
@media (max-width: 640px) {
    .topbar__greeting { display: none; }
    .login-card { padding: 28px 20px; }
    .cursus-info-grid { grid-template-columns: 1fr; }
    .module-hero { padding: 56px 0 40px; }
}

/* ---- Utility ---- */
.text-muted   { color: var(--text-muted); }
.text-accent  { color: var(--accent); }
.text-green   { color: var(--green); }
.text-center  { text-align: center; }
.mt-4  { margin-top: 16px; }
.mt-8  { margin-top: 32px; }
.mb-4  { margin-bottom: 16px; }
.mb-8  { margin-bottom: 32px; }
.gap-4 { gap: 16px; }
.flex  { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
