/* ===== Tokens (hell; dunkel über prefers-color-scheme), Farben wie im Releaseboard ===== */
:root {
  --brandRed: #D51E2D;
  --brandRed2: #B91522;

  --good: #1f9d5c;
  --warn: #b7791f;
  --bad: #c53030;
  --info: #2563eb;
  --goodBg: rgba(47, 191, 113, .14);
  --warnBg: rgba(240, 180, 41, .20);
  --badBg: rgba(214, 69, 69, .14);
  --infoBg: rgba(37, 99, 235, .12);
  --noneBg: rgba(15, 23, 42, .06);

  --pageBg: #f6f7f9;
  --panelBg: #ffffff;
  --panelBg2: #f3f4f6;
  --text: rgba(15, 23, 42, .92);
  --muted: rgba(15, 23, 42, .60);
  --border: rgba(15, 23, 42, .10);
  --shadow: 0 6px 18px rgba(15, 23, 42, .06);
  --btnBg: rgba(15, 23, 42, .03);
  --btnBorder: rgba(15, 23, 42, .14);
  --chartLine: #2563eb;
  --chartGrid: rgba(15, 23, 42, .08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --good: #4ade80;
    --warn: #fbbf24;
    --bad: #f87171;
    --info: #60a5fa;
    --goodBg: rgba(74, 222, 128, .14);
    --warnBg: rgba(251, 191, 36, .16);
    --badBg: rgba(248, 113, 113, .16);
    --infoBg: rgba(96, 165, 250, .16);
    --noneBg: rgba(255, 255, 255, .06);

    --pageBg: #0b0f15;
    --panelBg: #121821;
    --panelBg2: #0f141c;
    --text: #e9edf7;
    --muted: rgba(233, 237, 247, .62);
    --border: rgba(255, 255, 255, .10);
    --shadow: 0 10px 28px rgba(0, 0, 0, .35);
    --btnBg: rgba(255, 255, 255, .06);
    --btnBorder: rgba(255, 255, 255, .16);
    --chartLine: #60a5fa;
    --chartGrid: rgba(255, 255, 255, .10);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--pageBg); color: var(--text); }
