/* ============================================================================
   Schoolkwaliteit - ontwerpsysteem
   Navy + groen, gebouwd rond Bitter (koppen) en Work Sans (body).
   ============================================================================ */

:root {
  --bg: #f6f4ee;
  --surface: #ffffff;
  --surface-2: #f1efe6;
  --border: #e6e1d3;

  --text: #1c2333;
  --text-muted: #6b7182;

  /* Sidebar / donkere oppervlakken */
  --navy-950: #0a1224;
  --navy-900: #101a35;
  --navy-800: #17264c;
  --navy-700: #203a6e;
  --on-navy: #f3f1e8;
  --on-navy-muted: #a8b0c4;

  --accent: #0c6b45;
  --accent-dark: #075c3b;
  --accent-soft: #dcf0e5;

  --gold: #a87519;
  --gold-dark: #8c6620;
  --gold-soft: #faf0d9;

  --good: #178150;
  --good-soft: #dcf3e6;
  --warn: #a87519;
  --warn-soft: #faf0d9;
  --critical: #b13327;
  --critical-soft: #fbe3de;
  --neutral: #6b7182;
  --neutral-soft: #ecebe3;

  --radius: 10px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(13, 21, 38, 0.06);
  --shadow: 0 2px 4px rgba(13, 21, 38, 0.05), 0 12px 28px -12px rgba(13, 21, 38, 0.18);
  --shadow-lg: 0 4px 10px rgba(13, 21, 38, 0.08), 0 24px 48px -18px rgba(13, 21, 38, 0.28);

  --font-display: 'Bitter', Georgia, 'Times New Roman', serif;
  --font-body: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1526;
    --surface: #161e33;
    --surface-2: #1b243c;
    --border: #2a3450;
    --text: #eceaf0;
    --text-muted: #9aa1b8;
    --navy-950: #060a16;
    --navy-900: #0a0f20;
    --navy-800: #101a30;
    --navy-700: #182b52;
    --accent: #34b381;
    --accent-dark: #6cd9a8;
    --accent-soft: #123829;
    --gold: #e8b354;
    --gold-dark: #f5cd7d;
    --gold-soft: #3a2d15;
    --good: #3fc586;
    --good-soft: #16362a;
    --warn: #e8b354;
    --warn-soft: #3a2d15;
    --critical: #ef8a72;
    --critical-soft: #40251f;
    --neutral: #9aa1b8;
    --neutral-soft: #232d47;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.35), 0 12px 28px -12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 4px 10px rgba(0, 0, 0, 0.4), 0 24px 48px -18px rgba(0, 0, 0, 0.6);
  }
}

* { box-sizing: border-box; }
/* De browser-standaard voor [hidden] is display:none, maar elke klasse die
   zelf een display-waarde zet (bijv. .btn met display:inline-flex) wint
   normaal van die standaard omdat een klasse-selector zwaarder weegt dan de
   UA-stylesheet. Dit garandeert dat .hidden = true altijd echt verbergt. */
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; margin: 0 0 4px; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: 1.85rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 12px; color: var(--text-muted); }
a { color: var(--accent-dark); }
::selection { background: var(--gold-soft); }

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

.sidebar {
  width: 248px;
  flex-shrink: 0;
  background: linear-gradient(185deg, var(--navy-900) 0%, var(--navy-950) 100%);
  color: var(--on-navy);
  display: flex;
  flex-direction: column;
  padding: 22px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 4px 10px 24px; }
.sidebar-brand .mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(155deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--navy-950); display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  box-shadow: 0 2px 6px rgba(168, 117, 25, 0.35); flex-shrink: 0;
}
.mark svg { width: 19px; height: 19px; }
.sidebar-brand .name { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; line-height: 1.15; color: #fff; }
.sidebar-brand .sub { font-size: 0.71rem; color: var(--on-navy-muted); margin-top: 1px; }

.nav-group-label { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.09em; color: var(--on-navy-muted); padding: 16px 12px 7px; font-weight: 600; }
.nav-link {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px;
  color: var(--on-navy-muted); text-decoration: none; font-size: 0.89rem; font-weight: 500; cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}
.nav-link:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.nav-link.active {
  background: linear-gradient(90deg, rgba(168, 117, 25, 0.22), rgba(168, 117, 25, 0.08));
  color: var(--gold-dark);
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--gold);
}
.nav-link svg { width: 17px; height: 17px; flex-shrink: 0; opacity: 0.85; }

