:root {
  /* Basis */
  --paper: #FBF5EE;
  --surface: #FFFFFF;
  --sunken: #F3E9DD;
  --ink: #2C2521;
  --ink-soft: #7C6B5E;
  --line: #EADDCE;

  /* Signaal */
  --moss: #3B7A5A;
  --honey: #C87A1E;
  --berry: #A8443A;
  --stage: #2C4034;
  --stage-ink: #F3E9DD;

  /* Vorm */
  --r-pill: 999px;
  --r-surface: 20px;
  --r-control: 12px;

  /* Schaduw (altijd warm getint, nooit grijs/blauw) */
  --shadow-rest: 0 1px 2px rgba(44, 33, 20, 0.05), 0 10px 24px -14px rgba(89, 62, 34, 0.35);
  --shadow-deep: 0 -16px 40px -12px rgba(20, 14, 8, 0.5);

  /* Beweging */
  --dur-color: 140ms;
  --dur-slide: 240ms;
}

:root[data-theme="dark"] {
  --paper: #211B16;
  --surface: #2C241E;
  --sunken: #3A2F26;
  --ink: #F3E9DD;
  --ink-soft: #B9A996;
  --line: #4A3D32;

  --moss: #8FD3AB;
  --honey: #EDAA55;
  --berry: #E08A7C;
  /* --stage blijft in beide thema's hetzelfde */
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background:
    radial-gradient(1100px 700px at -8% -12%, rgba(255, 255, 255, 0.6), transparent 55%),
    var(--paper);
  color: var(--ink);
  transition: background-color var(--dur-color) ease, color var(--dur-color) ease;
}

:root[data-theme="dark"] body {
  background:
    radial-gradient(1100px 700px at -8% -12%, rgba(200, 122, 30, 0.08), transparent 55%),
    var(--paper);
}

.screen { min-height: 100vh; }

h1, h2 {
  font-family: "Fraunces", "Iowan Old Style", "Georgia", serif;
  font-weight: 600;
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--moss);
  outline-offset: 3px;
}

/* Merk (logo + naam), gebruikt op login en in de header */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}
.brand-name { font-size: 1.3rem; }
.brand-logo { display: block; height: 24px; width: auto; }
.brand-logo-dark { display: none; }
:root[data-theme="dark"] .brand-logo-light { display: none; }
:root[data-theme="dark"] .brand-logo-dark { display: block; }

/* Login */
#login-screen { padding: 24px; }
#login-screen:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-surface);
  box-shadow: var(--shadow-rest);
  padding: 40px 32px;
  max-width: 380px;
  width: 100%;
  text-align: center;
}
.login-box .brand { justify-content: center; margin-bottom: 8px; }
.login-box p { color: var(--ink-soft); font-size: 0.95rem; margin: 8px 0 24px; }
.login-box .field { margin-bottom: 12px; }
.login-box .btn-primary { width: 100%; margin-top: 8px; }

/* Buttons */
.btn {
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--r-pill);
  min-height: 44px;
  padding: 0 20px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--dur-color) ease, color var(--dur-color) ease, box-shadow var(--dur-color) ease;
}
/* [hidden] wint niet van een auteursregel met gelijke specificiteit: display
   mag daarom alleen gezet worden als het element niet hidden is. */
.btn:not([hidden]) { display: inline-flex; }
.btn-primary { background: var(--moss); color: #fff; }
.btn-primary:hover { background: color-mix(in srgb, var(--moss) 85%, black); }
.btn-ghost { background: transparent; color: var(--ink-soft); padding: 0 16px; }
.btn-ghost:hover { background: var(--sunken); color: var(--ink); }
.btn.small { min-height: 44px; padding: 0 14px; font-size: 0.82rem; font-weight: 500; }
.btn-icon { min-width: 44px; padding: 0; }

.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: inline-flex; }

