/* Beheer: de beheeromgeving met tabbladen (0.14.0) en de panelen Voortgang, Vrijgave,
   Cursussen (met de mediabibliotheek), Inleveringen, Gebruikers en Auditlog in de recepten van het ontwerp. Alleen tokens uit base.css. */

/* ---------- kop, tabbladen, panelen ---------- */

.beheer-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 22px; }
.beheer-head h1 { margin: 0; font-size: 32px; font-weight: 800; }
.beheer-head .eyebrow { margin-bottom: 8px; }
.beheer .tabs-list { margin-bottom: 0; }
.beheer .toast { margin: 16px 0 0; }
.beheer-panel { display: flex; flex-direction: column; gap: 22px; padding-top: 24px; }
.beheer-panel > .notice { margin: 0; }
.beheer-panel > .notice a { color: inherit; }

/* Kop van een paneel: titel en uitleg links, een filter of actie rechts. */
.panel-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 14px 24px; }
.panel-head > div:first-child { flex: 1 1 320px; min-width: 0; }
.panel-head h2 { margin: 0 0 6px; font-size: var(--fs-24); font-weight: 800; }
.panel-head > div > p { margin: 0; max-width: 72ch; color: var(--text-muted); }
.panel-head .eyebrow { margin-bottom: 6px; }
/* De terugweg in de kop is een echte link, ook zonder muis te zien: linkkleur en een onderstreping. */
.panel-head .eyebrow a { color: var(--text-link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.panel-head .eyebrow a:hover { color: var(--text-link-hover); }
.panel-head .lead { margin-top: 6px; font-size: var(--fs-16); }
.panel-head .back { margin-top: 10px; font-size: var(--fs-14); }
.panel-head > .badge { margin-top: 6px; }
.panel-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; flex: 0 1 420px; min-width: 240px; }
.panel-filter .field { flex: 1 1 200px; }
.panel-section { display: flex; flex-direction: column; gap: 14px; }
.panel-section .section-title { margin: 0; font-size: var(--fs-20); font-weight: 800; }

/* Kaarten in een paneel: een h3 als kop, een korte uitleg, een formulier van velden. */
.beheer-panel .card h3 { margin: 0 0 8px; font-size: var(--fs-20); font-weight: 800; }
.beheer-panel .card h4 { margin: 22px 0 8px; font-size: var(--fs-16); font-weight: 700; }
.beheer-panel .card > p { max-width: 72ch; }
.beheer-panel .card .form { margin-top: 16px; }
.beheer-panel .card .report { margin-top: 12px; }
.beheer-panel .card .btn.plain { margin-top: 4px; }
.history { margin: 0; padding-left: 20px; font-size: var(--fs-14); }
.history li { margin-bottom: 4px; }
.module-list { margin: 0; padding-left: 22px; }
.module-list li { margin-bottom: 6px; }

/* ---------- tabellen: badges, voortgang, acties ---------- */

.table .badge + .badge { margin-left: 6px; }
.table .muted { color: var(--text-muted); }
.progress-cell { min-width: 150px; }
.progress-cell .progress { width: 120px; margin-bottom: 5px; }
.progress-pct { font-size: var(--fs-13); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.table td.actions { white-space: nowrap; }
.table td.actions input[type="date"] { margin-right: 8px; }
.table td.actions .btn + .btn { margin-left: 6px; }

/* De keuzelijst in de tabel houdt zijn tekst leesbaar, ook als de tabel moet scrollen. */
.table td.role .select { min-width: 130px; }

/* ---------- vrijgave (0.16.0) ---------- */

.release-list { list-style: none; display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; }
.release-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.release-no { display: grid; place-content: center; flex: none; width: 48px; height: 48px; border-radius: 12px; background: var(--surface-inverse); color: var(--orange-500); font-size: var(--fs-20); font-weight: 800; }
.release-title { flex: 1 1 220px; min-width: 0; }
.beheer-panel .card .release-title h3 { margin: 0; font-size: var(--fs-18); font-weight: 800; }
.release-title p { margin: 2px 0 0; font-size: var(--fs-13); }
.release-settings { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); align-items: start; }
.release-switches { display: flex; flex-direction: column; gap: 10px; }
.release-switches .field-hint { margin: 0; }
.release-notice { margin: 14px 0 0; }

/* ---------- voortgang (0.17.0) ---------- */

.vg-content { display: flex; flex-direction: column; gap: 22px; }
/* Per module: titel | balk | "6 van 8 afgerond", op een telefoon onder elkaar. */
.vg-modules { list-style: none; display: flex; flex-direction: column; gap: 14px; margin: 8px 0 0; padding: 0; }
.vg-module { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 220px) 150px; align-items: center; gap: 8px 18px; font-size: var(--fs-14); }
.vg-module-title { font-weight: 600; color: var(--text-heading); overflow-wrap: anywhere; }
.vg-module.muted .vg-module-title { color: var(--text-muted); }
.vg-module.muted .vg-module-count { grid-column: 2 / -1; }
.vg-module-count { color: var(--text-muted); font-variant-numeric: tabular-nums; }
/* Kop van een kaart met acties rechts. */
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 14px; }
.beheer-panel .card .card-head h3 { margin: 0; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.card-actions .btn + .btn { margin-left: 0; }
.vg-table { min-width: 640px; }
.vg-table .vg-name { font-weight: 600; color: var(--text-heading); }
.vg-table .vg-pct { font-variant-numeric: tabular-nums; white-space: nowrap; }
/* In de kaartweergave op een telefoon is de cel een raster: de badge blijft zo breed als zijn tekst. */
.vg-table td > .badge, .vg-table td > .muted { justify-self: start; }
.vg-content .table-wrap { box-shadow: none; }

/* ---------- inleveringen beoordelen ---------- */

.submission-list { list-style: none; display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; }
.submission-item { --pad: 24px 28px; }
.submission-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 16px; }
.submission-head > div { min-width: 0; }
.beheer-panel .submission-item h3 { margin: 0; font-size: var(--fs-18); font-weight: 800; overflow-wrap: break-word; }
.submission-meta { margin: 4px 0 0; font-size: var(--fs-14); color: var(--text-muted); overflow-wrap: anywhere; }
.submission-text { margin: 14px 0; padding: 14px 16px; white-space: pre-wrap; overflow-wrap: break-word; background: var(--surface-muted); border: 1px solid var(--border); border-radius: 12px; }
.submission-review { margin: 0; font-size: var(--fs-14); }
.review-form { display: flex; flex-direction: column; gap: 12px; }
.review-form .btns { display: flex; flex-wrap: wrap; gap: 10px; }
.review-form .btn + .btn { margin-left: 0; }