.sidebar-footer { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.1); display: flex; flex-direction: column; gap: 6px; }
.sidebar-footer .btn-ghost { color: var(--on-navy-muted); }
.sidebar-footer .btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.08); color: #fff; }
/* Account-kaart onderaan de zijbalk: avatar + naam + "Mijn profiel", los van
   Uitloggen zodat die twee niet als gelijkwaardige acties oogen. */
.sidebar-account {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
  text-decoration: none; color: var(--on-navy); cursor: pointer; transition: background 0.14s ease;
}
.sidebar-account:hover, .sidebar-account.active { background: rgba(255, 255, 255, 0.06); }
.sidebar-account .avatar { width: 30px; height: 30px; font-size: 0.7rem; flex-shrink: 0; }
.sidebar-account-info { min-width: 0; line-height: 1.25; }
.sidebar-account-name { font-size: 0.85rem; font-weight: 600; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-account-label { font-size: 0.72rem; color: var(--on-navy-muted); }
.sidebar-signout { display: flex; align-items: center; gap: 8px; padding: 7px 10px; font-size: 0.8rem; opacity: 0.75; }
.sidebar-signout:hover { opacity: 1; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 30px; border-bottom: 1px solid var(--border); background: var(--surface);
  position: sticky; top: 0; z-index: 5; box-shadow: var(--shadow-sm);
}
.topbar-title h1 { font-size: 1.22rem; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(155deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.8rem;
  font-family: var(--font-display);
  box-shadow: 0 2px 6px rgba(12, 107, 69, 0.3);
}
.topbar-user { text-align: right; line-height: 1.25; }
.topbar-user .name { font-weight: 600; font-size: 0.87rem; }
.topbar-user .role { font-size: 0.72rem; color: var(--text-muted); }

.schoolyear-switcher { display: flex; align-items: center; gap: 6px; }
.schoolyear-switcher select { width: auto; padding: 6px 10px; font-size: 0.82rem; }
.archive-banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 30px; background: var(--warn-soft); color: var(--warn);
  font-size: 0.83rem; font-weight: 600; border-bottom: 1px solid var(--border);
}

.menu-toggle { display: none; }

.content { padding: 28px 30px 60px; max-width: 1180px; width: 100%; margin: 0 auto; }
.content-header { margin-bottom: 20px; }

/* --- cards / grid ---------------------------------------------------------*/
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 20px 22px; box-shadow: var(--shadow); min-width: 0;
}
.card + .card { margin-top: 16px; }
.card-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-row h2, .card-row h3 { margin: 0; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 17px 19px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--accent));
}
.stat-card .value { font-family: var(--font-display); font-variant-numeric: tabular-nums; font-size: 1.7rem; font-weight: 700; color: var(--navy-900); }
.stat-card .label { color: var(--text-muted); font-size: 0.81rem; margin-top: 3px; font-weight: 500; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* --- buttons ----------------------------------------------------------- */
.btn {
  font-family: var(--font-body); font-size: 0.86rem; font-weight: 600; border-radius: 9px;
  padding: 9px 16px; border: 1px solid transparent; cursor: pointer; display: inline-flex;
  align-items: center; gap: 6px; transition: filter 0.12s ease, background 0.12s ease, box-shadow 0.12s ease, transform 0.08s ease;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(155deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff; box-shadow: 0 1px 2px rgba(12, 107, 69, 0.2), 0 4px 10px -3px rgba(12, 107, 69, 0.35);
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.1); }
.btn-secondary { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-2); border-color: var(--gold); }
.btn-danger { background: var(--critical-soft); color: var(--critical); }
.btn-danger:hover:not(:disabled) { filter: brightness(0.97); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.btn-sm { padding: 5px 11px; font-size: 0.78rem; border-radius: 7px; }
.btn-block { width: 100%; justify-content: center; }

/* --- forms --------------------------------------------------------------*/
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 0.8rem; font-weight: 600; margin-bottom: 5px; color: var(--text); }
.field .hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }
input, select, textarea {
  width: 100%; font-family: var(--font-body); font-size: 0.9rem; padding: 9px 12px;
  border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft);
}
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; flex-shrink: 0; accent-color: var(--accent); }
textarea { resize: vertical; min-height: 70px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 15px; margin: 0 0 15px; background: var(--surface-2); }
legend { font-weight: 700; font-size: 0.85rem; padding: 0 7px; font-family: var(--font-display); }

