/* RedAlert – klares Design, dunkel und hell */
@font-face { font-family: "Inter"; font-weight: 100 900; font-style: normal; font-display: swap; src: url("fonts/inter-var.woff2") format("woff2"); }

:root {
    --bg: #0e1116;
    --surface: #161b22;
    --raised: #1d242d;
    --line: #2a323d;
    --text: #e6edf3;
    --muted: #8b97a6;
    --accent: #4c9aff;
    --accent-bg: rgba(76, 154, 255, .14);
    --ok: #3fb97a;
    --warn: #e3a72f;
    --crit: #f0605a;
    --stale: #e8833a;
    --off: #6b7685;
    --hover: #19202a;
    --line2: #475264;
    --ondark: #06121f;
    --faint: var(--faint);
    --shadow: 0 20px 60px rgba(0, 0, 0, .5);
    --scrim: rgba(5, 8, 12, .72);
    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
html[data-theme="light"] {
    --bg: #f3f5f8;
    --surface: #ffffff;
    --raised: #eef1f5;
    --line: #dde2e9;
    --text: #18202a;
    --muted: #627082;
    --accent: #1f6feb;
    --accent-bg: rgba(31, 111, 235, .10);
    --ok: #1a9457;
    --warn: #b87a05;
    --crit: #d1352f;
    --stale: #c95f14;
    --off: #8b95a3;
    --hover: #f7f9fc;
    --line2: #b9c2ce;
    --ondark: #ffffff;
    --faint: rgba(0, 0, 0, .06);
    --shadow: 0 20px 50px rgba(20, 30, 50, .18);
    --scrim: rgba(20, 28, 40, .45);
}

* { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.45;
    font-feature-settings: "cv11", "ss03";
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
}
a { color: inherit; text-decoration: none; }
.page { max-width: 2200px; margin: 0 auto; padding: 20px 20px 40px; }
.hint { color: var(--muted); padding: 24px 4px; }
.s { color: var(--muted); font-size: 13px; }

/* Kopfleiste */
.top { border-bottom: 1px solid var(--line); background: var(--surface); }
.top .in { max-width: 2200px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 650; letter-spacing: .01em; margin-right: auto; }
.brand img { width: 26px; height: 26px; border-radius: 7px; display: block; }
.themebtn { display: inline-flex; align-items: center; gap: 7px; background: transparent; border: 1px solid var(--line); color: var(--muted); border-radius: 8px; padding: 5px 11px; font: inherit; font-size: 13.5px; cursor: pointer; }
.themebtn:hover { color: var(--text); background: var(--raised); }
.themebtn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.themebtn .sun { display: none; }
html[data-theme="light"] .themebtn .sun { display: block; }
html[data-theme="light"] .themebtn .moon { display: none; }
.loginbox .themebtn { margin: 14px auto 0; display: flex; }
.top a.nav { color: var(--muted); font-size: 14px; padding: 6px 10px; border-radius: 8px; }
.top a.nav:hover { color: var(--text); background: var(--raised); }
.foot { max-width: 2200px; margin: 0 auto; padding: 0 20px 28px; color: var(--muted); font-size: 12px; }

/* Ueberschriften */
h2.title { margin: 22px 0 12px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* Filter-Chips */
.sum { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sumrow { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
    --c: var(--muted);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--text);
    padding: 4px 12px;
    font-size: 13.5px;
    line-height: 1.4;
    white-space: nowrap;
}
.pill b { font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.pill.ok { --c: var(--ok); }
.pill.warn { --c: var(--warn); }
.pill.crit { --c: var(--crit); }
.pill.stale { --c: var(--stale); }
.pill.offline { --c: var(--off); }
.pill.lav { --c: var(--muted); }
.pill.amber { --c: var(--accent); }
.pill.peach { --c: var(--stale); }
.pill.pick { cursor: pointer; user-select: none; font-weight: 600; background: color-mix(in srgb, var(--c) 13%, transparent); border-color: color-mix(in srgb, var(--c) 42%, transparent); transition: background .12s, border-color .12s, transform .1s; }
.pill.pick.lav, .pill.pick.grp { --c: var(--accent); }
.pill.pick b { color: var(--c); }
.pill.pick:hover { background: color-mix(in srgb, var(--c) 24%, transparent); transform: translateY(-1px); }
.pill.pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pill.pick.on { background: var(--c); border-color: var(--c); color: var(--ondark); box-shadow: 0 2px 10px color-mix(in srgb, var(--c) 40%, transparent); }
.pill.pick.on b { color: var(--ondark); }
.pill.pick.on::before { background: #fff; box-shadow: 0 0 6px 1px rgba(255, 255, 255, .8); }
.pill.grp::before { content: none; }
.pill.grp { color: var(--text); }
.pill.grp.on { color: var(--ondark); }
/* Status-Abzeichen (nicht klickbar) */
.card .pill, .namebar .pill, .sum > .pill:not(.pick) { padding: 3px 12px; font-size: 12.5px; font-weight: 700; background: transparent; }
.card .pill.ok, .namebar .pill.ok { background: var(--ok); color: var(--ondark); border-color: transparent; }
.card .pill.warn, .namebar .pill.warn { background: var(--warn); color: var(--ondark); border-color: transparent; }
.card .pill.crit, .namebar .pill.crit { background: var(--crit); color: var(--ondark); border-color: transparent; }
.card .pill.stale, .namebar .pill.stale { background: var(--stale); color: var(--ondark); border-color: transparent; }
.card .pill.offline, .namebar .pill.offline { color: var(--muted); }
.card .pill.ok::before, .card .pill.warn::before, .card .pill.crit::before, .card .pill.stale::before,
.namebar .pill.ok::before, .namebar .pill.warn::before, .namebar .pill.crit::before, .namebar .pill.stale::before { background: #fff; box-shadow: 0 0 6px 1px rgba(255, 255, 255, .8); }
@keyframes ra-glow { 0%, 100% { box-shadow: 0 0 3px 0 rgba(255, 255, 255, .55); opacity: .75; } 50% { box-shadow: 0 0 9px 2px rgba(255, 255, 255, .95); opacity: 1; } }
.card .pill.ok::before, .namebar .pill.ok::before { animation: ra-glow 2.4s ease-in-out infinite; }
.card .pill.crit::before, .namebar .pill.crit::before { animation: ra-glow 1.1s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .card .pill::before, .namebar .pill::before { animation: none !important; } }

/* Rechner-Karten */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.card {
    --c: var(--ok);
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    border-top: 3px solid var(--c);
    padding: 12px 16px 14px;
    min-height: 190px;
    transition: border-color .12s, background .12s;
}
a.card:hover { border-color: var(--line2); background: var(--hover); }
.card.st-ok { --c: var(--ok); }
.card.st-warn { --c: var(--warn); }
.card.st-crit { --c: var(--crit); }
.card.st-stale { --c: var(--stale); }
.card.st-offline { --c: var(--off); }
.card.st-offline .name { color: var(--muted); }
.card .head { display: flex; align-items: center; justify-content: space-between; gap: 6px 10px; }
.card .name { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 auto; font-size: 17px; font-weight: 650; line-height: 1.25; overflow-wrap: anywhere; }
.card .name::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); }
.card .head .pill { flex: none; }
.card .sub { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.sub .grpname { color: var(--accent); white-space: nowrap; }
.sub .offon { color: var(--muted); white-space: nowrap; }
.sub .agv { white-space: nowrap; }
.sub .agv.old { color: var(--warn); }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; }
.tile { background: var(--raised); border-radius: 8px; padding: 7px 10px 8px; min-width: 0; }
.tile .l { color: var(--muted); font-size: 11.5px; font-weight: 500; }
.tile .v { color: var(--text); font-size: 20px; font-weight: 600; line-height: 1.15; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tile .v small { font-size: 13px; color: var(--muted); }
.tiles.drives { grid-template-columns: repeat(auto-fit, minmax(74px, 1fr)); gap: 6px; }
.tiles.drives .tile { padding: 4px 9px 5px; }
.tiles.drives .tile .l { font-size: 11px; }
.tiles.drives .tile .v { font-size: 14px; }
.tile.warn .v { color: var(--warn); }
.tile.crit .v { color: var(--crit); }

.finds { display: flex; flex-direction: column; gap: 5px; }
.find { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; }
.find i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); margin-top: 7px; }
.find.p5 i { background: var(--crit); }
.find.p1 i, .find.p2 i { background: var(--accent); }
.find span { min-width: 0; overflow-wrap: anywhere; }
.rbline, .cmdline { align-self: flex-start; border-radius: 6px; padding: 2px 10px; font-size: 12.5px; font-weight: 500; }
.rbline { background: rgba(232, 131, 58, .14); color: var(--stale); }
.cmdline { margin-top: auto; background: var(--accent-bg); color: var(--accent); }
.fine { margin-top: auto; color: var(--muted); font-size: 12.5px; }

/* Detail */
.back { color: var(--muted); }
.namebar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 4px 0 18px; }
.namepill { font-size: 24px; font-weight: 700; line-height: 1.2; margin-right: 4px; }
.cols { display: flex; gap: 16px; align-items: flex-start; }
.col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.sec { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 14px; margin: 0 0 16px; }
.sec .sech { margin: 0 0 10px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.panel { padding: 0; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 5px 18px; }
.kv .k { color: var(--muted); font-size: 13.5px; }
.kv .v { color: var(--text); word-break: break-word; }
.list { display: flex; flex-direction: column; gap: 8px; }
.item { border-left: 3px solid var(--line); border-radius: 4px 8px 8px 4px; background: var(--raised); padding: 7px 12px; }
.item.p5 { border-color: var(--crit); }
.item.p4, .item.p3 { border-color: var(--warn); }
.item.p1, .item.p2 { border-color: var(--accent); }
.item .t { color: var(--text); font-weight: 600; }
.item .m { color: var(--text); font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.item .s { color: var(--muted); font-size: 12.5px; }
.drive { margin-bottom: 12px; }
.drive:last-child { margin-bottom: 0; }
.drive .row { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.drive .row b { color: var(--muted); font-weight: 400; }
.meter { height: 8px; border-radius: 4px; background: var(--raised); overflow: hidden; margin-top: 6px; }
.meter i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.meter.warn i { background: var(--warn); }
.meter.crit i { background: var(--crit); }
.chart { width: 100%; height: auto; display: block; }
.chart .gl { stroke: var(--line); stroke-width: 1; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.legend { display: flex; gap: 16px; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.legend span::before { content: ""; display: inline-block; width: 14px; height: 4px; border-radius: 2px; margin-right: 6px; vertical-align: middle; background: var(--c); }
.ptitle { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .04em; margin: 14px 0 5px; }
.ptitle:first-child { margin-top: 0; }
.prow { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 2px 0; border-bottom: 1px solid var(--faint); }
.prow span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow b { font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.prow b.warn { color: var(--warn); }
.prow b.crit { color: var(--crit); }

/* Schaltflaechen */
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn {
    --c: var(--raised);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--c);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    cursor: pointer;
    transition: background .12s, border-color .12s;
}
a.btn { display: inline-block; text-decoration: none; }
.btn:hover:not(:disabled) { border-color: var(--line2); background: var(--hover); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn:disabled { opacity: .4; cursor: default; }
.btn.amber { background: var(--accent); border-color: var(--accent); color: var(--ondark); font-weight: 600; }
.btn.amber:hover:not(:disabled) { filter: brightness(1.1); background: var(--accent); border-color: var(--accent); }
.btn.rose { background: rgba(240, 96, 90, .12); border-color: rgba(240, 96, 90, .5); color: var(--crit); }
.btn.rose:hover:not(:disabled) { background: rgba(240, 96, 90, .22); border-color: var(--crit); }
.log { font-size: 13.5px; }
.log div { padding: 4px 0; border-bottom: 1px solid var(--faint); }
.log div:last-child { border-bottom: 0; }
.log time { color: var(--muted); margin-right: 10px; font-variant-numeric: tabular-nums; }
.full-sec { margin-top: 0; }

/* Alarmgrenzen */
.arow { display: grid; grid-template-columns: minmax(200px, 1.6fr) minmax(120px, .8fr) minmax(140px, .8fr) minmax(220px, 1.4fr); gap: 8px 16px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--faint); }
.arow:last-child { border-bottom: 0; }
.achk { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.achk input { width: 17px; height: 17px; accent-color: var(--accent); }
.afld { display: flex; align-items: center; gap: 8px; }
.aact { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.inp.num { width: 90px; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; }
.inp.sel { width: 100%; max-width: 420px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; }
.inp:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
#alarms .sec { display: block; }

/* Dialoge */
.modal { position: fixed; inset: 0; background: var(--scrim); display: flex; align-items: center; justify-content: center; padding: 18px; z-index: 10; }
.dlg { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; max-width: 460px; width: 100%; box-shadow: var(--shadow); }
.dlg h3 { margin: 0 0 8px; font-size: 18px; font-weight: 650; }
.dlg p { margin: 0 0 16px; color: var(--muted); font-size: 14.5px; }
.dlg .actions { justify-content: flex-end; }
.dlg .inp { width: 100%; margin: 0 0 16px; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; }
.dlg .inp:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }

/* Login */
body.login { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 16px; }
.loginbox { width: 100%; max-width: 380px; }
.loginbox .brand { justify-content: center; margin: 0 0 18px; font-size: 22px; }
.loginbox .brand img { width: 34px; height: 34px; border-radius: 9px; }
.loginbox form { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.loginbox label { color: var(--muted); font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.loginbox input { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; color: var(--text); font-family: var(--font); font-size: 16px; padding: 10px 12px; outline: none; }
.loginbox input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.loginbox .btn { padding: 10px 16px; font-size: 15px; }
.err { color: var(--crit); margin: 0; font-size: 14px; }

@media (max-width: 520px) {
    .page { padding: 14px 12px 30px; }
    .top .in { padding: 10px 12px; }
    .foot { padding: 0 12px 24px; }
    .grid { grid-template-columns: 1fr; gap: 12px; }
    .namepill { font-size: 21px; }
    .arow { grid-template-columns: 1fr 1fr; }
    .achk, .aact { grid-column: 1 / -1; }
    .kv { grid-template-columns: 1fr; gap: 0; }
    .kv .k { margin-top: 8px; font-size: 12.5px; }
    .kv .k:first-child { margin-top: 0; }
}

/* Klappbare Karten */
.sech.fold { cursor: pointer; display: flex; align-items: center; gap: 8px; user-select: none; }
.sech.fold:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.sech .chev { width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin: -3px 4px 0 2px; transition: transform .15s; flex: none; }
.sec.closed .chev { transform: rotate(-45deg); margin-top: 0; }
.sech .fh { margin-left: auto; font-size: 12px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--muted); }
.sec.closed .secbody { display: none; }
.sec.closed .sech { margin-bottom: 0; }
/* Inventar */
.swlist { margin-top: 10px; max-height: 420px; overflow: auto; }
.swrow { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--faint); font-size: 13.5px; }
.swrow:last-child { border-bottom: 0; }
.swn { color: var(--text); word-break: break-word; }
.swrow .s { text-align: right; flex: none; max-width: 55%; word-break: break-word; }
textarea.inp.note { width: 100%; box-sizing: border-box; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; resize: vertical; }
.sech a { color: inherit; text-decoration: none; }

.kv .v { white-space: pre-line; }

.optchips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 16px; }
.optchips .pill { cursor: pointer; font-family: var(--font); }

/* Handy: nichts darf breiter als der Bildschirm werden */
html, body { max-width: 100%; overflow-x: hidden; }
.kv .v, .kv .k, .swn, .swrow .s { overflow-wrap: anywhere; }
.kv { grid-template-columns: max-content minmax(0, 1fr); }
@media (max-width: 520px) {
    .top .in { flex-wrap: wrap; gap: 4px 6px; }
    .brand { flex: 1 0 100%; margin-right: 0; }
    .top a.nav { padding: 6px 8px; }
    .kv { grid-template-columns: minmax(0, 1fr); }
}

/* ===== Seitenleiste und Dashboard (V3.24) ===== */
.s-crit { --c: var(--crit); } .s-warn { --c: var(--warn); } .s-ok { --c: var(--ok); }
.s-stale { --c: var(--stale); } .s-off { --c: var(--off); } .s-info { --c: var(--accent); }
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 224px; flex: none; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 14px 10px; position: sticky; top: 0; height: 100vh; box-sizing: border-box; overflow-y: auto; z-index: 30; }
.sidebar .brand { padding: 4px 8px 16px; margin: 0; flex: none; }
.sidebar h4 { margin: 16px 10px 6px; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.sidebar .it { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--muted); font-size: 14.5px; background: transparent; border: 0; width: 100%; font-family: inherit; cursor: pointer; text-align: left; box-sizing: border-box; }
.sidebar .it svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sidebar .it:hover { background: var(--raised); color: var(--text); }
.sidebar .it.on { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--text); }
.sidebar .it.on svg { color: var(--accent); }
.sidebar .cnt { margin-left: auto; font-size: 12px; background: var(--crit); color: #fff; border-radius: 99px; padding: 1px 7px; font-weight: 600; }
.sidebar .bot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 10px; }
.sidebar .themebtn.it { margin: 0; }
.sidebar .ver { padding: 8px 10px 0; font-size: 12px; color: var(--muted); }
.mainc { flex: 1; min-width: 0; }
.topbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 14px 24px; border-bottom: 1px solid var(--line); }
.topbar h1 { margin: 0; font-size: 20px; font-weight: 650; }
.topbar .sp { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.burger { display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 8px; width: 38px; height: 36px; padding: 0; cursor: pointer; }
.burger svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; display: block; margin: 0 auto; }
.navscrim { display: none; }
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--c); border-radius: 12px; padding: 14px 16px; cursor: pointer; }
.kpi b { display: block; font-size: 30px; line-height: 1.1; font-weight: 700; color: var(--text); }
.kpi span { font-size: 13px; color: var(--muted); }
.kpi:hover { background: var(--raised); }
.kpi.on { outline: 2px solid var(--c); outline-offset: -1px; }
.kpi.zero { opacity: .55; cursor: default; }
.kpi.zero b { color: var(--muted); }
.dx-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-top: 16px; overflow: hidden; }
.dx-ph { display: flex; align-items: center; gap: 10px; padding: 14px 18px; }
.dx-panel > .dx-ph { border-bottom: 1px solid var(--line); }
.dx-ph h3 { margin: 0; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.dx-ph .r { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.dx-more { font-size: 13px; color: var(--accent); }
.dx-scroll { overflow-x: auto; }
table.dx-t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.dx-t th { text-align: left; font-weight: 600; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 9px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.dx-t td { padding: 10px 14px; border-bottom: 1px solid var(--faint); vertical-align: middle; }
table.dx-t tbody tr { cursor: pointer; }
table.dx-t tbody tr:last-child td { border-bottom: 0; }
table.dx-t tbody tr:hover td { background: var(--hover); }
table.dx-t .m { color: var(--muted); }
table.dx-t .nw { white-space: nowrap; }
.dx-c1 { width: 24px; padding-right: 0 !important; }
.dx-name { font-weight: 650; }
td.dx-stripe { padding: 0 !important; width: 5px; }
td.dx-stripe i { display: block; width: 5px; height: 40px; background: var(--c); }
.dx-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.dx-empty { padding: 18px; display: flex; align-items: center; gap: 10px; color: var(--muted); }
.dx-tag { display: inline-block; border-radius: 6px; padding: 2px 8px; font-size: 12px; font-weight: 600; background: color-mix(in srgb, var(--c) 22%, transparent); color: var(--c); white-space: nowrap; }
.dx-meter { display: inline-block; width: 64px; height: 6px; border-radius: 9px; background: var(--line); vertical-align: middle; margin-right: 8px; overflow: hidden; }
.dx-meter i { display: block; height: 100%; background: var(--c); border-radius: 9px; }
.dx-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.dx-seg span { padding: 4px 11px; font-size: 13px; color: var(--muted); cursor: pointer; }
.dx-seg span.on { background: var(--raised); color: var(--text); }
.v-warn { color: var(--warn); } .v-crit { color: var(--crit); font-weight: 600; }
.dx-grid { margin-top: 0; }
#devs > .dx-ph { padding: 16px 0 12px; }
.page { max-width: 2000px; margin: 0; padding: 20px 24px 40px; }
.pill.pick.grp b { margin-left: 2px; }
.pm { display: none; }
@media (max-width: 900px) {
    .sidebar { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); transition: transform .18s; box-shadow: var(--shadow); }
    body.navopen .sidebar { transform: none; }
    body.navopen .navscrim { display: block; position: fixed; inset: 0; background: var(--scrim); z-index: 20; }
    .burger { display: block; }
    .topbar { padding: 12px 14px; }
    .topbar .sp { margin-left: 0; flex: 1 0 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
    .topbar .sp .pill { flex: none; }
    .page { padding: 14px 12px 30px; }
    .kpis { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .hm { display: none; }
    .pm { display: table-cell; }
    table.dx-t th, table.dx-t td { padding: 9px 6px; }
    table.dx-t td, table.dx-t th { white-space: nowrap; }
    table.dx-t td:nth-child(2) { white-space: normal; }
    table.dx-t .dx-tag { padding: 2px 8px; font-size: 12px; }
}

/* V3.25 Markenzeile */
.brand .bt { display: flex; flex-direction: column; line-height: 1.15; }
.brand .bt small { font-size: 11px; font-weight: 500; letter-spacing: .04em; color: var(--muted, #8b95a5); margin-top: 1px; }

/* V3.26 Laufwerk-Kacheln */
.tile .ts { font-size: 11px; font-weight: 500; color: var(--muted); margin-top: 2px; }

/* V3.30 Reiter im Gerät */
.dtabs { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--line); margin: 4px 0 16px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.dtabs::-webkit-scrollbar { display: none; }
.dtab { flex: none; background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--muted); font: inherit; font-size: 14px; font-weight: 550; padding: 10px 14px; cursor: pointer; white-space: nowrap; border-radius: 0; }
.dtab:hover { color: var(--text); }
.dtab.on { color: var(--text); border-bottom-color: var(--accent); }
.dbadge { display: inline-block; margin-left: 7px; min-width: 18px; padding: 0 6px; border-radius: 9px; background: var(--accent-bg); color: var(--accent); font-size: 12px; line-height: 18px; text-align: center; }

.dx-t tr[onclick], .dx-t tbody tr { cursor: pointer; }
#secp .hint { padding: 12px 16px; }

/* V3.33 Verlauf, Aktivität, Berichte */
.rbar { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.rbtn { background: var(--panel2, var(--panel)); color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 12.5px; cursor: pointer; }
.rbtn.on { background: var(--accent, #4c9aff); color: #fff; border-color: transparent; }
.chwrap { margin-bottom: 4px; }
.chart .cur { stroke: var(--muted); stroke-dasharray: 3 3; }
.chread { min-height: 18px; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.histbox .ptitle { margin-top: 12px; }
.actbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.actbar .inp { flex: 1 1 200px; min-width: 0; }
.repttl { margin: 0; flex: 1 1 100%; font-size: 18px; }
.actlist { display: flex; flex-direction: column; }
.actrow { display: grid; grid-template-columns: 128px 150px 1fr; gap: 10px; padding: 9px 14px; border-top: 1px solid var(--line); font-size: 13.5px; align-items: baseline; }
.actrow:first-child { border-top: 0; }
.actrow time { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.actpc { font-weight: 600; color: inherit; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.actrow.a-bad .acttx { color: #f59e0b; }
.actrow.a-ok .acttx { color: #34d399; }
.actrow.a-off .acttx { color: #f87171; }
.actmore { padding: 10px 14px; }
.actmore:empty { display: none; }
@media (max-width: 700px) {
  .actrow { grid-template-columns: 1fr; gap: 2px; }
}
.rsum { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 14px; }
.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.rcard { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.rhead { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 15px; }
.rstats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.rstat { background: var(--panel2, rgba(255,255,255,.04)); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 1px; }
.rstat .rl { font-size: 11.5px; color: var(--muted); }
.rstat b { font-size: 16px; }
.rstat .rs { font-size: 11.5px; color: var(--muted); }
.rstat.warn b { color: #f59e0b; }
.rstat.crit b { color: #f87171; }
.rdisks { margin-top: 10px; }
@media print { .sidebar, .navscrim, .actbar .inp, .actbar .btn { display: none !important; } }

/* V3.34 Remotezugriff */
.rdrow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); }
.rdrow:first-child { border-top: 0; }
.rdn { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rdact { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.btn.dis { opacity: .45; }
@media (max-width: 560px) { .rdrow { flex-wrap: wrap; } .rdact { width: 100%; justify-content: flex-start; padding-left: 22px; } }

.prow b.muted { color: var(--muted); font-weight: 500; }

/* V3.37 Tabellen als Karten auf dem Handy */
@media (max-width: 700px) {
  .dx-t.stack, .dx-t.stack tbody { display: block; }
  .dx-t.stack thead { display: none; }
  .dx-t.stack tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; padding: 12px 14px; border-top: 1px solid var(--line); }
  .dx-t.stack td { display: block; padding: 0; border: 0; white-space: normal; min-width: 0; }
  .dx-t.stack td:first-child { grid-column: 1 / -1; font-size: 15px; }
  .dx-t.stack td:not(:first-child)::before { content: attr(data-l); display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 1px; }
  .dx-t.stack td.hm { display: none; }
}

/* V3.41 Seitenleiste mit Zählern, Schnellaktionen */
.sidebar .cnt.info { background: var(--accent); }
.sidebar .cnt.warn { background: #d99a1c; color: #1a1300; }
.qa { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.qa .btn { padding: 6px 12px; font-size: 13px; }
.dx-t td.qacell { white-space: nowrap; text-align: right; }
.dx-t .btn.sm { padding: 4px 10px; font-size: 12.5px; }

.dlg p { white-space: pre-line; }
.updl { margin-top: 4px; font-size: 12.5px; color: var(--muted); font-weight: 400; }
.updl div { padding: 1px 0; }
.updl .more { font-style: italic; }
