/* crAIze Monitor – gemeinsames Aussehen von Statusseite, Patchstand, Anmeldung und Konfiguration.
   CI von crAIze Labs (Richtung E, wie craize.de, craize.club, craize.io): Tinte und Papier als Grund, Archivo für
   Überschriften, Public Sans für Text, keine Verläufe, kein Leuchten. Zustände in den Bedeutungsfarben des CI
   (Fehler, Warnung, Erfolg, Info) – nie Farbe allein, immer mit Zeichen oder Wort.
   Ohne Klasse „hell“ gilt die dunkle Ansicht (thema.js setzt die Klasse nach Wahl oder System). */
@font-face { font-family: "Archivo"; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%;
  src: url("/schrift/archivo-latin-wdth-normal.woff2") format("woff2-variations"), url("/schrift/archivo-latin-wdth-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("/schrift/public-sans-latin-wght-normal.woff2") format("woff2-variations"), url("/schrift/public-sans-latin-wght-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; src: url("/schrift/jetbrains-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  /* Dunkel: Tinte als Grund, Papier als Schrift */
  --bg: #151925; --flaeche: #1c2131; --flaeche-2: #242a3c;
  --text: #efe9dd; --text-2: #cbc4b5; --text-3: #a8a194;
  --line: rgba(239, 233, 221, 0.12); --line-strong: rgba(239, 233, 221, 0.26);
  --akzent: #efe9dd; --akzent-tinte: #151925;
  /* Bedeutungsfarben: Schrift/Zeichen und Hintergrund; Warnung nur als Fläche mit Tinte */
  --fehler: #f08a9a; --fehler-bg: #3a1f28;
  --warn: #f0cf4a; --warn-bg: #3a3318; --warn-tinte: #1b2236;
  --erfolg: #82c79f; --erfolg-bg: #1d3328;
  --info: #a3bde3; --info-bg: #212c42;
  --auf-farbe: #151925;           /* Zeichen auf einer Bedeutungsfarbe */
  --feldrand: rgba(239, 233, 221, 0.40);   /* Eingabefelder: mind. 3:1 zur Karte */
  --warn-strich: var(--warn);     /* Warnbalken/-kanten; hell in Tinte, weil Gelb auf Papier verschwindet */
  --radius: 10px; --radius-s: 6px;
  --display: "Archivo", "Segoe UI", system-ui, sans-serif;
  --body: "Public Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", Consolas, monospace;
  color-scheme: dark;
}
html.hell {
  /* Hell: Papier als Grund, Tinte als Schrift */
  --bg: #f6f3ec; --flaeche: #eee8dc; --flaeche-2: #e5ddcd;
  --text: #1b2236; --text-2: #3d4459; --text-3: #5b6174;
  --line: rgba(27, 34, 54, 0.12); --line-strong: rgba(27, 34, 54, 0.26);
  --akzent: #1b2236; --akzent-tinte: #f6f3ec;
  --fehler: #a3233a; --fehler-bg: #f5dfe0;
  --warn: #f0cf4a; --warn-bg: #f7e7a6; --warn-tinte: #1b2236;
  --erfolg: #2f6b4a; --erfolg-bg: #dcebe0;
  --info: #3b5b8c; --info-bg: #e0e6f0;
  --auf-farbe: #f6f3ec;
  --feldrand: rgba(27, 34, 54, 0.55);
  --warn-strich: #1b2236;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--akzent); color: var(--akzent-tinte); }
a { color: var(--text); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; border-radius: var(--radius-s); }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: min(1200px, calc(100% - 32px)); margin: 0 auto; padding: 22px 0 60px; }

/* --- Kopf: Wortmarke cr▲Ize + MONITOR, Navigation, hell/dunkel ------------------- */
header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding-bottom: 18px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: baseline; gap: 10px; color: var(--text); text-decoration: none; }
.wm { white-space: nowrap; font-family: var(--display); font-weight: 800; font-stretch: 87%; font-size: 26px; letter-spacing: -0.02em; line-height: 1; }
.a-glyph { height: 0.72em; width: 0.79em; vertical-align: baseline; margin: 0 0.035em 0 0.02em; fill: currentColor; }
.brand .zusatz { font: 600 13px var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.nav a, .nav button:not(.ansicht) { color: var(--text-2); text-decoration: none; padding: 8px 14px; border-radius: 999px; border: 1px solid transparent; background: none; font: 500 15px var(--body); cursor: pointer; }
.nav a:hover, .nav button:not(.ansicht):hover { color: var(--text); border-color: var(--line-strong); }
.nav a.aktiv { color: var(--text); border-color: var(--line-strong); background: var(--flaeche); font-weight: 600; }
.ansicht { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; margin-left: 6px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); cursor: pointer; padding: 0; }
.ansicht:hover { border-color: var(--text-3); }
.ansicht .i-mond { display: none; }
html.hell .ansicht .i-sonne { display: none; }
html.hell .ansicht .i-mond { display: block; }
.ansicht.ecke { position: fixed; top: 16px; right: 16px; }

/* --- Server-Karte -------------------------------------------------------------- */
.server { border: 1px solid var(--line); border-top: 4px solid var(--line-strong); border-radius: var(--radius); padding: 22px 24px 24px; margin-bottom: 20px; background: var(--flaeche); }
.server.ok { border-top-color: var(--erfolg); }
.server.warnung { border-top-color: var(--warn-strich); }
.server.kritisch { border-top-color: var(--fehler); }
.server.info { border-top-color: var(--info); }
.server.stumm { border-top-color: var(--warn-strich); }
/* Veraltet: Die Zahlen sind alt – sie sollen nicht wie ein frischer guter Stand aussehen */
.server.stumm .kacheln, .server.stumm .verlauf, .server.stumm .liste, .server.stumm .punkt, .server.stumm details { opacity: .55; }
.kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; margin-bottom: 18px; }
.kopf h2 { margin: 0; font-family: var(--display); font-stretch: 90%; font-size: 24px; font-weight: 750; letter-spacing: -0.015em; line-height: 1.1; display: flex; align-items: center; gap: 12px; }
.stand { font-size: 14px; color: var(--text-2); }
.server.kritisch .stand { color: var(--fehler); font-weight: 600; }
.stand.alt { color: var(--warn-tinte); background: var(--warn); padding: 2px 10px; border-radius: 999px; font-weight: 600; }

