/* EDV Technik RMM - Aufbau: dunkle Seitenleiste, helle Arbeitsflaeche (dunkel bei Systemeinstellung "dunkel") */
:root {
    --bg: #eef0f3; --panel: #fff; --line: #e4e7ec; --line2: #f0f2f5; --text: #1b2230; --muted: #6a7386;
    --accent: #2563eb; --accent-soft: #e8efff; --accent-ink: #fff;
    --side: #17191e; --side-text: #c9ced8; --side-muted: #7d8494; --side-on: #2c3039;
    --ok: #16a34a; --warn: #d97706; --avg: #ea580c; --bad: #dc2626; --info: #64748b; --live: #7c3aed;
    --ok-soft: #e7f6ec; --warn-soft: #fdf2e2; --bad-soft: #fdeaea; --live-soft: #f1ebfe;
    --radius: 12px; --shadow: 0 1px 2px rgba(16, 24, 40, .05);
}
@media (prefers-color-scheme: dark) {
    :root { --bg: #101318; --panel: #181c23; --line: #262c36; --line2: #1f242c; --text: #e6e9ef; --muted: #8c95a6;
        --accent: #5b8cff; --accent-soft: #1d2a47; --side: #0b0d11; --side-on: #20242c;
        --ok-soft: #12291b; --warn-soft: #2d2212; --bad-soft: #301717; --live-soft: #24193d; --shadow: none; }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 24px; font-weight: 600; margin: 0; display: flex; align-items: center; gap: 10px; }
h1 small { color: var(--muted); font-weight: 400; font-size: 15px; }
h2 { font-size: 15px; font-weight: 600; margin: 0; }
.muted, .hint { color: var(--muted); }
.hint { font-size: 12.5px; margin: 10px 2px; }
.sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.sub a { color: var(--muted); }

/* Rahmen */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { background: var(--side); color: var(--side-text); display: flex; flex-direction: column; padding: 14px 12px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; padding: 6px 8px 18px; font-size: 15px; }
.brand:hover { text-decoration: none; }
.brand b { color: #7ea6ff; }
.logo { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; }
.side nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side nav a { color: var(--side-text); padding: 9px 10px; border-radius: 8px; display: flex; align-items: center; gap: 10px; font-size: 14px; }
.side nav a i { font-style: normal; width: 18px; text-align: center; color: var(--side-muted); }
.side nav a small { color: var(--side-muted); margin-left: auto; }
.side nav a:hover { background: var(--side-on); text-decoration: none; }
.side nav a.on { background: var(--side-on); color: #fff; font-weight: 600; }
.side nav a.on i { color: #7ea6ff; }
.side .sep { color: var(--side-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding: 18px 10px 6px; }
.logout { border-top: 1px solid #2a2e36; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.logout .who { font-size: 12px; color: var(--side-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logout button { background: none; border: 1px solid #343a45; color: var(--side-text); border-radius: 6px; padding: 5px 9px; cursor: pointer; font: inherit; font-size: 12px; }
main { padding: 22px 26px 48px; min-width: 0; }
main.plain { padding: 0; }
@media (max-width: 860px) {
    .shell { grid-template-columns: 1fr; }
    .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 8px 12px; }
    .brand { padding: 4px 8px; }
    .side nav { flex-direction: row; flex-wrap: wrap; flex: 1 1 100%; }
    .side .sep { display: none; }
    .logout { border: 0; padding: 0; }
    main { padding: 16px; }
}

.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.tools { display: flex; gap: 8px; flex-wrap: wrap; }
.crumb { margin: 0 0 4px; color: var(--muted); font-size: 13px; }

/* Kennzahlen */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; color: var(--text); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
a.kpi:hover { text-decoration: none; border-color: var(--accent); }
.kpi > span { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.kpi > b { font-size: 26px; font-weight: 650; line-height: 1.15; }
.kpi > b small { font-size: 15px; color: var(--muted); font-weight: 400; }
.kpi > em { font-style: normal; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi.k-bad { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); background: linear-gradient(var(--bad-soft), var(--panel) 70%); }
.kpi.k-bad > b { color: var(--bad); }
.kpi.k-warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); background: linear-gradient(var(--warn-soft), var(--panel) 70%); }
.kpi.k-live { border-color: color-mix(in srgb, var(--live) 45%, var(--line)); background: linear-gradient(var(--live-soft), var(--panel) 70%); }
.kpi.k-live > b { color: var(--live); }
.kpis.small .kpi > b { font-size: 21px; }
progress { width: 100%; height: 6px; border: 0; border-radius: 99px; overflow: hidden; background: var(--line2); appearance: none; margin-top: 4px; }
progress::-webkit-progress-bar { background: var(--line2); }
progress::-webkit-progress-value { background: var(--ok); border-radius: 99px; }
progress::-moz-progress-bar { background: var(--ok); }

/* Panels */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 4px 0 6px; margin-bottom: 18px; min-width: 0; }
.panel > header { display: flex; align-items: center; gap: 10px; padding: 12px 16px 8px; }
.panel > header .more { margin-left: auto; font-size: 13px; }
.panel .sub-head { border-top: 1px solid var(--line); margin-top: 6px; }
.panel.tight { padding: 0; overflow: hidden; }
.panel.tight > header { border-bottom: 1px solid var(--line); }
.empty { color: var(--muted); padding: 6px 16px 12px; margin: 0; }
.cols.two { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; }
@media (max-width: 1100px) { .cols.two { grid-template-columns: 1fr; } }
.badge { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 99px; background: var(--line2); color: var(--muted); }
.badge.b-bad { background: var(--bad); color: #fff; } .badge.b-warn { background: var(--warn); color: #fff; } .badge.b-ok { background: var(--ok-soft); color: var(--ok); }

/* Werkzeugleiste ueber Tabellen */
.toolbar { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.toolbar .search { flex: 1 1 260px; max-width: 420px; }
.toolbar input, .toolbar select { font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; }
.toolbar input:focus, .toolbar select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.toolbar .count { margin-left: auto; color: var(--muted); font-size: 12.5px; }

/* Tabellen */
.tablewrap { overflow-x: auto; }
.grid { width: 100%; border-collapse: collapse; }
.grid th { text-align: left; font-weight: 600; font-size: 12px; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--panel); position: sticky; top: 0; }
.grid th[data-sort] { cursor: pointer; user-select: none; }
.grid th[data-sort]:hover { color: var(--text); }
.grid th[data-dir="asc"]::after { content: " ▲"; font-size: 9px; } .grid th[data-dir="desc"]::after { content: " ▼"; font-size: 9px; }
.grid td { padding: 10px 12px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
.grid tbody tr:last-child td { border-bottom: 0; }
.grid tbody tr:hover > td { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.grid.flat td { padding: 8px 16px; }
.grid.inner { background: transparent; }
.grid.inner td { padding: 5px 10px; }
.grid .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.grid th.num { text-align: right; }
.grid .act { text-align: right; white-space: nowrap; width: 1%; }
.grid td.warn { color: var(--warn); font-weight: 600; } .grid td.bad { color: var(--bad); font-weight: 600; }
.grid tr.dim td { color: var(--muted); }
.grid tr.clickable { cursor: pointer; }
.grid tr.detail > td { background: var(--line2); padding: 10px 16px 12px 34px; }
.grid tr.open > td { background: var(--line2); }
.devices { min-width: 1040px; }
.devices td.dev { white-space: nowrap; font-size: 14.5px; }

/* Zustandsleiste links in der Zeile */
td.dev { position: relative; padding-left: 18px; }
.hbar { position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: transparent; }
tr.h-bad .hbar { background: var(--bad); } tr.h-warn .hbar { background: var(--warn); } tr.h-ok .hbar { background: var(--ok); }

/* Status, Zaehler, Pillen */
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.st.on::before { background: var(--ok); } .st.off { color: var(--bad); font-weight: 600; } .st.off::before { background: var(--bad); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.dot.off { background: var(--bad); } .dot.warn { background: var(--warn); } .dot.on { background: var(--ok); }
.dot.big { width: 14px; height: 14px; }
.dot.h-bad { background: var(--bad); } .dot.h-warn { background: var(--warn); } .dot.h-ok { background: var(--ok); }
.lvl { width: 1%; }
.alarms { white-space: nowrap; }
.cnt { display: inline-grid; place-items: center; min-width: 30px; height: 24px; padding: 0 7px; margin-right: 5px; border-radius: 99px; background: var(--line2); color: var(--muted); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cnt.high { background: var(--bad-soft); color: var(--bad); }
.cnt.avg { background: var(--warn-soft); color: var(--avg); }
.cnt.low { background: var(--accent-soft); color: var(--accent); }
.alarms.big .cnt { min-width: 38px; height: 30px; font-size: 16px; }
.pill { display: inline-block; font-size: 11.5px; padding: 1px 8px; border-radius: 99px; background: var(--line2); color: var(--muted); white-space: nowrap; margin-left: 6px; }
td > .pill:first-child { margin-left: 0; }
.pill.sev-high { background: var(--bad); color: #fff; } .pill.sev-avg { background: var(--avg); color: #fff; }
.pill.sev-warn { background: var(--warn); color: #fff; } .pill.sev-info { background: var(--info); color: #fff; }
.pill.live { background: var(--live); color: #fff; }
.prob { font-size: 13px; margin: 3px 0; }
.prob .pill { margin: 0 6px 0 0; }

/* Knoepfe */
.btn { display: inline-flex; align-items: center; gap: 6px; background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); border-radius: 8px; padding: 7px 13px; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; filter: brightness(1.07); }
.btn.sm { padding: 4px 10px; font-size: 13px; }
.btn.ghost { background: var(--panel); color: var(--accent); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--accent); }
.btn.disabled { background: var(--line2); color: var(--muted); border-color: var(--line); cursor: not-allowed; filter: none; font-weight: 500; }

/* Kunden-Kacheln */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; padding: 6px 16px 12px; }
.tile { display: flex; flex-direction: column; gap: 3px; border: 1px solid var(--line); border-left: 4px solid var(--ok); border-radius: 10px; padding: 11px 13px; color: var(--text); background: var(--panel); }
.tile:hover { text-decoration: none; border-color: var(--accent); }
.tile b { font-size: 14px; }
.tile span { color: var(--muted); font-size: 12.5px; }
.tile small { color: var(--muted); font-size: 12px; }
.tile.t-bad { border-left-color: var(--bad); } .tile.t-warn { border-left-color: var(--warn); } .tile.t-none { border-left-color: var(--line); }

/* Meldungen */
.alert { background: var(--bad-soft); border: 1px solid color-mix(in srgb, var(--bad) 50%, var(--line)); padding: 10px 12px; border-radius: 10px; margin: 0 0 16px; }
.alert.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 50%, var(--line)); }

/* Anmeldung */
.auth { max-width: 390px; margin: 12vh auto 0; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 30px; box-shadow: 0 8px 30px rgba(16, 24, 40, .08); }
.auth h1 { margin-bottom: 20px; }
.auth h1 span { color: var(--accent); }
.auth label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.auth input { display: block; width: 100%; margin-top: 5px; padding: 10px 11px; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
.auth input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.auth .btn { width: 100%; justify-content: center; padding: 11px; }
.secret { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 4px 12px; margin-bottom: 14px; font-size: 13px; }
.secret code { font-size: 15px; letter-spacing: .5px; word-break: break-all; }

/* Aufmerksamkeit */
.attention td { vertical-align: top; }
.attention td.who { width: 30%; white-space: nowrap; }
.attention .lvl { padding-top: 13px; }
.reason { display: flex; gap: 10px; justify-content: space-between; font-size: 13px; padding: 1px 0; }
.reason span { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.reason em { font-style: normal; color: var(--muted); white-space: nowrap; font-size: 12px; }
.reason.r-bad span { color: var(--bad); font-weight: 600; }

/* Agent: Patches, Neustart, Agentenliste */
.ok-txt { color: var(--ok); font-size: 13px; font-weight: 500; white-space: nowrap; }
.sub-inline { font-size: 12px; color: var(--bad); white-space: nowrap; }
.detail-head { font-size: 12.5px; font-weight: 600; margin: 10px 0 4px; }
.detail-head:first-child { margin-top: 0; }
form.inline { display: inline; margin: 0; }
.btn.danger { background: var(--panel); color: var(--bad); border-color: var(--line); }
.btn.danger:hover { border-color: var(--bad); }
.client-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0 12px; }
input.copy { width: 100%; min-width: 260px; font: 12.5px ui-monospace, Consolas, monospace; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: inherit; }

/* Geraeteseite */
.dev-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; font-size: 13.5px; }
.dev-status .sep { color: var(--line); }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
dl.facts { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 9px 14px; margin: 4px 16px 12px; }
dl.facts dt { color: var(--muted); font-size: 13px; }
dl.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
dl.facts dd > div + div { margin-top: 4px; }
.chart { padding: 4px 16px 10px; }
.chart svg { width: 100%; height: 150px; display: block; border-bottom: 1px solid var(--line); overflow: visible; }
.chart .gl { stroke: var(--line2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart polyline { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.p-cpu, .l-cpu { stroke: var(--accent); background: var(--accent); }
.p-mem, .l-mem { stroke: var(--ok); background: var(--ok); }
.chart-x { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.chart-avg { margin-top: 6px; }
.legend { margin-left: auto; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-left: 6px; }
td.w-bar { width: 45%; }
.bar { height: 8px; border-radius: 99px; background: var(--line2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.bar i.warn { background: var(--warn); }
.bar i.bad { background: var(--bad); }
@media (max-width: 900px) { dl.facts { grid-template-columns: 1fr; gap: 2px; } dl.facts dd { margin-bottom: 8px; } }
a.devlink { color: inherit; }
a.devlink:hover { color: var(--accent); }

/* Patch-Management */
.pstate { padding: 4px 16px 12px; }
.pstate > b { font-size: 30px; font-weight: 650; display: block; margin-bottom: 6px; }
.bar.big { height: 14px; margin-bottom: 14px; }
.ptype { display: grid; grid-template-columns: 110px 1fr 60px; align-items: center; gap: 10px; margin: 6px 0; font-size: 13px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; align-content: start; }
details.devs { margin-top: 4px; font-size: 12.5px; }
details.devs summary { cursor: pointer; color: var(--muted); }
details.devs a { display: inline-block; margin: 3px 10px 0 0; }

/* Tresor */
.tresor-body { padding: 6px 16px 12px; }
.tresor-body .tablewrap, .tresor-body .empty { margin: 0 -16px; }
.tresor-tools { display: flex; gap: 6px; }
form.tresor-unlock { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 6px 0; }
form.tresor-unlock input { max-width: 280px; }
form.tresor-edit { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin: 8px 0; }
form.tresor-edit label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); }
form.tresor-edit .wide { grid-column: 1 / -1; }
form.tresor-edit .row { display: flex; gap: 6px; }
form.tresor-edit .actions { display: flex; gap: 8px; }
textarea.copy { font: inherit; }
.tresor-err { min-height: 1em; }
code.pw { font: 13px ui-monospace, Consolas, monospace; margin-right: 4px; }
.btn.xs { padding: 2px 7px; font-size: 12px; min-height: 0; }
.note { white-space: pre-wrap; }
details.tresor-change { margin-top: 10px; font-size: 13px; }
details.tresor-change summary { cursor: pointer; color: var(--muted); }
@media (max-width: 700px) { form.tresor-edit { grid-template-columns: 1fr; } }
.side nav a small.badge { background: var(--warn); color: #fff; border-radius: 99px; padding: 0 7px; font-weight: 700; }
.panel.pending { border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); }

/* Stufe 2: Wartung */
.runbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); }
.runbar select { max-width: 100%; }
td.w-chk { width: 28px; }
.alert.info { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
form.pform { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; padding: 4px 16px 14px; }
form.pform label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); }
form.pform .wide { grid-column: 1 / -1; }
form.pform fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
form.pform legend { font-size: 12.5px; color: var(--muted); padding: 0 4px; }
form.pform label.chk { flex-direction: row; align-items: center; gap: 6px; color: var(--text); font-size: 13.5px; display: inline-flex; margin-right: 14px; }
form.pform .actions { display: flex; gap: 8px; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.live { background: var(--live-soft); color: var(--live); }
@media (max-width: 700px) { form.pform { grid-template-columns: 1fr; } }

/* TI */
h3.ti-h { font-size: 13px; margin: 12px 16px 4px; color: var(--muted); font-weight: 600; }
details.ti-cfg { border-top: 1px solid var(--line); margin-top: 8px; }
details.ti-cfg > summary { cursor: pointer; padding: 10px 16px; color: var(--muted); font-size: 13px; }
.tiwarn, .tinote { margin: 8px 16px; }

/* Software */
.swwrap { max-height: 520px; overflow: auto; }
.swnote { padding: 0 16px; }

/* Kommentar zur Fernwartung */
details.snote { margin-top: 3px; font-size: 12.5px; }
details.snote > summary { cursor: pointer; list-style: none; }
details.snote > summary::-webkit-details-marker { display: none; }
.snote-text { color: var(--text); white-space: pre-wrap; }
.snote-text::before { content: "✎ "; color: var(--muted); }
form.snote-form { display: flex; gap: 6px; align-items: flex-start; flex-wrap: wrap; margin-top: 4px; }
form.snote-form textarea { flex: 1; min-width: 220px; font: inherit; }

/* Skripte */
form.scriptform .scriptfree { display: flex; flex-wrap: wrap; gap: 8px 16px; }
form.scriptform .scriptfree[hidden] { display: none; }
form.scriptform .scriptfree textarea { flex-basis: 100%; }
textarea.mono, pre.scriptout { font: 12.5px/1.45 ui-monospace, Consolas, monospace; }
textarea.mono { width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: inherit; }
pre.scriptout { margin: 4px 0; padding: 6px 8px; max-height: 320px; overflow: auto; white-space: pre-wrap; word-break: break-word; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; }

/* Reiter (Geraeteseite) */
nav.tabs { display: flex; gap: 2px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: 0 0 18px; }
nav.tabs a { padding: 8px 14px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: 6px; }
nav.tabs a:hover { color: var(--text); }
nav.tabs a.on { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
nav.tabs .badge { font-size: 11px; padding: 0 6px; border-radius: 9px; background: var(--line); color: var(--text); font-weight: 600; }
nav.tabs .badge.bad { background: var(--bad-soft, #fde2e1); color: var(--bad, #c0392b); }
.tabs-on .tabpane:not(.on) { display: none; }
@media (max-width: 700px) { nav.tabs { flex-wrap: nowrap; overflow-x: auto; } nav.tabs a { white-space: nowrap; } }

/* Schalter (z. B. TI an/aus) */
.switchform { display: inline-flex; margin-left: 10px; vertical-align: middle; }
label.switch { position: relative; display: inline-block; width: 38px; height: 22px; cursor: pointer; }
label.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
label.switch .slider { position: absolute; inset: 0; background: var(--bad, #c0392b); border-radius: 22px; transition: background .15s; }
label.switch .slider::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .15s; }
label.switch input:checked + .slider { background: var(--ok, #2e9d5b); }
label.switch input:checked + .slider::before { transform: translateX(16px); }
label.switch input:focus-visible + .slider { outline: 2px solid var(--accent); outline-offset: 2px; }
