/* Platzhaltertexte folgen der Schriftfarbe des Themes. Ohne diese Regel
   zeichnet der Browser sie in einem festen Hellgrau — im dunklen Modus
   praktisch unsichtbar (Adresssuche in den Garagen, Bezeichnungsfelder). */
input::placeholder, textarea::placeholder { color: var(--on-surface-variant); opacity: .9; }

/* ─────────────────────────────────────────────────────────────
   GREMAC Connect — Design System
   Material-3-Anmutung: tonal, großzügig, ruhig. Teal als Leitfarbe.
   Keine Emojis, einfarbige Line-Icons.
   ───────────────────────────────────────────────────────────── */

:root {
  /* Tonal-Palette, aus Teal abgeleitet */
  --primary:            #00696A;
  --primary-press:      #005455;
  --on-primary:         #FFFFFF;
  --primary-container:  #9CF1F2;
  --on-primary-container:#002020;

  --surface:            #F6FAFA;
  --surface-1:          #FFFFFF;
  --surface-2:          #EDF4F4;
  --surface-3:          #E3EDED;
  --on-surface:         #171D1D;
  --on-surface-variant: #3F4949;
  --outline:            #6F7979;
  --outline-variant:    #BEC9C9;

  --success:            #1F7A46;
  --success-container:  #C8F2D8;
  --warning:            #8A5300;
  --warning-container:  #FFE1B8;
  --error:              #B3261E;
  --error-container:    #FFDAD6;

  --radius-xl: 28px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;

  --elev-1: 0 1px 2px rgba(0,40,40,.08), 0 1px 3px 1px rgba(0,40,40,.06);
  --elev-2: 0 1px 2px rgba(0,40,40,.10), 0 2px 6px 2px rgba(0,40,40,.07);

  --ease: cubic-bezier(.2, 0, 0, 1);
  --dur: 220ms;

  --font: "Roboto Flex", "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  --nav-h: 76px;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Sekundärtext einen Schritt heller: auf fast schwarzem Grund wirkten
       10–11-px-Beschriftungen sonst ausgewaschen. */
    --primary:            #7FD9DA;
    --primary-press:      #9CE7E8;
    --on-primary:         #003737;
    --primary-container:  #004F50;
    --on-primary-container:#9CF1F2;

    --surface:            #0E1414;
    --surface-1:          #161D1D;
    --surface-2:          #1B2424;
    --surface-3:          #212B2B;
    --on-surface:         #DDE4E4;
    --on-surface-variant: #CFD9D9;
    --outline:            #889392;
    --outline-variant:    #3F4949;

    --success:            #8FD9AC;
    --success-container:  #0F3D24;
    --warning:            #FFC46B;
    --warning-container:  #4A2E00;
    --error:              #FFB4AB;
    --error-container:    #5C120D;

    --elev-1: 0 1px 3px rgba(0,0,0,.5);
    --elev-2: 0 2px 8px rgba(0,0,0,.55);
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--surface);
  color: var(--on-surface);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

/* ── App-Leiste ─────────────────────────────────────────────── */
.appbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.appbar.scrolled { border-bottom-color: var(--outline-variant); }

.icon-btn {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: transparent;
  color: var(--on-surface);
  cursor: pointer;
  transition: background var(--dur) var(--ease);
}
.icon-btn:hover, .icon-btn:focus-visible { background: var(--surface-2); outline: none; }
.icon-btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none;
  stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.appbar-title { flex: 1; min-width: 0; }
.appbar-title .t1 {
  font-size: 20px; font-weight: 600; letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.appbar-title .t2 {
  font-size: 12.5px; color: var(--on-surface-variant);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── Status-Chip ────────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  height: 30px; padding: 0 13px;
  border-radius: 100px;
  border: 1px solid var(--outline-variant);
  background: var(--surface-1);
  /* Ohne eigene Farbe erbt der Chip die Textfarbe des Kopfes. Im dunklen
     Modus ist das dunkles Teal auf dunklem Grund — der Sprachumschalter war
     dadurch praktisch unsichtbar. */
  color: var(--on-surface-variant);
  font-size: 12.5px; font-weight: 600; letter-spacing: .01em;
  white-space: nowrap;
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--outline); }
.chip.run   { background: var(--success-container); border-color: transparent; color: var(--success); }
.chip.run .dot { background: var(--success); animation: pulse 1.8s var(--ease) infinite; }
.chip.idle  { background: var(--surface-2); border-color: transparent; color: var(--on-surface-variant); }
.chip.fault { background: var(--error-container); border-color: transparent; color: var(--error); }
.chip.fault .dot { background: var(--error); }
.chip.off   { background: var(--surface-3); border-color: transparent; color: var(--on-surface-variant); }
.chip.warn  { background: var(--warning-container); border-color: transparent; color: var(--warning); }
.chip.warn .dot { background: var(--warning); }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 45%, transparent); }
  50%      { box-shadow: 0 0 0 6px transparent; }
}