body { font: 14px/1.45 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
a { color: var(--info); text-decoration: none; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.error { color: var(--bad); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.app { max-width: 2560px; margin: 0 auto; padding: 12px 16px 40px; }
/* 4K ohne Skalierung des Betriebssystems: doppelt groß, wirkt wie 1920 px Breite, nur schärfer */
@media (min-width: 3200px) {
  body { zoom: 2; }
}
/* TV-Modus (?tv=1): keine Bedienelemente, Uhr groß; den Zoom setzt die Seite passend zur Höhe */
.tvClock { display: none; }
.tv .tvClock { display: block; font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tv .viewTabs { visibility: hidden; }
.tv .toolbarActions, .tv .laneAction, .tv .actionCell, .tv [data-action="toggle-features"] { display: none; }
/* Stand veraltet: großes Banner, Inhalt ausgegraut */
.staleBanner { margin-top: 12px; padding: 14px 18px; border-radius: 12px; background: var(--badBg); color: var(--bad); border: 2px solid var(--bad); font-size: 20px; font-weight: 700; }
.content.stale { opacity: .35; filter: grayscale(1); }

/* ===== Kopf ===== */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 8px 0 12px; border-bottom: 1px solid var(--border); }
.titleRow { display: flex; align-items: center; gap: 10px; }
.brandIcon { height: 34px; width: auto; }
.title { font-size: 20px; font-weight: 700; }
.appMeta { font-size: 12px; color: var(--muted); }
.viewTabs { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.viewTab { border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 600; padding: 8px 12px; border-radius: 8px; cursor: pointer; }
.viewTab:hover { background: var(--btnBg); color: var(--text); }
.viewTab.active { color: var(--text); background: var(--panelBg); box-shadow: inset 0 -2px 0 var(--brandRed); }

.btn { font: inherit; color: var(--text); background: var(--btnBg); border: 1px solid var(--btnBorder); border-radius: 8px; padding: 6px 12px; cursor: pointer; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--brandRed); border-color: var(--brandRed); color: #fff; }
.btn.primary:hover { background: var(--brandRed2); }
.btn.small { padding: 3px 8px; font-size: 12px; }
.btn.active { background: var(--infoBg); border-color: var(--info); }
.btn:disabled { opacity: .55; cursor: wait; }
.input { font: inherit; color: var(--text); background: var(--panelBg); border: 1px solid var(--btnBorder); border-radius: 8px; padding: 5px 8px; }

.toolbarActions { display: flex; gap: 8px; }
.content { margin-top: 12px; }
.statusLine { flex: 0 1 auto; max-width: 50%; font-size: 13px; color: var(--muted); text-align: right; }
.statusLine.bad { color: var(--bad); }
@media (max-width: 1100px) {
  .statusLine { order: 10; flex-basis: 100%; max-width: none; text-align: left; }
}

/* ===== Abschnitte ===== */
.section { margin-top: 16px; }
.section h2 { font-size: 16px; margin: 0 0 6px; }
.sectionHead > .hint { margin: 0 0 6px; }
.sectionHead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hint { margin: 0 0 10px; font-size: 12px; color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 6px 0 12px; }
.filters label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }

/* ===== Kennzahlen ===== */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.kpi { background: var(--panelBg); border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; box-shadow: var(--shadow); }
.kpiLabel { font-size: 12px; color: var(--muted); }
.kpiValue { margin: 4px 0 2px; min-height: 28px; display: flex; align-items: center; }
.kpiNumber { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpiSub { font-size: 12px; color: var(--muted); }

/* ===== Status-Plaketten (Symbol + Text, Farbe nie allein) ===== */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px 1px 6px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--noneBg); color: var(--muted); }
.badgeIcon { font-weight: 800; }
.st-succeeded.badge { background: var(--goodBg); color: var(--good); }
.st-partial.badge { background: var(--warnBg); color: var(--warn); }
.st-failed.badge { background: var(--badBg); color: var(--bad); }
.st-running.badge, .st-queued.badge { background: var(--infoBg); color: var(--info); }
.st-running .badgeIcon { display: inline-block; animation: spin 1.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .st-running .badgeIcon { animation: none; } }
.tag { display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 6px; background: var(--warnBg); color: var(--warn); font-weight: 600; }
.tag.bad { background: var(--badBg); color: var(--bad); }
.tag.soft { background: var(--noneBg); color: var(--muted); }

/* ===== Tabellen ===== */
.tableWrap { overflow-x: auto; background: var(--panelBg); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--border); }
thead th { font-size: 12px; color: var(--muted); font-weight: 600; background: var(--panelBg2); position: sticky; top: 0; }
tbody tr:last-child > * { border-bottom: 0; }
.sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.branchName { font-weight: 700; }
.actionCell { white-space: nowrap; text-align: right; }
.nowrap { white-space: nowrap; }
.note { display: block; font-size: 12px; margin-top: 3px; }
a.note.st-running, a.note.st-queued { color: var(--info); }
a.note.st-failed { color: var(--bad); }
/* Laufender Build ohne geladenen Schritt: Hinweis noch nicht zeigen */
.stepNote:has(.runStep:empty) { display: none; }

/* ===== Stufen-Plaketten (Symbol + Text, Farbe nie allein) ===== */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 7px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--noneBg); color: var(--muted); text-decoration: none; }
a.chip:hover { text-decoration: none; filter: brightness(.95); }
.chipIcon { font-weight: 800; min-width: 10px; text-align: center; }
.chipLabel { color: var(--text); font-weight: 600; }
.chipText { font-weight: 500; }
.chip.st-succeeded { background: var(--goodBg); color: var(--good); }
.chip.st-partial { background: var(--warnBg); color: var(--warn); }
.chip.st-failed { background: var(--badBg); color: var(--bad); }
.chip.st-running, .chip.st-queued { background: var(--infoBg); color: var(--info); }
.chip.st-running .chipIcon { display: inline-block; animation: spin 1.4s linear infinite; }
@media (prefers-reduced-motion: reduce) { .chip.st-running .chipIcon { animation: none; } }
.chip.st-none .chipLabel { color: var(--muted); }