/* --- table ----------------------------------------------------------------*/
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.87rem; }
th {
  text-align: left; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700;
  color: var(--text-muted); padding: 10px 12px; border-bottom: 2px solid var(--border); white-space: nowrap;
}
td { padding: 12px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.1s ease; }
tbody tr:hover { background: var(--surface-2); }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
th[data-sort] { cursor: pointer; user-select: none; }
th[data-sort]:hover { color: var(--text); }
th[data-sort].sort-asc::after { content: ' \25B2'; }
th[data-sort].sort-desc::after { content: ' \25BC'; }

/* Klassentabel: 4 inline-dropdowns + acties past niet allemaal op breedte met
   de standaard tabel-opmaak - dropdowns krijgen een maximale breedte met
   ellipsis (volledige waarde blijft zichtbaar via title-tooltip en in de
   opengeklapte lijst) zodat alle kolommen zonder scrollen passen. */
#classes-table td, #classes-table th { padding: 8px 6px; }
#classes-table select { max-width: 130px; text-overflow: ellipsis; }
#classes-table .btn-sm { padding: 4px 7px; font-size: 0.74rem; }

/* --- badges ---------------------------------------------------------------*/
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 0.71rem; font-weight: 700; letter-spacing: 0.01em; }
.badge--good { background: var(--good-soft); color: var(--good); }
.badge--warn { background: var(--warn-soft); color: var(--warn); }
.badge--critical { background: var(--critical-soft); color: var(--critical); }
.badge--neutral { background: var(--neutral-soft); color: var(--neutral); }
/* Sterker contrast dan .badge--good/--neutral voor "wel/niet beheerst"-
   overzichten (bijv. Koran-/Athkaar-voortgang bij ouders) - bewust een
   volle kleur i.p.v. een zachte tint, plus een vinkje, zodat het verschil
   ook zonder kleur (bijv. kleurenblindheid) duidelijk is. */
