/* MyStaat — Dashboard
 *
 * Dunkel, weil es neben Discord benutzt wird und ein helles Fenster dort wie
 * ein Fremdkörper wirkt. Sonst zurückhaltend: Die Farbe im Bild soll vom
 * Wappen der Fraktion kommen, nicht von der Oberfläche.
 */

:root {
  --bg: #16171a;
  --surface: #1e1f23;
  --surface-2: #26282d;
  --line: #33363d;
  --text: #e6e8ec;
  --muted: #9aa0aa;
  --accent: #5865f2;
  --gruen: #3ba55d;
  --rot: #da3f3f;
  --gelb: #d9a441;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-weight: 600;
  line-height: 1.25;
  margin: 0;
}

.mark {
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 18px;
  text-decoration: none;
}

/* Knöpfe ------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.btn:hover {
  background: #2e3138;
  border-color: #444852;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: #4752d4;
  border-color: #4752d4;
}

.btn-ghost {
  background: transparent;
}

.btn-danger {
  background: transparent;
  border-color: #5a2d2d;
  color: #f0a0a0;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 14px;
}

/* Startseite --------------------------------------------------------------- */

.landing main {
  max-width: 780px;
  margin: 0 auto;
  padding: 80px 24px 48px;
}

.landing header {
  text-align: center;
  margin-bottom: 64px;
}

.landing h1 {
  font-size: 38px;
  margin: 28px 0 16px;
  letter-spacing: -0.02em;
}

.lead {
  color: var(--muted);
  font-size: 17px;
  max-width: 560px;
  margin: 0 auto 28px;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  margin-top: 14px;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.features article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 22px;
}

.features h2 {
  font-size: 16px;
  margin-bottom: 8px;
}

.features p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.landing footer {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--line);
  margin-top: 56px;
  padding-top: 20px;
}

/* Anwendung ----------------------------------------------------------------
 *
 * Dieselbe Handschrift wie Startseite und Berichtsgenerator. Der Hebel sind
 * die Token: Karten, Reiter, Knöpfe und Tabellen greifen sie ohnehin ab, also
 * genügt es, sie hier umzudefinieren, statt jedes Bauteil einzeln anzufassen.
 *
 * Der alte Satz war eigenständig gewachsen — Discord-Blau als Akzent, flaches
 * Grau als Grund. Nebeneinander sahen die drei Seiten aus wie drei Produkte.
 */

.app {
  --bg: #0b0d11;
  --surface: #12151c;
  --surface-2: #191d26;
  --line: #222732;
  --text: #eceef3;
  --muted: #98a1b2;
  --accent: #d97757;
  --gruen: #4ea87b;
  --rot: #da3f3f;
  --gelb: #ddb04a;
  --radius: 12px;

  background:
    radial-gradient(1200px 700px at 8% -10%, #161d2e 0%, transparent 60%),
    radial-gradient(1000px 600px at 96% -4%, #241a1e 0%, transparent 55%),
    #0b0d11;
  background-attachment: fixed;
  min-height: 100vh;
}

.app .topbar {
  height: 60px;
  padding: 0 28px;
  background: rgba(11, 13, 17, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.app .mark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 680;
  font-size: 16px;
  letter-spacing: -0.015em;
  color: var(--text);
}

.app .mark span {
  color: var(--accent);
}

/* Der Akzent lag im alten Satz auf Discord-Blau; auf dem dunklen Grund braucht
   der Hauptknopf jetzt dieselbe dunkle Schrift wie überall sonst. */
.app .btn-primary {
  color: #1a0e08;
  font-weight: 650;
}

.app .btn-primary:hover {
  background: #eb8f6d;
  border-color: #eb8f6d;
}

/* Personalakte --------------------------------------------------------------
 *
 * Seitliches Fenster über der Liste, keine eigene Seite: Wer eine Akte
 * aufschlägt, will meist gleich die nächste sehen — ein Seitenwechsel hin und
 * zurück verlöre dabei jedes Mal die Scrollstelle.
 */

.akte-zeile {
  cursor: pointer;
  transition: background 0.12s ease;
}

.akte-zeile:hover,
.akte-zeile:focus-visible {
  background: rgba(255, 255, 255, 0.04);
  outline: none;
}


/* Wer mehr sieht als andere, soll es an sich selbst ablesen können. */
.betreiber-marke {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(217, 119, 87, 0.12);
  border: 1px solid rgba(217, 119, 87, 0.3);
  border-radius: 99px;
  padding: 2px 8px;
  margin-left: 2px;
}

.betreiber {
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 10;
}

.spacer {
  flex: 1;
}

.user {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 14px;
}

.user img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
}

.view {
  max-width: 940px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.loading,
.empty {
  color: var(--muted);
  text-align: center;
  padding: 48px 0;
}

.pagehead {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}

.pagehead h1 {
  font-size: 24px;
}

.pagehead img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.sub {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 28px;
}

/* Serverliste -------------------------------------------------------------- */

.cards {
  display: grid;
  gap: 10px;
  margin-bottom: 36px;
}

.card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
}

.card img,
.card .fallback {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex: 0 0 auto;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 600;
}

.card-body {
  flex: 1;
  min-width: 0;
}

.card-title {
  font-weight: 500;
}

.card-meta {
  color: var(--muted);
  font-size: 13px;
}

.section-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 12px;
}

/* Zustände ----------------------------------------------------------------- */

.tag {
  display: inline-block;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.tag-ok {
  border-color: #2c5c3d;
  color: #7fd3a0;
}

.tag-warn {
  border-color: #5c4a24;
  color: var(--gelb);
}

/* Reiter und Abschnitte ---------------------------------------------------- */

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
  overflow-x: auto;
}

.tab {
  padding: 10px 14px;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.tab[aria-selected='true'] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 16px;
}

.panel h2 {
  font-size: 16px;
  margin-bottom: 6px;
}

.panel .note {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 18px;
}

/* Formulare ---------------------------------------------------------------- */

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

/* Diese Seite hängt noch an den älteren Farbnamen (--bg, --line, --accent) und
 * überschreibt damit die gemeinsame Fassung aus kopf.css. `textarea` steht
 * bewusst mit in der Liste: Ohne sie sähen die Textbereiche anders aus als die
 * Felder direkt daneben. */
input[type='text'],
input[type='url'],
input[type='number'],
textarea,
select {
  width: 100%;
  padding: 9px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: none;
}

.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}

