/* tiga.css — TIGA WebDesign, Version 3.5 (29.09.2026). Das Gemeinsame aller TIGA-Webanwendungen.
   Voraussetzung: fonts.css und tokens.css davor. Danach die app.css der jeweiligen Anwendung (Fachliches).
   Teil 1: Typo-Variablen (VIA). Teil 2: Grundbausteine aus der ZMM-base.css (zm-manager@8f9050c, ohne
   Fachklassen — die stehen in zmm-fach.css bzw. künftig in der app.css des ZMM). Teil 3: SOLL-Ergänzungen.
   Framework-frei, CSP-tauglich: keine Skripte, keine externen Quellen, keine data:-Bilder.
   Das Artifact ist die Vorlage; die Apps legen versionierte Kopien ins Repo und ändern sie nicht. */
:root {
  --via-font-family: Roboto, sans-serif;
  --via-text-core-font-size: 14px;
  --via-text-core-line-height: 20px;
  --via-text-core-font-weight: 400;
  --via-text-core-letter-spacing: .1px;
  --via-headline-1-font-size: 24px; --via-headline-1-line-height: 32px; --via-headline-1-font-weight: 500; --via-headline-1-letter-spacing: 0px;
  --via-headline-2-font-size: 18px; --via-headline-2-line-height: 24px; --via-headline-2-font-weight: 700; --via-headline-2-letter-spacing: .15px;
  --via-headline-3-font-size: 18px; --via-headline-3-line-height: 24px; --via-headline-3-font-weight: 500; --via-headline-3-letter-spacing: .15px;
  --via-headline-4-font-size: 18px; --via-headline-4-line-height: 24px; --via-headline-4-font-weight: 400; --via-headline-4-letter-spacing: .15px;
  --via-special-headline-1-font-size: 40px; --via-special-headline-1-line-height: 46px; --via-special-headline-1-font-weight: 500;
  --via-special-headline-2-font-size: 40px; --via-special-headline-2-line-height: 46px; --via-special-headline-2-font-weight: 400;
  --via-special-headline-3-font-size: 80px; --via-special-headline-3-line-height: 106px; --via-special-headline-3-font-weight: 300;
  --via-special-headline-4-font-size: 72px; --via-special-headline-4-line-height: 95px;  --via-special-headline-4-font-weight: 300; --via-special-headline-4-letter-spacing: -1.5px;
  --via-text-1-font-size: 14px; --via-text-1-line-height: 20px; --via-text-1-font-weight: 400; /* Standard */
  --via-text-2-font-size: 14px; --via-text-2-line-height: 20px; --via-text-2-font-weight: 700; /* fett */
  --via-text-3-font-size: 14px; --via-text-3-line-height: 20px; --via-text-3-font-weight: 500; /* medium */
  --via-text-4-font-size: 12px; --via-text-4-line-height: 16px; --via-text-4-font-weight: 400; /* klein */
  --via-text-5-font-size: 10px; --via-text-5-line-height: 12px; --via-text-5-font-weight: 400; /* sehr klein (z.B. Versions-/Footerzeile) */
  --via-nav-1-active-font-size: 18px;   --via-nav-1-active-font-weight: 500;
  --via-nav-1-inactive-font-size: 18px; --via-nav-1-inactive-font-weight: 400;
  --font-family:          var(--via-font-family);
}

/* ---- Teil 2: Grundbausteine ---- */
@keyframes indet { 0% { margin-left: -35%; } 100% { margin-left: 100%; } }
/* 3D-Beziehungsgraph */
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 12px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: var(--via-text-4-font-size); }
.legend .dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.legend-hint { color: var(--text-muted); font-size: var(--via-text-4-font-size); }
/* Basis-Layout im VIA-Stil. Nutzt die Tokens aus tokens.css. */
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-family);
  font-size: var(--via-text-1-font-size);
  line-height: var(--via-text-1-line-height);
  letter-spacing: var(--via-text-1-letter-spacing);
  color: var(--text-color);
  background: var(--via-app-background);
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* App-Rahmen: Kopf (User) — Inhalt — Fuß (Version) */
.app { display: flex; flex-direction: column; min-height: 100vh; }

.app-header {
  display: flex; align-items: center; gap: 16px;
  background: var(--color-nav); color: var(--text-on-primary);
  padding: 0 20px; height: 56px;
}
.app-header .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.app-header .brand img { height: 28px; width: 28px; }
.app-header nav { display: flex; gap: 4px; margin-left: 16px; }
.app-header nav a {
  color: var(--text-on-primary); padding: 6px 12px; border-radius: var(--radius);
  font-weight: 400; opacity: .85;
}
.app-header nav a.active, .app-header nav a:hover { background: rgba(255,255,255,.15); opacity: 1; text-decoration: none; }
.app-header .spacer { flex: 1; }
.app-header .user-area { display: flex; align-items: center; gap: 12px; }
.app-header .user { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.app-header .user .name { font-weight: 500; }
.app-header .user .role { font-size: var(--via-text-4-font-size); opacity: .8; }
.app-header .logout-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--radius); cursor: pointer;
  border: none; background: rgba(255, 255, 255, .14); color: var(--text-on-primary);
}
.app-header .logout-btn:hover { background: rgba(255, 255, 255, .28); }
.app-header .logout-btn svg { width: 19px; height: 19px; }

/* Rumpf = linke Modul-Spalte + Inhalt nebeneinander */
.app-body { flex: 1; display: flex; align-items: stretch; min-height: 0; }
.app-main { flex: 1; min-width: 0; padding: 24px; max-width: 1400px; width: 100%; margin: 0 auto; }