.badge--mastery-done { background: var(--good); color: #fff; font-weight: 700; }
.badge--mastery-pending { background: transparent; color: var(--text-muted); border: 1px dashed var(--border); font-weight: 500; }
/* Klikbare badges (bijv. Koran-/Athkaar-voortgang bewerken) - reset de
   standaard knopopmaak van de browser zodat een <button class="badge">
   er precies zo uitziet als een niet-klikbare <span class="badge">. */
button.badge { border: none; font: inherit; font-weight: 700; letter-spacing: 0.01em; appearance: none; -webkit-appearance: none; transition: transform 0.1s ease; }
button.badge:hover { transform: translateY(-1px); filter: brightness(0.97); }
button.badge.badge--mastery-pending { border: 1px dashed var(--border); }

/* --- tabs ------------------------------------------------------------------*/
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; flex-wrap: wrap; }
.tab {
  padding: 9px 14px; font-size: 0.86rem; font-weight: 600; color: var(--text-muted);
  border-bottom: 2px solid transparent; cursor: pointer; background: none; border-top: none; border-left: none; border-right: none;
}
.tab.active { color: var(--accent-dark); border-bottom-color: var(--gold); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* --- typeahead (bijv. ouder-zoekveld bij betalingen) -------------------------*/
.typeahead-suggestions {
  position: absolute; z-index: 20; top: 100%; left: 0; right: 0; margin-top: 2px;
  background: var(--surface, #fff); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 4px 16px rgba(13, 21, 38, 0.14); max-height: 220px; overflow-y: auto;
}
.typeahead-suggestions div { padding: 7px 10px; cursor: pointer; font-size: 0.92rem; }
.typeahead-suggestions div:hover { background: var(--surface-muted, #f1f3f7); }

/* --- empty state ------------------------------------------------------------*/
.empty-state { text-align: center; padding: 44px 20px; color: var(--text-muted); }
.empty-state .icon { font-size: 1.8rem; margin-bottom: 8px; }

/* --- modal ------------------------------------------------------------------*/
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(13, 21, 38, 0.55); backdrop-filter: blur(2px); display: none;
  align-items: center; justify-content: center; padding: 20px; z-index: 50;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--surface); border-radius: var(--radius-lg); padding: 24px; width: 100%;
  max-width: 480px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg);
}
.modal--wide { max-width: 760px; }
.detail-section { margin-bottom: 18px; }
.detail-section h4 { margin: 0 0 8px; font-size: 0.95rem; }
.detail-chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.modal-close { background: none; border: none; font-size: 1.2rem; color: var(--text-muted); cursor: pointer; line-height: 1; padding: 4px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

/* --- toast ------------------------------------------------------------------*/
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px);
  background: var(--navy-950); color: var(--on-navy); padding: 12px 20px; border-radius: 999px;
  font-size: 0.85rem; font-weight: 500; opacity: 0; pointer-events: none; transition: all 0.18s ease; z-index: 80; box-shadow: var(--shadow-lg);
}
.toast--visible { opacity: 1; transform: translate(-50%, 0); }
.toast--critical { background: var(--critical); color: #fff; }
.toast--good { background: var(--accent-dark); color: #fff; }

/* --- auth / public pages -----------------------------------------------------*/
.center-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background:
    radial-gradient(circle at 15% 10%, rgba(168, 117, 25, 0.08), transparent 45%),
    radial-gradient(circle at 85% 90%, rgba(12, 107, 69, 0.08), transparent 45%),
    var(--bg);
}
.auth-card { width: 100%; max-width: 380px; }
.auth-card .card { padding: 32px 30px; }
.brand-lockup { display: flex; align-items: center; gap: 11px; justify-content: center; margin-bottom: 24px; }
.brand-lockup .mark {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(155deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--navy-950); display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700;
  box-shadow: 0 3px 8px rgba(168, 117, 25, 0.35);
}
.brand-lockup .name { font-family: var(--font-display); font-weight: 700; font-size: 1.22rem; color: var(--navy-900); }

.config-warning { background: var(--critical-soft); color: var(--critical); text-align: center; padding: 9px; font-size: 0.8rem; font-weight: 600; }

.error-text { color: var(--critical); font-size: 0.83rem; margin-top: 10px; }

/* --- public marketing / inschrijven header -----------------------------------*/
.public-header { border-bottom: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm); }
.public-header-inner { max-width: 900px; margin: 0 auto; padding: 17px 24px; display: flex; align-items: center; justify-content: space-between; }
.public-header .brand-lockup { margin: 0; }
.public-header .brand-lockup .name { font-size: 1.08rem; }
.public-wrap { max-width: 760px; margin: 0 auto; padding: 44px 24px 74px; }

.lang-switcher {
  width: auto; padding: 5px 10px; font-size: 0.78rem; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
}
.lang-switcher-row { display: flex; justify-content: center; margin-bottom: 14px; }
.public-header .lang-switcher-row { margin: 0; }
.public-wrap h1 { font-size: 2.1rem; }
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 18px 0 26px; }
.course-option {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 15px; cursor: pointer;
  background: var(--surface); transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}
.course-option:hover { border-color: var(--gold); box-shadow: var(--shadow-sm); }
.course-option.selected { border-color: var(--gold); background: var(--gold-soft); box-shadow: var(--shadow-sm); }
.course-option .title { font-weight: 700; font-size: 0.89rem; margin-bottom: 3px; font-family: var(--font-display); }
.course-option .meta { font-size: 0.74rem; color: var(--text-muted); }

