:root { color-scheme: light dark; }
* { box-sizing: border-box; }
html { overflow-y: scroll; }
/* ⚠️ **Nicht** vertikal zentrieren (place-items: center): Sobald sich die
 * Höhe der Karte ändert — Autofill-Zeile, Fehlermeldung, Vorschlagsliste —,
 * rutscht eine zentrierte Karte nach oben oder unten. Am 29.11. sprang die
 * Anmeldung bei jeder Eingabe. Deshalb: fester Abstand von oben, die Karte
 * wächst nur nach unten. */
body { margin: 0; min-height: 100vh; padding: 24px; background: #f4f5f7;
  color: #1b1d21;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
main { width: 100%; max-width: 380px; margin: 7vh auto 0; background: #fff;
  padding: 28px; border-radius: 12px; box-shadow: 0 2px 18px rgba(0, 0, 0, .09); }
main.breit { max-width: 820px; margin-top: 3vh; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; margin: 4px 0 16px; }
th, td { text-align: left; padding: 7px 6px; border-bottom: 1px solid #e3e6ea; }
th { font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; color: #5b616a; }
td.warn { color: #a61b1b; }
td small { font-size: .78rem; color: #6b727c; }

/* Verwaltung: Kopf mit Anmeldezeile und Reitern bleibt oben stehen,
 * der Inhalt nutzt die ganze Browserbreite. */
/* Links die Untermenüs der Hauptkategorie. */
body.weit { padding: 0 0 0 220px; }
.seitenleiste { position: fixed; top: 0; left: 0; bottom: 0; width: 220px;
  padding: 14px 10px; background: #fff; border-right: 1px solid #e3e6ea; }
.seitenleiste .marke { font-weight: 700; padding: 4px 8px 14px; }
.seitenleiste nav { display: flex; flex-direction: column; gap: 2px; }
.seitenleiste a, .seitenleiste span { display: block; padding: 8px 10px;
  border-radius: 6px; text-decoration: none; color: #444a52; font-size: .95rem; }
.seitenleiste a:hover { background: #eef1f5; }
.seitenleiste .aktiv { background: #2b6cb0; color: #fff; font-weight: 600; }
.kopf { position: sticky; top: 0; z-index: 5; background: #fff;
  border-bottom: 1px solid #e3e6ea; }
@media (max-width: 820px) {
  body.weit { padding-left: 0; }
  .seitenleiste { display: none; }
}
.kopf-zeile { display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 10px 24px; }
.kopf-zeile form { margin: 0; }
.kopf-zeile button { width: auto; padding: 7px 14px; font-size: .9rem; }
main.inhalt { width: 100%; max-width: none; margin: 0; padding: 18px 24px 36px;
  background: transparent; box-shadow: none; border-radius: 0; }
.nur-leser { position: absolute; left: -9999px; }
.reiter { display: flex; gap: 4px; margin: 0; padding: 0 24px;
  border-bottom: 1px solid #e3e6ea; }
.reiter span, .reiter a { padding: 8px 12px; border-bottom: 2px solid transparent;
  text-decoration: none; color: #5b616a; font-weight: 600; font-size: .95rem; }
.reiter .aktiv { color: #1b1d21; border-bottom-color: #2b6cb0; }
td.schalter { display: flex; gap: 6px; }
td.schalter form { margin: 0; }
td.schalter button { width: auto; padding: 5px 12px; font-size: .85rem;
  background: #e8ebf0; color: #1b1d21; }
td.schalter button:hover { background: #d8dce3; }
td.schalter button.aktiv { background: #2b6cb0; color: #fff; }
h2 { font-size: 1.05rem; margin: 26px 0 8px; }
.gefahr { background: #a61b1b; }
.gefahr:hover { background: #8a1515; }
.knopf { display: inline-block; padding: 9px 14px; border-radius: 8px;
  background: #2b6cb0; color: #fff; text-decoration: none; font-weight: 600; }
.knopf:hover { background: #245a94; }
.badge { display: inline-block; min-width: 18px; padding: 1px 6px; border-radius: 9px;
  background: #c62828; color: #fff; font-size: .75rem; font-weight: 700;
  text-align: center; vertical-align: 1px; }
.rechtwahl { display: inline-flex; align-items: center; gap: 4px; margin-right: 12px;
  font-size: .9rem; }
.rechtwahl input { width: auto; }
.statusform { margin: 0; display: flex; gap: 6px; align-items: center; }
.statusform select { width: auto; padding: 4px 6px; font: inherit; border-radius: 6px;
  border: 1px solid #c8ccd2; }
.statusform button { width: auto; padding: 4px 10px; font-size: .85rem; }
form { margin: 0; }
td form button { width: auto; }
pre { white-space: pre-wrap; word-break: break-word; background: #f4f5f7;
  padding: 12px; border-radius: 8px; font-size: .8rem; }
.hostwahl { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 6px 0 12px; }
.hostwahl label { font-size: .95rem; }
.bannerform { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap;
  margin-bottom: 10px; }
.bannerform label { font-size: .9rem; }
.bannerform input { width: 120px; }
h1 { margin: 0 0 18px; font-size: 1.35rem; }
p { margin: 0 0 14px; line-height: 1.45; }
label { display: block; font-size: .95rem; }
input { width: 100%; margin-top: 4px; padding: 10px 12px; font: inherit;
  border: 1px solid #c8ccd2; border-radius: 8px; background: #fff; color: inherit; }
input:focus { outline: 2px solid #2b6cb0; outline-offset: 1px; }
button { width: 100%; padding: 10px 12px; font: inherit; font-weight: 600;
  color: #fff; background: #2b6cb0; border: 0; border-radius: 8px; cursor: pointer; }
button:hover { background: #245a94; }
small { color: #555b63; }
[role="alert"] { color: #a61b1b; }
@media (prefers-color-scheme: dark) {
  body { background: #16181c; color: #e7e9ec; }
  main { background: #1f2227; box-shadow: 0 2px 18px rgba(0, 0, 0, .5); }
  input { background: #16181c; border-color: #3a3f47; }
  small { color: #a7adb7; }
  [role="alert"] { color: #ff8a8a; }
  th, td { border-color: #3a3f47; }
  th { color: #a7adb7; }
  td.warn { color: #ff8a8a; }
  td small { color: #a7adb7; }
  .kopf { background: #1f2227; border-bottom-color: #3a3f47; }
  .seitenleiste { background: #1f2227; border-right-color: #3a3f47; }
  .seitenleiste a, .seitenleiste span { color: #c9ced6; }
  .seitenleiste a:hover { background: #2a2e34; }
  td.schalter button { background: #2a2e34; color: #e7e9ec; }
  td.schalter button:hover { background: #343941; }
  pre { background: #16181c; }
  .reiter { border-bottom-color: #3a3f47; }
  .reiter span, .reiter a { color: #a7adb7; }
  .reiter .aktiv { color: #e7e9ec; }
}

:root { color-scheme: dark; }
body { background: #15121c; color: #e6e8eb; }
main { background: #1e1a28; border: 1px solid #2c2739;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
h1, h2 { color: #f2f4f7; }
a { color: #9aa6ff; }
input, select { background: #17131f; border-color: #37304a; color: #e6e8eb; }
button { background: #6c5ce7; }
button:hover { background: #5a4bd1; }
.gefahr { background: #c0392b; }
.gefahr:hover { background: #a33224; }
.knopf { background: #6c5ce7; }
.knopf:hover { background: #5a4bd1; }
.seitenleiste { background: #191524; border-right: 1px solid #2a2438; }
.seitenleiste .marke { color: #c9b8ff; letter-spacing: .04em; }
.seitenleiste a { color: #b9bfc7; }
.seitenleiste a:hover { background: #241e33; }
.seitenleiste .aktiv { background: #2a2440; color: #fff;
  box-shadow: inset 3px 0 0 #8f7bff; }
.kopf { background: #191524; border-bottom: 1px solid #2a2438; }
.reiter a, .reiter span { color: #9aa2ad; }
.reiter .aktiv { color: #fff; border-bottom-color: #8f7bff; }
table th { color: #9aa2ad; }
table th, table td { border-bottom: 1px solid #2a2438; }
td small { color: #9aa2ad; }
pre { background: #17131f; color: #cfd4db; }
.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px; margin: 8px 0 18px; }
.karte2 { background: #1e1a28; border: 1px solid #2c2739; border-radius: 12px;
  padding: 16px; }
.karte2 h3 { margin: 0 0 8px; font-size: .95rem; color: #c7ccd3; font-weight: 600; }
.karte2 h3 small { color: #7d8590; font-weight: 500; }
.kpi { font-size: 1.7rem; font-weight: 700; color: #fff; line-height: 1.15; }
.kpi small { font-size: .8rem; color: #9aa2ad; font-weight: 500; }
.zeile { display: flex; justify-content: space-between; align-items: center;
  gap: 10px; margin: 10px 0 4px; font-size: .85rem; color: #b9bfc7; }
progress { width: 100%; height: 8px; appearance: none; -webkit-appearance: none;
  border: 0; border-radius: 6px; background: #2a2438; overflow: hidden; }
progress::-webkit-progress-bar { background: #2a2438; border-radius: 6px; }
progress::-webkit-progress-value { background: linear-gradient(90deg, #6c5ce7, #8f7bff);
  border-radius: 6px; }
progress::-moz-progress-bar { background: #6c5ce7; border-radius: 6px; }
.warnung { color: #ff8a8a; }
.punkt { display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  margin-left: 8px; vertical-align: 1px; float: right; }
.punkt.an { background: #2ecc71; box-shadow: 0 0 6px rgba(46, 204, 113, .8); }
.punkt.aus { background: #e74c3c; }
.oberhaupt { display: inline-block; margin-left: 6px; padding: 1px 8px;
  border-radius: 9px; background: #3a2f12; color: #ffd166; font-size: .72rem;
  font-weight: 700; letter-spacing: .02em; vertical-align: 1px; }