/* Zustandszeichen: Kreis in der Bedeutungsfarbe mit Zeichen – ✓ in Ordnung, ! Warnung, × kritisch, i Hinweis */
.ampel { --gr: 20px; width: var(--gr); height: var(--gr); flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font: 800 calc(var(--gr) * .62)/1 var(--body); font-style: normal; color: var(--auf-farbe); background: var(--text-3); }
.ampel::after { content: "i"; }
.ampel.ok { background: var(--erfolg); }
.ampel.ok::after { content: ""; width: calc(var(--gr) * .22); height: calc(var(--gr) * .42); border: solid currentColor; border-width: 0 calc(var(--gr) * .11) calc(var(--gr) * .11) 0; transform: translateY(-8%) rotate(45deg); }
.ampel.warnung { background: var(--warn); color: var(--warn-tinte); }
html.hell .ampel.warnung { border: 1.5px solid var(--warn-tinte); } .ampel.warnung::after { content: "!"; }
.ampel.kritisch { background: var(--fehler); } .ampel.kritisch::after { content: "×"; font-size: calc(var(--gr) * .8); }
.ampel.info, .ampel.stumm { background: var(--info); } .ampel.info::after, .ampel.stumm::after { content: "i"; font-family: var(--display); }
.ampel.stumm::after { content: "?"; }