/* Listen mit Zeilen -------------------------------------------------------- */

.rows {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.rowitem {
  display: grid;
  grid-template-columns: 44px 1fr 200px auto;
  gap: 10px;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
}

.rowitem .lvl {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: center;
  font-size: 13px;
}

.rowitem input,
.rowitem select {
  padding: 6px 10px;
  font-size: 14px;
}

@media (max-width: 640px) {
  .rowitem {
    grid-template-columns: 36px 1fr;
  }
  .rowitem select,
  .rowitem .btn {
    grid-column: 2;
  }
}

/* Kennzahlen --------------------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
}

.stat .label {
  color: var(--muted);
  font-size: 13px;
}

.stat .value {
  font-size: 22px;
  font-weight: 600;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th {
  text-align: left;
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
}

td {
  padding: 8px;
  border-bottom: 1px solid #26282d;
  font-variant-numeric: tabular-nums;
}

tr:last-child td {
  border-bottom: 0;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.dot-on {
  background: var(--gruen);
}
.dot-off {
  background: #5a5f68;
}
.dot-away {
  background: var(--gelb);
}

/* Meldungen ---------------------------------------------------------------- */

.error {
  background: #2a1c1c;
  border: 1px solid #5a2d2d;
  color: #f0a0a0;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  margin-top: 18px;
}

.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 18px;
  font-size: 14px;
  box-shadow: 0 8px 28px rgb(0 0 0 / 45%);
  z-index: 50;
}

.toast.ok {
  border-color: #2c5c3d;
}
.toast.bad {
  border-color: #5a2d2d;
  color: #f0a0a0;
}

/* Startseite, neu ----------------------------------------------------------
 *
 * Die erste Fassung war eine schmale Spalte mit vier grauen Kästen — korrekt,
 * aber nichtssagend. Was fehlte, war Rhythmus: eine Schriftgrößen-Staffel, die
 * den Blick führt, Raum um die Hauptaussage und ein Akzent, der nicht überall
 * gleichzeitig auftritt.
 *
 * Alles unter `.landing`, damit das Dashboard davon nichts abbekommt.
 */

.landing {
  --akzent: #d97757;
  --akzent-hell: #eb8f6d;
  --akzent-tief: #a24f34;
  --karte: #14171e;
  --linie-fein: #232935;

  background:
    radial-gradient(1200px 720px at 50% -12%, #1a2233 0%, transparent 58%),
    radial-gradient(900px 520px at 88% 4%, #241b20 0%, transparent 52%),
    #0b0d11;
  background-attachment: fixed;
  min-height: 100vh;
}

/* Kopfleiste ---------------------------------------------------------------
 *
 * Drei Spalten statt links-rechts: Marke, Bereiche, Konto. Die alte Fassung
 * war eine Marke links und ein Knopf rechts — dazwischen sechzig Prozent
 * Leere, und angemeldet standen drei Elemente ohne Ordnung nebeneinander.
 *
 * Ganz oben ist die Leiste durchsichtig und liegt im Farbverlauf des
 * Kopfbereichs; Rahmen und Milchglas kommen erst beim Scrollen dazu. So
 * schneidet am Seitenanfang keine Kante durch das Bild, und sobald Inhalt
 * darunter durchläuft, hebt sie sich trotzdem ab.
 */

.landing .topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  height: 64px;
  padding: 0 28px;
  border-bottom: 1px solid transparent;
  background: transparent;
  position: sticky;
  top: 0;
  z-index: 30;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.landing .topbar.gescrollt {
  background: rgba(11, 13, 17, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--linie-fein);
}

.landing .marke {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  justify-self: start;
  font-weight: 680;
  font-size: 16px;
  letter-spacing: -0.015em;
  text-decoration: none;
  color: #eceef3;
}

.marke-zeichen {
  width: 21px;
  height: 21px;
  flex: none;
}

.marke-schild {
  fill: rgba(217, 119, 87, 0.14);
  stroke: var(--akzent);
  stroke-width: 1.4;
  stroke-linejoin: round;
}

.marke-stern {
  fill: var(--akzent);
}

.marke-wort span {
  color: var(--akzent);
}

/* Bereiche — auf schmalen Schirmen fällt die Mitte weg, nicht das Konto. */
.kopf-nav {
  display: flex;
  gap: 2px;
}

.kopf-nav a {
  color: #98a1b2;
  text-decoration: none;
  font-size: 13.5px;
  padding: 7px 12px;
  border-radius: 8px;
  transition:
    color 0.14s ease,
    background 0.14s ease;
}

.kopf-nav a:hover {
  color: #eceef3;
  background: rgba(255, 255, 255, 0.05);
}

.kopf-konto {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
}

.link-still {
  color: #98a1b2;
  text-decoration: none;
  font-size: 13.5px;
  transition: color 0.14s ease;
}

.link-still:hover {
  color: #eceef3;
}

/* Angemeldete Person in der Kopfleiste --------------------------------------
 *
 * Ersetzt den Anmeldeknopf, sobald `/api/me` eine Sitzung bestaetigt.
 */

/* Die angemeldete Person als Pille — jetzt anklickbar: Sie öffnet das
 * Kontomenü. Dashboard und Abmelden liegen darin, statt als lose Elemente
 * daneben. Eine Leiste mit drei Dingen rechts sieht nach drei gleich
 * wichtigen Dingen aus; es ist aber eines mit zwei Unterpunkten. */
.nutzer {
  display: flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-size: 13px;
  color: #eceef3;
  padding: 3px 10px 3px 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--linie-fein);
  cursor: pointer;
  transition:
    background 0.14s ease,
    border-color 0.14s ease;
}

.nutzer:hover,
.nutzer[aria-expanded='true'] {
  background: rgba(255, 255, 255, 0.07);
  border-color: #39414f;
}

/* Das Dreieck dreht sich beim Öffnen — der billigste Hinweis darauf, dass
   hier etwas aufklappt und nicht navigiert wird. */
.nutzer-pfeil {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #98a1b2;
  flex: none;
  transition: transform 0.16s ease;
}

.nutzer[aria-expanded='true'] .nutzer-pfeil {
  transform: rotate(180deg);
}

.konto-huelle {
  position: relative;
}

.kontomenue {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 190px;
  padding: 5px;
  border-radius: 12px;
  background: #14171e;
  border: 1px solid var(--linie-fein);
  box-shadow: 0 18px 46px -20px rgba(0, 0, 0, 1);
  display: flex;
  flex-direction: column;
  gap: 1px;
  z-index: 40;
}

.kontomenue a {
  display: block;
  padding: 8px 11px;
  border-radius: 8px;
  color: #d3d8e0;
  text-decoration: none;
  font-size: 13.5px;
  transition:
    background 0.12s ease,
    color 0.12s ease;
}

.kontomenue a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.kontomenue hr {
  border: 0;
  border-top: 1px solid var(--linie-fein);
  margin: 4px 6px;
}

.kontomenue .menue-still {
  color: #8b94a5;
}

.nutzer img {
  width: 24px;
  height: 24px;
  border-radius: 99px;
  flex: none;
}

/* Ohne Bild bleibt der Platz trotzdem besetzt, damit die Pille nicht
 * unterschiedlich hoch wird. */
.nutzer-zeichen {
  width: 24px;
  height: 24px;
  border-radius: 99px;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--akzent-tief);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.nutzer-name {
  font-weight: 600;
  /* Ein sehr langer Discord-Name soll die Leiste nicht auseinanderziehen. */
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Kopfbereich --------------------------------------------------------------- */

.landing main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px 40px;
}

.held {
  text-align: center;
  padding: 92px 0 88px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #98a1b2;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--linie-fein);
  border-radius: 99px;
  padding: 5px 13px 5px 10px;
  margin-bottom: 26px;
}

.chip-punkt {
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: var(--akzent);
  box-shadow: 0 0 0 3px rgba(217, 119, 87, 0.16);
}

.landing h1 {
  font-size: clamp(38px, 6vw, 62px);
  line-height: 1.06;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin: 0 0 22px;
  color: #f3f5f8;
}

.landing h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--akzent-hell), var(--akzent) 55%, #c9a27e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.landing .lead {
  color: #98a1b2;
  font-size: 17.5px;
  line-height: 1.65;
  max-width: 640px;
  margin: 0 auto 34px;
}