/* ---------- mediabibliotheek (0.28.0) ---------- */

.media-link { margin: 0; }
.media-upload .media-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.media-upload .media-actions .btn + .btn { margin-left: 0; }
.media-status { list-style: none; display: flex; flex-direction: column; gap: 12px; margin: 16px 0 0; padding: 0; }
.media-status:focus { outline: 3px solid var(--focus-ring); outline-offset: 4px; border-radius: var(--radius-sm); }
.media-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 220px); align-items: center; gap: 4px 16px; font-size: var(--fs-14); }
.media-item-name { color: var(--text-heading); overflow-wrap: anywhere; }
.media-state { grid-column: 1 / -1; color: var(--text-muted); overflow-wrap: anywhere; }
.media-item.ok .media-state { color: var(--ok-text); }
.media-item.bad .media-state { color: var(--bad-text); }
.media-usage { margin: 0; font-size: var(--fs-14); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.media-preview img { display: block; max-width: 64px; border-radius: var(--radius-sm); background: var(--media-backdrop); }
.media-name { overflow-wrap: anywhere; }
.media-ref { font-family: var(--font-mono); font-size: var(--fs-13); white-space: nowrap; }
.media-ref-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* ---------- telefoon ---------- */

@media (max-width: 700px) {
  .beheer-head { margin-bottom: 16px; }
  .beheer-head h1 { font-size: var(--fs-24); }
  .beheer-panel { gap: 18px; padding-top: 18px; }
  .panel-filter { flex: 1 1 100%; min-width: 0; }
  .panel-filter .btn { flex: 1; }
  .progress-cell .progress { width: 100%; }
  .table td.actions { white-space: normal; }
  .table td.actions input[type="date"] { margin: 0 0 8px; width: 100%; }
  .table .badge + .badge { margin-left: 0; }
  .submission-item { --pad: 18px; }
  .table td.role .select { min-width: 0; }
  .vg-module { grid-template-columns: minmax(0, 1fr); }
  .media-ref { white-space: normal; overflow-wrap: anywhere; }
  .vg-module.muted .vg-module-count { grid-column: auto; }
  .vg-table { min-width: 0; }
  .card-actions { flex: 1 1 100%; }
  .card-actions .btn { flex: 1 1 auto; }
  .media-item { grid-template-columns: minmax(0, 1fr); }
  .media-upload .media-actions .btn { flex: 1 1 auto; }
}

/* Meldingen per opleiding (0.26.0) */
.notify-form { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin-top: 8px; }
.notify-days input { width: 120px; }