/* Linke blaue Modul-Spalte: oben der Modulname, darunter die objektbezogenen Ansichten */
.sidebar {
  flex: 0 0 152px; width: 152px; background: var(--color-nav); color: var(--text-on-primary);
  padding: 16px 10px; display: flex; flex-direction: column; gap: 6px;
}
.sidebar .mod-name {
  font-weight: 700; font-size: 15px; line-height: 1.25; padding: 4px 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,.22); margin-bottom: 8px;
  overflow: hidden; text-overflow: ellipsis;
}
.sidebar .mod-name.empty { color: rgba(255,255,255,.65); font-weight: 500; font-style: italic; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a {
  color: var(--text-on-primary); opacity: .85; padding: 9px 12px; border-radius: var(--radius);
  font-weight: 400;
}
.sidebar nav a:hover { background: rgba(255,255,255,.15); opacity: 1; text-decoration: none; }
.sidebar nav a.active { background: rgba(255,255,255,.22); opacity: 1; font-weight: 500; }

.app-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 20px; color: var(--text-muted);
  font-size: var(--via-text-5-font-size); line-height: var(--via-text-5-line-height);
  border-top: 1px solid var(--color-line); background: var(--color-bg);
}

/* Bausteine */
.h1 { font-size: var(--via-headline-1-font-size); line-height: var(--via-headline-1-line-height);
      font-weight: var(--via-headline-1-font-weight); margin: 0 0 16px; color: var(--color-primary-strong); }
.card {
  background: var(--color-panel); border: 1px solid var(--color-line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 16px;
}
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.btn {
  font-family: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
  border: 1px solid var(--color-primary); border-radius: var(--radius);
  background: var(--color-primary); color: var(--text-on-primary); padding: 8px 14px;
}
.btn:hover { background: var(--PC200); border-color: var(--PC200); }
.btn.secondary { background: transparent; color: var(--color-primary); }
.btn.secondary:hover { background: var(--PC110); }
.btn.danger { background: var(--color-error); border-color: var(--color-error); }
.btn.danger:hover { background: var(--AC170); border-color: var(--AC170); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

table.data { width: 100%; border-collapse: collapse; background: var(--color-panel); }
table.data th, table.data td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--color-line); }
table.data th { color: var(--color-primary-strong); font-weight: 500; }
table.data tr:hover td { background: var(--via-hover-color); }
/* Reine Anzeigetabellen: kein Hover-Signal, das Klickbarkeit verspricht. */
table.data.static-rows tr:hover td { background: transparent; }

/* Dashboard-Kachel: kräftiger Rahmen für das aktive Modul, andere gedämpft */
.card.selectable { cursor: pointer; transition: box-shadow .15s ease, opacity .15s ease; }
.card.selectable:hover { box-shadow: var(--shadow-md); }
.card.selected {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary);
}
/* Ist ein Modul gewählt, treten die übrigen Kacheln optisch zurück (inaktiv) */
.card.dimmed { opacity: .5; }
.card.dimmed:hover { opacity: 1; }

/* Info-Symbol an Feldern (z. B. Versions-Zähler) mit klickbarem Erklär-Popover */
.field-hint-wrap { position: relative; display: inline-block; }
.field-hint {
  border: none; background: none; cursor: pointer; padding: 2px 6px; margin-left: 1px;
  color: var(--color-primary); font-size: 14px; line-height: 1; vertical-align: baseline;
}
.field-hint:hover { color: var(--color-primary-strong); }
/* Popover öffnet nach links (right:0), damit es am rechten Feldrand nicht abgeschnitten wird */
.field-hint-pop {
  position: absolute; top: 100%; right: 0; left: auto; z-index: 30; margin-top: 4px;
  width: max-content; max-width: 320px; padding: 8px 10px;
  background: var(--color-panel); color: var(--text-color);
  border: 1px solid var(--color-line); border-radius: var(--radius);
  box-shadow: var(--shadow-md); font-size: 12px; line-height: 1.45; white-space: normal;
}
/* Modul-Liste: Zeilen anklickbar (Auswahl), aber ohne farbige Hinterlegung */
tr.selectable { cursor: pointer; }

/* Fortschrittsbalken (Sync) */
.progress { margin-top: 10px; }
.progress .meta {
  display: flex; justify-content: space-between; gap: 8px; min-width: 0;
  font-size: var(--via-text-4-font-size); color: var(--text-muted); margin-bottom: 4px;
}
/* Phasentext einzeilig mit … kürzen, Prozent rechts nicht schrumpfen */
.progress .meta span:first-child { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress .meta span:last-child { flex: 0 0 auto; }
.progress-track {
  height: 8px; border-radius: 999px; background: var(--FC500); overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: 999px; background: var(--color-primary);
  transition: width .3s ease;
}
.progress-fill.err { background: var(--color-error); }
.progress-fill.done { background: var(--color-success); }
/* indeterminater Anlauf (vor erster Prozentmeldung) */
.progress-fill.indet {
  width: 35% !important; animation: indet 1.1s ease-in-out infinite;
}

/* Sync-Status-Perle (Benutzerverwaltung) */
.sync-pearl { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.sync-pearl.syncing { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 12px; font-weight: 500; }
.badge.ok { background: var(--AC310); color: var(--AC300); }
.badge.warn { background: var(--AC210); color: var(--AC400); }
.badge.err { background: var(--AC110); color: var(--AC100); }
.badge.muted { background: var(--FC500); color: var(--FC200); }

/* Eingabefelder (VIA) */
input, select {
  font-family: inherit; font-size: 14px; color: var(--text-color);
  background: var(--color-bg); border: 1px solid var(--FC400);
  border-radius: var(--radius); padding: 8px 10px; outline: none;
}
input:focus, select:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--PC110); }
input::placeholder { color: var(--FC300); }

