@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500&display=swap');

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* Kleuren — warm wit met diepe accenten */
  --bg:          #F8F7F4;
  --surface:     #FFFFFF;
  --surface-2:   #F2F1EE;
  --surface-3:   #ECEAE5;

  --ink:         #1C1917;
  --ink-2:       #44403C;
  --ink-3:       #78716C;
  --ink-4:       #A8A29E;

  --accent:      #6366f1;       /* indigo */
  --accent-dim:  #eef2ff;
  --accent-text: #4338ca;

  --amber:       #D97706;
  --amber-dim:   #FEF3C7;
  --amber-text:  #B45309;

  --red:         #DC2626;
  --red-dim:     #FEE2E2;
  --red-text:    #B91C1C;

  --blue:        #2563EB;
  --blue-dim:    #DBEAFE;
  --blue-text:   #1D4ED8;

  --border:      rgba(28,25,23,0.07);
  --border-2:    rgba(28,25,23,0.11);

  --shadow-sm:   0 1px 2px rgba(15,23,42,0.04), 0 1px 4px rgba(15,23,42,0.04);
  --shadow:      0 1px 3px rgba(15,23,42,0.04), 0 6px 24px rgba(15,23,42,0.07);
  --shadow-lg:   0 4px 8px rgba(15,23,42,0.06), 0 16px 40px rgba(15,23,42,0.10);

  --radius-sm:   8px;
  --radius:      14px;
  --radius-lg:   18px;
  --radius-xl:   24px;

  --sidebar-w:   256px;
  --nav-h:       64px;

  --font:        'Geist', system-ui, sans-serif;
  --font-mono:   'Geist Mono', monospace;

  /* Sidebar */
  --sidebar-bg:  #0d1f3c;
  --sidebar-text: rgba(255,255,255,0.50);
  --sidebar-active: rgba(255,255,255,0.95);
  --sidebar-hover: rgba(255,255,255,0.07);
  --sidebar-accent: #818cf8;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: var(--font); cursor: pointer; }
input, select, textarea { font-family: var(--font); }

/* ============================================================
   LOGIN
   ============================================================ */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 20px;
  position: relative;
}

.login-screen::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 15% 10%, rgba(99,102,241,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 85% 90%, rgba(13,31,60,0.10) 0%, transparent 60%);
  pointer-events: none;
}

.login-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  animation: fadeUp 0.4s cubic-bezier(0.16,1,0.3,1);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.logo-mark {
  width: 40px; height: 40px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.logo-title { font-size: 17px; font-weight: 600; color: var(--ink); letter-spacing: -0.3px; }
.logo-sub   { font-size: 12px; color: var(--ink-3); margin-top: 1px; }

.login-heading {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.login-desc {
  color: var(--ink-3);
  font-size: 14px;
  margin-bottom: 28px;
}

.login-error {
  background: var(--red-dim);
  color: var(--red-text);
  border: 1px solid rgba(220,38,38,0.15);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
}

.form-field { margin-bottom: 14px; }

.form-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 14.5px;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  -webkit-appearance: none;
  min-height: 44px;
}

/* Checkboxes en radio buttons moeten native blijven */
.form-field input[type="checkbox"],
.form-field input[type="radio"] {
  width: auto;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  -webkit-appearance: auto;
  appearance: auto;
  cursor: pointer;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(22,163,74,0.12);
}

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

.btn-login {
  width: 100%;
  padding: 13px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  margin-top: 4px;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px rgba(22,163,74,0.28);
}
.btn-login:hover  { background: #15803D; box-shadow: 0 4px 14px rgba(22,163,74,0.35); }
.btn-login:active { transform: scale(0.99); }

.login-demo {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.login-demo p {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-4);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.demo-accounts { display: flex; gap: 8px; }

.demo-accounts button {
  flex: 1;
  padding: 8px 6px;
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 11px;
  color: var(--ink-2);
  font-weight: 500;
  transition: all 0.12s;
}
.demo-accounts button:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent-text);
}

/* ============================================================
   APP SHELL
   ============================================================ */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ============================================================
   SIDEBAR — desktop
   ============================================================ */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 200;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform 0.25s cubic-bezier(0.16,1,0.3,1);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.logo-mark-sm {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
  color: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(99,102,241,0.4);
}

.logo-text { font-size: 15px; font-weight: 600; color: #fff; letter-spacing: -0.2px; }

.nav-group { padding: 12px 0 4px; }
.nav-group + .nav-group { border-top: 1px solid rgba(255,255,255,0.05); margin-top: 4px; }

.nav-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
  padding: 0 18px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  color: var(--sidebar-text);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 400;
  border-radius: 0;
  transition: color 0.12s, background 0.12s;
  border-left: 2px solid transparent;
  margin: 1px 0;
  text-decoration: none;
  white-space: nowrap;
}

.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.7; }
.nav-item:hover { color: var(--sidebar-active); background: var(--sidebar-hover); }
.nav-item.active {
  color: #fff;
  background: rgba(129,140,248,0.15);
  border-left-color: #818cf8;
  font-weight: 500;
}
.nav-item.active svg { opacity: 1; }

.sidebar-footer {
  margin-top: auto;
  padding: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.user-info {
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  padding: 0 4px 10px;
  line-height: 1.5;
}
.user-info strong {
  display: block;
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  font-weight: 500;
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 11px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius-sm);
  background: transparent;
  color: rgba(255,255,255,0.4);
  font-size: 13px;
  transition: all 0.15s;
}
.btn-logout svg { width: 14px; height: 14px; }
.btn-logout:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.75); }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  background: var(--bg);
}

.view {
  padding: 32px 36px;
  animation: viewIn 0.2s ease;
  max-width: 1280px;
}

@keyframes viewIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}

.page-header-left .breadcrumb {
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.page-header-left h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--ink);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border: 1px solid var(--border-2);
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s, transform 0.22s cubic-bezier(0.34,1.56,0.64,1);
  text-decoration: none;
  white-space: nowrap;
  -webkit-appearance: none;
  min-height: 42px;
  letter-spacing: -0.01em;
  box-shadow: 0 1px 2px rgba(15,23,42,.05);
}
.btn:hover {
  background: var(--surface-2);
  color: var(--ink);
  border-color: var(--border-2);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 1px 3px rgba(99,102,241,0.25), 0 4px 12px rgba(99,102,241,0.15);
}
.btn-primary:hover {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
  box-shadow: 0 2px 6px rgba(99,102,241,0.30), 0 6px 16px rgba(99,102,241,0.20);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--red-dim);
  color: var(--red-text);
  border-color: rgba(220,38,38,0.2);
}
.btn-danger:hover { background: #FEE2E2; box-shadow: var(--shadow-sm); }

.btn-sm { padding: 7px 13px; font-size: 13px; min-height: 36px; }
.btn svg { width: 15px; height: 15px; }

.icon-btn {
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink-3);
  transition: background 0.15s, color 0.15s, box-shadow 0.15s, transform 0.22s cubic-bezier(0.34,1.56,0.64,1);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.icon-btn:hover {
  background: var(--surface-2);
  color: var(--ink);
  border-color: var(--border-2);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.icon-btn:active { transform: translateY(0); }
.icon-btn svg { width: 15px; height: 15px; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 14px;
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15,23,42,.04), 0 4px 16px rgba(15,23,42,.07);
  transition: box-shadow 0.22s cubic-bezier(0.34,1.56,0.64,1), border-color 0.18s, transform 0.22s cubic-bezier(0.34,1.56,0.64,1);
}
.card:hover {
  box-shadow: 0 2px 8px rgba(15,23,42,.06), 0 12px 32px rgba(15,23,42,.10);
  border-color: rgba(99,102,241,0.15);
  transform: translateY(-2px);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
}

.card-header h2 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.card-header .card-meta {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 2px;
}

.card-body { padding: 18px 22px; }

/* ============================================================
   STAT GRID
   ============================================================ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(15,23,42,.04), 0 4px 16px rgba(15,23,42,.07);
  transition: box-shadow 0.22s cubic-bezier(0.34,1.56,0.64,1), border-color 0.18s, transform 0.22s cubic-bezier(0.34,1.56,0.64,1);
}
.stat-card:hover {
  box-shadow: 0 2px 8px rgba(15,23,42,.06), 0 12px 32px rgba(15,23,42,.10);
  border-color: rgba(99,102,241,0.15);
  transform: translateY(-2px);
}

.stat-card .stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  margin-bottom: 6px;
}

.stat-card .stat-value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-card .stat-sub { font-size: 12px; color: var(--ink-4); }

/* ============================================================
   TABLE
   ============================================================ */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.data-table th {
  text-align: left;
  padding: 11px 18px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--surface-2); }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.badge-green  { background: var(--accent-dim);  color: var(--accent-text); }