.error-text { color: var(--berry); font-size: 0.9rem; margin-top: 12px; }
.info-text { color: var(--ink-soft); font-size: 0.9rem; margin-top: 12px; }
#forgot-password-btn { display: block; margin: 12px auto 0; }

/* App shell */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.header-actions { display: flex; align-items: center; gap: 4px; }

#app-screen { display: flex; flex-direction: column; }
.app-header { flex-shrink: 0; }

.app-body {
  display: flex;
  align-items: flex-start;
  flex: 1;
  min-height: 0;
}

.sidebar {
  flex-shrink: 0;
  width: 240px;
  padding: 24px 16px;
  border-right: 1px solid var(--line);
  background: var(--surface);
  position: sticky;
  top: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
}

.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  border: none;
  background: transparent;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  color: var(--ink-soft);
  transition: color var(--dur-color) ease, background-color var(--dur-color) ease;
}
.nav-item:hover { background: var(--sunken); color: var(--ink); }
.nav-item.active { background: hsl(150 30% 92%); color: var(--moss); font-weight: 700; }
:root[data-theme="dark"] .nav-item.active { background: hsl(150 25% 24%); }
.nav-icon { width: 20px; height: 20px; flex-shrink: 0; }

.main-content { flex: 1; min-width: 0; }

.tab-panel { display: none; padding: 24px; max-width: 1040px; margin: 0 auto; }
.tab-panel.active { display: block; }
#attendance-tab { max-width: none; }

@media (max-width: 780px) {
  .app-body { flex-direction: column; }
  .sidebar {
    width: 100%;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 12px 16px;
  }
  .nav-list { flex-direction: row; overflow-x: auto; }
  .nav-item { flex-shrink: 0; }
}

/* Zoeken: Bereik-filter naast de resultaten */
.search-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 640px) {
  .search-layout { grid-template-columns: 1fr; }
}
.scope-panel h2 { font-size: 1.05rem; margin: 0 0 12px; }
.scope-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.scope-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  cursor: pointer;
  color: var(--ink);
  transition: background-color var(--dur-color) ease, color var(--dur-color) ease;
}
.scope-item:hover { background: var(--sunken); }
.scope-item.active { background: var(--moss); color: #fff; }
.scope-count { font-size: 0.85rem; color: var(--ink-soft); }
.scope-item.active .scope-count { color: rgba(255, 255, 255, 0.85); }

/* Aanwezigheid: placeholder tot de functie gebouwd wordt */
.placeholder-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-surface);
  box-shadow: var(--shadow-rest);
  padding: 40px;
  text-align: center;
  color: var(--ink-soft);
}
.placeholder-panel h2 { margin: 0 0 8px; }

/* Velden */
.field {
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  transition: border-color var(--dur-color) ease;
}
.field::placeholder { color: var(--ink-soft); }
.field:focus { border-color: var(--moss); }
.note-text { min-height: 100px; padding-top: 12px; resize: vertical; }

.meta-text { color: var(--ink-soft); font-size: 0.85rem; margin: 12px 0; }

/* Zoekresultaten */
.result-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  overflow: hidden;
  box-shadow: var(--shadow-rest);
}
.result-list:empty { border: none; box-shadow: none; }
.result-list.small { max-height: 480px; overflow-y: auto; }

