:root {
  --bg: #0b1220;
  --panel: #132c44;
  --panel-2: #0f2136;
  --border: #0e1822;
  --line: #1f3a55;
  --btn: #1e3350;
  --text: #e0e6ed;
  --muted: #9aa6b2;
  --accent: #a4bbd4;
  --ok: #34d399;
  --warn: #f59e0b;
  --danger: #f87171;
  --radius: 8px;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: linear-gradient(to bottom, #dddddd -20%, var(--bg) 130%);
  background-attachment: fixed;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Topbar ===== */
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 20px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}
.topbar h1 { margin: 0; font-size: 15px; font-weight: 500; color: var(--accent); }
.topbar .spacer { flex: 1; }
.topbar a {
  color: var(--muted); border: 1px solid var(--line);
  border-radius: 6px; padding: 6px 14px;
  transition: border-color .2s, color .2s;
}
.topbar a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* Store · Admin · Info (doc/20 §5.1) — drei Seiten, ein Umschalter. */
.topbar nav.pages { display: flex; }
.topbar nav.pages a { border-radius: 0; margin-left: -1px; }
.topbar nav.pages a:first-child { border-radius: 6px 0 0 6px; margin-left: 0; }
.topbar nav.pages a:last-child { border-radius: 0 6px 6px 0; }
.topbar nav.pages a[aria-current="page"] { color: var(--text); background: var(--btn); border-color: var(--accent); position: relative; }

/* ===== Info-Seite (doc/21) ===== */
.info-state { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.info-state .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.info-state.ok .dot { background: var(--ok); }
.info-state.bad .dot { background: var(--danger); }
.info-state.unk .dot { background: transparent; border: 1px solid var(--muted); }
.info-val { font-variant-numeric: tabular-nums; white-space: nowrap; }
.info-val.warn { color: var(--warn); }
.info-val.crit { color: var(--danger); font-weight: 600; }
.info-val .unit { color: var(--muted); font-size: 11px; margin-left: 2px; }
.info-bar { display: inline-block; width: 46px; height: 5px; border-radius: 3px; background: var(--line);
  vertical-align: middle; margin-left: 6px; overflow: hidden; }
.info-bar > i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.info-val.warn .info-bar > i { background: var(--warn); }
.info-val.crit .info-bar > i { background: var(--danger); }
table.reg tr.info-row { cursor: pointer; }
table.reg tr.info-row[aria-expanded="true"] { background: var(--panel-2); }
.info-scroll { overflow-x: auto; }
.info-detail { padding: 6px 4px 14px; max-width: 1100px; }
.info-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 10px; }
.info-chart { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px 6px; position: relative; }
.info-chart h4 { margin: 0 0 2px; font-size: 12px; font-weight: 600; color: var(--muted); display: flex; justify-content: space-between; }
.info-chart h4 b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.info-chart svg { display: block; max-width: 100%; overflow: visible; }
.info-chart .tip { position: absolute; pointer-events: none; background: var(--panel); border: 1px solid var(--line);
  border-radius: 6px; padding: 3px 7px; font-size: 11px; white-space: nowrap; display: none; z-index: 2; }
.info-range { display: inline-flex; margin-left: 8px; }
.info-range button { border-radius: 0; margin-left: -1px; padding: 3px 10px; font-size: 12px; }
.info-range button:first-child { border-radius: 6px 0 0 6px; margin-left: 0; }
.info-range button:last-child { border-radius: 0 6px 6px 0; }
.info-range button[aria-pressed="true"] { border-color: var(--accent); color: var(--text); }
.info-temps { font-size: 12px; color: var(--muted); margin-top: 6px; }
.info-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin-top: 12px; }
.info-tile { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; font-size: 13px; }
.info-tile h4 { margin: 0 0 8px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.info-tile ul { list-style: none; margin: 0; padding: 0; }
.info-tile li { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.info-tile li > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
pre.logview { background: #0a1626; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px;
  margin: 8px 0 0; max-height: 60vh; overflow: auto; font: 12px/1.45 ui-monospace, Menlo, Consolas, monospace;
  white-space: pre-wrap; word-break: break-word; min-height: 3em; }
pre.logview .e { color: var(--danger); }
pre.logview .w { color: var(--warn); }
pre.logview .t { color: var(--muted); }
.ctr-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; font-size: 12px; }
.ctr-list button { font-size: 12px; padding: 3px 9px; }


.wrap { max-width: 1200px; margin: 0 auto; padding: 20px 16px 60px; }

/* ===== Form controls ===== */
select, input, button, textarea {
  font: inherit; color: var(--text);
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 6px; padding: 8px 11px;
}
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--accent); }
button { background: var(--btn); cursor: pointer; transition: border-color .2s; }
button:hover { border-color: var(--accent); }
button:disabled { opacity: .4; cursor: not-allowed; }
button.ghost { background: transparent; }
button.subtle { background: var(--panel-2); color: var(--muted); }
button.danger { color: #fca5a5; border-color: #5b2b2b; }
button.danger:hover { border-color: var(--danger); }
button.sm { padding: 6px 12px; font-size: 13px; }
label.field { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ===== Sections (die "Unter-Fenster") ===== */
.sections { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 16px; }
.section {
  grid-column: span 2;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.section.half { grid-column: span 1; }
.section h2 {
  margin: 0; font-size: 15px; font-weight: 500; color: var(--accent);
  cursor: pointer; user-select: none;
  display: flex; justify-content: space-between; align-items: center;
}
.section h2::after { content: "▼"; font-size: 11px; color: var(--muted); transition: transform .2s ease; }
.section.collapsed h2::after { transform: rotate(-90deg); }
.section.collapsed > :not(h2) { display: none; }

/* ===== App cards ===== */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 16px; }
.card {
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.card .head { display: flex; align-items: center; gap: 12px; }
.card .icon { font-size: 24px; width: 38px; height: 38px; display: grid; place-items: center; background: #16324c; border-radius: 8px; }
.card .title { font-weight: 600; font-size: 14px; }
.card .ver { color: var(--muted); font-size: 12px; }
.card .desc { color: var(--muted); font-size: 13px; line-height: 1.45; flex: 1; }
.card .actions { display: flex; gap: 8px; }

.badge { font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 12px; background: #1e293b; color: #94a3b8; }
.badge.active { color: var(--ok); background: #064e3b; }
.badge.installing, .badge.removing { color: var(--warn); }
.badge.unverified { color: var(--warn); background: #422006; }
.badge.failed { color: var(--danger); }
.badge.update { color: #93c5fd; background: #1e3a5f; }
.badge.content-change { color: var(--warn); background: #422006; }
/* Menü-Gruppe (doc/16_Menue_Gruppierung.md §11): "manuell" heisst, ein
   Store-Neustart kann den Wert NICHT überschreiben (Override statt Manifest). */
.badge.override { color: #93c5fd; background: #1e3a5f; }
.chip { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 12px; padding: 2px 9px; }

.menupath-cell input { width: 100%; max-width: 220px; padding: 5px 8px; font-size: 13px; }

.empty { color: var(--muted); font-size: 14px; padding: 16px; border: 1px dashed var(--line); border-radius: var(--radius); }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
/* Ein stehender Rettungs-Anker ist keine Fehlermeldung, aber auch kein Normalzustand. */
.warn { color: var(--warn); }

/* ===== Job-Log-Drawer ===== */
.joblog {
  position: fixed; right: 20px; bottom: 20px; width: 420px; max-width: calc(100vw - 40px);
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 18px 50px #0009; overflow: hidden; z-index: 30;
}
.joblog .jlhead { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.joblog .jlhead .t { font-weight: 600; font-size: 14px; color: var(--accent); }
.joblog pre { margin: 0; padding: 12px 14px; max-height: 240px; overflow: auto; font-size: 12px; line-height: 1.5; color: #cbd6ea; white-space: pre-wrap; }
.spin { width: 14px; height: 14px; border: 2px solid var(--muted); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Modal ===== */
.modal-bg { position: fixed; inset: 0; background: #0009; display: grid; place-items: center; z-index: 40; }
.modal { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; width: 460px; max-width: calc(100vw - 32px); }
.modal h3 { margin: 0 0 12px; color: var(--accent); font-weight: 500; }
.modal .grid { display: grid; grid-template-columns: 140px 1fr; gap: 10px 12px; align-items: center; margin: 14px 0; }
.modal .grid label { color: var(--muted); font-size: 13px; }
.modal .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
/* Eine Reparatur-Vorschau zeigt Compose-Zeilen — in 460px umgebrochen wäre sie
   nicht zu lesen, und lesbar zu sein ist der ganze Zweck der Vorschau.
   Ohne :has()-Unterstützung bleibt der Dialog schmal und der Block scrollt
   waagrecht: enger, aber nicht kaputt. */
.modal:has(.dbg-diff), .modal:has(.dbg-diff-paar) { width: 760px; }

/* ===== Tabellen (Admin) ===== */
table.reg { width: 100%; border-collapse: collapse; margin-top: 16px; }
table.reg th, table.reg td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 13px; }
table.reg th { background: #16324c; color: var(--accent); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
table.reg tbody tr:hover { background: var(--panel-2); }
/* Fehlermeldungen tragen drei Teile auf mehreren Zeilen (doc/05 §12.1): wer
   geantwortet hat, was gemessen wurde, was zu tun ist. Der dritte ist der
   Grund, warum es die Meldung gibt — er darf nicht in einer schmalen Spalte
   verschwinden. */
table.reg td.fehlertext {
  white-space: pre-wrap; max-width: 520px; min-width: 260px;
  font-size: 12px; line-height: 1.5;
}

/* ===== Gruppenblöcke in der Nutzerliste (doc/18_newUsersList_Organisation.md §4.4) =====
   Ein <details> je Gruppe. Der Kopf trägt Name, Zähler und die drei Knöpfe der
   Gruppe selbst — er beantwortet „sind alle 25 drin?", ohne dass man aufklappt. */
details.gruppe { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); margin: 0 0 10px; }
details.gruppe > summary {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; cursor: pointer;
  /* Das voreingestellte Dreieck fällt weg (list-style für Firefox, der
     ::-webkit-Selektor für die anderen) — darunter steht ein eigenes, das
     auch im geschlossenen Zustand dieselbe Zeilenhöhe hat. */
  list-style: none;
}
details.gruppe > summary::-webkit-details-marker { display: none; }
details.gruppe > summary::before { content: "▸"; color: var(--muted); font-size: 11px; width: 10px; }
details.gruppe[open] > summary::before { content: "▾"; }
details.gruppe > summary:hover { background: var(--panel); border-radius: var(--radius); }
details.gruppe > summary .gname { font-weight: 600; color: var(--accent); }
details.gruppe > summary .gzahl { font-size: 12px; }
details.gruppe > summary .gnote { font-size: 12px; font-style: italic; }
details.gruppe > summary .gbtn { margin-left: auto; display: flex; gap: 6px; }
details.gruppe table.reg { margin-top: 0; }
details.gruppe > .empty { margin: 0 14px 12px; }

/* Gruppe eines Nutzers, im aufgeklappten Detail */
.gruppenwahl { margin: 0 0 14px; }
.gruppenwahl h4 { margin: 0; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.gruppenwahl .muted { font-size: 12px; }
/* App-Konten in der Nutzer-Detailansicht (Phase D, doc/11 Arbeitsschritte) */
.appkonten { margin: 16px 0 0; }
.appkonten h4 { margin: 0 0 2px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.appkonten .hinweis { font-size: 12px; }
.appkonten input { width: 14em; }
.appkonten .mono { font-size: 12px; }

/* ===== Roboter-Detailzeile (Einstellungen, Installationen, Zugriffsrechte) ===== */
/* contain: inline-size nimmt den Inhalt aus der Breitenrechnung der
   Robotertabelle. Ohne das schob eine breite Installationsliste die ganze
   Tabelle über den Rand des Abschnitts (2026-10-01). Was dann nicht passt,
   scrollt in seiner eigenen Tabelle (.info-scroll). */
.robot-details { padding: 14px 4px 6px; contain: inline-size; }
table.reg tbody tr.robot-details-row:hover { background: transparent; }
/* Eingabefelder wie im Installationsdialog (.modal .envrow): Name über dem
   Feld, Erklärung darunter. Ohne diese Regeln liefen alle drei in einer Zeile
   ineinander („… behalten ihren Wert. Tunnel"). */
.robot-details .envrow { display: block; }
.robot-details .envrow .envname { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.robot-details .envrow .envdesc { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.45; }
.robot-details h4:not(:first-child) { margin-top: 22px; }
.robot-details h4 { margin: 0 0 4px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.robot-details table.reg { margin-top: 6px; margin-bottom: 18px; }
.robot-details table.reg:last-child { margin-bottom: 0; }

/* ===== Toast ===== */
.toast { position: fixed; top: 70px; right: 20px; background: var(--panel); border: 1px solid var(--border); border-left: 3px solid var(--accent); padding: 12px 16px; border-radius: 6px; z-index: 50; box-shadow: 0 10px 30px #0007; }
.toast.err { border-left-color: var(--danger); }

/* ---- Bestehende Umgebung erkunden (doc/07 Teil B) ---- */
.disc-intro { margin: 14px 0 0; font-size: 13px; line-height: 1.5; }
.disc { min-width: 0; max-width: 100%; overflow-x: auto; }
.disc-form { display: grid; grid-template-columns: 170px minmax(0, 420px); gap: 10px 12px; align-items: center; margin: 16px 0 4px; }
.disc-form label { color: var(--muted); font-size: 13px; }
.disc-form .opt { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 13px; }
.disc-form .opt input { width: auto; }
.disc h4 { margin: 20px 0 0; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.disc h4 .n { color: var(--accent); }
.disc .facts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; font-size: 13px; }
.disc .facts b { color: var(--accent); font-weight: 500; }
.disc .warns { margin: 16px 0 0; padding: 12px 14px 12px 32px; border: 1px solid #5b4a1f; border-left: 3px solid var(--warn); border-radius: 6px; background: #1c1a10; }
.disc .warns li { font-size: 13px; line-height: 1.55; color: #e5d9b6; }
.disc table.reg { margin-top: 8px; }
.banner { margin-bottom: 16px; padding: 14px 16px; border: 1px solid #5b2b2b; border-left: 3px solid var(--danger);
          border-radius: var(--radius); background: #1e1113; font-size: 13px; line-height: 1.55; color: #f3d4d4; }
.banner b { color: #fca5a5; }
.banner code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; color: var(--accent); }
.disc .steps td.s { width: 28px; text-align: center; font-weight: 700; }
.disc .steps .ok { color: var(--ok); }
.disc .steps .fail { color: var(--danger); }
.disc .steps .skip { color: var(--muted); }
.disc .steps .hint td { padding-top: 0; border-bottom: 1px solid var(--line); color: var(--warn); font-size: 12px; line-height: 1.5; }
.disc .steps td.src { color: var(--muted); font-size: 12px; white-space: nowrap; }
.stage { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 12px;
         background: #16324c; color: var(--accent); vertical-align: 1px; }
.disc .reg input { width: 100%; max-width: 320px; padding: 6px 9px; font-size: 13px; }
.modal .envhead { margin: 16px 0 6px; font-size: 12px; font-weight: 600; color: var(--accent);
                  text-transform: uppercase; letter-spacing: .5px; }
.modal .envrow { display: block; margin-bottom: 10px; }
.modal .envrow .envname { display: block; font-size: 12px; color: var(--muted);
                          font-family: ui-monospace, Menlo, Consolas, monospace; margin-bottom: 3px; }
.modal .envrow .envname .req { color: var(--warn); }
.modal .envrow input { width: 100%; padding: 7px 9px; font-size: 13px; }
.modal .envrow .envdesc { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
/* Im Betrieb nicht änderbar (mutable: false): sichtbar, aber kein Feld. Ein
   ausgegrautes Eingabefeld sähe aus wie eines, das gleich freischaltet. */
.modal .envrow.fest .envfest { display: block; padding: 7px 9px; font-size: 13px; color: var(--muted);
                               background: rgba(255,255,255,.04); border: 1px dashed var(--line);
                               border-radius: 6px; }

/* ---- Geräte-Auswahl (doc/18 §4.5) ----
   Die Liste steht ÜBER dem Textfeld, nicht statt seiner: angekreuzt wird der
   Normalfall, das Feld darunter zeigt den Wert, der tatsächlich abgeschickt
   wird — und nimmt einen Pfad von Hand auf, wenn die Erkundung nichts fand. */
.modal .envrow.geraete .geraeteliste { border: 1px solid var(--line); border-radius: 6px;
                                       max-height: 210px; overflow: auto; margin-bottom: 6px; }
.modal .geraet { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 8px;
                 align-items: baseline; padding: 7px 9px; cursor: pointer; }
.modal .geraet + .geraet { border-top: 1px solid var(--line); }
.modal .geraet:hover { background: rgba(255,255,255,.03); }
.modal .geraet input { width: auto; margin: 0; }
.modal .geraet .gname { font-size: 13px; }
.modal .geraet .gart { font-size: 11px; color: var(--muted); text-transform: uppercase;
                       letter-spacing: .4px; white-space: nowrap; }
.modal .geraet .gpfad { grid-column: 2 / -1; font-size: 11px; color: var(--muted);
                        word-break: break-all; }
.modal .gmeldung { padding: 9px; font-size: 12px; color: var(--muted); line-height: 1.4; }
.modal .geraetefuss { display: flex; gap: 8px; align-items: flex-start;
                      justify-content: space-between; margin-bottom: 4px; }
.modal .geraetefuss .envdesc { margin-top: 0; }
.modal .envrow.geraete input.gwert { font-size: 12px; }

/* ---- Datenbank-Einblick ---- */
.dbwrap { max-height: 520px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); margin-top: 12px; }
.dbwrap table.reg { margin: 0; }
.dbwrap table.reg th { position: sticky; top: 0; z-index: 1; }
.dbwrap table.reg td { white-space: nowrap; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }
.dbwrap table.reg td.null { color: var(--muted); font-style: italic; font-family: inherit; }

/* ---- Debug-Ansicht: die Kette a…k (doc/05_App-Pakete_Debug.md §6) ---------
   Die Ansicht spannt über die ganze Kachel-Reihe (grid-column: 1/-1): eine
   Kette mit elf Zeilen in eine 260px-Spalte zu quetschen macht sie unlesbar,
   und lesbar zu sein ist ihr einziger Zweck. */
.debug {
  grid-column: 1 / -1;
  background: var(--panel-2); border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: 12px 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.dbg-kopf { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dbg-lade { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.dbg-lade.err { color: var(--danger); }

/* Das Urteil steht ÜBER der Liste. Elf Häkchen sind Rohmaterial — dieser eine
   Satz ist die Antwort, und deshalb bekommt er das Gewicht. */
.dbg-urteil { font-size: 13px; line-height: 1.5; padding: 10px 12px; border-radius: var(--radius); }
.dbg-urteil.rot   { background: #3f1d1d; color: #fecaca; }
.dbg-urteil.grau  { background: #1e293b; color: var(--muted); }
.dbg-urteil.gruen { background: #064e3b; color: #a7f3d0; }
.dbg-tun { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.15); white-space: pre-wrap; }

.kette { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.kette li {
  display: grid; grid-template-columns: 20px minmax(180px, 280px) 1fr auto;
  gap: 8px; align-items: baseline; padding: 5px 0; border-bottom: 1px solid var(--border);
}
.kette .kz { font-weight: 700; text-align: center; }
.kette .kt { color: var(--text); }
.kette .kb { color: var(--muted); }
.kette .kq { color: #64748b; font-size: 11px; white-space: nowrap; }
.kette .kh { grid-column: 2 / -1; color: var(--warn); font-size: 12px; line-height: 1.45; white-space: pre-wrap; padding: 2px 0 4px; }
.kette .k-ok .kz        { color: var(--ok); }
.kette .k-fehler .kz    { color: var(--danger); }
.kette .k-unbekannt .kz { color: var(--muted); }
.kette .k-entfaellt     { opacity: .55; }
/* Folge-Zeilen sind blass: sie sind kein eigenes Problem, sondern dasselbe
   Problem noch einmal. */
.kette .folge { opacity: .5; }
.kette .folge .kz { color: var(--muted); }

.dbg-werte summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.dbg-werte dl { display: grid; grid-template-columns: max-content 1fr; gap: 3px 14px; margin: 8px 0 0; font-size: 12px; }
.dbg-werte dt { color: var(--muted); }
.dbg-werte dd { margin: 0; }
/* Die Werte DIESER Installation (installations.env) unter den Endpoint-Zeilen —
   abgesetzt, weil sie der Installation gehören und nicht dem Endpoint. */
.dbg-werte dt.envwert { color: var(--accent); }

/* Lesbare Geräte-Auswahl statt eines rohen art:pfad;art:pfad-Strings
   (doc/17_Detail-Aktionen.md §5.4). */
.dbg-geraeteliste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.dbg-geraeteliste li { display: flex; gap: 8px; align-items: baseline; }
.dbg-geraeteliste .gart { font-size: 11px; color: var(--muted); text-transform: uppercase;
                          letter-spacing: .4px; white-space: nowrap; }

/* Ergebnis eines Aktions-Knopfs (aktionenBlock) — dieselben Farben wie
   dbg-melde, nur enger, weil er direkt unter einem einzelnen Knopf steht. */
.dbg-aktion-ergebnis { margin-top: -4px; padding: 8px 10px; font-size: 12px; }
.dbg-einstellungen { margin-top: 10px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.15);
                     display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dbg-einstellungen .muted { font-size: 12px; }
.dbg-eptitel { font-weight: 600; font-size: 13px; color: var(--accent); }
.dbg-ep { display: flex; flex-direction: column; gap: 8px; }

/* Reparaturknopf — nur an der Ursachen-Zeile, nur für Admins (doc/05 §7.2).
   Er sitzt IM Urteil, nicht darunter: der Knopf gehört zu dem einen Satz, der
   die Ursache nennt, und nicht zur Liste der Häkchen. */
.dbg-reparatur { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.15);
                 display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dbg-reparatur .muted { font-size: 12px; }

/* Was ein Knopf bewirkt hat, bleibt neben dem Befund stehen, den er ändern
   sollte — ein Toast wäre nach vier Sekunden weg, die Frage „hat es geholfen?"
   nicht. */
.dbg-melde { font-size: 13px; line-height: 1.5; padding: 10px 12px; border-radius: var(--radius); }
.dbg-melde.ok  { background: #064e3b; color: #a7f3d0; }
.dbg-melde.err { background: #3f1d1d; color: #fecaca; }
.dbg-prot { margin: 6px 0 0; padding-left: 18px; font-size: 12px; opacity: .85; }

/* Die Vorschau vor dem Schreiben. Sie ist der Grund, warum es diese Knöpfe
   überhaupt geben darf: forwarding.conf trägt sämtliche Adressen des Servers,
   auch die von Hand gepflegten. */
.dbg-diff {
  margin: 10px 0 0; padding: 8px 10px; max-height: 320px; overflow: auto;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px;
  line-height: 1.45; white-space: pre; color: var(--muted);
}
.dbg-diff .zu  { color: var(--ok); }
.dbg-diff .weg { color: var(--danger); }
.dbg-diff-paar { display: grid; gap: 10px; }
.dbg-diff-paar b { font-size: 12px; color: var(--accent); }

/* Der Zustandspunkt auf der Kachel — leer, bis wirklich gemessen wurde. Ein
   Punkt, der schon beim Laden der Liste eine Farbe hätte, wäre geraten. */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px;
       background: transparent; border: 1px solid var(--line); vertical-align: middle; }
.dot.gruen { background: var(--ok); border-color: var(--ok); }
.dot.rot   { background: var(--danger); border-color: var(--danger); }
.dot.grau  { background: var(--muted); border-color: var(--muted); }
