/* Verwaltung der Homepage – eigenes, schlichtes Aussehen. Unabhängig von der Gestaltung der Homepage. */
@font-face {
  font-family: Inter;
  src: url(../assets/fonts/InterVariable.woff2) format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --blau: #1f5baa;
  --blau-dunkel: #184a8c;
  --blau-hell: #e9f1fb;
  --grund: #f3f5f9;
  --karte: #fff;
  --rand: #d7dee8;
  --text: #17202e;
  --leise: #5b6676;
  --rot: #b42318;
  --rot-hell: #fdeceb;
  --gruen: #166b43;
  --gruen-hell: #e6f5ec;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--grund);
  line-height: 1.5;
}
a { color: var(--blau); }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 .5rem; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; margin: 0 0 .8rem; }
code { background: #eef1f6; border-radius: 4px; padding: .05em .35em; font-size: .92em; }
.nur-vorleser { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Kopf */
.kopf { background: #fff; border-bottom: 1px solid var(--rand); position: sticky; top: 0; z-index: 20; }
.kopf-innen { max-width: 1180px; margin: 0 auto; padding: .6rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.kopf-titel { text-decoration: none; color: var(--text); display: flex; flex-direction: column; line-height: 1.2; }
.kopf-titel strong { font-size: 1.05rem; }
.kopf-titel span { font-size: .8rem; color: var(--leise); }
.kopf-rechts { display: flex; gap: .5rem; align-items: center; }
.kopf-rechts form { margin: 0; }
.kopf-wer { font-size: .85rem; color: var(--leise); max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.haken { display: flex; align-items: flex-start; gap: .5rem; margin: 0 0 1rem; font-size: .95rem; }
.haken input { width: 1.15rem; height: 1.15rem; margin-top: .15rem; flex: none; }
.zeilen-knoepfe { text-align: right; white-space: nowrap; }
.zeilen-knoepfe form { display: inline-block; margin: .15rem 0 .15rem .3rem; }

/* ---------- Aufbau */
.rahmen { max-width: 1180px; margin: 0 auto; padding: 1.25rem 1rem 6rem; display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 2rem; align-items: start; }
.schmal .rahmen { grid-template-columns: minmax(0, 1fr); max-width: 30rem; padding-top: 3rem; }
.inhalt { min-width: 0; }
.einleitung { color: var(--leise); margin: 0 0 1.25rem; max-width: 46rem; }

.menue { position: sticky; top: 4.6rem; font-size: .95rem; }
.menue summary { display: none; }
.menue a { display: block; padding: .45rem .7rem; border-radius: 8px; color: var(--text); text-decoration: none; }
.menue a:hover { background: #e7ebf2; }
.menue a.aktiv { background: var(--blau-hell); color: var(--blau-dunkel); font-weight: 600; }
.menue-gruppe { margin: 1rem 0 .25rem; padding: 0 .7rem; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--leise); }

/* ---------- Karten, Meldungen */
.karte, .teil { background: var(--karte); border: 1px solid var(--rand); border-radius: 14px; padding: 1.25rem; margin-bottom: 1.25rem; }
.meldung { border-radius: 10px; padding: .8rem 1rem; margin: 0 0 1.25rem; border: 1px solid; }
.meldung ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.meldung-erfolg { background: var(--gruen-hell); border-color: #b5dfc7; color: #0f4d30; }
.meldung-fehler { background: var(--rot-hell); border-color: #f3c1bc; color: #7a1a12; }
.meldung-info { background: var(--blau-hell); border-color: #c4d7f2; color: #173f73; }
.meldung a { color: inherit; font-weight: 600; }
.klein-text { font-size: .9rem; margin: 1rem 0 0; }
.leise-text { color: var(--leise); font-size: .9rem; }

/* ---------- Knöpfe */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  min-height: 44px; padding: .5rem 1.1rem; border-radius: 10px;
  border: 1px solid var(--rand); background: #fff; color: var(--text);
}
.knopf:hover { background: #f0f3f8; }
.knopf:focus-visible, .dateiwahl:focus-within, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 3px solid #8fb5ea; outline-offset: 1px;
}
.knopf.haupt { background: var(--blau); border-color: var(--blau); color: #fff; padding-left: 1.6rem; padding-right: 1.6rem; }
.knopf.haupt:hover { background: var(--blau-dunkel); }
.knopf.klein { min-height: 36px; padding: .3rem .8rem; font-size: .9rem; }
.knopf.winzig { min-height: 34px; min-width: 34px; padding: 0 .4rem; font-size: .95rem; border-radius: 8px; }
.knopf.leise { background: transparent; }
.knopf.gefahr:hover { background: var(--rot-hell); border-color: #eaa9a2; color: var(--rot); }
.knopf.neu { border-style: dashed; color: var(--blau-dunkel); background: #fafcff; }
.knopf[disabled] { opacity: .5; cursor: default; }

/* ---------- Felder */
.feld { display: block; margin: 0 0 1rem; }
.feld-name { display: block; font-size: .88rem; font-weight: 600; margin-bottom: .3rem; }
.pflicht { color: var(--rot); }
.hilfe { display: block; font-size: .84rem; color: var(--leise); margin-top: .3rem; font-weight: 400; }
p.hilfe { margin: 0 0 .7rem; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=time], input[type=number], textarea, select {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text);
  background: #fff; border: 1px solid #b9c3d1; border-radius: 9px; padding: .55rem .7rem; min-height: 44px;
}
textarea { resize: vertical; line-height: 1.45; }
input.schmal { max-width: 7rem; }
.feld-kurz { max-width: 20rem; }
.festwert { display: block; color: var(--leise); }
.schmal-form { max-width: 24rem; }

fieldset.gruppe { border: 1px solid var(--rand); border-radius: 12px; padding: 1rem 1rem .2rem; margin: 0 0 1rem; }
fieldset.gruppe legend { font-weight: 700; padding: 0 .4rem; }
details.technisch { margin-top: .5rem; border-top: 1px dashed var(--rand); padding-top: .8rem; }
details.technisch summary { cursor: pointer; color: var(--leise); font-size: .9rem; margin-bottom: .8rem; }

/* ---------- Listen */
.liste { margin: 0 0 1.25rem; }
.liste-name { font-weight: 700; margin-bottom: .5rem; }
.liste-leer { color: var(--leise); font-style: italic; margin: 0 0 .6rem; }
.eintraege { counter-reset: eintrag; }
.eintrag { counter-increment: eintrag; }
.eintrag-karte { border: 1px solid var(--rand); border-radius: 12px; padding: .9rem 1rem .1rem; margin-bottom: .8rem; background: #fbfcfe; }
.eintrag-kopf { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .6rem; }
.eintrag-name { font-weight: 700; font-size: .9rem; color: var(--leise); }
.eintrag-name.zaehlt::after { content: " " counter(eintrag); }
.eintrag-knoepfe { display: inline-flex; gap: .3rem; flex: none; }

.liste-reihe > .eintraege > .eintrag { display: flex; gap: .6rem; align-items: flex-end; margin-bottom: .6rem; }
.liste-reihe > .eintraege > .eintrag > .eintrag-felder { display: flex; flex-wrap: wrap; gap: .6rem; flex: 1; min-width: 0; }
.liste-reihe > .eintraege > .eintrag > .eintrag-felder > .feld { margin: 0; flex: 1 1 11rem; max-width: none; }
.liste-reihe > .eintraege > .eintrag > .eintrag-felder > .feld-kurz { flex: 0 1 10rem; }
.liste-reihe > .eintraege > .eintrag > .eintrag-knoepfe { padding-bottom: 5px; }

.liste-fest > .eintraege > .eintrag-fest { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: .5rem 1.25rem; padding: 1rem 0 .2rem; border-top: 1px solid var(--rand); }
.liste-fest > .eintraege > .eintrag-fest:first-child { border-top: 0; padding-top: .2rem; }
.liste-fest .eintrag-kopf { align-items: flex-start; margin: 0; padding-top: 1.7rem; }
.liste-fest .eintrag-name { font-size: 1rem; color: var(--text); }
.liste-fest .liste-name { display: none; }
.liste-fest .liste { margin-bottom: .6rem; }

/* ---------- Fotos und Dateien */
.datei-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; }
.bild-vorschau { width: 128px; height: 96px; object-fit: cover; border-radius: 10px; border: 1px solid var(--rand); background: #eef1f6; }
.datei-leer { color: var(--leise); font-style: italic; }
.datei-knoepfe { display: inline-flex; gap: .4rem; flex-wrap: wrap; }
.dateiwahl { position: relative; overflow: hidden; }
.dateiwahl input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; font-size: 0; }
.hochlade-status { font-size: .88rem; color: var(--leise); flex-basis: 100%; }
.hochlade-status.fehler { color: var(--rot); font-weight: 600; }
.datei-name { font-weight: 600; word-break: break-all; }

/* ---------- Speichern */
.speicherleiste {
  position: sticky; bottom: 0; z-index: 10;
  display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem;
  background: #fff; border: 1px solid var(--rand); border-radius: 14px; padding: .8rem 1rem;
  box-shadow: 0 -6px 20px rgba(23, 32, 46, .08);
}
.speicher-hinweis { color: var(--leise); font-size: .92rem; }
.speicher-hinweis.offen { color: #8a5a00; font-weight: 600; }

/* ---------- Übersicht */
.lage-zeile { margin: 0 0 .4rem; }
.lage-zeile:last-child { margin-bottom: 0; }
.punkt { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; background: #9aa5b5; margin-right: .5rem; }
.punkt-offen { background: #1fa463; }
.kachel-titel { margin: 1.6rem 0 .7rem; font-size: 1rem; color: var(--leise); }
.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .8rem; }
.kacheln-gross { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.kachel { display: flex; flex-direction: column; gap: .3rem; background: #fff; border: 1px solid var(--rand); border-radius: 14px; padding: 1rem 1.1rem; text-decoration: none; color: var(--text); }
.kachel:hover { border-color: var(--blau); box-shadow: 0 4px 14px rgba(31, 91, 170, .1); }
.kachel strong { color: var(--blau-dunkel); }
.kacheln-gross .kachel strong { font-size: 1.1rem; }
.kachel span { font-size: .86rem; color: var(--leise); }

/* ---------- Tabellen, Hilfe */
.tabelle { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tabelle th { text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--leise); padding: .4rem .6rem; border-bottom: 1px solid var(--rand); }
.tabelle td { padding: .55rem .6rem; border-bottom: 1px solid #edf0f5; vertical-align: middle; }
.tabelle tr:last-child td { border-bottom: 0; }
.tabelle form { margin: 0; }
.hilfe-text p, .hilfe-text ol { margin: 0 0 .7rem; max-width: 46rem; }
.hilfe-text ol { padding-left: 1.3rem; }

/* ---------- Protokoll, Stand eines Zugangs */
.stand { display: inline-block; font-size: .78rem; font-weight: 600; line-height: 1.35; padding: .1rem .55rem; border-radius: 999px; border: 1px solid var(--rand); background: #f3f5f9; color: var(--leise); white-space: nowrap; }
.stand-ok { background: var(--gruen-hell); border-color: #b5dfc7; color: #0f4d30; }
.stand-wartet { background: #fff4d6; border-color: #ecd28a; color: #6b4a00; }
.stand-fehler { background: var(--rot-hell); border-color: #f3c1bc; color: #7a1a12; }
.stand-blau { background: var(--blau-hell); border-color: #c4d7f2; color: #173f73; }
.klein-link { font-size: .85rem; }
.karte.wartend { border-color: #ecd28a; background: #fffbef; }
.wartend-zeile { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; padding: .8rem 0; border-top: 1px solid #f0e2b4; }
.wartend-zeile:last-child { padding-bottom: 0; }
.wartend-zeile .zeilen-knoepfe { flex: none; }
.ohne-abstand { margin: 0; }
.filter { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; }
.filter a { display: inline-block; padding: .3rem .8rem; border-radius: 999px; border: 1px solid var(--rand); background: #fff; color: var(--text); text-decoration: none; font-size: .9rem; }
.filter a:hover { background: #f0f3f8; }
.filter a.aktiv { background: var(--blau-hell); border-color: #c4d7f2; color: var(--blau-dunkel); font-weight: 600; }
.tabelle-rollen { overflow-x: auto; }
.tabelle.alle-spalten { min-width: 660px; }
.tabelle.klein-schrift { font-size: .88rem; }
.tabelle.klein-schrift td { padding: .45rem .6rem; vertical-align: top; }
.tabelle.verlauf { table-layout: fixed; min-width: 640px; }
.tabelle.verlauf th:nth-child(1) { width: 10.5rem; }
.tabelle.verlauf th:nth-child(2) { width: 13.5rem; }
.tabelle.verlauf th:nth-child(4) { width: 7.5rem; }
.tabelle.verlauf td { overflow-wrap: anywhere; }
.tabelle.verlauf .stand { white-space: normal; }
.tabelle.verlauf .leise-text { font-size: inherit; }
.nicht-umbrechen { white-space: nowrap; }
.protokoll-fuss { margin: 1rem 0 0; }

/* ---------- Handy */
@media (max-width: 820px) {
  .rahmen { grid-template-columns: minmax(0, 1fr); gap: 1rem; padding-bottom: 5rem; }
  .menue { position: static; background: #fff; border: 1px solid var(--rand); border-radius: 14px; padding: .3rem .5rem; }
  .menue summary { display: block; cursor: pointer; font-weight: 700; padding: .55rem .5rem; }
  .menue-klapp[open] { padding-bottom: .5rem; }
  .kopf-titel span { display: none; }
  .kopf-wer { display: none; }
  .zeilen-knoepfe { white-space: normal; }
  .kopf-rechts .knopf { white-space: nowrap; font-size: .82rem; padding: .3rem .6rem; }
  .kopf-innen { gap: .5rem; }
  .liste-fest > .eintraege > .eintrag-fest { grid-template-columns: minmax(0, 1fr); }
  .liste-fest .eintrag-kopf { padding-top: 0; }
  .feld-kurz { max-width: none; }
  .karte, .teil { padding: 1rem; }
  .tabelle th:nth-child(2), .tabelle td:nth-child(2) { display: none; }
  .tabelle.alle-spalten th:nth-child(2), .tabelle.alle-spalten td:nth-child(2) { display: table-cell; }
  .wartend-zeile .zeilen-knoepfe { text-align: left; }
  .wartend-zeile .zeilen-knoepfe form { margin-left: 0; margin-right: .3rem; }
  /* Tabellen des Protokolls: am Handy jede Zeile als Block untereinander statt nebeneinander */
  .tabelle.stapel { min-width: 0; table-layout: auto; }
  .tabelle.stapel thead { display: none; }
  .tabelle.stapel tr { display: block; padding: .65rem 0; border-bottom: 1px solid #edf0f5; }
  .tabelle.stapel tr:first-child { padding-top: 0; }
  .tabelle.stapel tr:last-child { border-bottom: 0; padding-bottom: 0; }
  .tabelle.stapel td, .tabelle.alle-spalten.stapel td:nth-child(2) { display: block; padding: .12rem 0; border: 0; }
  .tabelle.stapel td[data-titel]::before { content: attr(data-titel) ": "; color: var(--leise); }
}
