/* ============================================================
   Verwaltung: Ergänzungen zu app.css (Benutzer, Kurse, Karten,
   Notenschlüssel, Räume, Einstellungen, Aufbewahrung, Dashboard,
   Anmeldung/Fehlerseiten). Nur Bausteine, die app.css nicht hat,
   nur Variablen aus app.css. Idee: Klausur auf Papier.
   ============================================================ */

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* kleine Helfer (ersetzen frühere Inline-Styles) */
.th-end { text-align: right; }
.col-narrow { width: 90px; }
.group-title { margin: 0; }
.card-icon-title { display: flex; align-items: center; gap: 8px; }
.card-icon-title .icon { color: var(--ink-faint); }
.mt-alert { margin-top: 12px; }
.table-flush { border: 0; border-radius: 0; box-shadow: none; }
.card-header .group-title { flex: 1; }
.text-center { text-align: center; }

/* Gruppe mit Rahmen wie ein Aufgabenblock */
.fieldset { border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 12px 16px 14px; margin: 0 0 16px; }
.fieldset legend {
  padding: 0 6px; font-family: var(--font-mono); font-size: .7rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .11em; color: var(--ink-faint);
}

.course-pick, .pick-list { max-height: 18rem; overflow: auto; padding: 4px 2px; }
.pick-list label { padding: 4px 6px; border-radius: var(--radius-sm); }
.pick-list label:hover { background: var(--primary-soft); }

.code-sample {
  background: var(--editor-bg); color: var(--editor-ink); font-family: var(--font-mono);
  font-size: .82rem; padding: 12px 14px; border-radius: var(--radius-sm); overflow-x: auto; margin: 8px 0 0;
}

.danger-zone { border-color: var(--danger); border-left-width: 4px; }
.row-error td { background: var(--danger-soft); }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

/* einmalig angezeigtes Passwort: wie handschriftlich in ein Kästchen geschrieben */
.generated-password-value {
  font-family: var(--font-mono); font-size: 1.35rem; letter-spacing: .08em; margin: 8px 0; user-select: all;
  padding: 8px 12px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--surface);
  display: inline-block;
}

.logo-preview { max-width: 96px; max-height: 96px; border-radius: var(--radius-sm); object-fit: contain; }
.inline-form { display: inline-block; margin: 4px 6px 0 0; }

/* Treffer der Kurs-Mitgliedersuche */
.search-results { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 0; }
.search-results li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 8px 4px; border-bottom: 1px solid var(--rule-line);
}
.search-results li:first-child { border-top: 1px solid var(--rule-line); }
.search-results:empty { display: none; }

/* Sitzraster der Räume: Grundriss auf Karopapier */
.room-grid-scroll { overflow-x: auto; padding-bottom: 6px; }
.room-board {
  min-width: 320px; text-align: center; font-family: var(--font-mono); font-size: .7rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  background: var(--editor-bg); color: var(--editor-ink); border-radius: var(--radius-sm); padding: 6px; margin-bottom: 10px;
}
.room-grid { border-collapse: separate; border-spacing: 6px; width: 100%; min-width: 320px; table-layout: fixed; }
.room-seat {
  height: 52px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface-2); text-align: center; vertical-align: middle; padding: 2px; position: relative;
}
.room-seat.is-taken { border-style: solid; border-color: var(--primary); background: var(--primary-soft); }
.room-seat form { display: flex; align-items: center; justify-content: center; gap: 4px; height: 100%; }
.seat-name { font-size: .74rem; font-weight: 600; line-height: 1.15; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.seat-clear {
  display: inline-grid; place-items: center; border: 0; background: transparent; color: var(--ink-faint);
  cursor: pointer; padding: 3px; border-radius: var(--radius-sm);
}
.seat-clear .icon { width: .9rem; height: .9rem; }
.seat-clear:hover, .seat-clear:focus-visible { color: var(--danger); background: var(--danger-soft); }

/* Notenschlüssel-Tabelle */
.scale-table input.input { min-width: 4.5rem; }

/* ---------- Dashboard: ruhige Übersicht ---------- */
.dash-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.dash-group .card-header h3, .dash-grid aside .card-header h3 { font-size: 1.15rem; }
.dash-group .card-header h3 .text-faint {
  font-family: var(--font-mono); font-size: .75rem; font-weight: 500; letter-spacing: .06em; vertical-align: .1em; margin-left: 4px;
}
.dash-list { list-style: none; margin: 0; padding: 0; }
.dash-list li {
  display: flex; align-items: center; gap: 14px; padding: 13px 24px; border-top: 1px solid var(--rule-line);
  transition: background .12s var(--ease);
}
.dash-list li:first-child { border-top: 0; }
.dash-list li:hover { background: var(--primary-soft); }
.dash-main { flex: 1; min-width: 0; }
.dash-main a { overflow-wrap: anywhere; text-decoration: none; }
.dash-main a:hover { text-decoration: underline; }
.dash-main strong { font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; letter-spacing: -.005em; }
.dash-main .text-sm { margin-top: 2px; }
/* die laufende Gruppe hebt sich durch Rotstift-Rand links ab, nicht durch Farbfläche */
.dash-group:first-child { border-left: 3px solid var(--primary); }

@media (max-width: 860px) {
  .dash-grid { grid-template-columns: 1fr; }
  .dash-list li { flex-wrap: wrap; padding: 12px 16px; }
}

/* ---------- Deckblatt: Anmeldung und Verwandte (minimal-card) ---------- */
.minimal-card .page-eyebrow { margin-bottom: 6px; }
.minimal-card h1 { font-size: 1.85rem; margin-bottom: 8px; }
.minimal-card h3 {
  font-family: var(--font-mono); font-size: .72rem; font-weight: 500; text-transform: uppercase;
  letter-spacing: .12em; color: var(--ink-faint); margin: 18px 0 10px;
}
.minimal-card .field > label {
  font-family: var(--font-mono); font-size: .7rem; font-weight: 500; text-transform: uppercase;
  letter-spacing: .11em; color: var(--ink-soft);
}
/* Schreiblinie statt Kasten: Eingaben auf dem Deckblatt liegen auf einer Linie */
.minimal-card .input {
  border-width: 0 0 1px; border-color: var(--border-strong); border-radius: 0;
  background: transparent; padding: 8px 2px; font-size: 1.05rem;
}
.minimal-card .input:focus { box-shadow: none; border-bottom: 2px solid var(--primary); padding-bottom: 7px; }
.minimal-card .input.is-invalid { box-shadow: none; }
.minimal-card .input-group .input { padding-right: 40px; }
.minimal-card .btn-block { margin-top: 6px; }
.input-code { font-family: var(--font-mono); letter-spacing: .35em; font-size: 1.4rem; text-align: center; }
.minimal-card .input.input-code { padding-left: .35em; }

/* Fehlerseite und Hinweisblatt */
.error-sheet { text-align: center; padding: 6px 0 2px; }
.error-code {
  font-family: var(--font-display); font-size: 4.6rem; font-weight: 500; line-height: 1;
  color: var(--danger); letter-spacing: -.02em;
}
.error-title { font-size: 1.5rem; margin: 10px 0 8px; }
.error-message { white-space: pre-wrap; }
.notice-sheet { max-width: 560px; }
.notice-sheet h1 { font-size: 1.6rem; }