.helper-strip { display: flex; gap: 8px; align-items: flex-start; background: var(--accent-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 13px 15px; font-size: 0.82rem; color: var(--accent-dark); margin-bottom: 18px; }

@media (max-width: 880px) {
  .sidebar { position: fixed; left: -248px; top: 0; z-index: 40; transition: left 0.18s ease; box-shadow: var(--shadow-lg); }
  .sidebar.sidebar--open { left: 0; }
  .menu-toggle { display: inline-flex; }
  .content { padding: 18px; }
  .topbar { padding: 14px 18px; }
}

/* --- leerlingrapport (printbaar) ----------------------------------------------*/
.rapport-wrap { max-width: 760px; margin: 0 auto; padding: 24px 20px 60px; }
.rapport-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.rapport-sheet {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 40px 44px;
}
.rapport-header { display: flex; align-items: center; gap: 14px; border-bottom: 2px solid var(--gold); padding-bottom: 18px; margin-bottom: 22px; }
.rapport-header .mark {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(155deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--navy-950); display: flex; align-items: center; justify-content: center;
}
.rapport-school { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--navy-900); }
.rapport-title { font-size: 0.85rem; color: var(--text-muted); }
.rapport-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 24px; margin-bottom: 30px; }
.rapport-meta div { display: flex; justify-content: space-between; border-bottom: 1px dotted var(--border); padding-bottom: 4px; }
.rapport-meta span { color: var(--text-muted); font-size: 0.82rem; }
.rapport-meta strong { font-size: 0.88rem; }
.rapport-amount-box {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--gold-soft); border: 1px solid var(--gold); border-radius: 10px;
  padding: 16px 20px; margin-bottom: 24px;
}
.rapport-amount-box span { color: var(--navy-900); font-weight: 600; font-size: 0.9rem; }
.rapport-amount-box strong { font-family: var(--font-mono); font-size: 1.5rem; color: var(--navy-900); }
.rapport-sheet h2 { font-size: 1rem; margin: 26px 0 10px; font-family: var(--font-display); color: var(--navy-900); }
.rapport-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.rapport-table th, .rapport-table td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--border); }
.rapport-table th { color: var(--text-muted); font-weight: 600; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.03em; }
.rapport-empty { color: var(--text-muted); font-size: 0.85rem; }
.rapport-summary { font-weight: 600; margin-top: 8px; font-size: 0.88rem; }
.rapport-attendance-summary { display: flex; gap: 20px; flex-wrap: wrap; }
.rapport-stat { text-align: center; }
.rapport-stat strong { display: block; font-size: 1.4rem; font-family: var(--font-display); color: var(--navy-900); }
.rapport-stat span { font-size: 0.76rem; color: var(--text-muted); }
.rapport-signoff { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 34px; }
.rapport-signoff-col { border-top: 1px solid var(--border); padding-top: 8px; }
.rapport-signoff-col span { display: block; color: var(--text-muted); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 6px; }
.rapport-signoff-col strong { font-size: 0.9rem; }
.rapport-signoff-col img { max-width: 200px; max-height: 80px; display: block; }
.rapport-footer { margin-top: 40px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 0.74rem; color: var(--text-muted); }