.result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  border-left: 4px solid hsl(var(--hue, 140) 45% 70%);
  cursor: pointer;
  background: var(--surface);
  transition: background-color var(--dur-color) ease;
}
.result-item:last-child { border-bottom: none; }
.result-item:hover { background: var(--sunken); }
.result-item-content { flex: 1; min-width: 0; }
.result-play-btn {
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  border: none;
  border-radius: var(--r-pill);
  background: var(--moss);
  color: #fff;
  cursor: pointer;
  transition: background-color var(--dur-color) ease;
}
.result-play-btn:not([hidden]) { display: inline-flex; }
.result-play-btn:hover { background: color-mix(in srgb, var(--moss) 85%, black); }
.result-play-btn svg { width: 16px; height: 16px; }
.result-chip {
  display: inline-block;
  padding: 2px 10px;
  margin-bottom: 6px;
  border-radius: var(--r-pill);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: hsl(var(--hue, 140) 55% 92%);
  color: hsl(var(--hue, 140) 45% 30%);
}
:root[data-theme="dark"] .result-chip {
  background: hsl(var(--hue, 140) 35% 24%);
  color: hsl(var(--hue, 140) 55% 80%);
}
:root[data-theme="dark"] .result-item { border-left-color: hsl(var(--hue, 140) 40% 42%); }
.result-breadcrumb { font-size: 0.8rem; color: var(--ink-soft); }
.result-title { font-weight: 600; }
.result-empty { padding: 12px 16px; color: var(--ink-soft); }

/* Notities layout */
.notes-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
}
@media (max-width: 640px) {
  .notes-layout { grid-template-columns: 1fr; }
}

.student-panel h2, .notes-panel h2 { font-size: 1.05rem; margin: 0 0 12px; }
#notes-heading { display: flex; align-items: center; gap: 12px; font-size: 1.4rem; }

.student-year-field { max-width: 100px; }

/* Studenten-pagina: beheer (CRUD) */
.students-header { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.students-header-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.pill-toggle-btn {
  border: none;
  background: var(--sunken);
  color: var(--ink-soft);
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--r-pill);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--dur-color) ease, color var(--dur-color) ease;
}
.pill-toggle-btn:hover { color: var(--ink); }
.pill-toggle-btn.active { background: var(--moss); color: #fff; }
.students-view-toggle { display: flex; gap: 8px; }

#students-tab { max-width: 640px; }
.students-search-field { margin-bottom: 16px; }
.students-year-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

.student-list-page { gap: 12px; }
.student-card {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
  padding: 14px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-surface);
  box-shadow: var(--shadow-rest);
}
.student-card-info { display: flex; flex-direction: column; gap: 4px; min-width: 120px; flex: 1 1 160px; }
.student-year-badge {
  align-self: flex-start;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-soft);
  background: var(--sunken);
  padding: 2px 10px;
  border-radius: var(--r-pill);
}
.student-card-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.student-year-stepper { display: flex; align-items: center; gap: 4px; }
.student-card-edit-form { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 260px; }

.btn-danger { color: var(--berry); }
.btn-danger:hover { background: hsl(6 45% 92%); color: var(--berry); }
:root[data-theme="dark"] .btn-danger:hover { background: hsl(6 35% 26%); }
.btn-danger.confirm { background: var(--berry); color: #fff; }
.btn-danger.confirm:hover { background: color-mix(in srgb, var(--berry) 85%, black); color: #fff; }

/* Dialoog: student toevoegen */
.field-label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); margin: 0 0 4px; }
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44, 33, 20, 0.45);
  padding: 24px;
  z-index: 200;
}
/* [hidden] heeft dezelfde specificiteit als .modal-overlay maar wint niet van
   een auteursregel; zonder deze regel blijft display:flex ook zichtbaar. */
.modal-overlay:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: center;
}
:root[data-theme="dark"] .modal-overlay { background: rgba(10, 7, 4, 0.6); }
.modal-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-surface);
  box-shadow: var(--shadow-rest);
  padding: 28px;
  max-width: 360px;
  width: 100%;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}