/* Kennzahlen */
.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 18px; }
.kachel { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: var(--bg); }
.kachel small { display: block; font: 600 12.5px var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); margin-bottom: 6px; }
.kachel strong { font-family: var(--display); font-stretch: 90%; font-size: 24px; font-weight: 750; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.kachel em { font-style: normal; color: var(--text-3); font-size: 13px; margin-left: 4px; }
.kachel.warnung { border-left: 4px solid var(--warn-strich); } .kachel.kritisch { border-left: 4px solid var(--fehler); } .kachel.info { border-left: 4px solid var(--info); }
.kachel.lang strong { font-size: 16px; letter-spacing: 0; display: block; line-height: 1.3; }
.kachel.lang em { margin-left: 0; display: block; margin-top: 2px; }
.balken { height: 4px; border-radius: 2px; background: var(--line); margin-top: 10px; overflow: hidden; }
.balken i { display: block; height: 100%; background: var(--text-2); }
.balken.warnung { background: var(--warn); } .balken.warnung i { background: var(--warn-tinte); } .balken.kritisch i { background: var(--fehler); }

/* 24-Stunden-Verlauf */
.verlauf { display: grid; grid-template-columns: repeat(288, 1fr); align-items: end; gap: 1px; height: 26px; margin: 4px 0 18px; border-radius: var(--radius-s); overflow: hidden; background: var(--bg); }
/* nicht nur Farbe: in Ordnung halbe Höhe, Warnung und kritisch volle Höhe */
.verlauf i { background: var(--line); height: 25%; }
.verlauf i.ok { background: var(--erfolg); height: 45%; } .verlauf i.info, .verlauf i.stumm { background: var(--info); height: 45%; }
.verlauf i.warnung { background: var(--warn); height: 100%; } .verlauf i.kritisch { background: var(--fehler); height: 100%; }
html.hell .verlauf i.warnung { border-top: 4px solid var(--warn-tinte); }
.verlauf-label { display: flex; justify-content: space-between; font: 600 12px var(--body); color: var(--text-3); letter-spacing: .16em; text-transform: uppercase; }

/* Prüfpunkte: Hinweiskasten – 4 px Balken links in der Bedeutungsfarbe, Fläche im zugehörigen Hintergrund, Schrift Tinte */
.liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px; }
.punkt { display: grid; grid-template-columns: 18px 1fr; gap: 12px; align-items: start; padding: 11px 14px 11px 12px; border-radius: var(--radius-s); border: 1px solid var(--line); border-left: 4px solid var(--line-strong); background: var(--bg); }
.punkt .ampel { --gr: 18px; margin-top: 1px; }
.punkt b { font-weight: 650; font-size: 14.5px; display: block; }
.punkt span { color: var(--text-2); font-size: 13.5px; overflow-wrap: anywhere; }
.punkt.ok { border-left-color: var(--erfolg); } .punkt.ok span, .punkt.info span { color: var(--text-3); }
.punkt.info, .punkt.stumm { border-left-color: var(--info); }
.punkt.warnung { background: var(--warn-bg); border-color: transparent; border-left-color: var(--warn-strich); }
.punkt.kritisch { border-left-color: var(--fehler); background: var(--fehler-bg); border-color: transparent; border-left-color: var(--fehler); }
.punkt.warnung span, .punkt.kritisch span { color: var(--text); }

details summary { cursor: pointer; font: 600 13px var(--body); color: var(--text-3); letter-spacing: .16em; text-transform: uppercase; margin: 16px 0 10px; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: ""; display: inline-block; margin: 0 8px 1px 1px; border-style: solid; border-width: 4.5px 0 4.5px 7px; border-color: transparent transparent transparent currentColor; transition: transform .15s; }
details[open] summary::before { transform: rotate(90deg); }
details summary:hover { color: var(--text); }
.leer { color: var(--text-3); padding: 40px; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius); }
footer { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-3); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.meta { font-size: 13px; color: var(--text-3); display: inline-flex; align-items: center; gap: 8px; }
.meta i { width: 8px; height: 8px; border-radius: 50%; background: var(--erfolg); display: inline-block; }
@media (max-width: 600px) { .verlauf { gap: 0; } .server { padding: 18px 16px; } .kachel strong { font-size: 20px; } .liste { grid-template-columns: 1fr; } .wm { font-size: 22px; } }