/* ── Layout ─────────────────────────────────────────────────── */
.shell { max-width: 1080px; margin: 0 auto; padding: 4px 16px 112px; }
.section { margin: 22px 0 8px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section h2 {
  margin: 0; font-size: 15px; font-weight: 600; letter-spacing: .01em;
  color: var(--on-surface);
}
.section .hint { font-size: 12.5px; color: var(--on-surface-variant); }

.card {
  background: var(--surface-1);
  border-radius: var(--radius-lg);
  box-shadow: var(--elev-1);
  padding: 18px;
}
.card.tight { padding: 14px 16px; }
.grid { display: grid; gap: 12px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-auto { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  position: relative;
  border-radius: var(--radius-xl);
  padding: 22px;
  margin-top: 8px;
  background:
    radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--primary-container) 70%, transparent) 0%, transparent 55%),
    var(--surface-1);
  box-shadow: var(--elev-1);
  overflow: hidden;
}
.hero .eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--on-surface-variant);
}
.hero .state {
  margin: 6px 0 2px;
  font-size: 34px; font-weight: 650; letter-spacing: -.02em; line-height: 1.1;
}
.hero .sub { color: var(--on-surface-variant); font-size: 13.5px; }
.hero .strip {
  display: flex; gap: 28px; margin-top: 18px; flex-wrap: wrap;
}
.hero .strip .k { font-size: 12px; color: var(--on-surface-variant); }
.hero .strip .v { font-size: 20px; font-weight: 620; letter-spacing: -.01em; }
.hero .strip .v small { font-size: 12px; font-weight: 500; color: var(--on-surface-variant); }

/* ── Kacheln ────────────────────────────────────────────────── */
.tile { display: flex; flex-direction: column; gap: 10px; }
.tile .tile-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tile .tile-name { font-size: 14.5px; font-weight: 600; }
.tile .tile-icon {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--primary-container) 55%, transparent);
  color: var(--primary);
}
.tile .tile-icon svg { width: 20px; height: 20px; stroke: currentColor; fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.metric { display: flex; align-items: baseline; gap: 6px; }
.metric .num { font-size: 26px; font-weight: 620; letter-spacing: -.02em; }
.metric .unit { font-size: 12.5px; color: var(--on-surface-variant); }
.metric .label { font-size: 12px; color: var(--on-surface-variant); margin-left: auto; }

/* Stepper */
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--outline-variant);
  background: var(--surface-1); color: var(--primary);
  font-size: 20px; font-weight: 500; line-height: 1;
  cursor: pointer;
  transition: background var(--dur) var(--ease), transform 120ms var(--ease);
}
.stepper button:hover { background: var(--surface-2); }
.stepper button:active { transform: scale(.94); }
.stepper .val { min-width: 46px; text-align: center; font-weight: 620; font-size: 16px; }