.knopfreihe {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.landing .btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border-radius: 11px;
  padding: 12px 22px;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.landing .btn-primary {
  background: var(--akzent);
  border-color: var(--akzent);
  color: #1a0e08;
  box-shadow: 0 8px 26px -12px rgba(217, 119, 87, 0.7);
}

.landing .btn-primary:hover {
  background: var(--akzent-hell);
  border-color: var(--akzent-hell);
  transform: translateY(-1px);
}

.btn-still {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--linie-fein);
  color: #d3d8e0;
}

.btn-still:hover {
  border-color: #39414f;
  color: #fff;
}

.btn-klein {
  padding: 7px 15px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--linie-fein);
  color: #eceef3;
}

.btn-klein:hover {
  border-color: #39414f;
}

.discord {
  width: 18px;
  height: 14px;
  flex: none;
}

.landing .hint {
  color: #626b7c;
  font-size: 13px;
  margin-top: 20px;
}

/* Kacheln ------------------------------------------------------------------- */

.landing .features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
}

.landing .features article {
  background: var(--karte);
  border: 1px solid var(--linie-fein);
  border-radius: 16px;
  padding: 24px 24px 26px;
  transition:
    border-color 0.16s ease,
    transform 0.16s ease;
}

.landing .features article:hover {
  border-color: #313947;
  transform: translateY(-2px);
}

.feature-kopf {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 11px;
}

.feature-symbol {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  font-size: 16px;
  border-radius: 10px;
  background: rgba(217, 119, 87, 0.1);
  border: 1px solid rgba(217, 119, 87, 0.18);
  flex: none;
}

.landing .features h2 {
  font-size: 15.5px;
  font-weight: 650;
  margin: 0;
  letter-spacing: -0.01em;
  color: #eceef3;
}

.landing .features p {
  color: #8b94a5;
  font-size: 13.8px;
  line-height: 1.62;
  margin: 0;
}

/* Abschluss ----------------------------------------------------------------- */

.abschluss {
  text-align: center;
  margin: 72px 0 24px;
  padding: 54px 28px;
  background: linear-gradient(180deg, #14171e 0%, #10131a 100%);
  border: 1px solid var(--linie-fein);
  border-radius: 20px;
}

.abschluss h2 {
  font-size: 27px;
  letter-spacing: -0.025em;
  margin: 0 0 12px;
  color: #f3f5f8;
}

.abschluss p {
  color: #8b94a5;
  margin: 0 auto 26px;
  max-width: 480px;
  font-size: 15px;
}

.abschluss code {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 13px;
  color: var(--akzent-hell);
}

/* Fuß ----------------------------------------------------------------------- */

.fuss {
  max-width: 1120px;
  margin: 0 auto;
  padding: 26px 28px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--linie-fein);
  font-size: 13px;
}

.fuss .marke {
  font-weight: 680;
  color: #8b94a5;
}

.fuss .marke span {
  color: var(--akzent);
}

.fuss-links {
  display: flex;
  gap: 20px;
}

.fuss-links a {
  color: #626b7c;
  text-decoration: none;
  transition: color 0.14s ease;
}

.fuss-links a:hover {
  color: #eceef3;
}

.landing .error {
  margin: 24px auto 0;
  max-width: 460px;
  color: #e8a2a2;
  background: rgba(218, 63, 63, 0.09);
  border: 1px solid rgba(218, 63, 63, 0.24);
  border-radius: 11px;
  padding: 11px 16px;
  font-size: 13.5px;
}

/* Auf schmalen Schirmen fällt die Mitte weg — das Konto rechts ist wichtiger
 * als die Sprungmarken, die man auch durch Scrollen erreicht. */
@media (max-width: 780px) {
  .landing .topbar {
    grid-template-columns: auto 1fr;
    padding: 0 18px;
  }

  .kopf-nav {
    display: none;
  }

  .nutzer-name {
    max-width: 110px;
  }
}

@media (max-width: 640px) {
  .held {
    padding: 60px 0 56px;
  }

  .landing .topbar,
  .landing main,
  .fuss {
    padding-left: 18px;
    padding-right: 18px;
  }
}

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

