/*
 * DOCK301 Health — Gestaltung (DOCK301: dunkel als Standard, helles Thema per Umschalter).
 * Mobil zuerst; ab 900 px seitliche Navigation.
 */

/* ------------------------------------------------------------ Schriften */
@font-face { font-family: "Clash Display"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/clash-display-500.woff2") format("woff2"); }
@font-face { font-family: "Clash Display"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/clash-display-600.woff2") format("woff2"); }
@font-face { font-family: "Satoshi"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/satoshi-400.woff2") format("woff2"); }
@font-face { font-family: "Satoshi"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/satoshi-500.woff2") format("woff2"); }
@font-face { font-family: "Satoshi"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/satoshi-700.woff2") format("woff2"); }

/* ------------------------------------------------------------ Tokens */
:root {
  --bg: #030712;
  --surface: #0a101f;
  --raised: #111827;
  --text: #f2f4fa;
  --muted: #9ca3af;
  --line: rgba(242, 244, 250, .12);
  --line-soft: rgba(242, 244, 250, .07);
  --grid-dot: rgba(242, 244, 250, .09);

  --indigo: #6366f1;
  --indigo-deep: #4f46e5;
  --indigo-light: #818cf8;
  --violet: #9333ea;
  --violet-soft: #c084fc;
  --grad: linear-gradient(90deg, #4f46e5, #9333ea);
  --grad-text: linear-gradient(90deg, #818cf8, #c084fc);
  --accent: #818cf8;            /* Links, Linie im Diagramm, Fokus */

  --ok: #34d399;
  --warn: #fbbf24;
  --crit: #f87171;
  --off: #6b7280;
  --ok-text: #34d399;
  --warn-text: #fbbf24;
  --crit-text: #f87171;
  --ok-soft: rgba(52, 211, 153, .12);
  --warn-soft: rgba(251, 191, 36, .12);
  --crit-soft: rgba(248, 113, 113, .13);
  --sign: #030712;              /* Zeichen im Ampelpunkt */

  --r: 14px;
  --r-card: 18px;
  --font: "Satoshi", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Clash Display", "Satoshi", system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --tabs-h: 58px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f2f4fa;
  --surface: #ffffff;
  --raised: #ffffff;
  --text: #030712;
  --muted: #4b5563;
  --line: rgba(3, 7, 18, .14);
  --line-soft: rgba(3, 7, 18, .08);
  --grid-dot: rgba(3, 7, 18, .10);
  --accent: #4f46e5;
  --ok: #059669;
  --warn: #b45309;
  --crit: #dc2626;
  --off: #6b7280;
  --ok-text: #047857;           /* Text auf hellem Grund: Kontrast AA */
  --warn-text: #b45309;
  --crit-text: #b91c1c;
  --ok-soft: rgba(5, 150, 105, .10);
  --warn-soft: rgba(180, 83, 9, .10);
  --crit-soft: rgba(220, 38, 38, .09);
  --sign: #ffffff;
  color-scheme: light;
}

/* ------------------------------------------------------------ Grundlagen */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.45 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; color: inherit; }
b { font-weight: 700; }
svg { display: block; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.main:focus { outline: none; }

.sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50; padding: 8px 14px; border-radius: 99px;
  background: var(--raised); color: var(--text); border: 1px solid var(--line);
}
.skip:focus { top: calc(8px + env(safe-area-inset-top)); }

.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); font-size: .92em; }
.text-ok { color: var(--ok-text); }
.text-warn { color: var(--warn-text); }
.text-crit { color: var(--crit-text); }
.kicker {
  font: 500 10.5px/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.noscript { padding: 24px; text-align: center; }

/* ------------------------------------------------------------ Wortmarke */
.wordmark { font: 600 17px/1 var(--font-head); letter-spacing: .01em; color: var(--text); white-space: nowrap; }
.wordmark:hover { text-decoration: none; }
.wordmark-a { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme="light"] .wordmark-a { background: var(--grad); -webkit-background-clip: text; background-clip: text; }
.wordmark-b { font-weight: 500; }
.wordmark--lg { font-size: 28px; }

/* ------------------------------------------------------------ Knöpfe, Eingaben */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px;
  border: 1px solid var(--line); border-radius: 99px; background: transparent; color: var(--text);
  font-weight: 500; cursor: pointer;
}
.btn:hover { background: var(--line-soft); }
.btn--primary { border-color: transparent; background: var(--grad); color: #fff; font-weight: 700; }
.btn--primary:hover { background: var(--grad); filter: brightness(1.08); }
.btn--block { width: 100%; }
.btn:disabled { opacity: .6; cursor: default; }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid transparent; border-radius: 99px;
  background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { color: var(--text); background: var(--line-soft); }
.icon-btn svg, .tabs svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.is-busy svg { animation: spin .9s linear infinite; }
.ico-moon { display: none; }
:root[data-theme="light"] .ico-sun { display: none; }
:root[data-theme="light"] .ico-moon { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.input, .select, .field input {
  width: 100%; min-height: 42px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); color: var(--text);
}
.input::placeholder { color: var(--muted); opacity: 1; }
.select { padding-right: 30px; }

/* ------------------------------------------------------------ Anmeldung */
.login {
  min-height: 100vh; min-height: 100dvh; display: grid; place-items: center;
  padding: calc(24px + env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom));
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1.4px); background-size: 16px 16px;
}
.login-card {
  width: 100%; max-width: 380px; padding: 28px 22px 24px; border: 1px solid var(--line); border-radius: var(--r-card);
  background: var(--surface);
}
.login-card .kicker { margin: 8px 0 22px; }
.field { display: block; margin-bottom: 14px; }
.field-label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
.check { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--indigo); }
.form-msg {
  margin-bottom: 14px; padding: 10px 12px; border: 1px solid var(--crit); border-radius: var(--r);
  background: var(--crit-soft); color: var(--crit-text); font-size: 14px;
}

/* ------------------------------------------------------------ Gerüst */
.boot { max-width: 720px; margin: 0 auto; padding: calc(70px + env(safe-area-inset-top)) 16px 0; }

.app { min-height: 100vh; min-height: 100dvh; }

.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: calc(6px + env(safe-area-inset-top)) calc(8px + env(safe-area-inset-right)) 6px calc(16px + env(safe-area-inset-left));
  border-bottom: 1px solid var(--line-soft);
  background-color: var(--bg);
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1.4px); background-size: 14px 14px;
}
.stand { flex: 1; min-width: 0; text-align: right; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; gap: 2px; }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(6, 1fr);
  padding: 4px calc(4px + env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom)) calc(4px + env(safe-area-inset-left));
  border-top: 1px solid var(--line); background: var(--surface);
}
.tabs a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 50px; min-width: 0;
  border-radius: 12px; color: var(--muted); font-size: 10.5px; font-weight: 500; line-height: 1.1;
}
.tabs a:hover { text-decoration: none; color: var(--text); }
.tabs svg { width: 22px; height: 22px; padding: 0; box-sizing: content-box; border-radius: 99px; }
.tabs a[aria-current="page"] { color: var(--text); font-weight: 700; }
.tabs a[aria-current="page"] svg { padding: 2px 12px; background: var(--grad); color: #fff; }
.tabs a:not([aria-current="page"]) svg { padding: 2px 12px; }
.lbl-long { display: none; }

.main {
  max-width: 1120px; margin: 0 auto;
  padding: 12px calc(16px + env(safe-area-inset-right)) calc(var(--tabs-h) + 28px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left));
}