/* Seitenkopf mit Aktionen */
.page-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.page-head .h1 { margin: 0; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: var(--radius);
  border: 1px solid var(--color-line); background: var(--color-panel);
  color: var(--color-primary); cursor: pointer; padding: 0;
}
.icon-btn:hover { background: var(--PC110); border-color: var(--color-primary); }
.icon-btn svg { width: 18px; height: 18px; }

/* Tabellen-Toolbar (Suche + Filter + Zähler) */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar .search { position: relative; flex: 0 1 320px; }
.toolbar .search input { width: 100%; padding-left: 32px; }
.toolbar .search svg {
  position: absolute; left: 9px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--FC300); pointer-events: none;
}
.toolbar .count { color: var(--text-muted); font-size: var(--via-text-4-font-size); margin-left: auto; }
.toolbar label.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.toolbar label.chk input { width: auto; }

/* Sortierbare Kopfzellen */
table.data thead th { position: sticky; top: 0; background: var(--color-panel); z-index: 1; }
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable:hover { color: var(--color-primary); }
th .sort-ind { display: inline-block; width: 12px; color: var(--color-primary); font-size: 10px; }
/* Zahlenspalten rechtsbündig. `table.data td` (0,1,2) überstimmte `td.num` (0,1,1) - die Spalten
   standen seit jeher links, obwohl DataTable `align: "right"` setzte (Befund TIGA LogAnalyse,
   Entscheidung Mathi 24.09.2026). Deshalb hier mit derselben Spezifität plus Klasse. */
table.data td.num, table.data th.num, td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.table-wrap { border: 1px solid var(--color-line); border-radius: var(--radius);
  overflow: auto; max-height: calc(100vh - 230px); background: var(--color-panel); }

/* Modal / Popup */
.modal-overlay {
  position: fixed; inset: 0; background: var(--via-backdrop-color);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px;
}
.modal-card {
  background: var(--color-panel); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 520px; max-height: 90vh; overflow: auto;
}
.modal-card.breit { max-width: min(1200px, 96vw); }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--color-line);
}
.modal-head .title { font-size: var(--via-headline-2-font-size); font-weight: 700; color: var(--color-primary-strong); }
.modal-head .close { background: none; border: none; cursor: pointer; font-size: 22px; line-height: 1; color: var(--text-muted); padding: 4px; }
.modal-head .close:hover { color: var(--color-error); }
.modal-body { padding: 20px; display: grid; gap: 10px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; }
.field-label { font-size: var(--via-text-4-font-size); color: var(--text-muted); margin-bottom: -4px; }

/* Desktop-App: feste Kopf-Bereiche schrumpfen nicht; die Mindestbreite des Fensters
   ergibt sich aus dem Top-Menü. (Eine eigene Mobile-UX kommt separat.) */
.app-header { white-space: nowrap; }
.app-header .brand, .app-header nav, .app-header .user-area { flex-shrink: 0; }
.app-header .spacer { min-width: 16px; }

/* ---- Kennzahl-Kacheln + Segment-Umschalter (Hochlauf u. a.) ---- */
.metric-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.metric-card { background: var(--color-panel); border: 1px solid var(--color-line);
  border-radius: var(--radius); padding: 8px 12px; display: flex;
  justify-content: space-between; align-items: baseline; gap: 8px; }
.metric-label { font-size: var(--via-text-4-font-size); color: var(--text-muted); }
.metric-value { font-size: 22px; font-weight: 600; color: var(--color-primary-strong);
  font-variant-numeric: tabular-nums; }
/* Monitoring-Kacheln: Beschriftung klein oben, Wert gross darunter, Untertitel. Vier je Reihe auf
   breiten Bildschirmen, zwei auf schmalen - feste Spaltenzahl statt auto-fit, damit acht Kacheln
   zwei saubere Reihen ergeben und nicht sechs plus zwei (Screenshot Mathi, 15.09.2026). */