.modal-card-wide { max-width: 640px; }
.modal-card h2 { margin: 0 0 16px; font-size: 1.2rem; }
.modal-card .field { margin-bottom: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.modal-actions-split { justify-content: space-between; align-items: center; flex-wrap: wrap; }
.modal-actions-buttons { display: flex; gap: 8px; }

.student-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.student-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 16px 6px 6px;
  border-radius: var(--r-pill);
  cursor: pointer;
  color: var(--ink);
  transition: background-color var(--dur-color) ease, color var(--dur-color) ease;
}
.student-item:hover { background: var(--sunken); }
.student-item.active { background: var(--moss); color: #fff; }
.student-item.active .avatar { background: rgba(255, 255, 255, 0.28); color: #fff; }

.avatar {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-pill);
  background: hsl(var(--hue, 140) 55% 88%);
  color: hsl(var(--hue, 140) 45% 30%);
  font-size: 0.78rem;
  font-weight: 700;
}
:root[data-theme="dark"] .avatar {
  background: hsl(var(--hue, 140) 35% 26%);
  color: hsl(var(--hue, 140) 55% 82%);
}
.avatar-lg { width: 48px; height: 48px; font-size: 1.05rem; }

.note-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-surface);
  box-shadow: var(--shadow-rest);
  padding: 20px;
  margin-bottom: 24px;
}
.note-draft-rows { display: flex; flex-direction: column; gap: 20px; }
.note-draft-row { display: flex; flex-direction: column; gap: 10px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.note-draft-row:last-child { border-bottom: none; padding-bottom: 0; }
.remove-note-row-btn { align-self: flex-end; color: var(--ink-soft); }

.note-form-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}
.note-form-footer #add-note-btn { margin-left: auto; }
.linked-exercise {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 8px 8px 16px;
  background: hsl(150 30% 92%);
  color: hsl(150 35% 26%);
  border-radius: var(--r-pill);
  font-size: 0.9rem;
  font-weight: 500;
}
:root[data-theme="dark"] .linked-exercise { background: hsl(150 25% 24%); color: hsl(150 45% 82%); }
.linked-exercise:not([hidden]) { display: flex; }

.notes-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.note-item {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-surface);
  background: var(--surface);
  box-shadow: var(--shadow-rest);
}
.note-item-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.note-date { font-weight: 700; color: var(--moss); }
.note-entry-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.note-entry {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 16px;
}
.note-entry:not(:first-child) { padding-top: 12px; border-top: 1px solid var(--line); }
.note-text-display { flex: 1; min-width: 160px; white-space: pre-wrap; }
.note-entry .note-linked-exercise { margin-left: auto; }
.note-linked-exercise {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  min-height: 44px;
  padding: 0 16px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--moss);
  background: hsl(150 30% 92%);
  border: none;
  border-radius: var(--r-pill);
  cursor: pointer;
  font-family: inherit;
  transition: background-color var(--dur-color) ease;
}
:root[data-theme="dark"] .note-linked-exercise { background: hsl(150 25% 24%); }
.note-linked-exercise:hover { background: hsl(150 30% 86%); }
:root[data-theme="dark"] .note-linked-exercise:hover { background: hsl(150 25% 30%); }
.note-item-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }

/* Spelerbalk — het enige donkere vlak in het lichte thema */
.player-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  background: var(--stage);
  color: var(--stage-ink);
  box-shadow: var(--shadow-deep);
  transform: translateY(100%);
  transition: transform var(--dur-slide) ease;
}
.player-panel.open { transform: translateY(0); }
.player-panel-inner { width: 100%; }
.player-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 12px 20px;
}
.player-live-dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: var(--r-pill);
  background: var(--honey);
  box-shadow: 0 0 0 4px hsl(32 70% 50% / 0.18), 0 0 10px 2px hsl(32 70% 55% / 0.65);
}
.player-title {
  font-weight: 600;
  font-size: 0.9rem;
  flex: 0 1 auto;
  min-width: 160px;
}

.player-audio { flex: 1 1 260px; min-width: 260px; height: 40px; }
.player-audio:not([hidden]) { display: block; }

.player-panel .btn-ghost { color: var(--stage-ink); opacity: 0.8; }
.player-panel .btn-ghost:hover { background: rgba(255, 255, 255, 0.12); color: var(--stage-ink); opacity: 1; }

.player-frame { width: 100%; border: none; }
.player-frame:not([hidden]) {
  display: block;
  height: min(38vh, 300px);
}

