/* ============================================================
   spelleiding.css — desktop-stijlen voor /spelleiding/*
   Mobiel niet vereist. Brede layout met `screen-wide`.
   ============================================================ */


/* ── Pagina-shell ─────────────────────────────────────────── */

.admin-body {
  margin: 0;
  background:
    radial-gradient(900px 500px at 80% -10%, rgba(176, 83, 46, .06), transparent 60%),
    radial-gradient(700px 400px at -5% 110%, rgba(44, 74, 59, .08), transparent 60%),
    var(--paper);
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--ink);
}

.admin-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px 64px;
}


/* ── Topbar ───────────────────────────────────────────────── */

.admin-topbar {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 22px 0 20px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 32px;
}
.admin-topbar .brand        { display: flex; align-items: center; gap: 14px; }
.admin-topbar .brand-mark   { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--ink); display: grid; place-items: center; background: var(--surface); }
.admin-topbar .brand-mark svg { width: 22px; height: 22px; }
.admin-topbar .brand-text   { font-family: var(--serif); font-weight: 500; font-variation-settings: "opsz" 12, "SOFT" 30; font-size: 18px; line-height: 1; }
.admin-topbar .brand-text small { display: block; font-family: var(--sans); font-weight: 500; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); margin-top: 4px; }

.admin-nav-links {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.admin-nav-link {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--mute);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  transition: background .15s, color .15s;
}
.admin-nav-link:hover { color: var(--ink); }
.admin-nav-link.actief {
  background: var(--ink);
  color: var(--surface);
}


/* ── Page-head (titel + acties) ─────────────────────────── */

.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.admin-head h2 {
  font-family: var(--serif);
  font-variation-settings: "opsz" 72, "SOFT" 40;
  font-weight: 380;
  font-size: 38px;
  letter-spacing: -.02em;
  line-height: 1;
  margin: 0 0 6px;
  color: var(--ink);
}
.admin-head h2 em {
  font-style: italic;
  color: var(--clay);
  font-variation-settings: "opsz" 72, "SOFT" 100, "WONK" 1;
}
.admin-head .lead { margin: 0; font-size: 14px; color: var(--ink-soft); max-width: 60ch; }

.admin-head-acties { display: flex; gap: 8px; align-items: center; }


/* ── Cards & tabellen ─────────────────────────────────────── */

.admin-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 20px;
}
.admin-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
  gap: 16px;
}
.admin-card-head h3 {
  font-family: var(--serif);
  font-variation-settings: "opsz" 48, "SOFT" 40;
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -.01em;
  margin: 0;
  color: var(--ink);
}
.admin-card-head .muted { font-size: 12px; color: var(--mute); }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.admin-table th {
  text-align: left;
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 700;
  padding: 8px 10px;
  border-bottom: 1px solid var(--hairline);
}
.admin-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--hairline);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(255, 255, 255, .35); }

.admin-table .team-name {
  font-family: var(--serif);
  font-variation-settings: "opsz" 24, "SOFT" 40;
  font-weight: 500;
  font-size: 17px;
  color: var(--ink);
  letter-spacing: -.01em;
}
.admin-table .team-code-cell {
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: .15em;
  color: var(--clay);
}

.team-mini-foto {
  width: 32px; height: 32px; border-radius: 50%;
  object-fit: cover; border: 1.5px solid var(--hairline);
  display: inline-block; vertical-align: middle; margin-right: 8px;
}
.team-mini-foto-leeg {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--paper-warm);
  border: 1.5px dashed var(--hairline);
  display: inline-block; vertical-align: middle; margin-right: 8px;
}

.copy-btn {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--paper-warm);
  color: var(--ink-soft);
  cursor: pointer;
  letter-spacing: .04em;
}
.copy-btn:hover { background: var(--paper); border-color: var(--ink); }

.rij-acties { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }


/* ── Formulieren ─────────────────────────────────────────── */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
}
.form-grid .full { grid-column: 1 / -1; }
.form-grid label.field-label { margin-bottom: 4px; }

.textarea {
  width: 100%;
  min-height: 100px;
  font-family: var(--sans);
  font-size: 13px;
  padding: 11px 14px;
  border: 1px solid var(--ink);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  outline: none;
  resize: vertical;
  line-height: 1.5;
}
.textarea:focus { border-color: var(--clay); }