/* Prüfungen ----------------------------------------------------------------
 *
 * Die erste Fassung war ein Formular: Feld, Feld, roter Knopf, alles gleich
 * laut. Eine Prüfung zu bauen heißt aber, dieselbe Karte zehnmal auszufüllen —
 * dafür muss die Karte ruhig sein und ihre Werkzeuge erst zeigen, wenn sie
 * gemeint ist.
 */

.listenkopf {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}

.listenkopf h1 {
  font-size: 21px;
  letter-spacing: -0.02em;
}

.listenkopf .zahl {
  color: var(--muted);
  font-size: 13.5px;
}

.listenkopf .btn {
  margin-left: auto;
}

.pkarten {
  display: grid;
  gap: 10px;
}

/* Der Streifen links sagt den Zustand, bevor man liest. */
.pkarte {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 15px 16px 15px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition:
    border-color 0.14s ease,
    transform 0.14s ease;
}

.pkarte:hover,
.pkarte:focus-visible {
  border-color: #2e3543;
  transform: translateY(-1px);
  outline: none;
}

.pkarte::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #2e3543;
}

.pkarte.offen::before {
  background: var(--gruen);
}

.pkarte.zu::before {
  background: var(--gelb);
}

.pkarte-text {
  flex: 1;
  min-width: 0;
}

.pkarte-titel {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 3px;
}

.pkarte-meta {
  color: var(--muted);
  font-size: 13px;
}

.pkarte-meta strong {
  color: var(--gelb);
  font-weight: 600;
}

.balken {
  width: 120px;
  flex: none;
  text-align: right;
}

.balken-spur {
  height: 5px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
  margin-bottom: 5px;
}

.balken-fuell {
  height: 100%;
  border-radius: 999px;
  background: var(--gruen);
}

.balken-text {
  font-size: 11.5px;
  color: var(--muted);
}

/* Kopf des Editors --------------------------------------------------------- */

.zurueck {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  background: none;
  border: 0;
  padding: 0;
  margin-bottom: 16px;
  cursor: pointer;
}

.zurueck:hover {
  color: var(--text);
}

.editorkopf {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
}

.editorkopf-text {
  flex: 1;
  min-width: 0;
}

/* Der Titel ist ein Eingabefeld, sieht aber wie eine Überschrift aus, bis man
   ihn anfasst — ein eigenes Formular dafür wäre ein Klick zu viel. */
.titel-feld {
  width: 100%;
  font: inherit;
  font-size: 24px;
  font-weight: 680;
  letter-spacing: -0.025em;
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 3px 8px;
  margin: 0 0 4px -8px;
}

.titel-feld:hover {
  border-color: var(--line);
}

.titel-feld:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg);
}