.badge-amber  { background: var(--amber-dim);   color: var(--amber-text); }
.badge-red    { background: var(--red-dim);     color: var(--red-text); }
.badge-blue   { background: var(--blue-dim);    color: var(--blue-text); }
.badge-gray   { background: var(--surface-3);   color: var(--ink-3); }

.week-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-2);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--surface-2);
  font-family: var(--font-mono);
}
.week-pill.current {
  background: var(--accent-dim);
  border-color: rgba(22,163,74,0.3);
  color: var(--accent-text);
}

/* ============================================================
   SECTION HEAD — herbruikbaar patroon (match dashboard td-section-head)
   ============================================================ */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 12px;
}
.section-head h2 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0;
}

/* ============================================================
   KLAS GRID
   ============================================================ */
.klas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.klas-card {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 2px 6px rgba(15,23,42,.06);
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.15s;
}

.klas-card:hover {
  box-shadow: 0 6px 18px rgba(15,23,42,.10);
  border-color: var(--border-2);
  transform: translateY(-1px);
}

.klas-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
}

.klas-naam {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.klas-meta-row {
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 12px;
  line-height: 1.5;
}

.klas-progress { height: 4px; background: var(--surface-3); border-radius: 2px; margin-bottom: 5px; }
.klas-progress-fill { height: 100%; border-radius: 2px; background: var(--accent); transition: width 0.4s; }
.klas-progress-label { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-4); }

/* ============================================================
   FORM GRID
   ============================================================ */
.form-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.form-full   { grid-column: 1 / -1; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay-inner {
  position: fixed;
  inset: 0;
  background: rgba(28,25,23,0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s cubic-bezier(0.16,1,0.3,1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-box h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 6px;
}

.modal-box .modal-sub {
  font-size: 14px;
  color: var(--ink-3);
  margin-bottom: 24px;
  line-height: 1.6;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.wb-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

/* ============================================================
   LES AFRONDEN — TAKENLIJST MODAL
   ============================================================ */
.db-taak-lijst {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 16px 0 4px;
  max-height: 50vh;
  overflow-y: auto;
}

/* Wrapper zodat leerling-input naast het item staat */
.db-taak-rij {
  display: flex;
  align-items: center;
  gap: 8px;
}
.db-taak-rij .db-taak-item { flex: 1; min-width: 0; }
.db-taak-leerling {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.db-leerling-input {
  width: 52px;
  height: 34px;
  border: 1.5px solid var(--border-2);
  border-radius: 8px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface);
  outline: none;
  padding: 0 4px;
}
.db-leerling-input:focus { border-color: var(--accent); }
.db-leerling-max {
  font-size: 12px;
  color: var(--ink-3);
  white-space: nowrap;
}

.db-taak-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  user-select: none;
}
.db-taak-item:hover { background: var(--surface-2); }
.db-taak-item input[type="checkbox"] { display: none; }

.db-taak-check {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid var(--border-2);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.db-taak-item input:checked ~ .db-taak-check {
  background: var(--accent);
  border-color: var(--accent);
}
.db-taak-item input:checked ~ .db-taak-check::after {
  content: '';
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
  display: block;
}
.db-taak-item input:checked ~ .db-taak-label { color: var(--ink-3); }
.db-taak-item input:checked ~ .db-taak-label a { color: var(--ink-3); }

.db-taak-icon { font-size: 16px; flex-shrink: 0; }

.db-taak-label {
  flex: 1;
  font-size: 14px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.db-taak-label a { color: var(--blue-text); font-weight: 600; text-decoration: none; }
.db-taak-label a:hover { text-decoration: underline; }
.db-taak-label em {
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-4);
  background: var(--surface-2);
  border-radius: 999px;
  padding: 2px 8px;
}

.db-taak-leeg { color: var(--ink-3); font-size: 14px; padding: 8px 0; }

/* Aangevinkt */
.db-taak-item--checked { background: var(--surface-2); }
.db-taak-item--checked .db-taak-label { color: var(--ink-3); text-decoration: line-through; }
.db-taak-item--checked .db-taak-label a { color: var(--ink-3); }

/* Initialen badge */
.db-taak-init {
  font-size: 10px;
  font-weight: 800;
  color: var(--accent-text);
  background: var(--accent-dim);
  border-radius: 999px;
  padding: 2px 7px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Bevestig-knop kleurvarianten */
.db-bevestig-btn { transition: background 0.2s, border-color 0.2s, color 0.2s; }
.db-bevestig--oranje { background: #fff7ed !important; color: #c2410c !important; border-color: #fdba74 !important; }
.db-bevestig--groen  { background: #f0fdf4 !important; color: #047857 !important; border-color: #86efac !important; font-weight: 800 !important; }

.db-taak-sectie { margin-bottom: 14px; }
.db-taak-sectie:last-child { margin-bottom: 0; }

.db-taak-elo-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border-1);
  border-radius: 8px;
  margin-bottom: 2px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
}
.db-taak-elo-link {
  color: var(--blue-text);
  text-decoration: none;
  font-weight: 600;
}
.db-taak-elo-link:hover { text-decoration: underline; }
.db-taak-elo-naam {
  font-weight: 600;
  color: var(--ink-2);
}
.db-taak-item--sub {
  margin-left: 18px;
  border-left: 2px solid var(--border-2);
  border-radius: 0 8px 8px 0;
}
.db-taak-item--sub:first-of-type { border-top-left-radius: 0; }

.db-taak-sectie-titel {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 0 4px 6px;
}

/* ============================================================
   UPLOAD ZONE
   ============================================================ */
.upload-zone {
  border: 2px dashed var(--border-2);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--ink-3);
  font-size: 13px;
}
.upload-zone:hover { border-color: var(--accent); background: var(--accent-dim); color: var(--accent-text); }
.upload-zone .upload-icon { font-size: 24px; margin-bottom: 8px; opacity: 0.5; }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  padding: 11px 15px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 14px;
  line-height: 1.5;
}
.alert-info    { background: var(--blue-dim);   color: var(--blue-text);   border: 1px solid rgba(37,99,235,0.12); }
.alert-success { background: var(--accent-dim); color: var(--accent-text); border: 1px solid rgba(22,163,74,0.15); }

/* ============================================================
   READONLY NOTICE
   ============================================================ */
.readonly-notice {
  background: var(--blue-dim);
  color: var(--blue-text);
  border: 1px solid rgba(37,99,235,0.15);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============================================================
   ROLE BADGES
   ============================================================ */
.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}
.role-admin      { background: #F3E8FF; color: #7E22CE; }
.role-docent     { background: var(--accent-dim); color: var(--accent-text); }
.role-management { background: var(--blue-dim); color: var(--blue-text); }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 52px 20px;
  color: var(--ink-3);
}
.empty-state h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
  letter-spacing: -0.2px;
}
.empty-state p { font-size: 13px; margin-bottom: 18px; }

/* ============================================================
   TEXT LINK
   ============================================================ */
.text-link { color: var(--blue); font-size: 12px; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.prog-bar  { height: 5px; background: var(--surface-3); border-radius: 3px; }
.prog-fill { height: 100%; border-radius: 3px; background: var(--accent); }

/* ============================================================
   PLANNING
   ============================================================ */
.planning-row-active td { background: rgba(22,163,74,0.03); }

/* ============================================================
   TABS
   ============================================================ */
.tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab-btn {
  padding: 10px 16px;
  font-size: 13.5px;
  cursor: pointer;
  color: var(--ink-3);
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  font-weight: 400;
  transition: color 0.12s;
  margin-bottom: -1px;
}
.tab-btn:hover { color: var(--ink); }
.tab-btn.active { color: var(--accent-text); border-bottom-color: var(--accent); font-weight: 600; }

/* ============================================================
   MOBILE — hamburger & bottom nav
   ============================================================ */
.mobile-header {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 300;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  box-shadow: var(--shadow-sm);
}

.mobile-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.2px;
}

.hamburger {
  width: 36px; height: 36px;
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
}
.hamburger span {
  width: 16px; height: 1.5px;
  background: var(--ink-2);
  border-radius: 1px;
  transition: all 0.2s;
}

/* Sidebar overlay op mobiel */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28,25,23,0.4);
  z-index: 199;
  backdrop-filter: blur(2px);
}