/* ── Empty-states & noties ───────────────────────────────── */

.admin-leeg {
  text-align: center;
  padding: 48px 24px;
  color: var(--mute);
  font-style: italic;
  font-size: 13px;
}

.notitie {
  padding: 12px 14px;
  background: var(--paper-warm);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.5;
}
.notitie strong { color: var(--clay); }


/* ── Login-pagina ─────────────────────────────────────────── */

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}
.login-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 36px 32px;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 24px 48px -28px rgba(15, 28, 22, .35);
}


/* ── Spelregels-editor (markdown + preview) ─────────────── */

.regels-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.regels-grid .textarea { min-height: 480px; font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 12px; }
.regels-preview {
  background: var(--paper-warm);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 18px 22px;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.6;
  overflow-y: auto;
  max-height: 540px;
}
.regels-preview h2,
.regels-preview h3 {
  font-family: var(--serif);
  font-variation-settings: "opsz" 36, "SOFT" 40;
  font-weight: 400;
  letter-spacing: -.01em;
  color: var(--ink);
  margin: 12px 0 6px;
}
.regels-preview h2 { font-size: 22px; }
.regels-preview h3 { font-size: 17px; }
.regels-preview ul { padding-left: 18px; margin: 4px 0; }
.regels-preview li { margin-bottom: 4px; }
.regels-preview p  { margin: 0 0 10px; }


/* ── Inzendingen-grid ────────────────────────────────────── */

.inzendingen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.inzending-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.inzending-foto {
  aspect-ratio: 4 / 3;
  background: var(--paper-warm);
  overflow: hidden;
}
.inzending-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.inzending-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.inzending-team {
  font-family: var(--serif);
  font-variation-settings: "opsz" 24, "SOFT" 40;
  font-weight: 500;
  font-size: 17px;
  color: var(--ink);
}
.inzending-puzzel { font-size: 12px; color: var(--mute); }
.inzending-acties { display: flex; gap: 8px; margin-top: auto; }
.inzending-acties .btn { flex: 1; font-size: 12px; padding: 10px 12px; }

.btn-akkoord { background: var(--willow); color: var(--surface); }
.btn-afwijs  { background: var(--clay);   color: var(--surface); }


/* ── Dashboard-rijen (compactere variant van scoreboard) ── */

.adm-team-rij {
  display: grid;
  grid-template-columns: 48px 1.4fr 2fr 110px 100px;
  gap: 0;
  padding: 14px 12px;
  align-items: center;
  border-bottom: 1px solid var(--hairline);
}
.adm-team-rij:last-child { border-bottom: none; }
.adm-team-naam {
  font-family: var(--serif);
  font-variation-settings: "opsz" 24, "SOFT" 40;
  font-weight: 500;
  font-size: 17px;
  color: var(--ink);
}
.adm-team-meta { font-size: 11px; color: var(--mute); margin-top: 3px; }

.adm-stops { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.adm-stop  { width: 12px; height: 12px; border-radius: 50%; background: var(--hairline); border: 1.5px solid transparent; }
.adm-stop.done    { background: var(--willow); }
.adm-stop.current { background: var(--clay); animation: pulse 1.6s ease-in-out infinite; }


/* ── Berichten ───────────────────────────────────────────── */

.bericht-vorm { display: grid; gap: 10px; }
.bericht-vorm select.input { padding-right: 28px; }
.berichten-log { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; padding-top: 4px; }
.bericht-rij {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  background: var(--paper-warm);
  border-radius: 8px;
  font-size: 12px;
  color: var(--ink-soft);
}
.bericht-rij .meta { font-size: 10px; color: var(--mute); letter-spacing: .04em; }


/* ── Modal (puzzel-editor) ───────────────────────────────── */

.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 28, 22, .55);
  display: grid; place-items: center;
  padding: 24px;
  z-index: 50;
}
.modal {
  background: var(--surface);
  border-radius: 16px;
  padding: 24px 28px;
  width: 100%;
  max-width: 760px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .4);
}
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.modal-close {
  background: transparent; border: none; cursor: pointer;
  font-size: 22px; color: var(--mute);
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
}
.modal-close:hover { background: var(--paper-warm); color: var(--ink); }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 8px;
  margin-top: 18px; padding-top: 14px;
  border-top: 1px solid var(--hairline);
}