/* ── Liste (Antriebe, Meldungen) ────────────────────────────── */
.list { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--outline-variant);
}
.row:last-child { border-bottom: 0; }
.row .lead {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--surface-2); color: var(--on-surface-variant);
  font-size: 13.5px; font-weight: 650;
}
.row .lead.ok   { background: var(--success-container); color: var(--success); }
.row .lead.bad  { background: var(--error-container);   color: var(--error); }
.row .lead.warn { background: var(--warning-container); color: var(--warning); }
.row .main { flex: 1; min-width: 0; }
.row .name { font-size: 14px; font-weight: 600; }
.row .meta { font-size: 12.5px; color: var(--on-surface-variant);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .tail { display: flex; gap: 14px; text-align: right; }
.row .tail .v { font-size: 14px; font-weight: 600; }
.row .tail .k { font-size: 11px; color: var(--on-surface-variant); }

/* ── Leerzustand ────────────────────────────────────────────── */
.empty {
  text-align: center; padding: 26px 12px; color: var(--on-surface-variant);
}
.empty .ic { width: 44px; height: 44px; margin: 0 auto 10px; color: var(--on-surface-variant);
  display: grid; place-items: center; }
.empty .ic svg { width: 30px; height: 30px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.empty .t { font-size: 14px; font-weight: 600; color: var(--on-surface); }
.empty .s { font-size: 12.5px; margin-top: 4px; }

/* ── Gerüst (Ladezustand) ───────────────────────────────────── */
.skel {
  background: linear-gradient(100deg, var(--surface-2) 30%, var(--surface-3) 45%, var(--surface-2) 60%);
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
  border-radius: 10px;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.skel.line { height: 12px; }

/* ── Bottom-Navigation ──────────────────────────────────────── */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: var(--nav-h);
  display: flex; align-items: stretch; justify-content: space-around;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  /* Deckend, nicht durchscheinend: bei 92 % schimmerten die Knöpfe der unteren
     Karte durch den Balken und sahen antippbar aus — wer dort tippte, traf den
     Reiter und die Seite lud neu. */
  background: var(--surface-1);
  box-shadow: 0 -8px 18px rgba(0, 0, 0, .35);
  border-top: 1px solid var(--outline-variant);
}
.bottomnav a {
  flex: 1; max-width: 120px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  text-decoration: none; color: var(--on-surface-variant);
  font-size: 11.5px; font-weight: 550; letter-spacing: .01em;
  border-radius: 16px;
  transition: color var(--dur) var(--ease);
}
.bottomnav a svg { width: 22px; height: 22px; stroke: currentColor; fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bottomnav a .pill {
  display: grid; place-items: center;
  width: 60px; height: 30px; border-radius: 100px;
  transition: background var(--dur) var(--ease);
}
.bottomnav a.active { color: var(--on-primary-container); }
.bottomnav a.active .pill { background: color-mix(in srgb, var(--primary-container) 80%, transparent); }

/* Auf breiten Bildschirmen: Navigation nach oben, kein Fixbalken */
@media (min-width: 900px) {
  .bottomnav {
    position: static; height: auto; justify-content: center; gap: 6px;
    border-top: 0; background: transparent; backdrop-filter: none;
    padding: 4px 16px 0;
  }
  .bottomnav a { flex: 0 0 auto; flex-direction: row; gap: 8px; padding: 8px 14px; }
  .bottomnav a .pill { width: auto; height: 34px; padding: 0 14px; }
  .shell { padding-bottom: 40px; }
}

/* ── Snackbar ───────────────────────────────────────────────── */
.snackbar {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 16px);
  transform: translate(-50%, 20px);
  min-width: 260px; max-width: min(520px, 90vw);
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  background: var(--on-surface); color: var(--surface);
  font-size: 13.5px;
  box-shadow: var(--elev-2);
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  z-index: 50;
}
.snackbar.show { opacity: 1; transform: translate(-50%, 0); }

/* ── Hilfsklassen ───────────────────────────────────────────── */
.muted { color: var(--on-surface-variant); }
.tnum { font-variant-numeric: tabular-nums; }
.spacer { flex: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── Hinweisbanner (Fehler/Warnung mit Aktion) ──────────────── */
.banner {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--warning-container);
  color: var(--warning);
}
.banner svg { width: 22px; height: 22px; flex: 0 0 22px; margin-top: 2px;
  stroke: currentColor; fill: none; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; }
.banner .b-title { font-weight: 620; font-size: 14.5px; }
.banner .b-text { font-size: 13px; margin-top: 3px;
  color: color-mix(in srgb, currentColor 78%, var(--on-surface)); }
.banner .btn { flex: 0 0 auto; align-self: center; }
.banner.error { background: var(--error-container); color: var(--error); }
.banner.ok { background: var(--success-container); color: var(--success); }

/* Sollwert-Einheit im Stepper */
.stepper .val small { font-size: 11.5px; font-weight: 500;
  color: var(--on-surface-variant); }

/* Icon-Fläche kontrastreicher */
.tile .tile-icon {
  background: var(--primary-container);
  color: var(--on-primary-container);
}

/* Kennzahlen nicht umbrechen */
.hero .strip .v { white-space: nowrap; }
.hero .strip > div { min-width: 96px; }

/* Banner-Innenleben (Textblock + Aktion untereinander) */
.banner .b-body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.banner .b-body .btn { margin-top: 8px; align-self: flex-start; }
.banner .b-meta { font-size: 12px; opacity: .85; }
.nowrap { white-space: nowrap; }

/* Programme als Kartenbuttons */
.prog { display: flex; flex-direction: column; gap: 2px; align-items: flex-start;
  border: 0; cursor: pointer; font-family: inherit; color: inherit; text-align: left; }
.prog:hover { background: var(--surface-2); }

/* Stepper: größere Touch-Ziele, klarer Disabled-Zustand */
.stepper button { width: 44px; height: 44px; }
.stepper button:disabled { opacity: .35; cursor: not-allowed; background: transparent; }

/* Aktive Navigation kontrastreicher */
.bottomnav a.active { font-weight: 650; }
.bottomnav a.active .pill {
  background: var(--primary-container);
  color: var(--on-primary-container);
}
@media (prefers-color-scheme: dark) {
  .bottomnav a.active .pill { background: var(--primary-container); }
}

/* Feinschliff nach UI-Review */
.section { flex-wrap: wrap; row-gap: 2px; }
.section .hint { white-space: nowrap; font-size: 12.5px;
  color: color-mix(in srgb, var(--on-surface-variant) 88%, var(--on-surface)); }

/* Hinweise, die einen ganzen Satz enthalten, dürfen umbrechen — mit nowrap
   wurde „Geschwindigkeit am Bedienteil — Schalter im Schaltschrank" auf dem
   Handy mitten im Wort abgeschnitten. */
#hint-control, #hint-maint { white-space: normal; text-align: right; max-width: 60%; }

.hero .sub { text-wrap: pretty; max-width: 46ch; }

.stepper { justify-content: space-between; }
.stepper .val { flex: 1; }

.banner { display: grid; grid-template-columns: 22px 1fr; column-gap: 14px; }
.banner .b-body { grid-column: 2; }

.shell { padding-bottom: 132px; }

/* Aktionszeile im Hinweisbanner */
.banner .b-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.banner .b-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* ── Aktionsschaltflächen ────────────────────────────────────────────────
   Trennung, die vorher fehlte:
     .chip  = Zustandsanzeige (nicht klickbar, keine Hover-Reaktion)
     .btn   = Aktion (klickbar, immer mit Rahmen/Füllung und 44 px Höhe)
   Jede Aktion ist damit als Schaltfläche erkennbar, auch als Link.
   ──────────────────────────────────────────────────────────────────────── */
.btn, a.btn, button.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border: 1px solid var(--outline);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--on-surface);
  font-family: inherit; font-size: 14.5px; font-weight: 600; letter-spacing: .01em;
  text-decoration: none !important;
  cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}