/* ============================================================
   RESPONSIVE — Tablet
   ============================================================ */
@media (max-width: 1100px) {
  .stat-grid  { grid-template-columns: repeat(2, 1fr); }
  .klas-grid  { grid-template-columns: repeat(2, 1fr); }
  .form-grid  { grid-template-columns: 1fr; }
  .form-full  { grid-column: 1; }
}

/* ============================================================
   RESPONSIVE — Mobiel
   ============================================================ */
@media (max-width: 768px) {
  /* Sidebar verbergen, mobile header tonen */
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .sidebar-overlay.open { display: block; }
  .mobile-header { display: flex; }

  /* Content neemt volle breedte */
  .main-content { margin-left: 0; padding-top: 56px; }

  .view { padding: 16px; }

  .page-header { margin-bottom: 20px; }
  .page-header-left h1 { font-size: 20px; }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 16px;
  }
  .stat-card { padding: 14px 16px; }
  .stat-card .stat-value { font-size: 24px; }

  .klas-grid { grid-template-columns: 1fr; gap: 10px; }

  .card-header { padding: 14px 16px; }
  .card-header h2 { font-size: 14px; }

  .data-table { font-size: 12px; }
  .data-table th { padding: 8px 12px; font-size: 10px; }
  .data-table td { padding: 10px 12px; }

  /* Verberg minder belangrijke kolommen op mobiel */
  .data-table .hide-mobile { display: none; }

  .modal-box {
    padding: 20px;
    border-radius: var(--radius-lg);
    max-height: 85vh;
  }

  .modal-actions { gap: 6px; }
  .modal-actions .btn { flex: 1; justify-content: center; }

  .form-grid { grid-template-columns: 1fr; gap: 10px; }
  .form-full { grid-column: 1; }

  /* Page header op mobiel: stapel */
  .page-header { flex-direction: column; align-items: stretch; gap: 10px; }
  .page-header > * { width: 100%; }
  .page-header .btn, .page-header button { justify-content: center; }
  .page-header div[style*="flex"] { flex-wrap: wrap; }

  /* Klas card op mobiel */
  .klas-card { padding: 14px; }
  .klas-naam { font-size: 15px; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .demo-accounts { flex-direction: column; }
  .login-card { padding: 24px; }
}

/* ============================================================
   BOTTOM NAV — mobiel only
   ============================================================ */
.bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: calc(14px + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 24px);
    max-width: 440px;
    height: 62px;
    background: rgba(13, 31, 60, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 22px;
    box-shadow:
      0 8px 32px rgba(0,0,0,0.24),
      0 2px 8px rgba(0,0,0,0.16),
      inset 0 1px 0 rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.10);
    z-index: 300;
    padding: 0 6px;
    align-items: center;
  }
  .bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: none;
    background: none;
    color: rgba(255,255,255,0.40);
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    padding: 7px 4px;
    border-radius: 14px;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    transition: background 0.15s, color 0.15s;
    height: 50px;
  }
  .bottom-nav-item svg { width: 20px; height: 20px; flex-shrink: 0; }
  .bottom-nav-item.active {
    color: #a5b4fc;
    background: rgba(99,102,241,0.20);
  }
  .nav-badge {
    position: absolute;
    top: 5px;
    right: calc(50% - 18px);
    background: #dc2626;
    color: #fff;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 700;
    min-width: 15px;
    height: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
  }
  .main-content { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }

  @keyframes mobielFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .view.mobiel-in { animation: mobielFadeIn 0.16s ease; }
}

/* ============================================================
   JAARPLANNING
   ============================================================ */

.jp-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.jp-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s;
}
.jp-stat:hover { box-shadow: var(--shadow); }

.jp-stat-val {
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.5px;
}

.jp-stat-lbl {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 500;
}

#jp-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.jp-week {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: box-shadow 0.15s, border-color 0.15s;
  width: 100%;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.jp-week:hover {
  box-shadow: var(--shadow);
  border-color: rgba(28,25,23,0.12);
}

.jp-week-huidig {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim), var(--shadow-sm);
}

.jp-week-vakantie {
  background: var(--amber-dim);
  border-color: rgba(217,119,6,0.2);
  opacity: 0.75;
}

.jp-week-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.jp-week-nr {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  min-width: 64px;
  letter-spacing: -0.1px;
}

.jp-week-datum {
  font-size: 12px;
  color: var(--ink-3);
  flex: 1;
}

.jp-week-thema {
  font-size: 12px;
  color: var(--ink-2);
  font-style: italic;
  border-left: 2px solid var(--accent);
  padding-left: 8px;
}

.jp-opdrachten {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 18px;
}

.jp-leeg {
  font-size: 12px;
  color: var(--ink-4);
  padding: 6px 0;
  font-style: italic;
}

.jp-opdracht {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0;
  display: flex;
  gap: 0;
  overflow: hidden;
  transition: box-shadow 0.12s, border-color 0.12s;
}

.jp-opdracht:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--border-2);
}

.jp-opdracht-afgevinkt {
  opacity: 0.55;
}

.jp-opdracht-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
}

.jp-opdracht-naam {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
  letter-spacing: -0.1px;
}

.jp-opdracht-naam.line-through {
  text-decoration: line-through;
  color: var(--ink-3);
}

.jp-opdracht-desc {
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.45;
  margin-bottom: 4px;
}

.jp-opdracht-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 6px;
}

.jp-opdracht-acties {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

@media (max-width: 768px) {
  .jp-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================
   LESPROFIELEN
   ============================================================ */
.lp-niveau-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 22px 12px;
}

.lp-niveau-pill {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border-radius: 20px;
}

.lp-niveau-count {
  font-size: 12px;
  color: var(--ink-3);
}

.lp-profielen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
  padding: 0 22px 22px;
}