/* ===== Auslieferung: ein Zweig je Block, Kopf links, Stufenfolge und darunter die Hinweise ===== */
.lanes { background: var(--panelBg); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.lane { display: grid; grid-template-columns: minmax(150px, 240px) minmax(0, 1fr) auto; gap: 6px 16px; align-items: center; padding: 10px 14px; }
.lane + .lane { border-top: 1px solid var(--border); }
/* Letzte Kette rot oder gelb: Balken links und getönter Hintergrund, damit es aus der Entfernung auffällt */
.lane.st-failed { background: var(--badBg); box-shadow: inset 6px 0 0 var(--bad); }
.lane.st-partial { background: var(--warnBg); box-shadow: inset 6px 0 0 var(--warn); }
.laneCause { font-weight: 600; }
.laneCause.st-failed { color: var(--bad); }
.laneCause.st-partial { color: var(--warn); }
.laneCause:empty { display: none; }
/* Ursache als Schalter: klappt die Meldungen darunter auf */
button.laneCause { font: inherit; font-size: 12px; font-weight: 600; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
button.laneCause::after { content: " · Details ▸"; font-weight: 400; color: var(--muted); }
button.laneCause[aria-expanded="true"]::after { content: " · Details ▾"; }
button.laneCause:hover::after, button.laneCause:focus-visible::after { text-decoration: underline; }
.tv button.laneCause::after { display: none; }
.causeDetail { grid-column: 2 / -1; background: var(--panelBg); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font-size: 12px; }
.causeGroup + .causeGroup { margin-top: 10px; }
.causeHead { font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.causeList { list-style: none; margin: 0; padding: 0; }
.causeList > li + li { margin-top: 6px; }
.causeName { font-weight: 600; }
.causeIcon { font-weight: 800; display: inline-block; min-width: 12px; }
.causeList .st-failed > .causeIcon { color: var(--bad); }
.causeList .st-partial > .causeIcon, .causeList .st-ok > .causeIcon { color: var(--warn); }
.causeMsg { margin-top: 2px; padding-left: 8px; border-left: 3px solid var(--bad); white-space: pre-wrap; overflow-wrap: anywhere; }
.causeMsg.warning { border-left-color: var(--warn); }
.causeLog { margin: 4px 0 0; padding: 6px 8px; background: var(--panelBg2); border-radius: 6px; font-size: 11px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 240px; overflow: auto; }
.causeFoot { margin-top: 8px; }
.laneHead { grid-row: 1 / span 2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.laneHead .branchName { font-size: 15px; }
.laneNotes { grid-column: 2; display: flex; flex-wrap: wrap; gap: 1px 14px; min-height: 16px; }
.laneNotes .note { margin-top: 0; }
.laneAction { grid-column: 3; grid-row: 1 / span 2; }
.steps { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.laneChains { display: flex; flex-direction: column; gap: 6px; }
.chainWhen { font-size: 12px; color: var(--muted); min-width: 110px; }
.arrow { color: var(--muted); font-size: 12px; }
.featureTable th[scope="row"] { font-weight: 400; min-width: 200px; }
.featureTable td, .featureTable th { vertical-align: middle; padding: 4px 10px; }

/* ===== Pipeline-Liste ===== */
.pgroups { display: grid; grid-template-columns: repeat(auto-fit, minmax(560px, 1fr)); gap: 10px 16px; align-items: start; }
.pgroup { background: var(--panelBg); border: 1px solid var(--border); border-radius: 12px; padding: 6px 12px 8px; box-shadow: var(--shadow); }
.pgroup h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 6px 0 4px; }
.prow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto 44px; gap: 10px; align-items: center; padding: 4px 0; }
.prow + .prow { border-top: 1px solid var(--border); }
.pName { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pRate { font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.prow .stripMark { width: 8px; height: 14px; }
.prow.quiet .pName { grid-column: 2 / -1; white-space: normal; color: var(--muted); }
/* Breite Bildschirme: drei Spalten ohne Lücken (kleine Gruppen rücken unter größere) */
@media (min-width: 1500px) {
  .pgroups { display: block; columns: 3; column-gap: 16px; }
  .pgroups > .pgroup { break-inside: avoid; margin-bottom: 10px; }
  .pgroups > .pgroup:last-child { margin-bottom: 0; }
}
@media (max-width: 700px) {
  .lane { grid-template-columns: 1fr; }
  .laneHead, .laneNotes, .laneAction, .causeDetail { grid-column: auto; grid-row: auto; }
  .pgroups { grid-template-columns: 1fr; }
  .prow { grid-template-columns: auto minmax(0, 1fr) 44px; }
  .prow .strip { grid-column: 2 / 4; }
}
.num { text-align: right; font-variant-numeric: tabular-nums; }
.chainRow { cursor: pointer; }
.chainRow:hover, .chainRow:focus-visible { background: var(--panelBg2); outline: none; }
.chainDetail > td { background: var(--panelBg2); }
.testsTable td { vertical-align: middle; }
.testsTable .rank { width: 28px; color: var(--muted); }
.testName { max-width: 640px; }
.testName .sub { margin-top: 1px; }
.failCell { white-space: nowrap; }
.failBar { display: inline-block; width: 90px; height: 8px; margin-right: 8px; border-radius: 4px; background: var(--noneBg); vertical-align: middle; overflow: hidden; }
.failBar > span { display: block; height: 100%; background: var(--bad); border-radius: 4px; }
.kpiNumber.bad { color: var(--bad); }
.kpiNumber.warn { color: var(--warn); }
a.kpiLink { display: block; color: inherit; text-decoration: none; }
a.kpiLink:hover { border-color: var(--muted); }
/* Plätze voll (orange) oder ein Job wartet (rot): wie eine gestörte Auslieferung, damit es aus der Entfernung auffällt */
.kpi.st-failed { background: var(--badBg); border-color: var(--bad); box-shadow: inset 6px 0 0 var(--bad), var(--shadow); }
.kpi.st-partial { background: var(--warnBg); border-color: var(--warn); box-shadow: inset 6px 0 0 var(--warn), var(--shadow); }
.kpiList { margin: 0; padding: 0; list-style: none; }
@media (min-width: 900px) {
  .kpi.wide { grid-column: span 2; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 24px; align-items: center; }
  .kpi.wide > .kpiLabel, .kpi.wide > .kpiValue { grid-column: 1; }
  .kpi.wide > .kpiSub { grid-column: 2; grid-row: 1 / span 2; }
}
.kpiList li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpiAgent { font-weight: 600; color: var(--text); }

/* ===== Karten ===== */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 10px; }
.card { background: var(--panelBg); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow); }
.cardHead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cardTitle { font-weight: 700; color: var(--text); }
.cardStrip { margin: 8px 0 4px; }
.cardMeta { font-size: 12px; color: var(--muted); }

/* ===== Leiste der letzten Läufe ===== */
.strip { display: inline-flex; flex-wrap: wrap; gap: 2px; }
.stripMark { display: inline-block; width: 10px; height: 18px; border-radius: 3px; background: var(--noneBg); }
.stripMark.st-succeeded { background: var(--good); }
.stripMark.st-partial { background: var(--warn); }
.stripMark.st-failed { background: var(--bad); }
.stripMark.st-running, .stripMark.st-queued { background: var(--info); }
.stripMark.st-canceled { background: var(--muted); opacity: .5; }
.stripMark.st-skipped { background: var(--noneBg); outline: 1px dashed var(--btnBorder); outline-offset: -1px; }
.stripMark:hover { transform: scaleY(1.15); }

/* ===== Diagramme ===== */
.chart { width: 100%; height: auto; display: block; }
.chartGrid { stroke: var(--chartGrid); stroke-width: 1; }
.chartGrid.base { stroke: var(--btnBorder); }
.chartAxis { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chartArea { fill: var(--chartLine); opacity: .10; }
.chartArea.strong { opacity: .55; }
.chartAxis.strong { fill: var(--text); font-weight: 600; }
.chartWait { fill: none; stroke: var(--warn); stroke-width: 2; stroke-linejoin: round; }
.chartLimit { stroke: var(--text); stroke-width: 1; stroke-dasharray: 5 4; opacity: .6; }
.chartHitRect { fill: transparent; }
.chartHitRect:hover { fill: var(--text); fill-opacity: .06; }
.chartLegend { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.chartLegend .key { display: inline-block; width: 14px; height: 8px; border-radius: 2px; margin-left: 8px; }
.chartLegend .key.run { background: var(--chartLine); opacity: .55; }
.chartLegend .key.wait { height: 0; border-top: 2px solid var(--warn); border-radius: 0; }
.chartLegend .key.limit { height: 0; border-top: 1px dashed var(--text); border-radius: 0; opacity: .6; }
.chartLine { fill: none; stroke: var(--chartLine); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chartRef { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 4; }
.refKey { display: inline-block; width: 16px; margin-right: 5px; vertical-align: middle; border-top: 1px dashed var(--muted); }
.chartDot { fill: var(--chartLine); stroke: var(--panelBg); stroke-width: 2; }
.chartHitArea { fill: transparent; }
.chartHit:hover .chartDot { r: 6; }

.rangeLegend { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.rangeKey { display: inline-block; width: 14px; height: 8px; border-radius: 2px; background: var(--chartLine); }
.rangeKey.p90 { margin-left: 10px; opacity: .3; }
.rangeRow { display: grid; grid-template-columns: minmax(120px, 42%) 1fr 104px; gap: 10px; align-items: center; padding: 5px 0; }
.rangeRow + .rangeRow { border-top: 1px solid var(--border); }
.rangeLabel { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rangeTrack { position: relative; height: 10px; }
.rangeBar, .rangeP90 { position: absolute; left: 0; top: 0; bottom: 0; min-width: 3px; background: var(--chartLine); border-radius: 0 4px 4px 0; }
.rangeP90 { opacity: .3; }
.rangeValue { font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.dayColumns { display: flex; gap: 3px; margin-top: 10px; }
.dayCol { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dayColPlot { height: 72px; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; border-bottom: 1px solid var(--btnBorder); }
.dayColValue { font-size: 11px; font-weight: 600; text-align: center; color: var(--text); font-variant-numeric: tabular-nums; }
.dayColBar { display: block; width: 100%; background: var(--bad); border-radius: 4px 4px 0 0; }
.dayColBar.zero { height: 0 !important; }
.dayColLabel { font-size: 11px; color: var(--muted); text-align: center; white-space: nowrap; margin-top: 3px; min-height: 14px; }
.dayCol:last-child .dayColLabel { display: flex; justify-content: flex-end; }

/* ===== Durchlaufzeiten ===== */
.chainSteps { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; }
.chainSteps > .arrow { align-self: center; }
.chainStep, .chainTotal { flex: 1 1 170px; display: flex; flex-direction: column; gap: 2px; text-align: left; font: inherit; color: var(--text); background: var(--panelBg); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow); }
.chainStep { cursor: pointer; }
.chainStep:hover { border-color: var(--muted); }
.chainStep.active { border-color: var(--info); box-shadow: inset 0 0 0 1px var(--info), var(--shadow); }
.chainTotal { background: var(--panelBg2); margin-left: 8px; }
.csName { font-size: 12px; color: var(--muted); }
.csValue { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.csSub { font-size: 12px; color: var(--muted); }
.csLine { font-size: 15px; font-variant-numeric: tabular-nums; display: flex; justify-content: space-between; gap: 8px; }
.durGrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr)); gap: 12px; margin-top: 16px; align-items: start; }
h2.cardTitle { font-size: 15px; margin: 0; }
.cardFacts { font-size: 13px; margin: 4px 0 8px; }

/* ===== Auslastung: Belegung je Stunde ===== */
.capHint { margin: 8px 0 0; }
.heatmap { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.hmRow { display: grid; grid-template-columns: 76px repeat(24, minmax(0, 1fr)); gap: 2px; align-items: center; }
.hmLabel { font-size: 11px; color: var(--muted); white-space: nowrap; }
.hmHour { font-size: 11px; color: var(--muted); }
.hmCell { position: relative; display: block; height: 14px; border-radius: 2px; background: var(--noneBg); }
.hmCell.l1 { background: color-mix(in srgb, var(--chartLine) 30%, transparent); }
.hmCell.l2 { background: color-mix(in srgb, var(--chartLine) 60%, transparent); }
.hmCell.l3 { background: var(--chartLine); }
.hmCell.future { background: transparent; outline: 1px dashed var(--border); outline-offset: -1px; }
.hmCell.wait::after { content: ""; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 1.5px var(--panelBg); }
.hmLegend { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.hmLegend .hmCell { display: inline-block; width: 14px; margin-left: 6px; }

/* ===== Rechner ===== */
.machines { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 10px; }
.machine { display: flex; flex-direction: column; gap: 8px; background: var(--panelBg); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow); }
.machine.busy { border-color: color-mix(in srgb, var(--info) 45%, var(--border)); }
.machine.inactive { opacity: .7; }
.mHead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mName { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mNow { display: flex; flex-wrap: wrap; gap: 6px; min-height: 24px; align-items: center; font-size: 13px; }
.mNow .chip { white-space: normal; flex-wrap: wrap; max-width: 100%; border-radius: 12px; }
.mTrack { position: relative; height: 14px; border-radius: 4px; background: var(--noneBg); overflow: hidden; }
.mSeg { position: absolute; top: 2px; bottom: 2px; border-radius: 2px; background: var(--chartLine); opacity: .75; }
.mSeg.live { opacity: 1; background: var(--info); }
.mTick { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--btnBorder); }
.mTrackLegend { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: -4px; }
.mMeta { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.mPools { display: flex; flex-wrap: wrap; gap: 4px; }
.mPool { padding: 0 6px; border-radius: 6px; background: var(--noneBg); color: var(--text); }
.mPool.off { color: var(--muted); text-decoration: line-through; }
.inactiveMachines { margin-top: 10px; }
.inactiveMachines summary { cursor: pointer; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.poolTable th[scope="row"] { font-weight: 600; white-space: nowrap; }
.poolTable td, .poolTable th { vertical-align: middle; }
.warnText { color: var(--warn); font-weight: 600; }
.badText { color: var(--bad); font-weight: 600; }

/* ===== Zeitleiste eines Laufs ===== */
.tlBlock + .tlBlock { margin-top: 14px; }
.tlHead { margin-bottom: 6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tlRow { display: grid; grid-template-columns: minmax(160px, 300px) 1fr 80px; gap: 8px; align-items: center; padding: 2px 0; }
.tlLabel { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tlTrack { position: relative; height: 10px; background: var(--noneBg); border-radius: 3px; }
.tlBar { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: var(--good); }
.tlBar.st-failed { background: var(--bad); }
.tlBar.st-partial { background: var(--warn); }
.tlBar.st-running { background: var(--info); }
.tlValue { font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }

/* ===== Dialog ===== */
.dlg { border: 1px solid var(--border); border-radius: 14px; padding: 18px; background: var(--panelBg); color: var(--text); width: min(560px, calc(100vw - 32px)); box-shadow: var(--shadow); }
.dlg::backdrop { background: rgba(0, 0, 0, .35); }
.dlgTitle { font-size: 17px; font-weight: 700; margin-bottom: 12px; }
.dlgLabel { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.dlgCheck { display: flex; align-items: center; gap: 6px; margin: 6px 0; }
.dlgInfo, .dlgWarn { margin: 12px 0 0; padding-left: 18px; font-size: 13px; }
.dlgInfo li, .dlgWarn li { margin: 3px 0; }
.dlgWarn { color: var(--warn); }
.dlgError { margin-top: 10px; color: var(--bad); font-weight: 600; }
.dlgActions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

@media (max-width: 700px) {
  .rangeRow, .tlRow { grid-template-columns: 1fr; gap: 2px; }
  .kpiNumber { font-size: 18px; }
}
