/* SYSTEMSCHRIFT STATT INTER (22.10.2026). Vom 25.09. bis zum 22.10. war es Inter (dieselbe
   Schrift wie in der Brille, ausgeliefert aus schrift/inter.css). Die einfache Ansicht nimmt
   seit dem 20.10. die Systemschrift fuer alles Bedienbare und Georgia fuer Namen und
   Ueberschriften (Stil der Beratung); seit dem 22.10. gilt das fuer das ganze Portal. Die
   Dateien unter schrift/ bleiben liegen (Nastaliq fuer Urdu kommt weiter von dort). */

:root {
  /* Sagt dem Browser, dass die Seite dunkel ist. Ohne das zeichnete er Bildlaufleisten,
     die Pfeile in Zahlenfeldern und die Kalender der Datumsfelder hell auf dunklem Grund
     (28.09.). */
  color-scheme: dark;
  /* DIE FARBEN DER WEBSITE (22.10.2026, vorher #0e0f11 / #16181c / #1e2127 / #e8eaf0 und
     Blau #6c8cff als Akzent): Anthrazit und EIN Gold, wie die einfache Ansicht seit dem
     20.10. Der Akzent ist das helle Gold (8,9 : 1 auf dem Grund); auf einer GEFUELLTEN
     Flaeche steht Anthrazit, nie Weiss (3,1 : 1). */
  --bg:      #12161b;
  --bg-2:    #1b2129;
  --bg-3:    #232a35;
  --ink:     #ebebeb;
  /* GEMESSEN, NICHT GESCHAETZT (25.09.): #6b7280 stand auf dem Hintergrund einer
     Merkmal-Marke mit 3,33:1 und auf der Karte mit 3,81:1. WCAG AA verlangt 4,5:1 fuer
     normalen Text, und die Marken sind mit 0,78rem klein. Die Oberflaeche war damit nicht
     nur "grau", sie war unter der Lesbarkeitsschwelle. #9aa3b2 bringt 6,33:1 auf der Marke
     und 7,25:1 auf der Karte -- dieselbe Zurueckhaltung, aber lesbar. */
  --muted:   #9a9fa6;
  --border:  rgba(255, 255, 255, 0.08);
  --accent:  #d3b264;
  --accent-2:#b08d43;
  --danger:  #e05252;
  --panel:   rgba(27, 33, 41, 0.92);
  /* dieselben Werte wie am #einfach-panel weiter unten, damit jedes Bauteil sie hat */
  --ef-grund: #12161b;
  --ef-flaeche: #1b2129;
  --ef-linie: rgba(255, 255, 255, 0.08);
  --ef-linie-gold: rgba(211, 178, 100, 0.34);
  --ef-hell: rgba(255, 255, 255, 0.92);
  --ef-text: rgba(255, 255, 255, 0.74);
  --ef-leise: rgba(255, 255, 255, 0.56);
  --ef-gold: #d3b264;
  --ef-gold-tief: #b08d43;
  --ef-gold-hauch: rgba(211, 178, 100, 0.07);
  /* KEINE SERIFE MEHR (Corvin 23.10.: "eine ganz komische Schriftart ... viel zu verspielt").
     Vom 20.10. bis zum 23.10. war das Georgia. Das Token bleibt, damit Ueberschriften und
     Namen weiter an EINER Stelle haengen; sie sind jetzt die Systemschrift in 600. */
  --ef-display: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ef-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow:  rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

/* DEN PLATZ DER BILDLAUFLEISTE IMMER FREIHALTEN (25.09.). Sonst ist eine kurze Seite 15 px
   breiter als eine lange, und alles, was sich an der Breite ausrichtet, springt beim
   Wechsel des Bereichs: zuletzt die Reiterleiste, die dann mal alle Reiter zeigte und mal
   "Rollen" ins Menue "Mehr" schob. */
html { scrollbar-gutter: stable; }

body {
  margin: 0;
  font-family: var(--ef-sans);
  /* KEIN globales "tnum": Inter setzte damit auch den Bindestrich tabellenbreit, und aus
     "BK-005" wurde "BK - 005" (gesehen 25.09.). Gleich breite Ziffern gibt es gezielt dort,
     wo Zahlen untereinander stehen muessen (.stat .value). */
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
}

body.modal-open {
  overflow: hidden;
}

.page {
  max-width: 980px;
  margin: 0 auto;
  padding: 48px 20px 80px;
  display: grid;
  gap: 20px;
  animation: fadeIn 0.5s ease-out;
}

/* ── Hero ── */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 28px;
  border-radius: 2px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset;
  /* Über den Panels bleiben, damit das ausgeklappte Sprachmenü nicht
     von der darunterliegenden Navigation/Panel überdeckt wird. */
  position: relative;
  z-index: 5;
}

.eyebrow {
  font-size: 0.8125rem;
  margin: 0 0 8px;
  color: var(--accent);
  font-weight: 700;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin: 0 0 6px;
  color: var(--ink);
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 520px;
}

/* Traegt seit dem 22.09. Sprachwahl UND Konto. Bricht auf schmalen Fenstern um,
   statt den Kopf zu sprengen. */
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

/* ── Upload UI ── */
.upload-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 12px;
}

.upload-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Wie alle Beschriftungen in Satzschreibung (25.09.): "Bild (optional)" statt "BILD (OPTIONAL)". */
.upload-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: color-mix(in srgb, var(--ink) 78%, var(--muted));
}

.upload-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 110px;
  border: 2px dashed var(--border);
  border-radius: 2px;
  cursor: pointer;
  transition: border-color 0.2s;
  overflow: hidden;
  position: relative;
  background: var(--bg-3);
}

.upload-drop:hover { border-color: var(--accent); }
/* Gewählte Ansichten für die KI-Erzeugung aus mehreren Bildern. */
.ai-bilder { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ai-bild { position: relative; width: 78px; height: 78px; }
.ai-bild img { width: 100%; height: 100%; object-fit: cover; border-radius: 2px; border: 1px solid var(--border); }
.ai-bild-weg {
  position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; line-height: 1;
  border-radius: 50%; border: none; cursor: pointer; background: #b3261e; color: #fff; font-size: 14px;
}
.upload-drop.dragover { border-color: var(--accent); border-style: solid; background: rgba(45, 138, 78, 0.10); box-shadow: 0 0 0 3px rgba(45, 138, 78, 0.20); }
.upload-drop.dragover * { pointer-events: none; }

/* ── Toast notifications ── */
#toast-container { position: fixed; bottom: 22px; right: 22px; z-index: 5000; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast {
  min-width: 220px; max-width: 380px;
  padding: 12px 16px; border-radius: 2px;
  font-size: 0.9rem; font-weight: 600; color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: auto; word-break: break-word;
}
.toast--visible { opacity: 1; transform: translateY(0); }
/* Eine Meldung mit mehreren Gruenden (Uebung speichern) steht Zeile fuer Zeile da. */
.toast { white-space: pre-line; max-width: min(440px, calc(100vw - 44px)); }
.toast--success { background: #2d8a4e; }
.toast--error { background: #c0392b; }
.toast--info { background: #334155; }

.upload-thumb {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 2px;
}

.upload-hint {
  font-size: 0.8rem;
  color: var(--muted);
  pointer-events: none;
  /* Mittig auch dann, wenn der Satz im schmalen Feld umbricht (14.10.: in den drei
     Vorschaubild-Feldern stand er linksbuendig am Rand). */
  text-align: center;
  padding: 0 10px;
}

/* Der Entfernen-Knopf unter einem Bildfeld. Klein und links, nicht ueber die ganze Breite:
   Er ist die Ausnahme und nicht das Angebot — die Ablageflaeche darueber ist die Hauptsache. */
.upload-clear {
  align-self: flex-start;
  padding: 3px 10px;
  font-size: 0.76rem;
}

/* ── Company card logo ── */
.company-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.company-card-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 2px;
  background: var(--bg-3);
  flex-shrink: 0;
}

/* ── Portal hero logo ── */
.hero-logo {
  height: 56px;
  max-width: 180px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
  margin-right: 12px;
}

/* ── Nav brand logo ── */
.nav-brand-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 2px;
  flex-shrink: 0;
}

/* ── Portal Branding ── */
body.portal-branded::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: var(--portal-bg-image, none);
  background-size: cover;
  background-position: center;
  opacity: 0.06;
  z-index: -1;
  pointer-events: none;
}

body.portal-branded .hero {
  position: relative;
  background-image: var(--portal-bg-image, none);
  background-size: cover;
  background-position: center;
  /* overflow bleibt sichtbar, sonst schneidet der Hero das ausgeklappte
     Sprachmenü ab. Das Hintergrundbild wird durch border-radius ohnehin
     rund beschnitten, der Farbverlauf über den ::before-Radius unten. */
  overflow: visible;
}

body.portal-branded .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.40) 100%);
  border-radius: 2px;
  pointer-events: none;
  z-index: 0;
}

body.portal-branded .hero > * {
  position: relative;
  z-index: 1;
}

body.portal-branded .hero h1,
body.portal-branded .hero .eyebrow,
body.portal-branded .hero .subtitle {
  color: #fff;
  -webkit-text-fill-color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}

body.portal-branded .hero .eyebrow {
  color: rgba(255,255,255,0.75);
}

.company-detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.company-detail-header h2 {
  margin: 0;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.nav-brand-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent);
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Language Dropdown ── */
.lang-dropdown {
  position: relative;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  /* 19 Sprachen (20.10.2026): zwei Spalten, und rollen, wenn das Fenster niedrig ist. */
  grid-template-columns: repeat(2, max-content);
  width: max-content;
  max-width: calc(100vw - 32px);
  max-height: min(70vh, 560px);
  overflow-y: auto;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 2px;
  box-shadow: 0 16px 40px -10px var(--shadow);
  padding: 8px;
  display: grid;
  gap: 4px;
  z-index: 10;
  min-width: 160px;
}

.lang-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--ink);
  border: none;
  border-radius: 2px;
  padding: 8px 10px;
  cursor: pointer;
  text-align: start;
  white-space: nowrap;
}

.lang-option:hover {
  background: var(--border);
}

/* Die Flagge der Sprache, dieselbe wie in der Sprachwahl der Brille (21.10.2026; vom 20.10. an
   stand dort nur das Kuerzel). Die Bilder sind doppelt so gross wie hier, fuer scharfe
   Bildschirme; die Haarlinie haelt helle Flaggen (Polen, Russland) auf dunklem Grund zusammen. */
.sprach-flagge {
  display: inline-block;
  flex: none;
  width: 22px;
  height: 16px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
  object-fit: cover;
  vertical-align: middle;
}
/* Im Knopf darf die Flagge ihn nicht hoeher machen als "Abmelden" daneben (16 px Bild auf
   12,7 px Zeile machten ihn 3 px hoeher). */
.lang-toggle .sprach-flagge { margin-block: -2px; }
.lang-option--aktiv { background: var(--border); }
/* Von rechts nach links: das Menue haengt dann an der linken Kante des Knopfes. */
html[dir="rtl"] .lang-menu { right: auto; left: 0; }
/* Zeilenmenue ("Weitere Aktionen"): haengt von rechts nach links an der linken Kante des Knopfes. */
html[dir="rtl"] .menue-liste { right: auto; left: 0; }
html[dir="rtl"] .menue-liste > button { text-align: right; }
/* Pfeile, die eine Richtung meinen (weiter, zurueck), zeigen von rechts nach links. */
html[dir="rtl"] .ikon-richtung { transform: scaleX(-1); }

.flag {
  width: 20px;
  height: 14px;
  display: inline-block;
  border-radius: 2px;
  border: 1px solid rgba(255,255,255,0.15);
  background-size: cover;
  background-position: center;
}

.flag-de {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='40'%3E%3Crect width='60' height='40' fill='%23000'/%3E%3Crect width='60' height='26' y='13' fill='%23dd0000'/%3E%3Crect width='60' height='13' y='27' fill='%23ffce00'/%3E%3C/svg%3E");
}

.flag-en {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='40'%3E%3Crect width='60' height='40' fill='%23012169'/%3E%3Crect x='26' width='8' height='40' fill='%23c8102e'/%3E%3Crect y='16' width='60' height='8' fill='%23c8102e'/%3E%3C/svg%3E");
}

/* ── Panels ── */
.panel {
  padding: 24px;
  border-radius: 2px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(255,255,255,0.03) inset;
  display: grid;
  gap: 16px;
}

/* ── Navigation ─────────────────────────────────────────────────────────────
   REITER, KEINE KNOEPFE (Ansage Corvin 22.09.: "das sollte irgendwie professioneller
   aussehen"). Vorher hatte jeder der dreizehn Eintraege Rahmen und Hintergrund, und der
   aktive war eine gefuellte blaue Pille mit Schein -- der lauteste Punkt der Seite,
   obwohl er nur sagt, wo man gerade ist.

   Jetzt: nur Text, der aktive mit einem Strich darunter. Drei Gruppen, durch duenne
   Trenner geschieden. Das Konto rechts. */
.nav {
  display: block;
  padding: 0;
  gap: 0;
  /* Klebt oben: In einer langen Modul- oder Fragenliste ist die Navigation sonst weg,
     und man scrollt zurueck, nur um den Bereich zu wechseln. */
  position: sticky;
  top: 12px;
  z-index: 50;
  background: color-mix(in srgb, var(--bg-2) 92%, transparent);
  backdrop-filter: blur(12px);
  /* Sichtbar statt versteckt: Das Menue "Mehr" klappt unter der Leiste auf und wurde sonst
     an ihrer Unterkante abgeschnitten. */
  overflow: visible;
  /* ...und deshalb ausdruecklich 0: Mit overflow hidden zaehlte die Leiste im Seitenraster
     (main.page ist ein Grid) mit Mindestbreite 0, mit visible zaehlt ihr voller Inhalt. Die
     Seitenspalte wuchs dann auf 755 px, auch auf einem 375-px-Handy. */
  min-width: 0;
}

/* Nur noch die Reiter: Das Konto steht seit dem 22.09. im Kopf. Damit haben die Reiter
   die volle Breite, und die Leiste ist eine Leiste und kein Sammelbecken. */
.nav-reihe {
  display: flex;
  align-items: flex-start;
  padding: 0 14px;
}

.nav-gruppen {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  /* EINE ZEILE, IMMER (Ansage Corvin 25.09.: "dass der header nie in der zeile
     verrutscht"). Vorher durfte die Leiste oberhalb von 760 px umbrechen; bei einem halb
     breiten Fenster stand die zweite Gruppe dann eingerueckt in einer eigenen Zeile. Was
     nicht passt, wandert jetzt ins Menue "Mehr" (reiterEinpassen in app.js). */
  flex-wrap: nowrap;
  /* AUF DIE VOLLE BREITE (Ansage Corvin 28.09.: erst "zentrieren", dann "das kann gerne auf
     die Breite gestreckt werden"). Den Platz verteilen die Gruppen unter sich, siehe
     .nav-gruppe; die Gruppe hier behaelt die volle Breite, an ihr misst reiterEinpassen. */
  justify-content: flex-start;
  /* Kein Abstand zwischen den Gruppen: Der Trenner ist der Abstand. */
  min-width: 0;
  /* NICHTS RAGT UEBER DEN RAND. Sonst macht ein Handy-Browser die ganze Seite so breit wie
     die Reiter und zoomt heraus, statt dass "Mehr" greift (gemessen: 776 px Seitenbreite
     auf einem 375-px-Geraet). Das Menue "Mehr" steht deshalb neben dieser Gruppe und
     nicht in ihr, sonst schnitte es sein eigenes Aufklappmenue ab. */
  overflow: hidden;
}

/* Der Trenner gehoert der Gruppe, nicht dem Zwischenraum -- so verschwindet er von
   selbst mit, wenn die Gruppe ausgeblendet wird (siehe gruppenAufraeumen). */
/* JEDER REITER BEKOMMT GLEICH VIEL LUFT. Eine Gruppe waechst im Verhaeltnis zur Zahl ihrer
   Reiter (flex-grow setzt reiterEinpassen), und space-around legt den Zuwachs gleichmaessig
   um jeden Reiter: Zwischen zwei Reitern steht ueberall derselbe Abstand, auch ueber einen
   Trenner hinweg. Die Knoepfe selbst wachsen NICHT mit, sonst liefe der Strich unter dem
   aktiven Reiter ueber die ganze gestreckte Breite. */
.nav-gruppe {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex: 1 1 auto;
}
.nav-gruppe + .nav-gruppe:not([hidden]) {
  margin-left: 6px;
  padding-left: 6px;
  border-left: 1px solid var(--border);
}
/* Ins Menue "Mehr" gewandert. Eine Klasse und nicht hidden: hidden gehoert den Rechten
   (siehe gruppenAufraeumen), und beides darf sich nicht in die Quere kommen. */
.nav-btn.nav-weg,
.nav-gruppe.nav-gruppe--weg { display: none; }

/* Ein Reiter ist eine Beschriftung, kein Angebot: kein Rahmen, keine Flaeche, nur Text.
   Die Hoehe kommt vom Innenabstand, damit der Strich unten Platz hat. */
.nav-btn,
.nav-mehr-knopf {
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  /* Enger als bis zum 25.09. (7 px, 0,86 rem): Die zehn Reiter eines Inhabers brauchen so
     rund 710 statt 839 px und passen ab etwa 790 px Fensterbreite ganz in die Zeile, die
     zwoelf eines Admins bei voller Seitenbreite. Darunter hilft das Menue "Mehr". */
  padding: 16px 5px 14px;
  margin: 0;
  position: relative;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.nav-btn:hover,
.nav-mehr-knopf:hover {
  background: none;
  color: var(--ink);
  transform: none;
  box-shadow: none;
}

/* Der Strich sitzt am unteren Rand der Leiste, nicht unter der Schrift: So liest sich
   die Reihe als Reiterleiste und nicht als unterstrichenes Wort. */
.nav-btn::after,
.nav-mehr-knopf::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: transparent;
  transition: background 0.15s ease;
}

.nav-btn.active,
.nav-mehr-knopf.active { color: var(--ink); font-weight: 600; }
.nav-btn.active::after,
.nav-mehr-knopf.active::after { background: var(--accent); }

/* "Mehr": dieselbe Reiter-Optik mit einem Winkel, davor ein Trenner wie zwischen den
   Gruppen. Liegt der aktive Reiter im Menue, traegt "Mehr" den Strich. */
.nav-mehr {
  flex: none;
  display: flex;
  align-items: center;
  margin-left: 6px;
  padding-left: 6px;
  border-left: 1px solid var(--border);
}
.nav-mehr-knopf { display: inline-flex; align-items: center; gap: 7px; }
.nav .nav-mehr-knopf[aria-expanded="true"] { background: none; color: var(--ink); }
.nav-mehr-pfeil {
  width: 5px;
  height: 5px;
  margin-top: -3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}
.nav-mehr-liste { min-width: 180px; }
.nav-mehr-liste > button.aktuell { color: var(--accent); }

/* Konto und Abmelden im Seitenkopf, neben der Sprachwahl. */
.kopf-konto {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-user {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-weight: 600;
  font-size: 0.85rem;
}

.nav-user-label {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.8125rem;
}

.nav-logout {
  margin-left: 0;
  font-size: 0.8rem;
  padding: 7px 13px;
  color: var(--muted);
}
.nav-logout:hover { color: var(--ink); }

/* Schmale Fenster brauchen keine eigene Regel mehr: Das Menue "Mehr" nimmt auf, was nicht
   passt. Die fruehere Waagerecht-Scrollleiste versteckte Reiter, ohne es zu zeigen. */

/* ── Panel header ── */
.panel-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

h2 {
  margin: 0;
  font-size: 1.3rem;
  color: var(--ink);
}

.help {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.help-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ── Forms ── */
form {
  display: grid;
  gap: 16px;
}

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

/* SATZSCHREIBUNG STATT GESPERRTER GROSSBUCHSTABEN (25.09.). "VORNAME", "PIN (VR-LOGIN)" und
   Co. in 0,82 rem mit Sperrung sind eines der Merkmale generierter Oberflaechen, und sie
   lesen sich schlechter. Die Beschriftung ist jetzt heller als der Hinweistext darunter und
   dunkler als der Inhalt des Feldes.

   align-content start: Ist die Zeile hoeher, weil ein Nachbar einen Hinweis traegt (PIN),
   bleibt das Feld so hoch wie alle anderen, statt mitzuwachsen. */
label {
  display: grid;
  gap: 6px;
  align-content: start;
  font-size: 0.8125rem;
  font-weight: 500;
  color: color-mix(in srgb, var(--ink) 78%, var(--muted));
}


input,
select,
textarea {
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 10px 12px;
  font: inherit;
  background: var(--bg-3);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s;
  /* KEIN FELD WAECHST UEBER SEINEN PLATZ HINAUS (08.10.2026). Eine Auswahl ist von sich aus
     so breit wie ihr laengster Eintrag. Mit einem langen Modulnamen ("Modul 12 - Die
     Krankheiten und der Verdacht ...") schob sich "Modul" im Fragen-Dialog ueber das Feld
     "Kategorie" daneben, und bei den Brillen lief "Zugeordneter Mitarbeiter" aus dem Kasten.
     Lokal fiel es nie auf, weil die Testnamen kurz sind. min-width 0 erlaubt dem Feld, in
     Raster und Zeile zu schrumpfen; max-width haelt es auch dort im Kasten, wo es frei steht.
     Der Text der Auswahl wird dann hinten abgeschnitten, die Liste zeigt ihn weiter ganz. */
  min-width: 0;
  max-width: 100%;
}
select { text-overflow: ellipsis; }

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
}

textarea {
  resize: vertical;
}

/* Auswahlfelder mit demselben gezeichneten Winkel wie der Rest der Oberflaeche statt des
   Systempfeils, der auf jedem Betriebssystem anders aussieht. "html" davor, weil fuenf
   Regeln weiter unten (Rollen, Listen-Werkzeuge, ...) background als Kurzform setzen und
   damit den Winkel loeschten -- bei schon abgeschaltetem Systempfeil bliebe gar keiner. */
html select:not([multiple]) {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M1.8 4.2l4.2 4.2 4.2-4.2' fill='none' stroke='%239aa3b2' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 12px;
}

.full {
  grid-column: 1 / -1;
}

/* ── Buttons ── */
/* DREI MERKMALE WEG (25.09.): Pillenform, blauer Leuchtschein und das Anheben beim
   Drueberfahren. Alle drei tauchen in jeder Aufzaehlung von "vibe-coded" Oberflaechen auf.
   Ein Knopf braucht eine klare Flaeche und eine ruhige Rueckmeldung, keinen Effekt. */
button {
  border: none;
  border-radius: 2px;
  padding: 9px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.25;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  box-shadow: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease,
              filter 0.15s ease, opacity 0.15s;
}

/* Heller statt hoeher. filter statt einer festen Farbe, damit jeder Knopf mit eigenem
   Hintergrund beim Drueberfahren nicht ploetzlich blau wird. */
button:hover {
  filter: brightness(1.08);
}

button:active {
  transform: translateY(0);
}

/* EIN Mass fuer alle Zweitknoepfe: gleiche Hoehe, gleicher Abstand zwischen Symbol und
   Wort, keine Unterstreichung. "Zusehen" ist technisch ein Link und trug deshalb als
   einziger einen Strich darunter -- ein Knopf, der aussieht wie drei verschiedene. */
.button-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: none;
  padding: 5px 12px;
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.button-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.18);
  filter: none;
  transform: none;
  box-shadow: none;
}

/* Ein Knopf, der NUR ein Symbol traegt, wird quadratisch statt schmal-hoch. */
.button-ghost:has(> svg.ikon:only-child) {
  padding: 5px 7px;
  min-width: 30px;
}

.button-ghost > .ikon,
.button-danger > .ikon {
  width: 14px;
  height: 14px;
  margin: 0;
}

.button-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(224, 82, 82, 0.3);
  box-shadow: none;
  padding: 5px 12px;
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
}

.button-danger:hover {
  background: rgba(224, 82, 82, 0.1);
  filter: none;
  transform: none;
  box-shadow: none;
}

/* IN EINER KARTENZEILE LEISE, erst beim Drueberfahren rot. Loeschen ist die seltenste und
   gefaehrlichste Handlung; sie gehoert nicht gleich laut neben Bearbeiten. In einem
   Rueckfrage-Fenster bleibt der Knopf dagegen rot -- dort IST er die Frage. */
.card-actions .button-danger {
  color: var(--muted);
  border-color: transparent;
}

/* In einer Kartenzeile OHNE Rahmen. Die Symbole geben den Knoepfen genug Form; ein Rahmen
   um jeden Handgriff in jeder Zeile macht eine Liste schwer, die ruhig sein soll. */
.card-actions .button-ghost {
  border-color: transparent;
}

.card-actions .button-ghost:hover {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.06);
}

/* -- Menue "Weitere Aktionen" ------------------------------------------------ */

.menue {
  position: relative;
  display: inline-flex;
}

.menue-knopf[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.08);
}

.menue-liste {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 40;
  min-width: 220px;
  padding: 4px;
  display: grid;
  gap: 1px;
  background: var(--bg-2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  /* Ein neutraler Schatten, damit das Menue ueber der Liste schwebt. Kein farbiger Schein. */
  box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.7);
}

.menue-liste > button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: left;
  box-shadow: none;
}

.menue-liste > button:hover {
  background: rgba(255, 255, 255, 0.06);
  filter: none;
}

.menue-liste > button > .ikon {
  width: 15px;
  height: 15px;
  margin: 0;
  color: var(--muted);
}

.menue-liste > .menue-gefahr {
  color: var(--danger);
}

.menue-liste > .menue-gefahr > .ikon {
  color: var(--danger);
}

.menue-liste > .menue-gefahr:hover {
  background: rgba(224, 82, 82, 0.1);
}

/* -- Aufklappteil der Mitarbeiterkarte ------------------------------------ */

/* EINE Art Zwischenueberschrift statt loser grauer Zeilen, die mal mit, mal ohne Abstand
   standen und aussahen wie Fliesstext. */
.details-titel {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink);
  opacity: 0.85;
  margin-top: 6px;
}

.details-text {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--ink);
}

.details-text--leise {
  color: var(--muted);
}

.details-leer {
  margin: 4px 0 2px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted);
}

.card-actions .button-danger:hover {
  color: var(--danger);
  border-color: rgba(224, 82, 82, 0.3);
  background: rgba(224, 82, 82, 0.08);
}

/* ── List + Cards ── */
.list {
  display: grid;
  gap: 10px;
}

.card {
  padding: 16px;
  border-radius: 2px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  display: grid;
  gap: 8px;
}

.card-actions {
  display: flex;
  gap: 8px;
}

.card .title {
  font-weight: 600;
  color: var(--ink);
}

.card .meta {
  color: var(--muted);
  font-size: 0.84rem;
}

/* ── Role badge ── */
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.role-select {
  padding: 5px 10px;
  border-radius: 2px;
}

/* ── Details / Summary ── */
details {
  border-radius: 2px;
}

summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
}

details[open] summary::after {
  content: "–";
}

/* "FORTSCHRITT & DETAILS" STAND MIT 16 PX GROESSER ALS DER NAME DER PERSON (15,2 px),
   gemessen 25.09. -- die Rangfolge war umgedreht. Dazu ein "+" am anderen Ende der Zeile,
   weit weg von dem Wort, das es aufklappt. Jetzt: klein, leise, mit einem Winkel direkt
   davor, der sich beim Oeffnen dreht. Der Winkel ist aus zwei Raendern gezeichnet und
   haengt damit an keiner Schriftart. */
.emp-card > details > summary {
  justify-content: flex-start;
  gap: 8px;
  width: fit-content;
  padding: 4px 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
}

.emp-card > details > summary:hover {
  color: var(--ink);
}

.emp-card > details > summary::after {
  content: none;
}

.emp-card > details > summary::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  margin: 0 2px 0 1px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}

.emp-card > details[open] > summary::before {
  transform: rotate(45deg);
}

.details-body {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

/* ── Stats ── */
/* EINE LISTE, KEINE KAESTCHEN (25.09.). Sechs umrandete Kacheln mit gesperrten
   Grossbuchstaben in einer Karte, die selbst in einer Flaeche liegt: Karte in Karte in
   Karte ist eines der verlaesslichsten Merkmale generierter Oberflaechen. Hier traegt der
   Abstand die Gliederung, eine Linie oben und unten fasst den Block zusammen. */
.stats-grid {
  display: grid;
  gap: 14px 24px;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stat {
  padding: 0;
  border-radius: 0;
  background: none;
  border: none;
  min-width: 0;
}

.stat .label {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
}

.stat .value {
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 3px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* ── Progress bar ── */
.progress-bar {
  height: 6px;
  background: var(--bg-3);
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress-bar span {
  display: block;
  height: 100%;
  /* EINE FARBE, KEIN VERLAUF (Ansage Corvin 25.09.). Blau nach Lila ist das
     wiedererkennbarste Merkmal von Oberflaechen, die eine KI zusammengesetzt hat; es sagt
     ueber den Fortschritt auch nichts, was die Laenge des Balkens nicht schon sagt.
     --accent-2 bleibt als zweite Akzentfarbe bestehen, nur nicht mehr als Verlauf. */
  background: var(--accent);
}

/* ── Fragen-Performance ── */
.qperf { margin-top: 10px; }
.qperf-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.qperf-controls { display: flex; gap: 8px; flex-wrap: wrap; }
.qperf-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 2px; overflow: hidden; }
.qperf-seg button { background: transparent; border: 0; color: var(--muted); font: inherit; font-size: 0.78rem; padding: 5px 11px; cursor: pointer; }
.qperf-seg button + button { border-left: 1px solid var(--border); }
.qperf-seg button:hover { color: var(--ink); background: var(--bg-3); }
.qperf-seg button.active { color: var(--ink); background: var(--bg-3); }

.qp-group { border-top: 1px solid var(--border); padding: 8px 0; }
.qp-group:first-child { border-top: 0; }
.qp-ghead { display: flex; align-items: center; gap: 10px; padding-bottom: 6px; }
.qp-gtitle { flex: 1; min-width: 0; font-weight: 600; color: var(--ink); font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qp-row { display: flex; align-items: center; gap: 10px; padding: 5px 0 5px 12px; border-left: 2px solid var(--border); margin-left: 1px; }
.qp-q { flex: 1; min-width: 0; color: var(--muted); font-size: 0.82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qp-pct { flex: 0 0 auto; width: 42px; text-align: right; font-size: 0.82rem; font-weight: 600; }

.qp-track { display: block; flex: 0 0 auto; width: 110px; height: 6px; border-radius: 2px; background: var(--bg-3); border: 1px solid var(--border); overflow: hidden; }
.qp-fill { display: block; height: 100%; border-radius: 2px; }

.qp-ok { color: #4fbf7a; }
.qp-warn { color: #e0b040; }
.qp-bad { color: #ec6a6a; }
.qp-bg-ok { background: #2d8a4e; }
.qp-bg-warn { background: #cf9a2f; }
.qp-bg-bad { background: var(--danger); }

.qp-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.qp-tile { padding: 9px 11px; border-radius: 2px; border: 1px solid var(--border); min-width: 0; }
.qp-tile-pct { font-size: 1.15rem; font-weight: 700; }
.qp-tile-sub { font-size: 0.72rem; opacity: 0.9; margin: 1px 0 5px; }
.qp-tile-q { font-size: 0.76rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qp-tile-ok { background: rgba(45, 138, 78, 0.13); border-color: rgba(45, 138, 78, 0.38); }
.qp-tile-ok .qp-tile-pct, .qp-tile-ok .qp-tile-sub { color: #4fbf7a; }
.qp-tile-warn { background: rgba(207, 154, 47, 0.13); border-color: rgba(207, 154, 47, 0.38); }
.qp-tile-warn .qp-tile-pct, .qp-tile-warn .qp-tile-sub { color: #e0b040; }
.qp-tile-bad { background: rgba(224, 82, 82, 0.13); border-color: rgba(224, 82, 82, 0.38); }
.qp-tile-bad .qp-tile-pct, .qp-tile-bad .qp-tile-sub { color: #ec6a6a; }

/* ── 3D-Modell-Galerie + Inline-Vorschau ── */
.mv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.mv-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: 2px; overflow: hidden; display: flex; flex-direction: column; }
.mv-card model-viewer { width: 100%; height: 220px; background: radial-gradient(circle at 50% 38%, #202329, #121317); }
.mv-meta { padding: 10px 12px; border-top: 1px solid var(--border); }
.mv-label { font-size: 0.9rem; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.mv-kind { display: inline-block; margin-top: 5px; font-size: 0.8125rem; color: var(--muted); border: 1px solid var(--border); border-radius: 2px; padding: 2px 8px; }
/* "Öffnen" führt in dieselbe Detailansicht wie im Antwort-Editor: Größe in cm,
   Ausrichtung, bedienbar. Rechtsbündig unter dem Namen, damit es die Karte nicht dominiert. */
.mv-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.mv-meta .mv-label { flex: 1 1 100%; }
.mv-open { margin-left: auto; font-size: 0.78rem; padding: 4px 10px; }
.answer-model-cell { width: 76px; height: 76px; flex: 0 0 auto; border: 1px solid var(--border); border-radius: 2px; background: #14161a; overflow: hidden; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: border-color 0.12s; }
.answer-model-cell:hover { border-color: var(--accent); }
.answer-model-preview { width: 100%; height: 100%; pointer-events: none; }
.answer-model-add { color: var(--muted); font-size: 0.8rem; font-weight: 600; }
.answer-model-cell:hover .answer-model-add { color: var(--accent); }
model-viewer.lesson-thumb-media { width: 100%; height: 100%; background: #14161a; display: block; }

/* 3D-Objekt-Lightbox (grosse Ansicht einer Antwort-Option) */
.mv-lightbox-back { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.66); display: flex; align-items: center; justify-content: center; z-index: 3000; padding: 24px; }
.mv-lightbox { background: var(--bg-2); border: 1px solid var(--border); border-radius: 2px; width: min(680px, 96vw); max-height: 92vh; display: flex; flex-direction: column; overflow: hidden; }
.mv-lightbox-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.mv-lightbox-title { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv-lightbox-x { background: transparent; border: 0; color: var(--muted); font-size: 1.4rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.mv-lightbox-x:hover { color: var(--ink); }
.mv-lightbox-view { width: 100%; height: 46vh; background: radial-gradient(circle at 50% 40%, #202329, #121317); }
.mv-lightbox-empty { height: 40vh; display: flex; align-items: center; justify-content: center; color: var(--muted); padding: 24px; text-align: center; }
.mv-lightbox-actions { display: flex; gap: 10px; flex-wrap: wrap; padding: 14px 16px; border-top: 1px solid var(--border); }
.mv-lightbox-actions button { background: var(--bg-3); border: 1px solid var(--border); color: var(--ink); border-radius: 2px; padding: 8px 14px; font: inherit; font-size: 0.9rem; cursor: pointer; }
.mv-lightbox-actions button:hover { border-color: var(--accent); }
.mv-lightbox-actions button.button-danger { color: #ec6a6a; }
.mv-lightbox-settings { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--border); }
.mv-size-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.85rem; }
.mv-size-label .mv-size { width: 90px; padding: 6px 8px; background: var(--bg-3); border: 1px solid var(--border); border-radius: 2px; color: var(--ink); font: inherit; font-size: 0.85rem; }
.mv-check { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.85rem; cursor: pointer; }
.mv-save { background: var(--accent); border: 0; color: #fff; border-radius: 2px; padding: 7px 14px; font: inherit; font-size: 0.85rem; cursor: pointer; }
.mv-save:hover { filter: brightness(1.08); }
.mv-save-note { font-size: 0.8rem; color: var(--muted); }

/* Auswahl aus den vorhandenen Objekten. Sie sitzt IM Objekt-Fenster (dort, wo sonst die
   3D-Ansicht steht), das Fenster geht dafuer auf Galeriebreite auf. */
.mv-lightbox.zeigt-auswahl { width: min(980px, 96vw); }
.mv-auswahl { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
/* Zurueck steht links VOR dem Titel: derselbe Platz, an dem man es in jeder Ansicht sucht. */
.mv-zurueck { background: var(--bg-3); border: 1px solid var(--border); color: var(--ink); border-radius: 2px; padding: 5px 12px; font: inherit; font-size: 0.85rem; cursor: pointer; flex: 0 0 auto; }
.mv-zurueck:hover { border-color: var(--accent); }
.mv-lightbox-head .mv-lightbox-title { flex: 1 1 auto; }
.mv-picker-such { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--border); flex: 0 0 auto; }
.mv-picker-feld { flex: 1 1 220px; padding: 7px 10px; background: var(--bg-3); border: 1px solid var(--border); border-radius: 2px; color: var(--ink); font: inherit; font-size: 0.9rem; }
.mv-picker-feld:focus { outline: none; border-color: var(--accent); }
.mv-picker-bezug { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46%; }
.mv-picker-zahl { margin-left: auto; }
/* grid-auto-rows: max-content ist Pflicht, nicht Geschmack: Die Karten haben overflow:hidden
   (fuer die runden Ecken), und das setzt ihre automatische Mindesthoehe auf null. Ohne feste
   Zeilenhoehe teilen sich die Zeilen dann den vorhandenen Platz, statt zu scrollen — bei 24
   Objekten wurde jede Karte auf 125 statt 205 px gequetscht und schnitt ihren Inhalt ab. */
.mv-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-auto-rows: max-content; align-content: start; gap: 12px; padding: 14px 16px; overflow-y: auto; min-height: 0; }
.mv-pick-karte { display: flex; flex-direction: column; padding: 0 0 8px; background: var(--bg-3); border: 1px solid var(--border); border-radius: 2px; overflow: hidden; cursor: pointer; font: inherit; text-align: left; transition: border-color 0.12s, transform 0.12s; }
.mv-pick-karte:hover { border-color: var(--accent); transform: translateY(-2px); }
/* flex: 0 0 auto ueberall: Im Raster sind alle Karten gleich hoch, und ohne das staucht Flex
   den Namen so weit zusammen, dass die Unterlaengen abgeschnitten werden. */
.mv-pick-karte model-viewer { width: 100%; height: 130px; flex: 0 0 auto; background: radial-gradient(circle at 50% 38%, #202329, #121317); pointer-events: none; }
/* Immer zwei Zeilen hoch (2.7em Text + 12px Innenabstand), damit die Marken darunter in
   allen Karten auf derselben Linie sitzen, egal ob der Name ein- oder zweizeilig ist. */
.mv-pick-name { flex: 0 0 auto; padding: 8px 10px 4px; font-size: 0.82rem; line-height: 1.35; min-height: calc(2.7em + 12px); color: var(--ink); font-weight: 600; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mv-pick-tags { flex: 0 0 auto; padding: 0 10px; display: flex; flex-wrap: wrap; gap: 4px; }
.mv-pick-tags .mv-kind { margin-top: 0; }
/* Der wahrscheinlichste Treffer soll sich nicht nur oben, sondern auch sichtbar abheben. */
.mv-pick-karte.passt { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
.mv-pick-karte.ist-aktuell { border-color: var(--accent); }
.mv-kind-aktuell { color: var(--accent); border-color: var(--accent); }

/* Bild mit KI erzeugen. Steht NEBEN der Ablageflaeche, nicht an ihrer Stelle: Ein echtes
   Foto aus der Filiale ist weiterhin die bessere Quelle, wo es eines gibt. */
.bild-ki-knopf { margin-top: 8px; font-size: 0.82rem; padding: 5px 12px; }
.bild-ki { width: min(620px, 96vw); }
.bild-ki-body { padding: 14px 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.bild-ki-text { width: 100%; padding: 8px 10px; background: var(--bg-3); border: 1px solid var(--border); border-radius: 2px; color: var(--ink); font: inherit; font-size: 0.9rem; resize: vertical; }
.bild-ki-text:focus { outline: none; border-color: var(--accent); }
.bild-ki-zeile { display: flex; gap: 14px; flex-wrap: wrap; }
.bild-ki-zeile .form-label { display: flex; flex-direction: column; gap: 4px; font-size: 0.82rem; }
.bild-ki-zeile select { padding: 6px 8px; background: var(--bg-3); border: 1px solid var(--border); border-radius: 2px; color: var(--ink); font: inherit; font-size: 0.85rem; }
.bild-ki-vorschau img { width: 100%; max-height: 46vh; object-fit: contain; border-radius: 2px; border: 1px solid var(--border); background: #14161a; }
.bild-ki-hinweis { min-height: 1.2em; }

/* ── Modal ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 100;
  backdrop-filter: blur(4px);
}

.modal {
  width: min(680px, 100%);
  max-height: 90vh;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 24px;
  box-shadow: 0 32px 80px -20px var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
}

.modal-body {
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  flex: 1;
  min-height: 0;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Ein ruhiges Symbol statt eines umrandeten Kreises mit einem Schriftzeichen darin. */
.modal-close {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 2px;
  border-color: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { color: var(--ink); }
.modal-close > .ikon { width: 16px; height: 16px; }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Eine Linie trennt die Knoepfe vom Formular: Man sieht, wo die Eingaben aufhoeren. */
.modal-form > .modal-actions {
  margin-top: 2px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ── Dropdown ── */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 10px 12px;
  background: var(--bg-3);
  color: var(--ink);
  font: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  box-shadow: none;
}

.dropdown-toggle:hover {
  transform: none;
  box-shadow: none;
  background: var(--bg-3);
}

/* Derselbe Winkel wie an den Auswahlfeldern, gezeichnet statt als Schriftzeichen. */
.dropdown-toggle::after {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  margin: -3px 3px 0 0;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
}

.dropdown-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 2px;
  box-shadow: 0 16px 40px -10px var(--shadow);
  padding: 8px;
  display: grid;
  /* KEINE LUECKE zwischen den Zeilen (bis 11.10. vier Bildpunkte): Ein Klick dorthin traf
     keine Zeile, und die Liste ging zu, statt eine Abteilung anzukreuzen. Der Abstand steckt
     jetzt in den Zeilen selbst, jede Hoehe zwischen der ersten und der letzten gehoert einer. */
  gap: 0;
  max-height: 220px;
  overflow: auto;
  z-index: 20;
}

.dropdown-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 2px;
  cursor: pointer;
  color: var(--ink);
  font-size: 0.9rem;
  /* Das Wort laesst sich nicht markieren: Wer beim Klicken die Maus ein paar Bildpunkte
     bewegt, markiert sonst Text, und einen solchen Klick reicht der Browser nicht an das
     Kaestchen weiter. Es geschah dann nichts. */
  user-select: none;
  -webkit-user-select: none;
}

.dropdown-option input {
  accent-color: var(--accent);
}

.dropdown-option:hover {
  background: var(--border);
}

/* ── ID line ── */
/* Die Nummer als schlichte Zeile unter dem Titel statt als Pille (25.09.). */
.id-preview {
  font-weight: 500;
  color: var(--ink);
}

/* KEIN negativer Abstand nach oben: Die Zeile ist das erste Element im scrollbaren
   Dialogbereich, und der schneidet ab, was ueber seinen oberen Rand ragt (25.09.: mit
   -8 px fehlte die obere Haelfte der Nummer). */
.id-line {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--muted);
  font-size: 0.8125rem;
}

.id-label::after {
  content: ":";
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ── Animations ── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (max-width: 720px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-actions {
    align-self: stretch;
    align-items: flex-start;
  }
}

/* ── Login Tabs ── */
.login-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 1.25rem;
  background: var(--bg-3);
  border-radius: 2px;
  padding: 4px;
}

.login-tabs .tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0.45rem 1rem;
  border-radius: 2px;
  cursor: pointer;
  font: inherit;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.85rem;
  box-shadow: none;
  transition: background 0.15s, color 0.15s;
}

.login-tabs .tab-btn:hover {
  transform: none;
  box-shadow: none;
  color: var(--ink);
}

.login-tabs .tab-btn.active {
  color: var(--ink);
  background: var(--bg-2);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* ── Role Tags ── */
.role-tag {
  display: inline-block;
  border-radius: 2px;
  padding: 0.12rem 0.45rem;
  font-size: 0.8125rem;
  font-weight: 700;
  vertical-align: middle;
}

.role-tag.inhaber        { background: rgba(211, 178, 100,0.15); color: var(--accent); }
.role-tag.manager        { background: rgba(255, 255, 255, 0.08); color: var(--accent-2); }
.role-tag.content_creator { background: rgba(52,211,153,0.15); color: #34d399; }

/* ── Roles Panel ── */
.roles-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
}

.roles-row:last-child { border-bottom: none; }

/* Was die Rollen duerfen (29.09.): Vergleichstabelle im Fragezeichen-Tooltip an der
   Ueberschrift, ein Haken je Rolle. */
/* Zwei Klassen, damit die Regel die allgemeine .tooltip-text (weiter unten, 240 px) schlaegt. */
.tooltip-wrap .tooltip-text.tooltip-text--breit {
  width: 560px;
  max-width: calc(100vw - 32px);
  padding: 12px 14px;
  /* Am Fragezeichen beginnen und nach rechts in den Reiter laufen, statt sich darunter zu
     zentrieren und links ueber den Rand zu haengen. Den Versatz setzt weiter app.js. */
  left: 0;
  transform: translateX(var(--tt-versatz, 0px));
}
.tooltip-text--breit > strong { display: block; font-weight: 600; }
.rollen-matrix { width: 100%; margin-top: 8px; border-collapse: collapse; font-size: 0.8125rem; }
.rollen-matrix th, .rollen-matrix td { padding: 7px 10px; border-top: 1px solid var(--border); text-align: center; vertical-align: middle; }
.rollen-matrix thead th { border-top: 0; padding-top: 0; font-weight: 600; color: var(--ink); }
.rollen-matrix tbody th { text-align: left; font-weight: 400; color: var(--ink); width: 60%; }
.rollen-matrix td { color: var(--muted); }
.rm-ja { display: inline-flex; color: #6ee7a8; }
.rm-ja .ikon { width: 16px; height: 16px; }
.rm-nein { opacity: 0.45; }
.rm-text { color: var(--ink); font-size: 0.78rem; white-space: nowrap; }
.rollen-info-haken { display: block; margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.78rem; line-height: 1.45; }
@media (max-width: 560px) {
  .rollen-matrix tbody th { width: auto; }
  .rollen-matrix th, .rollen-matrix td { padding: 6px 4px; }
}
.roles-row .name { flex: 1; font-weight: 600; }
.roles-row .sub  { font-size: 0.8rem; color: var(--muted); }

.roles-row select {
  font: inherit;
  font-size: 0.85rem;
  padding: 0.3rem 0.6rem;
  border-radius: 2px;
  border: 1px solid var(--border);
  background: var(--bg-3);
  color: var(--ink);
}

/* ── Tag Picker ── */
.tag-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--bg-3);
  padding: 12px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 32px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 12px;
  border-radius: 2px;
  background: var(--accent);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 500;
}

.tag-chip-remove {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 2px;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
}

.tag-chip-remove:hover {
  color: #fff;
  transform: none;
  box-shadow: none;
}

.tag-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.tag-input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 8px 10px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  outline: none;
}

.tag-input:focus {
  border-color: var(--accent);
}

.tag-add-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 2px;
  font-size: 1.3rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.tag-hint {
  font-size: 0.8rem;
  min-height: 1.1em;
  color: var(--muted);
  transition: color 0.15s;
}

.tag-hint[data-state="ok"] {
  color: #4ade80;
}

.tag-hint[data-state="warn"] {
  color: #f87171;
}

.tag-hint[data-state="muted"] {
  color: var(--muted);
}

/* ── Modal form layout ── */
.modal-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Mitarbeiter-Dialog: zwei gleich breite Spalten statt "so viele wie passen". Mit dem
   automatischen Raster stand die PIN neben Vor- und Nachname, die Sprache allein in einer
   Zeile, und die Namensfelder wurden so hoch wie die PIN mitsamt Hinweis (25.09.). */
.mitarbeiter-raster {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 560px) {
  .mitarbeiter-raster { grid-template-columns: minmax(0, 1fr); }
}

/* ── Answer Builder ── */
.answer-builder {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--bg-3);
  padding: 12px;
}

.answer-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.answer-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.answer-correct-label {
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.answer-correct-radio {
  width: 18px;
  height: 18px;
  accent-color: #4ade80;
  cursor: pointer;
}

.answer-text {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 8px 10px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  outline: none;
}

.answer-text:focus {
  border-color: var(--accent);
}

.answer-remove-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 2px;
  box-shadow: none;
}

.answer-remove-btn:hover {
  color: #f87171;
  transform: none;
  box-shadow: none;
  background: rgba(248, 113, 113, 0.1);
}

.answer-add-btn {
  width: 100%;
  margin-top: 4px;
  padding: 8px;
  border: 1px dashed var(--border);
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  text-align: center;
  box-shadow: none;
  transition: border-color 0.15s, color 0.15s;
}

.answer-add-btn:hover {
  border-color: var(--accent);
  color: var(--ink);
  transform: none;
  box-shadow: none;
  background: transparent;
}

.multi-select-toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  margin-bottom: 4px;
}
.multi-select-toggle-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.answer-model-btn {
  flex-shrink: 0;
  background: none;
  border: 1px dashed var(--border);
  border-radius: 2px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  padding: 5px 7px;
  box-shadow: none;
  transition: border-color 0.15s, color 0.15s;
  letter-spacing: 0.04em;
}
.answer-model-btn:hover {
  border-color: var(--accent);
  color: var(--ink);
  transform: none;
  box-shadow: none;
}
.answer-model-btn--active {
  border-color: #4ade80;
  color: #4ade80;
}
.answer-model-btn.dragover {
  border-style: solid;
  border-color: var(--accent);
  color: var(--ink);
  background: rgba(45, 138, 78, 0.14);
  box-shadow: 0 0 0 3px rgba(45, 138, 78, 0.22);
}
.answer-model-btn.dragover * { pointer-events: none; }

/* ── Ausrichtung je 3D-Objekt (Lightbox) ── */
.mv-rot { margin: 10px 16px 0; padding-top: 10px; border-top: 1px solid var(--border); }
.mv-rot > summary { cursor: pointer; list-style: revert; }
.mv-rot-head { font-size: 0.8rem; color: var(--text-muted, #9aa4b2); margin-bottom: 8px; }
.mv-rot-rows { margin-top: 8px; }
.mv-rot-rows { display: flex; flex-direction: column; gap: 8px; }
.mv-rot-row { display: flex; align-items: center; gap: 8px; }
.mv-rot-name { flex: 0 0 90px; font-size: 0.85rem; }
.mv-rot-slider { flex: 1 1 auto; min-width: 80px; }
.mv-rot-step {
  flex: 0 0 auto; padding: 2px 8px; font-size: 0.8rem; line-height: 1.6;
  border: 1px solid var(--border); border-radius: 2px; background: #1b1f26; color: inherit; cursor: pointer;
}
.mv-rot-step:hover { border-color: var(--accent); }
.mv-rot-val { flex: 0 0 44px; text-align: right; font-variant-numeric: tabular-nums; font-size: 0.85rem; }
.mv-rot-reset {
  margin-top: 8px; padding: 3px 10px; font-size: 0.8rem;
  border: 1px solid var(--border); border-radius: 2px; background: transparent; color: inherit; cursor: pointer;
}
.mv-rot-reset:hover { border-color: var(--accent); }

/* ── Maschinen-Ansicht ─────────────────────────────────────────────────────── */

/* Ein Objekt, an dem nur Groesse und Drehung eingestellt werden, kommt mit einer Spalte aus.
   Eine Maschine nicht: Dort will man beim Setzen der Punkte das Objekt im Blick behalten,
   waehrend rechts die Liste waechst. Deshalb wird der Dialog dann breiter und zweispaltig. */
.mv-lightbox.mv-breit { width: min(1020px, 96vw); }
.mv-lightbox-body { display: flex; flex-direction: column; overflow-y: auto; }
.mv-spalte-links { position: relative; flex: 0 0 auto; }
.mv-spalte-rechts { min-width: 0; }

@media (min-width: 900px) {
  .mv-lightbox.mv-breit .mv-lightbox-body {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start;
  }
  /* Die Ansicht bleibt stehen, waehrend rechts gescrollt wird — sonst zielt man auf ein
     Objekt, das beim Blaettern aus dem Bild laeuft. */
  .mv-lightbox.mv-breit .mv-spalte-links { position: sticky; top: 0; }
  .mv-lightbox.mv-breit .mv-lightbox-view { height: 66vh; }
}

/* Der Hinweis liegt ueber der Ansicht, dort wo der naechste Klick hin soll. */
.mv-pick-hinweis {
  position: absolute; inset-inline: 12px; bottom: 12px;
  background: rgba(20, 22, 26, 0.88); border: 1px solid var(--accent, #4b8bf4);
  border-radius: 2px; padding: 8px 12px; text-align: center;
  font-size: 0.85rem; color: var(--ink); pointer-events: none;
}

.mv-hs { padding: 4px 16px 14px; }
.mv-hs-abschnitt { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.mv-hs-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 0.8rem; color: var(--text-muted, #9aa4b2); margin-bottom: 10px;
}
/* Die Entscheidung steht fuer sich, nicht in einer Reihe mit den Einstellknoepfen. */
.mv-hs-entscheidung { display: flex; gap: 10px; flex-wrap: wrap; }
.mv-hs-entscheidung:empty { display: none; }
.mv-hs-check { font-size: 0.85rem; border-radius: 2px; padding: 8px 10px; margin-bottom: 10px; }
.mv-hs-check.ok { background: rgba(60, 170, 110, 0.14); color: #7ede9f; }
.mv-hs-check.warn { background: rgba(230, 120, 90, 0.14); color: #f0a58c; }
/* Mechanisch in Ordnung, aber der Ball liegt bei Corvin: eigener Ton, weder Fehler noch fertig. */
.mv-hs-check.pending { background: rgba(230, 190, 90, 0.14); color: #e8cf87; }
.mv-hs-check ul { margin: 6px 0 6px 18px; padding: 0; }
.mv-hs-check code, .mv-machine-points code { background: rgba(255, 255, 255, 0.08); border-radius: 2px; padding: 1px 5px; }
.mv-hs-empty { color: var(--muted); font-size: 0.85rem; margin: 0 0 8px; }

/* Eine Zeile je Bedienpunkt. Als Raster statt als Flex-Reihe: So stehen Name, Animation und
   Bedienart untereinander bündig, und beim Schrumpfen bricht die Zeile geordnet um, statt die
   Felder auf Briefmarkengroesse zu quetschen. */
.mv-hs-row {
  display: grid; gap: 6px; margin-bottom: 8px; align-items: center;
  grid-template-columns: 22px minmax(0, 1fr) auto auto;
  grid-template-areas: "num label play del" "num clip kind kind";
}
.mv-hs-num { grid-area: num; align-self: start; }
.mv-hs-label { grid-area: label; }
.mv-hs-clip { grid-area: clip; }
.mv-hs-kind { grid-area: kind; }
.mv-hs-play { grid-area: play; }
.mv-hs-del { grid-area: del; }
@media (min-width: 620px) {
  .mv-lightbox:not(.mv-breit) .mv-hs-row {
    grid-template-columns: 22px minmax(0, 1.1fr) minmax(0, 1.2fr) minmax(0, 1.2fr) auto auto;
    grid-template-areas: "num label clip kind play del";
  }
}
.mv-hs-num {
  flex: 0 0 22px; height: 22px; line-height: 22px; text-align: center; border-radius: 50%;
  background: var(--accent, #4b8bf4); color: #fff; font-size: 0.75rem; font-weight: 600;
}
.mv-hs-row input, .mv-hs-row select {
  background: var(--bg-3); border: 1px solid var(--border); border-radius: 2px;
  color: var(--ink); font: inherit; font-size: 0.82rem; padding: 5px 7px; min-width: 0;
}
.mv-hs-label { flex: 1 1 120px; }
.mv-hs-clip, .mv-hs-kind { flex: 1 1 130px; }
.mv-hs-play, .mv-hs-del {
  flex: 0 0 auto; background: var(--bg-3); border: 1px solid var(--border); border-radius: 2px;
  color: var(--ink); font: inherit; font-size: 0.82rem; padding: 5px 9px; cursor: pointer;
}
.mv-hs-play:hover { border-color: var(--accent); }
.mv-hs-del:hover { border-color: #ec6a6a; color: #ec6a6a; }
.mv-hs-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
/* Der Setz-Modus bleibt an, solange man Punkte setzt — der Knopf zeigt das. */
.mv-hs-add-an { background: rgba(75, 139, 244, 0.22); border-color: var(--accent, #4b8bf4); }
.mv-hs-add, .mv-hs-replace, .mv-hs-approve, .mv-hs-reject {
  background: var(--bg-3); border: 1px solid var(--border); border-radius: 2px; color: var(--ink);
  font: inherit; font-size: 0.85rem; padding: 7px 12px; cursor: pointer;
}
.mv-hs-add:hover, .mv-hs-replace:hover, .mv-hs-approve:hover, .mv-hs-reject:hover { border-color: var(--accent); }
.mv-hs-reject:hover { border-color: #e8896b; color: #f0a58c; }
/* Fehlt der Text, springt das Feld an — abschicken ohne Ansage waere sinnlos. */
.mv-hs-brief-fehlt { border-color: #e8896b; }
/* Die Abnahme ist die Entscheidung auf dieser Seite und darf danach aussehen. */
.mv-hs-approve-on { background: rgba(60, 170, 110, 0.22); border-color: #3caa6e; color: #9ff0bd; }
.mv-hs-note { font-size: 0.82rem; color: var(--muted); margin: 12px 0 0; min-height: 1.2em; }
.mv-hs-brief-label { display: block; margin-top: 10px; font-size: 0.8rem; color: var(--muted); }
.mv-hs-brief {
  display: block; width: 100%; margin-top: 4px; background: var(--bg-3); border: 1px solid var(--border);
  border-radius: 2px; color: var(--ink); font: inherit; font-size: 0.85rem; padding: 7px 9px; resize: vertical;
}
.mv-hs-guide { margin-top: 10px; font-size: 0.82rem; color: var(--muted); }
.mv-hs-guide summary { cursor: pointer; color: var(--ink); }
.mv-hs-guide ol { margin: 8px 0 8px 18px; padding: 0; }
.mv-hs-guide li { margin-bottom: 4px; }

/* Zielkreuz beim Setzen: der naechste Klick landet auf dem Objekt, nicht auf der Ansicht. */
model-viewer.mv-picking { cursor: crosshair; }
.mv-hot {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; background: var(--accent, #4b8bf4);
  color: #fff; font-size: 0.72rem; font-weight: 700; line-height: 1; cursor: pointer; padding: 0;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35);
}
.mv-hot:hover { background: #fff; color: var(--accent, #4b8bf4); }

/* Hinweis nach dem Anmelden. Nur sichtbar, wenn wirklich etwas ansteht. */
.notice {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: rgba(230, 190, 90, 0.14); border: 1px solid rgba(230, 190, 90, 0.35);
  border-radius: 2px; padding: 12px 16px; margin-bottom: 14px; color: #e8cf87;
}
.notice button {
  background: transparent; border: 1px solid currentColor; border-radius: 2px;
  color: inherit; font: inherit; font-size: 0.85rem; padding: 5px 12px; cursor: pointer;
}

/* ── Maschinen-Arbeitsliste (Designer-Ansicht) ─────────────────────────────── */
.mv-tabs { display: flex; gap: 6px; margin-left: auto; }
.mv-tabs button {
  background: var(--bg-3); border: 1px solid var(--border); border-radius: 2px; color: var(--muted);
  font: inherit; font-size: 0.85rem; padding: 6px 12px; cursor: pointer;
}
.mv-tabs button.active { color: var(--ink); border-color: var(--accent); }
.mv-machines { display: flex; flex-direction: column; gap: 12px; }
.mv-machine {
  display: flex; gap: 14px; background: var(--bg-2); border: 1px solid var(--border);
  border-left: 3px solid #e6785a; border-radius: 2px; padding: 12px; align-items: flex-start;
}
.mv-machine.ready { border-left-color: #3caa6e; }
.mv-machine.pending { border-left-color: #e0be5a; }
.mv-machine.pending .mv-machine-state { color: #e8cf87; }
.mv-machine model-viewer {
  flex: 0 0 180px; width: 180px; height: 150px; border-radius: 2px;
  background: radial-gradient(circle at 50% 40%, #202329, #121317);
}
.mv-machine-body { flex: 1 1 auto; min-width: 0; }
.mv-machine-state { font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; }
.mv-machine.ready .mv-machine-state { color: #7ede9f; }
.mv-machine:not(.ready):not(.pending) .mv-machine-state { color: #f0a58c; }
.mv-machine-note { font-size: 0.85rem; color: var(--ink); margin: 0 0 8px; }
.mv-machine-points, .mv-machine-problems { margin: 0 0 8px 18px; padding: 0; font-size: 0.82rem; }
.mv-machine-points li { margin-bottom: 3px; }
.mv-machine-problems li { color: #f0a58c; }
.mv-machine-open {
  background: var(--bg-3); border: 1px solid var(--border); border-radius: 2px; color: var(--ink);
  font: inherit; font-size: 0.85rem; padding: 6px 12px; cursor: pointer;
}
.mv-machine-open:hover { border-color: var(--accent); }
/* Knopfzeile der Maschinenkarte. Umbrechen statt schrumpfen: Auf schmalen Fenstern soll der
   Loeschknopf unter die anderen rutschen und nicht zu einem Rest zusammengedrueckt werden,
   den man versehentlich trifft. */
.mv-machine-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
/* Der gefaehrliche Knopf steht bewusst am Ende der Zeile, mit Abstand zu den harmlosen. */
.mv-machine-actions .mv-machine-delete { margin-left: auto; }

.upload-drop--model {
  min-height: 60px;
  flex-direction: row;
  gap: 10px;
  cursor: pointer;
  align-items: center;
}
.upload-drop--model:hover { border-color: var(--accent); }
.model-filename {
  font-size: 0.8rem;
  color: #4ade80;
  word-break: break-all;
}
/* Rotierende 3D-Vorschau im Modell-Feld (wie bei den Antwort-Objekten). Nur sichtbar,
   wenn ein Modell gesetzt ist; das gesamte Feld oeffnet beim Klick die grosse Ansicht. */
.model-drop-preview { flex: 0 0 auto; width: 0; height: 0; overflow: hidden; }
.upload-drop--model.has-model .model-drop-preview {
  width: 64px; height: 64px; border-radius: 2px; overflow: hidden; background: #14161a;
}
.model-drop-preview model-viewer { width: 100%; height: 100%; pointer-events: none; }
.upload-drop--model.has-model .upload-hint { display: none; }

/* ── KI-Modellgenerierung (Meshy) ── */
.ai-gen-btn {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  background: linear-gradient(120deg, rgba(211, 178, 100, 0.18), rgba(167, 139, 250, 0.18));
  border: 1px solid var(--border);
  border-radius: 2px;
  cursor: pointer;
  box-shadow: none;
  transition: border-color 0.15s, background 0.15s;
}
.ai-gen-btn:hover { border-color: var(--accent); background: linear-gradient(120deg, rgba(211, 178, 100, 0.28), rgba(167, 139, 250, 0.28)); transform: none; box-shadow: none; }
.ai-gen-btn--compact {
  margin-top: 0;
  margin-left: 4px;
  padding: 6px 8px;
  font-size: 0.85rem;
}

.ai-modal-overlay {
  position: fixed;
  inset: 0;
  /* Ueber der Objekt-Ansicht (.mv-lightbox-back, 3000). Die Stellen, von denen aus das
     KI-Fenster geoeffnet wird, schliessen ihre Ansicht zwar vorher — aber wenn das eine
     kuenftig jemand vergisst, steht das Fenster trotzdem vorne statt unerreichbar dahinter. */
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
}
.ai-modal {
  width: min(520px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 2px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.ai-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.ai-modal-head h3 { margin: 0; font-size: 1.05rem; }
.ai-modal-close {
  border: none;
  background: none;
  box-shadow: none;
  padding: 0 6px;
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
}
.ai-modal-close:hover { opacity: 1; transform: none; box-shadow: none; background: none; }
.ai-modal-tabs {
  display: flex;
  gap: 8px;
  padding: 14px 20px 0;
}
.ai-tab {
  flex: 1;
  padding: 9px 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 2px;
  box-shadow: none;
  cursor: pointer;
}
.ai-tab:hover { transform: none; box-shadow: none; }
.ai-tab--active { border-color: var(--accent); background: rgba(211, 178, 100, 0.16); }
.ai-tab:disabled { opacity: 0.4; cursor: not-allowed; }
.ai-modal-body { padding: 16px 20px; display: flex; flex-direction: column; gap: 6px; }
.ai-modal-body textarea, .ai-modal-body input[type="file"] {
  width: 100%;
  margin-top: 4px;
  padding: 9px 11px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--ink);
  font-size: 0.9rem;
}
.ai-check { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 0.85rem; cursor: pointer; }
.ai-hint { margin-top: 4px; }
.ai-progress { margin-top: 12px; }
.ai-progress-bar {
  height: 8px;
  background: var(--bg-3);
  border-radius: 2px;
  overflow: hidden;
}
.ai-progress-fill {
  height: 100%;
  width: 5%;
  background: var(--accent);
  transition: width 0.4s ease;
}
.ai-progress-text { margin: 6px 0 0; }
.ai-error { margin: 10px 0 0; color: #f87171; font-size: 0.85rem; }

/* Schwebendes Widget unten rechts: alle laufenden KI-Generierungen */
#ai-jobs-widget {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 900;
  width: min(340px, calc(100vw - 36px));
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--bg-2);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}
#ai-jobs-widget .ai-jobs-head {
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 8px;
}
#ai-jobs-widget .ai-jobs-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px 42px;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}
#ai-jobs-widget .ai-jobs-label {
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#ai-jobs-widget .ai-jobs-pct {
  font-size: 0.75rem;
  color: var(--text-2, #9ca3af);
  text-align: right;
}
.ai-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--border);
}

/* ── Toggle Label (Shuffle etc.) ── */
.toggle-label {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--bg-3);
}

.toggle-label-content {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  font-size: 0.88rem;
  color: var(--ink);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

/* ── Exam unlock (per employee) ── */
.exam-unlock-section { margin: 12px 0 4px; }
.exam-unlock-header { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.exam-unlock-list { display: flex; flex-direction: column; gap: 6px; padding: 4px 0; }
.exam-unlock-item { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; cursor: pointer; padding: 3px 0; }
.exam-unlock-item input[type="checkbox"] { width: 15px; height: 15px; cursor: pointer; accent-color: #2d8a4e; flex-shrink: 0; }
.exam-unlock-name { flex: 1 1 auto; }
.exam-threshold { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; color: var(--muted); font-size: 0.82rem; }
.exam-threshold-input { width: 52px; padding: 3px 6px; font-size: 0.85rem; text-align: right; border: 1px solid var(--border, #d0d4da); border-radius: 2px; background: var(--input-bg, #fff); color: inherit; }
.exam-threshold-input:disabled { opacity: 0.4; cursor: not-allowed; }
.exam-threshold-input::placeholder { color: var(--muted); opacity: 0.7; }
.exam-unlock-empty { color: var(--muted); font-size: 0.85rem; font-style: italic; }
.label-with-tip { display: flex; align-items: center; gap: 4px; }

/* ── Tooltip ── */
.tooltip-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: help;
}

.tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  flex-shrink: 0;
  line-height: 1;
}

/* --tt-versatz schiebt den Kasten zur Seite, wenn er sonst ueber den Rand des Dialogs
   ragte und abgeschnitten wuerde (gesetzt in app.js beim Drueberfahren, 28.09.). */
.tooltip-text {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(calc(-50% + var(--tt-versatz, 0px)));
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 8px 12px;
  font-size: 0.8rem;
  color: var(--ink);
  width: 240px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 50;
  text-align: left;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.5;
  white-space: normal;
}

.tooltip-wrap:hover .tooltip-text {
  opacity: 1;
  pointer-events: auto;
}

.tooltip-wrap--below .tooltip-text {
  bottom: auto;
  top: calc(100% + 6px);
}

.toggle-label input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  transition: background 0.2s, border-color 0.2s;
  padding: 0;
  margin: 0;
}

.toggle-label input[type="checkbox"]::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 14px;
  height: 14px;
  background: var(--muted);
  border-radius: 50%;
  transition: transform 0.18s, background 0.18s;
}

.toggle-label input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.toggle-label input[type="checkbox"]:checked::before {
  transform: translateX(20px);
  background: #fff;
}

/* ── Questions search ── */
.questions-search {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 9px 14px;
  background: var(--bg-3);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s;
}

.questions-search:focus {
  border-color: var(--accent);
}

/* ── Topic group (questions) ── */
.topic-group {
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--bg-3);
  overflow: hidden;
}

.topic-group-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  gap: 10px;
  user-select: none;
}

.topic-group-summary::-webkit-details-marker { display: none; }

.topic-group-summary::after {
  content: "▸";
  color: var(--muted);
  font-size: 0.75rem;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.topic-group[open] > .topic-group-summary::after {
  transform: rotate(90deg);
}

.topic-group-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 2px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  margin-right: auto;
  margin-left: 6px;
}

.topic-group-body {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
}

.question-card {
  background: var(--bg-2);
}

.question-prompt {
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
}

.question-category {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 2px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.75rem;
}

/* Lektions-Vorschautext: voller Inhalt im Markup, eingeklappt auf wenige Zeilen.
   "Mehr anzeigen" klappt auf (Klasse .expanded), ohne dass Text verloren geht. */
.lesson-preview {
  white-space: pre-wrap;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lesson-preview.expanded {
  display: block;
  -webkit-line-clamp: none;
  line-clamp: none;
  overflow: visible;
}

.lesson-preview-toggle {
  align-self: flex-start;
  padding: 2px 10px;
  font-size: 0.75rem;
}

/* ── Employee Card ── */
.emp-card {
  gap: 10px;
}

.emp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.field-hint {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  line-height: 1.4;
  margin-top: -2px;
}

.card-thumb {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}

.card-thumb--question {
  width: 100%;
  height: 120px;
  border-radius: 2px;
  margin-bottom: 6px;
  display: block;
}

/* ── Kompakte Lektions-Karte (Listenzeile) ── */
.lesson-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
}
.lesson-thumb {
  position: relative;
  width: 96px;
  height: 60px;
  flex-shrink: 0;
  border-radius: 2px;
  overflow: hidden;
  background: var(--bg-3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lesson-thumb-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.lesson-thumb-badge {
  position: absolute;
  right: 4px;
  bottom: 4px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.7rem;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 2px;
}
.lesson-thumb-empty { font-size: 1.5rem; opacity: 0.55; }
.lesson-body {
  flex: 1;
  min-width: 0; /* erlaubt Ellipsis im Titel/Preview */
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lesson-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.lesson-title {
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}
.lesson-order { flex-shrink: 0; }
.lesson-preview--compact {
  margin: 0;
  font-size: 0.85rem;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}
.lesson-actions {
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}
@media (max-width: 640px) {
  .lesson-card { flex-wrap: wrap; }
  .lesson-actions { width: 100%; }
}
.lesson-thumb { cursor: pointer; }
.lesson-title { cursor: pointer; }
.lesson-title:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ── Lightbox (Lektions-Vorschau: Bild/Video gross ansehen) ── */
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.78);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 16px;
  overflow: auto;
}
.lightbox {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 20px;
  width: 100%;
  max-width: 880px;
}
/* Beim Hineinzoomen darf die Box (und damit das Bild) ueber die Breite wachsen; der
   Hintergrund scrollt dann. */
.lightbox:has(.lightbox-img.zoomed) { max-width: none; width: max-content; }
.lightbox-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}
.lightbox-close:hover { color: var(--ink); }
.lightbox-title { margin: 0 36px 14px 0; color: var(--ink); }
.lightbox-img {
  display: block;
  width: 100%;
  border-radius: 2px;
  cursor: zoom-in;
}
.lightbox-img.zoomed { width: auto; max-width: none; cursor: zoom-out; }
.lightbox-video {
  display: block;
  width: 100%;
  border-radius: 2px;
  margin-top: 12px;
  background: #000;
}
.lightbox-text {
  white-space: pre-wrap;
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.emp-name {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.emp-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.emp-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 2px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.78rem;
}

.emp-badge--id {
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.04em;
}

.emp-badge--company {
  color: var(--accent-2);
  border-color: rgba(167, 139, 250, 0.25);
  background: rgba(167, 139, 250, 0.08);
}

/* Gesperrte Filiale (21.09.). Die einzige Stelle im Portal, die rot sein darf und kein
   Fehler ist: Eine Sperre ist kein Zustand, ueber den man hinweglesen soll. */
.emp-badge--gesperrt {
  font-weight: 600;
  color: var(--danger, #f87171);
  border-color: rgba(248, 113, 113, 0.3);
  background: rgba(248, 113, 113, 0.1);
  gap: 5px;
  vertical-align: middle;
  margin-left: 8px;
}

/* Vorfuehrfirma (27.10.): in Gold wie alles Hervorgehobene im Markenstil, nicht rot und
   nicht gruen -- es ist ein Merkmal der Firma, kein Zustand und keine Warnung. Der Selektor
   ist doppelt so stark wie noetig, weil "body.portal-supervisor .emp-badge" jede Marke grau
   macht und weiter unten steht. */
.emp-badge.emp-badge--vorfuehrung,
body.portal-supervisor .emp-badge.emp-badge--vorfuehrung {
  border: 1px solid rgba(211, 178, 100, 0.35);
  font-weight: 600;
  color: var(--accent);
  border-color: rgba(211, 178, 100, 0.35);
  background: rgba(211, 178, 100, 0.08);
  gap: 5px;
  vertical-align: middle;
  margin-left: 8px;
  font-family: var(--ef-sans);
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}
.emp-badge--vorfuehrung .ikon { width: 14px; height: 14px; }
h2 .emp-badge--vorfuehrung { font-size: 0.78rem; position: relative; top: -2px; }

/* Die Karte tritt zurueck, ohne unlesbar zu werden: Wer die Liste ueberfliegt, sieht die
   laufenden Filialen zuerst. Die Knoepfe bleiben voll da -- gerade das Wiederoeffnen darf
   nicht schwerer zu treffen sein als das Sperren. */
.card--gesperrt { opacity: 0.72; }
.card--gesperrt:hover { opacity: 1; }
.card--gesperrt .company-card-logo { filter: grayscale(1); }

.meta--gesperrt { color: var(--danger, #f87171); }

.emp-badge--pin {
  font-weight: 700;
  color: var(--accent);
  border-color: rgba(52, 211, 153, 0.25);
  background: rgba(52, 211, 153, 0.08);
}

/* PIN-Feld mit Generieren-Button nebeneinander */
.pin-row {
  display: flex;
  gap: 6px;
  /* Der Knopf "Generieren" so hoch wie das Feld daneben. */
  align-items: stretch;
  /* Als Grid-Kind darf die Zeile schmaler werden als ihre Wunschbreite,
     sonst raegt der Generieren-Button in die Nachbarspalte (Benutzername). */
  min-width: 0;
}
.pin-row input {
  flex: 1;
  min-width: 0;
  /* Keine intrinsische Breite anmelden - die Breite kommt allein vom Flex-Layout. */
  width: 0;
}
.pin-row .button-ghost {
  white-space: nowrap;
}

/* === Zugriffsprotokoll (11.10.2026): der Dialog hinter dem Knopf "Zugriffe" ==============
   Breiter als die anderen Dialoge, weil eine Zeile fuenf Angaben traegt. Die Liste rollt in
   sich; der Kopf der Tabelle bleibt stehen. Jede Zelle bricht um, statt die Tabelle breiter zu
   ziehen als das Fenster (Netzadressen in der langen Form und Pfade haben keine Leerzeichen,
   deshalb overflow-wrap: anywhere). */
/* IM NIEDRIGEN FENSTER ROLLT DER GANZE DIALOG. Die Liste nimmt, was Kopf, Filter und Fuss
   uebrig lassen; in einem Fenster von 400 Bildpunkten Hoehe waren das 46, also ein einziger
   Eintrag (gesehen im schmalen Fenster neben dem Chat, nicht im hohen Pruef-Browser). Jetzt
   behaelt die Liste eine Mindesthoehe, und was dann nicht mehr passt, rollt als Ganzes. */
.zp-fenster { width: 100%; max-width: 1120px; max-height: 100%; min-height: 0; overflow-y: auto; }
.zp-filter { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.zp-filter label { display: grid; gap: 4px; font-size: 0.78rem; color: var(--muted); min-width: 0; }
.zp-filter select, .zp-filter input[type="search"] { width: 100%; padding-top: 7px; padding-bottom: 7px; }
.zp-filter label { flex: 0 1 11rem; }
.zp-filter label.zp-suche { flex: 1 1 14rem; }
.zp-filter label.zp-haken { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; padding-bottom: 8px; color: var(--ink); font-size: 0.85rem; }
.zp-filter label.zp-haken input { width: auto; }
.zp-stand { margin: 0; font-size: 0.85rem; color: var(--muted); }
/* Auffaelligkeiten (19.10.2026) ueber der Liste der Zugriffe. */
.zp-auff { border: 1px solid var(--border); border-radius: 2px; padding: 8px 12px; background: var(--bg-2); }
.zp-auff.zp-auff-hoch { border-color: rgba(248, 113, 113, 0.55); }
.zp-auff summary { cursor: pointer; font-size: 0.88rem; font-weight: 600; color: var(--ink); }
.zp-auff-satz { margin: 6px 0 4px; font-size: 0.78rem; color: var(--muted); }
.zp-auff-liste { list-style: none; margin: 0; padding: 0; max-height: 16rem; overflow: auto; }
.zp-auff-liste li { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 4px 10px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--border); font-size: 0.82rem; font-weight: 400; }
.zp-auff-marke { font-size: 0.7rem; font-weight: 600; padding: 1px 7px; border-radius: 2px; background: rgba(255, 255, 255, 0.08); color: var(--muted); }
.zp-auff-hoch .zp-auff-marke { background: rgba(248, 113, 113, 0.18); color: #ff9d9d; }
.zp-auff-mittel .zp-auff-marke { background: rgba(251, 191, 36, 0.16); color: #fcd34d; }
.zp-auff-zeit { color: var(--muted); font-size: 0.76rem; white-space: nowrap; }
.zp-auff-text { overflow-wrap: anywhere; color: var(--ink); }
@media (max-width: 560px) { .zp-auff-liste li { grid-template-columns: auto minmax(0, 1fr); } .zp-auff-text { grid-column: 1 / -1; } }
.zp-fuss { margin: 0; font-size: 0.78rem; color: var(--muted); }
.zp-liste { flex: 1 1 auto; min-height: 13rem; overflow: auto; border: 1px solid var(--border); border-radius: 2px; }
.zp-liste:empty { display: none; }
.zp-tabelle { width: 100%; border-collapse: collapse; font-size: 0.82rem; table-layout: fixed; }
.zp-tabelle th { position: sticky; top: 0; z-index: 1; padding: 8px 12px; text-align: left; font-size: 0.74rem; font-weight: 500; color: var(--muted); background: var(--bg-2); border-bottom: 1px solid var(--border); }
.zp-tabelle td { padding: 8px 12px; border-bottom: 1px solid var(--border); vertical-align: top; overflow-wrap: anywhere; }
.zp-tabelle tr:last-child td { border-bottom: 0; }
.zp-tabelle th:nth-child(1) { width: 17%; }
.zp-tabelle th:nth-child(2) { width: 22%; }
.zp-tabelle th:nth-child(3) { width: 29%; }
.zp-tabelle th:nth-child(4) { width: 16%; }
.zp-tabelle th:nth-child(5) { width: 16%; }
.zp-sp-zeit { color: var(--muted); }
.zp-haupt { color: var(--ink); }
.zp-leise { color: var(--muted); font-size: 0.74rem; }
.zp-ziel { font-weight: 600; }
.zp-ok { color: #6ee7a8; }
.zp-fehl { color: #ff9d9d; }
.zp-anzahl { color: var(--muted); font-size: 0.74rem; }
.zp-zeile-fehl td { background: rgba(248, 113, 113, 0.05); }
@media (max-width: 760px) {
  /* Schmal: die Technikzeile faellt weg, die fuenf Spalten bleiben. */
  .zp-tabelle { font-size: 0.78rem; }
  .zp-tabelle th, .zp-tabelle td { padding: 7px 8px; }
  .zp-technik { display: none; }
}
@media (max-width: 620px) {
  /* Ganz schmal sind fuenf Spalten je 60 Bildpunkte breit, und "abgelehnt" brach mitten im
     Wort um. Dann steht jeder Eintrag als Block: oben Zeit und Ergebnis, darunter wer, was,
     von wo, jeweils ueber die ganze Breite. Die Reihenfolge im Dokument bleibt dieselbe. */
  .zp-tabelle, .zp-tabelle tbody { display: block; }
  .zp-tabelle thead { display: none; }
  .zp-tabelle tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; padding: 9px 10px; border-bottom: 1px solid var(--border); }
  .zp-tabelle tr:last-child { border-bottom: 0; }
  .zp-tabelle td { display: block; padding: 0; border: 0; min-width: 0; }
  .zp-tabelle td.zp-sp-zeit { grid-column: 1; grid-row: 1; }
  .zp-tabelle td.zp-sp-erg { grid-column: 2; grid-row: 1; text-align: right; }
  .zp-tabelle td.zp-sp-wer, .zp-tabelle td.zp-sp-was, .zp-tabelle td.zp-sp-wo { grid-column: 1 / -1; }
  .zp-zeile-fehl { background: rgba(248, 113, 113, 0.05); }
  .zp-zeile-fehl td { background: none; }
}

/* Brillen als Tabelle (28.09.): dieselbe .ma-tabelle wie bei Mitarbeitern und im Lehrplan.
   Die Person nimmt den Rest der Breite; schmaler fallen erst Version, dann Person weg. */
.br-tabelle .brille-status { margin-left: 0; }
.br-vorgemerkt { margin-top: 2px; font-size: 0.72rem; color: #f0c48f; }
/* Gekuerzt wird IN der Zelle (.br-kuerzen), nicht an ihr: Eine Zelle mit overflow hidden malt
   ihren Grund nicht unter den eigenen Rand, und in der aufgeklappten Zeile stand dort ein
   dunkler Strich unter genau dieser einen Zelle. */
.br-tabelle > tbody > tr > td.br-sp-person { width: 100%; max-width: 0; }
.br-kuerzen { display: block; overflow: hidden; text-overflow: ellipsis; }
.br-details { display: grid; gap: 24px; padding-top: 10px; min-width: 0; }
/* Der Aufklappteil hat seit dem 11.10. zwei Abschnitte: oben die Benutzer der Brille (dieselbe
   Tabelle wie im Reiter Mitarbeiter, eine Stufe tiefer), darunter die Felder zum Einrichten.
   Die Ueberschriften wie im Aufklappteil einer Person (.ma-details h4). */
.br-details h4 { margin: 0; font-size: 0.8125rem; font-weight: 600; color: var(--ink); }
.br-nutzer, .br-einrichten { min-width: 0; }
.br-einrichten { display: grid; gap: 12px; }
.br-nutzer-hinweis { margin: 0 0 8px; }
.br-nutzer-tabelle { border-top: 1px solid var(--border); }
/* "zuletzt an dieser Brille angemeldet" unter dem Namen, wie die Rollenmarke daneben. */
.br-nutzer-marke { margin-top: 2px; font-size: 0.72rem; color: #6ee7a8; }
/* Die Benutzertabelle steht eine Stufe tiefer als die im Reiter Mitarbeiter und hat rund
   hundert Bildpunkte weniger Platz. Abteilung und Module fallen hier deshalb frueher weg
   (dort unter 900), beide stehen im Aufklappteil der Person. */
@media (max-width: 1040px) {
  .br-nutzer-tabelle .ma-sp-abt, .br-nutzer-tabelle .ma-sp-mod { display: none; }
}
/* Der Balken ist hier noch etwas kuerzer als im Reiter Mitarbeiter (dort 124), damit
   "Naechster Schritt" lesbar bleibt. Die Regel steht mit zwei Klassen da, weil die fuer die
   Tabelle der Personen weiter unten in der Datei folgt und sonst gewoenne. */
.br-nutzer-tabelle.ma-personen .ma-fortschritt { width: 112px; }
@media (max-width: 680px) { .br-nutzer-tabelle.ma-personen .ma-fortschritt { width: 96px; } }
@media (max-width: 900px) { .br-tabelle .br-sp-version { display: none; } }
@media (max-width: 680px) { .br-tabelle .br-sp-person { display: none; } }
/* Uebersicht ueber alle Filialen (10.10.): eine Spalte mehr. Hier nimmt die FILIALE den Rest
   der Breite (der Kniff mit width 100 % und max-width 0, wie oben bei der Person): Ein langer
   Firmenname darf die Zeile nicht breiter ziehen als das Fenster. Die Person steht dafuer in
   ihrer eigenen Breite. Zwei Spalten mit dem Kniff nebeneinander teilen sich den Rest nicht,
   sie schrumpfen beide: So stand zuerst "Baeckerei Regi..." neben einer halb leeren
   Personenspalte.
   DER NAME DARF IN ZWEI ZEILEN STEHEN, erst danach kommt "...". Der Rest sind nur rund 170
   Bildpunkte (die Seite ist schmal, Status und Datum brauchen ihren Platz), und in einer Zeile
   war schon "Wegwerf AG (etwas Inhalt)" abgeschnitten. Den ganzen Namen zeigt der Tipp. */
.br-uebersicht > tbody > tr > td.br-sp-firma { width: 100%; max-width: 0; white-space: normal; }
.br-firma-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  line-height: 1.3;
}
.br-uebersicht > tbody > tr > td.br-sp-person { width: auto; max-width: 13rem; }
.br-ohne-filiale { color: #f0c48f; }
.br-summe { margin-bottom: 10px; }
/* Schmaler faellt die Person frueher weg als sonst, und ganz schmal wandert die Filiale unter
   den Namen der Brille. Sie bleibt in jeder Breite stehen, sie ist der Grund fuer die Ansicht. */
.br-firma-klein { display: none; margin-top: 2px; max-width: 15rem; font-size: 0.72rem; color: var(--muted); white-space: normal; overflow-wrap: anywhere; }
.br-firma-klein.br-ohne-filiale { color: #f0c48f; }
@media (max-width: 820px) { .br-uebersicht .br-sp-person { display: none; } }
@media (max-width: 680px) {
  .br-uebersicht .br-sp-firma { display: none; }
  .br-uebersicht .br-firma-klein { display: block; }
}

.emp-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Die Modulzahl in der Uebersicht (Ansage 25.09.). Sie steht dort, wo vorher die Marken
   standen, und muss deshalb genauso leise sein wie die "Jetzt dran"-Zeile darunter. */
.emp-modulzahl {
  margin-top: 2px;
  /* Ein Knopf, der wie Text aussehen soll: Alles, was der Browser von sich aus mitbringt,
     muss weg, sonst steht dort eine graue Schaltflaeche mitten in der Karte. */
  display: block;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

/* Erst beim Daruebergehen zeigt sie, dass sie etwas tut. In Ruhe bleibt sie so leise wie
   die "Jetzt dran"-Zeile darunter -- sie steht in JEDER Karte. */
.emp-modulzahl:hover,
.emp-modulzahl:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Die Titel selbst stehen jetzt im aufgeklappten Teil und brauchen dort Luft nach unten. */
.details-body .emp-topics {
  margin: 4px 0 12px;
}

.topic-chip {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 2px;
  background: rgba(211, 178, 100, 0.1);
  border: 1px solid rgba(211, 178, 100, 0.22);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 500;
}

/* "Jetzt dran"-Zeile unter dem Fortschrittsbalken (#98). Bewusst leise: Sie steht in
   JEDER Karte und darf die Liste nicht unruhig machen. */
.emp-stand { margin: 6px 0 2px; font-size: 0.82rem; color: var(--muted); }
.emp-stand strong { color: var(--ink); font-weight: 600; }
.emp-stand-label.ok { color: #6bbf85; }

.emp-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.emp-progress-row .progress-bar {
  flex: 1;
}

.emp-progress-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  min-width: 36px;
  text-align: right;
  flex-shrink: 0;
}

/* ── Answer chips (question card) ── */
.answer-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.answer-chip {
  padding: 3px 10px;
  border-radius: 2px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
}

.answer-chip--correct {
  background: rgba(74, 222, 128, 0.15);
  border-color: #4ade80;
  color: #4ade80;
  font-weight: 600;
}

.answer-chip--model {
  border-color: #60a5fa;
}

.answer-chip-3d {
  display: inline-block;
  margin-right: 5px;
  padding: 0 5px;
  border-radius: 2px;
  background: rgba(96, 165, 250, 0.2);
  border: 1px solid #60a5fa;
  color: #60a5fa;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  vertical-align: middle;
}

.question-badge {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 7px;
  border-radius: 2px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  vertical-align: middle;
}

.question-badge--multi {
  background: rgba(52, 211, 153, 0.18);
  border: 1px solid #34d399;
  color: #34d399;
}

/* ── Szenarien ──────────────────────────────────────────────────────────────
   Gehoert zu scenarios.js. Alles hier traegt das Praefix sz-, damit klar bleibt,
   was zu diesem Bereich gehoert und beim Aufraeumen mitgeht. */

.sz-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.sz-card-body { flex: 1; min-width: 0; }

.sz-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sz-title { font-weight: 600; }

.sz-desc {
  margin: 4px 0 8px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.sz-badges { display: flex; gap: 6px; flex-wrap: wrap; }

.sz-badge {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 2px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--muted);
}

.sz-badge-ok {
  background: rgba(52, 211, 153, 0.14);
  border-color: rgba(52, 211, 153, 0.5);
  color: #34d399;
}

/* ── Editor ── */

.sz-editor-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.sz-editor-kopf h3 { margin: 0; }
/* Der Editor einer Uebung bleibt so breit wie seine Tafel (08.10.). Als Rasterkind durfte er
   so breit werden wie sein breitester Inhalt; ein langer Modulname in der Auswahl "Modul" zog
   ihn im schmalen Fenster ueber den Rand und die ganze Seite mit. */
#scenario-editor { min-width: 0; }
.sz-editor-knoepfe { display: flex; gap: 8px; }

.sz-save {
  background: var(--accent);
  border: 0;
  color: #fff;
  border-radius: 2px;
  padding: 7px 16px;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.sz-save:hover { filter: brightness(1.12); }

.sz-block {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.sz-block-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sz-block-kopf h4 { margin: 0 0 6px; }
.sz-block .help { margin: 0 0 12px; }

/* Eine Zeile pro Zone beziehungsweise Gegenstand. Umbrechen statt scrollen: In einem
   schmalen Fenster rutschen die Felder untereinander, statt aus dem Bild zu laufen. */
.sz-zeile {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.sz-zeile:last-child { border-bottom: 0; }

.sz-feld { display: flex; flex-direction: column; gap: 4px; }

.sz-feld > span {
  font-size: 0.8125rem;
  color: var(--muted);
}

.sz-feld input,
.sz-feld select,
.sz-feld textarea {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--ink);
  font: inherit;
  font-size: 0.85rem;
  padding: 6px 9px;
  width: 100%;
}

.sz-feld-xs { width: 92px; }
.sz-feld-s  { flex: 1 1 150px; min-width: 130px; }
.sz-feld-m  { flex: 1 1 220px; min-width: 180px; }
.sz-feld-l  { flex: 2 1 280px; min-width: 200px; }
.sz-feld-voll { width: 100%; }
/* Vorschaubild einer Übung: kleine Vorschau neben den Knöpfen, wie bei den Themen. */
.sz-bild { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.sz-bild-vorschau { width: 132px; height: 84px; object-fit: cover; border-radius: 2px; border: 1px solid var(--border); background: #14161a; }
.sz-bild-knopf { cursor: pointer; }

.sz-vorschau {
  width: 56px;
  height: 56px;
  flex: none;
  border-radius: 2px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.sz-vorschau model-viewer { width: 100%; height: 100%; }
.sz-vorschau-leer { color: var(--muted); font-size: 1.2rem; }

.sz-upload { cursor: pointer; padding: 6px 11px; }
.sz-weg { padding: 6px 11px; color: var(--danger); }

/* ── Pruefung ── */

.sz-pruefung { margin-top: 4px; }

.sz-ok-zeile {
  color: #34d399;
  font-size: 0.85rem;
  margin: 0;
}

.sz-probleme {
  margin: 0;
  padding-left: 20px;
  color: #f0b357;
  font-size: 0.85rem;
}

.sz-probleme li { margin: 2px 0; }

/* ── Ergebnisse ── */

.sz-ergebnisse { display: block; padding: 4px 2px; }

.sz-tabelle {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.sz-tabelle th,
.sz-tabelle td {
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.sz-tabelle th { color: var(--muted); font-weight: 500; }
.sz-fehlerspalte { white-space: normal; color: var(--muted); }
.sz-ok  { color: #34d399; }
.sz-nok { color: #f0b357; }

/* ── Objekt-Auswahl mit Vorschau ────────────────────────────────────────────
   Eine Liste mit Dateinamen hilft niemandem, der eine Uebung baut: Man muss
   SEHEN, was man auswaehlt. */

.sz-waehlen {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--ink);
  font: inherit;
  font-size: 0.85rem;
  padding: 6px 9px;
  width: 100%;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sz-waehlen:hover { border-color: var(--accent); }
.sz-waehlen-leer { color: var(--muted); }

.sz-vorschau[data-sz-action] { cursor: pointer; }
.sz-vorschau[data-sz-action]:hover { border-color: var(--accent); }

.sz-waehler { max-width: 960px; width: 92vw; }
.sz-waehler-body { display: block; overflow-y: auto; max-height: 70vh; }

.sz-waehler .mv-lightbox-head { gap: 10px; }

.sz-suche {
  margin-left: auto;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--ink);
  font: inherit;
  font-size: 0.85rem;
  padding: 5px 10px;
  min-width: 180px;
}

.sz-quellen {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.sz-galerie {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.sz-kachel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--ink);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  text-align: center;
}

.sz-kachel:hover { border-color: var(--accent); }
.sz-kachel-aktiv { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }

.sz-kachel-view {
  width: 100%;
  height: 110px;
  background: var(--bg-3);
  border-radius: 2px;
}

.sz-kachel-text {
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sz-kachel-art { font-size: 0.7rem; color: var(--muted); }

/* Die drei Wege, ein Objekt zu bekommen: kleiner als die Vorschau-Kacheln, weil
   sie keine Vorschau tragen. */
.sz-kachel-aktion {
  flex: 0 0 auto;
  flex-direction: row;
  min-width: 170px;
  padding: 10px 14px;
}

.sz-kachel-icon { font-size: 1.05rem; }
.sz-kachel-ki { border-color: rgba(167, 139, 250, 0.5); }
.sz-kachel-ki:hover { border-color: var(--accent-2); }

/* ── Dauerhafter Designer-Link (über der Maschinenliste) ────────────────────── */

.mv-dlink {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.mv-dlink-kopf {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.mv-dlink-titel { font-weight: 600; }
.mv-dlink .help { margin: 6px 0 10px; }

.mv-dlink-zeile { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.mv-dlink-zeile input {
  flex: 1 1 320px;
  min-width: 220px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--ink);
  font: inherit;
  font-size: 0.85rem;
  padding: 6px 9px;
}

.mv-dlink-zeile a.button-ghost { text-decoration: none; display: inline-flex; align-items: center; }

/* ── Lehrplan ────────────────────────────────────────────────────────────────
   UMBAU 28.09. ("ich finde den tab fuer den lehrplan noch unuebersichtlich"). Bis dahin eine
   Auswahlliste fuer die Person, darunter ihre Module, darunter dieselben Module noch einmal
   als "In der Brille" und darunter die Einstellungen der Filiale. Jetzt die Tabelle aus dem
   Reiter Mitarbeiter (.ma-tabelle): eine Zeile je Person mit Modulen und Fortschritt, ein
   Klick klappt ihren Lehrplan auf. Die Einstellungen sind ein Dialog. */

.lp-hinweise { display: grid; gap: 6px; margin-bottom: 14px; }
.lp-hinweise[hidden] { display: none; }
.lp-hinweise .lp-warnung { margin: 0; }

/* Eigene Spaltenklassen statt .ma-sp-*: Dort verschwindet die Modulspalte unter 900 px, hier
   ist sie die wichtigste. Sie nimmt den Rest und kuerzt mit "..." (volle Liste am Zeiger). */
.lp-tabelle > tbody > tr > td.lp-sp-mod { width: 100%; max-width: 0; }
.lp-modulnamen { display: block; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.lp-nichts { color: var(--muted); }
@media (max-width: 680px) { .lp-tabelle .lp-sp-nr { display: none; } }
@media (max-width: 520px) { .lp-tabelle .lp-sp-fort { display: none; } }

/* Aufgeklappt: der Lehrplan der Person, darunter "Modul hinzufuegen". */
.lp-tabelle > tbody > tr.lp-details-zeile > td { padding-top: 2px; }
.lp-plan { display: grid; gap: 12px; }
.lp-plan-fuss { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lp-hinzufuegen {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 1 440px;
  min-width: 240px;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 400;
}
.lp-hinzufuegen > span { white-space: nowrap; }
/* width 0 und DANN wachsen (08.10.): Die Auswahl fuellt weiter ihren Platz, meldet der Tabelle
   aber nicht mehr die Breite ihres laengsten Eintrags. Mit einem langen Modulnamen wurde die
   aufgeklappte Zeile sonst breiter als das Fenster und nahm die ganze Seite mit. */
.lp-hinzufuegen > select { flex: 1 1 auto; min-width: 0; width: 0; }
.lp-plan-fuss .lp-stand-neu { margin-left: auto; }

.lp-field { display: flex; flex-direction: column; gap: 6px; }
.lp-field .field-hint { margin-top: 0; }

/* Eine Zeile je Zuweisung: Nummer | Modul | Teile | Stand | Handgriffe */
.lp-module { display: grid; border-top: 1px solid var(--border); }
.lp-modul {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto 150px auto;
  align-items: center;
  gap: 4px 18px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.lp-modul-nr { color: var(--muted); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.lp-modul-haupt { min-width: 0; }
.lp-modul-titel { color: var(--ink); font-weight: 600; }
.lp-modul-info { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 2px; color: var(--muted); font-size: 0.78rem; }
.lp-warn { color: #f0c48f; }
.lp-teile { display: flex; gap: 16px; }
.lp-teile label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 400;
  cursor: pointer;
}
.lp-teile input { margin: 0; accent-color: var(--accent); }
/* Der Stand am Modul selbst: erledigt (gruen), jetzt dran (blau), sonst leise. */
.lp-modul-zustand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.8125rem;
  white-space: nowrap;
}
.lp-modul-zustand .ikon { width: 14px; height: 14px; flex: none; }
.lp-modul-zustand--erledigt { color: #6ee7a8; }
.lp-modul-zustand--aktuell { color: var(--accent); }
.lp-modul-aktionen { display: flex; gap: 2px; }
.lp-modul-aktionen .button-ghost { padding: 5px 7px; min-width: 30px; border-color: transparent; }
.lp-modul-aktionen .button-ghost:hover { border-color: rgba(255, 255, 255, 0.18); }
.lp-modul-aktionen button[disabled] { opacity: 0.3; cursor: default; }
.lp-modul > .lp-zeilen-hinweis { grid-column: 2 / -1; margin: 0; color: #f0c48f; font-size: 0.78rem; line-height: 1.4; }
.lp-zeilen-hinweis[hidden] { display: none; }
.lp-leer { margin: 0; padding: 10px 0; color: var(--muted); }
.lp-warnung { margin: 10px 0 0; color: #f0c48f; font-size: 0.8125rem; line-height: 1.45; }

.lp-status { color: var(--muted); font-size: 0.8125rem; }
.lp-status--dirty { color: #f0c48f; }
.lp-status--ok { color: #6ee7a8; }
.lp-status--err { color: #ff9d9d; }

.lp-brille-satz { margin: 0; color: var(--muted); font-size: 0.8125rem; line-height: 1.45; }
.lp-brille-satz--ok { color: #6ee7a8; }
.lp-brille-satz--warn { color: #f0c48f; }
.lp-brille-satz--err { color: #ff9d9d; }
.lp-punkt { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--accent); }

/* Einstellungen der Filiale */
.lp-einstellung { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--border); }
.lp-einstellung-titel { color: var(--ink); font-size: 0.875rem; font-weight: 600; }
.lp-einstellung-text { margin: 0; color: var(--muted); font-size: 0.8125rem; }

/* Schalter mit Erklaerung darunter: Die Beschriftung allein beantwortet nicht, was der
   Schalter im Betrieb bedeutet. */
.lp-switch { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.lp-switch input { flex: 0 0 auto; margin-top: 3px; accent-color: var(--accent); }
.lp-switch strong { display: block; color: var(--ink); font-size: 0.875rem; font-weight: 600; }
.lp-switch em { display: block; margin-top: 2px; color: var(--muted); font-size: 0.8125rem; font-style: normal; font-weight: 400; }

/* Person oder Brille: ein Umschalter mit zwei Segmenten statt zweier umrandeter Kaesten. */
.lp-segment {
  display: inline-flex;
  width: fit-content;
  padding: 3px;
  gap: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.05);
}
.lp-segment label {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 2px;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
}
.lp-segment input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.lp-segment label:has(input:checked) { background: var(--bg-3); color: var(--ink); }
.lp-segment label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Die Felder der Vorstellung haengen am Schalter darueber: ausgeschaltet sind sie weg, nicht
   nur grau. Text links, die beiden Ablageflaechen rechts. */
.lp-intro-fields { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; margin-top: 4px; padding-left: 26px; }
.lp-intro-fields[hidden] { display: none; }
.lp-intro-texte { display: grid; gap: 12px; align-content: start; }
.lp-intro-texte textarea { resize: vertical; }
.lp-uploads { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-content: start; }
@media (max-width: 860px) {
  .lp-intro-fields { grid-template-columns: 1fr; padding-left: 0; }
}
/* Schmaler: Teile und Stand in eine zweite Zeile unter den Titel. */
@media (max-width: 900px) {
  .lp-modul { grid-template-columns: 22px minmax(0, 1fr) auto; }
  .lp-modul > .lp-modul-aktionen { grid-column: 3; grid-row: 1; }
  .lp-modul > .lp-teile { grid-column: 2; grid-row: 2; }
  .lp-modul > .lp-modul-zustand { grid-column: 3; grid-row: 2; justify-self: end; }
}
@media (max-width: 560px) {
  .lp-uploads { grid-template-columns: 1fr; }
  .lp-teile { flex-wrap: wrap; gap: 6px 14px; }
}

/* Einstellungen der Filiale als Dialog: etwas breiter als die anderen, weil Text, Bild und
   Video der Vorstellung nebeneinander stehen. */
.modal:has(#lp-settings-form) { width: min(780px, 100%); }
.lp-settings-inhalt { display: grid; }
.lp-settings-inhalt > .lp-einstellung { padding: 16px 0; }
.lp-settings-inhalt > .lp-einstellung:first-child { padding-top: 0; border-top: 0; }
.lp-settings-inhalt > .lp-einstellung:last-child { padding-bottom: 0; }
.lp-settings-inhalt .lp-intro-fields { padding-left: 0; margin-top: 8px; }

/* Ein Knopf, den es gerade nicht zu druecken gibt — er bleibt sichtbar, damit im Portal
   nicht der Eindruck entsteht, die Funktion gaebe es nur manchmal. Der Grund steht im
   title-Attribut. Bewusst ein <span>: nichts anklickbar, kein Tastatur-Fokus. */
.button-ghost.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  user-select: none;
}

/* ── Brillen: online / offline ─────────────────────────────────────────────
   Der Punkt trägt die Aussage, der Text erklärt sie. Nur Farbe wäre zu wenig:
   Rot-grün ist die häufigste Farbsehschwäche, und "online" gegen ein Datum zu
   lesen funktioniert auch ohne jede Farbe. */
.brille-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
  padding: 2px 9px;
  border-radius: 2px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}
.brille-punkt {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  flex: 0 0 auto;
}
.brille-status.is-online { color: #2d8a4e; border-color: rgba(45, 138, 78, 0.45); }
.brille-status.is-online .brille-punkt {
  background: #2d8a4e;
  /* Ein leises Pulsieren, damit "läuft gerade" auch beiläufig auffällt. Bewusst
     langsam und ohne Größenänderung — es soll nicht blinken, sondern atmen. */
  animation: brille-atmen 2.4s ease-in-out infinite;
}
@keyframes brille-atmen {
  0%, 100% { box-shadow: 0 0 0 0 rgba(45, 138, 78, 0.55); }
  50%      { box-shadow: 0 0 0 4px rgba(45, 138, 78, 0); }
}
/* Wer Bewegung im Betriebssystem abgeschaltet hat, bekommt hier auch keine. */
@media (prefers-reduced-motion: reduce) {
  .brille-status.is-online .brille-punkt { animation: none; }
}


/* Die 3D-Objekte einer Lektion: eine Zeile je Objekt, in der Reihenfolge, in der sie in der
   Brille nebeneinander stehen. Die Nummer macht das sichtbar, ohne es erklaeren zu muessen. */
.lesson-models { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.lesson-model-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px;
  background: var(--bg-3); border: 1px solid var(--border); border-radius: 2px; }
.lesson-model-thumb { width: 44px; height: 44px; flex: 0 0 auto; background: #0d0e10; border-radius: 2px; }
.lesson-model-name { flex: 1 1 auto; font-size: 0.85rem; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lesson-model-pos { flex: 0 0 auto; min-width: 22px; height: 22px; line-height: 22px; text-align: center;
  border-radius: 50%; background: var(--accent); color: #fff; font-size: 0.75rem; }
.lesson-model-row .button-ghost { padding: 2px 8px; font-size: 0.8rem; }
.lesson-model-row .button-ghost[disabled] { opacity: 0.35; cursor: default; }

/* ── Lehrtext-Editor mit Vorschau (#176) ──────────────────────────────────
   Zwei Spalten: links schreiben, rechts sehen. Unter 900 px untereinander,
   sonst wird die Vorschau zum Streifen und hilft niemandem mehr. */
.lehrtext-editor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}
@media (max-width: 900px) { .lehrtext-editor { grid-template-columns: 1fr; } }

.lehrtext-spalte { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.lehrtext-spalte textarea {
  min-height: 260px;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.5;
}
/* Beim Ziehen eines Bildes zeigt der Rahmen, dass es hier hineingehoert. */
.lehrtext-spalte textarea.zieht { outline: 2px dashed var(--accent, #4CD9F2); outline-offset: -2px; }

.lehrtext-werkzeuge { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.lehrtext-werkzeuge .button-ghost { font-size: 0.75rem; padding: 3px 9px; }
.lehrtext-status { font-size: 0.75rem; color: var(--muted); margin-left: auto; }

/* Die Vorschau ahmt das Lehrtext-Panel der Brille nach: dunkler Grund, heller
   Text, gleiche Leserichtung. Keine exakte Kopie -- die Schrift der Brille liegt
   nicht im Browser -- aber Fettung, Kursives, Farben und Bildlage stimmen. */
.lehrtext-vorschau {
  min-height: 260px;
  max-height: 420px;
  overflow-y: auto;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: #14161a;
  color: #e8edf2;
  font-size: 0.92rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.lehrtext-vorschau img {
  display: block;
  max-width: 100%;
  margin: 10px auto;
  border-radius: 2px;
}

/* NACHSCHNITT IM FLIESSTEXT (22.09.). Der Knopf sitzt in der Ecke SEINES Bildes statt
   darunter: Die Vorschau soll zeigen, wie der Text in der Brille steht, und eine Reihe
   Knoepfe zwischen den Absaetzen zoege genau das auseinander. Halb durchsichtig, bis man
   das Bild anfaehrt -- sichtbar genug, um gefunden zu werden, zurueckhaltend genug, um
   die Vorschau nicht zu verstellen. */
.lehrtext-vorschau .lehrtext-bild {
  position: relative;
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 10px auto;
}
.lehrtext-vorschau .lehrtext-bild img { margin: 0; }
.lehrtext-bild-schnitt {
  position: absolute;
  right: 8px;
  bottom: 8px;
  margin: 0;
  padding: 3px 9px;
  font-size: 0.72rem;
  opacity: 0.55;
  background: rgba(20, 22, 26, 0.85);
  transition: opacity 0.12s ease;
}
.lehrtext-bild:hover .lehrtext-bild-schnitt,
.lehrtext-bild-schnitt:hover,
.lehrtext-bild-schnitt:focus-visible { opacity: 1; }
.lehrtext-vorschau .fehlbild {
  display: block;
  padding: 10px;
  margin: 10px 0;
  border: 1px dashed #b4432f;
  border-radius: 2px;
  color: #e08a78;
  font-size: 0.8rem;
  white-space: normal;
}

/* ── Betriebsprotokoll (#177/#178) ── */
.protokoll-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0 14px;
}

.protokoll-toolbar select {
  padding: 6px 10px;
  border-radius: 2px;
  font-size: 0.84rem;
}

.protokoll-hinweis {
  padding: 10px 14px;
  border-radius: 2px;
  border: 1px solid rgba(240, 192, 96, 0.3);
  background: rgba(240, 192, 96, 0.08);
  color: #e8c77a;
  font-size: 0.84rem;
}

.protokoll-card {
  gap: 6px;
}

.protokoll-kopf {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.82rem;
}

.protokoll-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 2px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.5;
}

.protokoll-badge[data-level="error"],
.protokoll-badge[data-dring="blockiert"] {
  color: #ff8a8a;
  border-color: rgba(224, 82, 82, 0.35);
  background: rgba(224, 82, 82, 0.1);
}

.protokoll-badge[data-level="warn"],
.protokoll-badge[data-dring="stoert"],
.protokoll-badge[data-fund="unsicher"] {
  color: #f0c060;
  border-color: rgba(240, 192, 96, 0.35);
  background: rgba(240, 192, 96, 0.1);
}

.protokoll-badge[data-level="info"],
.protokoll-badge[data-fund="bestaetigt"] {
  color: #7fd3a6;
  border-color: rgba(127, 211, 166, 0.35);
  background: rgba(127, 211, 166, 0.1);
}

.protokoll-badge[data-art] {
  color: var(--accent);
  border-color: rgba(211, 178, 100, 0.35);
  background: rgba(211, 178, 100, 0.1);
}

.protokoll-badge[data-anzahl],
.protokoll-badge[data-dring="kosmetisch"],
.protokoll-badge[data-fund="nicht_pruefbar"] {
  color: var(--muted);
  text-transform: none;
}

.protokoll-msg {
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.protokoll-stapel summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.8rem;
  user-select: none;
}

.protokoll-stapel pre {
  margin: 6px 0 0;
  padding: 10px 12px;
  border-radius: 2px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.45;
  max-height: 260px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.protokoll-aktionen {
  margin-top: 2px;
}

.befund {
  margin-top: 4px;
  padding: 14px 16px;
  border-radius: 2px;
  background: var(--bg-2);
  border: 1px solid rgba(211, 178, 100, 0.25);
  display: grid;
  gap: 12px;
}

.befund-kopf {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.befund-label {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 3px;
}

.befund-text {
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.5;
}

.befund-text[data-fehler] {
  color: #ff8a8a;
}

.befund-hinweise {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.protokoll-fund code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 2px;
  margin-right: 6px;
}

.reparatur {
  padding: 12px 14px;
  border-radius: 2px;
  border: 1px dashed rgba(211, 178, 100, 0.4);
  display: grid;
  gap: 8px;
}

.reparatur-zeile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.reparatur-zeile > div {
  flex: 1 1 360px;
  min-width: 0;
}

.reparatur-knopf {
  padding: 8px 18px;
  font-size: 0.84rem;
  white-space: nowrap;
}

.reparatur-ergebnis {
  font-size: 0.84rem;
  line-height: 1.45;
}

.reparatur-ergebnis[data-ok="true"] {
  color: #7fd3a6;
}

.reparatur-ergebnis[data-ok="false"] {
  color: #ff8a8a;
}

/* Bereichsrechte in der Rollenverwaltung (18.09.) */
.roles-row { flex-wrap: wrap; }     /* damit die Hakenliste eine eigene Zeile bekommt */

.rights-box {
  /* Die Zeile ist ein Flex-Container, keine Rasterzeile: volle Breite heisst hier
     flex-basis 100 Prozent. Mit grid-column stand die Liste als schmale Spalte daneben. */
  flex: 0 0 100%;
  width: 100%;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border, #2a3242);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.02);
}
.rights-title { font-weight: 600; margin-bottom: 8px; }

/* "Kein Bereich freigegeben" ist eine Warnung, kein Beiwerk: Diese Person kommt nirgends
   hinein. In der Farbe der uebrigen Meta-Angaben ginge sie unter. */
.rights-warn {
  color: var(--warn, #e0a33e);
  font-size: 0.78rem;
  font-weight: 500;
}
.rights-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 6px 14px;
  margin-bottom: 6px;
}
/* Unter den Haken: wie sich die Person anmeldet, und ob schon ein Passwort gesetzt ist (08.10.). */
.rights-anmeldung .meta { line-height: 1.45; }
.rights-passwort { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.rights-passwort .rights-warn { font-size: 0.8125rem; }

/* Zugang freigeschaltet (08.10.2026): Anmeldedaten als zwei Spalten, Name links, Wert rechts.
   Die Werte in fester Schrift, weil man sie abliest und abtippt (0 und O, l und I). */
.zg-satz { margin: 0 0 14px; line-height: 1.5; }
.zg-daten { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 16px; align-items: center; margin-bottom: 10px; }
.zg-name { color: var(--muted, #9aa3b2); font-size: 0.875rem; }
.zg-wert { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.9375rem; word-break: break-all; user-select: all; }
.zg-eingabe { display: flex; gap: 8px; min-width: 0; }
.zg-eingabe input { flex: 1 1 auto; min-width: 0; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
.zg-eingabe button { flex: 0 0 auto; }
/* Der Knopf "Probe senden" in den Einstellungen der Filiale: so breit wie sein Text. */
#lp-post-probe { width: auto; display: inline-flex; margin-top: 4px; }

/* Ein Modul mit hoher Prioritaet traegt seine Marke in der Akzentfarbe. */
.question-category.prio-hoch { color: var(--accent, #7c8cff); border-color: currentColor; font-weight: 600; }
.ma-plan-extra { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.ma-plan-extra .ma-textlink svg { width: 14px; height: 14px; vertical-align: -2px; }

/* Die fenstergrosse Ablage (FensterAblage in app.js): liegt ueber allem, auch ueber dem Dialog,
   aber unter den Meldungen unten rechts. Die Kinder fangen nichts, damit das Ziehen nur die
   Flaeche selbst sieht und kein dragleave zwischen Rahmen und Schrift entsteht. */
.fenster-ablage { position: fixed; inset: 0; z-index: 4500; display: grid; place-items: center; background: rgba(8, 11, 17, 0.86); backdrop-filter: blur(3px); }
.fenster-ablage[hidden] { display: none; }
.fenster-ablage * { pointer-events: none; }
.fa-rahmen { position: absolute; inset: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; border: 3px dashed var(--accent, #7c8cff); border-radius: 2px; text-align: center; }
.fa-zeichen svg { width: 64px; height: 64px; color: var(--accent, #7c8cff); }
.fa-titel { font-size: clamp(1.5rem, 3.4vw, 2.4rem); font-weight: 700; color: #fff; }
.fa-satz { font-size: 1.0625rem; color: rgba(255, 255, 255, 0.78); max-width: 34em; line-height: 1.45; }

/* Was eine Rolle darf: eine ruhige Liste unter den Anmeldedaten bzw. im Fenster zum Wechsel. */
.zg-rechte { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08)); }
.zg-rechte-kopf { font-weight: 600; margin-bottom: 6px; }
.zg-rechte-kopf.zg-mehr { color: #6bd985; }
.zg-rechte-kopf.zg-weniger { color: #f0a45b; }
.zg-liste { margin: 0 0 8px; padding-left: 18px; line-height: 1.5; font-size: 0.9375rem; }
.zg-liste li + li { margin-top: 2px; }
.zg-warnung { color: #f0a45b; font-size: 0.875rem; line-height: 1.45; margin: 6px 0 0; }
@media (max-width: 520px) {
  .zg-daten { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .zg-daten .zg-name { margin-top: 8px; }
}
.rights-item { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.rights-item input { width: 16px; height: 16px; }

/* == Gefuehrte Supervisor-Ansicht ==========================================
   Ansage Corvin 21.09.: "Das sieht immer noch sehr vibe-coded aus." Die drei Ursachen
   und was hier dagegen steht:

   1. Emoji als Symbole -> ein gezeichneter Satz (gefuehrt.js, SYM), eine Linienstaerke,
      die Farbe des Textes. Sie sitzen in einer ruhigen Kachel, nicht nackt im Text.
   2. Drei Kaesten vor dem Inhalt -> eine schmale Kopfzeile (#gefuehrt-kopf), darunter
      die Reiterleiste und dann sofort die Sache. Das Titelbild blendet app.js dafuer aus;
      die Reiterleiste bleibt seit dem 23.09. in jedem Zustand stehen (eine Kopfzeile, ein
      Weg zurueck).
   3. Alles gleich laut -> eine Tonleiter: Zahlen gross und ruhig, Gruppentitel klein und
      zurueckhaltend, Zeilen dazwischen. Runde Ecken einheitlich 12, kleine Knoepfe 8;
      keine Pillen, die gibt es im uebrigen Portal schon genug.

   Die Klassen fangen alle mit gf- an, damit nichts aus dieser Ansicht ins uebrige Portal
   streut. */

/* Das Firmenbild liegt als Wasserzeichen ueber die ganze Seite. Solange die alte Ansicht
   sie fuellte, fiel das nicht auf; in der schlichten Ansicht steht nur noch EIN Kasten da,
   und der Rest ist leere Flaeche -- aus dem Wasserzeichen wird dort ein Plakat. Bei einem
   Logo auf hellem Grund bleibt es selbst bei 2 Prozent Deckkraft als Schriftzug lesbar,
   deshalb hier ganz aus. Die Herkunft steht in der Kopfzeile: Logo und Firmenname.
   (Eine Zeile zurueckzunehmen, falls eine Filiale ein Foto statt eines Logos hinterlegt.) */
body.portal-branded.portal-schlank::before {
  display: none;
}

#gefuehrt-panel {
  gap: 0;
  padding: 0;
  overflow: hidden;
}

/* -- Kopfzeile ------------------------------------------------------------ */

/* Sie steht jetzt als eigene Karte ueber der Reiterleiste, nicht mehr als oberste Zeile
   im gefuehrten Bereich. Deshalb die Polsterung von .panel auf das schmalere Mass zurueck
   und der Hintergrund von .panel unveraendert -- eine dunklere Karte als alle anderen
   waere sonst genau der Bruch, den dieser Umbau beseitigen soll.

   DAS z-index IST KEIN SCHMUCK: Die Reiterleiste darunter klebt oben (.nav ist sticky mit
   z-index 50) und liegt damit UEBER allem, was ohne eigene Schicht darueber steht. Das
   Sprachmenue klappt aus dieser Kopfzeile nach unten in genau diesen Bereich -- ohne die
   beiden Zeilen hier traf ein Klick auf "English" in Wahrheit den Reiter dahinter. */
#gefuehrt-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 20px;
  position: relative;
  z-index: 60;
}

.gf-marke {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

/* Das Logo der Filiale (seit 20.10.2026 schickt der Server es dem Portal mit): ganz, nicht
   auf ein Quadrat zugeschnitten, und auf einem hellen Schild, weil ein Logo fuer Papier
   gemacht ist und dunkle Schrift auf dem dunklen Kopf verschwaende. */
.gf-marke-bild {
  width: auto;
  height: 34px;
  max-width: 160px;
  object-fit: contain;
  background: #f8f6f2;
  padding: 3px 7px;
  border-radius: 2px;
  flex: 0 0 auto;
}

.gf-marke-text {
  display: grid;
  line-height: 1.25;
  min-width: 0;
}

.gf-marke-text strong {
  font-size: 0.95rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gf-marke-text small {
  font-size: 0.75rem;
  color: var(--muted);
}

.gf-kopf-rechts {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.gf-person {
  font-size: 0.84rem;
  color: var(--muted);
  padding-right: 4px;
}

/* Klein, eckig, ruhig. Die runden gefuellten Knoepfe des Portals waeren hier drei
   Aufforderungen nebeneinander, von denen keine die wichtigste ist. */
.gf-knopf {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  box-shadow: none;
}

.gf-knopf:hover {
  background: var(--bg-3);
  color: var(--ink);
  transform: none;
  box-shadow: none;
}

/* Die umgehaengte Sprachauswahl soll sich hier einfuegen, nicht auffallen. */
#gefuehrt-kopf .lang-toggle {
  border-radius: 2px;
  padding: 6px 10px;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Die schlanke Kopfzeile gehoert dem Supervisor-Portal, nicht dem gefuehrten Bereich
   (23.09.). Unter /admin traegt das Titelbild dieselben Angaben, dort bleibt sie weg. */
body:not(.portal-schlank) #gefuehrt-kopf { display: none; }

/* -- Buehne --------------------------------------------------------------- */

#gefuehrt-buehne {
  display: grid;
  gap: 22px;
  padding: 24px 22px 26px;
}

/* -- Die Zahlen ueber den Wegen ------------------------------------------- */

.gf-zahlen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 10px;
}

/* ZENTRIERT UND ANKLICKBAR (Ansage 25.09.). Jede Kachel ist ein Knopf, sobald ihr Ziel
   offen ist (siehe kennzahlen in gefuehrt.js). */
.gf-zahl {
  display: grid;
  gap: 3px;
  justify-items: center;
  padding: 14px 16px;
  border-radius: 2px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  text-align: center;
  box-shadow: none;
  color: var(--ink);
  font-family: inherit;
  font-weight: 400;
}

button.gf-zahl:hover {
  background: var(--bg-3);
  border-color: rgba(255, 255, 255, 0.14);
  transform: none;
  box-shadow: none;
}

button.gf-zahl:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.gf-zahl-wert {
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.gf-zahl-titel {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* Nur wenn wirklich jemand ohne Aufgabe dasteht, faerbt sich die Zahl. Bei 0 bleibt die
   Kachel still -- eine Null in Warnfarbe ist eine Falschmeldung. */
/* Rot statt Gelb (Ansage 25.09.): Wer keine Zuweisung hat, lernt nichts. */
.gf-zahl--warn .gf-zahl-wert { color: var(--danger); }

/* -- Gruppen -------------------------------------------------------------- */

.gf-gruppe {
  display: grid;
  gap: 10px;
}

.gf-gruppentitel {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--muted);
}

.gf-liste {
  display: grid;
  gap: 8px;
}

/* -- Die anklickbare Zeile ------------------------------------------------ */

.gf-wahl {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border-radius: 2px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink);
  font-family: inherit;
  font-weight: 400;
  box-shadow: none;
}

.gf-wahl:hover {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.16);
  transform: none;
  box-shadow: none;
}

.gf-wahl--matt { opacity: 0.55; }

/* Die Kachel um das Symbol: Sie gibt den Zeilen einen gemeinsamen linken Rand und
   verhindert, dass ein Strichsymbol nackt im Text steht. */
.gf-symbol {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--muted);
}

.gf-symbol svg { width: 18px; height: 18px; display: block; }

.gf-wahl:hover .gf-symbol {
  color: var(--accent);
  border-color: rgba(211, 178, 100, 0.35);
  background: rgba(211, 178, 100, 0.10);
}

.gf-text {
  display: grid;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
}

.gf-text strong {
  font-weight: 600;
  font-size: 0.94rem;
}

.gf-text small {
  color: var(--muted);
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gf-pfeil {
  flex: 0 0 auto;
  color: var(--muted);
  display: inline-flex;
  transition: transform 0.15s ease, color 0.15s ease;
}

.gf-pfeil svg { width: 16px; height: 16px; display: block; }

.gf-wahl:hover .gf-pfeil {
  color: var(--ink);
  transform: translateX(2px);
}

/* Eine Zeile, die etwas endgueltig entfernt. Sie steht abgesetzt unter den anderen und
   zeigt ihre Farbe erst unter der Maus -- laut genug, um sie nicht zu uebersehen, leise
   genug, um sie nicht versehentlich zu treffen. */
.gf-wahl--gefahr .gf-symbol { color: var(--muted); }

.gf-wahl--gefahr:hover {
  border-color: rgba(224, 82, 82, 0.35);
  background: rgba(224, 82, 82, 0.06);
}

.gf-wahl--gefahr:hover .gf-symbol {
  color: var(--danger);
  border-color: rgba(224, 82, 82, 0.35);
  background: rgba(224, 82, 82, 0.1);
}

.gf-wahl--gefahr:hover .gf-text strong { color: var(--danger); }

/* -- Kopf eines Schritts -------------------------------------------------- */

.gf-kopf {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.gf-kopf h2 {
  margin: 0;
  font-size: 1.15rem;
}

.gf-kopf-text { min-width: 0; }

/* Zurueck ist ein Handgriff, keine Werbung: quadratisch, still, links neben dem Titel. */
.gf-zurueck {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  margin-top: 1px;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  box-shadow: none;
  padding: 0;
}

.gf-zurueck:hover {
  background: var(--bg-3);
  color: var(--ink);
  transform: none;
  box-shadow: none;
}

.gf-zurueck svg { width: 17px; height: 17px; display: block; }

.gf-stufe {
  margin: 0 0 3px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent);
}

.gf-hilfe {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

/* -- Blocklisten (Zugewiesenes, Schritte, Lehrtexte, Fragen) -------------- */

.gf-block {
  display: grid;
  gap: 1px;
  border-radius: 2px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--border);
}

.gf-blocktitel {
  margin: 0;
  padding: 11px 16px 9px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--muted);
  background: var(--bg-2);
}

/* Die Zeilen sitzen buendig untereinander, getrennt durch eine Haarlinie -- eine Liste,
   keine Sammlung einzelner Kaesten. */
.gf-zeile-fest {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-2);
}

.gf-zeile-fest .gf-symbol {
  width: 30px;
  height: 30px;
  border-radius: 2px;
}

.gf-zeile-fest .gf-symbol svg { width: 16px; height: 16px; }

.gf-nummer {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.gf-erledigt .gf-nummer {
  background: rgba(211, 178, 100, 0.16);
  color: var(--accent);
}

.gf-erledigt .gf-text strong { color: var(--muted); }

/* Handgriffe am Ende einer Zeile: still, eckig, gleich gross. Die runde rote Pille des
   uebrigen Portals schreit in einer Liste lauter als der Eintrag selbst. */
.gf-zeile-fest .button-ghost,
.gf-zeile-fest .button-danger {
  margin-left: auto;
  border-radius: 2px;
  padding: 5px 11px;
  font-size: 0.78rem;
  font-weight: 500;
}

.gf-zeile-fest .button-ghost { color: var(--muted); }
.gf-zeile-fest .button-ghost:hover { color: var(--ink); background: rgba(255, 255, 255, 0.05); }

.gf-zeile-fest .button-danger {
  margin-left: 0;
  border-color: transparent;
  color: var(--muted);
}

.gf-zeile-fest .button-danger:hover {
  color: var(--danger);
  border-color: rgba(224, 82, 82, 0.35);
  background: rgba(224, 82, 82, 0.08);
}

/* Steht nur ein Knopf in der Zeile, schiebt ihn margin-left an den Rand; stehen zwei,
   uebernimmt das der erste und der zweite folgt direkt. */
.gf-zeile-fest .button-ghost + .button-danger { margin-left: 0; }

/* -- Hinweise ------------------------------------------------------------- */

.gf-hinweis {
  margin: 0;
  padding: 13px 16px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-left-width: 3px;
  font-size: 0.9rem;
  font-weight: 500;
}

.gf-hinweis--ok   { border-left-color: var(--accent); }
.gf-hinweis--warn { border-left-color: #d8a34a; }
.gf-hinweis--err  { border-left-color: var(--danger); color: var(--danger); }

.gf-text-block {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.6;
}

.gf-leer {
  margin: 0;
  padding: 26px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  border: 1px dashed var(--border);
  border-radius: 2px;
}

@media (max-width: 620px) {
  #gefuehrt-kopf { padding: 14px 16px; }
  #gefuehrt-buehne { padding: 20px 16px 22px; }
  .gf-kopf-rechts { width: 100%; justify-content: flex-start; }
}

/* == Gezeichnete Symbole (symbole.js) =====================================
   Sie stehen in Knoepfen und Links jeder Groesse, deshalb 1em: Das Symbol waechst mit der
   Schrift, in der es sitzt. Der kleine Versatz nach unten setzt es auf dieselbe optische
   Linie wie die Buchstaben daneben -- ein Quadrat auf der Grundlinie wirkt sonst zu hoch.
   Wer eine feste Groesse braucht, setzt sie ueber seine eigene Regel (z. B. .gf-symbol svg). */
.ikon {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  vertical-align: -0.14em;
}

/* In einer Beschriftung folgt gleich ein Wort: ein Hauch Luft dazwischen. */
button > .ikon,
a > .ikon,
.title > .ikon {
  margin-right: 0.15em;
}

/* == Vollstaendige Ansicht im Supervisor-Portal ============================
   Dieselbe Sprache wie der gefuehrte Einstieg (Ansage Corvin 21.09.). Bis 07.10. galt sie
   NUR im Supervisor-Portal; seither traegt auch /admin die Klasse portal-supervisor
   (Ansage 07.10.: "das Admin-Portal stilistisch an das Supervisor-Portal angleichen").
   Was nur der Adminbereich braucht, steht am Ende der Datei unter portal-admin. */

/* -- Kopfbereich ---------------------------------------------------------- */

/* Das Firmenbild als seitenfuellendes Wasserzeichen: siehe Begruendung weiter oben. */
body.portal-branded.portal-supervisor::before { display: none; }
body.portal-branded.portal-supervisor .hero::before { display: none; }

body.portal-supervisor .hero {
  padding: 15px 22px;
  border-radius: 2px;
  background-image: none;
}

/* Firmenname gross, Rolle klein darunter -- dieselbe Ordnung wie in der schlichten
   Ansicht. Die Vorlage nennt das obere Feld "eyebrow" und das untere "h1"; hier zaehlt,
   was drinsteht, nicht wie es heisst. */
body.portal-supervisor .hero .eyebrow {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
  color: var(--ink);
}

body.portal-supervisor .hero h1 {
  margin: 1px 0 0;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--muted);
}

body.portal-supervisor .hero .subtitle { display: none; }
/* Firmenlogos sind meist Schriftzuege, keine Quadrate. Auf 32 mal 32 gezwungen wird
   daraus ein Fleck; so bleibt der Schriftzug lesbar. */
body.portal-supervisor .hero-logo {
  width: auto;
  max-width: 104px;
  height: 24px;
  object-fit: contain;
  border-radius: 0;
}

body.portal-supervisor .hero .lang-toggle {
  border-radius: 2px;
  padding: 6px 10px;
  font-size: 0.8rem;
  color: var(--muted);
}

/* -- Reiter --------------------------------------------------------------- */

/* Das Portal hatte seit dem 21.09. eine eigene, ruhigere Fassung dieser Leiste, waehrend
   /admin die alte laute behielt. Zwei Entwuerfe fuer dieselbe Leiste -- und zu sehen
   bekam Corvin die schlechtere. Jetzt gilt ein Aussehen fuer beide (siehe .nav oben),
   hier steht nur noch, was das Portal wirklich anders braucht. */
/* Das Portal gibt seinen Flaechen einen eigenen Innenabstand (body.portal-supervisor
   .panel). Die Reiterleiste bringt ihren selbst mit, sonst steht sie doppelt so hoch
   wie im Adminbereich -- gemessen 92 statt 50 Punkte. */
body.portal-supervisor .nav { border-radius: 2px; }

/* Der Firmenname steht schon in der Kopfzeile darueber. Ein zweites Mal in der
   Reiterleiste ist keine Information, sondern Wiederholung. */
body.portal-supervisor .nav-brand { display: none; }

body.portal-supervisor .nav-user {
  margin-right: 10px;
  font-size: 0.82rem;
}

body.portal-supervisor .nav-user-label { font-size: 0.66rem; }


body.portal-supervisor .nav-logout {
  border-radius: 2px;
  font-size: 0.8rem;
  color: var(--muted);
}

/* -- Bereiche ------------------------------------------------------------- */

body.portal-supervisor .panel {
  border-radius: 2px;
  padding: 20px 22px 22px;
}

/* Nach body.portal-supervisor .panel, nicht davor: Beide Regeln sind gleich spezifisch,
   also gewinnt die spaetere. Ohne diese Zeile erbt die Reiterleiste den Innenabstand der
   Flaechen und steht doppelt so hoch wie im Adminbereich (gemessen 92 statt 50). */
body.portal-supervisor .nav { padding: 0; }

body.portal-supervisor .panel-header { gap: 10px; }

/* Die Handgriffe schiebt .kopf-aktionen nach rechts, nicht mehr die Ueberschrift: Sonst
   stuende die Zahl neben ihr am anderen Ende der Zeile. */
body.portal-supervisor .panel-header h2 {
  font-size: 1.15rem;
}

/* -- Karten --------------------------------------------------------------- */

body.portal-supervisor .card {
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.022);
  padding: 15px 16px;
}

body.portal-supervisor .card .title,
body.portal-supervisor .emp-name {
  font-size: 0.95rem;
}

/* Handgriffe an einer Karte: gleich gross, gleich still. Das rot umrandete "Loeschen"
   stand bisher genauso laut da wie "Bearbeiten", obwohl es das Seltenere und das
   Gefaehrlichere ist. */
body.portal-supervisor .card .button-ghost,
body.portal-supervisor .card .button-danger,
body.portal-supervisor .card-actions .button-ghost,
body.portal-supervisor .card-actions .button-danger {
  border-radius: 2px;
  padding: 5px 11px;
  font-size: 0.78rem;
  font-weight: 500;
  box-shadow: none;
}

/* Frueher grau -- ein grauer Knopf sieht abgeschaltet aus. Jetzt wie ueberall. */
body.portal-supervisor .card .button-ghost { color: var(--ink); }
body.portal-supervisor .card .button-ghost:hover { color: var(--ink); background: rgba(255, 255, 255, 0.05); }

body.portal-supervisor .card .button-danger {
  border-color: transparent;
  color: var(--muted);
}

body.portal-supervisor .card .button-danger:hover {
  color: var(--danger);
  border-color: rgba(224, 82, 82, 0.35);
  background: rgba(224, 82, 82, 0.08);
}

/* Der Modultitel stand in der Mitte der Zeile: Die Kopfzeile verteilt ihre drei Kinder
   mit space-between, und das mittlere landet damit zwischen Bild und Knoepfen. In einer
   Liste gehoert der Titel an den linken Rand, damit die Augen eine Kante haben. */
body.portal-supervisor .emp-header .question-prompt {
  flex: 1 1 auto;
  text-align: left;
}

/* -- Merkmale ------------------------------------------------------------- */

/* EINE Farbe fuer alles, was ein Merkmal ist: Nummer, Abteilung, Firma, PIN, Modul,
   Kategorie. Vorher trug jede Sorte ihre eigene -- blau, gruen, violett, tuerkis --, und
   die Karte sah aus wie ein Farbkasten, ohne dass die Farben etwas bedeutet haetten. */
body.portal-supervisor .emp-badge,
body.portal-supervisor .emp-badge--id,
body.portal-supervisor .emp-badge--company,
body.portal-supervisor .emp-badge--pin,
body.portal-supervisor .topic-chip,
body.portal-supervisor .question-category {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid transparent;
  color: var(--muted);
  border-radius: 2px;
  font-weight: 500;
}

/* NACHTRAG 25.09.: EINE Farbe war richtig, EIN Gewicht war zu wenig.
   Als jedes Merkmal denselben Grauton in derselben Staerke bekam, war die Karte zwar
   ruhig, aber auch flach -- man sah nicht mehr, was man eigentlich sucht. Die Loesung ist
   nicht der Farbkasten von frueher, sondern eine Rangfolge: Genau zwei Dinge treten
   heraus, und zwar die, nach denen man tatsaechlich sucht. */

/* Die Personalnummer ist der Name der Zeile, nicht ein Merkmal unter vielen. Sie tritt
   ueber das GEWICHT heraus, nicht ueber eine Farbe. */
body.portal-supervisor .emp-badge--id {
  color: var(--ink);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.085);
}

/* Die PIN ist das einzige Merkmal, das ein Geheimnis ist. Sie darf als einzige einen
   Akzent tragen -- damit sieht man auf einen Blick, wo auf dem Schirm etwas steht, das
   nicht jeder mitlesen soll. */
body.portal-supervisor .emp-badge--pin {
  color: var(--accent);
  background: rgba(211, 178, 100, 0.1);
}

/* Die Rolle ist KEIN Merkmal unter vielen, sondern eine Befugnis -- sie darf als einzige
   Farbe tragen. */
body.portal-supervisor .role-tag { border-radius: 2px; }

/* -- Fortschrittsbalken --------------------------------------------------- */

body.portal-supervisor .progress-bar,
body.portal-supervisor .emp-progress {
  border-radius: 2px;
}

/* ── Bild zuschneiden (zuschneiden.js, Ansage 21./22.09.) ──────────────────
   Eigene Klassen statt .modal: Dieses Fenster ist breiter als alle anderen, es hat
   keinen scrollenden Rumpf, und der Rahmen darin muss pixelgenau ueber der Leinwand
   sitzen. Es in .modal zu pressen hiesse, an fuenf Stellen dagegen anzuschreiben. */
.zs-hinter {
  position: fixed;
  inset: 0;
  z-index: 200;                     /* ueber dem normalen Dialog: es wird AUS ihm geoeffnet */
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 20px;
}

body.zs-offen { overflow: hidden; }

.zs-fenster {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 2px;
  box-shadow: 0 32px 80px -20px var(--shadow);
  padding: 20px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  /* Keine vw/vh-Rechnung hier: Der Rand der Hintergrundflaeche begrenzt das Fenster,
     und dieselbe Flaeche misst das Skript aus (siehe anzeigeBerechnen). vw und
     window.innerWidth gehen auseinander, sobald der Browser zoomt. */
  max-width: 1140px;
  max-height: 100%;
}

.zs-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.zs-titel { font-size: 1.02rem; font-weight: 600; }

/* padding: 0 ist hier kein Feinschliff, sondern der Fix: Eine globale Knopfregel gibt
   JEDEM Knopf 11px/22px Innenabstand. Ein Knopf kann nicht unter seinen Mindestinhalt
   schrumpfen, also wurde aus dem 32er Kreis ein Oval von 46 Punkten Breite (gemessen).
   flex: 0 0 auto haelt ihn ausserdem rund, wenn der Titel lang wird. */
.zs-x {
  width: 32px;
  height: 32px;
  padding: 0;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-3);
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.zs-x:hover { background: var(--bg); color: var(--ink); }

/* Die Formate. Eine Reihe, die bei schmalem Fenster umbricht statt zu scrollen --
   ein waagerechter Balken, in dem die Haelfte versteckt ist, wird nicht benutzt. */
.zs-formate {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Schmale Marken in einer Zeile statt achtmal zwei Zeilen. Der Block oben war fast so
   laut wie das Bild darunter; das Bild ist aber die Hauptsache. */
.zs-format {
  padding: 6px 11px;
  border-radius: 2px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.2;
  text-transform: none;
  letter-spacing: 0;
}
.zs-format:hover { border-color: var(--border-strong, rgba(255,255,255,0.18)); color: var(--ink); }

.zs-format--an {
  border-color: var(--accent);
  background: rgba(211, 178, 100, 0.16);
  color: var(--ink);
  font-weight: 600;
}

.zs-buehne {
  display: grid;
  place-items: center;
  min-height: 0;
}

.zs-flaeche {
  position: relative;
  /* Ein feiner Rahmen, damit ein helles Bild nicht in die dunkle Flaeche ausfranst. */
  outline: 1px solid var(--border);
  outline-offset: 0;
  /* Der eigene Schatten des Rahmens dunkelt alles ausserhalb ab; ohne diesen Schnitt
     liefe er ueber das ganze Fenster. */
  overflow: hidden;
  border-radius: 2px;
  touch-action: none;               /* sonst scrollt das Ziehen die Seite */
  cursor: crosshair;
  user-select: none;
}

.zs-bild { display: block; }

.zs-rahmen {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.9);
  cursor: move;
  box-sizing: border-box;
}

/* Drittel-Linien. Sie sind der Grund, warum ein Ausschnitt auf Anhieb sitzt, und sie
   kosten nichts: ein Verlauf, kein Element. */
.zs-raster {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background:
    linear-gradient(to right, transparent calc(33.333% - 0.5px), #fff calc(33.333% - 0.5px), #fff calc(33.333% + 0.5px), transparent calc(33.333% + 0.5px)),
    linear-gradient(to right, transparent calc(66.666% - 0.5px), #fff calc(66.666% - 0.5px), #fff calc(66.666% + 0.5px), transparent calc(66.666% + 0.5px)),
    linear-gradient(to bottom, transparent calc(33.333% - 0.5px), #fff calc(33.333% - 0.5px), #fff calc(33.333% + 0.5px), transparent calc(33.333% + 0.5px)),
    linear-gradient(to bottom, transparent calc(66.666% - 0.5px), #fff calc(66.666% - 0.5px), #fff calc(66.666% + 0.5px), transparent calc(66.666% + 0.5px));
}

/* Die Griffe sind absichtlich groesser als sie aussehen (14 px Trefferflaeche bei 8 px
   Punkt): An der Kante eines Bildes trifft man sonst danebenen. */
.zs-griff {
  position: absolute;
  width: 14px;
  height: 14px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.45);
  border-radius: 2px;
  transform: translate(-50%, -50%);
}
.zs-griff--nw { left: 0;    top: 0;    cursor: nwse-resize; }
.zs-griff--n  { left: 50%;  top: 0;    cursor: ns-resize; }
.zs-griff--ne { left: 100%; top: 0;    cursor: nesw-resize; }
.zs-griff--e  { left: 100%; top: 50%;  cursor: ew-resize; }
.zs-griff--se { left: 100%; top: 100%; cursor: nwse-resize; }
.zs-griff--s  { left: 50%;  top: 100%; cursor: ns-resize; }
.zs-griff--sw { left: 0;    top: 100%; cursor: nesw-resize; }
.zs-griff--w  { left: 0;    top: 50%;  cursor: ew-resize; }

.zs-fuss {
  display: flex;
  align-items: center;
  /* NICHT space-between: Die Warnzeile ist meistens leer und dann ausgeblendet, und dann
     haette space-between die Knoepfe nach links gezogen. So stehen sie immer rechts, und
     eine Warnung schiebt sich links daneben. */
  justify-content: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

/* Formate links, Zielgroesse rechts, eine Zeile. Auf schmalen Schirmen untereinander. */
.zs-leiste {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.zs-masse { color: var(--muted); font-size: 0.85rem; margin-right: auto; }
.zs-masse:empty { display: none; }
.zs-masse strong { color: var(--ink); font-weight: 600; }
.zs-notiz { opacity: 0.7; }
.zs-warn { color: #e0a852; }
.zs-warn + .zs-warn, .zs-warn + .zs-notiz { margin-left: 8px; }

/* ZIELGROESSE VON HAND (22.09.). Die Felder stehen unter der Ausschnitt-Zeile, nicht
   neben den Knoepfen: Links steht, was das Bild ist, rechts, was mit ihm geschieht. */
.zs-groesse {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--muted);
  flex-wrap: wrap;
}
.zs-groesse label { display: flex; align-items: center; gap: 5px; }
.zs-groesse input {
  width: 72px;
  padding: 4px 6px;
  font-size: 0.82rem;
  text-align: right;
  /* Die Pfeilchen des Zahlenfeldes fressen bei dieser Breite die Haelfte des Platzes und
     laden zum Klicken ein, wo man tippen will. Tippen und Pfeiltasten bleiben. */
  -moz-appearance: textfield;
  appearance: textfield;
}
.zs-groesse input::-webkit-outer-spin-button,
.zs-groesse input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.zs-gmal { opacity: 0.6; }
.zs-geinheit { opacity: 0.7; margin-left: 2px; }

/* ── Verwaiste Dateien (22.09.) ──────────────────────────────────────────────
   Nutzt den Rahmen des Zuschneide-Fensters (.zs-hinter/.zs-fenster), damit im Portal
   nicht ein zweiter Dialogstil entsteht. */
.wa-fenster { max-width: 720px; }
.wa-inhalt { display: flex; flex-direction: column; gap: 10px; }
.wa-lade { color: var(--muted); font-size: 0.9rem; margin: 8px 0; }
.wa-kopfzeile { margin: 0; font-size: 0.92rem; }
.wa-hinweis { margin: 0; font-size: 0.8rem; color: var(--muted); }
.wa-alle { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--muted); }
.wa-liste {
  max-height: 340px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 2px;
}
.wa-zeile {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 7px 12px;
  font-size: 0.82rem;
  cursor: pointer;
}
.wa-zeile:nth-child(odd) { background: rgba(255, 255, 255, 0.025); }
.wa-zeile:hover { background: rgba(255, 255, 255, 0.05); }
/* Dateinamen so zeigen, WIE SIE HEISSEN. Eine Regel weiter oben setzt in dieser
   Gegend text-transform: uppercase; aus ".png" wurde damit ".PNG", und das ist bei
   einem Dateinamen keine Kosmetik, sondern falsch. */
.wa-name { font-family: ui-monospace, monospace; word-break: break-all; text-transform: none; }
.wa-byte, .wa-datum, .wa-zeile { text-transform: none; }
.wa-byte, .wa-datum { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.wa-fuss { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.wa-gewaehlt { font-size: 0.85rem; color: var(--muted); }

/* Die tatsaechliche Ausgabe hinter dem Pfeil, wenn die lange Kante gedeckelt wurde. */
.zs-maszahl-ziel { color: var(--accent, #4CD9F2); }

/* DIE MASZAHL AM RAHMEN. Sie sitzt ueber dem Ausschnitt und rutscht darunter, wenn er
   oben am Bildrand klebt -- sonst staende sie ausserhalb der Flaeche. Sie faengt keine
   Klicks ab, sonst liesse sich der Rahmen an ihrer Stelle nicht mehr fassen. */
.zs-maszahl {
  position: absolute;
  left: 50%;
  top: -27px;
  transform: translateX(-50%);
  padding: 1px 7px;
  border-radius: 2px;
  background: rgba(15, 17, 20, 0.85);
  color: #e8edf2;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  pointer-events: none;
}
.zs-rahmen--maszahl-unten .zs-maszahl { top: auto; bottom: -27px; }
/* Kein Platz aussen (Rahmen fuellt das Bild): dann innen an der Oberkante, aber
   tief genug, dass sie nicht auf der oberen Griffmarke sitzt. */
.zs-rahmen--maszahl-innen .zs-maszahl { top: 12px; }

.zs-knoepfe { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Abbrechen ist der Rueckweg, nicht das Angebot: still, ohne Rahmen. So stehen im Fuss
   nicht drei gleich schwere Knoepfe nebeneinander. */
.zs-still {
  background: none;
  border: none;
  box-shadow: none;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 8px 6px;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
}
.zs-still:hover { color: var(--ink); background: none; transform: none; box-shadow: none; }

@media (max-width: 560px) {
  .zs-fenster { padding: 14px 14px 12px; }
  .zs-format { padding: 6px 9px; }
  .zs-fuss { justify-content: center; }
  .zs-leiste { justify-content: center; }
  .zs-groesse { justify-content: center; width: 100%; }
  .zs-knoepfe { width: 100%; }
  .zs-knoepfe button { flex: 1; }
}

/* Der Knopf zum nachtraeglichen Zuschneiden, neben der Ablageflaeche. */
.bild-zuschneiden-knopf { margin-top: 8px; }

/* ── Module selbst sortieren (22.09.) ──────────────────────────────────────
   Die Griffe sind ruhig: Sie sollen da sein, wenn man sie sucht, und nicht um
   Aufmerksamkeit bitten, waehrend man etwas anderes tut. */
.modul-griff {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  cursor: grab;
  margin-right: 2px;
  flex: 0 0 auto;
}
.modul-griff:active { cursor: grabbing; }
/* Ohne das scrollt ein Tablet beim Ziehen die Seite, statt das Modul zu bewegen. */
.modul-griff { touch-action: none; }
.modul-griff svg { width: 18px; height: 18px; }

.modul-pfeile { display: inline-flex; gap: 2px; margin-left: auto; flex: 0 0 auto; }

.modul-pfeile button {
  padding: 3px 6px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}
.modul-pfeile button svg { width: 15px; height: 15px; }
.modul-pfeile button:disabled { opacity: 0.25; cursor: default; }

/* Was gerade gezogen wird, tritt zurueck; wo es landen wuerde, zeigt eine Linie.
   Eine Linie und keine Fuellflaeche: Die Karte darunter soll lesbar bleiben. */
/* Seit 29.09. Tabellenzeilen: Der Schatten sitzt an den Zellen, an einer Zeile mit
   border-collapse zeichnet ihn nicht jeder Browser. */
.modul-zeile.modul-zieht > td { opacity: 0.4; }
.modul-zeile.modul-ziel-oben > td  { box-shadow: inset 0 3px 0 0 var(--accent); }
.modul-zeile.modul-ziel-unten > td { box-shadow: inset 0 -3px 0 0 var(--accent); }

/* ── Module als Tabelle (29.09.) ─────────────────────────────────────────────
   Dieselbe .ma-tabelle wie Mitarbeiter, Lehrplan und Brillen. Der Modulname nimmt den
   Rest der Breite und kuerzt mit "..."; schmaler fallen erst Bestehen, dann die Zahlen weg. */
.modul-tabelle > tbody > tr > td.mo-sp-modul { width: 100%; max-width: 0; }
.modul-tabelle .modul-name-block { min-width: 0; }
.modul-tabelle .modul-name-block .ma-name { overflow: hidden; text-overflow: ellipsis; }
.modul-tabelle > thead > tr > th.mo-sp-zahl,
.modul-tabelle > tbody > tr > td.mo-sp-zahl { text-align: right; }
.modul-tabelle .modul-griff svg { width: 16px; height: 16px; }
.modul-tabelle .modul-pfeile { margin-left: 0; }
.modul-mini {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 2px;
  object-fit: cover;
}
.modul-mini--leer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}
.modul-mini--leer .ikon { width: 16px; height: 16px; }
.modul-details { display: grid; gap: 10px; }
.modul-beschreibung { margin: 0; color: var(--ink); }
.modul-spruenge { display: flex; gap: 8px; flex-wrap: wrap; }
.modul-spruenge .button-ghost { font-size: 0.8rem; }
@media (max-width: 680px) { .modul-tabelle .mo-sp-bestehen { display: none; } }
@media (max-width: 520px) { .modul-tabelle .mo-sp-zahl { display: none; } }
/* Seit 30.09. steht in der Zeile unter dem Namen auch der Fassungsstand. Wird es eng, kuerzt
   sie mit "..." wie der Name darueber, statt unter die Nachbarspalte zu laufen. */
.modul-tabelle .modul-name-block .ma-rolle-klein { overflow: hidden; text-overflow: ellipsis; }

/* ── Rückfragen, die man nicht wegklickt (bestaetigen.js, 22.09.) ──────────
   Eigenes Fenster statt window.confirm: Das ist der einzige Weg, den Namen abfragen
   zu können und den gefährlichen Knopf so lange tot zu lassen. */
.bs-hinter {
  position: fixed;
  inset: 0;
  z-index: 300;                  /* ueber Dialog UND Zuschneidefenster */
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 20px;
}

body.bs-offen { overflow: hidden; }

.bs-fenster {
  width: min(520px, 100%);
  background: var(--bg-2);
  border: 1px solid rgba(224, 82, 82, 0.35);
  border-radius: 2px;
  box-shadow: 0 32px 80px -20px var(--shadow);
  padding: 22px 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Eine Rueckfrage ohne Gefahr traegt keinen roten Rand (ruhig: true, 28.09.). */
.bs-fenster.bs-ruhig { border-color: rgba(255, 255, 255, 0.1); }

.bs-kopf { display: flex; align-items: flex-start; gap: 12px; }
/* Das X oben rechts in jeder Rueckfrage (21.10.2026, Corvin: "Bei Popups bitte noch das
   klassische Schliessen mit X rechts oben anbieten"): bricht ab wie "Abbrechen". */
.bs-fenster { position: relative; }
.bs-kopf { padding-inline-end: 34px; }
.bs-x {
  position: absolute; top: 14px; inset-inline-end: 14px; width: 32px; height: 32px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: 2px; background: transparent; color: var(--muted); cursor: pointer;
}
.bs-x:hover, .bs-x:focus-visible { color: var(--ink); border-color: var(--border); }
.bs-x svg, .bs-x .ikon { width: 16px; height: 16px; }
.bs-zeichen { color: var(--danger); flex: 0 0 auto; line-height: 1; }
.bs-zeichen svg { width: 24px; height: 24px; }
.bs-titel { margin: 0; font-size: 1.05rem; font-weight: 600; }

.bs-satz { margin: 0; color: var(--ink); font-size: 0.92rem; line-height: 1.5; }

/* Was verschwindet, als Liste und nicht im Fliesstext: Zahlen liest man nur,
   wenn sie untereinander stehen. */
.bs-punkte {
  margin: 0;
  padding: 10px 14px 10px 30px;
  background: rgba(224, 82, 82, 0.08);
  border-radius: 2px;
  font-size: 0.9rem;
  line-height: 1.7;
}

.bs-nachsatz { margin: 0; color: var(--muted); font-size: 0.85rem; line-height: 1.5; }

/* Der sanfte Weg steht gross und ruhig da, nicht als Fussnote. */
.bs-alternative {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 2px;
  border: 1px solid var(--border);
  background: var(--bg-3);
  color: var(--ink);
  font-size: 0.9rem;
  cursor: pointer;
}
.bs-alternative:hover { border-color: var(--accent); background: rgba(211, 178, 100, 0.1); }

.bs-tippen {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
  /* KEINE VERSALIEN: Der Name soll so dastehen, wie er wirklich heisst -- sonst tippt
     man ihn gross ab und wundert sich. Die uebrigen Beschriftungen im Portal sind
     versal gesetzt, hier stoert das. */
  text-transform: none;
  letter-spacing: normal;
}
.bs-tippen strong { color: var(--ink); }
.bs-eingabe {
  padding: 9px 12px;
  border-radius: 2px;
  border: 1px solid var(--border);
  background: var(--bg-3);
  color: var(--ink);
  font-size: 0.95rem;
}
.bs-eingabe:focus { outline: none; border-color: var(--accent); }

.bs-knoepfe { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
/* Solange der Name nicht stimmt, sieht der Knopf auch aus wie tot. */
.bs-ok:disabled { opacity: 0.35; cursor: not-allowed; }

/* Ein Knopf, den man nicht im Vorbeifahren treffen soll, bekommt Abstand. */
.knopf-abseits { margin-left: 18px; }

/* ── Werkzeugleiste über einer Liste (22.09.) ──────────────────────────────
   Suchen, sortieren, ausblenden. Eine Zeile, die bei schmalem Fenster umbricht,
   statt zu scrollen. */
.listen-werkzeuge {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.listen-werkzeuge .questions-search { flex: 1 1 240px; margin: 0; }

.listen-werkzeuge select {
  padding: 9px 12px;
  border-radius: 2px;
  border: 1px solid var(--border);
  background: var(--bg-3);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.88rem;
}

.listen-schalter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 2px;
  border: 1px solid var(--border);
  background: var(--bg-3);
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  user-select: none;
}
.listen-schalter:hover { border-color: rgba(211, 178, 100, 0.4); }
.listen-schalter input { accent-color: var(--accent); cursor: pointer; }
.listen-schalter:has(input:checked) { color: var(--ink); border-color: var(--accent); }

/* Sagt, was gerade nicht zu sehen ist. Ruhig, aber nicht unsichtbar: Wer eine Filiale
   sucht und nicht findet, soll hier lesen können, warum. */
.listen-hinweis {
  margin: 10px 2px 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.listen-hinweis-knopf {
  border: none;
  background: none;
  padding: 0;
  margin-left: 4px;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}

/* DAS SUCHFELD JE LISTE (11.10., ListenSuche in app.js). Wer nicht zur Suche passt, traegt
   "suche-weg". Bei einer Tabellenzeile geht ihr Aufklappteil mit, ohne dass die Suche an
   dessen eigenem hidden dreht (auf oder zu merkt sich jede Liste selbst). !important, weil
   die Zeilen und Karten ihre Anzeige an vielen Stellen selbst setzen. */
.suche-weg,
tr.suche-weg + tr.ma-details-zeile { display: none !important; }
/* Steht ein Suchtext im Feld, sieht man das auch nach dem Wechsel des Reiters. */
.questions-search.suche-aktiv { border-color: var(--accent); }

/* Die Pauschale je Mitarbeiter (11.10.): eine Zeile auf der Karte der Firma, die Summe
   ueber der Liste. Der Betrag hebt sich ab, die Rechnung davor bleibt leise. */
.fil-pauschale strong, .fil-pauschale-summe strong { color: var(--ink); font-weight: 600; }
.fil-pauschale-summe { margin: 0 2px 10px; }

/* Die Admin-Konten als Tabelle (11.10.). Die Adresse nimmt den Rest und kuerzt, die Rolle ist
   eine Auswahl in der Zeile. */
.admin-tabelle > tbody > tr > td { cursor: default; }
.admin-tabelle > tbody > tr > td.ad-sp-mail { width: 100%; max-width: 0; }
.admin-tabelle > thead > tr > th.ad-sp-mail { max-width: 0; overflow: hidden; text-overflow: ellipsis; }
.admin-tabelle .role-select { min-width: 7.5rem; }
.admin-rollen-satz { margin: 12px 2px 0; }
@media (max-width: 680px) { .admin-tabelle .ad-sp-seit { display: none; } }
@media (max-width: 520px) { .admin-tabelle .ad-sp-mail { display: none; } }

/* == Personendaten im Mitarbeiter-Formular (23.09.) =========================
   Zugeklappt, weil sie zum Anlegen nicht gebraucht werden: Fuer die Brille genuegen Name
   und PIN. Der Rahmen setzt sie sichtbar vom Pflichtteil darueber ab. */
.person-block {
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.015);
}

/* Links der Winkel wie in der Mitarbeitertabelle, daneben der Titel. Bisher stand links
   ein Dreieck, rechts das Plus der allgemeinen summary-Regel und der Titel dazwischen in
   der Mitte (25.09.). */
.person-block > summary {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--ink);
  list-style: none;
}

.person-block > summary::-webkit-details-marker { display: none; }

.person-block > summary::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  margin-left: 1px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}

.person-block[open] > summary::before { transform: rotate(45deg); }
.person-block > summary::after,
.person-block[open] > summary::after { content: none; }

.person-block > .help { margin: 8px 0 4px; }
.person-block .grid { margin-top: 10px; }

/* Drei gleich breite Spalten, die nie ueberlaufen (29.09.): minmax(0, 1fr) und Felder auf
   voller Spaltenbreite. Vorher gab das automatische Raster 185 px je Spalte, die Textfelder
   blieben bei ihren 200 px und schoben sich ins Nachbarfeld. */
.person-raster { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; }
.person-raster > label { min-width: 0; }
.person-raster input { width: 100%; min-width: 0; box-sizing: border-box; }
.person-raster > .full { grid-column: 1 / -1; }
.person-raster > .person-breit { grid-column: span 2; }
@media (max-width: 560px) {
  .person-raster { grid-template-columns: minmax(0, 1fr); }
  .person-raster > .person-breit { grid-column: auto; }
}

/* PIN verdeckt, das Auge daneben (29.09.). */
.pin-verdeckt { display: inline-flex; align-items: center; gap: 4px; }
.pin-wert { font-variant-numeric: tabular-nums; letter-spacing: 0.08em; }
.pin-verdeckt .pin-auge { padding: 2px 5px; min-width: 0; border-color: transparent; line-height: 1; }
.pin-verdeckt .pin-auge:hover { border-color: rgba(255, 255, 255, 0.18); }
.pin-verdeckt .pin-auge .ikon { width: 14px; height: 14px; }
.pin-verdeckt.offen .pin-auge { color: var(--accent); }

/* Das Auge an jedem Passwortfeld (27.10.2026, passwortauge.js): Feld und Knopf in einer
   Zeile, der Knopf so hoch wie das Feld. NEBEN dem Feld, weil in seiner rechten Ecke das
   Zeichen des Passwort-Managers sitzt. Die Zeile gibt dem Feld die Breite selbst: Regeln
   wie "label > input { width: 100% }" treffen es nicht mehr, seit es in der Zeile steht. */
.pw-zeile { display: flex; align-items: stretch; gap: 6px; width: 100%; min-width: 0; }
.pw-zeile > input { flex: 1; min-width: 0; width: 0; }
.pw-zeile > .pw-auge {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  min-width: 0; padding: 0 11px; line-height: 1;
}
.pw-zeile > .pw-auge .ikon { width: 16px; height: 16px; margin: 0; }
.pw-zeile > .pw-auge.offen { color: var(--accent); }
.pin-row .pin-auge .ikon { width: 16px; height: 16px; }

/* Passwort-Abfrage im Bestaetigungsfenster */
.bs-passwort { display: grid; gap: 12px; }
.bs-fehler { margin: -4px 0 0; color: #ff9d9d; font-size: 0.8125rem; }

/* "Im Lehrplan bearbeiten" im Lehrplan-Abschnitt eines Mitarbeiters */
.ma-abschnitt-kopf .ma-plan-bearbeiten { margin-left: auto; padding: 3px 9px; font-size: 0.78rem; }
.ma-abschnitt-kopf .ma-plan-bearbeiten .ikon { width: 13px; height: 13px; }
/* Seit 30.09. stehen dort zwei Knoepfe ("Nachweis drucken" daneben): Die Huelle rueckt nach
   rechts, die Knoepfe darin stehen einfach nebeneinander. */
.ma-kopf-knoepfe { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
.ma-abschnitt-kopf .ma-kopf-knoepfe .ma-plan-bearbeiten { margin-left: 0; }
/* Wird es eng (Telefon), rutschen die Knoepfe unter die Ueberschrift, statt den Aufklappteil
   breiter zu druecken als das Fenster. */
.ma-abschnitt-kopf { flex-wrap: wrap; row-gap: 6px; }

/* ── Fristen (30.09.) ─────────────────────────────────────────────────────────
   Die naechste Wiederholung als Datum: in der Tabelle, in den Angaben und je Modul im
   Lehrplan-Abschnitt. Rot nur, wenn sie ueberfaellig ist. */
.ma-faellig { font-variant-numeric: tabular-nums; color: var(--ink); }
.ma-faellig.ueber { color: #ff9d9d; }
.ma-faellig-modul { margin-top: 2px; color: var(--muted); }
.ma-schritt--frist { color: var(--muted); }
.ma-schritt--frist.ueber { color: #ff9d9d; }
/* In der Tabelle als zweite Zeile unter dem naechsten Schritt, klein wie die Rolle unter
   dem Namen: Kalenderblatt und Datum. Der volle Satz steht am Zeiger. */
.ma-frist-zeile { display: flex; align-items: center; gap: 5px; margin-top: 3px; font-size: 0.72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.ma-frist-zeile > .ikon { flex: none; width: 11px; height: 11px; }
.ma-frist-zeile.ueber { color: #ff9d9d; }

/* Ankreuzfeld im Bestaetigungsfenster ("Auch die Nachweise loeschen"). Ohne Versalien, wie
   das Abtippfeld darueber: Der Satz soll sich lesen wie ein Satz. */
.bs-haken {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.45;
  text-transform: none;
  letter-spacing: normal;
  cursor: pointer;
}
.bs-haken input { flex: none; width: auto; margin: 3px 0 0; }


/* ═══ Mitarbeiterliste als Tabelle (25.09.) ═══════════════════════════════════
   Eine Zeile je Person; ein Klick auf die Zeile klappt die Einzelheiten darunter auf.
   Corvin hat Tabelle, kompakte Liste und Raster nebeneinander gesehen und die Tabelle
   genommen. Die aeusseren Regeln haengen mit ">" an Zeile und Zelle: Im Aufklappteil steckt
   eine zweite Tabelle (Pruefungsversuche), und die soll davon nichts erben. */

.ma-tabelle {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.ma-tabelle > thead > tr > th {
  padding: 8px 12px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

/* KEIN UMBRUCH IN DEN KURZEN SPALTEN. Vorher nahm "Naechster Schritt" 300 px und
   drueckte Name und Nummer zusammen, bis "BK-005" in zwei Zeilen stand. */
.ma-tabelle > tbody > tr > td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  white-space: nowrap;
}

.ma-tabelle > tbody > tr.ma-zeile { cursor: pointer; }
.ma-tabelle > tbody > tr.ma-zeile:hover > td { background: rgba(255, 255, 255, 0.025); }
.ma-tabelle > tbody > tr.ma-zeile.offen > td {
  background: rgba(255, 255, 255, 0.04);
  border-bottom-color: transparent;
}
.ma-tabelle > tbody > tr.ma-zeile:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* Der Winkel vor dem Namen sagt, dass die Zeile aufgeht, und dreht sich beim Oeffnen. */
.ma-name-zelle { display: flex; align-items: center; gap: 10px; }
.ma-pfeil {
  flex: none;
  width: 6px;
  height: 6px;
  margin-left: 2px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}
.ma-zeile.offen .ma-pfeil { transform: rotate(45deg); }
/* Von rechts nach links zeigt der geschlossene Pfeil nach links (20.10.2026). */
html[dir="rtl"] .ma-pfeil { transform: rotate(135deg); margin-left: 0; margin-right: 2px; }
html[dir="rtl"] .ma-zeile.offen .ma-pfeil { transform: rotate(45deg); }

.ma-name { font-weight: 600; color: var(--ink); }
/* NAME UND ABTEILUNG DER PERSON HABEN EINE HOECHSTBREITE (11.10.). Bis dahin standen beide
   in voller Laenge in einer Zeile, und nur "Naechster Schritt" gab nach. Mit sechs
   Abteilungen je Person ("Produktion, Verkauf, Lager, Logistik, Buero, Backstube") war die
   Tabelle breiter als die Seite, und unter einer Brille ragte sie aus ihrem Kasten.
   Jetzt: so breit wie der Inhalt, hoechstens elf Zeichenbreiten, dann eine zweite Zeile,
   erst danach "...". Das Ganze steht im Tipp und im Aufklappteil unter "Angaben".
   width max-content ist der Kern: Ohne das druecken "Naechster Schritt" (nimmt den Rest) und
   die Tabelle die Spalte auf ihr laengstes Wort zusammen, und "Lena Bauer" stuende in zwei
   Zeilen. Die Summe der Hoechstbreiten ist so gewaehlt, dass alle Spalten auch im
   schlimmsten Fall in die Seite passen; wer eine aendert, misst mit langen Eintraegen nach. */
.ma-zweizeilig {
  width: max-content;
  max-width: 11rem;
  white-space: normal;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  line-height: 1.3;
}
.ma-rolle-klein { margin-top: 2px; font-size: 0.72rem; color: var(--muted); }
.ma-nr { color: var(--muted); }  /* ohne tabular-nums: Inter setzt damit auch den Bindestrich breit ("BK - 005") */
.ma-zahl { font-variant-numeric: tabular-nums; }

.ma-fortschritt { display: flex; align-items: center; gap: 10px; width: 150px; }
/* In der Tabelle der Personen 124 statt 150 (11.10.): Die 26 Bildpunkte gehen an "Naechster
   Schritt", der sonst neben einer zweizeiligen Abteilung kaum noch zu lesen war. Der Lehrplan
   benutzt denselben Balken und behaelt seine Breite. */
.ma-personen .ma-fortschritt { width: 124px; }
.ma-balken {
  flex: 1 1 auto;
  height: 6px;
  border-radius: 2px;
  overflow: hidden;
  /* Die Schiene muss man auch leer sehen, sonst wirkt die Spalte unausgefuellt. */
  background: rgba(255, 255, 255, 0.08);
}
.ma-balken > span { display: block; height: 100%; background: var(--accent); }
.ma-balken > span.fertig { background: #6ee7a8; }
.ma-prozent {
  flex: 0 0 auto;
  min-width: 46px;
  text-align: right;
  font-size: 0.8rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* "Naechster Schritt" nimmt den Rest und kuerzt mit "...". Der Kniff dafuer: width 100 %
   plus max-width 0 an dieser einen Zelle. */
.ma-tabelle > tbody > tr > td.ma-sp-stand { width: 100%; max-width: 0; }
/* Auch die UEBERSCHRIFT der Spalte gibt nach (11.10.). Sie steht in einer Zeile, und ihre
   117 Bildpunkte waren die Mindestbreite der ganzen Spalte: Wo es eng wurde, schob sie das
   Auge rechts aus dem Kasten, statt selbst zu kuerzen. */
.ma-tabelle > thead > tr > th.ma-sp-stand { max-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ma-stand .emp-stand { margin: 0; }
.ma-stand .emp-stand-label {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.8rem;
  color: var(--muted);
}
.ma-stand .emp-stand-label strong { color: var(--ink); font-weight: 500; }
/* "Jetzt dran:" steht schon als "Naechster Schritt" im Spaltenkopf, der Stand in der
   Fortschrittsspalte. */
.ma-stand .emp-stand-vor,
.ma-stand .emp-stand-schritt { display: none; }

.ma-tabelle > thead > tr > th.ma-sp-akt,
.ma-tabelle > tbody > tr > td.ma-sp-akt { width: 1%; text-align: right; }
.ma-aktionen { justify-content: flex-end; gap: 2px; flex-wrap: nowrap; }
/* Nur Symbole, also quadratisch. Die Supervisor-Regel fuer Kartenknoepfe (5px 11px) ist
   genauso spezifisch; "body" davor und die spaetere Stelle in der Datei entscheiden. */
body .card-actions.ma-aktionen .button-ghost { padding: 5px 7px; min-width: 30px; }

/* Schmale Fenster: erst Abteilung und Module weg, dann Nummer und naechster Schritt. Was
   dabei aus der Zeile faellt, steht im Aufklappteil unter "Angaben".
   Die Grenzen (bis 11.10.: 900 und 680) folgen aus den Hoechstbreiten oben: An jeder Grenze
   muessen die Spalten, die noch stehen, auch mit langem Namen, langer Nummer und drei
   Knoepfen in die Seite passen. Darunter ist auch der Name schmaler und der Balken kuerzer. */
@media (max-width: 980px) {
  .ma-tabelle .ma-sp-abt, .ma-tabelle .ma-sp-mod { display: none; }
}
@media (max-width: 720px) {
  .ma-tabelle .ma-sp-nr, .ma-tabelle .ma-sp-stand { display: none; }
}
@media (max-width: 680px) {
  .ma-personen .ma-zweizeilig { max-width: 8.5rem; }
  .ma-personen .ma-fortschritt { width: 96px; }
  .ma-personen .ma-prozent { min-width: 38px; }
}

/* -- Aufklappteil ------------------------------------------------------------ */

.ma-tabelle > tbody > tr.ma-details-zeile > td {
  /* Links buendig mit dem Namen: Zellrand 12 px, Winkel 8 px, Abstand 10 px. */
  padding: 4px 16px 22px 30px;
  background: rgba(255, 255, 255, 0.04);
  white-space: normal;
  cursor: default;
}

.ma-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px 36px;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.ma-details h4 {
  margin: 0 0 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
}

/* DIE LINKE SPALTE IST SO BREIT WIE IHR PLATZ, NICHT WIE IHR LAENGSTER TEXT (14.10.2026).
   Gemeldet mit Bildschirmfoto: Im Aufklappteil lagen "Im Lehrplan bearbeiten", die Spalte
   "Antworten" und die Fragen unter "Angaben". Ursache war die Liste "Fragen": Ihre Texte stehen
   einzeilig mit "..." am Ende, und die eine Spalte dieses Rasters (ohne Angabe "auto") nahm
   sich die volle Laenge des laengsten Fragetexts. Mit langen Fragen ragte die ganze linke
   Haelfte bis zu 285 Bildpunkte in die rechte, bei jeder Fensterbreite. Lokal fiel es nicht auf,
   weil die Testpersonen keine Fragen mit Fehlern hatten. Jetzt ist die Spalte minmax(0, 1fr),
   jeder Abschnitt darf schmaler werden als sein Inhalt, und die Knoepfe im Kopf eines
   Abschnitts ruecken in eine zweite Zeile, wenn neben der Ueberschrift kein Platz ist. */
.ma-details-haupt { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; align-content: start; min-width: 0; }
.ma-details-haupt > * { min-width: 0; }
.ma-abschnitt-kopf { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin-bottom: 6px; }
.ma-abschnitt-kopf h4 { margin: 0; }
.ma-abschnitt-zusatz { color: var(--muted); }
.ma-leise { margin: 4px 0 0; color: var(--muted); }
.ma-fehler { margin: 4px 0 0; color: #ff9d9d; }

/* Lehrplan: eine Zeile je Modul, Linien statt Kaesten. */
.ma-plan { border-top: 1px solid var(--border); }
.ma-plan-zeile {
  display: grid;
  /* Die letzte Spalte fest statt auto: Jede Zeile ist ihr eigenes Raster, und mit auto
     rutschten die Schritte einer Zeile mit "Nachweis" gegen die ohne nach links. */
  grid-template-columns: minmax(120px, 1fr) minmax(0, 1.6fr) 116px;
  align-items: center;
  gap: 4px 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}
.ma-plan-titel { min-width: 0; color: var(--ink); font-weight: 500; }
.ma-plan-schritte { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.ma-plan-extra { justify-self: end; }

.ma-schritt { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); white-space: nowrap; }
.ma-schritt > .ikon { width: 14px; height: 14px; flex: none; }
.ma-schritt-zusatz { color: var(--muted); }
.ma-schritt--erledigt > .ikon { color: #6ee7a8; }
.ma-schritt--aktuell .ma-schritt-zusatz { color: var(--accent); }
.ma-schritt--offen,
.ma-schritt--gesperrt { color: var(--muted); }
.ma-schritt--durchgefallen .ma-schritt-zusatz { color: #ff9d9d; }
/* Bestanden und gesperrt (18.10.2026): nicht verwechseln mit --gesperrt oben, das heisst
   "noch nicht frei, erst der vorige Schritt". */
.ma-schritt--sperre { color: #f5c46b; }
.ma-schritt--freigegeben { color: var(--muted); }
.ma-name-fest { margin: -4px 0 10px; }
/* Name und Geburtsdatum ab dem ersten Nachweis nur lesbar (19.10.2026). */
input.feld-fest, input[name="firstName"][readonly], input[name="lastName"][readonly] { opacity: 0.65; cursor: not-allowed; }
.ma-punkt,
.ma-kreis {
  flex: none;
  box-sizing: border-box;
  width: 8px;
  height: 8px;
  margin: 0 3px;
  border-radius: 50%;
}
.ma-punkt { background: var(--accent); }
.ma-kreis { border: 1.5px solid currentColor; }

.ma-warnung { display: flex; align-items: flex-start; gap: 8px; margin: 10px 0 0; color: #f0c48f; }
.ma-warnung > .ikon { flex: none; width: 14px; height: 14px; margin-top: 2px; }

/* Textknopf: blau, ohne Rahmen. Fuer "Nachweis", "Antworten", "Alle Fragen anzeigen". */
.ma-textlink {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--accent);
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.ma-textlink:hover { filter: none; text-decoration: underline; }
.ma-textlink > .ikon { width: 14px; height: 14px; }

/* Pruefungsversuche */
.ma-mini { width: 100%; border-collapse: collapse; border-top: 1px solid var(--border); }
.ma-mini > tbody > tr > td {
  padding: 8px 16px 8px 0;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.ma-mini > tbody > tr > td:last-child { padding-right: 0; text-align: right; }
.ma-mini .ma-versuch-modul { width: 100%; white-space: normal; color: var(--ink); }
.ma-mini .ma-versuch-datum { color: var(--muted); }
.ma-mini .ok { color: #6ee7a8; }
.ma-mini .fehler { color: #ff9d9d; }
.ma-mini > tbody > tr.ma-antworten-zeile > td { padding: 6px 0 16px; white-space: normal; text-align: left; }

.ma-antworten { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.ma-antwort { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 10px; }
.ma-antwort > .ikon { width: 14px; height: 14px; margin-top: 2px; }
.ma-antwort--richtig > .ikon { color: #6ee7a8; }
.ma-antwort--falsch > .ikon { color: #ff9d9d; }
.ma-antwort-frage { color: var(--ink); }
.ma-antwort-wahl,
.ma-antwort-soll { margin-top: 2px; color: var(--muted); }
.ma-antwort-soll > span { color: #6ee7a8; }

/* Fragen mit Fehlern */
.ma-fragen { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.ma-fragen--rest { border-top: 0; }
.ma-frage {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.ma-frage-text { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--ink); }
.ma-frage-quote { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.ma-frage--schwach .ma-frage-quote { color: #ff9d9d; }
.ma-abschnitt > .ma-textlink { margin-top: 10px; }

/* Angaben zur Person */
.ma-details-seite { min-width: 0; padding-left: 24px; border-left: 1px solid var(--border); }
/* EINE Beschriftungsspalte fuer alle Zeilen, so breit wie die laengste Beschriftung: Mit
   fester Breite brachen in der schmalen Spalte Datum und "9 richtig, 3 falsch" um. */
.ma-angaben { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 14px; margin: 0 0 22px; }
.ma-angaben > div { display: contents; }
.ma-angaben dt { color: var(--muted); }
.ma-angaben dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.ma-kommentar { margin: 0; color: var(--ink); white-space: pre-line; }

/* Was die Zeile schon zeigt, steht nicht noch einmal in den Angaben. Faellt die Spalte bei
   schmalem Fenster weg, erscheint es hier. */
@media (min-width: 901px) { .ma-angaben [data-feld="abteilung"] { display: none; } }
@media (min-width: 681px) { .ma-angaben [data-feld="nr"] { display: none; } }

@media (max-width: 860px) {
  .ma-details { grid-template-columns: 1fr; }
  .ma-details-seite { padding-left: 0; border-left: 0; }
}
@media (max-width: 560px) {
  .ma-plan-zeile { grid-template-columns: 1fr; }
  .ma-plan-extra { justify-self: start; }
  /* Im schmalen Fenster duerfen Datum und Ergebnis eines Pruefungsversuchs umbrechen, sonst
     ist die Tabelle breiter als ihr Platz (14.10.2026: 43 Bildpunkte bei 500). */
  .ma-mini > tbody > tr > td { white-space: normal; }
}


/* == EIN MUSTER FUER JEDEN REITER (28.09.) ====================================
   Ansage Corvin: "Wir muessen darauf achten, dass das Aussehen von jedem Tab stilistisch
   identisch ist." Bis heute hatte jeder Reiter seinen eigenen Kopf: ein rundes Plus hier,
   ein Plus neben einem Wortknopf dort, "Brillen: 11" als eigene Zeile, eine zweite
   Kopfzeile mit Inline-Stilen fuer den Modulfilter. Jetzt ueberall:

     Ueberschrift  Zahl                         [Zweitknopf] [...] [+ ... anlegen]
     Ein Satz, wozu der Bereich da ist.
     [Suche, Filter, Umschalter]
     Liste: je Zeile die haeufige Handlung sichtbar, der Rest im Menue dahinter. */

.panel-header { flex-wrap: wrap; row-gap: 10px; }

.kopf-zahl {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.kopf-zahl:empty { display: none; }

.kopf-aktionen {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

/* Die Filialwahl des Masters steht in derselben Ecke wie sonst die Handgriffe.
   Hoechstens 22rem breit (08.10.): Mit einem langen Firmennamen wuchs sie sonst ueber die
   ganze Kopfzeile und zog im schmalen Fenster die Seite breiter als das Fenster. Ein FESTES
   Hoechstmass, kein Prozentwert: Nur das begrenzt auch, was sie ihrer Zeile als Bedarf meldet. */
.kopf-aktionen select { width: auto; min-width: 200px; max-width: 22rem; padding-top: 7px; padding-bottom: 7px; }

/* Der eine blaue Knopf je Reiter. Mit Wort statt eines Plus allein: "Frage anlegen" sagt,
   was passiert; ein Plus musste man erst mit der Maus befragen. */
.kopf-neu {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 14px 6px 11px;
  border-radius: 2px;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}
.kopf-neu > .ikon { width: 15px; height: 15px; margin: 0; }

/* Ueberschrift und Satz darunter sind ein Block; die Flaeche setzt sonst 16 px dazwischen. */
.panel-header + .help { margin-top: -8px; }

/* Ein beschriftetes Feld in einer Werkzeugleiste: Wort und Feld in einer Zeile. */
.listen-feld {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
}
.listen-feld select { min-width: 220px; }

/* -- Gruppen nach Modul (Pruefungsfragen, Lehrtexte) ------------------------
   Vorher ein Kasten mit Rand, darin Karten mit Rand: zwei Rahmen ineinander, rechts ein
   Dreieck und die Zahl als Pille. Jetzt eine Zeile wie in der Mitarbeitertabelle: der
   Winkel links, dann der Titel, dann leise "12 Fragen". */
.topic-group {
  border: 0;
  border-radius: 0;
  background: none;
  overflow: visible;
}

.topic-group-summary {
  justify-content: flex-start;
  gap: 10px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
}

.topic-group-summary::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  margin: 0 3px 0 2px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}
.topic-group[open] > .topic-group-summary::before { transform: rotate(45deg); }
.topic-group > .topic-group-summary::after,
.topic-group[open] > .topic-group-summary::after { content: none; }

.topic-group-summary:hover { color: var(--ink); background: rgba(255, 255, 255, 0.02); }

.topic-group-count {
  min-width: 0;
  height: auto;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 400;
  white-space: nowrap;
}

/* Ein Handgriff in der Gruppenzeile steht rechts, wo in jedem Reiter die Handgriffe stehen. */
.gruppe-aktion { margin-left: auto; }

.topic-group-body { padding: 10px 0 18px; }
.topic-group + .topic-group { margin-top: 2px; }

/* -- 3D-Objekte ------------------------------------------------------------- */

/* Die Umschaltung sieht aus wie jede andere im Portal (Lehrplan: "Wer darf bearbeiten"). */
.mv-tabs {
  display: inline-flex;
  gap: 2px;
  margin-left: 0;
  padding: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.05);
}
.mv-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
}
.mv-tabs button:hover { color: var(--ink); filter: none; }
.mv-tabs button.active { background: var(--bg-3); color: var(--ink); }

/* Wie eine Rollenmarke: leiser Text statt einer versalen Pille. */
.mv-kind {
  display: block;
  margin-top: 2px;
  padding: 0;
  border: 0;
  border-radius: 0;
  font-size: 0.8125rem;
  color: var(--muted);
}
.mv-aktionen { margin-left: auto; gap: 4px; }
.mv-aktionen .mv-open { margin-left: 0; }
/* Die Karte schneidet ab, was ueber sie hinausragt; das Menue geht deshalb nach oben auf,
   ueber das Modell, statt unten abgeschnitten zu werden. */
.mv-card .menue-liste { top: auto; bottom: calc(100% + 4px); }

/* -- Rollen ----------------------------------------------------------------- */

/* Eine Rolle ist eine Angabe, keine Warnung: leise Schrift statt farbiger Versalpille. */
.role-tag,
.role-tag.inhaber,
.role-tag.manager,
.role-tag.content_creator {
  display: inline;
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
}

/* -- Leiser Text ------------------------------------------------------------
   .meta hatte nur INNERHALB einer Karte eine Farbe (.card .meta). Ueberall sonst -- leere
   Listen, "Ihr eigenes Konto" in den Rollen, der Hinweis unter den Haken -- stand es in
   voller Schriftgroesse und Weiss da, lauter als die Namen daneben. */
.meta { color: var(--muted); font-size: 0.84rem; }

/* Ein Menueeintrag ist eine Zeile. "Fortschritt aller zuruecksetzen" brach sonst um. */
.menue-liste > button { white-space: nowrap; }

/* Handgriffe in einer Zeile tragen keinen Rahmen (siehe .card-actions); die Pfeile der
   Module stehen ausserhalb von .card-actions und trugen deshalb als einzige noch einen. */
.modul-pfeile .button-ghost { border-color: transparent; }
.modul-pfeile .button-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.06); }

/* In jeder Gruppenzeile derselbe Knopf: leise, erst beim Drueberfahren deutlich. */
.gruppe-aktion { border-color: transparent; color: var(--muted); }
.gruppe-aktion:hover { color: var(--ink); background: rgba(255, 255, 255, 0.06); }

/* Die Kategorie einer Frage ist eine Marke, kein Balken ueber die ganze Breite. */
.question-card > .question-category { justify-self: start; }

/* -- Kopfzeile des Supervisor-Portals --------------------------------------- */
.gf-person-titel { color: var(--muted); }
#gf-person-name { color: var(--ink); font-weight: 500; }


/* == DURCHSICHT IM BREITEN FENSTER (28.09.) ===================================
   Die erste Durchsicht lief in einem 820 px schmalen Fenster. Bei voller Breite fielen
   diese Stellen auf. */

/* Module: Die Marken wurden auf die Hoehe der Knoepfe daneben gestreckt, der Text klebte
   oben. Und in einer inline-flex-Marke faellt das Leerzeichen nach dem Symbol weg. */
.emp-meta-row { align-items: center; }
.question-category { align-items: center; gap: 5px; }
.question-category > .ikon { width: 12px; height: 12px; margin: 0; }

/* Pruefungsfragen: das Bild als kleines Quadrat links, wie das Fragebild in der Brille
   (255 x 255), statt als Balken ueber die ganze Breite. Frage, Kategorie, Antworten und
   Handgriffe stehen daneben. Die Zeilenzahl haengt daran, ob es eine Kategorie gibt. */
.question-card:has(> .card-thumb--question) {
  grid-template-columns: 88px minmax(0, 1fr);
  column-gap: 16px;
  align-items: start;
}
.question-card:has(> .card-thumb--question) > * { grid-column: 2; }
.question-card > .card-thumb--question {
  grid-column: 1;
  grid-row: 1 / span 3;
  width: 88px;
  height: 88px;
  margin: 0;
  border-radius: 2px;
}
.question-card:has(> .question-category) > .card-thumb--question { grid-row: 1 / span 4; }
.question-card > .question-category { justify-self: start; }

/* Rollen: Die Spalte rechts fluchtet in jeder Zeile. Beim eigenen Konto fehlt das Menue,
   und "Bearbeiten" rutschte dort nach rechts; die Rolle ist dort Text statt Auswahl. */
.roles-row > select,
.roles-row > .meta { flex: 0 0 190px; width: 190px; }
/* 160 px: "Bearbeiten" und "..." brauchen zusammen 155 px (gemessen bei 1440 px). */
.roles-row > .card-actions { flex: 0 0 160px; justify-content: flex-start; }

/* Lehrplan: Ein/Aus-Einstellungen als Schalter wie in den Dialogen (Modul, Firma), nicht
   als Haekchen. Haekchen bleiben dort, wo man aus einer Liste waehlt (Rechte der Rollen). */
.lp-switch input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.lp-switch input[type="checkbox"]::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 14px;
  height: 14px;
  background: var(--muted);
  border-radius: 50%;
  transition: transform 0.18s, background 0.18s;
}
.lp-switch input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent); }
.lp-switch input[type="checkbox"]:checked::before { transform: translateX(20px); background: #fff; }
.lp-switch input[type="checkbox"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lp-switch { align-items: center; gap: 12px; }


/* ── Klapptabellen in Rollen, 3D-Modellen und Uebungen (29.09.) ────────────────
   Alle ueber klappTabelle() in app.js, dieselbe .ma-tabelle wie Mitarbeiter, Lehrplan,
   Brillen und Module. Hier nur die Spaltenbreiten und die Aufklappteile je Reiter. */
.klapp-tabelle .klapp-erste { min-width: 0; }
.klapp-tabelle .ma-name { overflow: hidden; text-overflow: ellipsis; }

/* Rollen: Name nimmt den Rest, die Rollen-Auswahl bleibt handlich. */
.ro-tabelle > tbody > tr > td:first-child { width: 100%; max-width: 0; }
.ro-tabelle .ro-sp-rolle select { width: auto; min-width: 180px; padding-top: 6px; padding-bottom: 6px; }
.ro-tabelle .rights-box { margin-top: 6px; }
.ro-tabelle .rights-item input[disabled] { opacity: 0.6; }

/* 3D-Modelle: die Vorschau erst im Aufklappteil, nicht mehr als Kachel. */
.mv-tabelle > tbody > tr > td.mv-sp-objekt { width: 100%; max-width: 0; }
.mv-vorschau {
  display: block;
  width: min(100%, 440px);
  height: 260px;
  border-radius: 2px;
  background: radial-gradient(circle at 50% 38%, #202329, #121317);
}
.mv-details { display: grid; gap: 10px; }
.mv-details .mv-machine-points, .mv-details .mv-machine-problems { margin-bottom: 0; }
.mv-stand { font-weight: 600; }
.mv-stand--ready { color: #7ede9f; }
.mv-stand--pending { color: #e8cf87; }
.mv-stand--offen { color: #f0a58c; }

/* Uebungen */
.sz-tabelle > tbody > tr > td.sz-sp-titel { width: 100%; max-width: 0; }
.sz-tabelle > thead > tr > th.sz-sp-zahl, .sz-tabelle > tbody > tr > td.sz-sp-zahl { text-align: right; }
.sz-details { display: grid; gap: 10px; }
.sz-details .sz-desc { margin: 0; }
.sz-details-spalten { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.sz-details h4 { margin: 0 0 4px; font-size: 0.8125rem; font-weight: 600; color: var(--ink); }
.sz-details ul { margin: 0; padding-left: 18px; }
@media (max-width: 680px) {
  .mv-tabelle .mv-sp-datei, .sz-tabelle .sz-sp-zeit, .sz-tabelle .sz-sp-laeufe, .ro-tabelle .ro-sp-nr { display: none; }
  .sz-details-spalten { grid-template-columns: minmax(0, 1fr); }
}

/* ── Verkaufsgespraeche (01.10.2026, #199) ─────────────────────────────────────
   Die zweite Art von Uebung. Der Rahmen (Bloecke, Felder, Fenster) ist der der
   Sortieruebungen; hier steht nur, was das Gespraech zusaetzlich braucht. */

.sz-tabelle .sz-sp-umfang { white-space: nowrap; }
/* Unter dem Titel stehen Art und Modul in einer Zeile. Sie kuerzt sich wie der Titel selbst,
   statt in die Nachbarspalte zu laufen. */
.sz-tabelle .sz-sp-titel .ma-rolle-klein { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Die Wahl der Art bei einer neuen Uebung: zwei Karten nebeneinander statt einer
   Auswahlliste, weil jede in einem Satz sagt, was sie ist. */
.sz-arten { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sz-art {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--ink);
  font: inherit;
  padding: 10px 12px;
  cursor: pointer;
}
.sz-art:hover { border-color: var(--accent); }
.sz-art-aktiv { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.sz-art-name { font-weight: 600; font-size: 0.9rem; }
.sz-art-hinweis { color: var(--muted); font-size: 0.8125rem; line-height: 1.4; }
@media (max-width: 680px) { .sz-arten { grid-template-columns: minmax(0, 1fr); } }

.sz-hinweise { margin: 6px 0 0; padding-left: 20px; color: var(--muted); font-size: 0.85rem; }

.gs-leiste { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gs-leiste .button-ghost, .gs-mehr, .gs-antworten > .button-ghost, .gs-hoeren {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.gs-feld-zahl { flex: none; }
.gs-feld-ton { width: 140px; }
.gs-editor .sz-feld textarea, .gs-fenster .sz-feld textarea { resize: vertical; min-height: 34px; line-height: 1.4; }

/* Der Kopf des Editors (08.10.2026): erst der Ablauf in fuenf Schritten, dann die beiden
   Regeln, jede mit ihrem Satz daneben. Vorher standen die Erklaerungen nur im Tooltip. */
.gs-kopfblock .sz-block-kopf h4 { margin-bottom: 0; }
.gs-anleitung {
  margin: 10px 0 12px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: rgba(211, 178, 100, 0.06);
}
.gs-anleitung > summary { cursor: pointer; padding: 9px 12px; font-size: 0.85rem; font-weight: 600; color: var(--ink); }
.gs-anleitung > .help { margin: 0; padding: 0 12px 10px; }
.gs-schritte {
  list-style: none;
  counter-reset: gs-schritt;
  margin: 0;
  padding: 2px 12px 10px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.gs-schritte li {
  counter-increment: gs-schritt;
  display: grid;
  gap: 4px;
  align-content: start;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--muted);
}
.gs-schritte li strong { display: flex; align-items: flex-start; gap: 7px; color: var(--ink); font-weight: 600; }
.gs-schritte li strong::before { content: counter(gs-schritt); }
/* Die Nummer im Kreis: an den fuenf Schritten oben und an den drei Abschnitten eines Kunden. */
.gs-nr, .gs-schritte li strong::before {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink);
  background: rgba(211, 178, 100, 0.28);
}
.gs-regeln { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 28px; }
.gs-regel { display: grid; gap: 5px; align-content: start; }
.gs-regel .gs-feld-zahl input { width: 110px; }
.gs-regel .help { margin: 0; font-size: 0.8125rem; line-height: 1.4; }
.gs-kunden-kopf {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 18px 2px 10px;
}
.gs-kunden-kopf > div:first-child { flex: 1 1 320px; min-width: 0; }
.gs-kunden-kopf > .gs-leiste { flex: none; }
.gs-kunden-kopf h4 { margin: 0 0 2px; }
.gs-kunden-kopf .help { margin: 0; }
@media (max-width: 820px) {
  .gs-schritte { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .gs-regeln { grid-template-columns: minmax(0, 1fr); }
}

/* Ein Kunde: Kopfzeile zum Auf- und Zuklappen, darunter alles, was zu ihm gehoert. */
.gs-kunde { padding: 0; overflow: hidden; }
.gs-kunde-kopf { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; }
.gs-kunde-titel {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: transparent;
  border: 0;
  color: var(--ink);
  font: inherit;
  text-align: left;
  padding: 8px 6px;
  cursor: pointer;
}
.gs-kunde-name { font-weight: 600; }
.gs-kunde-titel .ma-leise { margin: 0; font-size: 0.8125rem; }
.gs-pfeil { display: inline-flex; color: var(--muted); transition: transform 0.15s ease; }
.gs-auf .gs-pfeil { transform: rotate(90deg); }
/* Von rechts nach links ist das Symbol schon gespiegelt (ikon-richtung): offen zeigt es dann mit -90 Grad nach unten. */
html[dir="rtl"] .gs-auf .gs-pfeil { transform: rotate(-90deg); }
.gs-knoepfe { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.gs-knoepfe .button-ghost { padding: 6px 8px; }
.gs-knoepfe .button-ghost[disabled] { opacity: 0.35; cursor: default; }
.gs-kunde-inhalt { padding: 4px 16px 14px; border-top: 1px solid var(--border); }
/* Drei Abschnitte je Kunde, jeder mit Nummer und einem Satz dazu: der Kunde, was der
   Mitarbeiter vorher liest, das Gespraech. */
.gs-teil { margin-top: 18px; }
.gs-teil:first-child { margin-top: 12px; }
.gs-teil-titel { display: flex; align-items: center; gap: 8px; margin: 0 0 3px; font-size: 0.92rem; font-weight: 600; color: var(--ink); }
.gs-teil > .help { margin: 0 0 6px 28px; }
.gs-teil > .sz-zeile { border-bottom: 0; padding: 6px 0; }
.gs-teil > .gs-wechsel:first-of-type { margin-top: 8px; }
.gs-stimme-zeile { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.gs-feld-stimme { width: 220px; flex: none; }
.gs-stimme-zeile .help { margin: 0; flex: 1 1 260px; min-width: 0; }
/* Wo der KUNDE spricht, steht sein Gesicht vor der Beschriftung. */
.gs-schild { display: inline-flex; align-items: center; gap: 6px; }
.gs-avatar.gs-avatar-klein { width: 18px; height: 18px; }

/* Ein Wortwechsel: der Satz des Kunden, darunter die Antworten als eingerueckte Karten. */
.gs-wechsel {
  margin-top: 14px;
  padding: 10px 12px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 2px;
}
.gs-wechsel-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gs-wechsel-kopf h5 { margin: 0; font-size: 0.85rem; font-weight: 600; color: var(--ink); }
.gs-wechsel .sz-zeile { border-bottom: 0; padding: 6px 0; }
.gs-hoeren { align-self: flex-end; }
.gs-antworten { margin-top: 6px; display: grid; gap: 8px; }
.gs-antworten-kopf { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 0.8125rem; color: var(--muted); line-height: 1.4; }
.gs-antworten-kopf strong { color: var(--ink); font-weight: 600; font-size: 0.85rem; }
.gs-antworten > .button-ghost { justify-self: start; }
.gs-antwort {
  padding: 8px 10px 10px 12px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--muted);
  border-radius: 2px;
  background: var(--bg-2);
}
/* Kopf einer Antwort: welche es ist, was sie wert ist, und das Kreuz zum Entfernen. */
.gs-antwort-kopf { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; margin-bottom: 6px; }
.gs-antwort-name { font-weight: 600; font-size: 0.85rem; color: var(--ink); }
.gs-wertung-wahl { display: inline-flex; align-items: center; gap: 8px; font-size: 0.8125rem; color: var(--muted); }
.gs-wertung-wahl select {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--ink);
  font: inherit;
  font-size: 0.85rem;
  padding: 5px 9px;
  min-width: 215px;
}
.gs-antwort-kopf .sz-weg { margin-left: auto; }
/* Die Felder in der Reihenfolge, in der es geschieht: Antwort, Reaktion (daneben die
   Begruendung fuer die Auswertung), danach. */
.gs-antwort-felder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 10px; }
.gs-f-breit { grid-column: 1 / -1; }
.gs-f-danach { flex-direction: row; align-items: center; gap: 10px; }
.gs-f-danach select { width: auto; min-width: 300px; max-width: 100%; }
@media (max-width: 680px) {
  .gs-wertung-wahl select { min-width: 0; }
  .gs-antwort-felder { grid-template-columns: minmax(0, 1fr); }
  .gs-f-danach { flex-direction: column; align-items: stretch; }
  .gs-f-danach select { min-width: 0; width: 100%; }
}
/* Die Wertung als Farbe am linken Rand: gruen, gelb, rot. Dieselben Toene wie die
   Statusfarben der uebrigen Tabellen. */
.gs-antwort.gs-wertung-2, .gs-pr-rueck.gs-wertung-2 { border-left-color: #34d399; }
.gs-antwort.gs-wertung-1, .gs-pr-rueck.gs-wertung-1 { border-left-color: #f0b357; }
.gs-antwort.gs-wertung-0, .gs-pr-rueck.gs-wertung-0 { border-left-color: #e05252; }
.gs-mehr { margin-top: 12px; }
.gs-abschied { margin-top: 14px; }
.gs-abschied > summary { cursor: pointer; color: var(--muted); font-size: 0.85rem; }
.gs-abschied > .help { margin: 8px 0 4px; }
.gs-abschied .sz-zeile { border-bottom: 0; padding: 4px 0; }
.gs-stimmen .gs-stimmen-hinweis { margin: 10px 0 0; }

/* Fenster: Vorlagen, KI-Vorschlag, Probe. */
.mv-lightbox.gs-breit, .mv-lightbox.gs-vorlagen, .mv-lightbox.gs-probe { width: min(820px, 96vw); }
.mv-lightbox.gs-breit { width: min(1020px, 96vw); }
.gs-fenster { display: block; padding: 14px 16px 16px; }
.gs-fenster > .help { margin: 0 0 12px; }
.sz-ergebnisse .gs-e-zeile { margin: 2px 0; }
.gs-e-nein { color: #f0a58c; }
.gs-e-geht { color: #e8cf87; }
.gs-e-besser { color: var(--muted); font-size: 0.78rem; }
.gs-vorlagen-liste { display: grid; gap: 8px; }
.gs-vorlage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 2px;
}
.gs-vorlage-titel { font-weight: 600; }
.gs-vorlage .ma-leise { font-size: 0.8125rem; }
.gs-vorlage-satz { margin-top: 4px; font-size: 0.85rem; color: var(--ink); font-style: italic; }
.gs-vorlage .button-ghost { flex: none; }
.gs-ki .gs-leiste { align-items: flex-end; margin-top: 4px; }
.gs-ki-stand { margin: 12px 0 0; }

/* Probe: ein Gesicht, das mit der Stimmung des Kunden mitgeht, sein Satz als Sprechblase
   und die Antworten als grosse Knoepfe, wie sie in der Brille als Karten erscheinen. */
.gs-pr-lage { display: grid; gap: 8px; }
.gs-pr-lage p { margin: 0; }
.gs-pr-zaehler { font-weight: 600; }
.gs-pr-ziel { color: var(--accent); }
.gs-pr-lage .sz-save, .gs-fenster > .sz-save { justify-self: start; margin-top: 8px; }
.gs-pr-kunde { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.gs-pr-name { font-weight: 600; margin-bottom: 4px; }
.gs-pr-satz {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 2px 2px 2px 2px;
  padding: 8px 12px;
  margin-bottom: 6px;
  line-height: 1.45;
}
.gs-pr-du { margin-bottom: 12px; color: var(--ink); }
.gs-pr-antworten { display: grid; gap: 8px; }
.gs-pr-antwort {
  text-align: left;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.4;
  padding: 10px 12px;
  cursor: pointer;
}
.gs-pr-antwort:hover { border-color: var(--accent); }
.gs-gesicht {
  flex: none;
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #e8c9a8;
  border: 2px solid #c9a27c;
}
.gs-gesicht::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 14px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #2b2118;
  box-shadow: 13px 0 0 #2b2118;
}
.gs-gesicht::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 27px;
  width: 14px;
  height: 0;
  border-top: 2px solid #2b2118;
}
.gs-gesicht-gut::after { height: 6px; top: 24px; border-top: 0; border-bottom: 2px solid #2b2118; border-radius: 0 0 2px 2px; }
.gs-gesicht-schlecht::after { height: 6px; top: 27px; border-top: 2px solid #2b2118; border-radius: 2px 2px 0 0; }
.gs-pr-ergebnis { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; font-size: 1.05rem; margin-bottom: 12px; }
.gs-pr-ergebnis span { color: var(--muted); font-size: 0.9rem; }
.gs-pr-rueck {
  display: grid;
  gap: 4px;
  padding: 8px 12px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--muted);
  border-radius: 2px;
  font-size: 0.875rem;
  line-height: 1.45;
}
.gs-pr-rueck .ma-leise { margin: 0; }
.gs-pr-besser { color: #7ede9f; }
.gs-probe .gs-leiste { justify-content: flex-end; margin-top: 12px; }

/* Die letzte Spalte der Ergebnisse darf umbrechen. ".sz-tabelle td" setzt nowrap und schlaegt
   die einfache Klasse .sz-fehlerspalte, die das eigentlich aufheben sollte. Im Gespraech
   stehen dort ganze Saetze; ohne Umbruch lief die Tabelle rechts aus dem Fenster. */
.sz-ergebnisse .sz-tabelle td.sz-fehlerspalte { white-space: normal; min-width: 280px; }
.sz-ergebnisse .sz-tabelle td { vertical-align: top; }

/* ── Verkaufsgespraech: die Figur des Kunden waehlen (01.10.2026) ──────────────────────────
   Die Bilder unter /kunden/ sind die Figuren, wie die Brille sie baut, im Editor
   aufgenommen. Rund und mit eigenem Grund, damit sie auf jeder Flaeche wie ein Bild und
   nicht wie ein Ausschnitt wirken. */
.gs-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: none; background: var(--bg-3); }
.gs-avatar-gross { width: 72px; height: 72px; display: block; margin: 0 auto 8px; }
.gs-figuren-block { margin: 4px 0 14px; }
.gs-figuren-titel { display: block; font-size: 0.8125rem; color: var(--muted); margin-bottom: 6px; }
/* Ein Raster statt einer umbrechenden Reihe: Bei fester Kachelbreite passten sieben in die
   Zeile, und das achte Bild stand allein darunter. So teilen sich alle die Breite. */
.gs-figuren { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.gs-figur {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-width: 0; padding: 10px 6px 8px;
  border: 1px solid var(--border); border-radius: 2px;
  background: transparent; color: var(--muted);
  font: inherit; font-size: 0.75rem; line-height: 1.25; text-align: center; cursor: pointer;
}
.gs-figur img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; background: var(--bg-3); }
.gs-figur:hover { border-color: rgba(255, 255, 255, 0.22); color: var(--ink); }
.gs-figur.gs-gewaehlt { border-color: var(--accent); background: rgba(211, 178, 100, 0.12); color: var(--ink); }
.gs-figur:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.gs-figuren-block .help { margin-top: 8px; }

/* ── KI-Import: Bilder aus dem PDF in der Vorschau (07.10.2026) ──
   Klein genug fuer eine Zeile je Eintrag, gross genug, um ein Schaubild wiederzuerkennen. */
.ai-vorschau-bilder { margin: 10px 0 0; }
.ai-vorschau-reihe { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.ai-vorschau-bild {
  width: 112px;
  height: 63px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 2px;
}

/* ── KI-Import: Fortschritt (08.10.2026) ──
   Solange die KI arbeitet, treten die Eingabefelder zurueck und der Stand steht allein im
   Dialog: Titel, wie lange es laeuft, ein Balken und die Schritte mit Haken, Kreisel oder
   leerem Kreis. Der Kreisel dreht sich; so sieht man auch zwischen zwei Abrufen, dass es lebt. */
.ai-laeuft > .grid, .ai-laeuft > p.help:first-child { display: none; }
#ai-import-preview:empty { display: none; }
/* Der Knopf ist waehrenddessen aus und soll auch so aussehen. */
#ai-import-form button[type="submit"][disabled] { opacity: 0.5; cursor: default; }
.ai-fortschritt {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: rgba(211, 178, 100, 0.06);
}
.ai-fortschritt[hidden] { display: none; }
.ai-fs-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ai-fs-kopf strong { font-size: 0.95rem; color: var(--ink); }
.ai-fs-zeit { font-size: 0.8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }
/* Die Bahn heller als der Kasten: Man soll sehen, wie viel noch fehlt, nicht nur, was da ist. */
.ai-fs-balken { height: 8px; border-radius: 2px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.ai-fs-balken > span {
  display: block;
  height: 100%;
  width: 2%;
  border-radius: 2px;
  background: var(--accent);
  transition: width 0.5s linear;
}
.ai-fs-schritte { list-style: none; margin: 2px 0 0; padding: 0; display: grid; gap: 8px; }
.ai-fs-schritte li { display: flex; align-items: flex-start; gap: 10px; font-size: 0.875rem; line-height: 1.4; color: var(--muted); }
.ai-fs-schritte li.ist-dran { color: var(--ink); font-weight: 500; }
.ai-fs-zeichen {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border-radius: 50%;
  border: 2px solid var(--border);
  box-sizing: border-box;
}
.ai-fs-schritte li.ist-dran .ai-fs-zeichen {
  border-color: rgba(211, 178, 100, 0.3);
  border-top-color: var(--accent);
  animation: ai-fs-dreht 0.9s linear infinite;
}
/* Erledigt: gefuellter Kreis mit Haken (gezeichnet, kein Schriftzeichen). */
.ai-fs-schritte li.ist-fertig .ai-fs-zeichen { border-color: #34d399; background: #34d399; position: relative; }
.ai-fs-schritte li.ist-fertig .ai-fs-zeichen::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 0;
  width: 4px;
  height: 7px;
  border: solid #0f1115;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.ai-fs-hinweis { margin: 0; font-size: 0.8125rem; }
.ai-fs-hinweis:empty { display: none; }
@keyframes ai-fs-dreht { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .ai-fs-schritte li.ist-dran .ai-fs-zeichen { animation-duration: 3s; }
  .ai-fs-balken > span { transition: none; }
}

/* ── Uebernommene Bilder (07.10.2026) ──
   Ein leeres Bildfeld zeigt blass das Bild, das an seiner Stelle gilt: das Modulbild fuer
   Lehrtext, Pruefung und Uebung, das Bild am Textanfang fuer den Lehrtext. Blass, damit
   man es nicht fuer ein eigenes haelt; mit Marke, damit man weiss, woher es kommt. */
.upload-drop--geerbt .upload-thumb { opacity: 0.42; filter: saturate(0.7); }
.upload-drop--geerbt { border-style: dotted; }
.upload-erbe {
  position: absolute; left: 8px; bottom: 8px; padding: 2px 9px; border-radius: 2px;
  background: rgba(14, 15, 17, 0.86); border: 1px solid var(--border);
  font-size: 0.72rem; font-weight: 500; color: var(--ink); pointer-events: none;
}
.lightbox-textbild {
  display: block; max-width: 100%; max-height: 360px; margin: 10px auto;
  border-radius: 2px; background: #fff;
}

/* == Adminbereich (07.10.2026) ================================================
   /admin traegt seit heute dieselbe ruhige Sprache wie das Supervisor-Portal (Klasse
   portal-supervisor am body). Hier steht nur, was der Adminbereich zusaetzlich braucht. */

/* Protokoll und Dateien in der schmalen Kopfzeile: nebeneinander, mit Abstand zur Person. */
.gf-werkzeugplatz { display: inline-flex; gap: 8px; }
.gf-werkzeugplatz:empty { display: none; }

/* Das Kuerzel wird in Grossbuchstaben gefuehrt; stand bis 07.10. als style-Attribut am Feld. */
.eingabe-gross { text-transform: uppercase; }
.eingabe-gross::placeholder { text-transform: none; }

/* Die Adresse unter dem Feld Login-URL: leer nimmt sie keinen Platz weg. */
#company-slug-preview:empty { display: none; }
#company-slug-preview { overflow-wrap: anywhere; }

/* Firmen-Detail: Der Zurueck-Knopf steht vor der Ueberschrift und soll nicht mit ihr wachsen. */
.company-detail-header { gap: 12px; }
.company-detail-header #company-detail-back { flex: 0 0 auto; }
.company-detail-header .kopf-aktionen { margin-left: auto; }

/* Der Firmendialog etwas breiter: Die Erklaerung am Schalter laeuft sonst ueber vier Zeilen,
   und die Knoepfe rutschen bei 900 Punkten Fensterhoehe unter den Rand. */
.modal:has(#company-form) { width: min(760px, 100%); }
#company-form .upload-pair { margin-bottom: 0; }
#company-form .upload-drop { min-height: 92px; }
#company-form .upload-thumb { height: 92px; }

/* Firmen-Detail, Reiter "360 Grad / 3D": Bloecke mit Ueberschrift, Formulare in einer Spalte,
   Knoepfe so breit wie ihr Text (bis 07.10. zog sich "Panorama hochladen" ueber die ganze Karte). */
.umg-block + .umg-block { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--border); }
.umg-titel { margin: 0 0 10px; font-size: 1rem; font-weight: 600; }
.umg-leer { padding: 12px 0; }
.umg-form { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; max-width: 560px; }
.umg-karte .umg-form { margin-top: 0; }
.umg-label { font-size: 0.8125rem; font-weight: 500; color: color-mix(in srgb, var(--ink) 78%, var(--muted)); }
.umg-label .meta { font-weight: 400; }
.umg-haken { display: flex; flex-direction: row; align-items: center; gap: 8px; cursor: pointer; font-size: 0.875rem; }
.umg-haken input { width: auto; }
.umg-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.umg-karte { margin-bottom: 12px; }
.umg-vorschau { display: block; width: 100%; max-height: 120px; object-fit: cover; border-radius: 2px; margin: 8px 0; }
.umg-ohne-vorschau {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 60px; margin: 8px 0; border-radius: 2px;
  background: var(--bg-3); color: var(--muted); font-size: 0.8125rem;
}
.umg-hotspots { margin-top: 8px; }
.umg-hotspots strong { font-size: 0.8125rem; }
.umg-hotspot-liste { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.umg-hotspot { display: inline-flex; align-items: center; gap: 6px; }
.umg-hotspot .button-danger { padding: 2px 6px; font-size: 0.7rem; }
.umg-hotspot-neu { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.umg-hotspot-neu input { flex: 1 1 150px; min-width: 0; }
.umg-hotspot-neu select { flex: 1 1 120px; min-width: 0; }

/* KI-Import: Abbildungen, die die KI gesehen hat, die aber nicht als Bild vorlagen. */
/* Die Datei im KI-Import (14.10.2026): Karte unter dem Dateifeld, gruen wenn bereit, rot wenn
   sie nicht geht, beim Ankommen ein kurzes Aufleuchten. */
.ai-datei { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 10px 12px; border: 1px solid rgba(52, 211, 153, 0.45); border-radius: 2px; background: rgba(52, 211, 153, 0.07); }
.ai-datei[hidden] { display: none; }
.ai-datei-zeichen { flex: none; display: grid; place-items: center; width: 34px; height: 42px; border-radius: 2px 2px 2px 2px; background: #d9483b; color: #fff; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.04em; }
.ai-datei-text { flex: 1 1 auto; display: grid; gap: 2px; min-width: 0; }
.ai-datei-name { overflow: hidden; color: var(--ink); font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.ai-datei-satz { color: #6ee7b7; font-size: 0.8125rem; }
.ai-datei > button { flex: none; padding: 6px 12px; font-size: 0.8125rem; }
.ai-datei--fehler { border-color: rgba(248, 113, 113, 0.6); background: rgba(248, 113, 113, 0.07); }
.ai-datei--fehler .ai-datei-satz { color: #ff9d9d; }
.ai-datei--neu { animation: ai-datei-auf 1.4s ease-out; }
@keyframes ai-datei-auf {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); }
  100% { box-shadow: 0 0 0 12px rgba(52, 211, 153, 0); }
}
.ai-datei--fehler.ai-datei--neu { animation-name: ai-datei-auf-rot; }
@keyframes ai-datei-auf-rot {
  0% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.6); }
  100% { box-shadow: 0 0 0 12px rgba(248, 113, 113, 0); }
}
@media (prefers-reduced-motion: reduce) { .ai-datei--neu { animation: none; } }
.ai-vorschau-fehlt { margin: 6px 0 0; }
.ai-vorschau-fehlt strong { font-weight: 600; color: #f0c48f; }
.ai-vorschau-fehlt ul { margin: 4px 0 0; padding-left: 18px; }

/* ── KI-Import: der Vorschlag zum Aendern (14.10.2026) ──
   Ein Modul, darunter Lehrtexte und Fragen, jede Zeile mit Haken links und ihren Feldern
   rechts. Die Felder sind kleiner als im Dialog sonst: Ein Vorschlag hat leicht zwanzig
   Zeilen, und man soll ihn ueberblicken. Kein Feld waechst ueber seinen Platz (min-width 0
   an jeder Ebene, die Antworten in einem Raster mit minmax(0, 1fr)). */
.ai-pv-modul { display: grid; gap: 8px; margin: 10px 0; padding: 12px 14px; border: 1px solid var(--border); border-radius: 2px; min-width: 0; }
.ai-pv-feld { display: grid; gap: 4px; min-width: 0; font-size: 0.8125rem; color: var(--muted); }
.ai-pv-feld input { font-weight: 600; }
.ai-pv-modul input[type="text"], .ai-pv-modul textarea { width: 100%; padding: 7px 10px; font-size: 0.875rem; }
.ai-pv-zusammen { margin: 0; color: #f0c48f; }
.ai-pv-gruppe { margin: 10px 0 0; font-weight: 600; }
.ai-pv-zeile { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.ai-pv-modul .ai-pv-haken { width: auto; flex: none; margin: 10px 0 0; padding: 0; cursor: pointer; }
.ai-pv-inhalt { flex: 1 1 auto; display: grid; gap: 6px; min-width: 0; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.ai-pv-zeile:has(+ .ai-pv-gruppe) .ai-pv-inhalt, .ai-pv-zeile:last-child .ai-pv-inhalt { border-bottom: 0; padding-bottom: 0; }
.ai-pv-aus .ai-pv-inhalt { opacity: 0.45; }
.ai-pv-text summary { cursor: pointer; font-size: 0.8125rem; color: var(--muted); }
.ai-pv-text textarea { margin-top: 6px; line-height: 1.45; }
/* Der Text zum Aendern sieht aus wie die Lehrtext-Vorschau (und damit wie die Brille): dunkler
   Grund, heller Text, ein Absatz je Zeile, Bilder als Bilder auf weissem Grund. */
.ai-pv-editor {
  margin-top: 6px;
  padding: 12px 14px;
  min-height: 3.5em;
  max-height: 460px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: #14161a;
  color: #e8edf2;
  font-size: 0.9rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
  outline: none;
  cursor: text;
}
.ai-pv-editor:focus { border-color: var(--accent); }
.ai-pv-editor[contenteditable="false"] { cursor: default; }
.ai-pv-editor > div { margin: 0 0 6px; }
.ai-pv-editor > div:last-child { margin-bottom: 0; }
.ai-pv-editor b { font-weight: 700; }
.ai-pv-bild { position: relative; width: fit-content; max-width: 100%; margin: 4px 0 10px; }
.ai-pv-bild img { display: block; max-width: 100%; max-height: 260px; border-radius: 2px; background: #fff; }
.ai-pv-bild .fehlbild { display: block; padding: 8px 10px; border: 1px dashed #b4432f; border-radius: 2px; color: #e08a78; font-size: 0.8rem; }
.ai-pv-bild-weg {
  position: absolute;
  top: 8px;
  right: 8px;
  margin: 0;
  padding: 3px 9px;
  font-size: 0.72rem;
  background: rgba(20, 22, 26, 0.88);
  opacity: 0.7;
}
.ai-pv-bild:hover .ai-pv-bild-weg, .ai-pv-bild-weg:focus-visible { opacity: 1; }
.ai-pv-hilfe { margin: 4px 0 0; font-size: 0.75rem; }
/* Was die KI zu einer Aenderung angemerkt hat, unter dem Lehrtext, nachdem jemand im Befund
   "Noch einmal ändern" gewaehlt hat (14.10.2026). Bernsteinfarben wie ein Hinweis. */
.ai-pv-pruefung { display: grid; gap: 6px; padding: 8px 10px; border: 1px solid rgba(240, 196, 143, 0.7); border-radius: 2px; background: rgba(240, 196, 143, 0.07); font-size: 0.8125rem; color: var(--ink); min-width: 0; }
.ai-pv-pruefung[hidden] { display: none; }
.ai-pv-pruefung p { margin: 0; }
.ai-pv-pruefung ul { margin: 0; padding-left: 18px; display: grid; gap: 3px; }
.ai-pv-pruefung-kopf { font-weight: 600; }
/* Ladefenster und Befund liegen ueber dem Import-Dialog, im Aussehen der Rueckfragen. */
.ai-pv-lade { align-items: center; text-align: center; }
.ai-pv-lade .bs-kopf { justify-content: center; }
.ai-pv-kreisel { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.15); border-top-color: var(--accent); animation: ai-fs-dreht 0.9s linear infinite; }
.ai-pv-uhr { font-variant-numeric: tabular-nums; }
.bs-fenster.ai-pv-fenster { width: min(640px, 100%); max-height: min(86vh, 900px); }
.ai-pv-befund { display: grid; gap: 12px; overflow-y: auto; min-height: 0; padding-right: 4px; }
.ai-pv-befund-eintrag { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid rgba(240, 196, 143, 0.55); border-radius: 2px; background: rgba(240, 196, 143, 0.06); font-size: 0.875rem; }
.ai-pv-befund-eintrag h4 { margin: 0; font-size: 0.92rem; }
.ai-pv-befund-eintrag ul { margin: 0; padding-left: 18px; display: grid; gap: 3px; }
.ai-pv-befund-satz { margin: 0; color: var(--muted); }
.ai-pv-befund-wahl { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; color: var(--muted); }
.ai-pv-befund-wahl input { width: auto; flex: none; margin: 3px 0 0; padding: 0; }
.ai-pv-befund-frage { font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .ai-pv-kreisel { animation-duration: 3s; } }
.ai-pv-vorschlag { margin-top: 0; max-height: 300px; cursor: default; }
.ai-pv-vorschlag .ai-pv-bild img { max-height: 64px; }
.ai-pv-antworten-kopf { font-size: 0.75rem; }
.ai-pv-antworten { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; }
.ai-pv-antwort { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ai-pv-modul .ai-pv-antwort input[type="radio"] { width: auto; flex: none; margin: 0; padding: 0; cursor: pointer; accent-color: #34d399; }
.ai-pv-modul .ai-pv-fehler { border-color: #f87171; box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.25); }
@media (max-width: 640px) {
  .ai-pv-antworten { grid-template-columns: minmax(0, 1fr); }
}

/* ── Inhalte aus einer anderen Firma uebernehmen (09.10.2026) ──────────────────────────────
   Eine Liste mit Haken: links der Haken, daneben Titel und Zahlen, rechts die Marke "gibt es
   hier schon". Die Liste rollt fuer sich, damit die Knoepfe darunter stehen bleiben. */
.ik-kopf { display: flex; align-items: center; gap: 8px; margin: 14px 0 6px; }
.ik-kopf .ik-zahl { margin-right: auto; color: var(--muted); font-size: 0.875rem; }
.ik-liste { max-height: min(40vh, 360px); overflow-y: auto; border: 1px solid var(--border); border-radius: 2px; margin-bottom: 14px; }
.ik-liste:empty { display: none; }
.ik-leer { padding: 16px; color: var(--muted); font-size: 0.9375rem; }
.ik-gruppe { padding: 8px 14px 4px; color: var(--muted); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.ik-zeile { display: flex; align-items: flex-start; gap: 10px; padding: 9px 14px; cursor: pointer; }
.ik-zeile + .ik-zeile { border-top: 1px solid var(--border); }
.ik-zeile:hover { background: rgba(15, 76, 129, 0.04); }
.ik-zeile input { flex: 0 0 auto; margin-top: 3px; accent-color: var(--accent); }
.ik-zeile .ik-text { flex: 1 1 auto; min-width: 0; }
.ik-zeile .ik-titel { display: block; color: var(--ink); font-size: 0.9375rem; font-weight: 600; overflow-wrap: anywhere; }
.ik-zeile .ik-zahlen { display: block; margin-top: 1px; color: var(--muted); font-size: 0.8125rem; }
.ik-zeile .ik-marke { flex: 0 0 auto; align-self: center; padding: 2px 8px; border-radius: 2px; background: #fff3d6; color: #7a5200; font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.ik-zeile.ik-aus { cursor: default; }
.ik-zeile.ik-aus .ik-titel, .ik-zeile.ik-aus .ik-zahlen { opacity: 0.55; }
#inhalt-kopie-form .lp-switch { margin-bottom: 10px; }
#inhalt-kopie-form #ik-von { width: 100%; }
/* Die Knoepfe bleiben stehen, waehrend der Rest rollt: Bei vielen Modulen laege "Kopieren"
   sonst unter dem Rand, und man wuesste nicht, dass es weitergeht. */
#inhalt-kopie-form > .modal-actions { position: sticky; bottom: 0; z-index: 1; background: var(--bg-2); padding-bottom: 2px; }
#inhalt-kopie-form .help.ik-fehler { color: var(--danger); }

/* Anschrift und Ansprechpartner im Firmendialog (14.10.2026): die Zwischenueberschrift. */
.firma-kontakt-kopf { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--border); }
/* Die Knoepfe im Kopf eines Abschnitts brechen im schmalen Fenster (500 px) innerhalb ihrer
   Gruppe um, statt hinauszuragen (14.10.2026, mit drei Knoepfen gefunden). */
.ma-kopf-knoepfe { flex-wrap: wrap; max-width: 100%; row-gap: 6px; justify-content: flex-end; }

/* ── DIE EINFACHE ANSICHT (16.10.2026, einfach.js) ─────────────────────────────────────
   Ist die Ansicht an, verschwindet alles andere; app.js arbeitet darunter weiter, und wer
   zurueckschaltet, steht dort, wo er war.

   AUSSEHEN, DRITTE FASSUNG (20.10.2026): im Stil der Beratung, nur dunkel. Corvin: "relativ
   gevibe-coded ... sehr KI-generiert"; nach dem Entwurf: "Es ist auf jeden Fall edler." Die
   Werte sind von dr-reifferscheid-consulting.de ausgelesen (Abschnitte "Branchen" und "VR
   Training"): Anthrazit #12161b und #1b2129, EIN Gold (#b08d43, auf Dunkel #d3b264), Georgia
   fuer Namen und Ueberschriften, die Systemschrift fuer alles Bedienbare, 2 px Ecken,
   Haarlinien statt Karten, keine Schatten. Die farbigen Marken fuer den Stand bleiben vorerst
   (Corvin: "die bunten Statusmarken lassen wir erst einmal"), nur mit eckigen Ecken.
   Kontraste: Gold auf #12161b 5,8 : 1 (das helle Gold 8,9 : 1); auf gefuelltem Gold steht
   Anthrazit (5,8 : 1), weisse Schrift kaeme dort nur auf 3,1 : 1.
   Die fortschrittliche Ansicht und der Adminbereich haben diesen Stil NOCH NICHT. */
body.portal-einfach #nav-panel,
body.portal-einfach main.page > section.panel:not(#einfach-panel):not(#login-panel):not(#bootstrap-panel) {
  display: none !important;
}
#einfach-panel, .ef-blatt-hinter, .ef-umschalter, body.portal-einfach #gefuehrt-kopf {
  --ef-grund: #12161b;
  --ef-flaeche: #1b2129;
  --ef-linie: rgba(255, 255, 255, 0.08);
  --ef-linie-gold: rgba(211, 178, 100, 0.34);
  --ef-hell: rgba(255, 255, 255, 0.92);
  --ef-text: rgba(255, 255, 255, 0.74);
  --ef-leise: rgba(255, 255, 255, 0.56);
  --ef-gold: #d3b264;
  --ef-gold-tief: #b08d43;
  --ef-gold-hauch: rgba(211, 178, 100, 0.07);
  --ef-betrieb: #7fbf8f;
  /* KEINE SERIFE MEHR (Corvin 23.10.: "eine ganz komische Schriftart ... viel zu verspielt").
     Vom 20.10. bis zum 23.10. war das Georgia. Das Token bleibt, damit Ueberschriften und
     Namen weiter an EINER Stelle haengen; sie sind jetzt die Systemschrift in 600. */
  --ef-display: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ef-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* die Marken fuer den Stand, unveraendert */
  --ef-blau: #8ea6ff;
  --ef-blau-bg: rgba(108, 140, 255, 0.16);
  --ef-gruen: #5fe0a0;
  --ef-gruen-bg: rgba(52, 199, 123, 0.15);
  --ef-orange: #ffb547;
  --ef-orange-bg: rgba(255, 170, 50, 0.14);
  --ef-rot: #ff8a8a;
  --ef-grau-bg: rgba(255, 255, 255, 0.08);
}
body.portal-einfach { background: #12161b; }
body.portal-einfach .page { max-width: 1120px; padding-top: 28px; gap: 0; }
#einfach-panel {
  display: block;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0 0 56px;
  font-family: var(--ef-sans);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ef-text);
}
#einfach-panel .ikon { width: 1.1em; height: 1.1em; flex: none; }

/* Die Kopfzeile, solange die einfache Ansicht gilt: links das Logo der Filiale auf einem
   hellen Schild (ein Logo ist fuer Papier gemacht; dunkle Schrift verschwaende sonst auf dem
   Anthrazit, dieselbe Lehre wie bei der Begruessung in der Brille), ohne Logo ihr Name in
   Georgia. Unser eigener Name gehoert in den Adminbereich, nicht hierher. */
body.portal-einfach #gefuehrt-kopf {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ef-linie);
  border-radius: 0;
  box-shadow: none;
  padding: 0 0 20px;
  font-family: var(--ef-sans);
}
body.portal-einfach .gf-marke { gap: 14px; }
body.portal-einfach .gf-marke-bild {
  width: auto; height: 46px; max-width: 220px; object-fit: contain;
  background: #f8f6f2; padding: 6px 10px; border-radius: 2px;
}
body.portal-einfach .gf-marke-text strong { font: 600 1.4rem/1.2 var(--ef-display); color: var(--ef-hell); white-space: normal; }
/* Mit Logo steht der Name nur noch fuer Vorleseprogramme da. */
body.portal-einfach .gf-marke-bild:not([hidden]) + .gf-marke-text strong {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
body.portal-einfach .gf-marke-text small { font: 600 0.66rem/1.4 var(--ef-sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ef-leise); }
body.portal-einfach .gf-person { color: var(--ef-leise); font-size: 0.86rem; }
/* Sprache und Abmelden sind Knoepfe wie alle anderen (Rueckmeldung 20.10.2026: "Alle Buttons ...
   im gleichen Stil"): Goldrahmen, Grossbuchstaben. */
body.portal-einfach .gf-knopf,
body.portal-einfach #gefuehrt-kopf .lang-toggle {
  border: 1px solid var(--ef-linie-gold); border-radius: 2px; background: transparent; color: var(--ef-gold);
  font: 600 0.72rem/1.1 var(--ef-sans); letter-spacing: 0.12em; text-transform: uppercase; padding: 9px 15px; box-shadow: none;
}
body.portal-einfach .gf-knopf:hover,
body.portal-einfach #gefuehrt-kopf .lang-toggle:hover { border-color: var(--ef-gold); color: var(--ef-gold); background: var(--ef-gold-hauch); filter: none; }

/* Der Umschalter in der Kopfzeile (auch in der fortschrittlichen Ansicht zu sehen): zwei Worte,
   das gewaehlte mit Goldstrich. */
.ef-umschalter { display: inline-flex; gap: 16px; margin-inline-end: 10px; }
.ef-umschalter-knopf {
  background: transparent; border: 0; border-bottom: 1px solid transparent; border-radius: 0;
  padding: 4px 0; color: var(--ef-leise); font-size: 0.86rem; font-weight: 500; box-shadow: none; cursor: pointer;
}
.ef-umschalter-knopf:hover { color: var(--ef-hell); background: transparent; filter: none; }
.ef-umschalter-knopf.an { color: var(--ef-hell); border-bottom-color: var(--ef-gold); }

/* Reiter: Text mit Goldstrich unter dem gewaehlten, wie das Menue der Website */
.ef-reiter { display: flex; flex-wrap: wrap; gap: 4px 34px; border-bottom: 1px solid var(--ef-linie); margin: 0 0 32px; }
.ef-reiter-knopf {
  background: transparent; border: 0; border-bottom: 2px solid transparent; border-radius: 0; margin-bottom: -1px;
  padding: 18px 0 14px; color: var(--ef-leise); font: 500 0.98rem/1.2 var(--ef-sans); box-shadow: none; cursor: pointer;
}
.ef-reiter-knopf:hover { color: var(--ef-hell); background: transparent; filter: none; }
.ef-reiter-knopf.an { color: var(--ef-hell); border-bottom-color: var(--ef-gold); }
.ef-reiter-knopf:focus-visible { outline: 2px solid var(--ef-gold); outline-offset: 2px; }

/* Kopf einer Seite: kleine Zeile in Gold, Ueberschrift in Georgia, Knoepfe gleich daneben */
.ef-seitenkopf { display: flex; flex-direction: column; gap: 8px; margin: 0 0 26px; }
.ef-titel-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.ef-titel { font: 600 clamp(1.8rem, 3.2vw, 2.25rem)/1.12 var(--ef-display); letter-spacing: -0.01em; color: var(--ef-hell); margin: 0; text-wrap: balance; }
.ef-satz { display: flex; flex-direction: column; gap: 3px; color: var(--ef-text); }
.ef-seitenkopf .ef-feld-kopf { min-height: 0; }
.ef-satz-teil { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.ef-nur-anbieter { max-width: 26rem; }
.ef-abschnitt-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 44px 0 14px; }
.ef-abschnitt-titel { font: 600 1.45rem/1.25 var(--ef-display); color: var(--ef-hell); margin: 0; }
.ef-hinweis { border-inline-start: 2px solid var(--ef-orange); padding: 6px 0; padding-inline-start: 16px; color: #f2d29a; font-size: 0.95rem; margin: -16px 0 32px; }

/* EIN MUSTER FUER JEDES FELD (20.10.2026 abends, Corvin: "so wirklich einheitlich ist das alles
   noch nicht ... es geht mir um das Layout der einzelnen Elemente"). Ein Feld ist: oben eine Zeile
   mit dem Etikett und dem Knopf gleich daneben (.ef-feld-kopf), darunter der Wert, die Marke
   direkt hinter dem Titel (.ef-wert). Die obere Zeile ist immer so hoch wie ein Knopf, damit die
   Werte nebeneinanderliegender Felder auf einer Linie stehen, ob dort ein Knopf ist oder nicht.
   Dasselbe Muster tragen die Zellen einer Zeile, die Bloecke auf der Seite einer Person und der
   Lernfortschritt. Knoepfe stehen IMMER links bei dem, wozu sie gehoeren; nur die Kopfzeile
   (Abmelden, Sprache) bleibt rechts. */
.ef-angabe { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ef-feld-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; min-height: 31px; }
.ef-etikett { font: 600 0.66rem/1.3 var(--ef-sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ef-leise); }
.ef-wert { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.ef-marken { display: flex; flex-wrap: wrap; gap: 6px; }

/* Listen: Zeilen mit Haarlinien. Personen und Brillen: vorn Nummer bzw. Kennung, dann der Name
   mit einer Zeile darunter, aktuelles Modul, Als Naechstes, rechts der Pfeil, wie an jeder Zeile,
   die etwas oeffnet. UEBERSICHTLICHER (20.10.2026 abends, Corvin: "Fast perfekt. Jetzt mache das
   bitte noch ein wenig uebersichtlicher"): Im breiten Fenster stehen die Etiketten EINMAL als
   Spaltenkopf (.ef-listenkopf, bleibt beim Rollen oben) statt in jeder Zeile, und der Knopf
   rutscht unter das Modul, zu dem er gehoert; alle "Freischalten" liegen so untereinander.
   Im schmalen Fenster (bis 900 px) gibt es keinen Spaltenkopf; dort traegt jedes Feld sein
   Etikett mit dem Knopf daneben, wie auf der Seite einer Person. */
#einfach-panel { --ef-spalten: 5.4rem minmax(0, 1.2fr) minmax(0, 1.15fr) minmax(0, 1.35fr) 1.25rem; }
.ef-liste { border-top: 1px solid var(--ef-linie); }
.ef-listenkopf {
  display: grid; grid-template-columns: var(--ef-spalten); gap: 0 28px; padding: 12px 0;
  position: sticky; top: 0; z-index: 2; background: var(--ef-grund); border-bottom: 1px solid var(--ef-linie);
  font: 600 0.66rem/1.3 var(--ef-sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ef-leise);
}
@media (min-width: 901px) {
  .ef-zeile-raster .ef-etikett { display: none; }
  .ef-zeile-raster .ef-feld-kopf { order: 2; min-height: 0; }
  .ef-zeile-raster .ef-feld-kopf:not(:has(.ef-knopf)) { display: none; }
}
.ef-zeile { position: relative; padding: 16px 0; border-bottom: 1px solid var(--ef-linie); cursor: pointer; overflow-wrap: anywhere; transition: background-color 0.12s; }
.ef-zeile:hover { background: rgba(255, 255, 255, 0.02); }
.ef-zeile:hover .ef-zeile-name { color: var(--ef-gold); }
.ef-zeile:focus-visible { outline: 2px solid var(--ef-gold); outline-offset: 2px; }
.ef-zeile-still { cursor: default; }
.ef-zeile-still:hover { background: transparent; }
.ef-zeile-still:hover .ef-zeile-name { color: inherit; }
.ef-zeile-raster { display: grid; grid-template-columns: var(--ef-spalten); gap: 14px 28px; align-items: start; }
.ef-zeile-raster > .ef-pfeil { align-self: center; justify-self: end; }
.ef-zeile-schlicht { display: flex; align-items: center; gap: 16px; }
.ef-nr { font: 600 1rem/1.5 var(--ef-display); color: var(--ef-gold); white-space: nowrap; }
.ef-zeile-mitte { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; gap: 3px; }
.ef-zeile-name { font: 600 1.15rem/1.35 var(--ef-display); color: var(--ef-hell); transition: color 0.12s; }
.ef-zeile-ersatz { font-family: var(--ef-sans); font-size: 0.95rem; color: var(--ef-text); }
/* Eine Brille ohne Benutzer: eine Zeile, Kennung und Zustand auf einer Hoehe */
.ef-zeile-knapp { padding: 11px 0; align-items: center; }
.ef-zeile-knapp .ef-nr { line-height: 1.3; }
.ef-zeile-text { color: var(--ef-hell); }
.ef-zeile-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; color: var(--ef-leise); font-size: 0.86rem; }
.ef-meta-teil { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.ef-meta-knopf { display: inline-flex; }
.ef-zahl { font-variant-numeric: tabular-nums; }
.ef-fehlt { color: var(--ef-gold); }
.ef-brille { color: var(--ef-leise); }
.ef-brille.an { color: var(--ef-text); }
.ef-punkt { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ef-betrieb); margin-inline-end: 7px; vertical-align: 2px; }
.ef-modul-name { color: var(--ef-hell); }
.ef-erfolg { color: var(--ef-gold); margin: 0; }
.ef-erfolg-gross { font: 600 1.25rem/1.35 var(--ef-display); }
.ef-pfeil { color: var(--ef-leise); display: inline-flex; margin-inline-start: auto; transition: color 0.12s; }
.ef-zeile-raster > .ef-pfeil { margin-inline-start: 0; }
.ef-zeile:hover .ef-pfeil { color: var(--ef-gold); }
.ef-leer { color: var(--ef-leise); padding: 18px 0; margin: 0; border-top: 1px solid var(--ef-linie); border-bottom: 1px solid var(--ef-linie); }
.ef-leise { color: var(--ef-leise); }
.ef-klein { font-size: 0.88rem; }
.ef-warn { color: var(--ef-rot); }

/* Marken fuer den Stand: Farben wie bisher, Ecken wie alles andere */
.ef-marke { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 2px; font: 600 0.74rem/1.5 var(--ef-sans); letter-spacing: 0.02em; white-space: nowrap; }
.ef-marke-gruen { background: var(--ef-gruen-bg); color: var(--ef-gruen); }
.ef-marke-blau { background: var(--ef-blau-bg); color: var(--ef-blau); }
.ef-marke-grau { background: var(--ef-grau-bg); color: #b9c0cc; }
.ef-marke-orange { background: var(--ef-orange-bg); color: var(--ef-orange); }
.ef-sperre { margin-inline-start: 6px; }
.ef-sperre .ikon { width: 0.95em; height: 0.95em; }

/* Knoepfe. ALLE HANDLUNGEN IM SELBEN STIL (Rueckmeldung 20.10.2026: "Alle Buttons ... bitte
   alle im gleichen Stil, also Größe, Farbe usw."): schmaler Goldrahmen, Grossbuchstaben mit
   Abstand, ohne Symbol, wie "Unsere Leistungen" auf der Website. Gefuellt ist nur, was ein
   offenes Formular abschliesst (Speichern, Anlegen, Freischalten in der Auswahl). */
.ef-knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid transparent; border-radius: 2px; padding: 9px 15px;
  font: 600 0.72rem/1.1 var(--ef-sans); letter-spacing: 0.12em; text-transform: uppercase;
  background: transparent; color: var(--ef-gold); box-shadow: none; cursor: pointer;
  text-decoration: none; white-space: nowrap; transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.ef-knopf:hover { filter: none; transform: none; box-shadow: none; }
.ef-knopf:focus-visible { outline: 2px solid var(--ef-gold); outline-offset: 2px; }
.ef-knopf-aktion, a.ef-knopf-aktion { border-color: var(--ef-linie-gold); color: var(--ef-gold); background: transparent; }
.ef-knopf-aktion:hover { border-color: var(--ef-gold); background: var(--ef-gold-hauch); color: var(--ef-gold); }
.ef-knopf-voll, a.ef-knopf-voll { background: var(--ef-gold-tief); border-color: var(--ef-gold-tief); color: #12161b; }
.ef-knopf-voll:hover { background: #c39e52; border-color: #c39e52; color: #12161b; }
.ef-knopf-text { background: transparent; color: var(--ef-text); padding-left: 8px; padding-right: 8px; }
.ef-knopf-text:hover { background: transparent; color: var(--ef-hell); }
.ef-knopf-gefahr, .ef-knopf-gefahr:hover { color: #e79a9a; }
.ef-knopf-gefahr:hover { color: #f2b8b8; }
.ef-knopf-klein { padding: 6px 10px; font-size: 0.68rem; }
.ef-knopf-breit { min-width: 9rem; }
.ef-knopf:disabled { opacity: 0.5; cursor: default; }
/* Loeschen steht abgesetzt am anderen Ende, damit es nicht neben Speichern liegt. */
.ef-knopf-abseits { margin-inline-start: auto; }
.ef-zurueck {
  display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 0; border-radius: 0;
  color: var(--ef-gold); font: 500 0.92rem/1.3 var(--ef-sans); padding: 0; margin: 0 0 24px; box-shadow: none; cursor: pointer;
}
.ef-zurueck:hover { color: var(--ef-hell); background: transparent; filter: none; transform: none; box-shadow: none; }
#einfach-panel .ef-zurueck .ikon { width: 1em; height: 1em; }

/* Seite einer Person: links aktuell und als Naechstes, rechts der Lehrgang mit der Goldlinie,
   die die Website fuer Hervorhebungen nimmt; darunter, was abgeschlossen ist. */
.ef-raster { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 32px 56px; align-items: start; margin-bottom: 40px; }
.ef-haupt { display: flex; flex-direction: column; min-width: 0; }
.ef-block { gap: 10px; }
.ef-haupt .ef-block + .ef-block { border-top: 1px solid var(--ef-linie); margin-top: 26px; padding-top: 26px; }
.ef-gross-modul { font: 600 1.6rem/1.25 var(--ef-display); color: var(--ef-hell); }
.ef-gross-modul .ef-marke, .ef-mittel-modul .ef-marke { font-family: var(--ef-sans); }
.ef-mittel-modul { font: 600 1.25rem/1.3 var(--ef-display); color: var(--ef-hell); }
.ef-seite { min-width: 0; border-inline-start: 2px solid var(--ef-gold-tief); padding-inline-start: 24px; }
.ef-verlauf { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ef-linie); }
.ef-verlauf li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 4px 20px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--ef-linie); }
.ef-verlauf-tag { color: var(--ef-leise); font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.ef-verlauf-name { display: flex; flex-direction: column; gap: 3px; min-width: 0; }

/* Auswahl und Felder */
.ef-auswahl { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 6px; }
.ef-feld { font: inherit; font-size: 0.98rem; font-weight: 400; background: var(--ef-flaeche); color: var(--ef-hell); border: 1px solid var(--ef-linie); border-radius: 2px; padding: 9px 12px; min-width: 0; }
select.ef-feld { width: 22rem; max-width: 100%; }
select.ef-feld option { background: #1b2129; color: #e8e8e8; }
.ef-feld:focus { outline: none; border-color: var(--ef-gold); box-shadow: 0 0 0 3px rgba(211, 178, 100, 0.15); }

/* Ein Lehrgang: Name, Module in ihrer Reihenfolge (hier ist die Nummer eine echte Angabe) */
.ef-editor { border-top: 1px solid var(--ef-linie); padding-top: 26px; }
.ef-feld-beschriftung { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.ef-feld-beschriftung > span { font: 600 0.66rem/1.3 var(--ef-sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ef-leise); }
.ef-feld-beschriftung .ef-feld { max-width: 30rem; }
.ef-feld-beschriftung:has(+ .ef-nummern), .ef-feld-beschriftung:has(+ .ef-leer) { margin-bottom: 10px; }
.ef-nummern { list-style: none; margin: 0 0 8px; padding: 0; border-top: 1px solid var(--ef-linie); }
.ef-nummern li { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--ef-linie); }
.ef-nummer { flex: none; width: 2rem; font: 600 1.05rem/1 var(--ef-display); color: var(--ef-gold); }
.ef-editor-name { flex: 1 1 auto; min-width: 0; color: var(--ef-hell); }
.ef-editor-knoepfe { display: flex; gap: 6px; flex: none; }
.ef-rund {
  width: 32px; height: 32px; border-radius: 2px; border: 1px solid var(--ef-linie); background: transparent;
  color: var(--ef-text); display: inline-flex; align-items: center; justify-content: center; padding: 0; box-shadow: none; cursor: pointer;
}
#einfach-panel .ef-rund .ikon { width: 15px; height: 15px; }
.ef-rund:hover { border-color: var(--ef-gold); color: var(--ef-gold); background: transparent; filter: none; transform: none; box-shadow: none; }
.ef-rund:disabled { opacity: 0.3; cursor: default; }
.ef-rund:disabled:hover { border-color: var(--ef-linie); color: var(--ef-text); }
.ef-rund-weg:hover { border-color: #e79a9a; color: #e79a9a; }
.ef-editor-fuss { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--ef-linie); }

.ef-laedt { display: flex; align-items: center; gap: 12px; color: var(--ef-leise); padding: 40px 0; }
.ef-kreisel { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.15); border-top-color: var(--ef-gold); animation: ef-drehen 0.8s linear infinite; }
@keyframes ef-drehen { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ef-kreisel { animation-duration: 2.4s; } }

/* Blatt (Dialog): dieselbe Flaeche wie die Karten der Website, Felder in Zeilen mit Haarlinien */
.ef-blatt-hinter { font-family: var(--ef-sans); }
.ef-blatt {
  width: min(460px, calc(100vw - 32px)); background: var(--ef-flaeche); border: 1px solid var(--ef-linie-gold);
  border-radius: 2px; padding: 28px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55); color: var(--ef-hell);
}
.ef-blatt-titel { font: 600 1.5rem/1.25 var(--ef-display); color: var(--ef-hell); margin: 0 0 18px; text-align: start; }
.ef-blatt-mitte { text-align: center; }
.ef-blatt-mitte .ef-blatt-titel { text-align: center; }
.ef-blatt-gruppe { border: 1px solid var(--ef-linie); border-radius: 2px; background: rgba(0, 0, 0, 0.14); margin-bottom: 14px; overflow: hidden; }
.ef-blatt-zeile { display: flex; align-items: center; gap: 12px; padding: 2px 14px; min-height: 50px; }
.ef-blatt-zeile + .ef-blatt-zeile { border-top: 1px solid var(--ef-linie); }
.ef-blatt-zeile > span { width: 8.5rem; flex: none; font-size: 0.92rem; color: var(--ef-text); }
.ef-blatt-zeile input, .ef-blatt-zeile select {
  flex: 1 1 auto; min-width: 0; background: transparent; border: none; color: var(--ef-hell);
  font: inherit; font-size: 1rem; padding: 12px 0; outline: none; box-shadow: none;
}
.ef-blatt-zeile select option { background: #1b2129; color: #e8e8e8; }
.ef-blatt-zeile:focus-within { background: var(--ef-gold-hauch); }
.ef-blatt-hinweis { color: var(--ef-leise); font-size: 0.84rem; margin: 2px 2px 18px; }
.ef-blatt-fehler { margin: -8px 2px 14px; font-size: 0.92rem; }
.ef-blatt-knoepfe { display: flex; justify-content: flex-start; gap: 10px; }
.ef-blatt-knoepfe .ef-knopf { padding: 12px 18px; }
.ef-blatt-mitte .ef-blatt-knoepfe { justify-content: center; }
.ef-blatt-zeichen {
  width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--ef-linie-gold); background: transparent;
  color: var(--ef-gold); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.ef-blatt-zeichen .ikon { width: 24px; height: 24px; }
.ef-blatt-satz { color: var(--ef-text); margin: -8px 0 20px; }
.ef-pin { display: flex; justify-content: center; gap: 10px; margin: 0 0 26px; }
.ef-pin span {
  width: 52px; height: 64px; border-radius: 2px; border: 1px solid var(--ef-linie-gold);
  display: inline-flex; align-items: center; justify-content: center;
  font: 600 2rem/1 var(--ef-display); color: var(--ef-gold); font-variant-numeric: lining-nums tabular-nums;
}
/* Das lange Blatt: alle Angaben einer Person (16.10.2026 abends). Kopf und Knoepfe stehen,
   dazwischen rollt es, damit "Anlegen" auch im kleinen Fenster zu sehen bleibt. */
.ef-blatt-lang { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.ef-blatt-kopf { flex: none; padding: 24px 26px 6px; }
.ef-blatt-lang .ef-blatt-titel { margin-bottom: 4px; }
.ef-blatt-unter { margin: 0 0 6px; color: var(--ef-leise); font-size: 0.95rem; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.ef-blatt-inhalt { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 10px 26px 6px; }
.ef-blatt-fuss { flex: none; padding: 16px 26px 22px; border-top: 1px solid var(--ef-linie); }
.ef-blatt-fuss .ef-blatt-fehler { margin: 0 2px 12px; }
.ef-blatt-abschnitt { margin: 26px 2px 8px; font: 600 0.66rem/1.3 var(--ef-sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ef-leise); }
.ef-blatt-lang .ef-blatt-zeile:not(.hoch) > span { width: 10rem; }
.ef-blatt-zeile.hoch { flex-wrap: wrap; gap: 0 12px; padding-top: 10px; padding-bottom: 8px; }
.ef-blatt-zeile.hoch > span { width: 100%; }
.ef-blatt-zeile.hoch input, .ef-blatt-zeile.hoch select { padding: 6px 0 4px; }
.ef-blatt-zeilen-hinweis { width: 100%; color: var(--ef-leise); font-size: 0.8rem; line-height: 1.35; }
.ef-blatt-zeile input[type="date"], .ef-blatt-zeile input[type="month"] { color-scheme: dark; }
.ef-blatt-zeile .ef-knopf { flex: none; }
.ef-blatt-text {
  display: block; width: 100%; min-height: 84px; background: transparent; border: none; border-radius: 0;
  color: var(--ef-hell); font: inherit; font-size: 1rem; padding: 12px 14px; resize: vertical; outline: none; box-shadow: none;
}
.ef-blatt-gruppe:has(.ef-blatt-text:focus) { background: var(--ef-gold-hauch); }
/* Taetigkeitsbereiche als Knoepfe zum Antippen, statt einer Liste zum Aufklappen */
.ef-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 14px; }
.ef-chip {
  display: inline-flex; align-items: center; gap: 6px; background: transparent; color: var(--ef-text);
  border: 1px solid var(--ef-linie); border-radius: 2px; padding: 8px 12px; font: 500 0.9rem/1.2 var(--ef-sans); box-shadow: none; cursor: pointer;
}
.ef-chip:hover { border-color: var(--ef-linie-gold); color: var(--ef-hell); background: transparent; filter: none; }
.ef-chip .ikon { display: none; width: 0.95em; height: 0.95em; }
.ef-chip.an { border-color: var(--ef-gold); color: var(--ef-gold); background: var(--ef-gold-hauch); }
.ef-chip.an .ikon { display: inline-block; }
.ef-chip:focus-visible { outline: 2px solid var(--ef-gold); outline-offset: 2px; }

/* Mittlere Breite: die Spalten einer Zeile rutschen unter den Namen, jede mit ihrer Ueberschrift */
@media (max-width: 900px) {
  .ef-listenkopf { display: none; }
  .ef-zeile-raster { grid-template-columns: minmax(0, 1fr) 1.25rem; gap: 10px 20px; }
  .ef-zeile-raster > .ef-angabe, .ef-zeile-raster > .ef-nr { grid-column: 1; }
  .ef-zeile-raster > .ef-nr { margin-bottom: -6px; }
  .ef-zeile-raster > .ef-pfeil { grid-column: 2; grid-row: 1 / span 4; }
  .ef-raster { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .ef-reiter { gap: 4px 22px; margin-bottom: 30px; }
  .ef-reiter-knopf { padding-top: 14px; }
  select.ef-feld { width: 100%; }
  .ef-verlauf li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .ef-blatt-inhalt, .ef-blatt-kopf { padding-left: 16px; padding-right: 16px; }
  .ef-blatt-fuss { padding: 12px 16px 16px; }
  .ef-blatt-zeile > span, .ef-blatt-lang .ef-blatt-zeile:not(.hoch) > span { width: 6.5rem; }
  body.portal-einfach .gf-marke-bild { height: 38px; }
}

/* ── 21.10.2026: X an den Blaettern, Auswahl "Anderes Modul freischalten", Seite eines Moduls ── */
.ef-blatt { position: relative; }
.ef-blatt-x {
  position: absolute; top: 12px; inset-inline-end: 12px; width: 34px; height: 34px; padding: 0; z-index: 1;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: 2px; background: transparent; color: var(--ef-leise); cursor: pointer;
}
.ef-blatt-x:hover, .ef-blatt-x:focus-visible { color: var(--ef-gold); border-color: var(--ef-linie-gold); }
.ef-blatt-x svg, .ef-blatt-x .ikon { width: 16px; height: 16px; }
.ef-blatt-kopf, .ef-blatt-mitte { padding-inline-end: 48px; }
.ef-blatt-mitte { padding-inline-start: 48px; }

.ef-knopf:disabled { opacity: 0.4; cursor: default; }
.ef-marke-gold { color: var(--ef-gold); background: var(--ef-gold-hauch); box-shadow: inset 0 0 0 1px var(--ef-linie-gold); }

/* Die Liste aller Module: waehlbar mit Kreis, ausgegraut mit Grund im Kaestchen darunter. */
.ef-wahl-liste { display: flex; flex-direction: column; border-top: 1px solid var(--ef-linie); margin: 14px 0 10px; }
/* Wie jedes Feld: der Name, die Marken darunter (nie weit dahinter). */
.ef-wahl {
  position: relative; display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 5px 12px; align-items: start;
  padding: 11px 6px; border-bottom: 1px solid var(--ef-linie); cursor: pointer; color: var(--ef-hell);
  font: 400 0.95rem/1.4 var(--ef-sans); letter-spacing: normal; text-transform: none; margin: 0;
}
.ef-wahl > input, .ef-wahl > .ef-wahl-kreis { grid-column: 1; grid-row: 1 / span 2; margin-top: 2px; }
.ef-wahl > .ef-wahl-name, .ef-wahl > .ef-marken { grid-column: 2; }
.ef-wahl:hover { background: var(--ef-gold-hauch); }
.ef-wahl input[type="radio"] { width: 16px; height: 16px; flex: none; accent-color: var(--ef-gold-tief); cursor: pointer; }
.ef-wahl:has(input:checked) { background: var(--ef-gold-hauch); box-shadow: inset 2px 0 0 var(--ef-gold); }
.ef-wahl-name { min-width: 0; }
.ef-wahl .ef-marke { margin: 0; }
.ef-wahl-aus { cursor: help; color: var(--ef-leise); }
.ef-wahl-aus:hover { background: rgba(255, 255, 255, 0.03); }
.ef-wahl-kreis { width: 16px; height: 16px; flex: none; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.04); }
.ef-tipp {
  display: none; position: absolute; top: calc(100% - 4px); inset-inline-start: 34px; z-index: 6;
  width: max-content; max-width: min(26rem, calc(100% - 40px));
  padding: 10px 14px; background: var(--ef-flaeche); border: 1px solid var(--ef-linie-gold); border-radius: 2px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.5); color: var(--ef-text); font-size: 0.86rem; line-height: 1.45; cursor: default;
}
.ef-wahl-aus:hover .ef-tipp, .ef-wahl-aus:focus-visible .ef-tipp, .ef-wahl-aus.zeigt .ef-tipp { display: block; }
.ef-wahl-aus:focus-visible { outline: 1px solid var(--ef-gold); outline-offset: -1px; }

/* Seite eines Moduls */
.ef-modul-text { margin: 0; color: var(--ef-text); line-height: 1.55; white-space: pre-line; }
.ef-modul-satz { margin: -6px 0 14px; }
.ef-schlicht-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; color: var(--ef-hell); }
.ef-nr-klein { font-size: 0.95rem; min-width: 1.6rem; }
.ef-klapp { transition: transform 0.15s ease; }
.auf > .ef-zeile .ef-klapp { transform: rotate(90deg); }
html[dir="rtl"] .auf > .ef-zeile .ef-klapp { transform: rotate(-90deg) scaleX(-1); }
.ef-lehrtext-vorschau { padding: 4px 0 22px; border-bottom: 1px solid var(--ef-linie); }
.ef-lehrtext, .ef-frage { scroll-margin-top: 16px; }
.ef-lehrtext-vorschau .lehrtext-vorschau { min-height: 0; max-height: 560px; border-radius: 2px; border-color: var(--ef-linie); }
.ef-lehrtext-vorschau .lehrtext-bild-schnitt { display: none; }
.ef-lehrtext-titelbild { display: block; max-width: min(100%, 420px); max-height: 240px; object-fit: contain; margin: 0 0 12px; border-radius: 2px; }
.ef-frage-inhalt { padding: 2px 0 18px; padding-inline-start: 2.6rem; border-bottom: 1px solid var(--ef-linie); }
.ef-frage-bild { display: block; max-width: min(100%, 260px); max-height: 200px; object-fit: contain; margin: 0 0 12px; border-radius: 2px; }
.ef-antworten { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; color: var(--ef-text); }
.ef-antworten li { display: flex; gap: 10px; align-items: baseline; }
.ef-antworten li.richtig { color: var(--ef-gruen); }
.ef-antwort-zeichen { width: 16px; flex: none; display: inline-flex; }
.ef-antwort-zeichen svg, .ef-antwort-zeichen .ikon { width: 15px; height: 15px; }
.ef-unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Bei einer langen Liste bleibt "Freischalten" unten im Bild. */
.ef-auswahl.ef-auswahl-fuss { position: sticky; bottom: 0; z-index: 3; background: var(--ef-grund); padding: 12px 0 14px; margin-top: 4px; }

/* ── Mitarbeiter-Verlauf im Adminbereich (21.10.2026, mitarbeiterverlauf.js) ── */
.vl-knopf { display: inline-flex; align-items: center; gap: 6px; }
.vl-knopf .ikon { width: 15px; height: 15px; }
.vl-zahl {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 2px; display: inline-grid; place-items: center;
  background: #d3b264; color: #12161b; font-size: 0.7rem; font-weight: 700; line-height: 1;
}
.vl-knopf.vl-hat-neue { border-color: rgba(211, 178, 100, 0.6); }
.vl-mail { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--ink); margin: 0; }
.vl-mail input { width: auto; flex: none; }
.vl-mail input:disabled + span { color: var(--muted); }
/* Andere Adresse statt der eigenen (21.10. abends): eine Nebensache, kein Hauptfeld (Corvin:
   "Das sieht jetzt wie so ein Hauptfeld aus"). Ein kleiner Link neben dem Satz; das Feld
   erscheint erst auf Klick, klein und in einer Zeile. */
.vl-mail-zeile { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vl-link { background: none; border: 0; padding: 0; margin: 0; font: inherit; font-size: 0.78rem; color: var(--muted);
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer; width: auto; min-height: 0; box-shadow: none; }
.vl-link:hover, .vl-link:focus-visible { color: var(--ink); background: none; }
.vl-andere { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0; padding-inline-start: 26px; font-size: 0.78rem; }
.vl-andere[hidden] { display: none; }
.vl-andere-text { color: var(--muted); }
.vl-andere input { width: min(300px, 100%); flex: 0 1 300px; height: 28px; min-height: 0; padding: 2px 8px; font-size: 0.8rem; }
.vl-name-weg { display: block; margin-top: 2px; font-size: 0.72rem; }
.vl-excel { display: inline-flex; align-items: center; gap: 6px; margin-inline-start: auto; }
.vl-excel .ikon { width: 15px; height: 15px; }
.vl-tabelle th:nth-child(1) { width: 26%; }
.vl-tabelle th:nth-child(2) { width: 28%; }
.vl-tabelle th:nth-child(3) { width: 23%; }
.vl-tabelle th:nth-child(4) { width: 23%; }
.vl-tabelle tr.vl-neu td { background: rgba(211, 178, 100, 0.07); }
.vl-tabelle tr.vl-neu td:first-child { box-shadow: inset 3px 0 0 #d3b264; }
.vl-tabelle tr.vl-weg .zp-haupt { color: var(--muted); }
.vl-marke { font-size: 0.68rem; font-weight: 700; padding: 1px 7px; border-radius: 2px; background: rgba(211, 178, 100, 0.18); color: #d3b264; vertical-align: 1px; }

/* == MARKENSTIL FUER DIE FORTSCHRITTLICHE ANSICHT UND DEN ADMINBEREICH (22.10.2026) ======
   Ansage Corvin: "in der fortschrittlichen Ansicht einmal bitte das Design von der einfachen
   Ansicht mit uebernehmen". Die einfache Ansicht hat seit dem 20.10. den Stil der Beratung
   (dr-reifferscheid-consulting.de, dunkel): Anthrazit, EIN Gold, Georgia fuer Namen und
   Ueberschriften, die Systemschrift fuer alles Bedienbare, 2-px-Ecken, Haarlinien statt
   Karten, keine Schatten. Was dafuer am GRUNDBAU der Datei geaendert ist (nicht hier unten):
   - die Farben in :root (Blau ist Gold, die Flaechen sind die der Website),
   - jede Ecke von 3 px an aufwaerts und jede Pille (999px) ist 2 px,
   - jedes blaue rgba(108, 140, 255, ...) ist das goldene rgba(211, 178, 100, ...), ausser den
     blauen Standmarken der einfachen Ansicht (--ef-blau),
   - die Schrift des body ist die Systemschrift (var(--ef-sans)), Inter wird nicht mehr geladen.
   Hier unten steht, was ein Bauteil daruber hinaus braucht. Die Regeln der einfachen Ansicht
   (.ef-*) sind unveraendert; die --ef-* Werte stehen jetzt in :root, damit beide Ansichten
   dieselben nehmen. Wer hier etwas aendert, sieht sich BEIDE Ansichten an, den Adminbereich
   und ein Fenster (Mitarbeiter bearbeiten), bei 1280, 768 und 500 Bildpunkten. */

/* -- Seite und Kopfzeile -------------------------------------------------- */
.page { max-width: 1120px; padding-top: 28px; gap: 0; }
#gefuehrt-kopf {
  background: transparent; border: 0; border-bottom: 1px solid var(--border); border-radius: 0;
  box-shadow: none; padding: 0 0 20px; margin: 0 0 4px;
}
.gf-marke { gap: 14px; }
.gf-marke-bild { height: 46px; max-width: 220px; padding: 6px 10px; border-radius: 2px; }
.gf-marke-text strong { font: 600 1.4rem/1.2 var(--ef-display); color: var(--ef-hell); white-space: normal; }
.gf-marke-bild:not([hidden]) + .gf-marke-text strong {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.gf-marke-text small { font: 600 0.66rem/1.4 var(--ef-sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ef-leise); }
.gf-person { color: var(--ef-leise); font-size: 0.86rem; }
.gf-knopf, #gefuehrt-kopf .lang-toggle {
  border: 1px solid var(--ef-linie-gold); border-radius: 2px; background: transparent; color: var(--accent);
  font: 600 0.72rem/1.1 var(--ef-sans); letter-spacing: 0.12em; text-transform: uppercase; padding: 9px 15px; box-shadow: none;
}
.gf-knopf:hover, #gefuehrt-kopf .lang-toggle:hover { border-color: var(--accent); color: var(--accent); background: var(--ef-gold-hauch); filter: none; }
.vl-zahl { border-radius: 2px; }

/* Das alte Titelbild (nur noch auf der Anmeldeseite zu sehen): eine Zeile ohne Kasten. */
.hero { background: transparent; border: 0; border-radius: 0; box-shadow: none; padding: 0 0 20px; border-bottom: 1px solid var(--border); }
.hero h1 { font: 600 clamp(1.6rem, 3vw, 2rem)/1.15 var(--ef-display); }
.eyebrow { font: 600 0.66rem/1.4 var(--ef-sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ef-leise); }

/* Kein Wasserzeichen mehr (das Logo der Filiale lag riesig und blass unter der ganzen
   Anmeldeseite und als Grund im Titelbild): Das Logo steht klein auf einem hellen Schild. */
body.portal-branded::before, body.portal-branded .hero::before { display: none; }
body.portal-branded .hero { background-image: none; }
body.portal-branded .hero h1, body.portal-branded .hero .eyebrow, body.portal-branded .hero .subtitle { text-shadow: none; -webkit-text-fill-color: currentColor; }
body.portal-branded .hero h1 { color: var(--ef-hell); }
body.portal-branded .hero .eyebrow { color: var(--ef-leise); }
.hero-logo { width: auto; max-width: 180px; height: 44px; object-fit: contain; background: #f8f6f2; padding: 5px 9px; border-radius: 2px; }
#login-panel h2, #bootstrap-panel h2 { margin-bottom: 8px; }

/* -- Reiter: Text mit Goldstrich, wie .ef-reiter ----------------------------- */
.nav, body.portal-supervisor .nav {
  top: 0; border-radius: 0; background: var(--bg); backdrop-filter: none;
  border: 0; border-bottom: 1px solid var(--border); box-shadow: none;
}
.nav-reihe { padding: 0; }
.nav-btn, .nav-mehr-knopf { font-size: 0.95rem; font-weight: 500; color: var(--ef-leise); padding: 18px 7px 14px; }
.nav-btn.active, .nav-mehr-knopf.active { color: var(--ef-hell); font-weight: 500; }
.nav-btn::after, .nav-mehr-knopf::after { left: 2px; right: 2px; border-radius: 0; }
.nav-gruppe + .nav-gruppe:not([hidden]), .nav-mehr { margin-left: 12px; padding-left: 12px; }
.nav-mehr-liste { background: var(--bg-2); border-color: var(--ef-linie-gold); }

/* -- Bereiche: keine Kaesten, die Ueberschrift in Georgia -------------------- */
.panel, body.portal-supervisor .panel {
  background: transparent; border: 0; border-radius: 0; box-shadow: none; padding: 30px 0 56px; gap: 18px;
}
h1, h2 { font: 600 1.45rem/1.25 var(--ef-display); color: var(--ef-hell); }
.panel-header h2, body.portal-supervisor .panel-header h2 {
  font: 600 clamp(1.8rem, 3.2vw, 2.25rem)/1.12 var(--ef-display); letter-spacing: -0.01em; color: var(--ef-hell);
}
.help { color: var(--ef-text); font-size: 0.95rem; }
/* Die Anmeldung steht allein auf der Seite und bekommt als einzige einen Rahmen. */
#login-panel, #bootstrap-panel {
  max-width: 460px; margin: 40px auto 0; padding: 32px 30px 30px; background: var(--bg-2); border: 1px solid var(--ef-linie-gold);
}

/* -- Listen: Haarlinien statt Karten ----------------------------------------- */
.list { gap: 0; border-top: 1px solid var(--border); }
.card, body.portal-supervisor .card {
  background: transparent; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; box-shadow: none; padding: 16px 0;
}
.card .title, .emp-name, body.portal-supervisor .card .title, body.portal-supervisor .emp-name,
.emp-header .question-prompt, .topic-group-summary .topic-group-title {
  font: 600 1.1rem/1.35 var(--ef-display); color: var(--ef-hell);
}
.card .meta { color: var(--ef-leise); }
.topic-group-summary { font-family: var(--ef-display); font-weight: 600; font-size: 1.15rem; }
.topic-group-count { font-family: var(--ef-sans); }
.questions-search { background: var(--bg-2); border-color: var(--border); border-radius: 2px; }

/* Die Zahlen am Kopf eines Bereichs: Georgia, kein Kasten (die Linie oben und unten bleibt). */
.stat .value { font: 600 1.5rem/1.1 var(--ef-display); color: var(--ef-hell); }
.stat .label { font: 600 0.66rem/1.4 var(--ef-sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ef-leise); }

/* -- Tabellen: Spaltenkopf als Etikett, der Name in Georgia, die Nummer in Gold ------- */
.ma-tabelle > thead > tr > th, .lp-tabelle > thead > tr > th, .zp-tabelle th, .vl-tabelle th, .br-tabelle th, .ad-tabelle th {
  font: 600 0.66rem/1.3 var(--ef-sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ef-leise); padding: 12px 12px;
}
.ma-tabelle { font-size: 0.92rem; }
.ma-tabelle > tbody > tr > td { padding: 13px 12px; }
.ma-name { font: 600 1.05rem/1.3 var(--ef-display); color: var(--ef-hell); }
.ma-nr { color: var(--accent); font-family: var(--ef-display); font-size: 0.95rem; }
.ma-balken, .progress-bar, .emp-progress, body.portal-supervisor .progress-bar, body.portal-supervisor .emp-progress { border-radius: 0; height: 4px; }
.ma-balken > span { background: var(--ef-gold-tief); }
.ma-aktionen .button-ghost, .card-actions .button-ghost, .lp-modul-aktionen .button-ghost { color: var(--ef-leise); }
.ma-aktionen .button-ghost:hover, .card-actions .button-ghost:hover, .lp-modul-aktionen .button-ghost:hover {
  color: var(--accent); border-color: var(--ef-linie-gold); background: transparent;
}

/* -- Knoepfe: wie .ef-knopf (Goldrahmen, Grossbuchstaben; gefuellt, was abschliesst) ------ */
button { border-radius: 2px; background: var(--ef-gold-tief); color: #12161b; }
button:hover { filter: none; background: #c39e52; }
.button-primary, button[type="submit"], .modal-actions > button, .bs-knoepfe > button, .button-ghost, .button-danger,
.panel-header > button, .kopf-aktionen > button, .card-actions > .button-ghost, .list-tools > button {
  font: 600 0.72rem/1.1 var(--ef-sans); letter-spacing: 0.12em; text-transform: uppercase; padding: 9px 15px;
  border-radius: 2px; min-height: 0; white-space: nowrap;
}
.button-primary, button[type="submit"] { background: var(--ef-gold-tief); border: 1px solid var(--ef-gold-tief); color: #12161b; }
.button-primary:hover, button[type="submit"]:hover { background: #c39e52; border-color: #c39e52; color: #12161b; }
.button-ghost, body.portal-supervisor .card .button-ghost {
  background: transparent; border: 1px solid var(--ef-linie-gold); color: var(--accent);
}
.button-ghost:hover, body.portal-supervisor .card .button-ghost:hover {
  border-color: var(--accent); background: var(--ef-gold-hauch); color: var(--accent); filter: none;
}
.button-ghost > .ikon, .button-danger > .ikon { width: 13px; height: 13px; }
/* Nur ein Symbol: quadratisch, ohne Grossbuchstaben-Abstand (es gibt keine Buchstaben). */
.button-ghost:has(> svg.ikon:only-child) { padding: 6px 7px; min-width: 30px; letter-spacing: 0; }
.button-danger, body.portal-supervisor .card .button-danger {
  background: transparent; border: 1px solid rgba(231, 154, 154, 0.35); color: #e79a9a;
}
.button-danger:hover, body.portal-supervisor .card .button-danger:hover {
  border-color: #e79a9a; background: rgba(224, 82, 82, 0.08); color: #f2b8b8; filter: none;
}
/* In einer Zeile bleiben Loeschen und Menue leise, erst unter der Maus farbig. */
.card-actions .button-danger, body.portal-supervisor .card .button-danger { border-color: transparent; color: var(--ef-leise); }
.card-actions .button-danger:hover, body.portal-supervisor .card .button-danger:hover { border-color: rgba(231, 154, 154, 0.35); color: #e79a9a; }
/* Speichern zuerst, dann Abbrechen, beide links (wie das Blatt der einfachen Ansicht). Die
   Vorlage hat Abbrechen vor Speichern; row-reverse dreht nur die Reihenfolge, nicht den Code. */
.modal-actions { justify-content: flex-end; flex-direction: row-reverse; }
.menue-liste { background: var(--bg-2); border: 1px solid var(--ef-linie-gold); border-radius: 2px; box-shadow: 0 14px 32px rgba(0, 0, 0, 0.5); }
.menue-liste > button { font-size: 0.9rem; border-radius: 2px; }

/* -- Felder: Flaeche, Haarlinie, Gold beim Fokus; Beschriftung als Etikett -------------- */
input, select, textarea {
  background: var(--bg-2); border-color: var(--border); border-radius: 2px; font-size: 0.95rem;
  text-transform: none; letter-spacing: normal;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(211, 178, 100, 0.15); }
html select:not([multiple]) {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M1.8 4.2l4.2 4.2 4.2-4.2' fill='none' stroke='%23d3b264' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
select option { background: #1b2129; color: #e8e8e8; }
label, .upload-label, .form-label {
  font: 600 0.66rem/1.3 var(--ef-sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ef-leise);
}
/* Ein Haken mit Satz dahinter ist keine Beschriftung eines Feldes: Satzschreibung bleibt. */
.lp-switch, .lp-teile label, .lp-segment label, .bs-haken, .vl-mail, label.ef-wahl, .dropdown-menu label, .dropdown-list label,
.checkbox-label, label:has(> input[type="checkbox"]), label:has(> input[type="radio"]) {
  font: 500 0.9rem/1.4 var(--ef-sans); letter-spacing: normal; text-transform: none; color: var(--ink);
}
.field-hint, .help-row { text-transform: none; letter-spacing: normal; }
label .field-hint { font: 400 0.8rem/1.4 var(--ef-sans); letter-spacing: normal; text-transform: none; }

/* -- Fenster: die Flaeche der Website mit Goldrahmen, Titel in Georgia ------------------ */
.modal { background: var(--bg-2); border: 1px solid var(--ef-linie-gold); border-radius: 2px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55); }
.modal-header h2, .modal-header h3 { font: 600 1.5rem/1.25 var(--ef-display); color: var(--ef-hell); margin: 0; }
.modal-close, .bs-x { border-radius: 2px; }
.modal-close:hover, .bs-x:hover { color: var(--accent); border-color: var(--ef-linie-gold); }
.bs-fenster { background: var(--bg-2); border: 1px solid var(--ef-linie-gold); border-radius: 2px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55); }
.bs-fenster.bs-ruhig { border-color: var(--ef-linie-gold); }
.bs-titel { font: 600 1.4rem/1.25 var(--ef-display); color: var(--ef-hell); }
.bs-knoepfe { justify-content: flex-end; flex-direction: row-reverse; }
.toast { border-radius: 2px; }

/* -- Merkmale: Gold fuer die Nummer, Rollen ohne Violett --------------------------------- */
.emp-badge, .topic-chip, .question-category, .role-tag, body.portal-supervisor .emp-badge, body.portal-supervisor .topic-chip,
body.portal-supervisor .question-category { border-radius: 2px; font-weight: 600; font-size: 0.74rem; letter-spacing: 0.02em; }
.role-tag.manager { background: rgba(255, 255, 255, 0.08); color: #c9ced6; }

/* -- Startseite (gefuehrt.js): Zahlen und Wege als Zeilen mit Haarlinien ------------------ */
#gefuehrt-buehne { padding: 0; gap: 26px; }
.gf-zahlen { gap: 0 28px; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.gf-zahl, button.gf-zahl { border: 0; border-radius: 0; background: transparent; justify-items: start; text-align: start; padding: 6px 0; gap: 6px; }
button.gf-zahl:hover { background: transparent; }
button.gf-zahl:hover .gf-zahl-wert { color: var(--accent); }
.gf-zahl-wert { font: 600 1.9rem/1.05 var(--ef-display); color: var(--ef-hell); transition: color 0.12s; }
.gf-zahl-titel { font: 600 0.66rem/1.4 var(--ef-sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ef-leise); }
.gf-gruppe { gap: 0; }
.gf-gruppentitel { font: 600 1.45rem/1.25 var(--ef-display); color: var(--ef-hell); margin: 0 0 12px; }
.gf-liste { gap: 0; border-top: 1px solid var(--border); }
.gf-wahl { border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 16px 0; }
.gf-wahl:hover { background: rgba(255, 255, 255, 0.02); border-color: var(--border); }
.gf-symbol { border-radius: 2px; }
.gf-wahl:hover .gf-symbol { color: var(--accent); border-color: var(--ef-linie-gold); background: var(--ef-gold-hauch); }
.gf-text strong { font: 600 1.1rem/1.35 var(--ef-display); color: var(--ef-hell); transition: color 0.12s; }
.gf-wahl:hover .gf-text strong { color: var(--accent); }
.gf-wahl:hover .gf-pfeil { color: var(--accent); transform: none; }
.gf-kopf h2 { font: 600 1.6rem/1.2 var(--ef-display); }
.gf-zurueck { border-radius: 2px; }
.gf-zurueck:hover { background: transparent; color: var(--accent); border-color: var(--ef-linie-gold); }
.gf-stufe { font: 600 0.66rem/1.4 var(--ef-sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }

/* -- Die grossen Fenster (Zugriffe, Verlauf, Protokoll, Dateien, Zuschneiden) ------------ */
.zs-fenster { border-color: var(--ef-linie-gold); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55); }
.zs-titel { font: 600 1.4rem/1.25 var(--ef-display); color: var(--ef-hell); }
.zs-x { border-radius: 2px; background: transparent; border-color: transparent; }
.zs-x:hover { background: transparent; color: var(--accent); border-color: var(--ef-linie-gold); }
.zg-rechte-kopf, .wa-kopfzeile { font-family: var(--ef-sans); }

/* -- Lehrplan, Aufklappteile ------------------------------------------------------------ */
.lp-modul-titel { font: 600 1.02rem/1.3 var(--ef-display); color: var(--ef-hell); }
.lp-modul-zustand--aktuell { color: var(--accent); }
.details-titel { font: 600 0.66rem/1.3 var(--ef-sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ef-leise); opacity: 1; }

/* -- Ausrichtung (22.10. abends, Corvin: "denke bitte aber auch an Zentrierungen und so") ----- */
/* Reiter links mit festen Abstaenden wie .ef-reiter; die Gruppen wachsen nicht mehr ueber die
   Breite (app.js setzt kein flex-grow mehr). Trenner mit gleichem Abstand auf beiden Seiten. */
.nav-gruppen { justify-content: flex-start; }
.nav-gruppe { flex: 0 0 auto; justify-content: flex-start; gap: 30px; }
/* Der Trenner steht nur zwischen zwei SICHTBAREN Gruppen: Im Adminbereich ist die Gruppe
   "Start" versteckt, und ihr Nachbar trug trotzdem den Strich davor. */
.nav-gruppe + .nav-gruppe:not([hidden]) { margin-left: 0; padding-left: 0; border-left: 0; }
.nav-gruppe:not([hidden]):not(.nav-gruppe--weg) ~ .nav-gruppe:not([hidden]):not(.nav-gruppe--weg), .nav-mehr {
  margin-left: 30px; padding-left: 30px; border-left: 1px solid var(--border);
}
.nav-btn, .nav-mehr-knopf { padding-left: 0; padding-right: 0; }
.nav-btn::after, .nav-mehr-knopf::after { left: 0; right: 0; }
/* Die Kennzahlen der Startseite stehen beieinander statt ueber die ganze Breite verteilt. */
/* Gleichmaessig ueber die Breite, jede Zahl mittig in ihrem Feld (Corvin 23.10.: "das da oben
   ist noch nicht zentriert", gemeint waren die Kennzahlen, die links beieinanderstanden). */
.gf-zahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px 24px; }
.gf-zahl, button.gf-zahl { justify-items: center; text-align: center; }
/* Kleine Trennstriche zwischen den Kennzahlen (Corvin 23.10.), nur zwischen Feldern derselben Zeile. */
.gf-zahlen { gap: 12px 0; }
.gf-zahl, button.gf-zahl { position: relative; padding-left: 12px; padding-right: 12px; }
.gf-zahl + .gf-zahl::before { content: ""; position: absolute; inset-inline-start: 0; top: 50%; height: 36px; width: 1px; background: var(--border); transform: translateY(-50%); }
/* Schmal: zwei je Zeile, und das erste Feld einer Zeile traegt keinen Strich. */
@media (max-width: 640px) {
  .gf-zahlen { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gf-zahl:nth-child(odd)::before { display: none; }
}
/* Anmeldung: Titel und Knopf mittig, die Felder bleiben links beschriftet. */
#login-panel, #bootstrap-panel { text-align: center; }
#login-panel label, #bootstrap-panel label { text-align: start; }
#login-panel h2, #bootstrap-panel h2 { margin-bottom: 14px; }
.login-tabs { justify-content: center; }
/* Adminbereich: Konto, Sprache und Abmelden rechts in der ersten Zeile; die Werkzeuge
   (Mitarbeiter, Protokoll, Zugriffe, Dateien) als eigene Zeile darunter, links. Vorher brach
   die ganze rechte Haelfte um und stand als Klumpen unter dem Namen. */
body.portal-admin .gf-kopf-rechts { display: contents; }
body.portal-admin .gf-person { margin-inline-start: auto; }
body.portal-admin .gf-werkzeugplatz { order: 5; flex: 1 0 100%; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
body.portal-admin .gf-werkzeugplatz:empty { display: none; }
body.portal-admin #gefuehrt-kopf { row-gap: 14px; }
/* Schmal: erst der Name, dann die Werkzeuge, dann Konto, Sprache und Abmelden zusammen in
   einer Zeile (sonst brach "Abmelden" allein um). */
@media (max-width: 900px) {
  body.portal-admin #gefuehrt-kopf { justify-content: flex-start; }
  body.portal-admin .gf-werkzeugplatz { order: 1; margin-top: 0; }
  body.portal-admin .gf-person, body.portal-admin .gf-sprachplatz, body.portal-admin .gf-kopf-rechts > .gf-knopf { order: 2; }
  body.portal-admin .gf-person { margin-inline-start: 0; }
}

/* -- Einheitliche Listen (23.10., Corvin: "die Ansichten der einzelnen Seiten vereinheitlichen") --
   Jede Liste ist eine Folge von Zeilen mit Haarlinien: vorn der Winkel oder das kleine Bild,
   dann Titel mit einer leisen Zeile darunter, rechts die Handgriffe als stille Symbole, die
   erst unter der Maus Gold und Rahmen bekommen. Die Tabellen hatten das schon; die Karten
   (Lehrtexte, Pruefungsfragen, Firmen) ziehen nach. */
/* Handgriffe in Karten so still wie in den Tabellen (die Supervisor-Regel oben setzte den Rahmen). */
.card-actions .button-ghost, body.portal-supervisor .card .card-actions .button-ghost,
.topic-group-summary .button-ghost { border-color: transparent; color: var(--ef-leise); }
.card-actions .button-ghost:hover, body.portal-supervisor .card .card-actions .button-ghost:hover,
.topic-group-summary .button-ghost:hover { border-color: var(--ef-linie-gold); color: var(--accent); background: transparent; }
/* Eine Firma ist eine Zeile: Logo, Name mit Angaben darunter, rechts die Handgriffe. */
.card:has(> .company-card-top) { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.company-card-logo { width: 56px; height: 40px; background: #f8f6f2; padding: 3px 6px; }
.card .meta a { color: var(--accent); text-decoration: none; }
.card .meta a:hover { text-decoration: underline; }
/* Kleine Bilder in Lehrtext- und Fragenzeilen: ein Mass fuer beide (die Lehrtexte hatten 96 x 60,
   die Fragen 90 x 90), mit der Flaeche der Website als Grund. */
.lesson-thumb { width: 80px; height: 54px; background: var(--bg-2); }
.question-card > .card-thumb--question { width: 80px; height: 54px; object-fit: cover; margin: 0; }
.lesson-card { padding: 14px 12px; }
.question-card { padding-left: 12px; padding-right: 12px; }
.card:has(> .company-card-top) { padding-left: 12px; padding-right: 12px; }
.lesson-order { background: transparent; border: 1px solid var(--border); color: var(--ef-leise); }
/* Die Gruppen der Lehrtexte und Fragen wie die Zeilen der Tabellen (gleiche Hoehe, gleiche Linie). */
.topic-group { border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; }
.topic-group:first-of-type { border-top: 1px solid var(--border); }
.topic-group-summary { padding: 15px 12px; background: transparent; }
.topic-group-summary:hover { background: rgba(255, 255, 255, 0.02); }
.topic-group-body { padding: 0 0 8px; }
/* Die Kaesten im Aufklappteil der Rollen: Haarlinie statt Fuellung und Rahmen, wie "Angaben"
   bei einer Person. */
.rights-box { background: transparent; border: 0; border-top: 1px solid var(--border); border-radius: 0; padding: 14px 0 4px; }
.rights-box + .rights-box { margin-top: 10px; }
.rights-title { font: 600 0.66rem/1.3 var(--ef-sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ef-leise); }

/* -- Gruppen der Lehrtexte und Pruefungsfragen wie die Zeilen der Modulliste (23.10.) ---------- */
.gruppen-kopf {
  display: flex; justify-content: space-between; gap: 12px; padding: 12px 12px;
  border-bottom: 1px solid var(--border);
  font: 600 0.66rem/1.3 var(--ef-sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ef-leise);
}
.gruppen-kopf > span:last-child { padding-inline-end: 0; }
.gruppen-kopf + .topic-group { border-top: 0; }
.topic-group-summary { display: flex; align-items: center; gap: 10px; padding: 13px 12px; font: inherit; }
.topic-group-summary::before, .topic-group-summary::after { display: none; }
.topic-group-summary > .ma-pfeil { margin-left: 2px; }
.topic-group[open] > .topic-group-summary > .ma-pfeil { transform: rotate(45deg); }
html[dir="rtl"] .topic-group[open] > .topic-group-summary > .ma-pfeil { transform: rotate(45deg); }
.topic-group-summary > .modul-name-block { flex: 1 1 auto; min-width: 0; }
.topic-group-summary .ma-name { font: 600 1.05rem/1.3 var(--ef-display); color: var(--ef-hell); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topic-group-summary .topic-group-count {
  flex: none; min-width: 0; padding: 0; background: transparent; border: 0; border-radius: 0;
  font-size: 0.92rem; font-weight: 400; color: var(--ink); font-variant-numeric: tabular-nums;
}
.topic-group-summary .gruppe-aktion { flex: none; margin-inline-start: 12px; }
.topic-group-body { padding-inline-start: 0; }
/* Der Zaehler steht als Zahl rechtsbuendig unter seiner Ueberschrift wie in der Modulliste; bei den
   Lehrtexten folgt noch der Knopf, und die Ueberschrift rueckt um dessen Breite ein. Die Eintraege
   einer Gruppe stehen unter dem Modultitel, nicht unter dem Winkel. */
.topic-group-summary .topic-group-count { min-width: 3rem; text-align: right; }
.gruppen-kopf--aktion > span:last-child { padding-inline-end: 154px; }
/* body.portal-supervisor davor, weil die Kartenregel oben mit derselben Staerke padding 0 setzt. */
.topic-group-body > .card, body.portal-supervisor .topic-group-body > .card { padding-inline-start: 46px; padding-inline-end: 12px; }

/* == ANMELDESEITE (23.10.2026) ======================================================
   Corvin: "Kannst du diese Seite bitte noch schoener und professioneller aussehen lassen?"
   Vorher: ein Titelbild als Kopfzeile mit Trennlinie, darunter mittig ein kleiner Kasten, in dem
   derselbe Titel noch einmal stand. Jetzt zwei Spalten in der Mitte des Fensters: links die Marke
   (Logo der Filiale, Name, Titel, Goldstrich, Satz), rechts das Formular. Die Sprachwahl sitzt
   oben rechts in der Ecke. Die Klasse setzt app.js (showLogin, showBootstrap) und nimmt sie mit
   der Anmeldung wieder weg (setAuthed). Kein neuer Text: alles, was hier steht, gab es schon. */
body.anmeldeseite {
  background:
    radial-gradient(900px 520px at 18% 38%, rgba(211, 178, 100, 0.07), transparent 65%),
    radial-gradient(700px 480px at 85% 70%, rgba(255, 255, 255, 0.025), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
body.anmeldeseite .page {
  min-height: 100vh; min-height: 100dvh; max-width: 1040px;
  display: grid; grid-template-columns: minmax(0, 1fr) 400px; align-items: center; align-content: center;
  gap: 40px 88px; padding-top: 72px; padding-bottom: 72px;
}
body.anmeldeseite .page > section.panel:not(#login-panel):not(#bootstrap-panel) { display: none; }
/* Links: die Marke */
body.anmeldeseite .hero {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0;
  border: 0; padding: 0; background: transparent;
}
body.anmeldeseite .hero > div:first-child { display: flex; flex-direction: column; }
body.anmeldeseite .hero .eyebrow { margin: 0 0 14px; font: 600 0.72rem/1.4 var(--ef-sans); letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
body.anmeldeseite .hero h1 { margin: 0; font: 600 clamp(2.2rem, 4.2vw, 3.1rem)/1.08 var(--ef-display); letter-spacing: -0.02em; color: var(--ef-hell); }
body.anmeldeseite .hero h1::after { content: ""; display: block; width: 56px; height: 2px; margin: 26px 0 22px; background: var(--ef-gold-tief); }
body.anmeldeseite .hero .subtitle { display: block; max-width: 30rem; margin: 0; font-size: 1.02rem; line-height: 1.6; color: var(--ef-text); }
body.anmeldeseite .hero .subtitle:empty { display: none; }
body.anmeldeseite .hero-actions { display: contents; }
body.anmeldeseite .hero-logo {
  order: -1; width: auto; height: 56px; max-width: 220px; object-fit: contain; margin: 0 0 30px;
  background: #f8f6f2; padding: 8px 12px; border-radius: 2px; filter: none;
}
body.anmeldeseite .lang-dropdown { position: fixed; top: 22px; inset-inline-end: 24px; z-index: 30; }
/* Rechts: das Formular */
body.anmeldeseite #login-panel, body.anmeldeseite #bootstrap-panel {
  width: 100%; max-width: none; margin: 0; padding: 40px 36px 36px; text-align: start;
  background: rgba(27, 33, 41, 0.82); border: 1px solid var(--ef-linie-gold); border-radius: 2px;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7); backdrop-filter: blur(6px);
}
/* Derselbe Titel stand im Kasten ein zweites Mal; er bleibt fuer Vorleseprogramme da. */
body.anmeldeseite #admin-login-wrap > h2, body.anmeldeseite #portal-login-wrap > h2 {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
body.anmeldeseite #bootstrap-panel > h2 { margin: 0 0 6px; font: 600 1.4rem/1.25 var(--ef-display); }
body.anmeldeseite #login-panel form, body.anmeldeseite #bootstrap-panel form { gap: 22px; }
body.anmeldeseite #login-panel .grid, body.anmeldeseite #bootstrap-panel .grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
body.anmeldeseite #login-panel label, body.anmeldeseite #bootstrap-panel label { gap: 9px; text-align: start; }
body.anmeldeseite #login-panel input, body.anmeldeseite #bootstrap-panel input {
  height: 48px; padding: 0 14px; font-size: 1rem; background: var(--bg); border-color: rgba(255, 255, 255, 0.1);
}
body.anmeldeseite #login-panel input:focus, body.anmeldeseite #bootstrap-panel input:focus { border-color: var(--accent); }
body.anmeldeseite #login-panel button[type="submit"], body.anmeldeseite #bootstrap-panel button[type="submit"] {
  width: 100%; height: 48px; margin-top: 6px; font-size: 0.78rem; letter-spacing: 0.16em;
}
/* Auswahl Admin / Supervisor auf der Seite ohne Filiale: Reiter mit Goldstrich wie oben im Portal. */
body.anmeldeseite .login-tabs { background: transparent; padding: 0; gap: 26px; margin: 0 0 28px; border-bottom: 1px solid var(--border); justify-content: flex-start; }
body.anmeldeseite .login-tabs .tab-btn {
  flex: none; padding: 0 0 12px; margin-bottom: -1px; border-bottom: 2px solid transparent; border-radius: 0;
  background: transparent; box-shadow: none; font: 500 0.95rem/1.2 var(--ef-sans); letter-spacing: normal; text-transform: none; color: var(--ef-leise);
}
body.anmeldeseite .login-tabs .tab-btn.active { color: var(--ef-hell); border-bottom-color: var(--accent); background: transparent; box-shadow: none; }
body.anmeldeseite .notice { margin: 0 0 22px; }
/* Schmal: eine Spalte, Marke ueber dem Formular. */
@media (max-width: 880px) {
  body.anmeldeseite .page { grid-template-columns: minmax(0, 440px); justify-content: center; gap: 36px; padding-top: 84px; }
  body.anmeldeseite .hero h1 { font-size: 2.1rem; }
  body.anmeldeseite .hero h1::after { margin: 18px 0 14px; }
}
@media (max-width: 480px) {
  body.anmeldeseite #login-panel, body.anmeldeseite #bootstrap-panel { padding: 28px 20px 24px; }
}

/* Felder, die der Browser selbst ausgefuellt hat, bleiben im Ton der Seite (Chrome faerbt sie sonst
   blaugrau, so stand es auf der Anmeldeseite vom 23.10. im Bildschirmfoto). */
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ef-hell);
  -webkit-box-shadow: 0 0 0 1000px var(--bg) inset;
  caret-color: var(--ef-hell);
  transition: background-color 9999s ease-out 0s;
}

/* == FEINSCHLIFF SEITE FUER SEITE (23.10.2026) =========================================
   Corvin nach der Anmeldeseite: "Kannst du bitte auch noch einmal selbststaendig die anderen
   Seiten durchgehen ... Seite fuer Seite ueberpruefen und schoener gestalten." Durchgesehen in
   43 Aufnahmen (jeder Reiter, jedes Fenster, aufgeklappte Zeilen, einfache Ansicht, Admin).
   Was dabei noch aus der Reihe fiel, waren Bauteile mit eigenem, aelterem Stil: die beiden
   KI-Fenster (3D-Modell, Bild), der Editor einer Uebung, die Schalter- und Segmentzeilen der
   Einstellungen, das Dateifeld, die Ueberschriften in den Aufklappteilen. */

/* -- Hinweistext: unter einer Ueberschrift lesbar, in Fenstern und Editoren leise ---------- */
.help, .field-hint, .meta.ai-hint, .sz-block .help { color: var(--ef-leise); font-size: 0.86rem; line-height: 1.5; }
.panel > .help, .panel > .panel-header + .help, .panel-header .help { color: var(--ef-text); font-size: 0.95rem; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--ef-gold-tief); }

/* -- Dateifeld (KI-Import u. a.): der Knopf wie jeder andere, kein grauer Systemknopf -------- */
input[type="file"] { padding: 8px 10px; color: var(--ef-leise); font-size: 0.9rem; height: auto; }
input[type="file"]::file-selector-button {
  margin-inline-end: 14px; padding: 8px 14px; border: 1px solid var(--ef-linie-gold); border-radius: 2px;
  background: transparent; color: var(--accent); cursor: pointer;
  font: 600 0.7rem/1.1 var(--ef-sans); letter-spacing: 0.12em; text-transform: uppercase;
}
input[type="file"]::file-selector-button:hover { border-color: var(--accent); background: var(--ef-gold-hauch); }

/* -- In Fenstern geht eine Auswahl ueber die volle Breite (Lehrtext: "Modul" war schmal) ---- */
.modal-form label > select, .modal-form label > input:not([type="checkbox"]):not([type="radio"]) { width: 100%; }

/* -- Vorschau des Lehrtexts: steht in einer Beschriftung und erbte deren Versalien ---------- */
.lehrtext-vorschau, .lehrtext-vorschau * { text-transform: none; letter-spacing: normal; }
.lehrtext-vorschau { font: 400 0.95rem/1.55 var(--ef-sans); background: var(--bg); border-color: var(--border); border-radius: 2px; }

/* -- Schalterzeile ("Fragen mischen") ohne gefuellten Kasten -------------------------------- */
.toggle-label { background: transparent; border: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); border-radius: 0; padding: 12px 0; }
.toggle-label-content, .toggle-label-content span { font: 500 0.92rem/1.4 var(--ef-sans); letter-spacing: normal; text-transform: none; color: var(--ink); }

/* -- Segment "Der Lehrplan haengt an: der Person / der Brille": die Wahl ist sichtbar -------- */
.lp-segment { background: transparent; border: 1px solid var(--border); border-radius: 2px; padding: 3px; gap: 3px; }
.lp-segment label { border-radius: 2px; color: var(--ef-leise); font: 500 0.88rem/1.2 var(--ef-sans); letter-spacing: normal; text-transform: none; }
.lp-segment label:has(input:checked) { background: var(--ef-gold-hauch); color: var(--accent); box-shadow: inset 0 0 0 1px var(--ef-linie-gold); }
.lp-einstellung-titel { font: 600 0.66rem/1.3 var(--ef-sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ef-leise); }

/* -- Ueberschriften in Aufklappteilen ("Lehrplan", "Pruefungsversuche", "Angaben", "Benutzer
      dieser Brille", "Kunden") als Etikett wie ueberall sonst ------------------------------- */
.ma-abschnitt-kopf h4, .sz-details h4, .ma-details-seite h4, .rights-title {
  font: 600 0.66rem/1.3 var(--ef-sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ef-leise); margin: 0;
}
.ma-abschnitt-zusatz { font-size: 0.82rem; color: var(--ef-leise); }

/* -- Die KI-Fenster (3D-Modell erzeugen, Bild erzeugen, Objekt ansehen): wie jedes Fenster ---- */
.ai-modal, .mv-lightbox {
  background: var(--bg-2); border: 1px solid var(--ef-linie-gold); border-radius: 2px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.ai-modal-head, .mv-lightbox-head { border-bottom: 0; padding: 24px 24px 6px; }
.ai-modal-head h3, .mv-lightbox-title { font: 600 1.4rem/1.25 var(--ef-display); color: var(--ef-hell); }
.ai-modal-close, .mv-lightbox-x {
  width: 32px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center; opacity: 1;
  border: 1px solid var(--ef-linie-gold); border-radius: 2px; background: transparent; color: var(--accent); font-size: 1.1rem;
}
.ai-modal-close:hover, .mv-lightbox-x:hover { border-color: var(--accent); background: var(--ef-gold-hauch); color: var(--accent); }
/* Die drei Wege (aus Text, aus Bild, Material) als Reiter mit Goldstrich */
.ai-modal-tabs { gap: 24px; padding: 8px 24px 0; border-bottom: 1px solid var(--border); margin: 0 24px; padding-left: 0; padding-right: 0; }
.ai-tab {
  flex: none; padding: 0 0 12px; margin-bottom: -1px; background: transparent; border: 0; border-bottom: 2px solid transparent; border-radius: 0;
  font: 500 0.92rem/1.2 var(--ef-sans); letter-spacing: normal; text-transform: none; color: var(--ef-leise); box-shadow: none;
}
.ai-tab:hover { background: transparent; color: var(--ef-hell); }
.ai-tab--active { background: transparent; border-color: var(--accent); color: var(--ef-hell); }
.ai-modal-body, .mv-lightbox-body { padding: 18px 24px; }
.ai-modal-body textarea { background: var(--bg); }
/* Knoepfe unten: Erzeugen zuerst, dann Abbrechen, wie in jedem Fenster */
.ai-modal-foot, .mv-lightbox-actions { justify-content: flex-end; flex-direction: row-reverse; border-top: 1px solid var(--border); margin: 0 24px; padding: 16px 0 22px; }
.mv-lightbox-actions button, .mv-zurueck {
  background: transparent; border: 1px solid var(--ef-linie-gold); color: var(--accent); border-radius: 2px;
  font: 600 0.72rem/1.1 var(--ef-sans); letter-spacing: 0.12em; text-transform: uppercase; padding: 9px 15px;
}
.mv-lightbox-actions button:hover, .mv-zurueck:hover { border-color: var(--accent); background: var(--ef-gold-hauch); }
.mv-lightbox-actions button.bild-ki-los, .mv-lightbox-actions button.button-primary, .mv-save {
  background: var(--ef-gold-tief); border: 1px solid var(--ef-gold-tief); color: #12161b;
  font: 600 0.72rem/1.1 var(--ef-sans); letter-spacing: 0.12em; text-transform: uppercase; padding: 9px 15px;
}
.mv-lightbox-actions button.bild-ki-los:hover, .mv-save:hover { background: #c39e52; border-color: #c39e52; filter: none; }
.mv-lightbox-actions button.button-danger { color: #e79a9a; border-color: rgba(231, 154, 154, 0.35); }
.mv-lightbox-settings { margin: 0 24px; padding: 14px 0; }
.mv-picker-feld, .mv-size-label .mv-size { background: var(--bg); }

/* -- Editor einer Uebung: Abschnitte mit Haarlinie statt Kasten, Etiketten wie ueberall ------ */
.sz-block { background: transparent; border: 0; border-top: 1px solid var(--border); border-radius: 0; padding: 22px 0 6px; margin: 0; }
.sz-block-kopf h4, .sz-editor-kopf h3 { font: 600 1.15rem/1.3 var(--ef-display); color: var(--ef-hell); }
.sz-editor-kopf { padding-bottom: 14px; margin-bottom: 0; }
.sz-feld > span, .sz-feld > label > span {
  font: 600 0.66rem/1.3 var(--ef-sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ef-leise);
  white-space: nowrap;
}
.sz-feld input, .sz-feld select, .sz-feld textarea { background: var(--bg-2); font-size: 0.92rem; padding: 9px 11px; }
.sz-zeile { align-items: flex-end; gap: 12px; }
.sz-save {
  background: var(--ef-gold-tief); color: #12161b; border: 1px solid var(--ef-gold-tief);
  font: 600 0.72rem/1.1 var(--ef-sans); letter-spacing: 0.12em; text-transform: uppercase; padding: 9px 15px;
}
.sz-save:hover { background: #c39e52; border-color: #c39e52; filter: none; }
.sz-editor-knoepfe { flex-direction: row-reverse; }
/* Art der Uebung: zwei Wahlkarten mit Haarlinie, die gewaehlte mit Goldrand */
.sz-kachel { background: transparent; border: 1px solid var(--border); border-radius: 2px; }
.sz-kachel:hover { border-color: var(--ef-linie-gold); background: var(--ef-gold-hauch); }
.sz-kachel-aktiv { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--ef-gold-hauch); }
.sz-art { background: transparent; border: 1px solid var(--border); border-radius: 2px; box-shadow: none; }
.sz-art:hover { border-color: var(--ef-linie-gold); background: var(--ef-gold-hauch); filter: none; }
.sz-art-aktiv, .sz-art-aktiv:hover { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--ef-gold-hauch); }
.sz-art-name { font: 600 0.98rem/1.3 var(--ef-display); color: var(--ef-hell); letter-spacing: normal; text-transform: none; }
.sz-art-hinweis { color: var(--ef-leise); letter-spacing: normal; text-transform: none; font-weight: 400; }
/* Lehrtext: Die Auswahl "Modul" stand als schmale Rasterzelle allein in ihrer Zeile. */
#lesson-form > .grid > label:first-child { grid-column: 1 / -1; }
/* Editor einer Uebung, Grunddaten: keine Linie zwischen den Feldern und ihrem Hinweis (die gehoert
   nur den Zeilen der Zonen und Objekte, die ein data-idx tragen), und Luft zwischen Hinweis,
   Etikett und Feld. Vorher klebte "Beschreibung" am Satz darueber. */
.sz-block > .sz-zeile:not([data-idx]) { border-bottom: 0; padding-bottom: 0; }
.sz-block > .help { margin: 10px 0 22px; }
.sz-block > .sz-feld-voll + .sz-feld-voll { margin-top: 22px; }
.sz-feld-voll > .help { margin: 0 0 10px; }

/* == REITERLEISTE DECKT, AUGE GROESSER (26.10.2026) ==================================
   Corvin mit Bildschirmfoto: "dass der Reiter ganz oben mit den Elementen darunter
   ueberlappt". Die Leiste ist <nav class="panel nav">, und die Regel fuer .panel im
   Markenstil (durchsichtig, 30 px oben und 56 px unten) steht weiter unten als die fuer
   .nav und gewann. Die klebende Leiste war dadurch 137 Bildpunkte hoch und durchsichtig:
   Beim Rollen lief die Liste sichtbar unter und ueber den Reitern durch. Seit dem 22.10.,
   im Adminbereich und im Portal. Wer an .panel etwas aendert, denkt an diese Ausnahme. */
.panel.nav, body.portal-supervisor .panel.nav { background: var(--bg); padding: 0; margin-top: 14px; }

/* Das Auge (Zusehen) ist die Hauptaktion einer Brille oder Person und war mit 13 Bildpunkten
   so klein wie Stift und Menue daneben (Corvin: "das Auge ... groesser"). Der Knopf bleibt
   etwa so hoch wie seine Nachbarn. */
.button-ghost[data-device-mirror] > .ikon,
a.button-ghost[href*="mitsehen.html"] > .ikon { width: 19px; height: 19px; }
/* :has() im Selektor, weil die Regel fuer reine Symbolknoepfe (padding 6px 7px) genauso
   gebaut ist und sonst gewinnt. */
.button-ghost[data-device-mirror]:has(> svg.ikon:only-child),
a.button-ghost[href*="mitsehen.html"]:has(> svg.ikon:only-child) { padding: 3px 5px; }

/* AUSSENDIENST-KONTEN im Reiter Admins (27.10.2026, aussendienstkonten.js). Ein eigener Block
   unter den Admin-Konten, mit Abstand und Haarlinie, damit man ihn als zweite Liste liest. */
.aussen-block { margin-top: 46px; padding-top: 26px; border-top: 1px solid var(--ef-linie, rgba(255,255,255,0.09)); }
.aussen-firmen-zelle { max-width: 22rem; }
.aussen-firmen [data-aussen-firmen] { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.aussen-firma { display: flex; align-items: center; gap: 10px; text-transform: none; letter-spacing: 0; font-size: 0.92rem;
  color: var(--ink); cursor: pointer; }
.aussen-firma input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.aussen-block .panel-header { margin-bottom: 10px; }
.aussen-block > .help { margin: 0 0 22px; max-width: 760px; line-height: 1.5; }
.aussen-block > .help a { color: var(--accent); text-decoration: none; border-bottom: 1px solid currentColor; }

/* === Bilder in anderen Sprachen (28.10.2026, bildsprachen.js) ===========================
   Je Bild eine Zeile mit Vorlage und Angaben, darunter eine Kachel je Sprache. Ein Klick
   auf eine Kachel zeigt Vorlage und Uebersetzung nebeneinander. Im Markenstil: Haarlinien,
   keine Kaesten, Gold nur fuer das Gewaehlte. */
.modal:has(.bsp-wurzel) { width: min(1040px, 100%); }
.gruppe-aktion + .gruppe-aktion { margin-left: 8px; margin-inline-start: 8px; }
/* Im schmalen Fenster nur das Symbol: Zwei Knoepfe mit Beschriftung machten die Zeile der
   Modulgruppe breiter als die Seite. Die Beschriftung steht im Tipp (title). */
@media (max-width: 720px) {
  .gruppe-aktion-text { display: none; }
  .gruppe-aktion { padding-inline: 8px; }
}
.bsp-satz { margin: 0 0 14px; }
.bsp-bild { border-top: 1px solid var(--border); padding: 16px 0 18px; }
.bsp-bild-kopf { display: flex; gap: 16px; align-items: flex-start; min-width: 0; }
.bsp-vorlage { width: 160px; height: 100px; object-fit: contain; background: #fff; border-radius: 2px; flex: none; }
.bsp-bild-angaben { min-width: 0; flex: 1; font-size: 0.86rem; }
.bsp-stellen { color: var(--ink); line-height: 1.45; overflow-wrap: anywhere; }
.bsp-zeile { color: var(--muted); margin-top: 6px; }
.bsp-zeilen { margin-top: 6px; color: var(--muted); }
.bsp-zeilen summary { cursor: pointer; text-transform: none; letter-spacing: normal; }
.bsp-zeilen ul { margin: 6px 0 0; padding-inline-start: 18px; max-height: 160px; overflow: auto; }
.bsp-kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin-top: 14px; }
.bsp-kachel {
  display: flex; flex-direction: column; gap: 4px; padding: 4px; min-width: 0;
  background: transparent; border: 1px solid var(--border); border-radius: 2px; cursor: pointer;
  text-transform: none; letter-spacing: normal; font: inherit; color: var(--ink);
}
.bsp-kachel:hover, .bsp-kachel:focus-visible { border-color: var(--accent); }
.bsp-kachel-bild { width: 100%; height: 62px; object-fit: contain; background: #fff; border-radius: 2px; }
.bsp-wartet .bsp-kachel-bild, .bsp-gescheitert .bsp-kachel-bild, .bsp-original .bsp-kachel-bild { opacity: 0.35; }
.bsp-kachel-fuss { display: flex; align-items: center; gap: 5px; font-size: 0.72rem; flex-wrap: wrap; }
.bsp-kachel-stand { color: var(--muted); }
.bsp-gescheitert .bsp-kachel-stand { color: #e79a9a; }
.bsp-neu .bsp-kachel-stand, .bsp-wartet .bsp-kachel-stand { color: var(--accent); }
.bsp-flagge { width: 18px; height: 13px; object-fit: cover; border-radius: 1px; flex: none; }
.bsp-zurueck { margin-bottom: 12px; }
.bsp-detail-titel { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.bsp-vergleich { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.bsp-vergleich figure { margin: 0; min-width: 0; }
.bsp-vergleich figcaption { font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.bsp-vergleich img { width: 100%; max-height: 52vh; object-fit: contain; background: #fff; border-radius: 2px; display: block; }
.bsp-leer { display: flex; align-items: center; justify-content: center; min-height: 160px; border: 1px dashed var(--border); border-radius: 2px; color: var(--muted); }
.bsp-handgriffe { margin-top: 16px; }
@media (max-width: 640px) {
  .bsp-bild-kopf { flex-direction: column; }
  .bsp-vorlage { width: 100%; height: 140px; }
  .bsp-vergleich { grid-template-columns: minmax(0, 1fr); }
}

/* Stand der Uebersetzung (uebersetzungsstand.js, 29.10.2026): oben alle Bilder ohne Doppelte,
   darunter je Firma Texte und Bilder, jeweils mit einem schmalen Goldbalken. */
.us-kopf { display: grid; gap: 8px; margin-bottom: 14px; }
.us-gesamt { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.us-gesamt .us-balken { flex: 1 1 220px; max-width: 360px; height: 8px; }
.us-gesamt-text { font-weight: 600; color: var(--ink); }
.us-satz { margin: 0; font-size: 0.85rem; color: var(--muted); }
.us-balken { display: block; height: 5px; margin-bottom: 6px; background: var(--ef-linie); border-radius: 2px; overflow: hidden; }
.us-balken > span { display: block; height: 100%; background: var(--ef-gold); }
.us-tabelle th:nth-child(1) { width: 30%; }
.us-tabelle th:nth-child(2) { width: 35%; }
.us-tabelle th:nth-child(3) { width: 35%; }
@media (max-width: 620px) {
  /* Schmal steht jede Firma als Block (Regel von .zp-tabelle) und der Spaltenkopf fehlt:
     Dann traegt jede Zelle ihr Etikett selbst, sonst stuende "nicht eingerichtet" ohne Bezug. */
  .us-tabelle td { grid-column: 1 / -1; }
  .us-tabelle td[data-titel]::before { content: attr(data-titel); display: block; margin: 6px 0 4px; font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ef-leise); }
}
/* Probleme (jeder Admin), 29.10.2026: ein Abschnitt mit Etikett, je Eintrag eine Haarlinie
   oben und ein roter Strich links, Handgriffe links wie in der einfachen Ansicht. */
.us-probleme:empty { display: none; }
.us-probleme { margin-bottom: 16px; }
.us-abschnitt { margin: 0 0 4px; font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ef-leise); }
.us-problem { display: grid; gap: 4px; padding: 10px 0 10px 12px; border-top: 1px solid var(--ef-linie); border-left: 2px solid var(--danger); min-width: 0; }
.us-problem-kopf { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.us-problem-titel { font-weight: 600; color: var(--ink); }
.us-wortlaut { overflow-wrap: anywhere; }
.us-problem-liste { list-style: none; margin: 4px 0; padding: 0; display: grid; gap: 6px; }
.us-problem-liste li { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; min-width: 0; }
.us-problem-liste li > div { display: grid; gap: 2px; min-width: 0; }
.us-problem-liste .us-wortlaut { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.us-knoepfe { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 4px; }
.us-link { background: none; border: 0; padding: 0; margin: 0; font: inherit; font-size: 0.78rem; color: var(--ef-gold);
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer; width: auto; min-height: 0; box-shadow: none; flex: none; }
.us-link:hover, .us-link:focus-visible { color: var(--ink); background: none; }
/* Auswahl, welche Module in welche Sprache (29.10.2026): in der Zeile einer Firma die Flaggen
   ihrer Zielsprachen, im eigenen Teil des Fensters je Sprache die Module zum Ankreuzen. */
.us-ziel-zeile { margin: 4px 0 2px; }
.us-ziel { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 0.72rem; color: var(--muted); }
.us-ziel > span { display: inline-flex; align-items: center; gap: 4px; }
.us-wahl { display: grid; gap: 10px; min-width: 0; }
.us-wahl[hidden], .us-uebersicht[hidden] { display: none; }
.us-wahl-titel { font: 600 1.05rem var(--ef-display); color: var(--ink); }
.us-wahl-sprachen { display: flex; flex-wrap: wrap; gap: 6px; }
.us-wahl-sprache {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; width: auto; min-height: 0; flex: none;
  background: transparent; border: 1px solid var(--border); border-radius: 2px; cursor: pointer; box-shadow: none;
  text-transform: none; letter-spacing: normal; font: inherit; font-size: 0.74rem; color: var(--muted);
}
.us-wahl-sprache:hover, .us-wahl-sprache:focus-visible { border-color: var(--accent); color: var(--ink); background: transparent; }
.us-wahl-sprache.us-aktiv { color: var(--ink); }
.us-wahl-sprache.us-gewaehlt { border-color: var(--ef-gold); color: var(--ink); background: rgba(211, 178, 100, 0.12); }
.us-wahl-zahl { min-width: 16px; padding: 0 4px; border-radius: 2px; background: var(--ef-gold); color: #12161b; font-weight: 600; font-size: 0.66rem; text-align: center; }
.us-wahl-sprachtitel { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; font: 600 0.95rem var(--ef-display); color: var(--ink); }
.us-wahl-liste { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ef-linie); }
.us-wahl-modul { display: grid; gap: 2px; padding: 8px 0 8px 12px; border-bottom: 1px solid var(--ef-linie); border-left: 2px solid transparent; min-width: 0; }
.us-wahl-modul.us-an { border-left-color: var(--ef-gold); }
.us-wahl-haken { display: flex; align-items: flex-start; gap: 10px; margin: 0; cursor: pointer; min-width: 0; }
.us-wahl-haken input { flex: none; margin-top: 2px; }
.us-wahl-haken input:disabled + span { cursor: default; }
.us-wahl-modul > .zp-leise { padding-left: 26px; }
/* Guthaben bei Claude oder Gemini leer: der Knopf "Übersetzung" im Kopf wird rot. */
#uebersetzung-knopf.us-knopf-warnung { color: #e79a9a; border-color: var(--danger); background: rgba(224, 82, 82, 0.12); }

/* STARTBILD IM KI-IMPORT (04.11.2026): Titelbild der ersten PDF-Seite als Modulbild, ueberschreibbar */
.ai-pv-startbild { margin: 10px 0 14px; }
.ai-pv-startbild-reihe { display: flex; gap: 14px; align-items: flex-start; margin-top: 6px; }
.ai-pv-startbild-reihe > div { min-width: 0; }
.ai-pv-startbild-bild { width: 168px; height: 105px; object-fit: cover; border-radius: 2px; border: 1px solid var(--ef-linie, rgba(255,255,255,0.12)); flex: none; background: #fff; }
.ai-pv-startbild-reihe .meta { margin: 0 0 8px; }
.ai-pv-startbild-knoepfe { display: flex; gap: 8px; flex-wrap: wrap; }
.ai-pv-startbild-wahl { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ai-pv-startbild-wahl[hidden] { display: none; }
.ai-pv-startbild-kachel { padding: 0; width: 88px; height: 58px; border: 1px solid var(--ef-linie, rgba(255,255,255,0.12)); border-radius: 2px; background: none; cursor: pointer; overflow: hidden; }
.ai-pv-startbild-kachel img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ai-pv-startbild-kachel.gewaehlt, .ai-pv-startbild-kachel:hover { border-color: var(--accent); outline: 1px solid var(--accent); }
@media (max-width: 560px) { .ai-pv-startbild-reihe { flex-direction: column; } .ai-pv-startbild-bild { width: 100%; height: auto; aspect-ratio: 16 / 10; } }

/* ── Zugänge aus Excel übernehmen (05.11.2026): der Plan "alt → neu" ─────────────────────────── */
.bs-fenster.zg-plan-fenster { width: min(980px, 100%); max-height: calc(100vh - 48px); min-width: 0; max-width: 100%; }
/* Die Tabelle darf das Fenster nicht breiter ziehen als den Bildschirm: Sie rollt in ihrem Kasten (Flex- und Grid-Kinder
   nehmen sonst die Mindestbreite ihres Inhalts, gemessen 05.11. bei 500 Bildpunkten mit Adresse und Passwort) */
.zg-plan-fenster > * { min-width: 0; }
.zg-plan-rolle { max-height: 52vh; overflow: auto; margin: 2px 0 16px; border-top: 1px solid var(--ef-linie); }
.zg-plan { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.zg-plan th {
  position: sticky; top: 0; background: var(--bg-2); text-align: start;
  font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ef-leise); font-weight: 600;
}
/* Koepfe nie mitten im Wort ("NUMME R" bei 500 Bildpunkten); Zellen nur an Wortgrenzen, notfalls rollt der Kasten seitlich */
.zg-plan th, .zg-plan td { padding: 8px 10px; border-bottom: 1px solid var(--ef-linie); vertical-align: top; }
.zg-plan th { white-space: nowrap; }
.zg-plan .zg-nr { color: var(--accent); white-space: nowrap; }
.zg-alt { color: var(--ef-leise); text-decoration: line-through; }
.zg-pfeil { color: var(--ef-leise); }
/* --ef-rot gilt nur in der einfachen Ansicht; hier das Rot der Gefahrknoepfe (.button-danger) */
.zg-fehler { border-inline-start: 2px solid #e79a9a; padding: 4px 12px; margin: 0 0 14px; color: #e79a9a; font-size: 0.86rem; }
.zg-fehler p { margin: 0 0 4px; }
.zg-fehler ul { margin: 0; padding-inline-start: 18px; }

/* Firmen waehlen vor dem Herunterladen (05.11.2026): zum Ankreuzen, zusammen in einer Datei */
.zg-firmawahl { border: 0; padding: 0; margin: 4px 0 18px; display: grid; gap: 8px; min-width: 0; }
.zg-firmawahl legend {
  padding: 0; margin-bottom: 8px; font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ef-leise); font-weight: 600;
}
.zg-firmen-kopf { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.zg-firmen-kopf .zg-suche { flex: 0 1 240px; min-width: 0; height: 32px; padding: 4px 10px; font-size: 0.86rem; }
.zg-firmen-rolle {
  max-height: 300px; overflow: auto; padding: 4px 2px; border-top: 1px solid var(--ef-linie); border-bottom: 1px solid var(--ef-linie);
}
.zg-gruppe + .zg-gruppe { margin-top: 8px; padding-top: 6px; border-top: 1px dashed var(--ef-linie); }
.zg-firmawahl .zg-gruppe-kopf { font-weight: 600; color: var(--accent); }
.zg-gruppe-zahl { margin-inline-start: 6px; color: var(--ef-leise); font-weight: 400; font-size: 0.76rem; }
.zg-firmen-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 2px 18px; padding-inline-start: 24px; }
.zg-firma-zeile[hidden], .zg-gruppe[hidden] { display: none; }
.zg-kein-treffer { margin: 8px 0; font-size: 0.86rem; color: var(--ef-leise); }
.zg-firmawahl .zg-firma-zeile { display: flex; gap: 8px; align-items: center; font-size: 0.86rem; font-weight: 400; cursor: pointer; padding: 4px 0; min-width: 0; }
.zg-firma-zeile span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zg-firmawahl .zg-alle { font-weight: 600; }
.zg-firmen-zahl { margin: 0; font-size: 0.78rem; color: var(--ef-leise); }
.zg-firmen-zahl.zg-keine { color: #e79a9a; }

/* Das eigene Passwort (05.11.2026) */
.bs-fenster.pw-fenster { width: min(460px, 100%); }
.pw-form { display: grid; gap: 14px; }
.pw-feld { display: grid; gap: 6px; }
.pw-feld input { width: 100%; }
.pw-meldung { margin: 0; color: #e79a9a; font-size: 0.86rem; }

/* AUSWAHLLISTEN MIT SUCHE (06.11.2026, suchauswahl.js): das Fenster, das sich statt der Liste
   des Browsers oeffnet. Liegt ueber allem, auch ueber Dialogen (z-index 4000). */
.sa-fenster {
  position: fixed;
  z-index: 5000;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--ef-flaeche);
  border: 1px solid var(--ef-linie-gold);
  border-radius: 2px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  color: var(--ef-text);
  font: 400 0.9rem/1.35 var(--ef-sans);
  text-transform: none;
  letter-spacing: normal;
}
.sa-kopf {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-bottom: 1px solid var(--ef-linie);
}
.sa-fenster .sa-feld {
  flex: 1 1 auto;
  min-width: 0;
  height: 34px;
  padding: 6px 10px;
  background: var(--ef-grund);
  border: 1px solid var(--ef-linie);
  border-radius: 2px;
  color: var(--ef-hell);
  font: inherit;
}
.sa-fenster .sa-feld:focus { outline: none; border-color: var(--ef-gold); }
.sa-zaehler { flex: 0 0 auto; color: var(--ef-leise); font-size: 0.78rem; white-space: nowrap; }
.sa-zaehler:empty { display: none; }
.sa-liste {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  overflow-y: auto;
  min-height: 0;
  flex: 1 1 auto;
  overscroll-behavior: contain;
}
.sa-eintrag {
  padding: 7px 12px;
  cursor: pointer;
  overflow-wrap: anywhere;
  border-inline-start: 2px solid transparent;
}
.sa-eintrag.sa-gewaehlt { color: var(--ef-gold); }
.sa-eintrag.sa-markiert { background: var(--ef-gold-hauch); border-inline-start-color: var(--ef-gold); color: var(--ef-hell); }
.sa-eintrag.sa-gewaehlt.sa-markiert { color: var(--ef-gold); }
.sa-eintrag.sa-aus { cursor: default; color: var(--ef-leise); opacity: 0.6; }
.sa-gruppe {
  padding: 10px 12px 4px;
  color: var(--ef-leise);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.sa-leer { margin: 0; padding: 12px; color: var(--ef-leise); }

/* MODUS DER BRILLE (06.11.2026): Marke neben dem Namen einer Brille im Modus Supervisor oder
   Master (app.js, brillenModusMarke). */
/* Eigene Zeile unter dem Namen, und der Namensblock ist mindestens so breit wie die laengste
   Marke: Das Umstellen des Modus aendert die Breite der ersten Spalte nie (sonst sprang die
   Spalte "Filiale" mit, 06.11.2026). */
.br-zeile .ma-name-zelle > div { min-width: 7.5rem; }
.br-modus {
  display: inline-block;
  margin-top: 3px;
  padding: 1px 6px;
  border: 1px solid var(--ef-linie-gold);
  border-radius: 2px;
  color: var(--ef-gold);
  font: 600 0.62rem/1.5 var(--ef-sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  vertical-align: middle;
}
.br-modus-master { background: var(--ef-gold); color: var(--ef-grund); border-color: var(--ef-gold); }
/* Testbrille (11.11.2026): in Petrol, der Farbe der Bedienung, damit sie sich vom Modus abhebt. */
.br-modus-test { color: #6fc3cc; border-color: rgba(111, 195, 204, 0.55); margin-inline-start: 4px; }
.ex-test { color: #6fc3cc; border-color: rgba(111, 195, 204, 0.55); }
/* Der Haken "Testbrille" (nur Master) steht als eigene Zeile unter den Feldern der Brille. */
.br-einrichten .br-test-feld { grid-column: 1 / -1; max-width: 46rem; margin-top: 4px; }

/* BESTELLEN MIT BESTAETIGUNG UND FORTSCHRITT (06.11.2026, uebersetzungsstand.js): Vorgemerktes
   ist gestrichelt markiert, die Leiste mit "Bestaetigen" klebt unten im Fenster, oben steht je
   bestellter Sprache ein Balken. */
.us-wahl-modul.us-vorgemerkt { border-left: 2px dashed var(--ef-gold); background: var(--ef-gold-hauch); }
.us-wahl-sprache.us-vorgemerkt { box-shadow: inset 0 -2px 0 var(--ef-gold); }
.us-best-leiste {
  position: sticky;
  bottom: -14px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 14px -2px 0;
  padding: 12px 14px;
  background: var(--ef-flaeche);
  border-top: 1px solid var(--ef-linie-gold);
  box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.35);
}
.us-best-zahl { margin-inline-end: auto; color: var(--ef-hell); font-weight: 600; }
.us-fort { margin: 12px 0 14px; padding: 12px 14px; border: 1px solid var(--ef-linie); border-radius: 2px; }
.us-fort-zeile { padding: 8px 0; border-top: 1px solid var(--ef-linie); }
.us-fort-zeile:first-of-type { border-top: 0; }
.us-fort-kopf { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.us-fort-zustand { margin-inline-start: auto; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ef-gold); }
.us-fort-fertig .us-fort-zustand { color: var(--ef-gruen); }
.us-fort-zeile .us-balken { height: 7px; }

/* SPRACHEN EINES MODULS (06.11.2026, app.js modulSpracheMarke). Vorn die Hauptsprache als
   schlanke Marke im feinen Goldrahmen (Stern, Flagge, Kuerzel), dahinter durch eine Haarlinie
   getrennt die Flaggen der bestellten Sprachen, alle gleich gross. Steht rechts neben dem Namen
   eines Moduls (.modul-titelzeile); reicht der Platz nicht, rutscht sie in die naechste Zeile. */
.modul-titelzeile { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 10px; min-width: 0; }
.modul-titelzeile > :first-child { min-width: 0; }
.modul-sprachen { display: inline-flex; align-items: center; gap: 8px; flex: none; vertical-align: middle; line-height: 1; }
.modul-haupt {
  display: inline-flex; align-items: center; gap: 5px;
  height: 20px; padding: 0 7px 0 6px;
  border: 1px solid rgba(211, 178, 100, 0.42); border-radius: 2px;
  background: rgba(211, 178, 100, 0.08);
  color: var(--ef-gold);
}
.modul-haupt svg.ikon { width: 10px; height: 10px; flex: none; }
.modul-haupt svg.ikon path { fill: currentColor; stroke: none; }
.modul-kuerzel { font: 600 0.62rem/1 var(--ef-sans); letter-spacing: 0.12em; text-transform: uppercase; }
.modul-flagge {
  display: block; flex: none; width: 16px; height: 11px;
  border-radius: 1.5px; object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16);
}
.modul-neben {
  display: inline-flex; align-items: center; gap: 5px;
  height: 14px; padding-inline-start: 8px;
  border-inline-start: 1px solid rgba(255, 255, 255, 0.16);
}
.modul-mehr { font: 600 0.62rem/1 var(--ef-sans); letter-spacing: 0.06em; color: var(--ef-leise); }
/* In schmalen Spalten (Modulzeile einer Person) steht die Marke unter dem Namen, der Name bricht um. */
.ma-plan-titel.modul-titelzeile { flex-direction: column; align-items: flex-start; gap: 6px; }

/* ── Gemeldete Probleme aus den Brillen (07.11.2026, meldungen.js) ── */
.ml-fenster { max-width: 980px; }
.ml-liste { display: flex; flex-direction: column; gap: 0; flex: 1 1 auto; min-height: 0; overflow-y: auto; }
/* Ohne flex: none staucht die Liste die Zeilen auf Textzeilenhoehe zusammen (gesehen am 07.11.). */
.ml-liste > * { flex: none; }
.ml-zeile { display: grid; grid-template-columns: 128px minmax(0, 1fr) auto; gap: 14px; align-items: center; width: 100%;
  padding: 10px 12px; background: none; border: 0; border-top: 1px solid var(--border); border-radius: 0; color: var(--ink);
  text-align: start; font: inherit; text-transform: none; letter-spacing: 0; cursor: pointer; min-height: 0; box-shadow: none; }
.ml-zeile:hover, .ml-zeile:focus-visible { background: rgba(211, 178, 100, 0.06); }
.ml-zeile .ml-text { display: grid; gap: 2px; min-width: 0; }
.ml-zeile .ml-text > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-bild { width: 128px; height: 72px; display: grid; place-items: center; background: var(--bg-2); border: 1px solid var(--border); border-radius: 2px; overflow: hidden; }
.ml-bild img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ml-marke { font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 8px; border-radius: 2px; border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
.ml-marke-neu { border-color: rgba(211, 178, 100, 0.7); color: #d3b264; }
.ml-marke-arbeit { border-color: rgba(120, 170, 230, 0.6); color: #9cc3f0; }
.ml-st-erledigt { opacity: 0.72; }
.ml-detail { display: grid; gap: 14px; padding-top: 6px; }
.ml-detail-kopf { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; }
.ml-gross { font-size: 1.15rem; }
.ml-staende { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.ml-detail > [data-ml-zurueck] { justify-self: start; }
.ml-stand-knopf { width: auto; padding: 6px 12px; min-height: 0; background: transparent; color: var(--ink); border: 1px solid var(--border); }
.ml-stand-knopf:hover { border-color: rgba(211, 178, 100, 0.7); color: #d3b264; background: transparent; }
.ml-stand-knopf.ml-aktiv, .ml-stand-knopf.ml-aktiv:hover { background: #d3b264; color: #12161b; border-color: #d3b264; }
.ml-zitat { margin: 0; padding: 10px 14px; border-inline-start: 2px solid #d3b264; background: var(--bg-2); color: var(--ink); white-space: pre-wrap; }
.ml-detail-bild { display: grid; place-items: center; min-height: 120px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 2px; overflow: hidden; }
.ml-detail-bild img { display: block; max-width: 100%; max-height: 60vh; height: auto; }
.ml-angaben { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 18px; }
.ml-angabe { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.ml-log summary { cursor: pointer; color: var(--ink); }
.ml-log pre { margin: 8px 0 0; padding: 10px 12px; max-height: 320px; overflow: auto; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 2px; font-size: 0.75rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 620px) {
  .ml-zeile { grid-template-columns: 88px minmax(0, 1fr); }
  .ml-zeile .ml-marke { grid-column: 2; justify-self: start; }
  .ml-bild { width: 88px; height: 50px; }
}

/* ── Betrieb: Stand des Codes, Datensicherungen, Notschalter (07.11.2026, betrieb.js) ── */
.bt-fenster { max-width: 760px; }
.bt-teil { padding: 14px 0; border-top: 1px solid var(--border); }
.bt-teil:first-of-type { border-top: 0; }
.bt-kopfzeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.bt-kopf { margin: 0 0 6px; font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.bt-satz { margin: 4px 0 8px; }
.bt-leise { color: var(--muted); font-size: 0.85rem; }
.bt-block { display: block; margin-top: 2px; }
.bt-warn { color: #e79a9a; }
.bt-liste { display: grid; gap: 0; }
.bt-zeile { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 0; border-top: 1px solid var(--border); }
.bt-zeile:first-child { border-top: 0; }
.bt-text { min-width: 0; }
.bt-name { font-weight: 600; margin-inline-end: 8px; }
.bt-marke { font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 2px 7px; border-radius: 2px; border: 1px solid var(--border); margin-inline-end: 8px; }
.bt-an { color: #8fd6a2; border-color: rgba(143, 214, 162, 0.55); }
.bt-aus { color: #e79a9a; border-color: rgba(231, 154, 154, 0.6); }
.bt-schalter button { flex: none; width: auto; }
.bt-jetzt { width: auto; }
@media (max-width: 620px) {
  .bt-zeile { flex-direction: column; align-items: stretch; }
}