.banner {
  margin-bottom: 10px; padding: 8px 12px; border: 1px solid var(--warn); border-radius: var(--r);
  background: var(--warn-soft); color: var(--warn-text); font-size: 13.5px; font-weight: 500;
}

.view-title { margin: 4px 0 12px; font: 600 24px/1.15 var(--font-head); }

/* ------------------------------------------------------------ Kopf / Gesamtstatus */
.hero {
  position: relative; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-card);
  background-color: var(--surface);
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1.4px); background-size: 14px 14px;
}
.hero--warn { border-color: var(--warn); }
.hero--crit { border-color: var(--crit); }
.hero-title { display: flex; align-items: center; gap: 10px; margin-top: 4px; font: 600 24px/1.15 var(--font-head); }
.hero-sub { margin-top: 6px; font-size: 13.5px; color: var(--muted); }
.hero .notice { margin: 10px 0 0; }

.notice { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); font-size: 13.5px; background: var(--surface); }
.notice--warn { border-color: var(--warn); background: var(--warn-soft); }
.notice--crit { border-color: var(--crit); background: var(--crit-soft); }
.notice a { text-decoration: underline; color: inherit; font-weight: 500; }

/* ------------------------------------------------------------ Ampel */
.dot {
  flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: var(--off); color: var(--sign); font: 700 12px/1 var(--font);
}
.dot--ok { background: var(--ok); }
.dot--warn { background: var(--warn); }
.dot--crit { background: var(--crit); }
.dot--off { background: transparent; border: 1.5px solid var(--off); color: var(--muted); }
.hero-title .dot { width: 24px; height: 24px; font-size: 14px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 3px; border: 1px solid var(--line); border-radius: 99px;
  font-size: 12px; font-weight: 500; line-height: 1.5; white-space: nowrap; vertical-align: middle;
}
.badge-sign {
  display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--off);
  color: var(--sign); font: 700 10px/1 var(--font);
}
.badge--ok { color: var(--ok-text); border-color: var(--ok); background: var(--ok-soft); }
.badge--ok .badge-sign { background: var(--ok); }
.badge--warn { color: var(--warn-text); border-color: var(--warn); background: var(--warn-soft); }
.badge--warn .badge-sign { background: var(--warn); }
.badge--crit { color: var(--crit-text); border-color: var(--crit); background: var(--crit-soft); }
.badge--crit .badge-sign { background: var(--crit); }
.badge--off { color: var(--muted); }
.badge--off .badge-sign { background: transparent; border: 1.5px solid var(--off); color: var(--muted); }