.lp-kaart {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.15s;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.lp-kaart:hover {
  box-shadow: var(--shadow);
  border-color: var(--border-2);
  transform: translateY(-1px);
}

.lp-kaart-naam {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: -0.2px;
  line-height: 1.3;
}

.lp-kaart-module {
  font-size: 12.5px;
  color: var(--accent-text);
  font-weight: 500;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.lp-kaart-meta {
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 14px;
}

.lp-kaart-acties {
  display: flex;
  gap: 6px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* ── Module stap cards ── */
.lp-stap {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  overflow: hidden;
}

.lp-stap-header {
  background: var(--surface-2);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.lp-stap-nr {
  font-size: 11px;
  font-weight: 700;
  background: var(--ink);
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lp-stap-naam {
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  flex: 1;
}

.lp-stap-body {
  padding: 12px 16px;
}

.lp-les-chip {
  font-size: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 3px 10px;
  display: inline-block;
  margin: 2px;
  color: var(--ink-2);
}

.lp-toets-balk {
  padding: 7px 16px;
  background: #fef2f2;
  border-bottom: 1px solid #fca5a5;
  font-size: 12px;
  color: #b91c1c;
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ── Profiel detail overlay ── */
.lp-detail-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.lp-detail-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.6px;
  color: var(--ink);
  flex: 1;
  min-width: 0;
}

.lp-koppeling-rij {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.lp-koppeling-progress {
  font-size: 12px;
  color: var(--ink-3);
  min-width: 140px;
  text-align: right;
}

/* ============================================================
   LES MODULES
   ============================================================ */
.lm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
  padding: 18px 22px;
}

.lm-kaart {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.15s;
  box-shadow: var(--shadow-sm);
}
.lm-kaart:hover {
  box-shadow: var(--shadow);
  border-color: var(--border-2);
  transform: translateY(-1px);
}

.lm-kaart-type {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.lm-type-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  color: #fff;
  letter-spacing: 0.02em;
}

.lm-kaart-naam {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  letter-spacing: -0.2px;
  margin-bottom: 6px;
}

.lm-kaart-meta {
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 14px;
  flex: 1;
}

.lm-kaart-acties {
  display: flex;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

/* Bekijk modal stap */
.lm-bekijk-stap {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  overflow: hidden;
}

.lm-bekijk-stap-header {
  background: var(--surface-2);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}

.lm-bekijk-stap-nr {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lm-bekijk-stap-body {
  padding: 10px 14px;
}

.lm-bekijk-les {
  font-size: 12.5px;
  color: var(--ink-2);
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 10px;
}
.lm-bekijk-les:last-child { border-bottom: none; }

.lm-bekijk-praktijk-blok {
  background: #fffbeb;
  border-radius: 5px;
  padding: 8px 12px;
  margin-top: 6px;
}

/* ============================================================
   AI WIZARD
   ============================================================ */
.aiw-modal-box {
  max-width: 620px;
}

.aiw-progress-bar {
  height: 3px;
  background: var(--surface-3);
  border-radius: 2px;
  margin-bottom: 16px;
  overflow: hidden;
}

.aiw-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.4s cubic-bezier(0.16,1,0.3,1);
}

.aiw-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.aiw-type-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-4);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.aiw-stap-label {
  font-size: 11px;
  color: var(--ink-4);
  font-weight: 500;
}

.aiw-stap-titel {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.4px;
  margin-bottom: 16px;
}

.aiw-context-summary {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.aiw-ctx-stap {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.5;
}

.aiw-ctx-staptitel {
  font-weight: 600;
  color: var(--ink-2);
}

.aiw-ai-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--ink-3);
  transition: all 0.2s;
}

.aiw-ai-badge.aiw-ai-loading {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--ink-3);
}

.aiw-ai-badge.aiw-ai-ok {
  background: var(--accent-dim);
  border-color: rgba(22,163,74,0.2);
  color: var(--accent-text);
}

.aiw-ai-badge.aiw-ai-fout {
  background: var(--red-dim);
  border-color: rgba(220,38,38,0.2);
  color: var(--red-text);
}

.aiw-ai-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-4);
  flex-shrink: 0;
}

.aiw-dot-puls {
  background: var(--accent);
  animation: aiwPuls 1s ease-in-out infinite;
}

.aiw-dot-ok {
  background: var(--accent);
}

.aiw-dot-fout {
  background: var(--red);
}

@keyframes aiwPuls {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

.aiw-input {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-family: var(--font);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  -webkit-appearance: none;
}

.aiw-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(22,163,74,0.12);
}

.aiw-input[rows] { resize: vertical; min-height: 80px; }

.aiw-velden { display: flex; flex-direction: column; gap: 2px; }

@keyframes aiwShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.aiw-shake { animation: aiwShake 0.35s ease; }

/* ============================================================
   WERKBOEKJE WIZARD
   ============================================================ */
.werkboekje-modal-box {
  max-width: min(1180px, calc(100vw - 32px));
  width: min(1180px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
}

.werkboekje-modal-box textarea {
  width: 100%;
  min-height: 96px;
  resize: none;
  overflow-y: hidden;
  line-height: 1.5;
}

.werkboekje-modal-box .form-grid {
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 800px) {
  .werkboekje-modal-box {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    padding: 18px;
  }
  .werkboekje-modal-box .form-grid,
  .werkboekje-modal-box .form-grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   DOCENT VAK-SELECTOR (meerdere vakken)
   ============================================================ */
.vak-select-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.vak-select-header label {
  font-weight: 600;
  font-size: 14px;
}
.vak-select-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-text);
  background: var(--accent-dim);
  padding: 2px 10px;
  border-radius: 20px;
  min-width: 24px;
  text-align: center;
}
.vak-select-search {
  margin-bottom: 8px;
  position: relative;
}
.vak-select-search::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Ccircle cx='8.5' cy='8.5' r='5.5' stroke='%23a8a29e' stroke-width='1.5'/%3E%3Cpath d='M15 15l-3-3' stroke='%23a8a29e' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center;
}
.vak-select-search input {
  width: 100%;
  padding: 8px 12px 8px 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: var(--surface-2);
  color: var(--ink);
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
}
.vak-select-search input:focus {
  border-color: var(--accent);
  background: var(--surface);
}
.vak-select-grid {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px;
  background: var(--surface-2);
  scrollbar-width: thin;
}
.vak-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1.5px solid var(--border-1);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, box-shadow 0.12s;
  font-size: 13px;
}
.vak-option:hover {
  border-color: var(--accent);
  background: var(--surface-2);
  box-shadow: 0 1px 4px rgba(22,163,74,.08);
}
.vak-option.is-selected {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.vak-option input[type="checkbox"] {
  display: none;
}
.vak-option::before {
  content: '';
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 5px;
  border: 2px solid var(--border-2);
  background: var(--surface) no-repeat center / 11px;
  transition: background 0.12s, border-color 0.12s;
}
.vak-option.is-selected::before {
  border-color: var(--accent);
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath d='M4 10l4 4 8-8' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / 11px;
}
.vak-option-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}
.vak-option-text strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vak-option-text span {
  font-size: 11px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vak-option.is-selected .vak-option-text strong { color: var(--accent-text); }
.vak-option.is-selected .vak-option-text span { color: var(--accent-text); opacity: 0.8; }

/* ============================================================
   Lesbrief (lb-*)
   ============================================================ */
.lb-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-family: inherit;
  box-sizing: border-box;
  resize: vertical;
  line-height: 1.55;
  transition: border-color 0.15s;
}
.lb-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(22,163,74,0.1);
}
.lb-input {
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.lb-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(22,163,74,0.1);
}
.lb-del-btn {
  color: var(--red);
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  padding: 3px 6px;
  flex-shrink: 0;
  border-radius: 4px;
  transition: background 0.15s;
}
.lb-del-btn:hover { background: #fee2e2; }

/* Wizard header */
.lb-wizard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.lb-wizard-title {
  margin: 0 0 4px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.lb-wizard-sub {
  font-size: 13px;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.lb-wizard-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}
.lb-type-pill {
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 6px;
  padding: 2px 9px;
  font-size: 12px;
  font-weight: 600;
}

/* Progress bar */
.lb-progress-wrap { margin-bottom: 18px; }
.lb-progress-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 5px;
}
.lb-progress-seg {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: var(--border);
  transition: background 0.2s;
}
.lb-progress-seg.actief { background: var(--accent); }
.lb-progress-label { font-size: 12px; color: var(--ink-muted); }

/* Overzicht (read-only view) */
.lb-overzicht-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.lb-overzicht-title {
  margin: 0 0 4px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.lb-id-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 13px;
}
.lb-id-grid .full { grid-column: 1 / -1; }
.lb-id-label { color: var(--ink-muted); margin-right: 4px; }
.lb-scroll { max-height: 55vh; overflow-y: auto; padding-right: 4px; }

/* Blok (overzicht section) */
.lb-blok { margin-bottom: 20px; }
.lb-blok-label {
  font-weight: 700;
  font-size: 11.5px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 5px;
}
.lb-blok-tekst {
  font-size: 13px;
  white-space: pre-wrap;
  line-height: 1.65;
  color: var(--ink);
}

/* Hint block (per stap) */
.lb-hint {
  background: #f0f9ff;
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 18px;
  font-size: 12.5px;
  color: var(--ink-muted);
  line-height: 1.5;
}
.lb-hint strong { color: var(--accent); }

/* Fasering table */
.lb-fase-tabel { width: 100%; border-collapse: collapse; font-size: 13px; }
.lb-fase-tabel th {
  background: var(--accent);
  color: #fff;
  padding: 9px 10px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
}
.lb-fase-tabel td {
  padding: 7px 9px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.lb-fase-tabel tr:nth-child(even) td { background: var(--surface-2); }
.lb-fase-tabel .lb-td-input {
  border: none;
  width: 100%;
  background: transparent;
  font-size: 13px;
  font-family: inherit;
  padding: 2px 4px;
  border-radius: 4px;
}
.lb-fase-tabel .lb-td-input:focus {
  outline: 2px solid var(--accent);
  background: #fff;
}
.lb-fase-tabel textarea.lb-td-input {
  resize: vertical;
  min-height: 52px;
}
.lb-fase-naam { font-weight: 600; font-size: 12px; }
.lb-fase-tijd { white-space: nowrap; font-size: 12px; color: var(--ink-muted); }

/* Fasering overzicht table */
.lb-ovz-tabel { width: 100%; border-collapse: collapse; font-size: 12px; }
.lb-ovz-tabel thead tr { background: var(--accent); color: #fff; }
.lb-ovz-tabel th { padding: 8px 10px; text-align: left; font-weight: 600; }
.lb-ovz-tabel td { padding: 8px 10px; border-bottom: 1px solid var(--border); }
.lb-ovz-tabel tr:nth-child(even) td { background: var(--surface-2); }

/* ============================================================
   Toetsen (tw-*)
   ============================================================ */

/* Materiaalbibliotheek rij */
.tw-mat-rij {
  padding: 11px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  transition: background 0.12s;
}
.tw-mat-rij:hover { background: var(--surface-2); }
.tw-mat-naam { flex: 1; min-width: 120px; }
.tw-mat-naam strong { font-weight: 500; font-size: 13px; display: block; }
.tw-mat-meta { font-size: 12px; color: var(--ink-muted); white-space: nowrap; }
.tw-del-btn {
  color: var(--red);
  font-size: 12px;
  border: 1.5px solid var(--red);
  background: none;
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}
.tw-del-btn:hover { background: #fee2e2; }

/* Lesmaterialen tabs */
.lm-module-select { display: none; }
.lm-tab-bar { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin: 0 -20px; padding: 0 20px; }
.lm-tab-btn { background: none; border: none; padding: 10px 18px; font-size: 13px; font-weight: 500; color: var(--ink-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.lm-tab-btn:hover { color: var(--ink); }
.lm-tab-btn--active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.lm-tab-count { font-size: 11px; background: var(--surface-2); border-radius: 999px; padding: 1px 7px; font-weight: 700; color: var(--ink-muted); }
.lm-tab-btn--active .lm-tab-count { background: var(--accent-dim); color: var(--accent); }
.lm-tab-paneel { padding-top: 4px; }

/* Keuze-kaarten (upload vs wizard) */
.tw-keuze-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 8px;
}
.tw-keuze-kaart {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 18px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.tw-keuze-kaart:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow: var(--shadow-sm);
}
.tw-keuze-icoon { font-size: 30px; margin-bottom: 10px; }
.tw-keuze-titel { font-weight: 600; font-size: 14px; margin-bottom: 5px; }
.tw-keuze-sub { font-size: 12px; color: var(--ink-muted); line-height: 1.4; }

/* Sectie container (bronnen stap 2) */
.tw-sectie {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}
.tw-sectie-header {
  font-weight: 700;
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tw-bron-blok {
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 10px;
}
.tw-bron-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.tw-bron-nr { font-weight: 600; font-size: 12px; color: var(--ink-muted); }
.tw-bron-del {
  color: var(--red);
  border: none;
  background: none;
  cursor: pointer;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.15s;
}
.tw-bron-del:hover { background: #fee2e2; }

/* Vraag container (stap 3) */
.tw-vraag-blok {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 10px;
  transition: border-color 0.15s;
}
.tw-vraag-blok:focus-within { border-color: var(--accent); }
.tw-vraag-acties {
  display: flex;
  gap: 7px;
  align-items: center;
  margin-bottom: 9px;
  flex-wrap: wrap;
}
.tw-vraag-del {
  color: var(--red);
  border: none;
  background: none;
  cursor: pointer;
  font-size: 16px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.15s;
  margin-left: auto;
}
.tw-vraag-del:hover { background: #fee2e2; }
.tw-mini-select {
  font-size: 12px;
  padding: 5px 8px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  background: var(--surface);
}
.tw-mini-input {
  flex: 1;
  min-width: 120px;
  font-size: 12px;
  padding: 5px 9px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
}
.tw-mini-textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  resize: vertical;
  margin-bottom: 8px;
  font-family: inherit;
  box-sizing: border-box;
}
.tw-mini-textarea:focus, .tw-mini-input:focus, .tw-mini-select:focus {
  outline: none;
  border-color: var(--accent);
}
.tw-mk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tw-mk-opt { display: flex; gap: 6px; align-items: center; }
.tw-mk-letter { font-weight: 700; font-size: 12px; min-width: 16px; }

/* AI advies blok */
.tw-ai-advies-blok {
  display: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 12px;
}
.tw-ai-advies-titel { font-weight: 600; margin-bottom: 4px; color: var(--accent); }
.tw-ai-verbeterd {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 10px;
  margin-bottom: 8px;
  font-style: italic;
}

/* Overzicht (stap 4) */
.tw-ovz-blok {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}
.tw-ovz-titel { font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.tw-ovz-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  font-size: 13px;
}

/* Upload zone (gedeeld) */
.upload-zone {
  padding: 24px;
  text-align: center;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.upload-zone:hover { border-color: var(--accent); background: var(--accent-dim); }

/* ============================================================
   Werkboekje wizard (wb-*)
   ============================================================ */
.wb-flex-rij {
  display: flex;
  gap: 6px;
  margin-bottom: 7px;
  align-items: center;
}
.wb-machine-blok {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 10px;
}
.wb-machine-inputs {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  align-items: center;
}
.wb-mat-tabel { width: 100%; border-collapse: collapse; font-size: 12px; }
.wb-mat-tabel th {
  background: var(--surface-2);
  border-bottom: 2px solid var(--border);
  padding: 7px 8px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}
.wb-mat-tabel td { padding: 5px 8px; border-bottom: 1px solid var(--border); }
.wb-mat-tabel td:first-child { color: var(--ink-muted); font-size: 11px; text-align: center; }
.wb-mat-tabel input { width: 100%; font-size: 12px; font-family: inherit; border: 1px solid transparent; border-radius: 3px; padding: 2px 5px; background: transparent; }
.wb-mat-tabel input:focus { outline: none; border-color: var(--accent); background: #fff; }

/* Sectie container (stappen stap 6) */
.wb-sectie-blok {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 14px;
}
.wb-sectie-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-weight: 700;
}

/* Stap blok */
.wb-stap-blok {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 10px;
  background: var(--surface);
}
.wb-stap-blok.is-tekening {
  border-color: var(--amber, #f59f00);
  background: #fffbf0;
}
.wb-stap-hdr {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.wb-stap-nr { font-weight: 700; color: var(--accent); }
.wb-stap-del {
  margin-left: auto;
  color: var(--red);
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.15s;
}
.wb-stap-del:hover { background: #fee2e2; }
.wb-tekenvak-preview {
  background: #fff;
  border: 1.5px dashed var(--amber, #f59f00);
  border-radius: 6px;
  padding: 14px;
  text-align: center;
  color: var(--ink-muted);
  font-size: 12px;
  margin-bottom: 8px;
}
.wb-stap-acties {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 6px;
}

/* AI voorstel blok */
.wb-voorstel-blok {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.wb-voorstel-titel { font-weight: 700; margin-bottom: 8px; font-size: 13px; }
.wb-voorstel-pre {
  white-space: pre-wrap;
  font-size: 12px;
  margin: 0 0 10px;
  max-height: 160px;
  overflow: auto;
  font-family: inherit;
}

/* ============================================================
   Klassen (docenten picker + roulatie)
   ============================================================ */
.klas-docent-chips { display: flex; gap: 4px; margin-top: 8px; flex-wrap: wrap; }
.klas-docent-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
}
.klas-docent-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  font-family: monospace;
  flex-shrink: 0;
}
.docenten-picker-rij {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.1s;
}
.docenten-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  font-family: monospace;
  flex-shrink: 0;
}
.klas-roulatie-blok {
  margin-top: 20px;
  padding: 16px;
  background: var(--surface-2);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
}
.klas-roulatie-preview {
  margin-top: 8px;
  font-size: 12px;
  color: var(--ink-muted);
  padding: 8px 10px;
  background: #fff;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* ============================================================
   Rooster
   ============================================================ */
/* nieuwe rooster stijlen staan hieronder — .rr-* */
.rooster-table { width: 100%; border-collapse: collapse; min-width: 600px; }
.rooster-table th {
  text-align: left;
  padding: 12px 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.rooster-table th.center { text-align: center; padding: 12px 16px; }
.rooster-table td { padding: 14px 20px; border-bottom: 1px solid var(--border); }
.rooster-table td.center { text-align: center; padding: 14px 16px; }
.rooster-table tr:nth-child(even) td { background: var(--surface-2); }
.rooster-klas-naam { font-weight: 600; font-size: 14px; }
.rooster-klas-sub { font-size: 11px; color: var(--ink-muted); }
.rooster-snel-balk {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.rooster-preview-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--accent-dim);
  border: 1px solid rgba(22,163,74,0.2);
  border-radius: var(--radius-sm);
}
.rooster-preview-naam { font-weight: 600; font-size: 13px; color: var(--accent-text); }
.rooster-preview-sub { font-size: 11px; color: var(--accent-text); opacity: 0.7; }

/* ============================================================
   Taken
   ============================================================ */
.taak-rij {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.taak-cirkel {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 3px;
  transition: all 0.15s;
  cursor: pointer;
}
.taak-cirkel.is-button { border: none; }
.taak-cirkel.afgerond { border-color: var(--accent); background: var(--accent); }
.taak-inhoud { flex: 1; min-width: 0; }
.taak-naam-rij { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.taak-naam { font-size: 14px; font-weight: 600; }
.taak-naam.afgerond { text-decoration: line-through; color: var(--ink-muted); }
.taak-beschrijving { font-size: 13px; color: var(--ink-muted); margin-bottom: 7px; line-height: 1.5; }
.taak-acties { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.taak-initiaal {
  font-size: 11px;
  font-weight: 700;
  font-family: monospace;
  background: var(--accent);
  color: #fff;
  padding: 2px 7px;
  border-radius: 5px;
}
.taak-oppak-btn {
  font-size: 12px;
  padding: 4px 11px;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--ink-muted);
  cursor: pointer;
  font-weight: 500;
  transition: all 0.15s;
  font-family: inherit;
}
.taak-oppak-btn.opgepakt {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent-text);
}
.taak-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}
.taak-badge.telaat { color: var(--red); background: var(--red-dim, #fee2e2); }
.taak-badge.binnenkort { color: var(--amber-text); background: var(--amber-dim); font-weight: 600; }
.taak-badge.normaal { color: var(--ink-muted); font-weight: 400; }

/* ============================================================
   Schooljaren
   ============================================================ */
.sj-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.sj-kaart-inhoud { padding: 20px 22px; }
.sj-kaart-hdr { display: flex; justify-content: space-between; margin-bottom: 12px; align-items: flex-start; }
.sj-kaart-naam { font-family: 'DM Serif Display', serif; font-size: 22px; }
.sj-kaart-acties { display: flex; gap: 8px; }

/* ============================================================
   Gebruikers
   ============================================================ */
.geb-initialen {
  font-family: monospace;
  font-size: 13px;
  font-weight: 700;
  background: var(--accent-dim);
  color: var(--accent-text);
  padding: 3px 8px;
  border-radius: 6px;
}
.geb-status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}
.geb-status.actief { background: var(--accent-dim); color: var(--accent-text); }
.geb-status.tijdelijk { background: var(--amber-dim); color: var(--amber-text); }
.geb-ww-blok {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 16px 0;
}
.geb-ww-label { font-size: 12px; color: var(--ink-muted); margin-bottom: 4px; }
.geb-ww-waarde { font-weight: 600; font-size: 15px; margin-bottom: 12px; }
.geb-ww-rij { display: flex; align-items: center; gap: 8px; }
.geb-ww-code {
  font-size: 16px;
  font-weight: 700;
  background: var(--amber-dim);
  color: var(--amber-text);
  padding: 6px 12px;
  border-radius: 6px;
  letter-spacing: 0.05em;
}

/* ============================================================
   Gebruikers — nieuwe stijl
   ============================================================ */
.gu-wrapper { max-width: 860px; }

.gu-stats {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.gu-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  flex: 1;
  min-width: 80px;
  text-align: center;
}
.gu-stat-num { font-size: 26px; font-weight: 700; color: var(--ink); letter-spacing: -1px; line-height: 1; }
.gu-stat-label { font-size: 11px; color: var(--ink-3); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.gu-stat--groen .gu-stat-num { color: var(--accent); }
.gu-stat--paars .gu-stat-num { color: #7C3AED; }
.gu-stat--blauw .gu-stat-num { color: #2563EB; }
.gu-stat--amber .gu-stat-num { color: #D97706; }

.gu-info-banner {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 13px;
  color: #1E40AF;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  line-height: 1.5;
}

.gu-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.gu-zoek-wrap {
  flex: 1;
  min-width: 200px;
  position: relative;
  display: flex;
  align-items: center;
}
.gu-zoek-wrap svg {
  position: absolute;
  left: 11px;
  color: var(--ink-4);
  pointer-events: none;
}
.gu-zoek-wrap input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
}
.gu-zoek-wrap input:focus { outline: none; border-color: var(--accent); }

.gu-tabs {
  display: flex;
  gap: 2px;
  background: var(--surface-2);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.gu-tab {
  padding: 5px 12px;
  border: none;
  background: none;
  border-radius: 6px;
  font-size: 12px;
  color: var(--ink-3);
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}
.gu-tab.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.gu-tab:hover:not(.active) { color: var(--ink-2); }

.gu-list { display: flex; flex-direction: column; gap: 6px; }

.gu-kaart {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.gu-kaart:hover { box-shadow: var(--shadow-sm); border-color: var(--ink-4); }

.gu-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.gu-avatar--docent    { background: var(--accent-dim);  color: var(--accent-text); }
.gu-avatar--admin     { background: #EDE9FE; color: #6D28D9; }
.gu-avatar--management { background: #DBEAFE; color: #1D4ED8; }

.gu-body { flex: 1; min-width: 0; }
.gu-naam-rij {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 3px;
}
.gu-naam { font-weight: 600; font-size: 14px; color: var(--ink); }
.gu-email { font-size: 12px; color: var(--ink-3); margin-bottom: 5px; }

.gu-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
}
.gu-badge--docent     { background: var(--accent-dim);  color: var(--accent-text); }
.gu-badge--admin      { background: #EDE9FE; color: #6D28D9; }
.gu-badge--management { background: #DBEAFE; color: #1D4ED8; }
.gu-badge--tl         { background: #F3E8FF; color: #7E22CE; }
.gu-badge--self       { background: var(--surface-3); color: var(--ink-3); }
.gu-badge--actief     { background: var(--accent-dim);  color: var(--accent-text); }
.gu-badge--tijdelijk  { background: var(--amber-dim);   color: var(--amber-text); }

.gu-vakken { display: flex; flex-wrap: wrap; gap: 4px; }
.gu-vak {
  background: var(--surface-2);
  color: var(--ink-2);
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  border: 1px solid var(--border);
}

.gu-acties { display: flex; gap: 4px; flex-shrink: 0; }
.gu-btn {
  width: 32px; height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  flex-shrink: 0;
}
.gu-btn svg { width: 15px; height: 15px; }
.gu-btn:hover { background: var(--surface-2); color: var(--ink); border-color: var(--ink-4); }
.gu-btn--danger:hover { background: #FEE2E2; color: #DC2626; border-color: #FCA5A5; }


/* ============================================================
   Opdrachten filter
   ============================================================ */
.opd-filter-balk {
  display: flex;
  gap: 12px;
  padding: 14px 20px;
  align-items: center;
  flex-wrap: wrap;
}
.opd-filter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.opd-filter-select {
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 13px;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s;
}
.opd-filter-select:focus { outline: none; border-color: var(--accent); }

/* ============================================================
   Lesprofielen — koppelmodal weekverdeling preview
   ============================================================ */
.lp-verdeling-wrap {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}
.lp-verdeling-titel { font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.lp-verdeling-sub { font-size: 11px; color: var(--ink-muted); margin-bottom: 12px; }
.lp-verdeling-scroll { max-height: 420px; overflow-y: auto; }
.lp-week-rij {
  display: flex;
  align-items: stretch;
  gap: 6px;
  margin-bottom: 6px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.lp-week-pijlen {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--surface-2);
}
.lp-week-pijl {
  flex: 1;
  border: none;
  background: none;
  padding: 2px 7px;
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s;
}
.lp-week-pijl:hover:not(:disabled) { color: var(--accent); }
.lp-week-pijl:disabled { color: var(--border); cursor: default; }
.lp-week-body { padding: 7px 10px; flex: 1; min-width: 0; }
.lp-week-label { font-weight: 600; font-size: 12px; margin-bottom: 5px; color: var(--ink-muted); font-weight: 400; }
.lp-week-label strong { font-weight: 700; color: var(--ink); }
.lp-drop-zone { min-height: 18px; border-radius: 4px; transition: outline 0.1s; }
.lp-drop-zone.praktijk { margin-top: 2px; }
.lp-item-rij {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 2px;
  padding: 2px 4px;
  border-radius: 3px;
  border-top: 2px solid transparent;
  cursor: grab;
  transition: opacity 0.15s;
}
.lp-item-handle { color: var(--border); font-size: 11px; line-height: 1; user-select: none; }
.lp-item-tekst { font-size: 11px; }
.lp-koppel-ai-rij {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.lp-koppel-ai-sub { font-size: 12px; color: var(--ink-muted); }

/* Taken — extra utilities */
.taak-lijst { padding: 4px 20px 8px; }
.taak-lijst.afgerond { opacity: 0.55; }
.taak-knoppen { display: flex; gap: 4px; flex-shrink: 0; margin-top: 2px; }
.taak-niemand { font-size: 12px; color: var(--ink-muted); }

/* Schooljaren — week overzicht */
.sj-periode-hdr { padding: 10px 24px; background: var(--cream); font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--ink-muted); border-bottom: 1px solid var(--border); }
.sj-thema-cel { display: inline-block; min-width: 200px; padding: 4px 8px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.sj-thema-cel.leeg { border: 1px dashed var(--border-med); color: var(--ink-muted); }
.sj-thema-cel.gevuld { border: 1px dashed transparent; color: var(--ink); }
.sj-thema-input { padding: 4px 8px; border: 1.5px solid var(--accent); border-radius: 6px; font-size: 13px; font-family: 'DM Sans', sans-serif; min-width: 200px; outline: none; }

/* Dashboard — collega-initialen op les-kaart */
.db-collega-initialen { display: flex; gap: 3px; align-items: center; }
.db-collega-initiaal {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--surface-3); color: var(--ink-2);
  font-size: 9px; font-weight: 700; font-family: var(--font-mono, monospace);
  border: 1.5px solid var(--border); flex-shrink: 0; cursor: default;
}

/* ============================================================
   Rooster lesuren
   ============================================================ */
.rooster-legenda-card { margin-bottom: 16px; padding: 16px 20px; }
.rooster-schema-grid { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:16px; }
.rooster-schema { border:1px solid var(--border); border-radius: var(--radius-sm); padding:12px; background:var(--surface-2); }
.rooster-schema strong { display:block; font-size:13px; margin-bottom:8px; color:var(--ink); }
.rooster-schema div { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap:6px; }
.rooster-schema span { font-size:11px; color:var(--ink-muted); background:var(--surface); border:1px solid var(--border); border-radius:8px; padding:5px 6px; white-space:nowrap; }
.rooster-table-uren { min-width: 980px; }
.rooster-uur-cel { min-width: 150px; }
.rooster-uur-grid { display:grid; grid-template-columns: repeat(4, 30px); gap:6px; justify-content:center; }
.rooster-uur-pill { width:30px; height:30px; border:1.5px solid var(--border-2); border-radius:9px; display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:700; color:var(--ink-muted); background:var(--surface); cursor:pointer; transition:.15s ease; }
.rooster-uur-pill input { display:none; }
.rooster-uur-pill:hover { border-color:var(--accent); color:var(--accent-text); }
.rooster-uur-pill.is-checked { background:var(--accent); border-color:var(--accent); color:white; box-shadow:0 6px 14px rgba(22,163,74,.18); }
.rooster-preview-list { display:flex; gap:8px; flex-wrap:wrap; }

@media (max-width: 900px) {
  .rooster-schema-grid { grid-template-columns: 1fr; }
  .rooster-schema div { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

/* ============================================================
   Rooster — nieuwe stijl (.rr-*)
   ============================================================ */
.rr-wrapper { width: 100%; }

@media (min-width: 769px) {
  .rr-klassen-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

.rr-legenda {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.rr-legenda-blok {
  flex: 1;
  min-width: 220px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.rr-legenda-titel {
  width: 100%;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
.rr-legenda-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 11px;
  color: var(--ink-3);
}
.rr-legenda-item strong { color: var(--ink); font-weight: 600; }

.rr-snelknoppen {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.rr-snelknoppen-label { font-size: 12px; color: var(--ink-3); font-weight: 500; }
.rr-snelknop {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.rr-snelknop:hover { background: var(--surface-2); border-color: var(--ink-4); color: var(--ink); }
.rr-snelknop--leeg { color: var(--ink-3); margin-left: 4px; }
.rr-snelknop--leeg:hover { background: #FEE2E2; border-color: #FCA5A5; color: #DC2626; }

.rr-klas-kaart {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}
.rr-klas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.rr-klas-naam { font-weight: 600; font-size: 15px; color: var(--ink); }
.rr-klas-sub { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.rr-klas-acties { display: flex; align-items: center; gap: 8px; }
.rr-klas-totaal {
  background: var(--accent-dim);
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
}
.rr-klas-leeg-btn {
  width: 28px; height: 28px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink-4);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.12s, color 0.12s;
}
.rr-klas-leeg-btn:hover { background: #FEE2E2; color: #DC2626; border-color: #FCA5A5; }

.rr-dag-lijst { padding: 6px 0; }

.rr-dag-rij {
  display: flex;
  align-items: center;
  padding: 7px 18px;
  gap: 12px;
  transition: background 0.1s;
}
.rr-dag-rij:hover { background: var(--surface-2); }
.rr-dag-rij--vandaag { background: var(--accent-dim); }
.rr-dag-rij--vandaag:hover { background: #bbf7d0; }

.rr-dag-label {
  width: 30px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}
.rr-dag-naam { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.rr-dag-rij--vandaag .rr-dag-naam { color: var(--accent-text); }
.rr-vandaag-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}

.rr-uren { display: flex; gap: 5px; flex: 1; flex-wrap: wrap; }

.rr-pill {
  width: 34px; height: 34px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
  color: var(--ink-3);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, color 0.12s, box-shadow 0.12s;
  flex-shrink: 0;
}
.rr-pill input { display: none; }
.rr-pill:hover { border-color: var(--accent); color: var(--accent-text); background: var(--accent-dim); }
.rr-pill--actief {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 4px 10px rgba(22,163,74,.2);
}
.rr-pill--actief:hover { background: var(--accent-text); border-color: var(--accent-text); }

.rr-dag-info {
  min-width: 110px;
  text-align: right;
  flex-shrink: 0;
}
.rr-dag-tijd { font-size: 12px; color: var(--ink-2); margin-right: 6px; }
.rr-dag-uren {
  font-size: 11px; font-weight: 600;
  background: var(--accent-dim); color: var(--accent-text);
  padding: 2px 6px; border-radius: 99px;
}
.rr-dag-leeg { font-size: 12px; color: var(--ink-4); }

.rr-preview-sectie {
  margin-top: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
}
.rr-preview-titel { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 10px; }
.rr-preview-lijst { display: flex; gap: 8px; flex-wrap: wrap; }
.rr-preview-chip {
  background: var(--accent-dim);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
}
.rr-preview-naam { font-weight: 600; font-size: 13px; color: var(--accent-text); }
.rr-preview-meta { font-size: 11px; color: var(--accent-text); opacity: 0.75; margin-top: 2px; }
.rr-preview-leeg {
  display: flex; align-items: center; gap: 8px;
  color: var(--ink-3); font-size: 13px;
}

@media (max-width: 640px) {
  .rr-dag-info { display: none; }
  .rr-pill { width: 30px; height: 30px; font-size: 12px; }
  .rr-legenda { display: none; }
}

/* ============================================================
   FIX 20260513 — Dashboard schaalt netjes binnen hoofdvenster
   ============================================================ */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

*, *::before, *::after {
  box-sizing: border-box;
}

.app-shell,
.main-content,
.view,
#view-dashboard,
.teacher-dashboard {
  min-width: 0;
  max-width: 100%;
}

.main-content {
  overflow-x: hidden;
}

.view {
  width: 100%;
  max-width: 100%;
}

@media (min-width: 901px) {
  .main-content {
    width: calc(100vw - var(--sidebar-w));
    max-width: calc(100vw - var(--sidebar-w));
  }
}

@media (max-width: 900px) {
  .main-content {
    width: 100%;
    max-width: 100%;
  }
}

/* ── Uren verantwoorden modal ── */
.db-uren-opties{display:flex;flex-direction:column;gap:4px;margin:16px 0 4px;}
.db-uren-optie{display:flex;align-items:flex-start;gap:0;cursor:pointer;border-radius:10px;border:1.5px solid #e5e7eb;background:#fff;transition:border-color .15s;}
.db-uren-optie:has(input:checked){border-color:#6366f1;background:#f5f3ff;}
.db-uren-optie input[type=radio]{position:absolute;opacity:0;pointer-events:none;width:0;height:0;}
.db-uren-optie-body{display:flex;align-items:center;gap:12px;padding:12px 14px;width:100%;}
.db-uren-optie-icon{width:30px;height:30px;border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:15px;font-weight:900;flex-shrink:0;}
.db-uren-icon--groen{background:#dcfce7;color:#047857;}
.db-uren-icon--oranje{background:#fff7ed;color:#c2410c;}
.db-uren-icon--rood{background:#fef2f2;color:#b91c1c;}
.db-uren-optie-body > span:last-child{display:flex;flex-direction:column;gap:2px;}
.db-uren-optie-body strong{font-size:14px;font-weight:700;color:#111827;}
.db-uren-optie-body em{font-style:normal;font-size:12px;color:#6b7280;}
.db-uren-deels-invoer{background:#f5f3ff;border-radius:8px;padding:10px 14px;margin:0 0 4px;}
.db-uren-deels-invoer label{display:block;font-size:12px;font-weight:600;color:#374151;margin-bottom:6px;}
.db-uren-deels-rij{display:flex;align-items:center;gap:10px;}
.db-uren-deels-rij input{border:1.5px solid #c4b5fd;border-radius:7px;padding:6px 8px;font-family:inherit;font-size:14px;font-weight:700;background:#fff;color:#111827;}
.db-uren-deels-rij span{font-size:13px;color:#374151;}
.db-uren-reden{margin:12px 0 16px;}
.db-uren-reden label{display:block;font-size:12px;font-weight:600;color:#374151;margin-bottom:6px;}
.db-uren-reden input{width:100%;border:1.5px solid #e5e7eb;border-radius:8px;padding:9px 12px;font-family:inherit;font-size:13px;color:#111827;background:#fff;}
.db-uren-reden input:focus{outline:none;border-color:#6366f1;}

/* ── Teamleider view ── */
.tl-wrapper{padding:24px;max-width:1100px;}
.page-sub{color:var(--ink-3,#6b7280);font-size:14px;margin:4px 0 0;}
.tl-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:24px;}
.tl-stat{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:16px;text-align:center;}
.tl-stat--kleur{border-color:#c7d2fe;background:#eef2ff;}
.tl-stat--waarschuwing{border-color:#fecaca;background:#fef2f2;}
.tl-stat-waarde{font-size:30px;font-weight:800;color:#111827;line-height:1;}
.tl-stat-label{font-size:12px;color:#6b7280;margin-top:4px;}
.tl-voortgang-balk{height:4px;background:#e0e7ff;border-radius:999px;margin-top:8px;overflow:hidden;}
.tl-voortgang-gevuld{height:100%;background:#6366f1;border-radius:999px;transition:width .3s;}

.tl-tabs{display:flex;gap:4px;border-bottom:2px solid #e5e7eb;margin-bottom:16px;}
.tl-tab{background:none;border:none;padding:10px 18px;font-size:14px;font-weight:600;color:#6b7280;cursor:pointer;border-bottom:2px solid transparent;margin-bottom:-2px;font-family:inherit;}
.tl-tab.active{color:#111827;border-bottom-color:#111827;}
.tl-tab:hover{color:#374151;}

.tl-klas-card{background:#fff;border:1px solid #e5e7eb;border-radius:12px;margin-bottom:10px;overflow:hidden;}
.tl-klas-header{width:100%;display:flex;align-items:center;gap:12px;padding:14px 16px;background:none;border:none;cursor:pointer;font-family:inherit;text-align:left;}
.tl-klas-header:hover{background:#f9fafb;}
.tl-klas-naam{font-size:15px;font-weight:800;color:#111827;flex:1;}
.tl-klas-meta{display:flex;align-items:center;gap:10px;flex-shrink:0;}
.tl-klas-meta span{font-size:12px;color:#6b7280;}
.tl-mini-balk{width:80px;height:6px;background:#f3f4f6;border-radius:999px;overflow:hidden;}
.tl-mini-gevuld{height:100%;background:#6366f1;border-radius:999px;}
.tl-klas-pct{font-size:12px;font-weight:700;color:#374151;min-width:70px;text-align:right;}
.tl-pct--groen{color:#047857;}
.tl-pct--oranje{color:#c2410c;}
.tl-chevron{width:16px;height:16px;color:#9ca3af;flex-shrink:0;transition:transform .2s;}
.tl-klas-body{border-top:1px solid #e5e7eb;overflow-x:auto;}

.tl-les-tabel{width:100%;border-collapse:collapse;font-size:13px;}
.tl-les-tabel th{padding:8px 12px;text-align:left;font-size:11px;font-weight:700;color:#6b7280;text-transform:uppercase;letter-spacing:.04em;border-bottom:1px solid #e5e7eb;background:#f9fafb;white-space:nowrap;}
.tl-les-tabel td{padding:9px 12px;border-bottom:1px solid #f3f4f6;color:#111827;vertical-align:middle;}
.tl-les-tabel tr:last-child td{border-bottom:none;}
.tl-les-tabel tr:hover td{background:#f9fafb;}
.tl-rij--afgerond td{color:#6b7280;}
.tl-rij--verstreken td{background:#fff5f5;}
.tl-col-week{width:60px;color:#6b7280;font-size:12px;white-space:nowrap;}
.tl-col-naam{font-weight:600;}
.tl-col-type{width:90px;}
.tl-col-status{width:110px;white-space:nowrap;}
.tl-col-door{width:60px;font-size:12px;color:#6b7280;}
.tl-col-datum{width:80px;font-size:12px;color:#6b7280;white-space:nowrap;}

.tl-type-badge{display:inline-block;font-size:11px;font-weight:600;border-radius:999px;background:#f3f4f6;color:#374151;padding:2px 8px;}
.tl-status{display:inline-flex;align-items:center;font-size:11px;font-weight:700;border-radius:999px;padding:3px 9px;white-space:nowrap;margin-right:4px;}
.tl-status--ok{background:#f0fdf4;color:#047857;}
.tl-status--open{background:#f9fafb;color:#6b7280;}
.tl-status--waarschuwing{background:#fffbeb;color:#92400e;}
.tl-leerling-counts{display:flex;flex-wrap:wrap;gap:5px;margin-top:5px;}
.tl-leerling-item{display:inline-flex;align-items:center;gap:4px;font-size:11px;padding:3px 8px;border-radius:6px;border:1px solid #e5e7eb;}
.tl-leerling-item--ok{background:#f0fdf4;border-color:#bbf7d0;color:#166534;}
.tl-leerling-item--aandacht{background:#fffbeb;border-color:#fde68a;color:#92400e;}
.tl-leerling-item em{font-style:normal;font-weight:700;color:#b91c1c;margin-left:2px;}
.tl-deadline--verstreken{color:#b91c1c;font-weight:700;}
.tl-empty-rij{text-align:center;color:#9ca3af;padding:20px;font-style:italic;}
.tl-init{display:inline-block;background:#e0e7ff;color:#4338ca;border-radius:999px;font-size:11px;font-weight:700;padding:2px 7px;margin:1px;}
.tl-sectie-titel{font-size:15px;font-weight:800;color:#111827;margin:0 0 12px;}
.tl-taken-tabel{background:#fff;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden;}

/* Teamleider toggle in gebruikers modal */
.tl-toggle-rij{display:flex;align-items:center;gap:12px;flex-wrap:wrap;}
.tl-toggle-label{display:flex;align-items:center;gap:8px;cursor:pointer;font-weight:700;font-size:14px;color:#111827;white-space:nowrap;}
.tl-toggle-label input[type=checkbox]{width:16px;height:16px;cursor:pointer;}
.form-hint{font-size:12px;color:#6b7280;}

@media(max-width:760px){
  .tl-wrapper{padding:16px;}
  .tl-stats{grid-template-columns:repeat(2,1fr);}
  .tl-klas-meta{display:none;}
}
@media(max-width:480px){
  .tl-stats{grid-template-columns:1fr 1fr;}
  .tl-stat-waarde{font-size:22px;}
}

/* ── Theorie module (embedded stap) ── */
.lm-tm-stap{display:flex;align-items:center;gap:10px;background:#faf5ff;border-bottom:1px solid #e9d5ff;padding:10px 14px;}
.lm-tm-stap:hover{background:#f5f0ff;}
.db-taak-item--tm{background:#faf5ff;border-color:#e9d5ff;}
.db-taak-item--tm .db-taak-icon{background:#ede9fe;color:#7c3aed;}
.lm-niveau-checkboxes{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px;}
.lm-niveau-checkbox{display:inline-flex;align-items:center;gap:5px;padding:5px 10px;border:1.5px solid var(--border-2);border-radius:8px;font-size:13px;font-weight:600;cursor:pointer;background:#fff;color:var(--ink-2);transition:border-color .15s,background .15s;}
.lm-niveau-checkbox:has(input:checked){border-color:#7c3aed;background:#faf5ff;color:#6d28d9;}
.lm-niveau-checkbox input{width:14px;height:14px;accent-color:#7c3aed;cursor:pointer;}
.lm-niveau--al{opacity:.6;}