.mon-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1000px) { .mon-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .mon-tiles { grid-template-columns: minmax(0, 1fr); } }
.mon-tile { background: var(--color-panel); border: 1px solid var(--color-line); border-radius: var(--radius);
  padding: 10px 14px 8px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mon-tile.klick { cursor: pointer; }
.mon-tile.klick:hover { border-color: var(--color-primary); }
.mon-tile.aktiv { border-color: var(--color-primary); box-shadow: inset 0 0 0 1px var(--color-primary); background: var(--color-bg); }
/* Komponenten-Boxen (VPN-Konzentratoren, HSK): eine Box je Geraet mit Status, Klick oeffnet die
   Detailansicht darunter. Alles einzeilig - die alte breite Tabelle brach um (Mathi, 16.09.2026). */
.komp-boxen { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.komp-box { background: var(--color-panel); border: 1px solid var(--color-line); border-radius: var(--radius);
  padding: 10px 14px; min-width: 0; cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
.komp-box:hover { border-color: var(--color-primary); }
.komp-box.aktiv { border-color: var(--color-primary); box-shadow: inset 0 0 0 1px var(--color-primary); background: var(--color-bg); }
.komp-box.inaktiv { opacity: .6; }
.komp-box .kopf { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.komp-box .name { font-weight: 700; color: var(--color-primary-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.komp-box .zeile { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.komp-box .zeile b { color: var(--text-color); font-weight: 600; font-variant-numeric: tabular-nums; }
/* Statusbloecke der Detailansicht (HSK, VPNK): je Thema ein Block mit Zeilen Beschriftung links,
   Wert rechts - statt eines neunspaltigen Rasters, das umbrach (Mathi, 16.09.2026). */
.status-bloecke { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 12px; }
.status-block { border: 1px solid var(--color-line); border-radius: var(--radius); padding: 8px 12px; background: var(--color-bg); min-width: 0; }
.status-block .t { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 4px; }
.status-block .r { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 3px 0; font-size: 13px; border-top: 1px solid var(--color-line); }
.status-block .r:first-of-type { border-top: 0; }
.status-block .r .l { color: var(--text-muted); white-space: nowrap; }
.status-block .r .v { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; text-align: right; }
.status-block .gross { font-size: 22px; font-weight: 700; color: var(--color-primary-strong); font-variant-numeric: tabular-nums; }
/* Kennzahlen-Raster der Detailansicht: Beschriftung klein, Wert darunter, kein Umbruch. */
.kv-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 16px; }
.kv-raster .kv { min-width: 0; }
.kv-raster .kv .l { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kv-raster .kv .v { font-size: 15px; font-weight: 600; color: var(--text-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.mon-tile .l { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mon-tile .v { font-size: 24px; line-height: 1.2; font-weight: 600; color: var(--color-primary-strong);
  font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mon-tile .s { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.segmented { display: inline-flex; border: 1px solid var(--FC400); border-radius: var(--radius);
  overflow: hidden; }
.segmented button { border: none; background: var(--color-bg); color: var(--text-color);
  font-family: inherit; font-size: 14px; padding: 7px 14px; cursor: pointer; }
.segmented button + button { border-left: 1px solid var(--FC400); }
.segmented button.on { background: var(--color-primary); color: var(--text-on-primary); }
.segmented button:disabled { opacity: .45; cursor: not-allowed; }
.ai-hint { color: var(--text-muted); font-size: 13px; margin: 0 0 12px; }
/* Chat-Fläche mit Bubbles (UX aus TIGA Monitoring übernommen). */
.ai-chat { display: flex; flex-direction: column; gap: 12px; padding: 14px;
  background: var(--color-panel); border: 1px solid var(--color-line); border-radius: 12px;
  /* Hoeher (Mathi, 16.09.2026): fast die ganze Bildschirmhoehe abzueglich Kopfzeile, Titel und
     Eingabezeile - vorher endete das Fenster bei 62 %, die Antworten scrollten frueh weg. */
  box-shadow: var(--shadow-sm); min-height: 60vh; max-height: calc(100vh - 260px); overflow-y: auto; }
.ai-msg { max-width: 88%; }
.ai-msg.user { align-self: flex-end; }
.ai-msg.assistant, .ai-msg.error { align-self: flex-start; }
.ai-msg .ai-body {
  padding: 10px 13px; border-radius: 12px; line-height: 1.5; font-size: 14px; word-break: break-word;
  background: var(--color-bg-muted); border: 1px solid var(--color-line);
}
.ai-msg.user .ai-body { background: var(--color-nav); color: var(--text-on-primary);
  border-color: var(--color-nav); border-bottom-right-radius: 4px; white-space: pre-wrap; }
.ai-msg.assistant .ai-body { border-bottom-left-radius: 4px; }
.ai-msg.error .ai-body { background: var(--AC110); color: var(--AC100); border-color: var(--AC110);
  white-space: pre-wrap; }
.ai-body p:first-child { margin-top: 0; }
.ai-body p:last-child, .ai-body > :last-child { margin-bottom: 0; }
.ai-body pre { background: var(--FC500); padding: 10px; border-radius: var(--radius); overflow: auto; }
.ai-body code { background: var(--FC500); padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.ai-body pre code { background: none; padding: 0; }
.ai-body table { margin: 8px 0; }
.ai-body blockquote { border-left: 3px solid var(--FC400); margin: 6px 0; padding: 2px 10px;
  color: var(--text-muted); }
.ai-typing { align-self: flex-start; color: var(--text-muted); font-style: italic; font-size: 13px; }
.ai-steps { margin-top: 8px; font-size: 13px; }
.ai-steps summary { cursor: pointer; color: var(--color-primary); }
.ai-step { margin-top: 8px; }
.ai-step pre { background: var(--FC500); padding: 8px 10px; border-radius: var(--radius); overflow: auto; font-size: 12px; }
.ai-step-meta { margin-top: 4px; }
/* Vorschlags-Pills */
.ai-presets { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.ai-preset { font-family: inherit; font-size: 12px; cursor: pointer; text-align: left;
  border: 1px solid var(--FC400); background: var(--color-panel); color: var(--text-color);
  border-radius: 999px; padding: 5px 12px; }
.ai-preset:hover { border-color: var(--color-primary); color: var(--color-primary); }
.ai-input { display: flex; gap: 8px; align-items: flex-end; margin-top: 12px; }
.ai-input textarea {
  flex: 1; font-family: inherit; font-size: 14px; color: var(--text-color);
  background: var(--color-bg); border: 1px solid var(--FC400); border-radius: var(--radius);
  padding: 8px 10px; outline: none; resize: vertical; min-height: 44px;
}
.ai-input textarea:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--PC110); }
.ai-input .btn { flex: 0 0 auto; }

/* Virtualisierte Listen: nur der sichtbare Ausschnitt steht im DOM, die Platzhalter oben
   und unten halten die Bildlaufleiste maßstäblich. Dafür müssen ALLE Zeilen gleich hoch
   sein — Zellen brechen deshalb nicht mehr um, sondern werden gekürzt (voller Wert im
   Tooltip, Spaltenbreite ist ziehbar). */
table.data tbody.virt td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.data tbody.virt tr.spacer:hover td { background: transparent; }
table.data tbody.virt tr.spacer td { border-bottom: 0; }

/* Untermenue der Systemeinstellungen. Die Seite war auf vier Bereiche mit je mehreren Karten
   und langen Erklaertexten gewachsen; wer die Datensicherung brauchte, scrollte an
   Benutzerverwaltung und Mailversand vorbei. Uebernommen aus TIGA Monitoring, damit beide
   Anwendungen sich hier gleich bedienen. */
.set-nav {
  display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 18px;
  border-bottom: 1px solid var(--color-line);
}
.set-nav button {
  background: none; border: none; border-bottom: 2px solid transparent;
  padding: 9px 14px; font-size: 14px; cursor: pointer; color: var(--text-muted);
  font-family: inherit;
}
.set-nav button:hover { color: var(--text-color); }
.set-nav button.active {
  color: var(--color-primary); border-bottom-color: var(--color-primary); font-weight: 600;
}

/* Hinweisstreifen innerhalb einer Karte - fuer Zustaende, die man lesen MUSS, bevor man das
   Formular darunter bedient (fehlender Master-Key, unlesbarer Wert). */
.hinweis { padding: 10px 12px; border-radius: var(--radius); font-size: 13px; }
.hinweis.warn { background: var(--AC210); color: var(--AC400); }
.hinweis.error { background: var(--AC110); color: var(--AC100); }

/* ---- Mobile Lageseite (/lage): eigener Rahmen ohne Kopf- und Seitenleiste, fuer 375 px ---- */
.lage { max-width: 640px; margin: 0 auto; padding: 12px 14px 40px; font-size: 16px; color: var(--text-color); }
.lage .kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.lage .kopf .titel { font-weight: 700; font-size: 18px; color: var(--color-primary-strong); }
.lage .kopf .modul { font-size: 13px; color: var(--text-muted); }
.lage .kopf select { font-size: 14px; padding: 4px 6px; border: 1px solid var(--color-line); border-radius: 6px; background: var(--color-panel); max-width: 55vw; }
.lage .ampel { border-radius: 12px; padding: 14px 16px; color: #fff; margin-bottom: 12px; }
.lage .ampel.rot { background: #c62828; } .lage .ampel.gelb { background: #d98324; } .lage .ampel.gruen { background: #2e7d32; } .lage .ampel.grau { background: #6b7a90; }
.lage .ampel .gross { font-size: 22px; font-weight: 700; }
.lage .ampel .klein { font-size: 14px; opacity: .92; margin-top: 2px; }
.lage .block { background: var(--color-panel); border: 1px solid var(--color-line); border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.lage .block > summary { list-style: none; cursor: pointer; padding: 12px 14px; display: flex; align-items: center; gap: 10px; font-weight: 600; }
.lage .block > summary::-webkit-details-marker { display: none; }
.lage .block > summary .wert { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lage .block > summary .pfeil { color: var(--text-muted); font-size: 12px; }
.lage .block[open] > summary { border-bottom: 1px solid var(--color-line); }
.lage .zeile { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--color-line); font-size: 15px; }
.lage .zeile:first-child { border-top: 0; }
.lage .zeile .n { flex: 1; min-width: 0; }
.lage .zeile .n .u { display: block; font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lage .zeile .w { font-variant-numeric: tabular-nums; white-space: nowrap; }
.lage .leer { padding: 12px 14px; color: var(--text-muted); font-size: 14px; }
.lage .balken { display: flex; gap: 3px; align-items: flex-end; height: 40px; padding: 8px 14px 4px; }
.lage .balken div { flex: 1; border-radius: 3px 3px 0 0; min-height: 3px; }
.lage .tage { display: flex; gap: 3px; padding: 0 14px 10px; font-size: 10px; color: var(--text-muted); }
.lage .tage span { flex: 1; text-align: center; }
.lage .fuss { text-align: center; font-size: 13px; color: var(--text-muted); margin-top: 16px; display: flex; flex-direction: column; gap: 6px; }
.lage .fuss a { color: var(--color-primary); }

/* --- Anwenderdokumentation (/doku) --------------------------------------------------------- */
.doku { max-width: 960px; }
/* Handbuch als Kapitelseiten (0.85.0): Seitenleiste links, Inhalt rechts; Telefon: Auswahl oben */
.doku-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
.doku-nav { position: sticky; top: 12px; padding: 8px 0; max-height: calc(100vh - 40px); overflow: auto; font-size: 14px; }
.doku-nav a { display: block; padding: 6px 14px; color: var(--text-color); text-decoration: none; border-left: 3px solid transparent; }
.doku-nav a:hover { background: var(--color-bg); }
.doku-nav a.on { color: var(--color-primary); font-weight: 600; border-left-color: var(--color-primary); background: var(--color-bg); }
.doku-nav-abschnitte a { padding: 4px 14px 4px 26px; font-size: 13px; color: var(--text-muted); }
.doku-nav-abschnitte a.on { font-weight: 600; }
.doku-wahl { display: none; width: 100%; margin-bottom: 12px; }
.doku-zurueck { color: var(--color-primary); text-decoration: none; }
.doku-inhalt { min-width: 0; }
.doku-kapitel-titel { font-size: 22px; margin: 0 0 8px; }
.doku-abschnitte { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--color-line); font-size: 13px; }
.doku-blaettern { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; }
.doku-blaettern .btn { text-decoration: none; }
@media (max-width: 900px) {
  .doku-layout { grid-template-columns: minmax(0, 1fr); }
  .doku-nav { display: none; }
  .doku-wahl { display: block; }
}
.doku-kapitel { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-top: 16px; }
.doku-kachel { display: flex; flex-direction: column; gap: 4px; padding: 10px 14px; font-weight: 600; text-decoration: none; color: var(--text-color); }
.doku-kachel small { font-weight: 400; color: var(--text-muted); font-size: 12px; line-height: 1.35; }
.doku-kachel:hover { box-shadow: var(--shadow-md); }
.doku-text { padding: 20px 28px; line-height: 1.55; overflow-wrap: anywhere; }
.doku-text h1 { font-size: 24px; margin: 0 0 12px; }
.doku-text h2 { font-size: 20px; margin: 0 0 10px; scroll-margin-top: 16px; }
.doku-text h3 { font-size: 16px; margin: 20px 0 6px; scroll-margin-top: 16px; }
.doku-text h4 { font-size: 14px; margin: 14px 0 4px; }
.doku-text p, .doku-text ul, .doku-text ol { margin: 8px 0; }
.doku-text li { margin: 3px 0; }
.doku-text blockquote { margin: 10px 0; padding: 8px 14px; border-left: 4px solid var(--color-primary); background: var(--color-bg); }
.doku-text code { font-size: 90%; padding: 1px 4px; background: var(--color-bg); border-radius: 4px; }
.doku-text pre { padding: 10px 12px; overflow: auto; background: var(--color-bg); border-radius: 6px; }
.doku-text table { border-collapse: collapse; margin: 10px 0; font-size: 13px; }
.doku-text th, .doku-text td { border: 1px solid var(--color-line); padding: 4px 8px; text-align: left; vertical-align: top; }
.doku-text th { background: var(--color-bg); }
/* Erste Spalte (Begriff) nicht umbrechen - sonst quetscht der Browser sie auf Buchstabenbreite */
.doku-text td:first-child, .doku-text th:first-child { min-width: 6em; }
@media (min-width: 700px) { .doku-text td:first-child, .doku-text th:first-child { white-space: nowrap; } }
.doku-text hr { border: 0; border-top: 1px solid var(--color-line); margin: 20px 0; }
.doku-text a { color: var(--color-primary); }

/* --- Hilfe an den Seitenüberschriften ------------------------------------------------------ */
.hilfe-tip { position: relative; display: inline-flex; align-items: center; margin-left: 8px; vertical-align: middle; }
.hilfe-knopf { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--color-primary); background: var(--color-panel);
  color: var(--color-primary); font: 700 12px/1 var(--via-font-family, inherit); cursor: help; padding: 0; }
.hilfe-knopf:hover, .hilfe-knopf[aria-expanded="true"] { background: var(--color-primary); color: var(--text-on-primary); }
.hilfe-popover { position: absolute; top: 26px; left: -8px; z-index: 40; width: min(420px, 80vw); padding: 10px 14px 12px;
  background: var(--color-panel); border: 1px solid var(--color-line); border-radius: var(--radius); box-shadow: var(--shadow-md);
  font-size: 13px; line-height: 1.45; font-weight: 400; color: var(--text-color); text-align: left; white-space: normal; }
.hilfe-popover::before { content: ""; position: absolute; top: -8px; left: 0; right: 0; height: 8px; }
.hilfe-titel { font-weight: 700; margin-bottom: 4px; }
.hilfe-popover p { margin: 0 0 8px; }
.hilfe-popover a { color: var(--color-primary); font-weight: 600; text-decoration: none; }
.hilfe-popover a:hover { text-decoration: underline; }
/* Spaltenkopf: kleineres Fragezeichen, Popover per Portal fest im Fenster (Tabellenrahmen schneidet sonst ab) */
.hilfe-tip-spalte { margin-left: 4px; }
.hilfe-tip-spalte .hilfe-knopf { width: 15px; height: 15px; font-size: 10px; cursor: help; }
.hilfe-popover-fest { position: fixed; z-index: 120; }  /* über dem Modal (100): die Tabelle kann im Tagesfenster liegen */
.hilfe-popover-fest::before { top: -8px; }


/* =============================================================================================
   Teil 3 — SOLL-Ergänzungen TIGA Designsystem v2
   ============================================================================================= */
:root { --font-mono: "Roboto Mono", ui-monospace, Menlo, monospace; }

/* --- Tastaturfokus: immer sichtbar, nie nur per Farbe des Rahmens --- */
:where(a, button, summary, [tabindex], [role="button"], [role="tab"]):focus-visible {
  outline: 2px solid var(--focus-ring); outline-offset: 2px;
}
.app-header :focus-visible, .sidebar :focus-visible { outline-color: var(--focus-ring-on-nav); }
.segmented button:focus-visible { outline-offset: -3px; }
/* Hover für nicht gewählte Knöpfe des Umschalters (v3.5, Befund Monitoring) — wie Sekundärknopf */
.segmented button:not(.on):not(:disabled):hover { background: var(--PC110); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; } /* eigener Fokus: Rahmen + Ring */
table.data tr[tabindex]:focus-visible { outline: none; }
table.data tr[tabindex]:focus-visible td { box-shadow: inset 0 2px 0 var(--focus-ring), inset 0 -2px 0 var(--focus-ring); }
.skip-link { position: absolute; left: 8px; top: -40px; z-index: 200; padding: 8px 12px; border-radius: var(--radius);
  background: var(--color-panel); color: var(--color-primary); box-shadow: var(--shadow-md); }
.skip-link:focus { top: 8px; }
/* Ziel des Sprunglinks: <main class="app-main" id="inhalt" tabindex="-1"> nimmt den Fokus an, ohne Rahmen um die Fläche (v3.2, aus ZMM) */
.app-main:focus, .app-main:focus-visible { outline: none; }
/* Sortierkopf als Knopf: <th><button class="th-sort">Kunde</button></th> mit aria-sort am th. Sieht aus wie Kopftext (v3.2, aus ZMM) */
table.data th .th-sort { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit;
  letter-spacing: inherit; text-align: inherit; cursor: pointer; white-space: nowrap; }

/* --- Status nach Bedeutung. Badges: lesbare Textstufen (>= 4,5:1), Hintergründe unverändert --- */
.badge { font-weight: 600; }
.badge.ok        { background: var(--status-ok-bg);        color: var(--status-ok-text); }
.badge.warn      { background: var(--status-teilweise-bg); color: var(--hinweis-text); }
.badge.teilweise { background: var(--status-teilweise-bg); color: var(--status-teilweise-text); }
.badge.err       { background: var(--status-stoerung-bg);  color: var(--status-stoerung-text); }
.badge.wartung   { background: var(--status-wartung-bg);   color: var(--status-wartung-text); }
.badge.muted, .badge.grau { background: var(--status-grau-bg); color: var(--status-grau-text); }
.badge.fatal     { background: var(--schwere-fatal); color: var(--on-status-dunkel); }
.badge.info      { background: var(--PC110); color: var(--schwere-hinweis); }
.badge.gedaempft { background: transparent; color: var(--text-muted); box-shadow: inset 0 0 0 1px var(--color-line); font-weight: 500; }
.hinweis.warn  { color: var(--hinweis-text); }
.hinweis.error { color: var(--status-stoerung-text); }
.hinweis.info  { background: var(--PC110); color: var(--color-primary); }
.hinweis.ok    { background: var(--status-ok-bg); color: var(--status-ok-text); }

/* Statuspunkt: nur NEBEN einem Wort, nie allein */
.punkt { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--status-grau); vertical-align: baseline; }
.punkt.ok { background: var(--status-ok); } .punkt.teilweise { background: var(--status-teilweise); }
.punkt.stoerung { background: var(--status-stoerung); } .punkt.wartung { background: var(--status-wartung); }
.punkt.grau { background: transparent; box-shadow: inset 0 0 0 2px var(--status-grau); } /* hohl = kein Messwert */
.punkt.wartung { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); } /* Hellblau braucht auf Weiß eine Kante */

/* Chip: Filter- und Kategorie-Etikett, optional mit Punkt; .an = gewählt */
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 2px 12px; border-radius: 999px;
  font: 500 12px/16px var(--font-family); border: 1px solid var(--FC400); background: var(--color-panel); color: var(--text-color); cursor: default; }
button.chip { cursor: pointer; } button.chip:hover { border-color: var(--color-primary); }
.chip.an { background: var(--PC110); border-color: var(--color-primary); color: var(--color-primary); }

/* --- Lage-Ampel: Status-Tokens statt fester Farben; Schrift je Grund dunkel oder weiß --- */
.lage .ampel.rot   { background: var(--ampel-rot);   color: var(--on-status-dunkel); }
.lage .ampel.gelb  { background: var(--ampel-gelb);  color: var(--on-status-hell); }
.lage .ampel.gruen { background: var(--ampel-gruen); color: var(--on-status-hell); }
.lage .ampel.grau  { background: var(--ampel-grau);  color: var(--on-status-hell); }
.lage .block > summary, .lage .zeile { min-height: var(--target-touch); }

/* --- Umgebungsband: nur auf Test. Wert aus der Env der App, nie aus dem Hostnamen geraten --- */
.umgebung-band { display: flex; align-items: center; justify-content: center; height: var(--umgebung-band-height);
  background: var(--umgebung-test); color: var(--on-status-hell); font-size: 12px; font-weight: 700; letter-spacing: .04em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 12px; }

/* --- Monospace: Log-Auszüge und Kennungen --- */
.mono, .uid, code, kbd, samp, pre { font-family: var(--font-mono); }
.auszug { font: 400 13px/20px var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; margin: 0;
  background: var(--FC500); border: 1px solid var(--color-line); border-radius: var(--radius); padding: 8px 12px; max-height: 360px; overflow: auto; }
.auszug mark, mark.treffer { background: var(--status-teilweise-bg); color: inherit; box-shadow: inset 0 -2px 0 var(--status-teilweise); }
.uid { font-size: 12px; font-weight: 500; color: var(--text-muted); }

/* --- Ereignisliste: Zeit · Punkt · Text · Etikett; .sichtbar = im gezeigten Zeitfenster --- */
.ereignisse { list-style: none; margin: 0; padding: 0; background: var(--color-panel); border: 1px solid var(--color-line); border-radius: var(--radius); }
.ereignis { display: grid; grid-template-columns: 92px 12px minmax(0, 1fr) auto; gap: 10px; align-items: baseline;
  padding: 8px 12px; border-top: 1px solid var(--color-line); }
.ereignis:first-child { border-top: 0; }
.ereignis .zeit { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ereignis .text { min-width: 0; } .ereignis .text .u { display: block; font-size: 12px; color: var(--text-muted); }
.ereignis.sichtbar { background: var(--FC500); }
.ereignis.historisch .text { color: var(--text-muted); }
button.ereignis, a.ereignis { width: 100%; text-align: left; font: inherit; color: inherit; background: none; border: 0; border-top: 1px solid var(--color-line); cursor: pointer; }
button.ereignis:hover, a.ereignis:hover { background: var(--via-hover-color); text-decoration: none; }

/* --- Tagesachse: ein Tag je Zeile, neuester oben. Die Spur 0–24 h trägt NUR Zeiträume (Dauermeldungen,
   Störungen, Wartung) als Balken; Einzelmeldungen stehen als Anzahl rechts, ohne Balken — sonst wirkt
   eine einzelne große Zahl wie ein ganzer Tag Störung. --- */
.tagesachse { display: grid; gap: 2px; }
.tagesachse .tag, .tagesachse .skala { display: grid; grid-template-columns: 96px minmax(0, 1fr) 80px 72px; gap: 12px; align-items: center; }
.tagesachse .tag { padding: 4px 0; }
.tagesachse .datum { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tagesachse .tag.we .datum { color: var(--color-primary); }
.tagesachse .tag.heute .datum { color: var(--text-color); font-weight: 600; }
.tagesachse .spur { position: relative; height: 14px; border-radius: 4px; background: var(--FC500); overflow: hidden; }
.tagesachse .zr { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: var(--status-stoerung); min-width: 3px; }
.tagesachse .zr.teilweise { background: var(--status-teilweise); } .tagesachse .zr.wartung { background: var(--status-wartung); }
.tagesachse .zeitraeume, .tagesachse .einzel { text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tagesachse .einzel { font-weight: 600; }
.tagesachse .leer { color: var(--text-muted); font-weight: 400; }
.tagesachse .tag.historisch .spur { opacity: .55; } .tagesachse .tag.historisch .einzel { color: var(--text-muted); }
.tagesachse .skala { font-size: 10px; color: var(--text-muted); }
.tagesachse .skala .h { display: flex; justify-content: space-between; }
.tagesachse .skala .zeitraeume, .tagesachse .skala .einzel { font-size: 10px; font-weight: 400; }

/* --- Schrittleiste: Prozessschritte (Vorfall, gematik TI-Status). Fortschritt, kein Status: erledigt blau,
   aktuell blau umrandet und fett, offen grau. Jeder Schritt ist beschriftet. --- */
.schritte { display: flex; list-style: none; margin: 0; padding: 0; counter-reset: schritt; }
.schritte li { flex: 1; min-width: 0; position: relative; padding-top: 22px; font-size: 12px; color: var(--text-muted); text-align: center; }
.schritte li::before { content: ""; position: absolute; top: 3px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%;
  background: var(--color-panel); box-shadow: inset 0 0 0 2px var(--schritt-offen); z-index: 1; }
.schritte li::after { content: ""; position: absolute; top: 8px; left: -50%; width: 100%; height: 2px; background: var(--schritt-offen); }
.schritte li:first-child::after { display: none; }
.schritte li.erledigt, .schritte li.aktuell { color: var(--text-color); }
.schritte li.erledigt::before { background: var(--schritt-erledigt); box-shadow: none; }
.schritte li.erledigt::after, .schritte li.aktuell::after { background: var(--schritt-erledigt); }
.schritte li.aktuell::before { box-shadow: inset 0 0 0 3px var(--schritt-erledigt); }
.schritte li.aktuell { font-weight: 600; }
.schritte li .zeit { display: block; font-weight: 400; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* --- Kategorie (Fachlichkeit): eckiges Farbfeld + Name. Rund = Status, eckig = Kategorie. --- */
.kategorie { display: inline-flex; align-items: center; gap: 6px; }
.kategorie::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 2px; background: var(--kat, var(--kategorie-1)); }

/* --- Checkbox mit Beschriftung (überall, nicht nur in der Toolbar): für Einstellungen, die erst mit „Speichern“ gelten --- */
label.chk { display: inline-flex; align-items: center; gap: 8px; min-height: var(--target-min); cursor: pointer; font-size: 14px; }
label.chk input { width: 16px; height: 16px; margin: 0; accent-color: var(--color-primary); flex: none; }
label.chk input:disabled + span, label.chk input:disabled { opacity: .5; cursor: not-allowed; }

/* --- Kursiv: Das System hat keinen echten Kursivschnitt. Für Hervorhebung und Hinweise NICHT verwenden
   (im Druck würde der Renderer eine schräg gestellte Roboto erzeugen). Ausnahmen, die tiga.css selbst setzt:
   leerer Modulname „Wähle Modul“ und der Status „Analysiere …“ im Chat, nur am Bildschirm. --- */
.hinweis, .hinweis * { font-style: normal; }

/* --- Kippschalter: <label class="schalter"><input type="checkbox" role="switch"> Text</label> --- */
.schalter { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; min-height: var(--target-min); }
.schalter input { appearance: none; -webkit-appearance: none; margin: 0; flex: none; width: 36px; height: 20px; border-radius: 999px; padding: 0;
  background: var(--FC400); border: 0; position: relative; cursor: pointer; transition: background .15s ease; }
.schalter input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--color-panel); box-shadow: var(--shadow-sm); transition: left .15s ease; }
.schalter input:checked { background: var(--color-primary); } .schalter input:checked::after { left: 18px; }
.schalter input:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; box-shadow: none; }
.schalter input:disabled { opacity: .5; cursor: not-allowed; }

/* --- Tabellen: Zeilenbegrenzung, klickbare Zeilen, Detailzeile, Spaltengriff --- */
table.data tr.klickbar { cursor: pointer; }
table.data tr.detail td { background: var(--FC500); padding: 12px 16px; }
table.data th .spalten-griff { position: absolute; top: 0; right: -3px; width: 7px; height: 100%; cursor: col-resize; z-index: 2; }
table.data th .spalten-griff:hover { background: var(--PC140); }
.table-wrap.begrenzt { overflow-y: scroll; }
.leer-zustand { padding: 32px 16px; text-align: center; color: var(--text-muted); }
.leer-zustand .was-tun { display: block; margin-top: 4px; color: var(--text-color); }

/* --- Zielgrößen und Bewegung --- */
@media (pointer: coarse) {
  .btn, .icon-btn, .segmented button, .set-nav button, .chip, .ai-preset { min-height: var(--target-touch); }
  .icon-btn { min-width: var(--target-touch); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