/* --- Formulare ----------------------------------------------------------------- */
.karte { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; background: var(--flaeche); }
.karte h2 { margin: 0 0 4px; font-family: var(--display); font-stretch: 90%; font-size: 21px; font-weight: 750; letter-spacing: -0.015em; }
.karte > p { margin: 0 0 18px; color: var(--text-3); font-size: 14px; }
.karte h2 + .raster { margin-top: 18px; }
.raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px 18px; }
.feld { display: grid; gap: 6px; align-content: start; min-width: 0; }
.feld.breit { grid-column: 1 / -1; }
.feld.doppelt { grid-column: span 2; }
.feld label, .feld .label { font: 600 12.5px var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 22px; }
.feld label em, .feld .label em { font-style: normal; color: var(--text-3); text-transform: none; letter-spacing: 0; font-weight: 400; }
.feld small { color: var(--text-3); font-size: 13px; }
.feld .meldung { color: var(--fehler); font-size: 13px; display: none; }
.feld.fehler .meldung { display: block; }
input, select, textarea { width: 100%; background: var(--bg); border: 1px solid var(--feldrand); border-radius: var(--radius-s); color: var(--text); font: 15px/1.4 var(--body); padding: 10px 12px; }
select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23a8a194' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-position: calc(100% - 14px) 50%; background-size: 12px 8px; background-repeat: no-repeat; padding-right: 36px; }
html.hell select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%235b6174' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
select option { background: var(--bg); color: var(--text); }
textarea { font-variant-ligatures: none; font-family: var(--mono); font-size: 13px; min-height: 88px; resize: vertical; white-space: pre; overflow-x: auto; }
input::placeholder { color: var(--text-3); font-style: italic; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--akzent); outline-offset: 1px; border-color: var(--akzent); }
.feld.fehler input, .feld.fehler select, .feld.fehler textarea { border-color: var(--fehler); }
.nurlesen { font-family: var(--mono); font-size: 13px; color: var(--text-2); padding: 10px 12px; border: 1px dashed var(--feldrand); border-radius: var(--radius-s); overflow-wrap: anywhere; min-height: 42px; }

/* Etiketten (Zustand als Wort) */
.marke { font: 600 12px/1.6 var(--body); letter-spacing: .08em; text-transform: uppercase; padding: 1px 9px; border-radius: 999px; white-space: nowrap; color: var(--text-2); background: var(--flaeche-2); }
.marke.ok { color: var(--erfolg); background: var(--erfolg-bg); }
.marke.warnung { color: var(--warn-tinte); background: var(--warn); }
.marke.kritisch { color: var(--fehler); background: var(--fehler-bg); }
.marke.info, .marke.stumm { color: var(--info); background: var(--info-bg); }