.kennzahlen {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.kennzahlen b {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.punkt-trenner {
  opacity: 0.45;
}

/* Bestehensgrenze ---------------------------------------------------------- */

.grenze {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 16px;
}

.grenze-titel {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.grenze-titel b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.zahlfeld {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  width: 116px;
}

.zahlfeld button {
  width: 32px;
  height: 34px;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 16px;
  cursor: pointer;
}

.zahlfeld button:hover:not(:disabled) {
  background: var(--surface-2);
  color: var(--text);
}

.zahlfeld input[type='number'] {
  width: 52px;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: center;
  padding: 0;
  -moz-appearance: textfield;
}

.zahlfeld input[type='number']::-webkit-outer-spin-button,
.zahlfeld input[type='number']::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.zahlfeld input:focus {
  outline: none;
}

.schieber {
  width: 100%;
  accent-color: var(--accent);
}

.quote {
  text-align: right;
  min-width: 92px;
}

.quote-zahl {
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.quote-wort {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.grenze-hinweis {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12.5px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin: 2px 0 0;
}

.grenze-hinweis.schlimm {
  color: #f0a5a5;
  border-top-color: #3a2020;
}

/* Fragen ------------------------------------------------------------------- */

.abschnitt {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 26px 0 12px;
}

.fkarte {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px 16px;
  margin-bottom: 10px;
}

.fkarte:hover {
  border-color: #2e3543;
}

.fkopf {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.nummer {
  width: 23px;
  height: 23px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Zwei Möglichkeiten sieht man lieber beide auf einmal als in einer
   Aufklappliste. */
.art {
  display: flex;
  gap: 2px;
  padding: 2px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.art button {
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.art button[aria-pressed='true'] {
  background: var(--surface-2);
  color: var(--text);
}

.art button:disabled {
  cursor: default;
}

.fwerkzeug {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.punktefeld {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12.5px;
}

.punktefeld .zahlfeld {
  width: 96px;
}

.punktefeld .zahlfeld button {
  height: 30px;
  width: 28px;
}

.punktefeld .zahlfeld input[type='number'] {
  width: 40px;
}

/* Werkzeuge zeigen sich erst, wenn die Karte gemeint ist. */
.fknoepfe {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.14s ease;
}

.fkarte:hover .fknoepfe,
.fkarte:focus-within .fknoepfe {
  opacity: 1;
}

.frage-feld {
  width: 100%;
  font: inherit;
  font-size: 15.5px;
  font-weight: 550;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 13px;
  margin-bottom: 12px;
}

.frage-feld:focus {
  outline: none;
  border-color: var(--accent);
}

.frage-feld::placeholder,
.moeglichkeit input::placeholder {
  color: #5b6474;
}

.moeglichkeiten {
  display: grid;
  gap: 6px;
  padding-left: 33px;
}

.moeglichkeit {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Der Buchstabe ist der Knopf: anklicken heißt "das ist die richtige
   Antwort". Einen 14 Pixel großen Radiopunkt trifft auf dem Handy niemand. */
.buchstabe {
  width: 26px;
  height: 26px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid #2e3543;
  background: var(--bg);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  transition:
    background 0.14s ease,
    border-color 0.14s ease,
    color 0.14s ease;
}

.buchstabe:hover:not(:disabled) {
  border-color: #2c5c3d;
  color: #7fd3a0;
}

.moeglichkeit.richtig .buchstabe {
  background: rgba(78, 168, 123, 0.16);
  border-color: #2c5c3d;
  color: #7fd3a0;
}

.moeglichkeit input[type='text'] {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  padding: 7px 12px;
}

.moeglichkeit .btn-icon {
  opacity: 0;
}

.moeglichkeit:hover .btn-icon,
.moeglichkeit:focus-within .btn-icon {
  opacity: 1;
}

.plus-zeile {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
  padding: 6px 11px;
  border: 1px dashed #2e3543;
  border-radius: 8px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}

.plus-zeile:hover {
  border-color: var(--accent);
  color: var(--text);
}

/* Beim Freitext wird gezeigt statt beschrieben, was der Prüfling sieht. */
.vorschau {
  margin-left: 33px;
  padding: 11px 13px;
  border: 1px dashed var(--line);
  border-radius: 9px;
  color: #5b6474;
  font-size: 13px;
  min-height: 62px;
}

.vorschau-fuss {
  margin-left: 33px;
  margin-top: 7px;
  font-size: 12px;
  color: var(--muted);
}

.neue-frage {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.neue-frage button {
  flex: 1;
  padding: 12px;
  border: 1px dashed #2e3543;
  border-radius: 11px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
}

.neue-frage button:hover {
  border-color: var(--accent);
  color: var(--text);
  background: var(--surface);
}

/* Freigabe, Gefahr, Speicherleiste ----------------------------------------- */

.linkzeile {
  display: flex;
  gap: 8px;
}

.linkzeile input {
  flex: 1;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
}

.panel.gefahr {
  display: flex;
  align-items: center;
  gap: 16px;
  border-color: #2a1c1c;
  background: rgba(218, 63, 63, 0.04);
}

.panel.gefahr div {
  flex: 1;
}

.btn-icon {
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}

.btn-icon:hover:not(:disabled) {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--text);
}

.btn-gefahr:hover:not(:disabled) {
  border-color: #5e2626;
  background: rgba(218, 63, 63, 0.12);
  color: #f0a5a5;
}

.btn-gut.aktiv {
  border-color: #2c5c3d;
  background: rgba(78, 168, 123, 0.14);
  color: #7fd3a0;
}

.btn-gefahr.aktiv {
  border-color: #5e2626;
  background: rgba(218, 63, 63, 0.12);
  color: #f0a5a5;
}

.speicherleiste {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px 10px 18px;
  background: rgba(18, 21, 28, 0.94);
  backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid #2e3543;
  border-radius: 13px;
  box-shadow: 0 18px 40px -18px rgb(0 0 0 / 90%);
  font-size: 13px;
  z-index: 55;
}

/* `hidden` ist ein Attribut, `display: flex` eine Klasse — die Klasse gewinnt.
   Ohne diese Regel steht "Nicht gespeichert" da, bevor irgendetwas geändert
   wurde, und die Leiste verliert genau das, wofür es sie gibt. */
.speicherleiste[hidden] {
  display: none;
}

.speicherleiste .punkt {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gelb);
}

/* Meldung und Speicherleiste stehen beide unten in der Mitte. Ist die Leiste
   da, rückt die Meldung darüber, statt sich mit ihr zu überlagern. */
body.mit-leiste .toast {
  bottom: 84px;
}

/* Rückfrage ---------------------------------------------------------------- */

.dialog-schicht {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(6, 8, 11, 0.7);
  backdrop-filter: blur(3px);
}

.dialog {
  width: min(430px, 100%);
  background: var(--surface);
  border: 1px solid #2e3543;
  border-radius: 14px;
  padding: 24px 26px 20px;
  box-shadow: 0 30px 70px -30px rgb(0 0 0 / 100%);
}

.dialog h2 {
  font-size: 17px;
  margin-bottom: 8px;
}

.dialog p {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.dialog strong {
  color: var(--text);
}

.dialog-knoepfe {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* Bewertung eines Versuchs -------------------------------------------------- */

.ergebniskarte {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  margin-bottom: 18px;
}

.ergebniskarte.gut {
  border-color: #2c5c3d;
  background: rgba(78, 168, 123, 0.08);
}

.ergebniskarte.schlecht {
  border-color: #5a2d2d;
  background: rgba(218, 63, 63, 0.06);
}

.ergebniskarte.offen {
  border-color: #5c4a24;
  background: rgba(221, 176, 74, 0.05);
}

.ergebnis-links {
  flex: 1;
}

.ergebnis-zahl {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.ergebnis-wort {
  margin-top: 2px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  color: var(--muted);
}

.ergebniskarte.gut .ergebnis-wort {
  color: #7fd3a0;
}

.ergebniskarte.schlecht .ergebnis-wort {
  color: #e8a2a2;
}

.ergebniskarte.offen .ergebnis-wort {
  color: var(--gelb);
}

.ergebnis-quote {
  font-size: 20px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.akarte {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 2px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 10px;
}

.akarte.richtig {
  border-left-color: var(--gruen);
}

.akarte.falsch {
  border-left-color: var(--rot);
}

.akarte.offen {
  border-left-color: var(--gelb);
}

.afrage {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
}

.ppunkte {
  flex: none;
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.agewaehlt {
  display: flex;
  gap: 12px;
  margin-left: 33px;
  padding: 9px 0;
  font-size: 13.5px;
  border-top: 1px solid var(--line);
}

.alabel {
  width: 92px;
  flex: none;
  color: var(--muted);
  font-size: 12.5px;
}

.agewaehlt.loesung span:last-child {
  color: #7fd3a0;
}

.atext {
  margin-left: 33px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.aknoepfe {
  display: flex;
  gap: 8px;
  margin: 10px 0 0 33px;
}

@media (max-width: 720px) {
  .grenze {
    grid-template-columns: 1fr auto;
  }

  .fwerkzeug {
    width: 100%;
    margin-left: 33px;
  }

  .fkopf {
    flex-wrap: wrap;
  }

  .balken {
    display: none;
  }
}

/* Übersicht ----------------------------------------------------------------
 *
 * Fünf nackte Zahlen nebeneinander wurden regelmäßig missverstanden — „Inaktiv
 * 0" las sich wie ein Fehler, obwohl es die beste Nachricht der Seite ist.
 * Jede Zahl bekommt deshalb einen Satz, der sie einordnet.
 */

/* Fünf Karten, eine Reihe. `auto-fit` brach bei knapp tausend Pixeln in
   4 + 1 um, und eine einzelne Karte in der zweiten Zeile sieht aus wie ein
   Fehler. Erst wenn wirklich kein Platz mehr ist, wird umgebrochen. */
.kennzahlen {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px;
  margin-bottom: 22px;
}

.kz {
  padding: 15px 16px;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
}

.kz-titel {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #626b7c;
  margin-bottom: 8px;
}

.kz-zahl {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.kz-unter {
  margin-top: 5px;
  font-size: 12px;
  color: var(--muted);
}

.kz.gruen .kz-zahl {
  color: #7fd3a0;
}

.kz.warn .kz-zahl {
  color: var(--gelb);
}

/* Panels mit eigener Kopfzeile tragen ihren Rand innen, damit Tabellen bis an
   die Kante laufen können. */
.panel:has(.panel-kopf) {
  padding: 0;
}

.panel-kopf {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.panel-kopf h3 {
  font-size: 14.5px;
  font-weight: 600;
}

.panel-kopf .zahl {
  color: #626b7c;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.panel-kopf .rechts {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.suchfeld {
  width: 220px;
  padding: 7px 11px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.suchfeld:focus {
  outline: none;
  border-color: var(--accent);
}

.tabellenrolle {
  overflow-x: auto;
}

/* Kompakt: Bei fünf Leuten im Dienst soll die Liste eine Liste bleiben und
   nicht den halben Bildschirm füllen. */
.dienstzeile {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 7px 16px;
  border-bottom: 1px solid #1a1e27;
}

.dienstzeile:last-child {
  border-bottom: 0;
}

.avatar {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  flex: none;
}

.dname {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
}

.dname b {
  font-weight: 550;
  font-size: 13.5px;
  display: block;
}

.dname span {
  font-size: 11.5px;
  color: #626b7c;
}

.laeuft {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #7fd3a0;
}

.puls {
  width: 6px;
  height: 6px;
}

.puls {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gruen);
  box-shadow: 0 0 0 3px rgba(78, 168, 123, 0.16);
}

.dienstnr,
.rangzelle {
  color: var(--muted);
}

.dienstnr {
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
}

/* Statt eines grauen Punktes, den niemand deuten konnte: der letzte Dienst als
   Text. Grau hieß bloß "gerade nicht eingestempelt". */
.zuletzt {
  color: #626b7c;
  font-size: 12.5px;
}

.zuletzt.lang {
  color: var(--gelb);
}

/* Dienstzeit als Balken: 170 Stunden neben 13 sagen als Zahl wenig,
   nebeneinander gestellt sofort etwas. */
.zeitzelle {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.zeitbalken {
  width: 78px;
  height: 4px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
  flex: none;
}

.zeitbalken div {
  height: 100%;
  border-radius: 999px;
  background: #3d6ea8;
}

.stunden {
  font-variant-numeric: tabular-nums;
  min-width: 62px;
  text-align: right;
}

/* Personalakte als Fenster -------------------------------------------------
 *
 * Der schmale Rand gab nur eine Spalte her; die Akte besteht aber aus zwei
 * Dingen, die man nebeneinander sehen will — die Laufbahn und was zuletzt im
 * Dienst passiert ist.
 */

.fenster-schicht {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: start center;
  padding: 40px 20px;
  overflow-y: auto;
  background: rgba(6, 8, 11, 0.66);
  backdrop-filter: blur(3px);
}

.fenster {
  width: min(880px, 100%);
  background: var(--surface);
  border: 1px solid #2e3543;
  border-radius: 16px;
  box-shadow: 0 40px 90px -40px rgb(0 0 0 / 100%);
  overflow: hidden;
}

.fenster-kopf {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #161a23, var(--surface));
}

.favatar {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  object-fit: cover;
}

.fkopf-text {
  flex: 1;
  min-width: 0;
}

.fkopf-text h2 {
  font-size: 19px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 9px;
}

.fkopf-text .unter {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.akte-zahlen {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
}

.akte-zahl {
  padding: 11px 13px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 11px;
}

.akte-zahl .t {
  font-size: 10.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #626b7c;
}

.akte-zahl .v {
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  margin-top: 3px;
}

.fenster-koerper {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
}

.fenster-koerper .spalte {
  padding: 18px 22px 24px;
  min-width: 0;
}

.fenster-koerper .spalte + .spalte {
  border-left: 1px solid var(--line);
  background: #10131a;
}

.fenster-koerper .abschnitt {
  margin: 0 0 12px;
}

.fenster-koerper .abschnitt ~ .abschnitt {
  margin-top: 26px;
}

/* Laufbahn als Zeitstrahl — die Reihenfolge ist die Aussage. */
.strahl {
  position: relative;
  padding-left: 22px;
}

.strahl::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: var(--line);
}

.ereignis {
  position: relative;
  padding-bottom: 16px;
}

.ereignis::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--line);
}

.ereignis.hoch::before {
  background: var(--gruen);
  box-shadow: 0 0 0 1px #2c5c3d;
}

.ereignis.runter::before {
  background: var(--rot);
  box-shadow: 0 0 0 1px #5a2d2d;
}

.eintrag {
  padding-bottom: 14px;
}

.ekopf {
  display: flex;
  align-items: baseline;
  gap: 9px;
  flex-wrap: wrap;
}

.ekopf .was {
  font-weight: 550;
}

.ekopf .wann {
  color: #626b7c;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  margin-left: auto;
}

.warum {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 2px;
}

/* Wer es getan hat, lag immer schon in der Datenbank und wurde nie gezeigt. */
.wer {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  padding: 2px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11.5px;
  color: var(--muted);
  background: var(--bg);
}

/* Stempel-Log --------------------------------------------------------------- */

.tag-gruppe {
  margin-bottom: 16px;
}

.tag-kopf {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 7px;
}

.tag-kopf b {
  font-size: 12.5px;
  font-weight: 600;
}

.tag-kopf span {
  margin-left: auto;
  font-size: 11.5px;
  color: #626b7c;
  font-variant-numeric: tabular-nums;
}

.schicht {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 6px;
  font-size: 13px;
}

.schicht .spanne {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.schicht .dauer {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* Wie eine Schicht endete, ist bei Streit die entscheidende Angabe. */
.schicht .art {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: #626b7c;
}

.schicht .art.auto {
  border-color: #5c4a24;
  color: var(--gelb);
}

.schicht .art.jetzt {
  border-color: #2c5c3d;
  color: #7fd3a0;
}

.leer {
  color: #626b7c;
  font-size: 12.5px;
  padding: 6px 0 14px;
}

/* Schalter ------------------------------------------------------------------ */

.schalterzeile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 11px;
}

.schalter {
  width: 38px;
  height: 22px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  position: relative;
  cursor: pointer;
}

.schalter::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 19px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #1a0e08;
  transition: left 0.14s ease;
}

.schalter.aus {
  background: var(--surface-2);
  border: 1px solid #2e3543;
}

.schalter.aus::after {
  left: 3px;
  background: #626b7c;
}

.stext {
  flex: 1;
}

.stext b {
  font-weight: 550;
  display: block;
}

.stext span {
  font-size: 12.5px;
  color: var(--muted);
}

.rollenwahl {
  padding: 12px 0 0 50px;
}

@media (max-width: 880px) {
  .kennzahlen {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .kz-zahl {
    font-size: 22px;
  }
}

@media (max-width: 860px) {
  .fenster-koerper {
    grid-template-columns: 1fr;
  }

  .fenster-koerper .spalte + .spalte {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .suchfeld {
    width: 150px;
  }
}

/* Mehrere richtige Antworten sind erlaubt — gesagt werden muss es trotzdem,
   sonst sucht der Prüfling die eine und übersieht die zweite. */
.mehrfach-hinweis {
  font-size: 12px;
  color: var(--gelb);
  margin: 0 0 8px;
}

/* Einstellungen ------------------------------------------------------------
 *
 * Alle fünf Reiter nach demselben Muster: links steht, was es ist, rechts die
 * Einstellung. Vorher stand die Erklärung als Fließtext im Label über dem Feld
 * und wurde überlesen.
 */

.ezeile {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(0, 1.35fr);
  gap: 20px;
  align-items: start;
  padding: 15px 18px;
  border-bottom: 1px solid #1a1e27;
}

.ezeile:last-of-type {
  border-bottom: 0;
}

.etext b {
  font-weight: 550;
  display: block;
  margin-bottom: 2px;
}

.etext span {
  color: var(--muted);
  font-size: 12.5px;
}

.esteuer {
  min-width: 0;
}

.zweispalt {
  display: flex;
  gap: 10px;
}

.mini {
  color: #626b7c;
  font-size: 11.5px;
  margin: 6px 0 0;
}

.mini b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.mahnung {
  color: var(--gelb);
}

/* Auswähler: Chips statt Listenfeld ---------------------------------------- */

.waehler-huelle {
  position: relative;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px 5px 10px;
  border-radius: 999px;
  border: 1px solid #2e3543;
  background: var(--bg);
  font-size: 12.5px;
}

.chip i,
.wzeile i,
.wahl-knopf i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}

.chip i.ohne,
.wzeile i.ohne,
.wahl-knopf i.ohne {
  background: #3b4352;
}

.chip button {
  border: 0;
  background: none;
  color: #626b7c;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 0 1px;
}

.chip button:hover {
  color: #f0a5a5;
}

.chip.warn {
  border-color: #5c4a24;
}

.chip-plus {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px dashed #2e3543;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}

.chip-plus:hover {
  border-color: var(--accent);
  color: var(--text);
}

.wahl-knopf {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
  text-align: left;
}

.wahl-knopf:hover {
  border-color: #2e3543;
}

.wahl-knopf.leer {
  border-style: dashed;
  color: #626b7c;
}

.wahl-knopf.warn {
  border-color: #5c4a24;
  color: var(--gelb);
}

.wahl-knopf .wname {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wahl-knopf .pfeil {
  margin-left: auto;
  color: #626b7c;
  font-size: 10px;
}

/* Die Liste liegt über allem anderen — auch über der Speicherleiste, die
   sonst genau dort steht, wo man gerade auswählt. */
.waehler-panel {
  position: absolute;
  z-index: 60;
  top: calc(100% + 6px);
  left: 0;
  width: min(340px, 100%);
  min-width: 260px;
  background: var(--surface);
  border: 1px solid #2e3543;
  border-radius: 11px;
  box-shadow: 0 24px 50px -24px rgb(0 0 0 / 90%);
  overflow: hidden;
}

.waehler-suche {
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.waehler-suche:focus {
  outline: none;
}

.waehler-liste {
  max-height: 210px;
  overflow-y: auto;
  padding: 5px;
}

.wzeile {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
}

.wzeile:hover {
  background: var(--surface-2);
}

.wzeile .wname {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wzeile .wgruppe {
  color: #626b7c;
  font-size: 11.5px;
}

.wzeile .whinweis {
  margin-left: auto;
  padding-left: 8px;
  color: var(--gelb);
  font-size: 11px;
  white-space: nowrap;
}

.wzeile.gewaehlt {
  background: rgba(217, 119, 87, 0.1);
}

.wzeile.gewaehlt::after {
  content: '✓';
  margin-left: auto;
  color: #7fd3a0;
}

.wleer {
  color: #626b7c;
  font-size: 12.5px;
  padding: 12px 10px;
  margin: 0;
}

.waehler-fuss {
  width: 100%;
  padding: 9px;
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}

.waehler-fuss:hover {
  background: var(--surface-2);
  color: #f0a5a5;
}

/* Ränge --------------------------------------------------------------------- */

.rangzeile {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) minmax(0, 260px) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 18px;
  border-bottom: 1px solid #1a1e27;
}

.stufe {
  width: 30px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.rknoepfe {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.14s ease;
}

.rangzeile:hover .rknoepfe,
.rangzeile:focus-within .rknoepfe {
  opacity: 1;
}

.fussleiste {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border-top: 1px solid var(--line);
  background: #10131a;
}

.fussleiste .hinweis {
  color: var(--muted);
  font-size: 12.5px;
}

/* Channels ------------------------------------------------------------------ */

.gruppe-titel {
  padding: 14px 18px 8px;
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #626b7c;
}

/* Fraktion: Vorschau -------------------------------------------------------- */

.stamm {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
}

.stamm-vorschau {
  border-left: 1px solid var(--line);
  background: #10131a;
  padding: 18px;
}

.vorschau-titel {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #626b7c;
  margin: 0 0 12px;
}

/* Ein Aushang, wie Discord ihn zeigt — damit Farbe und Wappen ihre Wirkung
   zeigen, statt als Hex-Wert im Feld zu stehen. */
.aushang {
  border-radius: 8px;
  background: #1a1d24;
  border-left: 4px solid #3d6ea8;
  padding: 13px 15px;
}

.aushang-kopf {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 9px;
}

.aushang-wappen {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  flex: none;
}

.aushang-wappen img,
.bildvorschau img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.aushang b {
  font-size: 13.5px;
}

.aushang-fraktion {
  font-size: 11.5px;
  color: #626b7c;
}

.azeile {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  padding: 3px 0;
}

.azeile span:last-child {
  color: var(--text);
  text-align: right;
}

.farbzeile {
  display: flex;
  gap: 9px;
  align-items: center;
}

.farbtupfer {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid #2e3543;
  border-radius: 9px;
  background: var(--bg);
  flex: none;
  cursor: pointer;
}

.bildzeile {
  display: flex;
  gap: 10px;
  align-items: center;
}

.bildvorschau {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  overflow: hidden;
  border: 1px dashed #2e3543;
  background: var(--bg);
  display: grid;
  place-items: center;
  color: #626b7c;
  font-size: 11px;
  flex: none;
}

input.falsch {
  border-color: #5a2d2d;
}

/* Verwarnungen -------------------------------------------------------------- */

.stufenzeile {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) minmax(0, 230px) 240px auto;
  gap: 10px;
  align-items: center;
  padding: 11px 18px;
  border-bottom: 1px solid #1a1e27;
}

.stufenname {
  font-weight: 550;
}

.dauer {
  display: flex;
  gap: 4px;
}

.dauer button {
  flex: 1;
  padding: 7px 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.dauer button:hover {
  border-color: #2e3543;
}

.dauer button[aria-pressed='true'] {
  border-color: var(--accent);
  background: rgba(217, 119, 87, 0.1);
  color: var(--text);
}

.dauer input[type='number'] {
  width: 54px;
  flex: none;
  padding: 7px 6px;
  text-align: center;
  font-size: 12px;
}

/* Die Speicherleiste der Einstellungen läuft mit dem Inhalt, statt über der
   Seite zu kleben — hier ist sie Teil des Formulars, nicht des Fensters. */
.speicherleiste.einstellung {
  position: sticky;
  left: auto;
  bottom: 16px;
  transform: none;
  margin-top: 16px;
}

.leiste-rechts {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

@media (max-width: 820px) {
  .ezeile,
  .stamm {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .stamm-vorschau {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .rangzeile,
  .stufenzeile {
    grid-template-columns: 34px 1fr auto;
    row-gap: 8px;
  }

  .rangzeile > div[data-rrolle],
  .stufenzeile > div[data-wrolle],
  .stufenzeile .dauer {
    grid-column: 1 / -1;
  }

  .rknoepfe {
    opacity: 1;
  }
}

/* Berichtsvorlagen ---------------------------------------------------------- */
/*
 * Eine Karte je Vorlage: oben Name und Kennung, darunter die Felder, unten der
 * Aufbau. Bewusst keine eigene Optik erfunden — dieselben Kästen, Abstände und
 * Farben wie in den Verwarnungsstufen daneben, damit der Reiter nicht wie ein
 * anderes Programm aussieht.
 */

.vorlage {
  border-bottom: 1px solid #1a1e27;
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vorlage:last-of-type {
  border-bottom: 0;
}

.vorlage-kopf {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px auto;
  gap: 10px;
  align-items: center;
}

.vorlage-name {
  font-weight: 550;
}

/* Die Kennung steht nie im Bericht — sie verbindet nur Feld und Platzhalter.
   Deshalb leiser als der Name daneben. */
.vorlage-kennung,
.vfeld-id {
  font-family: var(--mono, ui-monospace, "Cascadia Mono", Consolas, monospace);
  font-size: 12px;
  color: var(--muted);
}

.vorlage-hinweis {
  font-size: 13px;
}

.vorlage-felder {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  align-items: flex-start;
}

.vfeld {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 170px auto auto;
  gap: 8px;
  align-items: center;
  width: 100%;
}

.vfeld-pflicht {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.vorlage-aufbau {
  font-family: var(--mono, ui-monospace, "Cascadia Mono", Consolas, monospace);
  font-size: 12.5px;
  line-height: 1.65;
  resize: vertical;
}

/* Zweiwegschalter in den Einstellungen.
 *
 * Der Satz aus dem Prüfungseditor war hier falsch: Er zog sich über die ganze
 * Spalte, und der gewählte Zustand unterschied sich nur um eine Spur Grau.
 * Hier trägt die gewählte Seite die Akzentfarbe — auf einen Blick zu sehen,
 * ohne die Beschriftung zu lesen.
 */
.wahlreihe {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 11px;
}

.wahlreihe button {
  padding: 7px 18px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition:
    background 0.14s ease,
    color 0.14s ease;
}

.wahlreihe button:hover {
  color: var(--text);
}

.wahlreihe button[aria-pressed='true'] {
  background: var(--accent);
  color: #1a0e08;
  font-weight: 600;
}

/* Stempelkarte auf der Serverliste ------------------------------------------
 *
 * Die Stempeluhr gehört jedem Mitglied, nicht nur der Leitung — deshalb steht
 * sie auf der Seite, die auch ohne Verwaltungsrecht erreichbar ist.
 */
.stempelkarte {
  border-left: 2px solid var(--line);
}

.stempelkarte.imdienst {
  border-left-color: var(--gruen);
  background: linear-gradient(90deg, rgba(78, 168, 123, 0.06), var(--surface) 40%);
}

.stempelkarte .stempelknopf {
  flex: none;
}

/* Der Ausstempel-Knopf in "Gerade im Dienst" zeigt sich erst beim Überfahren:
   Er beendet die Schicht eines anderen, das soll kein Versehen sein. */
.dienstzeile .btn-icon {
  opacity: 0;
  transition: opacity 0.14s ease;
}

.dienstzeile:hover .btn-icon,
.dienstzeile:focus-within .btn-icon {
  opacity: 1;
}
