/* ==========================================================================
   Registratiesysteem — stijl
   Rustig, professioneel "petrol/teal" schoolthema. Systeemlettertypen zodat
   het ook offline op een lokale (school)server betrouwbaar werkt.
   ========================================================================== */

/* Garandeert dat het HTML-attribuut [hidden] altijd wint van class-gebaseerde
   display-regels (bv. .help-btn { display:inline-grid }), zodat verbergen via
   JavaScript (el.hidden = true) nooit per ongeluk zichtbaar kan blijven. */
[hidden] { display: none !important; }

:root {
  --bg:        #eef2f5;
  --surface:   #ffffff;
  --surface-2: #f6f9fa;
  --ink:       #142a31;
  --ink-soft:  #5a6e76;
  --ink-faint: #8a9aa1;
  --line:      #dde6ea;
  --line-2:    #eaeff2;

  --brand:     #0d5c63;
  --brand-700: #0a4a50;
  --brand-300: #5bb1b6;
  --brand-50:  #e6f1f1;
  --accent:    #d4703a;          /* spaarzaam: logo + actieve stap        */

  --st-aangeboden: #2563eb;
  --st-oefenen:    #b9760a;
  --st-beheerst:   #15803d;
  --danger:        #c0392b;
  --danger-bg:     #fbecea;

  --radius:    14px;
  --radius-sm: 10px;
  --shadow:    0 1px 2px rgba(20,42,49,.06), 0 8px 24px rgba(20,42,49,.07);
  --shadow-sm: 0 1px 2px rgba(20,42,49,.08);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 480px at 85% -10%, #e3eef0 0%, transparent 60%),
    var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---- Topbalk ------------------------------------------------------------ */
.topbar {
  background: var(--brand);
  color: #eaf6f6;
  border-bottom: 3px solid var(--brand-700);
}
.topbar__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand__mark {
  width: 40px; height: 40px; border-radius: 11px;
  background: #fff; overflow: hidden;
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
}
.brand__mark img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__title { font-weight: 700; font-size: 1.04rem; letter-spacing: .2px; }
.brand__sub { font-size: .76rem; color: #bfe0e0; letter-spacing: .3px; }
.topbar__spacer { flex: 1; }
.topbar__link {
  color: #eaf6f6; text-decoration: none; font-weight: 600; font-size: .9rem;
  padding: 8px 14px; border-radius: 9px; border: 1px solid rgba(255,255,255,.28);
  display: inline-flex; align-items: center; gap: 7px; transition: background .15s;
}
.topbar__link:hover { background: rgba(255,255,255,.12); }

/* Ronde ?-helpknop */
.help-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px;
  border-radius: 50%; cursor: pointer; font: inherit; font-weight: 800; font-size: 1.02rem;
  color: #eaf6f6; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.4);
  transition: background .15s; text-decoration: none;
}
.help-btn:hover { background: rgba(255,255,255,.2); }
.help-btn:focus-visible { outline: 3px solid rgba(255,255,255,.6); outline-offset: 2px; }
.help-btn[hidden] { display: none !important; }

/* Inhoud van het help-venster */
.help { color: var(--ink); }
.help__lead { font-weight: 500; margin: 0 0 6px; }
.help h3 { font-size: 1rem; color: var(--brand); margin: 18px 0 6px; }
.help p { margin: 0 0 8px; }
.help ul { margin: 0 0 8px; padding-left: 20px; }
.help li { margin-bottom: 5px; }
.help-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: middle; margin-right: 3px; }
.help-dot--rood { background: #e0352b; }
.help-dot--oranje { background: #f59e0b; }
.help-dot--groen { background: #16a34a; }

/* ---- Pagina-omhulsel ---------------------------------------------------- */
.page { flex: 1; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 26px 22px 40px; }

/* ---- Stepper (signatuurelement) ---------------------------------------- */
.stepper {
  display: flex; align-items: flex-start; gap: 0;
  margin: 6px 0 26px;
}
.step {
  flex: 1; position: relative;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 8px;
  background: none; border: 0; cursor: default; font: inherit; color: inherit;
  padding: 0;
}
.step.is-clickable { cursor: pointer; }
.step::before, .step::after {
  content: ""; position: absolute; top: 17px; height: 2px; background: var(--line);
  width: 50%;
}
.step::before { left: 0; }
.step::after { right: 0; }
.step:first-child::before, .step:last-child::after { display: none; }
.step.is-done::before, .step.is-done::after,
.step.is-active::before { background: var(--brand-300); }
.step__dot {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--line);
  display: grid; place-items: center; font-weight: 700; color: var(--ink-faint);
  position: relative; z-index: 1; transition: .18s;
}
.step.is-done .step__dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.step.is-active .step__dot {
  background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: 0 0 0 5px rgba(212,112,58,.16);
}
.step__label { font-size: .76rem; font-weight: 600; color: var(--ink-soft); letter-spacing: .2px; }
.step.is-active .step__label { color: var(--ink); }
.step__value {
  font-size: .82rem; font-weight: 600; color: var(--brand);
  max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---- Moduskeuze (segmented control) ------------------------------------ */
.segmented {
  display: inline-flex; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 4px; gap: 4px; box-shadow: var(--shadow-sm); margin-bottom: 20px;
}
.seg {
  font: inherit; font-weight: 600; font-size: .9rem; color: var(--ink-soft);
  background: none; border: 0; padding: 9px 18px; border-radius: 9px; cursor: pointer; transition: .14s;
}
.seg:hover { color: var(--ink); }
.seg.is-on { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }

/* ---- Panelen ------------------------------------------------------------ */
.panel { display: none; animation: rise .22s ease; }
.panel.is-active { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.panel__head { margin-bottom: 16px; }
.panel__eyebrow {
  font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 4px;
}
.panel__title { font-size: 1.5rem; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.panel__hint { color: var(--ink-soft); margin: 4px 0 0; font-size: .94rem; }

/* ---- Keuze-tegels ------------------------------------------------------- */
.tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.tile {
  text-align: left; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 18px 16px; cursor: pointer;
  box-shadow: var(--shadow-sm); transition: transform .14s, box-shadow .14s, border-color .14s;
  font: inherit; color: inherit; display: flex; flex-direction: column; gap: 6px;
}
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--brand-300); }
.tile:focus-visible { outline: 3px solid var(--brand-300); outline-offset: 2px; }

/* Pastelkleuren per groepsnaam (eerste cijfer) */
.tile--blauw  { background: #dbeafe; border-color: #93c5fd; }
.tile--geel   { background: #fef9c3; border-color: #fde047; }
.tile--rood   { background: #fee2e2; border-color: #fca5a5; }
.tile--groen  { background: #dcfce7; border-color: #86efac; }
.tile--paars  { background: #ede9fe; border-color: #c4b5fd; }
.tile--mint   { background: #ccfbf1; border-color: #5eead4; }
.tile--blauw:hover  { border-color: #60a5fa; }
.tile--geel:hover   { border-color: #facc15; }
.tile--rood:hover   { border-color: #f87171; }
.tile--groen:hover  { border-color: #4ade80; }
.tile--paars:hover  { border-color: #a78bfa; }
.tile--mint:hover   { border-color: #2dd4bf; }
.tile__name { font-weight: 700; font-size: 1.05rem; }
.tile__meta { color: var(--ink-soft); font-size: .85rem; }
.tile__chev { color: var(--brand-300); align-self: flex-end; margin-top: auto; font-size: 1.1rem; }

/* ---- Lege staat --------------------------------------------------------- */
.empty {
  text-align: center; padding: 44px 20px; color: var(--ink-soft);
  background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius);
}
.empty__title { font-weight: 700; color: var(--ink); margin-bottom: 6px; }

/* ---- Registratiescherm -------------------------------------------------- */
.reg-summary {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px; margin-bottom: 18px; box-shadow: var(--shadow-sm);
}
.reg-summary__progress { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.progress { width: 160px; height: 9px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.progress__bar { height: 100%; background: var(--st-beheerst); width: 0%; transition: width .4s; }
.progress__label { font-size: .85rem; color: var(--ink-soft); font-weight: 600; }

.deeldoel-list { display: flex; flex-direction: column; gap: 10px; }
.dd {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow-sm);
  display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; align-items: center;
}
.dd__main { min-width: 0; }
.dd__name { font-weight: 600; }
.dd__sub { font-size: .8rem; color: var(--ink-faint); margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap; }
.dd__sub a { color: var(--brand); cursor: pointer; text-decoration: underline; }
.dd__actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* Subdoelen (uitklapbaar onder een deeldoel) */
.dd .subpanel { grid-column: 1 / -1; }
.subpanel__inner {
  margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line);
  display: flex; flex-direction: column; gap: 8px;
}
.dd__sub a[data-subtoggle] { color: var(--brand); cursor: pointer; text-decoration: none; font-weight: 600; }
.dd__sub a[data-subtoggle]:hover { text-decoration: underline; }
.sub {
  display: flex; align-items: center; gap: 12px;
  padding: 6px 4px 6px 16px; border-left: 3px solid var(--line); border-radius: 0 6px 6px 0;
  background: var(--surface-2);
}
.sub__name { flex: 1; min-width: 0; font-size: .9rem; }

/* ---- Sorteervinkje / checkbox ------------------------------------------ */
.sortbar {
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: 99px;
  padding: 8px 16px; font-size: .88rem; font-weight: 600; color: var(--ink);
  margin-bottom: 16px; box-shadow: var(--shadow-sm); user-select: none;
}
.sortbar input { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }
.sortbar__hint { color: var(--ink-faint); font-weight: 500; }
.check {
  display: flex; align-items: center; gap: 9px; cursor: pointer;
  font-size: .9rem; font-weight: 600; color: var(--ink); user-select: none;
}
.check input { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }

/* ---- Leerling-informatie (uitbreidbaar tekstvak) ----------------------- */
.info-card {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand-300);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 18px; box-shadow: var(--shadow-sm);
}
.info-card__head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.info-card__title { font-weight: 700; font-size: .95rem; }
.info-card__toggle { display: flex; align-items: center; gap: 8px; cursor: pointer; flex: 1; }
.info-card__toggle input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; flex: none; }
.info-card__status { margin-left: auto; font-size: .8rem; color: var(--st-beheerst); font-weight: 600; }
.info-area {
  width: 100%; font: inherit; font-size: .92rem; line-height: 1.5;
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px;
  background: var(--surface-2); resize: vertical; min-height: 46px; overflow: hidden;
}
.info-area:focus { outline: 2px solid var(--brand-300); outline-offset: 1px; background: #fff; }
.info-card__foot { display: flex; justify-content: flex-end; margin-top: 8px; }

/* ---- Stoplicht-bolletjes (status) -------------------------------------- */
.dots { display: inline-flex; gap: 9px; align-items: center; }
.dot {
  width: 28px; height: 28px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  position: relative; transition: transform .14s, opacity .14s, filter .14s, box-shadow .14s;
  opacity: .28; filter: blur(1.1px) grayscale(.35);
}
.dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
}
.dot--rood   { background: #e0352b; }
.dot--oranje { background: #f59e0b; }
.dot--groen  { background: #16a34a; }
.dot:hover { opacity: .6; filter: none; transform: scale(1.06); }
.dot:focus-visible { outline: 3px solid var(--brand-300); outline-offset: 2px; opacity: .9; filter: none; }
.dot.is-on {
  opacity: 1; filter: none; transform: scale(1.12);
  box-shadow: 0 2px 6px rgba(0,0,0,.22), 0 0 0 3px rgba(255,255,255,.9), 0 0 0 4px rgba(0,0,0,.06);
}

/* Legenda bij de bolletjes */
.legend { display: inline-flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: .8rem; color: var(--ink-soft); }
.legend__item { display: inline-flex; gap: 6px; align-items: center; }
.legend__dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.legend__dot--rood { background: #e0352b; }
.legend__dot--oranje { background: #f59e0b; }
.legend__dot--groen { background: #16a34a; }
.icon-btn {
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-soft);
  border-radius: 9px; width: 36px; height: 36px; cursor: pointer; font-size: 1rem;
  display: grid; place-items: center; transition: .13s;
}
.icon-btn:hover { border-color: var(--brand-300); color: var(--brand); }
.icon-btn--primary { border-color: var(--brand); background: var(--brand); color: #fff; font-weight: 700; }
.icon-btn--primary:hover { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }

/* ---- Knoppen ------------------------------------------------------------ */
.btn {
  font: inherit; font-weight: 600; font-size: .92rem; border-radius: 10px;
  padding: 10px 18px; cursor: pointer; border: 1px solid transparent; transition: .14s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn:focus-visible { outline: 3px solid var(--brand-300); outline-offset: 2px; }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-700); }
.btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: var(--surface-2); border-color: var(--brand-300); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { filter: brightness(.94); }
.btn--sm { padding: 7px 13px; font-size: .85rem; }
.btn--back { background: none; border: 0; color: var(--ink-soft); padding: 6px 0; margin-bottom: 10px; }
.btn--back:hover { color: var(--brand); }

/* ---- Beheer: tabs ------------------------------------------------------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; flex-wrap: wrap; }
.tab {
  font: inherit; font-weight: 600; font-size: .92rem; color: var(--ink-soft);
  background: none; border: 0; padding: 12px 16px; cursor: pointer; position: relative;
  border-radius: 8px 8px 0 0;
}
.tab:hover { color: var(--ink); background: var(--surface-2); }
.tab.is-active { color: var(--brand); }
.tab.is-active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 3px;
  background: var(--brand); border-radius: 3px 3px 0 0;
}
.tabpanel { display: none; }
.tabpanel.is-active { display: block; animation: rise .2s ease; }

.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 16px; }
.toolbar__title { font-size: 1.15rem; font-weight: 700; margin: 0; }
.toolbar__spacer { flex: 1; }

/* ---- Lijsten in beheer -------------------------------------------------- */
.list { display: flex; flex-direction: column; gap: 8px; }
.row {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow-sm);
}
.row__name { font-weight: 600; }
.row__meta { color: var(--ink-soft); font-size: .85rem; }
.row__spacer { flex: 1; }
.row.is-selectable { cursor: pointer; transition: border-color .14s; }
.row.is-selectable:hover { border-color: var(--brand-300); }
.row.is-selected { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset, var(--shadow-sm); }
.badge {
  font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  background: var(--brand-50); color: var(--brand-700); padding: 3px 8px; border-radius: 99px;
}
.badge--muted { background: var(--line-2); color: var(--ink-soft); margin-left: 6px; }

.subgrid { display: grid; grid-template-columns: 320px 1fr; gap: 22px; align-items: start; }

/* Zichtbaarheid per groep */
.vis-tree { display: flex; flex-direction: column; gap: 4px; }
.vis-domain { border-bottom: 1px solid var(--line-2); }
.vis-domain.is-hidden .vis-subs { opacity: .45; }
.vis-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; }
.vis-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.vis-check input { width: 17px; height: 17px; accent-color: var(--brand); cursor: pointer; }
.vis-name { font-size: .95rem; }
.vis-subs { display: flex; flex-direction: column; gap: 6px; padding: 2px 0 12px 26px; }
.vis-check--sub .vis-name { font-size: .88rem; color: var(--ink-soft); }
.dd-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }
.dd-block .row { border: 0; box-shadow: none; background: transparent; }
.dd-subpanel { padding: 0 14px 14px; }
.subedit { border-top: 1px dashed var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.subedit__head { font-size: .78rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 4px; }
.subedit__row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.subedit__name { font-size: .9rem; }
.subedit__add { display: flex; gap: 8px; margin-top: 8px; }
.subedit__add input { flex: 1; font: inherit; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; background: var(--surface-2); }
.subedit__add input:focus { outline: 2px solid var(--brand-300); outline-offset: 1px; background: #fff; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow-sm);
}
.card__title { font-weight: 700; margin: 0 0 12px; }
.muted { color: var(--ink-soft); }
.paste-area textarea {
  width: 100%; min-height: 120px; resize: vertical; font: inherit; font-size: .92rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 13px;
  background: var(--surface-2);
}
.paste-area textarea:focus { outline: 2px solid var(--brand-300); outline-offset: 1px; background: #fff; }

/* ---- Login-poort -------------------------------------------------------- */
.gate { max-width: 420px; margin: 8vh auto; text-align: center; }
.gate .card { padding: 30px 28px; }
.gate__lock { font-size: 2.2rem; }

/* ---- Modaal venster ----------------------------------------------------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15,32,37,.5);
  display: grid; place-items: center; padding: 20px; z-index: 1000;
  opacity: 0; transition: opacity .16s; backdrop-filter: blur(2px);
}
.modal-overlay.is-open { opacity: 1; }
.modal {
  background: var(--surface); border-radius: var(--radius); width: min(520px, 100%);
  box-shadow: 0 24px 60px rgba(10,25,30,.32); transform: translateY(8px) scale(.98);
  transition: transform .18s; overflow: hidden; max-height: 90vh; display: flex; flex-direction: column;
}
.modal.large { width: min(680px, 100%); }
.modal-overlay.is-open .modal { transform: none; }
.modal__head {
  display: flex; align-items: center; gap: 12px; padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.modal__title { font-size: 1.1rem; font-weight: 700; margin: 0; flex: 1; }
.modal__x {
  border: 0; background: none; font-size: 1.5rem; line-height: 1; color: var(--ink-faint);
  cursor: pointer; padding: 2px 6px; border-radius: 8px;
}
.modal__x:hover { background: var(--surface-2); color: var(--ink); }
.modal__body { padding: 20px; overflow: auto; }
.modal__foot {
  display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px;
  border-top: 1px solid var(--line); background: var(--surface-2);
}
.modal-text { margin: 0; color: var(--ink); }

/* Formulier in modaal */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.tabpanel[data-tabpanel="super"] .field { margin-top: 12px; }
.field__label { font-size: .85rem; font-weight: 600; color: var(--ink-soft); }
.field input, .field textarea, .field select {
  font: inherit; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 12px; background: var(--surface-2);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--brand-300); outline-offset: 1px; background: #fff; }
.form__error { color: var(--danger); font-size: .85rem; margin: 0; }

.history-list { display: flex; flex-direction: column; gap: 8px; }
.hist {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2);
}
.pill {
  font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; color: #fff;
  text-transform: capitalize;
}
.pill--aangeboden { background: var(--st-aangeboden); }
.pill--oefenen    { background: var(--st-oefenen); }
.pill--beheerst   { background: var(--st-beheerst); }

/* ---- Toasts ------------------------------------------------------------- */
.toast-wrap { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 10px; z-index: 1100; }
.toast {
  background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 10px;
  box-shadow: var(--shadow); font-size: .9rem; font-weight: 500;
  transform: translateY(12px); opacity: 0; transition: .22s; max-width: 320px;
}
.toast.is-in { transform: none; opacity: 1; }
.toast--ok { background: #14463a; }
.toast--err { background: #7c2418; }

/* ---- Terug-naar-boven pijltje (klein, onopvallend, linksonder) ---------- */
.to-top {
  position: fixed; left: 16px; bottom: 16px; z-index: 900;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(255,255,255,.82); color: var(--ink-soft);
  display: grid; place-items: center; cursor: pointer; padding: 0;
  box-shadow: var(--shadow-sm); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .18s, transform .18s, visibility .18s, color .14s, border-color .14s;
}
.to-top.is-visible { opacity: .5; visibility: visible; transform: none; }
.to-top:hover { opacity: 1; color: var(--brand); border-color: var(--brand-300); }
.to-top:focus-visible { opacity: 1; outline: 3px solid var(--brand-300); outline-offset: 2px; }

/* ---- Footer ------------------------------------------------------------- */
.footer {
  text-align: center; color: var(--ink-faint); font-size: .82rem;
  padding: 20px; border-top: 1px solid var(--line); background: var(--surface);
}
.footer strong { color: var(--ink-soft); font-weight: 600; }

/* ---- Responsief --------------------------------------------------------- */
@media (max-width: 760px) {
  .wrap { padding: 18px 14px 32px; }
  .subgrid { grid-template-columns: 1fr; }
  .step__value { display: none; }
  .step__label { font-size: .68rem; }
  .reg-summary__progress { margin-left: 0; width: 100%; }
  .progress { flex: 1; }
  .dd { grid-template-columns: 1fr; }
  .dd__actions { justify-content: flex-start; }
  .panel__title { font-size: 1.28rem; }
  .brand__sub { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Meldingsbanner (bv. na het aanpassen van codes) */
.flash {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 18px; padding: 14px 16px;
  background: #e7f6ee; border: 1px solid #9ed8b8; border-radius: var(--radius-sm);
  color: #14532d; box-shadow: var(--shadow-sm);
}
.flash__icon { display: inline-grid; place-items: center; width: 26px; height: 26px; flex: none;
  background: #16a34a; color: #fff; border-radius: 50%; font-weight: 800; }
.flash span { font-weight: 600; }
.flash__close { margin-left: auto; border: 0; background: transparent; cursor: pointer;
  font-size: 1.3rem; line-height: 1; color: #14532d; opacity: .65; }
.flash__close:hover { opacity: 1; }

/* App-loginscherm */
.gate-card {
  max-width: 380px; margin: 60px auto 0;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 36px 32px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 16px;
}
.gate-card__title { font-size: 1.25rem; font-weight: 800; color: var(--brand); margin: 0; }
.gate-card .btn--primary { align-self: flex-start; margin-top: 4px; }

/* Groepsnotitie-kaart (iets subtieler dan leerlingnotitie) */
.info-card--group {
  border-color: var(--brand-300);
  background: color-mix(in srgb, var(--brand) 4%, var(--surface));
  margin-bottom: 18px;
}

/* ---- Trendanalyse ------------------------------------------------------- */
.trend-domain { margin-bottom: 24px; }
.trend-domain__title { font-size: 1rem; font-weight: 700; margin: 0 0 8px; }
.trend-bar { display: flex; height: 22px; border-radius: 6px; overflow: hidden; background: var(--border); margin-bottom: 6px; }
.trend-bar__seg { min-width: 0; transition: width .3s; }
.trend-bar__seg--groen  { background: #16a34a; }
.trend-bar__seg--oranje { background: #f59e0b; }
.trend-bar__seg--rood   { background: #e0352b; }
.trend-legend { display: flex; flex-wrap: wrap; gap: 10px 18px; font-size: .82rem; margin-bottom: 10px; }
.trend-legend__item { display: flex; align-items: center; gap: 5px; }
.trend-details { margin-bottom: 8px; }
.trend-details summary { cursor: pointer; font-size: .85rem; font-weight: 600; color: var(--brand); padding: 4px 0; }
.trend-table { width: 100%; border-collapse: collapse; font-size: .82rem; margin-top: 4px; }
.trend-table th, .trend-table td { padding: 5px 8px; border-bottom: 1px solid var(--border); text-align: left; }
.trend-table th { font-weight: 600; background: var(--surface-alt, #f8f8f8); }
.tc { text-align: center !important; }
.trend-chip { display: inline-block; min-width: 22px; text-align: center; padding: 1px 6px; border-radius: 10px; font-weight: 600; color: #fff; font-size: .78rem; }
.trend-chip--groen  { background: #16a34a; }
.trend-chip--oranje { background: #f59e0b; }
.trend-chip--rood   { background: #e0352b; }

/* ---- Zichtbaarheid-toggles (registratieflow) ----------------------------- */
.vis-toggle-panel { border: 1px solid var(--border); border-radius: 10px; padding: 0; }
.vis-toggle-summary { cursor: pointer; font-size: .85rem; font-weight: 600; color: var(--brand); padding: 10px 14px; }
.vis-toggle-list { padding: 4px 14px 14px; }
.vis-toggle-row {
  display: flex; align-items: center; gap: 10px; padding: 7px 0;
  border-bottom: 1px solid var(--border); cursor: pointer; font-size: .88rem;
}
.vis-toggle-row:last-child { border-bottom: none; }
.vis-toggle-name { flex: 1; }
/* Schakelaar (toggle switch) */
.vis-toggle-cb { display: none; }
.vis-toggle-slider {
  position: relative; width: 40px; height: 22px; flex-shrink: 0;
  background: #ccc; border-radius: 11px; transition: background .2s;
}
.vis-toggle-slider::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  transition: transform .2s;
}
.vis-toggle-cb:checked + .vis-toggle-slider { background: #16a34a; }
.vis-toggle-cb:checked + .vis-toggle-slider::after { transform: translateX(18px); }

/* ---- Sorteer-pijlknoppen (beheer) ---------------------------------------- */
.sort-arrows {
  display: inline-flex; flex-direction: column; gap: 0; margin-right: 6px;
  flex-shrink: 0;
}
.arrow-btn {
  background: none; border: 1px solid var(--border); color: var(--text-muted, #888);
  font-size: .7rem; line-height: 1; padding: 1px 5px; cursor: pointer;
  border-radius: 3px; transition: background .15s, color .15s;
}
.arrow-btn:first-child { border-radius: 4px 4px 0 0; border-bottom: none; }
.arrow-btn:last-child  { border-radius: 0 0 4px 4px; }
.arrow-btn:hover:not(:disabled) { background: var(--brand); color: #fff; border-color: var(--brand); }
.arrow-btn:disabled { opacity: .25; cursor: default; }

/* Sorteer-modusknop in toolbar */
.sort-toggle {
  font-size: .82rem; font-weight: 600; letter-spacing: .02em;
  min-width: 42px; text-align: center;
}