/* Ruimte reserveren zodat pagina-inhoud niet achter de speelbalk verdwijnt */
#app-screen.player-open-audio .tab-panel { padding-bottom: 84px; }
#app-screen.player-open-frame .tab-panel { padding-bottom: min(38vh, 300px); }

@media (max-width: 600px) {
  .player-frame { height: 45vh; }
  #app-screen.player-open-frame .tab-panel { padding-bottom: 45vh; }
}

/* Aanwezigheid */
.attendance-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.attendance-view-toggle { display: flex; gap: 4px; }
.attendance-view-btn {
  background: var(--surface);
  color: var(--ink-soft);
  border: 1px solid var(--line);
}
.attendance-view-btn:hover { background: var(--sunken); color: var(--ink); }
.attendance-view-btn.active { background: var(--moss); color: #fff; border-color: var(--moss); }

.attendance-student-view:not([hidden]) {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
}
.attendance-detail-panel { min-width: 0; }
@media (max-width: 640px) {
  .attendance-student-view:not([hidden]) { grid-template-columns: 1fr; }
  .attendance-week-switcher-label { min-width: 0; }
}

.attendance-detail-heading { display: flex; align-items: center; gap: 12px; font-size: 1.4rem; margin: 0 0 12px; }

.attendance-week-editor {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-surface);
  box-shadow: var(--shadow-rest);
  padding: 20px;
  margin-bottom: 24px;
}
.attendance-week-switcher { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.attendance-week-switcher-label { min-width: 220px; text-align: center; font-weight: 700; }
.attendance-status-row, .attendance-reason-row { display: flex; flex-wrap: wrap; gap: 8px; }
.attendance-reason-row { margin-top: 12px; }
.attendance-reason-text { margin-top: 12px; }

.attendance-status-btn {
  background: var(--surface);
  color: var(--ink-soft);
  border: 1px solid var(--line);
}
.attendance-status-btn:hover { background: var(--sunken); color: var(--ink); }
.attendance-status-btn.status-aanwezig.active { background: var(--moss); color: #fff; border-color: var(--moss); }
.attendance-status-btn.status-afwezig.active { background: var(--berry); color: #fff; border-color: var(--berry); }
.attendance-status-btn.status-deels.active {
  background: var(--sunken);
  color: var(--ink);
  border: 2px solid var(--ink-soft);
  font-weight: 700;
}

.attendance-reason-btn.active { background: var(--sunken); color: var(--ink); font-weight: 700; }

.attendance-matrix-view {
  border: 1px solid var(--line);
  border-radius: var(--r-surface);
  background: var(--surface);
  box-shadow: var(--shadow-rest);
  overflow: hidden;
}
.attendance-matrix-scroll { overflow-x: auto; max-width: 100%; }
.attendance-matrix-table { border-collapse: collapse; width: max-content; min-width: 100%; }
.attendance-matrix-table th, .attendance-matrix-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px;
  text-align: center;
}
.attendance-matrix-table thead th {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-soft);
  white-space: nowrap;
  padding: 12px 8px;
}
.attendance-matrix-table th:first-child, .attendance-matrix-table td:first-child {
  position: sticky;
  left: 0;
  background: var(--surface);
  text-align: left;
  z-index: 1;
}
.attendance-matrix-name { display: flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; min-width: 200px; white-space: nowrap; }
.attendance-matrix-cell {
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color var(--dur-color) ease;
}
.attendance-matrix-cell.status-aanwezig { background: var(--moss); color: #fff; border-color: var(--moss); }
.attendance-matrix-cell.status-afwezig { background: var(--berry); color: #fff; border-color: var(--berry); }
.attendance-matrix-cell.status-deels { background: var(--sunken); color: var(--ink); border: 2px solid var(--ink-soft); }
.attendance-matrix-cell.status-empty:hover { background: var(--sunken); }