/* Knöpfe: primär Tinte mit Papier-Schrift, sonst nur Rahmen */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); font: 600 15px var(--body); cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--text-3); }
.btn.primaer { background: var(--akzent); border-color: var(--akzent); color: var(--akzent-tinte); }
.btn.primaer:hover { background: color-mix(in srgb, var(--akzent) 86%, #808080); }
.btn.klein { min-height: 34px; padding: 0 14px; font-size: 14px; white-space: nowrap; }
.btn.leise-knopf { border-color: var(--line); color: var(--text-2); }
.btn[disabled], .btn:disabled, .btn.primaer:disabled { opacity: .45; cursor: not-allowed; }
.leiste { position: sticky; bottom: 12px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--flaeche); margin-bottom: 20px; }
.leiste .zustand { margin-left: auto; font-size: 13px; color: var(--text-3); }
.leiste .zustand.offen { color: var(--warn-tinte); background: var(--warn); padding: 2px 10px; border-radius: 999px; font-weight: 600; }
.leiste.ruhig { position: static; background: transparent; border-style: dashed; }

/* Hinweiskästen */
.box { border-radius: var(--radius-s); border-left: 4px solid var(--line-strong); padding: 12px 14px; margin-bottom: 16px; font-size: 14.5px; color: var(--text); background: var(--flaeche-2); }
.box[hidden] { display: none; }
.box.ok { border-left-color: var(--erfolg); background: var(--erfolg-bg); }
.box.fehler { border-left-color: var(--fehler); background: var(--fehler-bg); }
.box.info { border-left-color: var(--warn-strich); background: var(--warn-bg); }
.box.ok::before, .box.fehler::before, .box.info::before { font-weight: 800; margin-right: 6px; }
.box.ok::before { content: "Erledigt:"; } .box.fehler::before { content: "Fehler:"; } .box.info::before { content: "Hinweis:"; }
pre.ausgabe { font-variant-ligatures: none; margin: 10px 0 0; padding: 12px; border-radius: var(--radius-s); background: var(--bg); border: 1px solid var(--line); color: var(--text-2); font: 12.5px/1.55 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 360px; overflow: auto; }

/* --- Anmeldung ----------------------------------------------------------------- */
.anmeldung { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.anmeldung .karte { width: min(420px, 100%); margin: 0; padding: 30px; }
.anmeldung .brand { margin-bottom: 26px; }
.anmeldung h1 { margin: 0 0 6px; font-family: var(--display); font-stretch: 90%; font-size: 30px; font-weight: 750; letter-spacing: -0.015em; }
.anmeldung p { margin: 0 0 22px; color: var(--text-3); font-size: 15px; }
.anmeldung form { display: grid; gap: 16px; }
.anmeldung .btn { width: 100%; margin-top: 4px; }
@media (max-width: 640px) { .feld.doppelt { grid-column: 1 / -1; } .karte { padding: 18px; } .leiste { gap: 8px; padding: 10px; } .leiste .btn { padding: 0 12px; font-size: 14px; } .leiste .zustand { margin-left: 0; width: 100%; } }

/* --- Patchstand ---------------------------------------------------------------- */
.tabelle { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.tabelle table { border-collapse: collapse; width: 100%; font-size: 14px; }
.tabelle th { text-align: left; font: 600 12px var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tabelle td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--text-2); }
.tabelle tr:last-child td { border-bottom: 0; }
.tabelle td b { color: var(--text); font-weight: 600; }
.mono { font-family: var(--mono); font-size: 12.5px; font-variant-ligatures: none; }
.leise { color: var(--text-3); font-size: 13px; }
.leise.fuss { margin-top: 10px; }
.neu { color: var(--erfolg); font-weight: 600; }
.teil { display: inline-block; margin: 0 14px 2px 0; white-space: nowrap; }
h3.abschnitt { margin: 24px 0 10px; font: 600 13px var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); }
.anwendung { margin-bottom: 16px; }
.anwendung h3 { margin: 0 0 8px; font: 750 16px var(--display); font-stretch: 90%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.anwendung h3 .leise { font-family: var(--body); font-weight: 400; }
.anwendung details summary { margin: 8px 0; }
.server > .liste { margin-bottom: 4px; }
.hinweis-projekt { margin: 8px 0 4px; padding: 10px 12px; border-left: 4px solid var(--warn-strich); border-radius: var(--radius-s); background: var(--warn-bg); font-size: 13.5px; color: var(--text); line-height: 1.5; }
.hinweis-projekt code { font-family: var(--mono); font-size: 12px; color: var(--text); }

/* --- Einspielen ---------------------------------------------------------------- */
.einspielen { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); margin-bottom: 6px; }
.einspielen .zeile { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.einspielen .zeile:last-child { border-bottom: 0; }
.einspielen .zeile b { display: block; font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; }
.einspielen label.zeile { justify-content: flex-start; cursor: pointer; }
.einspielen label.zeile > div { flex: 1; min-width: 0; }
.einspielen label.zeile .leise { display: block; font-size: 13px; margin-top: 2px; }
.einspielen input[type=checkbox] { width: 18px; height: 18px; flex: none; accent-color: var(--akzent); margin: 0; }
.einspielen .zeile.drin { cursor: default; } .einspielen .zeile.drin b { color: var(--text-2); }
.einspielen .zeile.fuss { justify-content: flex-end; background: var(--flaeche); border-radius: 0 0 var(--radius) var(--radius); }
.einspielen details.einzeln { display: block; padding: 0; }
.einspielen details.einzeln > summary { margin: 0; padding: 11px 14px; }
.einspielen details.einzeln[open] > summary { border-bottom: 1px solid var(--line); }
.einspielen details.einzeln label.zeile { padding-left: 30px; }
.einspielen details.einzeln label.zeile:last-child { border-bottom: 0; }
dialog { width: min(520px, calc(100% - 32px)); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 26px; background: var(--flaeche); color: var(--text); }
dialog::backdrop { background: rgba(21, 25, 37, .72); }
dialog h2 { margin: 0 0 10px; font: 750 21px var(--display); font-stretch: 90%; letter-spacing: -0.015em; overflow-wrap: anywhere; }
dialog p, dialog .dfolge { margin: 0 0 18px; color: var(--text-2); font-size: 14.5px; line-height: 1.55; }
dialog .knoepfe { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
#ausgabeMeldung { color: var(--text-2); margin: 0 0 4px; }
#verlaufKarte { margin-bottom: 20px; }
ol.schlange { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
ol.schlange li { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
ol.schlange li:last-child { border-bottom: 0; }
ol.schlange li > div { flex: 1; min-width: 0; }
ol.schlange li b { display: block; font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; }
ol.schlange li .leise { display: block; font-size: 13px; margin-top: 2px; overflow-wrap: anywhere; }
ol.schlange li.laeuft { background: var(--info-bg); }
ol.schlange li.laeuft b::before { content: ""; display: inline-block; width: 8px; height: 8px; margin: 0 8px 1px 0; border-radius: 50%; background: var(--fehler); }
#schlangeKarte .knoepfe { display: flex; justify-content: flex-end; margin-top: 12px; }
ul.dliste { list-style: none; margin: 12px 0 0; padding: 0; max-height: 40vh; overflow: auto; }
ul.dliste li { padding: 8px 0; border-top: 1px solid var(--line); }
ul.dliste li b { display: block; color: var(--text); font-size: 14px; }
ul.dliste li span { display: block; font-size: 13px; }
@media (max-width: 640px) { ol.schlange li { flex-wrap: wrap; } }
/* Übersicht der Server (Status und Patchstand): eine Zeile je Server, das Schlimmste oben */
.uebersicht { border: 1px solid var(--line); border-radius: var(--radius); background: var(--flaeche); padding: 18px 20px 12px; margin-bottom: 24px; }
.ue-kopf { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 10px; }
.ue-kopf h2 { margin: 0; font-family: var(--display); font-stretch: 90%; font-size: 20px; font-weight: 750; letter-spacing: -0.01em; }
.ue-zaehler { font-size: 14px; color: var(--text-2); }
.schalter { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--text-2); cursor: pointer; user-select: none; }
.schalter input { width: 18px; height: 18px; margin: 0; accent-color: var(--akzent); cursor: pointer; }
.ue-liste { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto repeat(var(--spalten), auto) auto; column-gap: 22px; }
.ue-liste li { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; border-top: 1px solid var(--line); }
.ue-liste li.ue-titel { border-top: 0; font: 600 12px var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); padding: 0 10px 6px; }
.ue-liste li > a { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center; padding: 10px; margin: 0; color: inherit; text-decoration: none; border-radius: var(--radius-s); }
.ue-liste li > a:hover { background: var(--flaeche-2); }
.ue-liste .ampel { --gr: 18px; }
.ue-name { min-width: 0; display: flex; flex-direction: column; }
.ue-name b { font-weight: 650; }
.ue-was { font-size: 14px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ue-liste li.ruhig .ue-was { color: var(--text-3); }
.ue-status { font-size: 14px; font-weight: 600; }
.ue-liste li.kritisch .ue-status { color: var(--fehler); }
.ue-liste li.warnung .ue-status { color: var(--warn-tinte); background: var(--warn); padding: 1px 9px; border-radius: 999px; justify-self: start; }
.ue-liste li.stumm .ue-status { color: var(--info); }
.ue-wert { font-variant-numeric: tabular-nums; white-space: nowrap; display: flex; flex-direction: column; }
.ue-wert small { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }  /* nur für Screenreader */
.ue-wert b { font-weight: 600; }
.ue-wert em { font-style: normal; font-size: 12.5px; color: var(--text-3); }
.ue-alt { font-size: 13.5px; color: var(--text-3); white-space: nowrap; }
.ue-bruch { display: none; }
.ue-leer, .ue-ausgeblendet { display: none; margin: 10px 10px 4px; font-size: 14px; color: var(--text-2); align-items: center; gap: 10px; }
.ue-leer .ampel { --gr: 18px; }
.nur-probleme .ue-leer, .nur-probleme .ue-ausgeblendet { display: flex; }
.nur-probleme .ue-liste li.ruhig, .nur-probleme .server.ruhig:not(.gezielt) { display: none; }
.nur-probleme .ue-liste:not(:has(li:not(.ue-titel):not(.ruhig))) { display: none; }

/* Einklappbare Serverkarten: der Kopf bleibt, der Rest erscheint auf Klick */
.klappe { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; border-radius: var(--radius-s); }
.klappe::after { content: ""; width: 8px; height: 8px; margin-left: 2px; border: solid var(--text-3); border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-3px); transition: transform .15s; }
.klappe[aria-expanded="false"]::after { transform: rotate(-45deg); }
.klappe:hover::after { border-color: var(--text); }
.klappe:focus-visible { outline: 3px solid var(--akzent); outline-offset: 4px; }
.klappe .kurz { display: none; font: 500 14px var(--body); letter-spacing: 0; color: var(--text-2); }
.server.zu { padding-bottom: 22px; }
.server.zu > :not(.kopf) { display: none !important; }
.server.zu .kopf { margin-bottom: 0; }
.server.zu .klappe .kurz { display: inline; }
.server, #server > .leer { scroll-margin-top: 16px; }
#server > .leer { margin-bottom: 20px; }

@media (max-width: 760px) {
  .uebersicht { padding: 14px 12px 8px; }
  .ue-liste { display: block; }
  .ue-liste li.ue-titel { display: none; }
  .ue-liste li { display: block; }
  .ue-liste li > a { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 10px 6px; }
  .ue-name { flex: 1 1 0; }
  .ue-wert { flex-direction: row; align-items: baseline; gap: 5px; font-size: 14px; }
  .ue-wert small { position: static; width: auto; height: auto; overflow: visible; clip: auto; display: inline; font-size: 12.5px; color: var(--text-3); }
  .ue-wert em { display: none; }
  .ue-bruch { display: block; flex-basis: 100%; height: 0; }
  .ue-bruch + .ue-wert { margin-left: 30px; }
  .ue-alt { flex-basis: 100%; margin-left: 30px; font-size: 12.5px; }
  .schalter { margin-left: 0; }
}
@supports not (grid-template-columns: subgrid) {
  .ue-liste { display: block; }
  .ue-liste li.ue-titel { display: none; }
  .ue-liste li { display: block; }
  .ue-liste li > a { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 10px 6px; }
  .ue-name { flex: 1 1 0; }
  .ue-wert { flex-direction: row; align-items: baseline; gap: 5px; font-size: 14px; }
  .ue-wert small { position: static; width: auto; height: auto; overflow: visible; clip: auto; display: inline; font-size: 12.5px; color: var(--text-3); }
  .ue-wert em { display: none; }
  .ue-bruch { display: block; flex-basis: 100%; height: 0; }
  .ue-bruch + .ue-wert { margin-left: 30px; }
  .ue-alt { flex-basis: 100%; margin-left: 30px; font-size: 12.5px; }
}
/* Großer Bildschirm (an der Wand): alles größer */
@media (min-width: 1800px) { body { zoom: 1.3; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* --- Benutzer (ab 2.0) ----------------------------------------------------------- */
.wer { font-size: 14px; color: var(--text-3); padding: 0 4px 0 10px; border-left: 1px solid var(--line); margin-left: 4px; }
.wer:empty { display: none; }
.tabelle td.aktionen { white-space: nowrap; text-align: right; }
.tabelle td.aktionen .btn { margin-left: 4px; }
.tabelle td select { width: auto; min-width: 150px; padding-top: 6px; padding-bottom: 6px; }
.initialpw { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0; }
.initialpw code { font: 600 17px var(--mono); font-variant-ligatures: none; padding: 6px 12px; border-radius: var(--radius-s); background: var(--bg); border: 1px solid var(--feldrand); user-select: all; }
.box small { display: block; color: var(--text-2); }
.box#initial::before { content: none; }