@media print {
  .no-print, .sidebar, .topbar, .archive-banner { display: none !important; }
  body { background: #fff; }
  .rapport-wrap { max-width: none; padding: 0; }
  .rapport-sheet { border: none; box-shadow: none; padding: 0; }
  /* Meerdere sheets achter elkaar (bijv. alle diploma's van een klas in
     één afdruk) - elk op een eigen pagina. */
  .rapport-sheet + .rapport-sheet { page-break-before: always; }
}

/* --- QR-poster (inschrijfformulier, zie btn-print-qr-poster in
   dashboard-directeur.html) - onzichtbaar tot afdrukken; dan wordt de rest
   van de pagina verborgen zodat alleen de poster op papier komt. */
.qr-poster-print { display: none; }
.qr-poster-inner { text-align: center; padding: 60px; }
.qr-poster-inner h1 { font-size: 2.4rem; margin: 0 0 8px; }
.qr-poster-arabic { font-size: 1.6rem; direction: rtl; margin: 0 0 28px; }
.qr-poster-inner img { width: 380px; height: 380px; }
.qr-poster-url { font-size: 1.2rem; font-weight: 600; margin: 24px 0 4px; }
.qr-poster-sub { color: #555; margin: 0; }
@media print {
  body.printing-qr-poster > *:not(#qr-poster-print) { display: none !important; }
  body.printing-qr-poster { background: #fff; }
  body.printing-qr-poster .qr-poster-print {
    display: flex !important; position: fixed; inset: 0; align-items: center; justify-content: center;
  }
}

/* --- AI-schoolrapport als PDF (zie btn-pdf-ai-report in
   dashboard-directeur.html) - zelfde "verberg de rest, toon alleen dit"
   afdruktruc als de QR-poster hierboven. */
.ai-report-print { display: none; }
.ai-report-print-inner { max-width: 720px; margin: 0 auto; padding: 40px; }
.ai-report-print-inner h1 { font-size: 1.6rem; margin: 0 0 4px; }
.ai-report-print-period { color: #555; margin: 0 0 20px; }
.ai-report-print-content { white-space: pre-wrap; line-height: 1.6; font-size: 0.95rem; }
@media print {
  body.printing-ai-report > *:not(#ai-report-print) { display: none !important; }
  body.printing-ai-report { background: #fff; }
  body.printing-ai-report .ai-report-print { display: block !important; }
}

/* --- volledige do'a/athkaar-lijst als PDF (zie btn-pdf-dua-curriculum) --- */
.dua-print { display: none; }
.dua-print-inner { max-width: 720px; margin: 0 auto; padding: 40px; }
.dua-print-inner h1 { font-size: 1.6rem; margin: 0 0 20px; }
.dua-print-level-title { font-size: 1.05rem; font-weight: 700; margin: 22px 0 8px; border-bottom: 1px solid #ccc; padding-bottom: 4px; }
.dua-print-level-title:first-of-type { margin-top: 0; }
.dua-print-row { padding: 10px 0; border-bottom: 1px solid #eee; }
.dua-print-nl-title { margin: 0 0 4px; font-weight: 600; font-size: 0.9rem; }
.dua-print-arabic { margin: 0 0 4px; font-size: 1.1rem; line-height: 1.9; direction: rtl; text-align: right; }
.dua-print-source { margin: 0; color: #666; font-size: 0.74rem; }
@media print {
  body.printing-dua-curriculum > *:not(#dua-print) { display: none !important; }
  body.printing-dua-curriculum { background: #fff; }
  body.printing-dua-curriculum .dua-print { display: block !important; }
  .dua-print-level-title { page-break-after: avoid; }
  .dua-print-row { page-break-inside: avoid; }
}

/* --- hero / marketing secties (login + inschrijven) --------------------------- */
.split-screen { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }

.split-visual {
  background: linear-gradient(165deg, var(--navy-900) 0%, var(--navy-950) 100%);
  color: var(--on-navy); position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; padding: 64px 60px;
}
.split-visual::before {
  content: ''; position: absolute; inset: 0; opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Cpath d='M32 2 L62 32 L32 62 L2 32 Z' fill='none' stroke='%23e8b354' stroke-width='1' stroke-opacity='0.35'/%3E%3Cpath d='M32 2 L32 62 M2 32 L62 32' stroke='%23e8b354' stroke-width='0.6' stroke-opacity='0.18'/%3E%3C/svg%3E");
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 30% 30%, black, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 30% 30%, black, transparent 75%);
}
.split-visual > * { position: relative; }
.split-visual .mark-lg {
  width: 60px; height: 60px; border-radius: 16px; margin-bottom: 30px; flex-shrink: 0;
  background: linear-gradient(155deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--navy-950); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(168, 117, 25, 0.4);
}
.split-visual .mark-lg svg { width: 32px; height: 32px; }
.split-visual .eyebrow { color: var(--gold-dark); font-size: 0.76rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 12px; }
.split-visual h2 { color: #fff; font-size: 2.15rem; max-width: 420px; margin-bottom: 14px; }
.split-visual p.lede { color: var(--on-navy-muted); font-size: 1rem; max-width: 400px; margin-bottom: 32px; }
@media (max-width: 900px) { .split-screen { grid-template-columns: 1fr; } .split-visual { display: none; } }
.cta-pill {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  background: linear-gradient(155deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--navy-950); font-weight: 700; font-family: var(--font-body); font-size: 0.92rem;
  padding: 12px 22px; border-radius: 999px; text-decoration: none;
  box-shadow: 0 4px 14px rgba(168, 117, 25, 0.35); transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cta-pill:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(168, 117, 25, 0.45); }
.split-form {
  display: flex; align-items: center; justify-content: center; padding: 40px 24px;
  background:
    radial-gradient(circle at 85% 10%, rgba(168, 117, 25, 0.08), transparent 45%),
    var(--bg);
}

/* mobiele "nieuw hier"-banner (alleen zichtbaar als de split-visual verborgen is) */
.mobile-enroll-banner { display: none; }
@media (max-width: 900px) {
  .mobile-enroll-banner {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    background: linear-gradient(155deg, var(--navy-900) 0%, var(--navy-950) 100%);
    color: #fff; border-radius: var(--radius-lg); padding: 18px 20px; margin: 0 auto 20px; max-width: 380px;
  }
  .mobile-enroll-banner span { font-size: 0.86rem; color: var(--on-navy-muted); }
}

/* inschrijf-hero */
.enroll-hero {
  background: linear-gradient(165deg, var(--navy-900) 0%, var(--navy-950) 100%);
  color: var(--on-navy); border-radius: var(--radius-lg); padding: 46px 42px; margin-bottom: 28px;
  position: relative; overflow: hidden;
}
.enroll-hero::before {
  content: ''; position: absolute; inset: 0; opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Cpath d='M32 2 L62 32 L32 62 L2 32 Z' fill='none' stroke='%23e8b354' stroke-width='1' stroke-opacity='0.35'/%3E%3Cpath d='M32 2 L32 62 M2 32 L62 32' stroke='%23e8b354' stroke-width='0.6' stroke-opacity='0.18'/%3E%3C/svg%3E");
  background-size: 64px 64px;
  mask-image: linear-gradient(120deg, black, transparent 80%);
  -webkit-mask-image: linear-gradient(120deg, black, transparent 80%);
}
.enroll-hero > * { position: relative; }
.enroll-hero .eyebrow { display: inline-block; color: var(--gold-dark); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; margin-bottom: 10px; }
.enroll-hero h1 { color: #fff; font-size: 2.05rem; margin-bottom: 10px; }
.enroll-hero p { color: var(--on-navy-muted); max-width: 560px; font-size: 0.96rem; margin-bottom: 0; }
.enroll-hero .chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.enroll-hero .chip {
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(217, 169, 74, 0.35); color: #fff;
  padding: 6px 14px; border-radius: 999px; font-size: 0.78rem; font-weight: 600;
}

.steps-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0 0 32px; }
@media (max-width: 700px) { .steps-row { grid-template-columns: 1fr; } }
.step-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 17px 18px; }
.step-card .num {
  width: 26px; height: 26px; border-radius: 50%; background: var(--gold-soft); color: var(--gold-dark);
  display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: 0.85rem; margin-bottom: 10px;
}
.step-card h3 { font-size: 0.88rem; margin-bottom: 3px; }
.step-card p { font-size: 0.79rem; margin: 0; }

/* foto's (algemene galerij) */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.photo-item { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 1 / 1; background: var(--surface-2); cursor: pointer; }
.photo-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-item .photo-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 8px; font-size: 0.72rem; color: #fff; background: linear-gradient(to top, rgba(0,0,0,0.65), transparent); }
.photo-item .photo-delete { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,0.55); color: #fff; border: none; border-radius: 6px; padding: 3px 7px; font-size: 0.72rem; cursor: pointer; }
.photo-lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 24px; }
.photo-lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }
.photo-lightbox[hidden] { display: none; }