.tag {
  display: inline-block; padding: 1px 8px; border: 1px solid var(--line); border-radius: 99px;
  font: 500 10px/1.5 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.ver { font: 400 11.5px/1.4 var(--font-mono); color: var(--muted); white-space: nowrap; }

/* ------------------------------------------------------------ Kacheln */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.tile {
  display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--r); background: var(--surface); color: var(--text);
}
.tile:hover { text-decoration: none; border-color: var(--accent); }
.tile .kicker { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-value { font: 600 22px/1.15 var(--font-head); white-space: nowrap; }
.tile-sub { display: flex; align-items: baseline; gap: 5px; font-size: 11.5px; line-height: 1.25; color: var(--muted); }
.pip { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--off); transform: translateY(-1px); }
.pip--ok { background: var(--ok); }
.pip--warn { background: var(--warn); }
.pip--crit { background: var(--crit); }
.tile--warn .tile-sub { color: var(--warn-text); }
.tile--crit .tile-sub { color: var(--crit-text); }

/* ------------------------------------------------------------ Filter */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px; border: 1px solid var(--line);
  border-radius: 99px; background: transparent; color: var(--muted); font-size: 13.5px; font-weight: 500; cursor: pointer;
}
.chip:hover { color: var(--text); }
.chip.is-active { border-color: transparent; background: var(--grad); color: #fff; }
.chip-n { font-size: 12px; opacity: .85; }

.tools { margin-bottom: 8px; }
.tools-row { display: grid; grid-template-columns: 1fr; gap: 8px; }
.count { margin: 10px 2px 6px; font-size: 12.5px; color: var(--muted); }
.footnotes { margin-top: 12px; font-size: 13px; display: grid; gap: 4px; }

/* ------------------------------------------------------------ Installationen */
.group { margin-top: 14px; }
.group-title { margin: 0 2px 6px; font: 500 10.5px/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.inst-list { display: grid; gap: 6px; }
.inst {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--text);
}
.inst:hover { text-decoration: none; border-color: var(--accent); }
.inst--warn { border-color: var(--warn); }
.inst--crit { border-color: var(--crit); }
.inst-main { display: grid; gap: 1px; min-width: 0; }
.inst-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.inst-name { font-weight: 700; }
.inst-status { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.inst-status.text-warn { color: var(--warn-text); }
.inst-status.text-crit { color: var(--crit-text); }
.inst-meta { font-size: 12px; color: var(--muted); }
.inst-side { display: grid; justify-items: end; gap: 4px; }
.inst-up { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.inst-up b { color: var(--text); font-weight: 500; }

.spark { width: 92px; height: 18px; }
.sp--ok { fill: var(--ok); opacity: .75; }
.sp--warn { fill: var(--warn); }
.sp--crit { fill: var(--crit); }

/* ------------------------------------------------------------ Karten, Listen */
.card { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.cards { display: grid; gap: 10px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.card-title { font: 600 18px/1.2 var(--font-head); }
.card-title a { color: var(--text); }
.card-sub { margin: 14px 0 4px; font: 500 10.5px/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.card-text { margin-bottom: 6px; font-size: 13.5px; color: var(--muted); }
.card.is-loading { opacity: .55; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.actions .muted { flex-basis: 100%; font-size: 13px; }

.sec { margin-top: 18px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.sec-title { margin: 0 2px 8px; font: 600 17px/1.2 var(--font-head); }
.sec-head .sec-title { margin-bottom: 0; }

.rows.card { padding: 2px 14px; }
.row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "state side" "main main";
  gap: 6px 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-soft);
}
.row:last-child { border-bottom: 0; }
.row-state { grid-area: state; }
.row-main { grid-area: main; min-width: 0; }
.row-side { grid-area: side; text-align: right; font-size: 12.5px; color: var(--muted); }
.row-title { font-weight: 500; }
.row-title a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.row-meta { font-size: 12.5px; color: var(--muted); }
.row-meta a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.row--event { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "state main side"; align-items: start; }
.row--event .row-side { white-space: nowrap; }
.dir { color: var(--muted); font-weight: 700; }

/* Beschreibungslisten */
.dl { display: grid; gap: 0; }
.kv { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.kv:last-child { border-bottom: 0; }
.kv dt { font-size: 12.5px; color: var(--muted); padding-top: 2px; }
.kv dd { min-width: 0; }
.dd-text { display: block; margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.dd-text.text-crit { color: var(--crit-text); }
.dd-text.text-warn { color: var(--warn-text); }
.kv dd .tag { margin-left: 6px; }
.dl--head { margin-top: 10px; padding: 4px 14px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.dl--compact .kv { padding: 6px 0; }

.back { margin: 0 0 8px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px 0 10px; border: 1px solid var(--line); border-radius: 99px; color: var(--text); font-size: 13.5px; font-weight: 500; }
.back-link:hover { text-decoration: none; background: var(--line-soft); }

/* Kennzahlen (Verfügbarkeit) */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.stat-value { font: 600 20px/1.15 var(--font-head); white-space: nowrap; }

/* Umschalter Zeitraum */
.seg { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); }
.seg-btn { min-height: 30px; padding: 0 12px; border: 0; border-radius: 99px; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 500; cursor: pointer; }
.seg-btn:hover { color: var(--text); }
.seg-btn.is-active { background: var(--grad); color: #fff; }

/* ------------------------------------------------------------ Diagramm */
.chart-read { min-height: 20px; margin-bottom: 6px; font-size: 13px; color: var(--muted); }
.chart-plot { position: relative; height: 160px; touch-action: pan-y; cursor: crosshair; border-radius: 8px; }
.chart-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart-grid { stroke: var(--line-soft); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-cursor { stroke: var(--muted); stroke-width: 1; vector-effect: non-scaling-stroke; }
.band--warn { fill: var(--warn); }
.band--crit { fill: var(--crit); }
.chart-dot {
  position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--surface); pointer-events: none;
}
.chart-dot--warn { background: var(--warn); }
.chart-dot--crit { background: var(--crit); }
.chart-y { position: absolute; left: 0; padding: 0 4px; font: 400 10px/1.4 var(--font-mono); color: var(--muted); background: var(--surface); border-radius: 4px; pointer-events: none; }
.chart-y--max { top: 0; }
.chart-y--min { bottom: 8px; }
.chart-x { display: flex; justify-content: space-between; margin-top: 4px; font: 400 10px/1.4 var(--font-mono); color: var(--muted); }
.empty-note { padding: 28px 0; text-align: center; color: var(--muted); font-size: 14px; }

/* Balken (Speicher) */
.meter { display: block; height: 6px; margin-top: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.meter-bar { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--ok); }
.meter-bar--warn { background: var(--warn); }
.meter-bar--crit { background: var(--crit); }

/* ------------------------------------------------------------ Zustände: leer, Fehler, Laden */
.state { padding: 26px 18px; border: 1px dashed var(--line); border-radius: var(--r-card); text-align: center; }
.state-title { font: 600 17px/1.25 var(--font-head); }
.state-text { max-width: 46ch; margin: 6px auto 0; font-size: 14px; color: var(--muted); }
.state .btn { margin-top: 14px; }
.state--error { border-style: solid; border-color: var(--crit); background: var(--crit-soft); }
.view > .state, .list-body > .state { margin-top: 12px; }

.skeleton { display: grid; gap: 8px; }
.sk {
  border-radius: var(--r); background: linear-gradient(90deg, var(--line-soft) 25%, var(--line) 50%, var(--line-soft) 75%);
  background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite;
}
.sk-hero { height: 92px; border-radius: var(--r-card); }
.sk-tile { height: 72px; }
.sk-row { height: 62px; }
.sk-line { height: 18px; margin-bottom: 14px; }
.sk-block { height: 84px; margin-bottom: 10px; }
.w40 { width: 40%; }
.skeleton .tiles { margin-top: 2px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ------------------------------------------------------------ Größere Bildschirme */
@media (min-width: 480px) {
  .spark { width: 143px; }
  .tools-row { grid-template-columns: minmax(0, 1fr) minmax(0, 240px); }
}

@media (min-width: 640px) {
  .row { grid-template-columns: 150px minmax(0, 1fr) auto; grid-template-areas: "state main side"; }
  .row--event { grid-template-columns: auto minmax(0, 1fr) auto; }
  .kv { grid-template-columns: 170px minmax(0, 1fr); }
  .cards { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); align-items: start; }
  .tiles { gap: 10px; }
}

@media (min-width: 900px) {
  body { font-size: 15.5px; }
  .app { display: grid; grid-template-columns: 224px minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .top { grid-column: 1 / -1; padding-left: 24px; padding-right: 16px; }
  .tabs {
    position: sticky; top: 58px; align-self: start; grid-template-columns: 1fr; gap: 4px; padding: 16px 12px;
    border-top: 0; background: transparent;
  }
  .tabs a { flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 42px; padding: 0 14px; border-radius: 99px; font-size: 14.5px; }
  .tabs svg, .tabs a[aria-current="page"] svg, .tabs a:not([aria-current="page"]) svg { width: 20px; height: 20px; padding: 0; background: transparent; }
  .tabs a[aria-current="page"] { background: var(--grad); color: #fff; }
  .tabs a:not([aria-current="page"]):hover { background: var(--line-soft); }
  .lbl-long { display: inline; }
  .lbl-short { display: none; }
  .main { margin: 0; padding: 20px 28px 48px 12px; }
  .tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .tile-value { font-size: 24px; }
  .hero { padding: 18px 20px; }
  .hero-title, .view-title { font-size: 28px; }
  .inst-list { grid-template-columns: repeat(auto-fill, minmax(430px, 1fr)); }
}

/* ------------------------------------------------------------ Weniger Bewegung */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Kompakte Listen (Prüfungen, Geräte, Schnittstellen) ----------
 * Zustand als Zeichen links statt als eigene Zeile darüber — der Text des
 * Zustands bleibt für Screenreader erhalten (nur optisch ausgeblendet) und
 * steht als Tooltip am Zeichen. So passen deutlich mehr Zeilen auf einen Blick. */
.row { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "state main side"; align-items: start; gap: 2px 10px; padding: 8px 0; }
.row-state { padding-top: 1px; }
.row-state .badge { font-size: 0; gap: 0; padding: 0; border: 0; background: none; }
.row-state .badge .badge-sign { width: 20px; height: 20px; font-size: 11px; }
.row-title { line-height: 1.35; }
.row-side { max-width: 42vw; }
.row-side p { margin: 0; }
.tile .kicker { letter-spacing: .06em; }
.tile-value { overflow: hidden; text-overflow: ellipsis; }