.btn:hover, a.btn:hover, button.btn:hover { background: var(--surface-3); border-color: var(--on-surface-variant); }
.btn:active, a.btn:active, button.btn:active { transform: scale(.98); }
.btn:focus-visible, a.btn:focus-visible, button.btn:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px;
}
.btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.btn.primary, a.btn.primary, button.btn.primary {
  background: var(--primary); border-color: var(--primary); color: var(--on-primary);
}
.btn.primary:hover, a.btn.primary:hover, button.btn.primary:hover {
  background: color-mix(in srgb, var(--primary) 88%, #000); border-color: transparent;
}
.btn.danger, a.btn.danger, button.btn.danger {
  background: var(--error-container); border-color: color-mix(in srgb, var(--error) 35%, transparent);
  color: var(--error);
}
.btn.ghost, a.btn.ghost, button.btn.ghost { background: transparent; border-color: var(--on-surface-variant); }
.btn.small, a.btn.small, button.btn.small { min-height: 36px; padding: 0 12px; font-size: 13.5px; }
.btn.icon, a.btn.icon, button.btn.icon {
  width: 44px; min-height: 44px; padding: 0; border-radius: 12px;
}
.btn[disabled], .btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* Statusanzeige bleibt ruhig und ohne Klick-Optik */
.chip { text-decoration: none; cursor: default; }
a.chip { cursor: pointer; }

/* Auswahlfelder (select) als erkennbares Bedienelement */
select, .field select {
  appearance: none; -webkit-appearance: none;
  min-height: 44px; padding: 0 40px 0 14px;
  border: 1px solid var(--outline); border-radius: 12px;
  background-color: var(--surface-2);
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7473' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  color: var(--on-surface); font-family: inherit; font-size: 14.5px; font-weight: 550;
  cursor: pointer;
}
select:hover { border-color: var(--on-surface-variant); }
select:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ── Instrumententafel (Anlagenübersicht im Fahrerhaus-Stil) ───────────── */
:root[data-theme="dark"] .inst { border-color: #33403f; }
:root[data-theme="dark"] .inst-grid.as-panel { border-color: #33403f; }

.inst-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
}

.inst {
  background: linear-gradient(180deg, #191f20 0%, #0c1112 100%);
  border: 1px solid #2b3536;
  border-radius: 18px;
  padding: 10px 10px 12px;
  color: #e8f2f1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 8px 20px rgba(16, 24, 24, .28);
  position: relative;
  overflow: hidden;
}
.inst::after {                       /* feine Glasreflexion über der Tafel */
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, 0) 42%);
  pointer-events: none;
}

.inst-top {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: rgba(226, 242, 241, .78); margin-bottom: 2px;
}
.inst-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.inst-led i {
  display: block; width: 8px; height: 8px; border-radius: 50%;
  background: #3a4546; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .5);
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.inst-led.ok i { background: #35cfa4; box-shadow: 0 0 9px rgba(53, 207, 164, .8); }
.inst-led.fault i { background: #ff5a4d; box-shadow: 0 0 11px rgba(255, 90, 77, .85); animation: ledBlink 1.1s steps(2) infinite; }
.inst-led.off i { background: #39474a; }
@keyframes ledBlink { 50% { opacity: .35; } }

.inst-dial svg { display: block; width: 100%; height: auto; }

/* Drehzahlband: Füllung = Ist, weiße Marke = Sollwert (gleiche Skala 0–100 %) */
.speed { display: flex; align-items: center; gap: 7px; margin: 7px 1px 3px; }
.speed-cap { font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase;
             color: rgba(226, 242, 241, .55); white-space: nowrap; }
.dg-cap { font-size: 7px; letter-spacing: .08em; fill: rgba(226, 242, 241, .55); text-transform: uppercase; }
.speed-track { position: relative; flex: 1; height: 7px; border-radius: 4px;
               background: rgba(226, 242, 241, .10); }
.speed-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 4px;
              background: linear-gradient(90deg, #2aa79b, #4fe0cf);
              transition: width .35s ease; }
.speed-mark { position: absolute; top: -4px; bottom: -4px; width: 2px; border-radius: 2px;
              background: #fff; opacity: .92; transform: translateX(-1px); }
.speed-num { white-space: nowrap; font-size: 14px; font-weight: 600; min-width: 42px; text-align: right; color: #e8f2f1; }
.speed-fill.mid { background: linear-gradient(90deg, #b07d12, #ffc247); }
.speed-fill.high { background: linear-gradient(90deg, #a33a2c, #ff6b5a); }
.speed.is-dim .speed-fill { background: rgba(226, 242, 241, .18); }
.speed.is-dim .speed-num { color: rgba(232, 242, 241, .45); }

/* Kopfzeile der Antriebsliste: Momentanleistung und Verbrauchszähler */
.energy-row {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 14px 16px; margin: 0 0 2px;
  border-bottom: 1px solid var(--outline-variant);
  background: color-mix(in srgb, var(--surface-2) 60%, transparent);
}
.energy-row .e-item { display: flex; flex-direction: column; gap: 2px; }
.energy-row .k { font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
                 color: var(--on-surface-variant); }
.energy-row .v { font-size: 20px; font-weight: 600; color: var(--on-surface); }
.energy-row .v small { font-size: 12px; font-weight: 500; margin-left: 3px;
                       color: var(--on-surface-variant); }
.energy-row .s { font-size: 11.5px; color: var(--on-surface-variant); }
.energy-row .btn { margin-left: auto; }

/* Steller gesperrt, solange am Bedienteil vorgegeben wird */
.inst.no-cloud .set-btn,
.inst.no-cloud .set-track { opacity: .38; pointer-events: none; }

.inst-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 10.8px; color: rgba(226, 242, 241, .62); margin-top: 1px;
}
.inst-foot small { font-size: 9.5px; opacity: .7; }
.inst-state { text-align: right; }

.inst.is-fault .inst-dial { animation: faultPulse 1.5s ease-in-out infinite; }
@keyframes faultPulse { 0%, 100% { filter: none; } 50% { filter: drop-shadow(0 0 7px rgba(255, 90, 77, .55)); } }

/* Sollwert als kräftiger Schieber mit erhabenem Knopf */
.set { margin-top: 10px; }
.set-head {
  display: flex; align-items: baseline; justify-content: space-between;
  font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase;
  color: rgba(226, 242, 241, .58);
}
.set-num { font-size: 16px; font-weight: 700; color: #eaf7f6; letter-spacing: 0; }
.set-num small { font-size: 10px; opacity: .55; margin-left: 2px; }

.set-track {
  position: relative; height: 10px; margin: 8px 2px 9px;
  border-radius: 6px; background: #080c0d;
  border: 1px solid #2c3637;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .85);
  cursor: pointer;
  touch-action: none;
}
.set-fill {
  position: absolute; left: 2px; top: 2px; bottom: 2px; width: 0%;
  border-radius: 4px;
  background: linear-gradient(90deg, #0d7d74, #35cfa4);
  box-shadow: 0 0 8px rgba(53, 207, 164, .35);
}
.set-knob {
  position: absolute; top: 50%; left: 0%; width: 17px; height: 17px;
  margin-left: -8.5px; transform: translateY(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #ffffff, #c3d0d0 52%, #7e8c8c 100%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .6), inset 0 1px 1px rgba(255, 255, 255, .9);
  pointer-events: none;
}

.set-machine {
  margin-top: 6px; font-size: 11.5px; line-height: 1.35;
  color: var(--on-surface-variant, #93a3a2);
}
.inst.unsaved .set-machine {
  color: #e2b13c; font-weight: 600;
}
.inst.unsaved .set-machine::after {
  content: attr(data-unsent);
}
.set-btns { display: flex; gap: 6px; }
.set-btn {
  flex: 1; height: 36px;
  border-radius: 10px; border: 1px solid #303b3c;
  background: linear-gradient(180deg, #232b2c, #141a1b);
  color: #ddeae9; font-family: inherit; font-size: 17px; font-weight: 600;
  cursor: pointer; transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.set-btn:hover { background: linear-gradient(180deg, #2b3435, #1a2122); }
.set-btn:active { transform: scale(.96); }
.set-btn:disabled { opacity: .35; cursor: not-allowed; }

/* Umschalter Karten / Blende */
.seg {
  display: inline-flex; gap: 2px; padding: 3px; margin-left: auto;
  border: 1px solid var(--outline); border-radius: 12px; background: var(--surface-2);
}
.seg-btn {
  border: 0; background: transparent; height: 34px; padding: 0 13px;
  border-radius: 9px; font-family: inherit; font-size: 13px; font-weight: 600;
  color: var(--on-surface-variant); cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.seg-btn:hover { color: var(--on-surface); }
.seg-btn.active {
  background: var(--surface-1); color: var(--on-surface);
  box-shadow: 0 1px 3px rgba(16, 24, 24, .18);
}
.seg-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }

/* Variante „eine Blende": alle Instrumente auf einer dunklen Tafel,
   Größen passen sich der Breite an (auto-fit), Trennlinien statt Karten. */
.inst-grid.as-panel {
  gap: 0;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  background: linear-gradient(180deg, #191f20 0%, #0c1112 100%);
  border: 1px solid #2b3536;
  border-radius: 20px;
  padding: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 10px 26px rgba(16, 24, 24, .3);
}
.inst-grid.as-panel .inst {
  background: transparent; border: 0; box-shadow: none; border-radius: 14px;
  padding: 11px 10px 12px;
}
.inst-grid.as-panel .inst + .inst { border-left: 1px solid rgba(255, 255, 255, .07); }
.inst-grid.as-panel .inst:hover { background: rgba(255, 255, 255, .035); }
.inst-grid.as-panel .inst::after { display: none; }

/* Trendstreifen unter dem Instrument */
.trend-strip { margin-top: 6px; }
.trend-strip svg { display: block; width: 100%; height: 26px; }

.inst-peak { color: #6fd8ff; font-size: 10.5px; letter-spacing: .02em; white-space: nowrap; }

/* ── Explizite Theme-Wahl (überschreibt die Systemeinstellung) ───────── */
:root[data-theme="dark"] {
    --primary:            #7FD9DA;
    --primary-press:      #9CE7E8;
    --on-primary:         #003737;
    --primary-container:  #004F50;
    --on-primary-container:#9CF1F2;

    --surface:            #0E1414;
    --surface-1:          #161D1D;
    --surface-2:          #1B2424;
    --surface-3:          #212B2B;
    --on-surface:         #DDE4E4;
    --on-surface-variant: #CFD9D9;
    --outline:            #889392;
    --outline-variant:    #3F4949;

    --success:            #8FD9AC;
    --success-container:  #0F3D24;
    --warning:            #FFC46B;
    --warning-container:  #4A2E00;
    --error:              #FFB4AB;
    --error-container:    #5C120D;

    --elev-1: 0 1px 3px rgba(0,0,0,.5);
    --elev-2: 0 2px 8px rgba(0,0,0,.55);
}

:root[data-theme="light"] {
  /* Tonal-Palette, aus Teal abgeleitet */
  --primary:            #00696A;
  --primary-press:      #005455;
  --on-primary:         #FFFFFF;
  --primary-container:  #9CF1F2;
  --on-primary-container:#002020;

  --surface:            #F6FAFA;
  --surface-1:          #FFFFFF;
  --surface-2:          #EDF4F4;
  --surface-3:          #E3EDED;
  --on-surface:         #171D1D;
  --on-surface-variant: #3F4949;
  --outline:            #6F7979;
  --outline-variant:    #BEC9C9;

  --success:            #1F7A46;
  --success-container:  #C8F2D8;
  --warning:            #8A5300;
  --warning-container:  #FFE1B8;
  --error:              #B3261E;
  --error-container:    #FFDAD6;

  --radius-xl: 28px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;

  --elev-1: 0 1px 2px rgba(0,40,40,.08), 0 1px 3px 1px rgba(0,40,40,.06);
  --elev-2: 0 1px 2px rgba(0,40,40,.10), 0 2px 6px 2px rgba(0,40,40,.07);

  --ease: cubic-bezier(.2, 0, 0, 1);
  --dur: 220ms;

  --font: "Roboto Flex", "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  --nav-h: 76px;
}

/* Kopfzeile im Cockpit: auf schmalen Geräten hat der Name Vorrang.
   Status steht zusätzlich in der Übersichtskarte, Aktualisieren läuft automatisch. */
@media (max-width: 520px) {
  .row .meta { white-space: normal; }
  .appbar { gap: 6px; padding-inline: 10px; }
  .appbar #btn-refresh { display: none; }
  .appbar-title .t1 { font-size: 18px; }
  .appbar .chip { padding-inline: 9px; font-size: 11.5px; }
}

/* Ohne Umrichterdaten: Instrument und Sollwert bleiben sichtbar, treten aber zurück */
.inst.is-muted .set { opacity: .38; pointer-events: none; }

.note {
  margin: 4px 2px 10px; padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--warning-container); color: var(--warning);
  font-size: 12.5px; font-weight: 550;
}

/* Umrichterliste: Kennzeichen und Hilfsantriebe */
.drv-tag { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; color: var(--on-surface-variant);
  border: 1px solid var(--outline-variant); border-radius: 4px; padding: 0 4px; margin-left: 5px; }
.drv-aux { font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--on-surface-variant); background: var(--surface-3); border-radius: 100px;
  padding: 1px 7px; margin-left: 6px; vertical-align: 1px; }

/* Änderungsprotokoll (admin.html) */
.audit-head,
.audit-row {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr) 14rem;
  gap: 0.25rem 1rem;
  align-items: baseline;
}
.audit-head {
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--outline-variant);
  color: var(--on-surface-variant);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.audit-row {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--outline-variant);
  font-size: 0.875rem;
}
.audit-row:last-child { border-bottom: 0; }
.audit-when { color: var(--on-surface-variant); font-variant-numeric: tabular-nums; white-space: nowrap; }
.audit-what strong { font-weight: 600; }
.audit-target { color: var(--on-surface); margin-left: 0.35rem; }
.audit-detail { color: var(--on-surface-variant); margin-top: 0.15rem; }
.audit-who {
  color: var(--on-surface-variant);
  font-size: 0.8rem;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .audit-head { display: none; }
  .audit-row { grid-template-columns: 1fr; gap: 0.2rem; }
  .audit-who { text-align: left; }
  .audit-row::before {
    content: '';
    grid-column: 1;
  }
}

/* Sendeleiste über der unteren Navigation */
.applybar {
  position: fixed; left: 10px; right: 10px; z-index: 28;
  bottom: calc(var(--nav-h) + 10px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 16px; border: 1px solid color-mix(in srgb, var(--primary) 45%, var(--outline-variant));
  background: var(--surface-2, #1a2223);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .55);
}
.applybar[hidden] { display: none; }
.applybar-text {
  flex: 1; font-size: 13px; line-height: 1.3;
  color: var(--on-surface);
}
.applybar .btn { flex: 0 0 auto; }
body.has-applybar .shell { padding-bottom: calc(132px + 84px); }

/* ── Seitenmenü (eine Fassung für alle Seiten) ──────────────────────────
   So wie im Bild: reine Textzeilen mit dünner Trennlinie, kein Symbol,
   keine farbige Markierung des aktiven Punkts. „Abmelden" bleibt rot. */
#sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 9999;
  width: min(84vw, 300px);
  background: var(--surface-1); border-right: 1px solid var(--outline-variant);
  display: flex; flex-direction: column; overflow-y: auto;
  transform: translateX(-102%);
  transition: transform .28s var(--ease), visibility .28s var(--ease);
  box-shadow: 12px 0 34px rgba(0, 20, 20, .26);
  visibility: hidden;
}
#sidebar.open { transform: translateX(0); visibility: visible; }
.sb-head {
  position: relative; padding: 20px 18px 16px;
  background: linear-gradient(160deg, var(--primary-container),
              color-mix(in srgb, var(--primary-container) 62%, #001314));
  color: var(--on-primary-container);
  border-radius: 0 0 18px 0;
}
.sb-logo img { height: 22px; width: auto; display: block; }
/* Im dunklen Modus ist der Kopf dunkel — die Wortmarke muss dann hell werden. */
:root[data-theme="dark"] .sb-head .sb-logo img { filter: brightness(0) invert(1); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sb-head .sb-logo img { filter: brightness(0) invert(1); }
}
.sb-user { margin-top: 8px; font-size: 12px; opacity: .9; word-break: break-all; }
.sb-close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  border: 0; background: transparent; color: inherit; font-size: 22px; line-height: 1; cursor: pointer;
}
.sb-item {
  display: flex; align-items: center;
  min-height: 48px; padding: 0 18px; margin: 0; width: 100%;
  border: 0; border-bottom: 1px solid var(--outline-variant); border-radius: 0;
  background: transparent; color: var(--on-surface);
  font-family: inherit; font-size: 14.5px; font-weight: 550;
  text-align: left; text-decoration: none; cursor: pointer;
}
.sb-item:hover { background: var(--surface-2); }
.sb-item.active { background: transparent; color: var(--on-surface); font-weight: 550; }
.sb-item.danger { color: var(--error); border-bottom: 0; }
.sb-item svg { display: none; }
.sb-foot {
  margin-top: auto; padding: 14px 18px;
  border-top: 1px solid var(--outline-variant);
  font-size: 11px; color: var(--on-surface-variant);
}

/* ── Demo-Hinweis (Cockpit) ─────────────────────────────────────────── */
.demo-hinweis {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 12px 14px;
  margin: 0 0 14px;
  border: 1px solid var(--border, rgba(255,255,255,.14));
  border-left: 3px solid var(--accent, #2aa198);
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent, #2aa198) 8%, transparent);
  font-size: 13px;
  line-height: 1.45;
}
.demo-hinweis .dh-text { flex: 1 1 240px; min-width: 0; }
.demo-hinweis b { font-weight: 700; }
.ok-text { color: var(--ok, #4caf7d); }

/* ── Bunkerüberlast: Overlay ────────────────────────────────────────── */
.b-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(8, 14, 16, .55);
  backdrop-filter: blur(2px);
}
.b-overlay[hidden] { display: none; }
.b-card {
  width: 100%;
  max-width: 380px;
  background: var(--card, #fff);
  color: var(--text, #16201f);
  border-radius: 16px;
  padding: 20px 20px 16px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .28);
  border-top: 4px solid #d98324;
  text-align: left;
}
.b-overlay[data-state="fehler"] .b-card { border-top-color: #c0392b; }
.b-overlay[data-state="reversiert"] .b-card { border-top-color: #127c73; }
.b-icon {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(217, 131, 36, .14);
  color: #d98324;
  margin-bottom: 10px;
}
.b-overlay[data-state="fehler"] .b-icon { background: rgba(192, 57, 43, .14); color: #c0392b; }
.b-overlay[data-state="reversiert"] .b-icon { background: rgba(18, 124, 115, .14); color: #127c73; }
.b-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.b-title { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.b-text { font-size: 13.5px; line-height: 1.5; opacity: .85; }
.b-cycles { margin-top: 10px; font-size: 12.5px; font-weight: 600; opacity: .9; }
.b-demo { margin-top: 8px; font-size: 11.5px; opacity: .6; }
.b-actions { margin-top: 16px; display: flex; justify-content: flex-end; }
.b-actions .btn { min-width: 120px; }

/* ── Bunker-Auto-Stop: kurzer Hinweis oben ──────────────────────────── */
.as-banner {
  position: fixed;
  left: 50%;
  top: 12px;
  transform: translateX(-50%);
  z-index: 85;
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(100% - 24px);
  max-width: 420px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(22, 32, 31, .96);
  color: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
  animation: asRein .18s ease-out;
}
.as-banner[hidden] { display: none; }
.as-icon {
  width: 26px; height: 26px; flex: 0 0 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(217, 131, 36, .2);
  color: #f0a63c;
}
.as-icon svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.as-body { min-width: 0; }
.as-title { font-size: 13px; font-weight: 700; line-height: 1.2; }
.as-text { font-size: 11.5px; line-height: 1.35; opacity: .8; margin-top: 2px; }
@keyframes asRein { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ── Fehlerblatt (Ursache und Abhilfe) ─────────────────────────────── */
.f-sheet {
  position: fixed;
  inset: 0;
  z-index: 92;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(8, 14, 16, .5);
  padding: 0;
}
.f-sheet[hidden] { display: none; }
.f-card {
  width: 100%;
  max-width: 460px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--card, #fff);
  color: var(--text, #16201f);
  border-radius: 18px 18px 0 0;
  padding: 18px 18px 14px;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .25);
  animation: fRein .2s ease-out;
}
@keyframes fRein { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.f-head { display: flex; gap: 12px; align-items: flex-start; }
.f-code {
  flex: 0 0 auto;
  min-width: 40px;
  height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: rgba(192, 57, 43, .12);
  color: #c0392b;
  font-weight: 700;
  font-size: 16px;
  padding: 0 8px;
}
.f-headtext { min-width: 0; }
.f-title { font-size: 16px; font-weight: 700; line-height: 1.25; }
.f-sub { font-size: 12px; opacity: .65; margin-top: 2px; }
.f-sec { margin-top: 16px; }
.f-lab {
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  opacity: .55;
  margin-bottom: 4px;
}
.f-txt { font-size: 13.5px; line-height: 1.5; }
.f-todo .f-txt {
  background: rgba(18, 124, 115, .08);
  border-left: 3px solid #127c73;
  padding: 8px 10px;
  border-radius: 0 8px 8px 0;
}
.f-actions { margin-top: 18px; display: flex; justify-content: flex-end; }
.f-link {
  margin-left: 6px;
  border: 0;
  background: none;
  padding: 0;
  color: #127c73;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}
.f-code { flex-direction: column; gap: 0; padding: 4px 10px; }
.f-codelab { font-size: 8.5px; letter-spacing: .06em; text-transform: uppercase; opacity: .7; font-weight: 600; }
.f-codenum { font-size: 17px; line-height: 1.05; }

/* ── Störungsprotokoll (Diagnose) ──────────────────────────────────── */
.fault-sum { font-size: 12.5px; opacity: .75; margin: 2px 0 8px; }
.fault-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.fault-table th {
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  opacity: .55;
  padding: 0 6px 6px 0;
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}
.fault-table td { padding: 7px 6px 7px 0; border-bottom: 1px solid rgba(0, 0, 0, .05); vertical-align: top; }
.fault-table tr:last-child td { border-bottom: 0; }
.fault-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fnum {
  display: inline-block;
  min-width: 18px;
  padding: 0 4px;
  border-radius: 5px;
  background: rgba(192, 57, 43, .12);
  color: #c0392b;
  font-weight: 700;
  font-size: 11px;
  text-align: center;
}
.fault-empty { font-size: 12.5px; opacity: .6; }
.fault-hint { margin-top: 10px; font-size: 11px; opacity: .5; }

/* ── Verlauf im Störungsprotokoll ──────────────────────────────────── */
.fault-sub-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 16px 0 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  opacity: .6;
}
.fault-filter {
  border: 0;
  background: rgba(18, 124, 115, .12);
  color: #127c73;
  font: inherit;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  padding: 3px 8px;
  border-radius: 999px;
  cursor: pointer;
  opacity: 1;
}
.fault-row { cursor: pointer; }
.fault-row:active { background: rgba(0, 0, 0, .03); }
#fault-more { margin-top: 8px; }
.f-end { font-size: 10.5px; opacity: .55; margin-top: 1px; white-space: nowrap; }

/* ── Protokoll leeren und Buszeile ──────────────────────────────────── */
.faultlog-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fault-clear {
  border: 1px solid rgba(192, 57, 43, .35);
  background: none;
  color: #c0392b;
  font: inherit;
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
}
.fault-clear:disabled { opacity: .45; cursor: default; }
.fault-bus { margin-top: 10px; font-size: 11.5px; opacity: .6; line-height: 1.45; }

/* Zustandsanzeige der Diagnose — gleiche Farben wie im Cockpit */
.status-pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
}
.status-pill.st-run { background: rgba(18, 124, 115, .16); color: #0f6b63; }
.status-pill.st-idle { background: rgba(120, 130, 130, .16); color: #4d5a59; }
.status-pill.st-fault { background: rgba(192, 57, 43, .16); color: #b03527; }
.status-pill.st-off { background: rgba(120, 130, 130, .12); color: #6b7776; }
