/* Eingabefelder mindestens 1rem (16px): darunter zoomt iOS beim
   Antippen von selbst hinein. Haengt mit dem Entfernen von
   maximum-scale in index.html zusammen - beides gehoert zusammen. */
/* ===================================================================
   Gemeinsame Formwerte
   ===================================================================
   Vier benannte Rundungen statt der 28 Einzelwerte, die hier
   gewachsen waren (von 2 px bis 30 px). Sie haengen an :root, also am
   <html>-Element - dort sitzt auch die Plattform-Klasse, und deshalb
   kann jedes System seine eigene Auslegung bekommen, ohne dass eine
   einzige Regel doppelt geschrieben werden muss.

   Der auffaelligste Unterschied: Material rundet Knoepfe und Chips
   VOLL (die "Pille"), iOS rundet sie zurueckhaltend. Das allein macht
   einen grossen Teil des jeweiligen Systemeindrucks aus. */
:root {
  --r-chip: 8px;     /* Kennzeichnungen, kleine Auswahlfelder */
  --r-knopf: 12px;   /* Knoepfe und Eingabefelder */
  --r-karte: 14px;   /* Karten und Kaesten in Listen */
  --r-blatt: 16px;   /* Dialoge und Blaetter von unten */
}
/* BEWUSST .os-android und nicht :root.os-android: eigene
   Eigenschaften werden vererbt, die Werte gelten also auch, wenn die
   Klasse an einem beliebigen Vorfahren haengt - am <html> im Betrieb
   und an einem Rahmen-div in einer Vorschauseite. Mit :root davor
   griffe die Regel NUR am <html>, und jede Vorschau zeigte
   stillschweigend die neutrale Fassung. Genau darauf bin ich beim
   Bauen hereingefallen. */
.os-android {
  --r-chip: 100px;
  --r-knopf: 100px;
  --r-karte: 16px;
  --r-blatt: 28px;
}
.os-ios {
  --r-chip: 8px;
  --r-knopf: 12px;
  --r-karte: 12px;
  --r-blatt: 14px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               sans-serif;
  background: #F8FAFC;
  color: #1F2937;
  -webkit-tap-highlight-color: transparent;
  /* Chromes natives Pull-to-Refresh (Android) abschalten: das Wischen
     nach unten am oberen Rand wuerde sonst die Seite komplett neu
     laden -> beim Reload blitzt kurz der Login-Screen auf, bevor
     app.js auf den Hauptscreen umschaltet. Die App hat eine EIGENE
     Wisch-Aktualisierung (setupHauptmenuePtr, nur AJAX) - die bleibt
     davon unberuehrt. */
  overscroll-behavior-y: contain;
}
.screen {
  padding: 16px 18px 80px 18px;
  max-width: 720px; margin: 0 auto;
}
.hidden { display: none !important; }
/* Interessenten-Assistent: Fortschritts-Punkte */
.int-dot { width: 9px; height: 9px; border-radius: 50%;
  background: #CBD5E1; display: inline-block; transition: background .15s; }
.int-dot.active { background: #F59E0B; }
.int-dot.done { background: #16A34A; }
/* Interessenten-Assistent: einheitlich grosse Eingabefelder (Text + Select) */
.int-feld { width: 100%; box-sizing: border-box; height: 46px;
  padding: 0 12px; font-size: 1rem; color: #0f172a; line-height: 44px;
  border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; }
/* Select behaelt seinen nativen Aufklapp-Pfeil, gleiche Hoehe wie Inputs. */
select.int-feld { line-height: normal; padding: 0 10px; }
h1 { font-size: 1.7rem; margin: 12px 0 4px; }
h2 { font-size: 1.3rem; margin: 12px 0 6px; }
h3 { font-size: 1.05rem; margin: 16px 0 6px; color: #475569; }
header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #E2E8F0;
  margin: -16px -18px 12px -18px; padding: 12px 16px;
  background: #FFC107;
}
header h2, header h1 { color: #1F2937; margin: 0; }

label {
  display: block; font-size: 0.95rem; margin: 12px 0 4px;
  color: #475569;
}
input[type=text], input[type=password], input:not([type]) {
  width: 100%; padding: 12px 14px;
  font-size: 1.05rem;
  border: 1px solid #CBD5E1; border-radius: 10px;
  background: #FFFFFF;
}
button {
  display: block; width: 100%;
  /* 48 px Mindesthoehe - der Wert, den beide Systeme fuer eine
     Trefferflaeche verlangen. Die Zielgruppe bedient das Geraet
     unterwegs, oft mit Handschuh. */
  min-height: 48px;
  padding: 14px 16px; margin: 14px 0;
  font-size: 1rem; font-weight: 600;
  border: none; border-radius: var(--r-knopf);
  cursor: pointer;
}
button.primary { background: #FFC107; color: #1F2937; }
button.primary:active { background: #F59E0B; }
button.danger { background: #DC2626; color: #FFFFFF; }
button.danger:active { background: #991B1B; }
/* Der zurueckhaltende Knopf: frueher randlos und nur bei Beruehrung
   erkennbar. Beide Systeme geben ihm heute einen feinen Umriss -
   damit ist er als Knopf zu sehen, ohne mit dem Hauptknopf um
   Aufmerksamkeit zu ringen. */
button.ghost {
  background: transparent; color: #1F2937; padding: 8px 14px;
  width: auto; margin: 0; min-height: 40px;
  font-size: 0.95rem; border-radius: var(--r-knopf);
  /* Der feine Umriss macht ihn ueberhaupt erst als Knopf erkennbar.
     Ohne ihn war er blosser Text, den man nur bei Beruehrung als
     bedienbar erlebte - beide Systeme umreissen den zurueckhaltenden
     Knopf heute. */
  border: 1px solid #CAC4D0;
}
button.ghost:active { background: #FEF3C7; }
button.big { padding: 22px 16px; font-size: 1.15rem; }

.muted { color: #6B7280; font-size: 0.95rem; }
.error { color: #B91C1C; font-size: 0.95rem; }
/* Feiertag (NRW) unter einem nativen Datumsfeld (feiertagHinweis in
   app.js): Feld und Auswahl-Popup des Handys zeigen den Feiertag
   nicht an, die Zeile nennt ihn. Farben wie in jedem Kalender des
   Programms (ui/kalender_feiertage.py). Die Zeile behaelt ihre Hoehe
   auch leer (min-height = eine Zeile + Innenabstand) - waehlt jemand
   einen Feiertag, rutscht das Formular darunter nicht. Die helle
   Flaeche nur, solange ein Name drinsteht; sie ist so breit wie der
   Text, nicht wie das Feld - ein voller roter Balken saehe nach
   Fehlermeldung aus. Das Feld selbst bleibt unverfaerbt: roter Rand
   heisst in diesen Formularen "Pflichtfeld fehlt". */
.feiertag-hinweis {
  display: block;
  width: -webkit-fit-content;
  width: -moz-fit-content;
  width: fit-content;
  max-width: 100%;
  min-height: calc(1.35em + 4px);
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
  color: #B91C1C;
}
.feiertag-hinweis.feiertag-hinweis-an { background: #FEE2E2; }
/* Urlaub: alle Feiertage zwischen Von und Bis in einer Zeile unter
   der Tage-Vorschau (urlaubFeiertageZeigen) - nur Information. */
.feiertag-zeitraum {
  margin: 6px 0 0;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.4;
  color: #B91C1C;
}
.badge {
  display: inline-block; padding: 4px 10px;
  border-radius: 999px; font-weight: 600; font-size: 0.85rem;
  background: #FEF3C7; color: #92400E; margin: 4px 0;
}

ul { list-style: none; padding-left: 0; margin: 6px 0; }
ul li {
  padding: 10px 12px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0; border-radius: 8px;
  margin-bottom: 6px;
}

.aktion-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0; border-radius: 10px;
  padding: 14px 16px; margin: 10px 0;
}
.aktion-card .titel { font-weight: 700; font-size: 1.05rem; }
.aktion-card .sub { color: #6B7280; font-size: 0.9rem;
                     margin-top: 4px; }

.btn-row { display: flex; gap: 10px; }
.btn-row button { flex: 1; }

/* ---------- Hauptmenue: Chat-Liste-Optik ---------- */
/* main-body ist der Container unter dem chat-header - scrollbar,
   weisser Hintergrund wie die Konversationsliste. */
.main-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: #FFFFFF;
  -webkit-overflow-scrolling: touch;
  /* Pull-to-Refresh-Reload von Chrome (Android) auch hier am eigentlichen
     Scroll-Container unterbinden - sonst schlaegt das Ueberscrollen oben
     bis zum Dokument durch und laedt die Seite neu (Login blitzt auf). */
  overscroll-behavior-y: contain;
}
/* Liste der Hauptbereich-Items (E-Mails / Chat / Neuer Kunde /
   Aufgaben) - keine Karten mehr, sondern flache Zeilen mit
   Trennstrich wie im Chat. */
/* --- Hauptmenue ------------------------------------------------------
   Dieselbe Handschrift wie die Reiterleisten: ruhige Toene statt
   satter Flaechen, und je eine eigene Fassung fuer iOS und Android.

   Die Symbolkacheln waren vorher fuenfzehn gleich grosse Kreise im
   satten Haus-Gelb untereinander - eine Wand aus gelben Punkten, in
   der das Auge keinen Halt fand. Jetzt tragen sie denselben weichen
   Bernsteinton wie die gewaehlte Stellung der Reiter. Das Haus-Gelb
   steht weiterhin im Kopfbereich; es muss nicht in jeder Zeile
   wiederholt werden, um zur App zu gehoeren.

   Grundfassung = iOS: eine eingerueckte, abgerundete Gruppe, wie sie
   die Systemeinstellungen zeigen. Android macht daraus weiter unten
   wieder eine randlose Liste. */
.start-buttons {
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  margin: 12px 16px 20px;
  border-radius: 12px;
  overflow: hidden;
}
.start-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  margin: 0;
  border: none;
  border-radius: 0;
  background: #FFFFFF;
  color: #1F2937;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  font-family: inherit;
  font-size: inherit;
  -webkit-tap-highlight-color: transparent;
  width: 100%;
  min-height: 60px;
  box-sizing: border-box;
  text-align: left;
}
.start-btn:active { background: #F1F5F9; }
/* Trennlinie zwischen den Eintraegen, eingerueckt bis unter den
   Beschriftungsanfang - so wie es beide Systeme in Listen machen. */
.start-btn::after {
  content: "";
  position: absolute;
  left: 66px; right: 0; bottom: 0;
  height: 1px;
  background: rgba(60,60,67,0.14);
}
.start-btn:last-child::after { display: none; }
.start-btn .start-btn-icon {
  font-size: 1.25rem;
  width: 40px; height: 40px;
  /* Abgerundetes Quadrat statt Kreis - die Form, die iOS in seinen
     Einstellungen benutzt. Android macht daraus unten wieder einen
     Kreis, dort ist das die Listenform. */
  border-radius: 10px;
  background: #FDF0C9;
  display: inline-flex;
  align-items: center; justify-content: center;
  color: #1F2937;
  line-height: 1;
  flex: 0 0 40px;
}
/* --- Symbolsatz des Hauptmenues -------------------------------------
   26 einfarbige Zeichen auf demselben 24er-Raster, gleiche
   Strichstaerke, gleiche runde Enden. Vorher standen hier Emoji: die
   stammen aus verschiedenen Quellen und passen weder in Strichstaerke
   noch in Perspektive zueinander - nebeneinander in einer Liste war
   das der Rest, der nach Bastelei aussah.

   --sym ist die Kachelfarbe des jeweiligen Bereichs (Regeln ganz
   unten). Eigene Farben statt einer einheitlichen: bei einunddreissig
   Zeilen findet das Auge die gesuchte schneller wieder, wenn es sich
   die Farbe merken kann. Genau darauf setzen die iOS-Einstellungen. */
.start-btn .start-btn-icon {
  background: var(--sym, #6B7280);
  color: #FFFFFF;
}
.start-btn .start-btn-icon .sym {
  width: 23px;
  height: 23px;
  display: block;
}
/* Android setzt fuehrende Symbole in Listen OHNE Kachel - nur den
   Strich in Textfarbe. Damit faellt auch die Kachelfarbe weg; die
   Zeile wirkt ruhiger, was zu Material passt. */
.os-android .start-btn .start-btn-icon {
  background: transparent;
  color: #49454F;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 0;
}
.os-android .start-btn .start-btn-icon .sym { width: 25px; height: 25px; }
/* Ohne Kachel rueckt der Text nach links - die Trennlinie geht bei
   Material ohnehin ueber die volle Breite. */
.os-android .start-btn::after { left: 0; }

/* Der Winkel am Zeilenende: in iOS-Listen zeigt er an, dass es
   weitergeht. Als ::before erzeugt (::after ist die Trennlinie) und
   per order ans Ende geschoben, damit dafuer kein Markup an
   zwanzig Stellen geaendert werden muss. */
.start-btn::before {
  content: "";
  order: 9;
  flex: 0 0 auto;
  width: 8px; height: 8px;
  margin-left: 2px;
  border-right: 2px solid rgba(60,60,67,0.3);
  border-bottom: 2px solid rgba(60,60,67,0.3);
  transform: rotate(-45deg);
}
.start-btn .start-btn-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
/* Frueher stand hier eine Liste von fuenfzehn Bereichsklassen, die
   alle dasselbe setzten: background: #FFC107. Sie ist entfallen -
   die Farbe kommt jetzt aus der einen Regel .start-btn-icon
   darueber. Wer einem Bereich je einen eigenen Ton geben will,
   haengt ihn hier an; solange alle gleich aussehen sollen, ist eine
   Aufzaehlung ohne Unterschied nur Pflegeaufwand. */

/* --- Hauptmenue: Android ---------------------------------------------
   Material stellt Listen randlos dar, nicht als eingerueckte Gruppe,
   und die fuehrende Kachel ist rund. Einen Winkel am Zeilenende gibt
   es dort nicht - dass eine Zeile weitergeht, zeigt Material durch
   den Druckeffekt. */
.os-android .start-buttons {
  margin: 0;
  border-radius: 0;
}
.os-android .start-btn::before { display: none; }
.os-android .start-btn .start-btn-icon { border-radius: 50%; }
.os-android .start-btn::after { background: #E7E0EC; }
.os-android .start-btn:active { background: rgba(0,0,0,0.06); }

/* Kachelfarbe je Bereich. Eine Zeile je Knopf - ausdruecklich und
   auffindbar; wer einen Bereich umfaerben will, aendert genau hier. */
#btn-mails-open .start-btn-icon { --sym: #2563EB; }
#btn-chat-open .start-btn-icon { --sym: #16A34A; }
#btn-neuer-kunde-open .start-btn-icon { --sym: #7C3AED; }
#btn-vo-abholen-open .start-btn-icon { --sym: #EA580C; }
#btn-aufgaben-open .start-btn-icon { --sym: #0891B2; }
#btn-notizen-open .start-btn-icon { --sym: #DB2777; }
#btn-urlaub-open .start-btn-icon { --sym: #F59E0B; }
#btn-wunschfrei-open .start-btn-icon { --sym: #E11D48; }
#btn-tour-hw-open .start-btn-icon { --sym: #059669; }
#btn-faq-open .start-btn-icon { --sym: #6366F1; }
#btn-ki-fragen-open .start-btn-icon { --sym: #8B5CF6; }
#btn-schwarze-liste-open .start-btn-icon { --sym: #4B5563; }
#btn-beratung-open .start-btn-icon { --sym: #0D9488; }
#btn-tour-open .start-btn-icon { --sym: #2563EB; }
#btn-werbeauto-open .start-btn-icon { --sym: #DC2626; }
#btn-flyer-open .start-btn-icon { --sym: #D97706; }
#btn-bonus-open .start-btn-icon { --sym: #CA8A04; }
#btn-interessent-open .start-btn-icon { --sym: #7C3AED; }
#btn-ma-dok-open .start-btn-icon { --sym: #475569; }
#btn-termine-open .start-btn-icon { --sym: #DC2626; }
#btn-kontakte-open .start-btn-icon { --sym: #16A34A; }
#btn-zeit-open .start-btn-icon { --sym: #0891B2; }
#btn-push-settings .start-btn-icon { --sym: #6B7280; }
#btn-set-profilbild .start-btn-icon { --sym: #7C3AED; }
#btn-set-passwort .start-btn-icon { --sym: #475569; }
#btn-set-push .start-btn-icon { --sym: #EA580C; }
#btn-bonus-bedarf .start-btn-icon { --sym: #DB2777; }
#btn-bonus-stand .start-btn-icon { --sym: #CA8A04; }
#btn-flyer-neu .start-btn-icon { --sym: #059669; }
#btn-flyer-standort .start-btn-icon { --sym: #D97706; }
#btn-flyer-strecken .start-btn-icon { --sym: #2563EB; }

/* ============================================================
   Zeiterfassung (Stempeluhr) - Status-Karte, grosse Stempel-
   Knoepfe, Heute-/Monats-Zeilen.
   ============================================================ */
.zeit-status-card {
  background: #FFFFFF; border: 1px solid #E5E7EB; border-radius: 10px;
  padding: 16px; margin: 12px 14px 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); text-align: center;
}
.zeit-st-kopf { font-size: 1.05rem; font-weight: 700; }
.zeit-st-arbeit { color: #15803D; }
.zeit-st-pause { color: #A16207; }  /* HIG-Kontrast: #CA8A04 hatte 2,9:1 auf Weiss */
.zeit-st-aus { color: #64748B; }
.zeit-st-beendet { color: #DC2626; }
.zeit-beendet-hinweis {
  margin: 0; padding: 10px 12px; border-radius: 8px;
  background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B;
  font-size: 0.88rem; text-align: center;
}
.zeit-zaehler {
  font-size: 2.2rem; font-weight: 800; line-height: 1.2;
  font-variant-numeric: tabular-nums; min-height: 1.2em;
}
.zeit-heute-summe { font-size: 0.88rem; color: #475569; margin-top: 4px; }
.zeit-weiterlauf { font-size: 0.78rem; color: #475569; margin-top: 4px; }
/* Gruenes 'läuft'-Badge rechts im Hauptmenue-Button Zeiterfassung. */
.zeit-menu-badge {
  margin-left: auto; flex: 0 0 auto;
  font-size: 0.85rem; font-weight: 800; color: #16A34A;
}
.zeit-menu-badge.pause { color: #A16207; }
/* Gestapelt (Pause-Knopf UEBER dem Stopp-Knopf). */
.zeit-btn-row {
  display: flex; flex-direction: column; gap: 10px; margin: 4px 14px 12px;
}
.zeit-stempel-btn {
  width: 100%; padding: 16px 10px; border: none; border-radius: 10px;
  font-size: 1.05rem; font-weight: 800; color: #FFFFFF; cursor: pointer;
}
.zeit-stempel-btn:disabled { opacity: 0.55; }
.zeit-gruen { background: #16A34A; }
.zeit-gruen:active { background: #15803D; }
.zeit-gelb { background: #FACC15; color: #1F2937; }
.zeit-gelb:active { background: #EAB308; }
.zeit-rot { background: #DC2626; }
.zeit-rot:active { background: #B91C1C; }
.zeit-abschnitt {
  margin: 14px 14px 4px; font-size: 0.95rem; color: #1F2937;
}
.zeit-kennzahlen { margin: 0 14px 6px; font-size: 0.9rem; color: #374151; }
.zeit-row {
  display: flex; align-items: center; gap: 10px;
  background: #FFFFFF; border: 1px solid #E5E7EB; border-radius: 8px;
  padding: 9px 12px; margin: 6px 14px; font-size: 0.92rem;
}
.zeit-row-pause { background: #FFF7ED; }
.zeit-row-art { font-weight: 700; color: #1F2937; min-width: 84px; }
.zeit-row-dauer {
  margin-left: auto; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.zeit-saldo-plus { color: #15803D; }
.zeit-saldo-minus { color: #B91C1C; }
/* Feiertag (NRW) in der Monatsuebersicht: Zeile hell rot, Datum rot,
   der Name steht in der mittleren Spalte (.zeit-row-art ist auf
   "Mo 25.12." ausgelegt). Nur Anzeige - Soll und Saldo rechnet der
   Server wie bisher. Gleiche Farben wie in jedem Kalender des
   Programms (ui/kalender_feiertage.py). */
.zeit-row.zeit-row-feiertag { background: #FEE2E2; border-color: #FCA5A5; }
.zeit-row-feiertag .zeit-row-art { color: #B91C1C; }
.zeit-feiertag {
  display: block; font-size: 0.78rem; font-weight: 700; color: #B91C1C;
  line-height: 1.3;
}

/* ============================================================
   Werbeauto: Streckenliste + Turn-by-Turn-Navigation (Karte +
   Anweisungs-Banner + "meiden"-Warnung).
   ============================================================ */
.wa-gesperrt-box {
  background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B;
  border-radius: 8px; padding: 10px 14px; margin: 10px 14px;
  font-size: 0.9rem;
}
.wa-gesperrt-box ul { margin: 6px 0 0 18px; padding: 0; }
.wa-strecke-card {
  background: #FFFFFF; border: 1px solid #E5E7EB;
  border-left: 4px solid #FFC107; border-radius: 8px;
  padding: 12px 14px; margin: 10px 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); cursor: pointer;
}
.wa-strecke-name { font-weight: 700; font-size: 1rem; color: #1F2937; }
.wa-strecke-sub { font-size: 0.82rem; color: #6B7280; margin-top: 2px; }
.wa-strecke-termin {
  font-size: 0.85rem; font-weight: 700; color: #B45309; margin-top: 3px;
}
.wa-strecke-freq {
  font-size: 0.85rem; font-weight: 700; color: #1D4ED8; margin-top: 2px;
}
.wa-strecke-dist {
  font-size: 0.82rem; color: #374151; margin-top: 2px;
}
.wa-strecke-go {
  margin-top: 8px; font-size: 0.85rem; font-weight: 700; color: #2563EB;
}
/* Flyerart-Hinweis ("welchen Flyer mitnehmen?") auf Karte + Screens */
.wa-strecke-flyerart {
  font-size: 0.85rem; font-weight: 700; color: #15803D; margin-top: 2px;
}
.fl-flyerart-hint {
  font-size: 0.95rem; font-weight: 700; color: #15803D; margin: 4px 0 8px;
}
/* Datums-Gate: Tour erst am geplanten Tag startbar -> Karte ausgegraut */
.wa-strecke-card.fl-gesperrt {
  border-left-color: #9CA3AF; background: #F3F4F6; opacity: 0.85;
  cursor: default;
}
.wa-strecke-lock {
  margin-top: 8px; font-size: 0.85rem; font-weight: 700; color: #B91C1C;
}
.wa-banner {
  display: flex; align-items: center; gap: 14px;
  background: #1F2937; color: #FFFFFF; padding: 14px 18px;
}
.wa-banner-pfeil { font-size: 2rem; line-height: 1; }
.wa-banner-dist { font-size: 1.5rem; font-weight: 800; }
.wa-banner-anw { font-size: 0.95rem; opacity: 0.95; }
.wa-warn {
  background: #DC2626; color: #fff; padding: 8px 14px;
  font-weight: 700; font-size: 0.85rem; text-align: center;
}
.wa-map { width: 100%; height: calc(100vh - 230px); min-height: 260px; }
.wa-nav-controls { padding: 10px 14px; }
.wa-stop-btn { width: 100%; }

/* Kontrollfoto-Pflicht waehrend der Flyer-Haushalte-Navigation (dezent;
   wird rot/pulsierend, sobald ein Foto faellig ist). */
.fl-kontroll-box { margin-bottom: 10px; }
.fl-kontroll-status {
  font-size: 0.85rem; color: #475569; text-align: center;
  margin-bottom: 6px;
}
.fl-kontroll-btn {
  width: 100%; padding: 12px; border: 1px solid #CBD5E1;
  border-radius: 10px; background: #F1F5F9; color: #1F2937;
  font-size: 1rem; font-weight: 700; cursor: pointer;
}
.fl-kontroll-box.due .fl-kontroll-status { color: #DC2626; font-weight: 700; }
.fl-kontroll-box.due .fl-kontroll-btn {
  background: #DC2626; color: #fff; border-color: #DC2626;
  animation: flKontrollPulse 1.1s ease-in-out infinite;
}
@keyframes flKontrollPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0.45); }
  50% { box-shadow: 0 0 0 7px rgba(220,38,38,0); }
}

/* Start-Foto: Karten-Ausschnitt, der dem MA zeigt, WO die Strecke beginnt
   (dort das Straßenschild fotografieren). */
.fl-startfoto-map {
  width: 100%; height: 230px; border-radius: 10px; overflow: hidden;
  margin: 10px 0 4px; background: #EAEFF3;
  border: 1px solid #E5E7EB;
}
.fl-startfoto-hint { margin: 0 0 8px; }
/* Anfahrt-zum-Startpunkt: gestapelte Fuss/Auto-Wahl-Buttons. */
#fa-buttons .primary.big { margin-bottom: 10px; }
/* GPS-Gate-Status (rot = zu weit weg / Foto gesperrt, grün = am Start). */
.fl-startfoto-gps {
  margin: 0 0 12px; font-size: 0.9rem; font-weight: 600; color: #B91C1C;
}

/* ============================================================
   Meine Termine (PWA) - Termin-Karten + Google-Meet-Link +
   Zu-/Absage-Buttons. Selbststaendiges .termin-* Set.
   ============================================================ */
.termin-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-left: 4px solid #FFC107;
  border-radius: 8px;
  padding: 12px 14px;
  margin: 10px 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.termin-card-kopf {
  font-size: 0.78rem;
  font-weight: 700;
  color: #B45309;
  text-transform: capitalize;
}
/* Feiertag (NRW): Datum rot, der Name als kleine rote Marke dahinter.
   text-transform: none, sonst schriebe der Kopf "Tag Der Deutschen
   Einheit". Der Kartenrand bleibt, wie er ist - Rot steht an der
   Karte schon fuer "abgesagt". */
.termin-card-kopf.termin-feiertag { color: #B91C1C; }
.termin-feiertag-name {
  display: inline-block;
  margin: 2px 0 0 2px;
  padding: 1px 7px;
  border-radius: 6px;
  background: #FEE2E2;
  color: #B91C1C;
  text-transform: none;
}
.termin-card-titel {
  font-size: 1.02rem;
  font-weight: 700;
  color: #111827;
  margin-top: 2px;
}
.termin-card-text {
  font-size: 0.92rem;
  color: #374151;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.4;
  margin-top: 6px;
}
.termin-meet-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 9px 14px;
  background: #FFC107;
  color: #1A1A1A;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
}
.termin-meet-btn:active { background: #FFA000; }
.termin-status {
  margin-top: 10px;
  font-size: 0.85rem;
  color: #374151;
}
.termin-status.status-zugesagt b { color: #15803D; }
.termin-status.status-abgesagt b { color: #B91C1C; }
.termin-rsvp {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
.termin-rsvp-btn {
  flex: 1;
  min-height: 44px;
  padding: 8px 12px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid #D1D5DB;
  background: #FFFFFF;
  color: #374151;
}
.termin-rsvp-btn.ja.active {
  background: #DCFCE7;
  border-color: #15803D;
  color: #15803D;
}
.termin-rsvp-btn.nein.active {
  background: #FEE2E2;
  border-color: #B91C1C;
  color: #B91C1C;
}
.termin-rsvp-btn:disabled { opacity: 0.6; }

/* ============================================================
   Kontakte (PWA) - Telefonliste der Kollegen. Name antippen ->
   Diensthandynummer klappt auf und ist per tel:-Link direkt
   anwaehlbar. Eigenstaendiges .kontakt-* Set, Kolbe-Amber,
   Tap-Targets >= 44px.
   ============================================================ */
.kontakte-suche {
  display: block;
  width: calc(100% - 28px);
  margin: 12px 14px 4px;
  padding: 11px 14px;
  font-size: 1rem;
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  background: #FFFFFF;
  -webkit-appearance: none;
  appearance: none;
}
.kontakt-card {
  margin: 10px 14px;
  background: #FFFFFF;
  border: 1px solid #FDE68A;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(146, 64, 14, 0.06);
  overflow: hidden;
}
/* Kopfzeile = Tap-Ziel zum Auf-/Zuklappen. */
.kontakt-kopf {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 12px 10px 14px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.08s ease;
}
.kontakt-kopf:active { background: #FFFBEB; }
.kontakt-avatar {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  color: #92400E;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
}
.kontakt-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.kontakt-name {
  font-size: 1rem;
  font-weight: 700;
  color: #1F2937;
  line-height: 1.3;
  word-break: break-word;
}
.kontakt-ich {
  font-weight: 600;
  color: #92400E;
  font-size: 0.82rem;
}
.kontakt-pos {
  font-size: 0.78rem;
  color: #92400E;
  line-height: 1.3;
  word-break: break-word;
}
.kontakt-pfeil {
  flex: 0 0 auto;
  color: #B45309;
  font-size: 0.9rem;
  transition: transform 0.15s ease;
}
.kontakt-card.auf .kontakt-pfeil { transform: rotate(180deg); }
/* Aufgeklappter Bereich mit der waehlbaren Nummer. */
.kontakt-nummer {
  padding: 0 12px 12px 14px;
  border-top: 1px solid #FEF3C7;
}
/* Kein <button> -> die globale button{width:100%;margin:14px 0}-Regel
   greift hier nicht; Abstaende trotzdem explizit setzen. */
.kontakt-anruf {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  margin-top: 12px;
  padding: 10px 14px;
  background: #FFC107;
  color: #1A1A1A;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  border-radius: 10px;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.kontakt-anruf:active { background: #FFA000; }

/* ============================================================
   Meine Dokumente (PWA) - Ordneruebersicht, Sub-Header,
   Dokument-Karten. Eigenstaendiges .ma-dok-* Set; nutzt NICHT
   mehr .not-card (eigener Karten-Wrapper in _maDokKarte).
   Mobile-first, Tap-Targets >= 44px, Kolbe-Amber-Palette.
   ============================================================ */

/* --- Ebene 1: Ordner-Kacheln ------------------------------- */
.ma-dok-ordner {
  display: flex;
  align-items: center;
  gap: 14px;
  width: calc(100% - 28px);
  margin: 10px 14px;
  padding: 14px;
  min-height: 64px;
  box-sizing: border-box;
  background: #FFFFFF;
  border: 1px solid #FDE68A;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(146, 64, 14, 0.06);
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.08s ease, box-shadow 0.08s ease,
              background 0.08s ease;
}
.ma-dok-ordner:active {
  background: #FFFBEB;
  transform: scale(0.985);
  box-shadow: 0 1px 2px rgba(146, 64, 14, 0.04);
}
.ma-dok-ordner-icon {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #FEF3C7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  line-height: 1;
}
.ma-dok-ordner-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.ma-dok-ordner-name {
  font-size: 1rem;
  font-weight: 700;
  color: #1F2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ma-dok-ordner-sub {
  font-size: 0.78rem;
  color: #92400E;
  margin-top: 3px;
}

/* --- Ebene 2: Sub-Header (Ordnertitel) --------------------- */
/* Zurueck erfolgt ueber den Pfeil im Header (btn-ma-dok-back). */
.ma-dok-subhead {
  margin: 10px 14px 4px;
}
.ma-dok-subhead-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 4px;
}
.ma-dok-subhead-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #1F2937;
  flex: 1;
  min-width: 0;
}
.ma-dok-subhead-count {
  flex: 0 0 auto;
  font-size: 0.75rem;
  font-weight: 700;
  color: #92400E;
  background: #FEF3C7;
  border-radius: 999px;
  padding: 3px 10px;
}

/* --- Dokument-Karte ---------------------------------------- */
.ma-dok-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 10px 14px;
  padding: 12px 12px 12px 14px;
  background: #FFFFFF;
  border: 1px solid #FDE68A;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(146, 64, 14, 0.06);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.08s ease, box-shadow 0.08s ease,
              background 0.08s ease;
}
.ma-dok-card:active {
  background: #FFFBEB;
  transform: scale(0.99);
  box-shadow: 0 1px 2px rgba(146, 64, 14, 0.04);
}
/* Datei-Badge links (PDF rot, Bild blau). */
.ma-dok-badge {
  flex: 0 0 40px;
  width: 40px;
  height: 48px;
  border-radius: 8px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #DC2626;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;  /* HIG-Mindestgroesse 11 px (vorher 0.62rem = 9,9 px) */
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
}
/* Bild-Dokumente: blaues Badge statt rot (PDF). */
.ma-dok-badge-img {
  background: #EFF6FF;
  border-color: #BFDBFE;
  color: #2563EB;
}
.ma-dok-card-body {
  flex: 1;
  min-width: 0;
}
.ma-dok-card-title {
  font-size: 0.97rem;
  font-weight: 700;
  color: #1F2937;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.ma-dok-card-meta {
  margin-top: 4px;
  font-size: 0.76rem;
  color: #92400E;
  line-height: 1.3;
}
/* Aktionszeile. */
.ma-dok-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.ma-dok-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  /* width/margin: globale button{width:100%;margin:14px 0} neutralisieren,
     sonst liegt der Per-E-Mail-Button 100% breit. */
  width: auto;
  margin: 0;
  padding: 7px 14px;
  border-radius: 9px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  border: 1px solid transparent;
}
/* Per E-Mail (outline). */
.ma-dok-btn-mail {
  background: #FFF7E6;
  border-color: #FDE68A;
  color: #92400E;
}
.ma-dok-btn-mail:active { background: #FEF3C7; }
.ma-dok-btn:disabled { opacity: 0.55; }

/* --- Zahlungsbestaetigung (Verwarngeld) -------------------- */
/* Zeile ueber der Aktionszeile: offen = rot, bestaetigt = gruen. */
.ma-dok-zahlung {
  margin-top: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.3;
}
.ma-dok-zahlung-offen {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #B91C1C;
}
.ma-dok-zahlung-ok {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  color: #15803D;
}
/* Bestaetigen-Knopf: gefuellt, damit er die Hauptaktion der Karte ist. */
.ma-dok-btn-zahlung {
  background: #16A34A;
  border-color: #16A34A;
  color: #FFFFFF;
}
.ma-dok-btn-zahlung:active { background: #15803D; }
/* Hinweis auf offene Zahlungen in der Ordner-Uebersicht. */
.ma-dok-ordner-warn {
  color: #B91C1C;
  font-weight: 700;
}

/* --- Leerer Zustand (eigenes, freundliches Layout) --------- */
.ma-dok-empty {
  text-align: center;
  padding: 48px 24px;
  color: #6B7280;
}
.ma-dok-empty-icon {
  font-size: 2.6rem;
  line-height: 1;
  display: block;
  margin-bottom: 12px;
  opacity: 0.85;
}
.ma-dok-empty-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1F2937;
}
.ma-dok-empty-sub {
  margin-top: 6px;
  font-size: 0.85rem;
  color: #6B7280;
}

/* --- Reiterleisten als Segmentschalter ------------------------------
   ALLE Reiterleisten der App (Chat, Aufgaben, Neuer Kunde, Statistik,
   Tourenplanung) sind ein Segmentschalter: gleich grosse Anteile ueber
   flex:1 1 0, damit sich der Schalter jeder Bildschirmbreite selbst
   anpasst, ohne dass irgendwo eine Reiteranzahl fest steht.

   Der Schalter steht EINGERUECKT, nicht randlos. Das ist eine
   bewusste Korrektur: beide Systemvorbilder sind eingerueckt, und
   randlos war der Hauptgrund, warum die Leiste altmodisch wirkte -
   zusammen mit der satten gelben Fuellung und den Emoji.

   Die gewaehlte Stellung ist NICHT mehr gelb ausgefuellt. iOS nimmt
   dafuer Weiss, Material einen weichen, entsaettigten Ton; eine
   kraeftige Markenfarbe als Flaechenfuellung ist die Handschrift der
   frueher 2010er Jahre. Das Haus-Gelb traegt weiterhin den
   Kopfbereich darueber - es ist also nicht verschwunden, es steht nur
   nicht mehr zweimal uebereinander.

   Wichtig, sonst greift nichts: die globale button-Regel (Zeile 58)
   gibt JEDEM Knopf width:100%, margin:14px 0 und ein eigenes
   border-radius. Wird das nicht zurueckgenommen, fuellt schon der
   erste Reiter die ganze Zeile und alle weiteren stehen ausserhalb
   des Bildes. Genau das war hier jahrelang der Fall. */
.aufg-tabs {
  display: flex;
  gap: 0;
  /* Luft um den Schalter herum - er schwebt in einer weissen Zeile
     unter dem gelben Kopfbereich. Genau deshalb darf die gewaehlte
     Stellung NICHT wieder gelb werden: dann staenden zwei gleiche
     Flaechen uebereinander, und der Schalter waere als solcher nicht
     mehr zu erkennen. */
  padding: 10px 16px 12px;
  background: #FFFFFF;
  border-bottom: 1px solid #ECEFF1;
  flex: 0 0 auto;
  /* ANKER fuer die Schiene (::before weiter unten). Dieses
     position:relative MUSS bleiben - ohne es haengt sich die absolut
     gesetzte Schiene an den naechsten positionierten Vorfahren und
     legt sich im Zweifel als graue Flaeche ueber die ganze Seite.
     Genau das ist beim Bauen einmal passiert. */
  position: relative;
  z-index: 5;
}
/* Die Schiene. Sie liegt als eigene Flaeche unter den Reitern, damit
   der Regler mit 2 px Abstand darin sitzen kann - ohne dafuer einen
   zusaetzlichen Kasten im HTML zu brauchen, den es an fuenf Stellen
   zu pflegen gaebe. */
.aufg-tabs::before {
  content: "";
  position: absolute;
  inset: 10px 16px 12px;
  background: rgba(120,120,128,0.16);
  border-radius: 10px;
  pointer-events: none;
}
.aufg-tab {
  /* Gleiche Anteile unabhaengig von der Textlaenge: flex-basis 0.
     Mit "auto" bekaeme "Anrufe" weniger Platz als "Erteilen". */
  flex: 1 1 0;
  min-width: 0;
  /* Ruecknahme der globalen button-Regel - siehe oben. */
  width: auto;
  margin: 0;
  border: none;
  background: transparent;
  border-radius: 8px;
  /* 44 px: Apples Richtwert. Der echte iOS-Schalter ist nur 32 px
     hoch - der muss aber auch nicht mit Handschuh im Auto getroffen
     werden. */
  min-height: 44px;
  padding: 0 8px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  white-space: nowrap;
  /* 15 px. Die Reiterleiste ist der oberste Bedienteil eines
     Bereichs und war vorher kleiner als jeder andere Knopf der App;
     die Zielgruppe ist ueberwiegend ueber 50. */
  font-size: 0.9375rem;
  font-weight: 590;
  line-height: 1.2;
  color: #1F2937;
  cursor: pointer;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
/* Haarfeine Teiler zwischen den nicht gewaehlten Stellungen - und wie
   im System verschwinden die beiden, die am Regler liegen. */
.aufg-tab + .aufg-tab::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: rgba(60,60,67,0.26);
}
.aufg-tab.active::before,
.aufg-tab.active + .aufg-tab::before { background: transparent; }
/* Der Regler: eine weisse Flaeche mit 2 px Abstand in der Schiene.
   Als eigenes ::after, damit der Schlagschatten wirklich am Regler
   sitzt und nicht am Rand des ganzen Segments. */
.aufg-tab.active::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 8px;
  background: #FFFFFF;
  box-shadow: 0 3px 8px rgba(0,0,0,0.12), 0 3px 1px rgba(0,0,0,0.04);
  z-index: -1;
}
.aufg-tab.active { font-weight: 650; }
/* Druckrueckmeldung: kurz abdunkeln. Kein scale() - das zieht einen
   breiten Reiter sichtbar zusammen und reisst die Fugen auf. */
.aufg-tab:active { transform: none; opacity: 0.62; }
.aufg-tab:focus-visible {
  outline: 2px solid #1F2937;
  outline-offset: 1px;
}

/* Eine Leiste mit nur EINEM Reiter ist kein Schalter, sondern eine
   Anzeige - heute die Bundeslandzeile der Tourenplanung, in der seit
   dem Wegfall von Berlin nur noch Nordrhein-Westfalen steht. Kommt je
   ein zweites Bundesland dazu, greift die Regel von selbst nicht
   mehr. */
.aufg-tabs:has(.aufg-tab:only-child) { padding: 6px 16px 8px; }
.aufg-tabs:has(.aufg-tab:only-child)::before { background: transparent; }
.aufg-tab:only-child,
.aufg-tab:only-child.active {
  color: #4B5563;
  font-weight: 600;
  min-height: 32px;
  cursor: default;
}
.aufg-tab:only-child.active::after { display: none; }
.aufg-tab:only-child:active { opacity: 1; }

/* --- iOS -------------------------------------------------------------
   Die Grundfassung oben IST bereits der iOS-Schalter: systemgraue
   Schiene, weisser Regler, haarfeine Teiler. Hier stehen nur die
   Feinheiten, die wirklich vom System kommen. */
.os-ios .aufg-tabs::before { border-radius: 9px; }
.os-ios .aufg-tab,
.os-ios .aufg-tab.active::after { border-radius: 7px; }
.os-ios .aufg-tab {
  font-family: -apple-system, "SF Pro Text", "Segoe UI", sans-serif;
  letter-spacing: -0.01em;
}

/* --- Android: Material-3-Segmentknopf --------------------------------
   Material loest dieselbe Aufgabe anders: keine Schiene und kein
   Regler, sondern eine PILLE mit Umriss, innen durch Striche geteilt,
   und ein HAKEN vor der gewaehlten Stellung. Gefuellt wird die
   Auswahl mit einem WEICHEN Ton ("secondaryContainer"), nicht mit
   einer kraeftigen Farbe - hier ein helles Bernstein, das aus der
   Hausfarbe abgeleitet ist.

   Der Haken ist zugleich das zweite, von der Farbe unabhaengige
   Merkmal der Auswahl. */
.os-android .aufg-tabs::before {
  background: transparent;
  border: 1px solid #CAC4D0;
  border-radius: 20px;
}
.os-android .aufg-tab {
  border-radius: 0;
  min-height: 40px;
  font-family: Roboto, "Segoe UI", sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.008em;
  color: #49454F;
  padding: 0 6px;
}
.os-android .aufg-tab:first-child { border-radius: 20px 0 0 20px; }
.os-android .aufg-tab:last-child { border-radius: 0 20px 20px 0; }
.os-android .aufg-tab:only-child { border-radius: 20px; }
/* Teiler in Material-Farbe, und sie bleiben auch neben der Auswahl
   stehen - anders als bei iOS gehoeren sie dort zur Pille. */
.os-android .aufg-tab + .aufg-tab::before {
  background: #CAC4D0;
  top: 0;
  bottom: 0;
}
.os-android .aufg-tab.active + .aufg-tab::before { background: #CAC4D0; }
.os-android .aufg-tab.active::after {
  inset: 0;
  background: #FDF0C9;
  box-shadow: none;
  border-radius: inherit;
}
.os-android .aufg-tab.active {
  color: #3F2E00;
  font-weight: 600;
}
/* Der Haken - mit zwei Raendern gezeichnet statt als Schriftzeichen:
   so hat er auf jedem Geraet dieselbe Form und Staerke. Sein Platz
   wird IMMER freigehalten, sonst wuerde die Beschriftung beim
   Umschalten schmaler und koennte umbrechen. */
.os-android .aufg-tab > .hk {
  flex: 0 0 auto;
  width: 11px;
  height: 6px;
  border: 0 solid currentColor;
  transform: rotate(-45deg) translate(1px, -1px);
}
.os-android .aufg-tab.active > .hk {
  border-left-width: 2px;
  border-bottom-width: 2px;
}
.os-android .aufg-tab:only-child > .hk { display: none; }
/* Und die Pille selbst faellt weg: ein leerer Umriss um einen
   einzelnen Eintrag sieht aus wie ein leeres Eingabefeld, in das man
   etwas schreiben soll. Es ist aber nur eine Anzeige. */
.os-android .aufg-tabs:has(.aufg-tab:only-child)::before {
  border-color: transparent;
}
.os-android .aufg-tab:active { opacity: 1; background: rgba(0,0,0,0.06); }

/* Der Zaehler steht ruhig neben der Beschriftung. Seit die Reiter
   ohne Emoji auskommen und kurz beschriftet sind, ist dafuer Platz -
   die Blase in der Ecke war nur noetig, solange "Aufgaben erteilen"
   die ganze Breite brauchte. */
.aufg-tab-badge {
  flex: 0 0 auto;
  display: inline-block;
  margin: 0;
  padding: 0 5px;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  background: #D92D20;
  color: #FFFFFF;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  /* Gleich breite Ziffern - sonst wackelt die Blase beim Hochzaehlen. */
  font-variant-numeric: tabular-nums;
}
.aufg-tab-badge.hidden { display: none; }
/* Die Blase liegt AUSSERHALB des Textflusses und wuerde die
   Beschriftung sonst ueberdecken ("Meine Aufgaben" las sich als
   "Mein"). Platz gemacht wird deshalb OBEN, in einem eigenen Band -
   und zwar fuer alle Reiter der Aufgabenleiste gleichermassen, ob
   ihr Zaehler gerade sichtbar ist oder nicht.
   Der Weg ueber die Breite (padding-right am Reiter mit Zaehler) war
   der erste Versuch und ist gemessen durchgefallen: der schmalere
   Text brach in DREI Zeilen um, die Leiste sprang von 58 auf 74 px -
   also genau das Springen, das hier verhindert werden soll, nur an
   anderer Stelle. Nach oben auszuweichen kostet die Aufgabenleiste
   zehn Pixel Hoehe, dafuer steht sie fest: gleiche Hoehe mit und ohne
   Zaehler, auf jedem Geraet.
   [data-aufg] trifft genau die drei Reiter der Aufgabenleiste - die
   einzigen der App, die ueberhaupt einen Zaehler tragen koennen. */
.aufg-tab[data-aufg] {
  padding-top: 22px;
  padding-bottom: 6px;
}

/* Aufgaben-Liste im Chat-Konversations-Stil: weisser Hintergrund,
   flache Listen-Items mit Trennstrich, kein Karten-Look. */
.aufg-liste {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0;
  background: #FFFFFF;
  -webkit-overflow-scrolling: touch;
}
.aufg-card {
  position: relative;
  background: #FFFFFF;
  border: none;
  border-radius: 0;
  padding: 10px 14px;
  margin: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.aufg-card:active { background: #F1F5F9; }
.aufg-card::after {
  content: "";
  position: absolute;
  left: 14px; right: 0; bottom: 0;
  height: 1px;
  /* Dieselbe Trennlinie wie im Hauptmenue und in der Mailliste. */
  background: rgba(60,60,67,0.14);
}
.aufg-card:last-child::after { display: none; }
/* --- Listen je System -------------------------------------------------
   Material zieht Trennlinien ueber die volle Breite und gibt der
   Zeile mehr Hoehe; iOS rueckt sie bis zum Textanfang ein. Das gilt
   fuer alle Listen der App gleichermassen - Aufgaben, Chat,
   Mitarbeiterwahl, Weiterleiten-Ziele. */
.os-android .aufg-card::after,
.os-android .konv-item::after,
.os-android .user-item::after,
.os-android .chat-fwd-ziel::after {
  left: 0;
  background: #E7E0EC;
}
.os-android .aufg-card { min-height: 72px; }
.os-android .konv-item,
.os-android .user-item { padding-top: 12px; padding-bottom: 12px; }
/* Der Druckeffekt: iOS blendet ab, Material legt eine Schattierung
   ueber die ganze Zeile. */
.os-android .aufg-card:active,
.os-android .konv-item:active,
.os-android .user-item:active,
.os-android .chat-fwd-ziel:active { background: rgba(0,0,0,0.06); }
/* iOS: haarfeine Linie in Systemfarbe. */
.os-ios .aufg-card::after,
.os-ios .konv-item::after,
.os-ios .user-item::after,
.os-ios .chat-fwd-ziel::after { background: rgba(60,60,67,0.20); }
/* Ungesehene Aufgaben: gelber Linke-Rand-Indikator + leichtes
   gelbes Background. Tippen auf die Karte = "gesehen" -> Indikator
   verschwindet + Tab/Hauptmenue-Badge sinkt. */
.aufg-card.unseen {
  background: #FFFBEB;
}
.aufg-card.unseen::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: #FFC107;
}
.aufg-card-titel {
  font-size: 1rem;
  font-weight: 600;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aufg-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  font-size: 0.85rem;
  color: #667085;
}
.aufg-tag {
  display: inline-block;
  padding: 3px 9px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 8px;
  background: #FDF0C9;
  color: #3F2E00;
  /* Kein text-transform: uppercase mehr - durchgehende
     Grossbuchstaben sind schwerer zu lesen, und beide Systeme haben
     das Muster abgelegt. Die Farbe ist dasselbe weiche Bernstein wie
     bei den Symbolkacheln des Hauptmenues. */
}
.aufg-progress {
  font-size: 0.8rem;
  color: #667085;
  font-variant-numeric: tabular-nums;
}
.aufg-card-sub {
  margin-top: 3px;
  font-size: 0.8rem;
  color: #667085;
}
.aufg-card-hinweis {
  margin-top: 4px;
  font-size: 0.88rem;
  color: #334155;
  white-space: pre-wrap;
  word-break: break-word;
}
.aufg-tel-link {
  color: #B45309;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px dotted #FFC107;
}

/* Floating-Action-Button im Aufgaben-Bereich. Nur sichtbar wenn
   der Erteilt-Tab aktiv ist. Klick oeffnet das Erstell-Formular
   (Vorlage "Freie Aufgabe"). */
.aufg-fab {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 10;
  padding: 14px 20px;
  min-height: 56px;
  background: #FFC107;
  color: #1F2937;
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  /* Material 3 rundet den schwebenden Knopf mit 16 px, nicht mehr
     voll - das ist der sichtbarste Unterschied zur alten
     Material-Fassung. Fuer iOS wird er unten wieder rund. */
  border-radius: 16px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.18);
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.aufg-fab:active { transform: scale(0.96); background: #F59E0B; }
.aufg-fab.hidden { display: none; }

/* "Erledigt"-Knopf auf einer Aufgaben-/Anruf-Karte (One-Tap-Abschluss).
   Gruen, rechtsbuendig, deutlich antippbar. */
.aufg-card-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}
/* iOS kennt keinen schwebenden Knopf im Material-Sinn - dort ist ein
   rundes, weich schwebendes Element gelaeufiger. */
.os-ios .aufg-fab { border-radius: 100px; }

.aufg-done-btn {
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #FFFFFF;
  background: #16A34A;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  min-height: 38px;
}
.aufg-done-btn:active { transform: scale(0.96); background: #15803D; }
.aufg-done-btn:disabled { background: #94A3B8; }

/* ============================================================
   Tourenplanung = Tour der Beratungseinsaetze (ab 0.6.13.798)
   Grundlage sind die Klassen der HW-Tour (.thw-*), damit beide
   Touren gleich aussehen. Hier steht nur, was die Beratungs-Tour
   zusaetzlich braucht (Praefix .tb-).
   ============================================================ */
/* Kalender-Auswahl (Dropdown) - nur sichtbar bei >=2 aktiven Kalendern */
.tour-kal-wrap {
  padding: 8px 10px;
  background: #FFFFFF;
  border-bottom: 1px solid #E2E8F0;
  flex: 0 0 auto;
}
.tour-kal-select {
  width: 100%;
  padding: 9px 10px;
  font-size: 1rem;
  font-weight: 600;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  background: #F8FAFC;
  color: #1F2937;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.tb-halt { padding-right: 34px; cursor: pointer; }
.tb-pfeil {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  color: #64748B; font-size: 0.95rem;
}
.tb-marken { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tb-marke {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 700;
  background: #F1F5F9; color: #334155;
}
.tb-marke-bestand { background: #E0F2FE; color: #075985; }
.tb-marke-neu { background: #FEF3C7; color: #92400E; }
.tb-rot { color: #B91C1C; }
.tb-kopf-unter {
  display: block; margin-top: 4px; color: #475569; font-size: 0.85rem;
}
/* Die Tour folgt den echten Zeiten: weicht die Uhrzeit vom Plan ab,
   steht der Plan klein darunter. In der Karte eingerueckt unter die
   Uhrzeit (.thw-nr ist 1.6em breit - gleiche Schriftgroesse, also
   buendig). Grau = echte Zeit, Rot = spaeter, Gruen = frueher.
   Kein Orange (abgeschafft). */
.tb-verschoben {
  margin-top: 2px; font-size: 0.8rem; line-height: 1.35; color: #475569;
}
.tb-halt .tb-verschoben { padding-left: 1.6em; }
.tb-verschoben.tb-verschoben-spaet { color: #B91C1C; font-weight: 600; }
.tb-verschoben.tb-verschoben-frueh { color: #15803D; font-weight: 600; }
.tb-aktionen { display: flex; flex-direction: column; gap: 10px; }
/* Die globale button-Regel gibt jedem Knopf margin:14px 0 - in der
   Spalte mit gap waere das doppelter Abstand. */
.tb-aktionen > button { margin: 0; }
.tb-aktionen .thw-hinweis { padding: 0; }
.tb-aktionen .thw-hinweis:empty { display: none; }
.tb-nicht .thw-label { margin-top: 0; }
.tb-nicht .thw-hinweis { padding: 4px 0 0; }
.tb-klein { font-size: 0.82rem; line-height: 1.4; margin: 6px 0; }
.muted.tb-klein { color: #4B5563; }  /* #6B7280 auf dem blauen Kasten #EFF6FF nur 4,4:1 */
.tb-karte-kopf .thw-zustand { margin-right: 6px; }
.tb-abschnitt {
  margin: 12px 14px 0; padding: 10px 14px 8px;
  border: 1px solid #E5E7EB; border-radius: 12px; background: #FFFFFF;
}
.tb-titel {
  margin: 0 0 4px; font-size: 0.78rem; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase; color: #64748B;
}
.tb-zeile {
  display: flex; gap: 10px; padding: 7px 0;
  border-top: 1px solid #F1F5F9;
  font-size: 0.92rem; line-height: 1.4;
}
.tb-titel + .tb-zeile { border-top: none; }
.tb-lbl { flex: 0 0 34%; color: #64748B; }
.tb-wert { flex: 1; min-width: 0; color: #111827; word-break: break-word; }
.tb-wert a, .tb-eintrag a { color: #1D4ED8; text-decoration: none; }
.tb-mehrzeilig { white-space: pre-wrap; }
.tb-wert a.tb-navi {
  display: table; margin-top: 6px; padding: 6px 12px;
  border-radius: 8px; background: #EFF6FF; border: 1px solid #BFDBFE;
  font-weight: 700; font-size: 0.85rem;
}
.tb-eintrag {
  padding: 7px 0; border-top: 1px solid #F1F5F9;
  font-size: 0.9rem; line-height: 1.4;
}
.tb-titel + .tb-eintrag { border-top: none; }
.tb-dok {
  position: relative; display: flex; align-items: center; gap: 10px;
  padding: 10px 28px 10px 0; border-top: 1px solid #F1F5F9;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.tb-titel + .tb-dok { border-top: none; }
.tb-dok:active { background: #F8FAFC; }
.tb-dok .tb-pfeil { right: 2px; }
.tb-dok-sym {
  flex: 0 0 auto; padding: 4px 6px; border-radius: 6px;
  font-size: 0.6875rem; font-weight: 800; letter-spacing: .03em;
  color: #B91C1C; background: #FEE2E2;
}
.tb-dok-text { flex: 1; min-width: 0; font-size: 0.9rem; color: #111827; }
/* Beweisfoto bei "nicht angetroffen" */
.tb-foto-hinweis { margin: 0 0 8px; color: #374151; }
.tb-nicht > button.tb-foto-knopf { margin: 0 0 8px; font-weight: 700; }
.tb-foto-vorschau { margin: 0 0 6px; }
.tb-foto-vorschau img {
  display: block; width: 100%; max-height: 260px; object-fit: contain;
  border-radius: 8px; background: #111827;
}
.tb-gps {
  margin: 0 0 6px; font-size: 0.84rem; line-height: 1.4; color: #475569;
}
.tb-gps.tb-gps-ok { color: #047857; font-weight: 600; }
.tb-gps.tb-gps-warn { color: #B45309; font-weight: 700; }
.tb-dok-sym.tb-dok-foto { color: #1D4ED8; background: #DBEAFE; }
/* Beratungsnachweis aus der Tour: woher die Vorbelegung stammt. */
.ber-tour-hinweis {
  margin: 10px 14px 0; padding: 10px 12px; border-radius: 10px;
  background: #EFF6FF; border: 1px solid #BFDBFE; color: #1E3A8A;
  font-size: 0.86rem; font-weight: 600; line-height: 1.4;
}

/* Aufgabe-Erteilen-Formular (Mobile). Layout aehnlich Notizen +
   Neuer Kunde damit der MA keine neue Optik lernen muss. */
.aufgnew-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: #FFFFFF;
  padding: 0 0 24px 0;
  -webkit-overflow-scrolling: touch;
}
.aufgnew-form {
  padding: 14px 14px 16px 14px;
}
.aufgnew-form .muted {
  margin: 0 0 14px 0;
  font-size: 0.85rem;
}
.aufgnew-form label {
  display: block;
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: #475569;
  font-weight: 600;
}
.aufgnew-form input,
.aufgnew-form select,
.aufgnew-form textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  font-size: 1rem;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  background: #FFFFFF;
  font-family: inherit;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}
.aufgnew-form textarea { resize: vertical; min-height: 90px; }
.aufgnew-form input:focus,
.aufgnew-form select:focus,
.aufgnew-form textarea:focus {
  outline: none;
  border-color: #F59E0B;
  background: #FFFBEB;
}
.aufgnew-form .primary {
  width: 100%;
  margin-top: 10px;
  padding: 14px;
  font-size: 1rem;
  font-weight: 800;
  background: #FFC107;
  color: #1F2937;
  border: none;
  border-radius: 10px;
}
.aufgnew-form .primary:active { background: #F59E0B; }
.aufgnew-form .primary:disabled {
  background: #E5E7EB;
  color: #9CA3AF;
}
#aufgnew-msg { margin-top: 10px; font-size: 0.85rem; }

/* =================================================== Notizen
   Persoenliche Notizen-Liste. Look orientiert sich am Neuer-
   Kunde-Bereich (nk-body / nk-form) damit der User keine neue
   Optik lernen muss. */
.not-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: #FFFFFF;
  padding: 0 0 24px 0;
  -webkit-overflow-scrolling: touch;
}
.not-form {
  padding: 14px 14px 16px 14px;
  background: #FFFFFF;
  border-bottom: 1px solid #ECEFF1;
}
.not-form textarea {
  display: block;
  width: 100%;
  min-height: 80px;
  padding: 10px 12px;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  background: #FFFFFF;
  resize: vertical;
  box-sizing: border-box;
}
.not-form textarea:focus {
  outline: none;
  border-color: #F59E0B;
  background: #FFFBEB;
}
.not-form .primary {
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  font-size: 1rem;
  font-weight: 800;
  background: #FFC107;
  color: #1F2937;
  border: none;
  border-radius: 10px;
}
.not-form .primary:active { background: #F59E0B; }

/* ==== Sprachmemo-UI (0.6.13.5xx neu gestaltet) ====
   Eingabezeile: vollbreiter Primaerknopf + rundes Mic-Icon (kein
   Ueberlauf mehr, box-sizing:border-box gilt global). */
.not-form-btns {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  align-items: stretch;
}
.not-form-btns .primary {
  flex: 1 1 auto;
  min-width: 0;            /* verhindert, dass der Text die Zeile aufblaeht */
  margin-top: 0;
}
/* Rundes 50px-Mikrofon (Chat-Formsprache), amberfarbener Rahmen. */
.not-mic-btn {
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #B45309;
  background: #FFF7E0;
  border: 1.5px solid #FCD34D;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
  -webkit-tap-highlight-color: transparent;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.not-mic-btn:active { background: #FDE68A; }
.not-mic-btn svg { width: 24px; height: 24px; display: block; }
/* Aufnahme aktiv: rot + Puls (wie Chat .mic-btn.recording). */
.not-mic-btn.recording {
  background: #DC2626;
  color: #FFFFFF;
  border-color: #B91C1C;
  animation: not-mic-pulse 1.2s ease-in-out infinite;
}
@keyframes not-mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,.5); }
  50% { box-shadow: 0 0 0 10px rgba(220,38,38,0); }
}
#not-msg {
  margin-top: 8px;
  font-size: 0.85rem;
  color: #6B7280;
}
#not-msg.error { color: #B91C1C; font-weight: 700; }
#not-msg.rec { color: #B91C1C; font-weight: 700; }

/* ---- Aufnahme-Balken (erscheint unter den Knoepfen) ---- */
.not-rec-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 8px 10px 8px 14px;
  background: #FEF2F2;
  border: 1px solid #FCA5A5;
  border-radius: 14px;
  box-sizing: border-box;
}
.not-rec-bar.hidden { display: none; }
.not-rec-dot {
  flex: 0 0 auto;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #DC2626;
  animation: not-rec-blink 1s ease-in-out infinite;
}
@keyframes not-rec-blink { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
.not-rec-time {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 1rem;
  color: #991B1B;
}
.not-rec-cancel {
  flex: 0 0 44px;
  width: 44px; height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #B91C1C;
  background: #FFFFFF;
  border: 1px solid #FCA5A5;
  border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
}
.not-rec-cancel:active { background: #FEE2E2; }
/* Speichern fuellt den Rest der Zeile (flex:1, min-width:0) und kann
   daher NIE ueberlaufen - egal wie lang der Timer wird. */
.not-rec-stop {
  flex: 1 1 auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 12px;
  font-size: 0.95rem;
  font-weight: 800;
  color: #FFFFFF;
  background: #DC2626;
  border: none;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
  -webkit-tap-highlight-color: transparent;
}
.not-rec-stop:active { background: #B91C1C; }
.not-rec-stop::before {
  content: "";
  width: 13px; height: 13px;
  border-radius: 3px;
  background: #FFFFFF;
}

/* ---- Eigener Sprachmemo-Player in der Notizkarte (kein natives audio) ----
   Amberfarbene Pille: runder Play/Pause-Knopf + zweifarbige Wellenform
   (helle Basis-Kachel, dunkle Fortschritts-Kachel per width%) + Dauer. */
/* Das <audio> traegt den Ton, die Bedienung macht unser eigener Player.
   ACHTUNG - zwei Fallen, die das Abspielen komplett verhindern:
   1) NIEMALS display:none. Browser rendern das Element dann nicht und
      laden/dekodieren die Datei nicht (readyState bleibt 0).
   2) Das Markup MUSS das controls-Attribut tragen: das User-Agent-
      Stylesheet setzt fuer "audio:not([controls])" ein
      "display:none !important", das Autoren-CSS NICHT ueberschreiben
      kann (UA-!important gewinnt).
   Darum: controls im Markup + hier rein optisch verstecken. */
.not-card-audio {
  position: absolute;
  left: 0; bottom: 0;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}
.not-audio {
  position: relative;   /* Bezug fuer das versteckte <audio> */
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding: 7px 14px 7px 7px;
  background: #FFF7E0;
  border: 1px solid #FCD34D;
  border-radius: 30px;
  box-sizing: border-box;
}
.not-audio-play {
  flex: 0 0 44px;
  width: 44px; height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1F2937;
  background: #FFC107;
  border: none;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
  -webkit-tap-highlight-color: transparent;
}
.not-audio-play:active { background: #F59E0B; }
/* Icon-Groesse ohne display (sonst wuerde das generische Regel-Set die
   Play/Pause-Umschaltung per Spezifitaet aushebeln). */
.not-audio-play svg { width: 20px; height: 20px; }
/* Umschaltung Play <-> Pause: gleiche Spezifitaet, .playing kommt spaeter
   in der Quelle und gewinnt daher im Abspiel-Zustand. */
.not-audio-play .not-audio-ico-play { display: block; }
.not-audio-play .not-audio-ico-pause { display: none; }
.not-audio.playing .not-audio-ico-play { display: none; }
.not-audio.playing .not-audio-ico-pause { display: block; }
/* Wellenform-Spur: helle Basis-Kachel, wiederholt. */
.not-audio-track {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  height: 28px;
  cursor: pointer;
  /* Klick-Seek reicht (kein Drag), daher vertikales Scrollen der
     Notizliste NICHT blockieren - sonst Scroll-Totzone auf der Spur. */
  touch-action: pan-y;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2746%27%20height%3D%2728%27%3E%3Cg%20fill%3D%27%23FCD34D%27%3E%3Crect%20x%3D%272%27%20y%3D%279.0%27%20width%3D%274%27%20height%3D%2710%27%20rx%3D%272%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%275.0%27%20width%3D%274%27%20height%3D%2718%27%20rx%3D%272%27%2F%3E%3Crect%20x%3D%2714%27%20y%3D%271.0%27%20width%3D%274%27%20height%3D%2726%27%20rx%3D%272%27%2F%3E%3Crect%20x%3D%2720%27%20y%3D%277.0%27%20width%3D%274%27%20height%3D%2714%27%20rx%3D%272%27%2F%3E%3Crect%20x%3D%2726%27%20y%3D%273.0%27%20width%3D%274%27%20height%3D%2722%27%20rx%3D%272%27%2F%3E%3Crect%20x%3D%2732%27%20y%3D%279.5%27%20width%3D%274%27%20height%3D%279%27%20rx%3D%272%27%2F%3E%3Crect%20x%3D%2738%27%20y%3D%276.0%27%20width%3D%274%27%20height%3D%2716%27%20rx%3D%272%27%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  background-repeat: repeat-x;
  background-position: left center;
}
/* Fortschritt: dunkle Kachel, gleiche Ausrichtung, per width% freigelegt. */
.not-audio-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0%;
  overflow: hidden;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2746%27%20height%3D%2728%27%3E%3Cg%20fill%3D%27%23D97706%27%3E%3Crect%20x%3D%272%27%20y%3D%279.0%27%20width%3D%274%27%20height%3D%2710%27%20rx%3D%272%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%275.0%27%20width%3D%274%27%20height%3D%2718%27%20rx%3D%272%27%2F%3E%3Crect%20x%3D%2714%27%20y%3D%271.0%27%20width%3D%274%27%20height%3D%2726%27%20rx%3D%272%27%2F%3E%3Crect%20x%3D%2720%27%20y%3D%277.0%27%20width%3D%274%27%20height%3D%2714%27%20rx%3D%272%27%2F%3E%3Crect%20x%3D%2726%27%20y%3D%273.0%27%20width%3D%274%27%20height%3D%2722%27%20rx%3D%272%27%2F%3E%3Crect%20x%3D%2732%27%20y%3D%279.5%27%20width%3D%274%27%20height%3D%279%27%20rx%3D%272%27%2F%3E%3Crect%20x%3D%2738%27%20y%3D%276.0%27%20width%3D%274%27%20height%3D%2716%27%20rx%3D%272%27%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  background-repeat: repeat-x;
  background-position: left center;
}
.not-audio-time {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
  font-weight: 700;
  color: #92400E;
  min-width: 34px;
  text-align: right;
}
/* Nur sichtbar, wenn die Inline-Wiedergabe scheitert (Sicherheitsnetz). */
.not-audio-fehler {
  flex: 0 0 100%;
  margin-top: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #B45309;
  text-decoration: underline;
}
.not-liste {
  padding: 0;
  background: #FFFFFF;
}
.not-card {
  position: relative;
  background: #FFFBEB;
  border-left: 4px solid #FFC107;
  padding: 10px 12px 10px 14px;
  margin: 10px 14px;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.not-card-text {
  font-size: 0.95rem;
  color: #1F2937;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.4;
}
.not-card-meta {
  margin-top: 6px;
  font-size: 0.72rem;
  color: #92400E;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.not-card-actions {
  display: flex;
  gap: 8px;
}
.not-action-btn {
  background: transparent;
  border: none;
  color: #92400E;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  -webkit-tap-highlight-color: transparent;
}
.not-action-btn:active { background: #FEF3C7; }
.not-action-btn.danger { color: #B91C1C; }
.not-empty {
  text-align: center;
  padding: 30px 14px;
  font-size: 0.9rem;
  color: #6B7280;
}
/* Edit-Modus: Textarea ueberlagert die Karte */
.not-card.editing { background: #FFFFFF; border-color: #F59E0B; }
.not-card-edit {
  display: block;
  width: 100%;
  min-height: 70px;
  padding: 8px 10px;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1px solid #F59E0B;
  border-radius: 6px;
  background: #FFFBEB;
  resize: vertical;
  box-sizing: border-box;
}

/* =================================================== Beratungseinsatz
   Vollformular auf dem Tablet mit zwei Unterschriften-Canvases.
   Layout orientiert sich am Neuer-Kunde-Formular (nk-form). */
.ber-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: #FFFFFF;
  padding: 0 0 24px 0;
  -webkit-overflow-scrolling: touch;
}
.ber-form {
  padding: 14px 14px 16px 14px;
  background: #FFFFFF;
}
.ber-form label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.85rem;
  color: #475569;
  font-weight: 600;
}
.ber-form input[type="text"],
.ber-form input[type="email"],
.ber-form input[type="date"],
.ber-form input[type="time"],
.ber-form select,
.ber-form textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  font-size: 1rem;
  line-height: 1.4;
  height: 42px;            /* identische Hoehe fuer alle Inputs -
                                ohne diese Regel ist date/time auf
                                iOS deutlich groesser als text. */
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  background: #FFFFFF;
  font-family: inherit;
  color: #1F2937;
  box-sizing: border-box;
  -webkit-appearance: none; /* iOS-Native-Styling abschalten */
  appearance: none;
  min-width: 0;
}
.ber-form textarea {
  height: auto;             /* textarea darf wachsen */
  min-height: 80px;
}
/* Dropdowns sind die wichtigsten Pflichtfelder (Pflegegrad,
   Pflegekasse) - darum klar erkennbar gestaltet: deutlicher
   Pfeil-Indikator, leicht ausgeprägtere Border, Tap-Feedback. */
.ber-form select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23F59E0B'><path d='M5 7l5 6 5-6z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px 20px;
  padding-right: 42px;
  border: 2px solid #CBD5E1;
  font-weight: 600;
  cursor: pointer;
  /* Subtile vertikale Verlauf-Akzentuierung damit der MA sofort
     sieht, dass es interaktive Felder sind */
  background-color: #FFFFFF;
}
.ber-form select:focus {
  outline: none;
  border-color: #F59E0B;
  background-color: #FFFBEB;
}
.ber-form select:hover {
  border-color: #94A3B8;
}
/* Wenn schon ein Wert gewaehlt ist: Border in Akzent-Gelb */
.ber-form select:not([value=""]):valid {
  border-color: #FCD34D;
}
/* Geburtsdatum + Alter-Anzeige nebeneinander */
.ber-date-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin-top: 4px;
}
.ber-date-row input[type="date"] {
  flex: 1;
  margin-top: 0;
}
.ber-alter-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFBEB;
  color: #92400E;
  border: 1px solid #FCD34D;
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  min-width: 90px;
  height: 42px;
  box-sizing: border-box;
}
.ber-alter-badge:empty,
.ber-alter-badge.leer {
  background: #F3F4F6;
  color: #9CA3AF;
  border-color: #E5E7EB;
}
/* OSM-Hinweis unter dem Strassen-Feld */
.ber-osm-hint {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  color: #6B7280;
  font-weight: 400;
  font-style: italic;
}
/* Live-Vorschlags-Panel fuer die Adress-Suche.
   Wrapper hat position:relative damit das Panel sich am Input
   ausrichtet. Das Panel selbst ist absolut positioniert und
   ueberlagert den nachfolgenden Content. */
.ber-osm-wrap {
  position: relative;
}
.ber-osm-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 4px;
  background: #FFFFFF;
  border: 2px solid #FCD34D;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.18);
  z-index: 50;
  max-height: 320px;
  overflow-y: auto;
}
.ber-osm-panel.hidden {
  display: none;
}
.ber-osm-liste {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ber-osm-liste li {
  padding: 12px 14px;
  border-bottom: 1px solid #F3F4F6;
  cursor: pointer;
  font-size: 0.95rem;
  color: #1F2937;
  line-height: 1.35;
  transition: background 0.1s;
}
.ber-osm-liste li:last-child {
  border-bottom: none;
}
.ber-osm-liste li:hover,
.ber-osm-liste li:active {
  background: #FFFBEB;
}
.ber-osm-liste li .ber-osm-line1 {
  display: block;
  font-weight: 700;
  color: #1F2937;
}
.ber-osm-liste li .ber-osm-line2 {
  display: block;
  font-size: 0.82rem;
  color: #6B7280;
  margin-top: 2px;
}
.ber-osm-status {
  padding: 10px 14px;
  font-size: 0.85rem;
  color: #6B7280;
  text-align: center;
  font-style: italic;
}
.ber-osm-status.loading::before {
  content: "⏳ ";
}
.ber-osm-status.empty::before {
  content: "ℹ️ ";
}
.ber-osm-status.error {
  color: #B91C1C;
}
.ber-osm-status.error::before {
  content: "⚠ ";
}

/* ============================================================
   FLYER-Standorte (PWA): Formular + Standort-Liste/Detail.
   ============================================================ */
.fl-form { padding: 14px; }
.fl-form label {
  display: block;
  margin: 0 0 12px 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #374151;
}
.fl-form input,
.fl-form select,
.fl-form textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 5px;
  padding: 11px 12px;
  font-size: 1rem;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  background: #FFFFFF;
  color: #1F2937;
  font-weight: 500;
}
.fl-form textarea { resize: vertical; }
.fl-form input:focus,
.fl-form select:focus,
.fl-form textarea:focus {
  outline: none;
  border-color: #F59E0B;
  background: #FFFBEB;
}
.fl-row { display: flex; gap: 10px; }
.fl-row .fl-col { flex: 1; }
.fl-step-titel {
  margin: 0 0 12px 0;
  font-size: 1rem;
  font-weight: 800;
  color: #92400E;
}
.fl-h3 {
  margin: 18px 0 6px 0;
  font-size: 0.95rem;
  color: #92400E;
  border-top: 1px solid #FCD34D;
  padding-top: 12px;
}
.fl-foto-preview { margin: 8px 0; }
.fl-foto-preview img {
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid #E5E7EB;
}
.fl-form .primary.big { width: 100%; }
.fl-form .primary.big:disabled {
  background: #E5E7EB;
  color: #9CA3AF;
  cursor: not-allowed;
}
.fl-detail-name { font-size: 1.15rem; font-weight: 800; color: #1F2937; }
.fl-detail-sub { color: #6B7280; font-size: 0.9rem; margin-top: 2px; }
.fl-detail-status { margin-top: 8px; font-weight: 700; font-size: 0.95rem; }
.fl-detail-status.rot { color: #DC2626; }
.fl-detail-status.gruen { color: #15803D; }
.fl-detail-last { margin-top: 6px; color: #6B7280; font-size: 0.85rem; }
.fl-besuch-gesperrt {
  margin: 16px 0 4px 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #065F46;
  font-size: 0.92rem;
  line-height: 1.4;
}
.aktion-card.fl-faellig {
  border-left: 4px solid #DC2626;
  background: #FEF2F2;
}
/* ---- Umkreis-Suche (Gastronomie) in Schritt 1 des Neu-Wizards ----
   Zeigt, WAS hier in der Nähe steht, statt den Namen abzufragen, den
   der Mitarbeiter erst kennen müsste. */
.fl-umkreis {
  margin: 0 0 14px 0;
  padding: 12px;
  border: 1px solid #FCD34D;
  border-radius: 10px;
  background: #FFFBEB;
}
.fl-umkreis-titel {
  margin: 0 0 8px 0;
  font-size: 0.82rem;
  font-weight: 800;
  color: #92400E;
}
.fl-umkreis-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
/* ACHTUNG: style.css gibt JEDEM <button> width:100% und margin:14px 0.
   Ohne das ausdrückliche Zurücksetzen füllt schon der erste Chip die
   ganze Zeile und die Leiste zerfällt. */
.fl-umkreis-chips button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: auto;
  margin: 0;
  min-height: 40px;
  padding: 8px 12px;
  /* Ohne `inherit` gewinnt hier das Standardblatt des Browsers (Arial) -
     die globale button-Regel setzt keine Schriftfamilie, und der Chip
     stünde als einziges Element der Seite in einer anderen Schrift. */
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: #92400E;
  background: #FFFFFF;
  border: 1px solid #FCD34D;
  border-radius: var(--r-chip);
  cursor: pointer;
}
.fl-umkreis-chips button.aktiv {
  background: #FFC107;
  border-color: #F59E0B;
  color: #1F2937;
}
/* Der Tap-Highlight ist app-weit abgeschaltet (siehe `html, body`) -
   ohne eigene :active-Regel gäbe der Chip auf die Berührung überhaupt
   keine Antwort. */
.fl-umkreis-chips button:active { background: #FEF3C7; }
.fl-umkreis-chips button.aktiv:active { background: #F59E0B; }
.fl-umkreis-chips button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.fl-umkreis-status {
  margin-top: 8px;
  font-size: 0.85rem;
  font-style: italic;
  color: #6B7280;
}
.fl-umkreis-status.fehler {
  font-style: normal;
  color: #B91C1C;
}
/* KEINE eigene Scrollhöhe: eine Rollbox IM Formular heißt, dass der
   Daumen mal die Liste und mal die Seite bewegt. Stattdessen zeigt
   flGastroListe nur die nächsten Treffer - weiter entfernte helfen dem
   Mitarbeiter ohnehin nicht (gespeichert wird nur vor Ort). */
.fl-umkreis-liste {
  list-style: none;
  margin: 8px 0 0 0;
  padding: 0;
}
/* Ohne Treffer soll der Kasten unten genauso schliessen wie oben. */
.fl-umkreis-liste:empty { margin-top: 0; }
/* Hintergrund, Rahmen, Rundung und Abstand kommen bewusst aus der
   globalen `ul li`-Regel (weiße Karte) - so sieht die Trefferliste aus
   wie jede andere Liste der App. Ein eigenes `border-top` hätte genau
   EINE Kante der Karte umgefärbt und den Rest grau gelassen. */
.fl-umkreis-liste li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}
.fl-umkreis-liste li:active { background: #FEF3C7; }
/* Der Abstand der globalen `ul li`-Regel gehört zwischen die Zeilen,
   nicht unter die letzte - sonst steht der Kasten unten 6 px weiter
   offen als oben. */
.fl-umkreis-liste li:last-child { margin-bottom: 0; }
.fl-umkreis-iko {
  flex: 0 0 auto;
  font-size: 1.25rem;
  line-height: 1.3;
}
.fl-umkreis-text { flex: 1; min-width: 0; }
/* Die Namen kommen ungeprüft aus OpenStreetMap. Ein langes Wort ohne
   Trennstelle läuft sonst aus der Spalte heraus und quer durch die
   Entfernungsangabe. */
.fl-umkreis-name,
.fl-umkreis-sub,
.fl-umkreis-schon { overflow-wrap: anywhere; }
.fl-umkreis-name {
  display: block;
  font-weight: 700;
  color: #1F2937;
  font-size: 0.95rem;
}
.fl-umkreis-sub {
  display: block;
  margin-top: 2px;
  font-size: 0.82rem;
  color: #6B7280;
}
/* Bereits hinterlegte Orte werden markiert, NICHT ausgeblendet - sonst
   wirkt eine voll belegte Straße wie unbearbeitet. */
.fl-umkreis-schon {
  display: block;
  margin-top: 3px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #047857;
}
.fl-umkreis-dist {
  flex: 0 0 auto;
  font-size: 0.8rem;
  font-weight: 700;
  color: #6B7280;
  white-space: nowrap;
  padding-top: 2px;
}
.fl-umkreis-dist.hier { color: #047857; }
/* iOS-spezifisch: das interne <input type="date">-Indikator-
   Icon entfernen damit das Feld genauso breit ist wie ein
   text-input. */
.ber-form input[type="date"]::-webkit-date-and-time-value {
  text-align: left;
}
.ber-form input[type="date"]::-webkit-calendar-picker-indicator {
  background: transparent;
  color: #6B7280;
  cursor: pointer;
  padding: 0;
  margin-right: 2px;
}
.ber-form input[type="date"]::-webkit-inner-spin-button,
.ber-form input[type="date"]::-webkit-clear-button {
  display: none;
}
.ber-form textarea { resize: vertical; }
.ber-form input:focus, .ber-form textarea:focus,
.ber-form select:focus {
  outline: none;
  border-color: #F59E0B;
  background: #FFFBEB;
}
.ber-section {
  margin: 18px 0 8px 0;
  font-size: 0.78rem;
  color: #92400E;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-bottom: 1px solid #FCD34D;
  padding-bottom: 4px;
}
.ber-section:first-of-type { margin-top: 0; }
.ber-row {
  display: flex;
  gap: 8px;
}
.ber-row .ber-col-sm { flex: 0 0 30%; }
.ber-row .ber-col-lg { flex: 1; }
/* Zwoelf dieser Zeilen stehen in Schritt 4 untereinander. Mit rund 17px
   Hoehe und 12px Abstand deckt der Daumen (real 8-10mm) am Kuechentisch
   fast zwangslaeufig die Nachbarzeile ab - und im Beratungsprotokoll
   steht dann die falsche Leistungsart. Gleiche Trefferflaeche wie
   .ber-radio weiter unten, die es schon richtig macht. */
.ber-check {
  display: flex !important;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  min-height: 44px;
  font-size: 1rem;
  font-weight: 500 !important;
  cursor: pointer;
}
.ber-check input {
  width: 22px !important;
  height: 22px;
  margin: 0;
  flex: none;
}
.ber-hint {
  margin: 4px 0 6px 0;
  font-size: 0.78rem;
  color: #6B7280;
}
/* Schritt 3, "Pflege ist NICHT sichergestellt": erscheint erst, wenn
   der MA den Haken herausnimmt. Bewusst ROT und nicht amber - das ist
   kein Tipp, sondern eine Pflicht: ohne ausfuehrliche Begruendung
   laesst der Wizard nicht weiter. Farben sind die der uebrigen
   Fehler-Sprache der App (#DC2626 / #FECACA / #FEF2F2 / #991B1B); der
   4px-Balken links macht die Box auch beim Ueberfliegen unuebersehbar.
   Die Box liegt IM Seitenfluss direkt unter dem Kaestchen - kein
   Overlay, damit sie beim Tippen im Textfeld sichtbar bleiben kann. */
.ber-warnbox {
  margin: 0 0 12px 0;
  padding: 12px 14px;
  border: 1px solid #FCA5A5;
  border-left: 4px solid #DC2626;
  border-radius: 10px;
  background: #FEF2F2;
  color: #991B1B;
}
.ber-warnbox-titel {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 6px;
}
/* Das Warndreieck steckt im CSS statt im HTML: so kann es nie in einen
   Textinhalt geraten, der irgendwo weiterverarbeitet wird. */
.ber-warnbox-titel::before {
  /* \FE0E erzwingt die Text-Darstellung des Zeichens. Ohne den
     Zusatz zeigen manche Geraete das gelbe Emoji-Dreieck, das die
     Schriftfarbe ignoriert und hoeher ist als die Zeile. */
  content: "\26A0\FE0E";
  margin-right: 8px;
}
.ber-warnbox-text {
  margin-top: 10px;
  font-size: 0.88rem;
  line-height: 1.45;
}
/* Sobald im Feld etwas steht, schrumpft die Box auf Titel + Zaehler:
   Erklaertext und Frageliste haben ihren Zweck dann erfuellt, und die
   ~160 px, die sie belegen, fehlen bei offener Tastatur genau dort,
   wo die Rueckmeldung stehen soll. */
.ber-warnbox.kompakt .ber-warnbox-text,
.ber-warnbox.kompakt .ber-warnbox-liste { display: none; }
/* Hebt die globalen Listen-Regeln (ul{list-style:none} und
   ul li{weisse Karte mit grauem Rahmen}, style.css ganz oben) wieder
   auf - sonst saessen mitten im roten Kasten drei weisse Kacheln.
   Gleiches Vorgehen wie .thw-q-fehler li und .wa-gesperrt-box ul. */
.ber-warnbox-liste {
  list-style: disc;
  margin: 8px 0 0 0;
  padding-left: 20px;
  font-size: 0.88rem;
  line-height: 1.5;
}
.ber-warnbox-liste li {
  display: list-item;
  padding: 2px 0;
  margin-bottom: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}
/* Live-Rueckmeldung unter der Liste: rot = fehlt noch, gruen = reicht,
   amber = passt inhaltlich, wird auf dem Formular aber knapp. */
.ber-warnbox-zaehler {
  margin-top: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.4;
}
.ber-warnbox-zaehler:empty { display: none; }
.ber-warnbox-zaehler.ok { color: #15803D; }
.ber-warnbox-zaehler.lang { color: #92400E; }
/* Eine ausfuehrliche Begruendung sind schnell 300 Zeichen - in den
   voreingestellten 3 Zeilen scrollt dem MA der eigene Text weg, und er
   kann nicht mehr ueberblicken, was er schon geschrieben hat. Die
   Vergroesserung greift AUSSCHLIESSLICH, solange "nicht sichergestellt"
   angekreuzt ist (Klasse setzt/entfernt _berNichtSicherToggle); im
   Normalfall bleibt das Feld exakt wie bisher. */
.ber-form textarea.ber-begruendung-gross {
  min-height: 150px;
}
/* Das Begruendungsfeld wird rot markiert, wenn der Weiter-Klick an der
   fehlenden Begruendung scheitert - gleiche Mechanik wie bei den
   Unterschrift-Feldern (.required-empty setzt/entfernt das JS). Die
   bestehende .show-errors-Regel greift nur fuer input/select mit
   required-Attribut, eine textarea erwischt sie nicht. */
.ber-form textarea.required-empty {
  border-color: #DC2626;
  background: #FEF2F2;
  box-shadow: 0 0 0 1px #FCA5A5 inset;
}
.ber-sig-canvas {
  display: block;
  width: 100%;
  height: 160px;
  border: 2px dashed #FCD34D;
  border-radius: 8px;
  background: #FFFBEB;
  touch-action: none;
}
/* Pflichtfeld-Markierung: ROT erst NACH dem ersten gescheiterten
   Weiter-Klick anzeigen, nicht von Anfang an. Der Asterisk neben
   dem Label macht trotzdem klar dass es Pflichtfelder sind.
   .show-errors wird vom JS auf .ber-form gesetzt sobald ein Schritt
   nicht validiert; ein Tipp/Klick in irgendein Feld entfernt sie
   wieder. */
.ber-form.show-errors input[required]:invalid,
.ber-form.show-errors input[required]:placeholder-shown,
.ber-form.show-errors select[required]:invalid {
  border-color: #DC2626;
  background: #FEF2F2;
  box-shadow: 0 0 0 1px #FCA5A5 inset;
}
.ber-required > .ber-star {
  color: #DC2626;
  font-weight: 800;
  margin-left: 4px;
}
.ber-section .ber-star {
  color: #DC2626;
  font-weight: 800;
  margin-left: 4px;
}
/* Unterschrift-Canvas: Default = gelb gestrichelt. .required-empty
   (rot) wird nur vom JS gesetzt wenn der Weiter-Klick scheitert
   weil noch nicht unterschrieben wurde. .required-done (gruen)
   wenn der erste Strich gezeichnet ist. */
.ber-sig-canvas.required-empty {
  border: 2px dashed #DC2626;
  background: #FEF2F2;
}
.ber-sig-canvas.required-done {
  border: 2px solid #16A34A;
  background: #F0FDF4;
}
.ber-clear-btn {
  display: block;
  margin: 6px 0 0 0;
  padding: 6px 12px;
  background: transparent;
  color: #92400E;
  border: 1px solid #FCD34D;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
}
/* Schritt 3 (NEU): Kopie an Kunden? - Radio-Gruppe */
.ber-radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 8px 0 14px 0;
}
.ber-radio {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: #F9FAFB;
  border: 2px solid #E5E7EB;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1rem;
}
.ber-radio input[type="radio"] {
  width: 22px;
  height: 22px;
  cursor: pointer;
}
.ber-radio:has(input[type="radio"]:checked) {
  border-color: #FFC107;
  background: #FFFBEB;
}
.ber-form .primary {
  width: 100%;
  margin-top: 14px;
  padding: 14px;
  font-size: 1rem;
  font-weight: 800;
  background: #FFC107;
  color: #1F2937;
  border: none;
  border-radius: 10px;
}
.ber-form .primary:active { background: #F59E0B; }
.ber-form .primary:disabled {
  background: #E5E7EB;
  color: #9CA3AF;
}
#ber-msg { margin-top: 8px; font-size: 0.85rem; }

/* Schritt-Wizard: Punkte-Leiste oben, ein Step sichtbar.
   Ab 16.11.2026 in derselben Optik wie ALLE Assistenten im Manager
   (Vorbild Desktop „Video erstellen“, ui/wizard_optik.py): kleine
   Punkte ohne Zahlen, erledigt + aktuell in Kolbe-Gelb, offen hohl;
   unten „Zurück“ (weiß) und „Weiter“ (gelb) mittig nebeneinander. */
.ber-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px;
  background: #FFFFFF;
  border-bottom: 1px solid #ECEFF1;
  flex: 0 0 auto;
}
.ber-step-dot {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid #948A76;
  box-sizing: border-box;
  font-size: 0;          /* keine Zahlen in den Punkten */
  line-height: 0;
  color: transparent;
  overflow: hidden;
}
.ber-step-dot.active,
.ber-step-dot.done {
  background: #F2C400;
  border-color: #F2C400;
}
.ber-step-line { display: none; }
/* Kompakt-Variante (Beratungseinsatz, 7 Schritte): gleiche Punkte. */
.ber-stepper-kompakt { gap: 8px; padding: 12px 8px; }
.ber-step.hidden { display: none; }

/* Step-Navigation unten: Zurueck/Weiter/Speichern - mittig, direkt
   nebeneinander (wie „‹ Zurück“ 160 px / „Weiter ›“ 220 px am PC). */
.ber-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}
/* .ber-form .primary bringt sonst margin-top mit - beide Knöpfe auf
   eine Linie. */
.ber-nav .ber-nav-btn { margin: 0; }
.ber-nav-btn {
  flex: 0 1 160px;
  min-height: 44px;
  padding: 10px 12px;
  font-size: 1rem;
  font-weight: 600;
  background: #FFFFFF;
  color: #1F2937;
  border: 1px solid #948A76;
  border-radius: 10px;
  font-family: inherit;
  cursor: pointer;
}
.ber-nav-btn:active { transform: scale(0.97); }
.ber-nav-btn.primary {
  flex: 0 1 220px;
  background: #F2C400;
  border-color: #9E8100;
  color: #1F2937;
  font-weight: 800;
}
.ber-nav-btn.hidden { display: none; }
.ber-nav-btn:disabled {
  background: #E5E7EB;
  color: #9CA3AF;
  border-color: #E5E7EB;
}

/* Neuer Kunde - Statistik. Mini-Histogramm + Tabelle. */
.nks-hist {
  padding: 6px 14px 12px 14px;
}
.nks-hist-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 160px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 8px 6px;
}
.nks-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  height: 100%;
}
.nks-bar {
  width: 100%;
  background: #FFC107;
  border-radius: 3px 3px 0 0;
  min-height: 1px;
  transition: height 0.2s ease;
}
.nks-bar-cnt {
  font-size: 0.7rem;
  font-weight: 700;
  color: #1F2937;
  margin-bottom: 1px;
  line-height: 1;
}
.nks-bar-lbl {
  font-size: 0.6875rem;
  color: #6B7280;
  margin-top: 3px;
  white-space: nowrap;
  transform: rotate(-50deg) translate(-3px, 0);
  transform-origin: top right;
  height: 24px;
}
.nks-tbl {
  width: calc(100% - 28px);
  margin: 4px 14px 20px 14px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  border-collapse: collapse;
  overflow: hidden;
  font-size: 0.9rem;
}
.nks-tbl th, .nks-tbl td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid #F1F5F9;
}
.nks-tbl th {
  background: #F8FAFC;
  font-weight: 700;
  color: #475569;
  font-size: 0.8rem;
}
.nks-tbl tr:last-child td { border-bottom: none; }
.nks-tbl td.nks-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Neuer Kunde - Body unter dem Chat-Header. Scrollbar wie bei Chat
   und E-Mails, damit das Bedienen gleich aussieht und sich gleich
   anfuehlt. */
.nk-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: #FFFFFF;
  padding: 0 0 24px 0;
  -webkit-overflow-scrolling: touch;
}
.nk-section {
  padding: 14px 14px 6px 14px;
  margin: 0;
  font-size: 0.78rem;
  color: #6B7280;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  background: #F8FAFC;
  border-top: 1px solid #ECEFF1;
  border-bottom: 1px solid #ECEFF1;
}

/* Neuer Kunde - Formular */
.nk-form {
  padding: 14px 14px 16px 14px;
  background: #FFFFFF;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}
.nk-form label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.85rem;
  color: #475569;
  font-weight: 600;
}
.nk-form input,
.nk-form select {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  font-size: 1rem;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  background: #FFFFFF;
  color: #1F2937;
  font-family: inherit;
}
.nk-form input:focus,
.nk-form select:focus {
  outline: none;
  border-color: #F59E0B;
  background: #FFFBEB;
}
.nk-form .primary {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  font-weight: 800;
  background: #FFC107;
  color: #1F2937;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 4px;
}
.nk-form .primary:active { background: #F59E0B; }
.nk-form #nk-msg {
  margin-top: 8px;
  font-size: 0.85rem;
}

/* Neuer Kunde - Liste im Chat-Konversations-Stil */
#nk-liste {
  padding: 0;
  background: #FFFFFF;
}
.nk-card {
  position: relative;
  background: #FFFFFF;
  border: none;
  border-radius: 0;
  padding: 10px 14px;
  margin: 0;
  box-shadow: none;
}
.nk-card::after {
  content: "";
  position: absolute;
  left: 14px; right: 0; bottom: 0;
  height: 1px;
  background: #ECEFF1;
}
.nk-card:last-child::after { display: none; }
.nk-card-name {
  font-size: 1rem;
  font-weight: 700;
  color: #1F2937;
}
.nk-card-termin {
  display: inline-block;
  margin-left: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #1D4ED8;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 6px;
  padding: 1px 7px;
  white-space: nowrap;
}
.nk-card-meta {
  font-size: 0.8rem;
  color: #6B7280;
  margin-top: 3px;
}
.nk-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}
.nk-leistung-tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 10px;
  background: #FEF3C7;
  color: #92400E;
}

/* Push-Banner ueber den Start-Buttons */
.push-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  margin: 0 0 14px 0;
  background: #FEF3C7;
  border: 1px solid #FCD34D;
  border-radius: 12px;
  color: #1F2937;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: 0.95rem;
}
.push-banner:active { background: #FDE68A; }
.push-banner.hidden { display: none !important; }
.push-banner-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}
.push-banner-text { flex: 1; line-height: 1.35; }
.push-banner-text small {
  color: #6B7280;
  font-size: 0.85rem;
}

/* Pull-to-Refresh-Indikator im Hauptmenue */
.ptr-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
  color: #92400E;
  height: 0;
  overflow: hidden;
  transition: height 0.15s ease-out;
}
.ptr-indicator.visible { height: 38px; }
.ptr-spinner {
  display: inline-block;
  font-size: 20px;
  transition: transform 0.15s ease-out;
}
.ptr-indicator.refreshing .ptr-spinner {
  animation: main-ptr-spin 0.8s linear infinite;
}
@keyframes main-ptr-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ===== KI-Fragen: Ladezustand waehrend die KI recherchiert =====
   Bewusst KEIN Overlay: der KI-Call laeuft 10-40 s (im Extremfall laenger).
   Ein Vollbild-Overlay wuerde den Nutzer so lange aussperren, obwohl die
   Antwort ohnehin serverseitig gespeichert wird und er den Bereich
   gefahrlos verlassen kann. Der Loader sitzt darum da, wo die Antwort
   gleich erscheint. */
.kif-loader {
  margin: 10px 14px;
  padding: 14px;
  background: #EEF2FF;
  border: 1px solid #C7D2FE;
  border-radius: 12px;
}
.kif-loader.hidden { display: none !important; }
.kif-loader-kopf { display: flex; gap: 8px; align-items: flex-start; }
.kif-spin {
  flex: 0 0 auto;
  display: inline-block;
  font-size: 18px;
  line-height: 1.3;
  color: #4F46E5;
  animation: main-ptr-spin 0.8s linear infinite;  /* Keyframe s. oben */
}
.kif-loader-frage {
  flex: 1 1 auto;
  font-size: 15px;
  font-weight: 700;
  color: #312E81;
}
.kif-loader-fuss {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.kif-phase {
  flex: 1 1 auto;
  font-size: 12px;
  font-weight: 600;
  color: #4F46E5;
}
.kif-elapsed {
  flex: 0 0 auto;
  font-size: 12px;
  color: #475569;
  font-variant-numeric: tabular-nums;   /* Zahl springt nicht */
}
/* Steht ab der ersten Sekunde da (nicht erst nach 75 s): eine KI-Antwort mit
   Websuche dauert regelmaessig Minuten - das muss der Nutzer VORHER wissen,
   sonst haelt er die App fuer haengengeblieben. */
.kif-loader-hinweis {
  margin: 10px 0 0;
  padding-top: 9px;
  border-top: 1px solid #C7D2FE;
  font-size: 12px;
  line-height: 1.45;
  color: #4B5563;
}

/* ===== KI-Gespraech: Sprechblasen im aufgeklappten Verlauf =====
   Bewusst EIGENE Klassen statt der .chat-bubble des Mitarbeiter-Chats:
   deren Regeln haengen an #chat-msg-list (flex-shrink) und halten mit
   padding-right/-bottom Platz fuer eine absolut gesetzte Meta-Zeile frei,
   die es hier nicht gibt - uebernommen saehe das nach unmotiviertem
   Leerraum aus. Das Muster (Flex-Spalte + align-self) ist dasselbe. */
.kif-chat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.kif-bubble {
  max-width: 88%;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;    /* lange URLs sprengen die Blase sonst */
  flex-shrink: 0;
}
/* Eigene Frage: rechts, in der Indigo-Familie des Bereichs. */
.kif-bubble.frage {
  align-self: flex-end;
  background: #E0E7FF;
  border: 1px solid #C7D2FE;
  color: #1E1B4B;
  border-bottom-right-radius: 3px;
}
/* KI-Antwort: links, weiss - wie im Chat die fremde Blase. */
.kif-bubble.antwort {
  align-self: flex-start;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  color: #1F2937;
  border-bottom-left-radius: 3px;
}
/* Die Antwort traegt Quellen und Knoepfe und braucht deshalb mehr Platz
   als eine Frage-Blase. */
.kif-bubble.antwort { max-width: 96%; }
.kif-bubble.wartet {
  align-self: flex-start;
  background: #F8FAFC;
  border: 1px dashed #C7D2FE;
  color: #4F46E5;
  font-weight: 600;
}
/* Fusszeile einer Antwort (Zeit, in-FAQ, Knopf) - normale Schrift, der
   Blasentext darueber ist per white-space: pre-wrap gesetzt. */
.kif-bubble-fuss {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 8px;
  white-space: normal;
  font-size: 12px;
}
/* Eingabezeile fuer die Nachfrage, direkt unter dem Verlauf. */
.kif-weiter {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #E5E7EB;
}
.kif-weiter-input {
  flex: 1 1 auto;
  min-width: 0;               /* ohne das sprengt das Feld die Karte */
  box-sizing: border-box;
  padding: 9px 10px;
  border: 1px solid #C7D2FE;
  border-radius: 9px;
  font-size: 16px;            /* unter 16 px zoomt iOS beim Antippen */
}
/* width/margin ZWINGEND zuruecksetzen: die globale Regel gibt JEDEM
   button display:block, width:100% und 14px Aussenabstand oben/unten.
   Ohne das quetscht der Knopf das Eingabefeld auf wenige Pixel zusammen
   und laeuft selbst ueber den rechten Kartenrand hinaus (im Bild
   nachgemessen). Gilt fuer jeden Knopf hier - siehe auch .kif-faq-btn. */
.kif-weiter-go {
  flex: 0 0 auto;
  width: auto;
  margin: 0;
  background: #4F46E5;
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
}
.kif-weiter-go:disabled { background: #A5B4FC; }
/* Der FAQ-Knopf sitzt in der Fusszeile einer Antwortblase, der
   Loesch-Knopf unter dem Gespraech - beide sind ebenfalls button. */
.kif-faq-btn,
.kif-del-btn {
  display: inline-block;
  width: auto;
  margin: 0;
}

/* ===== Boot-Ladescreen (Vollbild bis das Hauptmenue wirklich steht) ===== */
.boot-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;                       /* ueber allem, auch ueber #upload-overlay (9999) */
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFC107;                   /* Marken-Gelb */
  opacity: 1;
  transition: opacity 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}
.boot-overlay.boot-fade { opacity: 0; } /* Fade-out, danach .hidden = ganz weg */
.boot-overlay.hidden { display: none !important; }
.boot-box { text-align: center; color: #3a2f00; }
.boot-spinner {
  font-size: 48px; line-height: 1; display: inline-block;
  animation: boot-spin 1s linear infinite;
}
.boot-title { margin-top: 14px; font-size: 20px; font-weight: 700; }
.boot-sub { margin-top: 4px; font-size: 14px; opacity: 0.75; }
@keyframes boot-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .boot-spinner { animation: none; }
  .boot-overlay { transition: none; }
  .kif-spin { animation: none; }
}

/* ===== Upload-Ladescreen (Vollbild beim Datei-Upload) ===== */
.upload-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(17, 24, 39, 0.72);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.upload-overlay.hidden { display: none; }
.upload-box {
  width: 100%;
  max-width: 320px;
  padding: 28px 24px;
  text-align: center;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.upload-spinner {
  display: inline-block;
  font-size: 46px;
  line-height: 1;
  color: #F59E0B;
  animation: main-ptr-spin 0.8s linear infinite;
}
/* Erfolgs-Haekchen: ersetzt den Spinner kurz, wenn die Aktion
   fertig ist (Beratungseinsatz-Uebermittlung, _berLadeErfolg). */
.upload-erfolg {
  display: inline-block;
  font-size: 46px;
  line-height: 1;
  color: #16A34A;
  font-weight: 800;
}
.upload-title {
  margin-top: 16px;
  font-size: 17px;
  font-weight: 700;
  color: #111;
}
.upload-hint {
  margin-top: 12px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.45;
  color: #92400E;
  background: #FEF3C7;
  border-radius: 10px;
}

/* ===== Dokument-Viewer (Vollbild-Overlay "Meine Dokumente") ===== */
/* In-App-Anzeige statt target=_blank, damit der MA das Dokument mit dem
   x-Button schliessen kann, ohne die installierte PWA zu verlassen.
   Amber-Thema wie die App, safe-area fuer iPhone-Notch beachtet. */
.madok-viewer {
  position: fixed;
  inset: 0;
  z-index: 10000; /* ueber upload-overlay (9999) */
  display: flex;
  flex-direction: column;
  background: #FFFBEB;
}
.madok-viewer.hidden { display: none; }

.madok-viewer-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  padding-top: calc(10px + env(safe-area-inset-top));
  background: #FFFBEB;
  border-bottom: 1px solid #FDE68A;
  box-shadow: 0 2px 6px rgba(146, 64, 14, 0.08);
}
.madok-viewer-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 16px;
  font-weight: 700;
  color: #92400E;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.madok-viewer-close {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid #FDE68A;
  border-radius: 12px;
  background: #fff;
  color: #92400E;
  font-size: 30px;
  line-height: 1;
  font-weight: 400;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  padding: 0;
  margin: 0; /* globale button{margin:14px 0} neutralisieren */
}
.madok-viewer-close:active { background: #FEF3C7; }

.madok-viewer-body {
  flex: 1 1 auto;
  position: relative;
  min-height: 0;
  background: #525659; /* neutraler PDF-Hintergrund */
  overflow: hidden;
}
.madok-viewer-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.madok-viewer-stage iframe,
.madok-viewer-stage object,
.madok-viewer-stage embed {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #525659;
}
.madok-viewer-stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #525659;
}
/* In-App-PDF-Reader: PDF-Seiten werden serverseitig (PyMuPDF) zu PNG
   gerendert und hier als gestapelte <img> gezeigt. Das rendert auf
   JEDEM Geraet (Samsung Internet / Android-WebView / iOS) - ein
   <iframe> auf eine PDF tut das auf Android oft NICHT (verlangt eine
   externe Reader-App). */
.madok-viewer-stage.pdf-mode {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.pdf-pages {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0 16px 0;
  min-height: 100%;
}
.madok-viewer-stage .pdf-pages img.pdf-page {
  display: block;
  width: calc(var(--pdf-zoom, 1) * 100%);
  height: auto;
  object-fit: initial;
  background: #fff;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}
/* Zoom-Steuerung schwebt unten rechts ueber den Seiten (Pinch ist
   global per maximum-scale=1 deaktiviert). */
.madok-viewer-zoomctl {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-radius: 999px;
  background: rgba(31, 41, 55, 0.82);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.madok-viewer-zoomctl.hidden { display: none; }
.madok-viewer-zoombtn {
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #1F2937;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.madok-viewer-zoombtn:active { background: #FDE68A; }
.madok-viewer-zoomlabel {
  min-width: 46px;
  text-align: center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.madok-viewer-loading,
.madok-viewer-error {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  background: #FFFBEB;
}
.madok-viewer-loading.hidden,
.madok-viewer-error.hidden { display: none; }
.madok-viewer-spinner {
  font-size: 46px;
  line-height: 1;
  color: #F59E0B;
  animation: main-ptr-spin 0.8s linear infinite;
}
.madok-viewer-loading-text { font-size: 15px; color: #92400E; }
.madok-viewer-error-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #FEF3C7;
  color: #B45309;
  font-size: 30px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.madok-viewer-error-text {
  font-size: 15px;
  line-height: 1.45;
  color: #92400E;
  max-width: 320px;
}

/* Download-Notausgang IN der Fehler-Box (nur sichtbar, wenn die
   PDF-Vorschau scheitert, z.B. sehr grosse Chat-PDFs aus Drive). Die
   fruehere Fussleiste mit "Im Browser öffnen" / "Zurück zur Liste" ist
   entfernt - geschlossen wird oben per × bzw. Android-Zurueck. */
.madok-viewer-extern {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 22px;
  margin: 0; /* globale button{margin:14px 0} neutralisieren */
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  color: #92400E;
  background: #fff;
  border: 1px solid #FDE68A;
}
.madok-viewer-extern:active { background: #FEF3C7; }

.start-btn .start-btn-sub {
  font-size: 0.85rem;
  color: #667085;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.start-btn .start-btn-label {
  font-size: 1.0rem;
  font-weight: 600;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.start-btn .badge-count {
  position: static;
  /* #25D366 (das klassische WhatsApp-Gruen) hatte gegen Weiss nur
     rund 1,9:1 - die Zahl war in der Sonne nicht zu lesen. #0F7B3C
     ist derselbe Gruenton eine Stufe dunkler und liegt bei 5,4:1.
     Die Chatliste hat denselben Schritt schon hinter sich
     (.konv-badge). */
  background: #0F7B3C;
  color: #fff;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 22px;
  height: 22px;
  text-align: center;
  display: inline-flex;
  align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-left: 8px;
}

/* ---------- Chat (WhatsApp-Look v0.1.2.8) ---------- */

/* Hier stand der Regelblock ".chat-button" (Chat-Knopf im Hauptmenue,
   samt .chat-icon, .chat-label und eigenem .badge-count). Das Hauptmenue
   benutzt heute .start-buttons/.aktion-card - am 16.08.2026 als tot
   entfernt. */
.badge-count {
  background: #D92D20;
  color: #FFFFFF;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
  /* Gleich breite Ziffern - sonst wackelt die Blase beim Zaehlen. */
  font-variant-numeric: tabular-nums;
}
.badge-count.hidden { display: none; }

/* Push-Pause-Settings Screen */
.pst-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 16px 30px 16px;
  background: #FFFFFF;
  -webkit-overflow-scrolling: touch;
}
.pst-info {
  background: #F8FAFC;
  border: 1px solid #ECEFF1;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.85rem;
  color: #475569;
  margin: 0 0 14px 0;
  line-height: 1.4;
}
.pst-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 12px 14px;
  font-weight: 700;
  font-size: 1rem;
  color: #1F2937;
  margin-bottom: 12px;
}
.pst-toggle-row input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: #FFC107;
}
.pst-time-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.pst-time-cell {
  flex: 1;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.85rem;
  color: #475569;
  font-weight: 600;
}
.pst-time-cell input[type="time"] {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 8px 10px;
  font-size: 1.05rem;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  font-family: inherit;
}
.pst-body .primary {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  font-weight: 800;
  background: #FFC107;
  color: #1F2937;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

/* Chat-Screens: vollflaechig, kein Body-Padding */
.chat-screen {
  padding: 0;
  margin: 0;
  max-width: none;
  position: fixed;
  inset: 0;
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
}
.chat-screen.hidden { display: none !important; }

.chat-header {
  display: flex;
  align-items: center;
  /* Das Haus-Gelb ueber die ganze Flaeche - so soll es sein.
     Zwischenzeitlich war die Kopfzeile hell, weil sie unmittelbar
     ueber einer Reiterleiste stand, die dasselbe Gelb gerade
     aufgegeben hatte; zwei gleiche Flaechen uebereinander wirkten
     wie ein Block. Dieser Grund ist weg: die Reiterleiste traegt
     jetzt eine graue Schiene bzw. eine weisse Pille, die gewaehlte
     Stellung ist weiss bzw. weich bernstein. Der Kopfbereich
     wiederholt also nichts mehr.
     Die Schrift darauf ist #1F2937 - 9:1 gegen das Gelb und damit
     auch in der Sonne lesbar. */
  background: #FFC107;
  padding: 10px 6px;
  padding-top: calc(10px + env(safe-area-inset-top));
  margin: 0;
  /* Eine feine dunkle Kante statt einer gelben: auf gelbem Grund
     waere eine gelbe Linie nicht zu sehen. */
  border-bottom: 1px solid rgba(0,0,0,0.10);
  flex: 0 0 auto;
  position: sticky;
  top: 0;
  z-index: 10;
}
.chat-header .hdr-btn {
  /* Fixe Box-Groesse fuer ALLE Header-Buttons (Back, Settings,
     Logout, Plus, Stats, ...) - damit Layout in allen Bereichen
     identisch ist. Egal welches Symbol drin steht, Box ist gleich. */
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  color: #1F2937;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex: 0 0 40px;
  cursor: pointer;
  /* Variation-Selector: forciert monochrome Glyphe (statt iOS-
     Emoji-Version). Wirkt nur wenn das Symbol einen Text-Style hat -
     ist z.B. fuer ⚙ und ⏎ wichtig, damit sie kompakt wie ❮ aussehen
     und nicht als bunte Emojis gerendert werden. */
  font-variant-emoji: text;
  /* iOS-spezifisch: System-Font nutzen damit Glyphen einheitlich
     gerendert werden (statt Color-Emoji-Fallback fuer manche
     Symbole). */
  font-family: -apple-system, "SF Pro Text", "Segoe UI Symbol",
                "Apple Symbols", sans-serif;
}
/* Falls ein Browser font-variant-emoji nicht kennt: Notfall ueber
   text-rendering und SVG-fallback. Im Zweifel gibt's einen ueblichen
   Fallback ueber font-family der Color-Emojis vermeidet. */
.chat-header .hdr-btn,
.chat-header .hdr-spacer {
  text-shadow: none;
}
.chat-header .hdr-btn:active { background: rgba(0,0,0,0.08); }
.chat-header .hdr-spacer { background: transparent !important; }
/* --- Kopfzeile je System ---------------------------------------------
   Der auffaelligste Unterschied zwischen den Systemen: iOS setzt den
   Titel MITTIG und klein, Material 3 setzt ihn LINKS und groesser.
   Beides ohne Aenderung am Markup - der hdr-spacer haelt links
   ohnehin schon Platz frei. */
.os-android .chat-header {
  padding-left: 4px;
}
.os-android .chat-header .hdr-title {
  text-align: left;
  padding-left: 8px;
  font-size: 1.25rem;
  font-weight: 500;
}
/* Material 3 nutzt fuer die obere Leiste keine Trennlinie, sondern
   dieselbe Flaeche wie der Inhalt - die gelbe Signatur bleibt
   trotzdem, sie ist die Handschrift des Hauses. */
.os-ios .chat-header .hdr-title {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.chat-header .hdr-title {
  flex: 1;
  text-align: center;
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1F2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-header .hdr-title-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding-left: 4px;
}
.chat-header .hdr-title-wrap .hdr-title {
  text-align: left;
}
.chat-header .hdr-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #7BB662;
  color: #fff;
  font-weight: 700;
  display: inline-flex;
  align-items: center; justify-content: center;
  font-size: 0.85rem;
  flex: 0 0 34px;
}

/* Konversationsliste */
#chat-konv-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: #FFFFFF;
  -webkit-overflow-scrolling: touch;
}
.konv-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #FFFFFF;
  border: none;
  border-radius: 0;
  cursor: pointer;
  position: relative;
}
.konv-item:active { background: #F1F5F9; }
.konv-item::after {
  content: "";
  position: absolute;
  left: 70px; right: 0; bottom: 0;
  height: 1px;
  background: #ECEFF1;
}
/* Die Karte ist IMMER letztes Kind ihrer .konv-row (davor liegt der
   Wisch-Knopf) - die alte Regel .konv-item:last-child haette deshalb
   JEDE Trennlinie abgeschaltet, nicht nur die der letzten Zeile. */
.konv-row:last-child .konv-item::after { display: none; }
.konv-item .avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: #7BB662;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center; justify-content: center;
  flex: 0 0 48px;
  text-transform: uppercase;
}
.konv-item .konv-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.konv-item .konv-row1,
.konv-item .konv-row2 {
  display: flex;
  align-items: center;
  gap: 8px;
}
.konv-item .konv-name {
  flex: 1;
  font-weight: 600;
  font-size: 1.0rem;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.konv-item .konv-time {
  font-size: 0.75rem;
  color: #667085;
  flex: 0 0 auto;
}
/* Gruen eine Stufe dunkler als das klassische #25D366: darauf hatte
   die Uhrzeit nur 1,98:1 gegen Weiss und die Zahl im Badge 2:1 - im
   Sonnenlicht auf dem Handy nicht mehr lesbar. Ausgerechnet die
   Angabe, wegen der man hinschaut. #0F7B3C liegt bei 5,36:1. */
.konv-item.unread .konv-time { color: #0F7B3C; font-weight: 700; }
.konv-item .konv-preview {
  flex: 1;
  font-size: 0.88rem;
  color: #667085;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Kennzeichen im Archiv: dieser Chat wurde am PC FUER ALLE geloescht
   (im Gegensatz zum selbst weggewischten). Bewusst KEIN Rot - es ist
   eine Zustandsangabe, kein Alarm, und das Rot ist im Chat fuer den
   Ungelesen-Zaehler reserviert. flex:0 0 auto, damit der Vorschautext
   daneben gekuerzt wird und nicht die Marke. */
.konv-item .konv-marke {
  flex: 0 0 auto;
  background: #E8EDF3;
  color: #475569;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 4px;
  padding: 1px 6px;
  white-space: nowrap;
}
.konv-item .konv-badge {
  background: #0F7B3C;
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 7px;
  min-width: 20px;
  height: 20px;
  text-align: center;
  display: inline-flex;
  align-items: center; justify-content: center;
  flex: 0 0 auto;
}

/* Neuer Chat - User-Liste */
#chat-new-users {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: #FFFFFF;
  -webkit-overflow-scrolling: touch;
}
.user-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #FFFFFF;
  border: none;
  border-radius: 0;
  cursor: pointer;
  position: relative;
}
.user-item:active { background: #F1F5F9; }
.user-item::after {
  content: "";
  position: absolute;
  left: 70px; right: 0; bottom: 0;
  height: 1px;
  background: #ECEFF1;
}
.user-item .avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #7BB662;
  color: #FFFFFF;
  font-weight: 700;
  display: inline-flex;
  align-items: center; justify-content: center;
  flex: 0 0 44px;
}
.user-item .user-name {
  flex: 1;
  font-size: 1.0rem;
  color: #111;
}

/* Chat-Detail-Layout
   Die Hoehe von #chat-msg-list wird per JS (fixChatLayout in
   app.js) EXPLIZIT in Pixeln gesetzt - das ist der einzige
   Weg, der iOS Safari/PWA wirklich zuverlaessig zwingt den
   Container zwischen Header und Input-Row korrekt zu zeichnen.
   Die folgenden CSS-Regeln sind nur Fallback fuer den Fall dass
   JS noch nicht gelaufen ist (erstes Paint vor onload). */
#chat-msg-list {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 10px 8px 14px 8px;
  background: #ECE5DD;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
/* Bubbles duerfen nicht shrunken werden - sonst werden sie auf 1px
   reduziert wenn der Container voll ist und man sieht nur den
   Hintergrund. */
#chat-msg-list .chat-bubble,
#chat-msg-list .date-sep {
  flex-shrink: 0;
}

.date-sep {
  align-self: center;
  background: rgba(255,255,255,0.85);
  color: #4b5563;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 999px;
  margin: 12px 0 8px 0;
  box-shadow: 0 1px 1px rgba(0,0,0,0.08);
}

.chat-bubble {
  max-width: 75%;
  /* Der Unterrand haelt die Meta-Zeile (Uhrzeit, Haken, Like) frei, die
     dort absolut positioniert sitzt. Er MUSS mit der Schrift mitwachsen:
     die Like-Pille misst in rem, dieser Rand stand aber in festen 18 px.
     Auf Android mit vergroesserter Anzeige ragte die Pille dadurch in den
     Inhalt - bei einer Sprachnachricht sass sie mitten auf dem Player.
     Gerechnet: Pille = 0.75rem Schrift + 4 px Innenabstand + 2 px Rahmen,
     dazu die 3 px Abstand von unten, plus 1 px Reserve. */
  padding: 6px 10px calc(0.75rem + 10px) 10px;
  border-radius: 8px;
  word-wrap: break-word;
  font-size: 0.95rem;
  box-shadow: 0 1px 1px rgba(0,0,0,0.13);
  position: relative;
  margin-top: 6px;
}
.chat-bubble.stacked { margin-top: 1px; }

.chat-bubble.eigene {
  align-self: flex-end;
  background: #DCF8C6;
  color: #1F2937;
}
.chat-bubble.fremd {
  align-self: flex-start;
  background: #FFFFFF;
  color: #1F2937;
}
/* Zurueckgezogene Nachricht (0.6.13.588): blass und fuer beide Seiten
   gleich - die Blase soll erkennbar leer sein statt wie eine Nachricht
   mit Inhalt auszusehen. */
.chat-bubble.geloescht {
  background: #EEF1F5;
  color: #475569;
}
/* Der Zipfel wird aus einem farbigen Rahmen gezeichnet und traegt die
   Blasenfarbe fest im Code - ohne diese beiden Regeln bliebe an einer
   zurueckgezogenen Nachricht ein gruener bzw. weisser Keil stehen. */
.chat-bubble.eigene.tail.geloescht::after {
  border-left-color: #EEF1F5;
}
.chat-bubble.fremd.tail.geloescht::after {
  border-right-color: #EEF1F5;
}
.bubble-geloescht {
  font-style: italic;
  color: #64748B;
}
/* Blasen mit Langdruck-Geste ("Nachricht löschen"): der Browser darf
   dort weder sein eigenes Kopieren-Menue einblenden noch beim langen
   Druck eine Textauswahl aufziehen - beides legte sich sonst ueber die
   Rueckfrage. Die Einschraenkung trifft NUR die eigene, noch ungelesene
   Nachricht: sobald der Empfaenger gelesen hat, faellt die Klasse weg
   und der Text laesst sich wie ueberall markieren. */
.chat-bubble.loeschbar {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
.chat-bubble.eigene.tail {
  border-bottom-right-radius: 0;
}
.chat-bubble.fremd.tail {
  border-bottom-left-radius: 0;
}
.chat-bubble.eigene.tail::after {
  content: "";
  position: absolute;
  right: -6px; bottom: 0;
  width: 0; height: 0;
  border-left: 8px solid #DCF8C6;
  border-bottom: 8px solid transparent;
}
.chat-bubble.fremd.tail::after {
  content: "";
  position: absolute;
  left: -6px; bottom: 0;
  width: 0; height: 0;
  border-right: 8px solid #FFFFFF;
  border-bottom: 8px solid transparent;
}
.bubble-sender {
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 2px;
}
.bubble-text {
  white-space: pre-wrap;
  padding-right: 56px;
  line-height: 1.35;
}
.bubble-meta {
  position: absolute;
  right: 8px; bottom: 3px;
  font-size: 0.6875rem;
  color: #667085;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.bubble-meta .ticks { font-size: 0.85rem; line-height: 1; }
.bubble-meta .ticks.read { color: #34B7F1; }
.bubble-meta .ticks.sent { color: #8c95a1; }

/* Daumen-hoch-Like-Button auf jeder Chat-Bubble. Klein und dezent
   damit er die Bubble-Lesbarkeit nicht stoert. */
.bubble-meta .like-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  /* Die globale Regel `button { width: 100%; margin: 14px 0 }` (style.css
     ganz oben) muss hier VOLLSTAENDIG zurueckgenommen werden - sie erwischt
     die Pille gleich zweimal:
       * `margin: 14px 0` machte die Meta-Zeile 46 px hoch statt 18; sie
         schob sich damit weit in die Blase und lag auf dem Player.
       * `width: 100%` fiel nicht auf, solange die Zeile absolut
         positioniert war und sich nach ihrem Inhalt richtete. Sobald sie
         im normalen Fluss steht (Blasen mit Anhang, siehe unten), zieht
         die Pille sich ueber die ganze Blasenbreite. */
  margin: 0 0 0 4px;
  width: auto;
  flex: 0 0 auto;
  font-size: 0.75rem;
  font-family: inherit;
  border-radius: 11px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  background: rgba(255, 255, 255, 0.85);
  color: #475569;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  line-height: 1;
}
.bubble-meta .like-pill:active {
  transform: scale(0.92);
  background: #FEF3C7;
}
.bubble-meta .like-pill.liked {
  background: #FFC107;
  border-color: #B45309;
  color: #1F2937;
  font-weight: 700;
}
.bubble-meta .like-pill.counted .like-cnt {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.bubble-meta .like-pill.readonly {
  cursor: default;
  background: rgba(255, 255, 255, 0.85);
}
/* Bei eigener Bubble (gelb) Like-Pill etwas dunkler */
.chat-bubble.eigene .bubble-meta .like-pill {
  background: rgba(255, 255, 255, 0.6);
}
.bubble-text .anhang {
  display: inline-block;
  background: rgba(0,0,0,0.06);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 0.85rem;
  margin-top: 2px;
}

/* Input-Row unten */
#chat-input-row {
  display: flex;
  gap: 8px;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom)) 8px;
  background: #F0F0F0;
  border-top: 1px solid #D1D5DB;
  flex: 0 0 auto;
  align-items: center;
}
#chat-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 22px;
  font-size: 1rem;
  background: #FFFFFF;
  outline: none;
  box-shadow: 0 1px 1px rgba(0,0,0,0.06);
}
#chat-input:focus { border-color: #FFC107; }
.send-btn {
  width: 44px; height: 44px;
  padding: 0; margin: 0;
  border-radius: 50%;
  border: none;
  background: #FFC107;
  color: #1F2937;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center; justify-content: center;
  flex: 0 0 44px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.send-btn:active { background: #F59E0B; }
.send-btn:disabled { opacity: 0.55; }

/* Anhang- und Mikrofon-Buttons im Chat-Eingabe-Bereich */
.attach-btn, .mic-btn {
  width: 44px; height: 44px;
  padding: 0; margin: 0;
  border-radius: 50%;
  border: none;
  background: #FFFFFF;
  color: #4B5563;
  font-size: 1.3rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center; justify-content: center;
  flex: 0 0 44px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.attach-btn:active, .mic-btn:active { background: #E2E8F0; }
.mic-btn.recording {
  background: #DC2626;
  color: white;
  animation: mic-pulse 1.2s ease-in-out infinite;
}
@keyframes mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.5); }
  50% { box-shadow: 0 0 0 10px rgba(220, 38, 38, 0); }
}

/* Recording-Bar oberhalb des Eingabefelds */
.recording-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #FEF2F2;
  color: #991B1B;
  border-top: 1px solid #FCA5A5;
  font-size: 0.95rem;
  font-weight: 600;
}
.recording-bar.hidden { display: none; }
.rec-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #DC2626;
  animation: rec-blink 1s ease-in-out infinite;
}
@keyframes rec-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.rec-time { font-variant-numeric: tabular-nums; font-weight: 700; }
.rec-label { flex: 1; }
.rec-cancel {
  background: transparent;
  border: 1px solid #B91C1C;
  color: #B91C1C;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}

/* Preview-Bar: erscheint zwischen Aufnahme und Senden,
   Mitarbeiter kann seine Sprachnachricht anhoeren */
.preview-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 14px;
  background: #FFFBEB;
  border-top: 1px solid #FCD34D;
}
.preview-bar.hidden { display: none; }
.preview-bar audio {
  width: 100%;
  height: 40px;
}
.preview-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.preview-discard,
.preview-send {
  padding: 8px 14px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  border: none;
}
.preview-discard {
  background: transparent;
  color: #B91C1C;
  border: 1px solid #B91C1C;
}
.preview-discard:active { background: #FEE2E2; }
.preview-send {
  background: #FFC107;
  color: #1F2937;
}
.preview-send:active { background: #F59E0B; }

/* Anhaenge im Chat-Verlauf - Audio-Player + Bilder + Dateien */
.chat-anhang-audio {
  display: block;      /* audio ist von Haus aus inline */
  width: 100%;
  /* Unter dieser Breite raeumt Chromium die Bedienleiste des Players von
     hinten ab: erst das Menue, dann die Lautstaerke, dann die Zeitanzeige
     und zuletzt die ZEITLEISTE. Uebrig bleibt ein Knopf am linken Rand -
     ein Stummel, der fuer den Mitarbeiter aussieht, als sei die
     Sprachnachricht kaputt.
     Nachgerechnet fuer die alte Blase: 412-px-Geraet 221 px, 360 px
     (Android-Standard) 182 px, 320 px nur 152 px - und mit der
     Android-Einstellung "Anzeigegroesse" noch weniger. Genau deshalb
     trifft es Android-Geraete und die iPhones der Leitung nicht. */
  /* KEIN min-width hier. Die Breite kommt von der Blase (siehe unten).
     Ein min-width am Player waere entweder wirkungslos oder schaedlich:
     hart 240px macht ihn auf schmalen Geraeten BREITER als seine Blase -
     und weil die Nachrichtenliste senkrecht scrollt, wird daraus auch
     waagerechtes Scrollen. `min(240px, 100%)` wiederum rechnet gegen eine
     Blase, die sich selbst erst nach ihrem Inhalt richtet: ein
     Zirkelschluss, der den Player auf 75 px zusammenfallen liess. */
  min-width: 0;
  min-height: 54px;    /* Blink-Vorgabe; darunter wird abgeschnitten */
  margin-top: 4px;
}
/* Die Blase bekommt fuer eine Sprachnachricht eine BESTIMMTE Breite -
   erst dadurch hat der Player ueberhaupt eine Bezugsgroesse fuer seine
   100 %. 320 px ist reichlich fuer die Bedienleiste; auf schmalen
   Geraeten deckelt die 100 % sauber, ohne dass etwas heraussteht. */
.chat-bubble.hat-audio { width: min(100%, 320px); max-width: 100%; }
/* Video hatte nie eine Deckelung auf die Blasenbreite - der Inline-Stil in
   app.js setzt nur max-width:240px. Auf einem 320-px-Geraet ist die Blase
   228 px breit, das Video ragte also heraus und die Liste liess sich zur
   Seite schieben. */
.chat-anhang-video { max-width: 100%; }

/* --- Meta-Zeile bei Blasen MIT ANHANG in den normalen Fluss holen ------
   Bei reinem Text darf die Zeile (Uhrzeit, Haken, Like) in der Ecke
   schweben - dafuer haelt `.bubble-text` rechts 56 px frei. Sobald aber
   ein Anhang drin sitzt, reicht der Inhalt bis an die Unterkante UND bis
   an den rechten Rand: dann gibt es keine freie Ecke mehr, in der die
   Zeile schweben koennte. Sie bekommt hier eine eigene.
   Das ist zugleich das einzige Mittel, das unabhaengig davon haelt, WIE
   Android vergroessert. Ueber die Wurzelschrift wuerde ein
   `calc(...rem)`-Unterrand mitwachsen - ueber Chromes Textskalierung
   (Regler "Schriftgroesse") NICHT, denn Blink loest `rem` gegen die
   angegebene, nicht gegen die hochskalierte Schrift auf. Eine Zeile im
   Fluss bringt ihre Hoehe dagegen immer selbst mit. */
.chat-bubble:has(.chat-anhang-audio, .chat-anhang-bild, .chat-anhang-video,
                 .chat-anhang-datei, .chat-anhang-link) {
  padding-bottom: 6px;             /* nur Abstand, keine Reserve mehr */
}
.chat-bubble:has(.chat-anhang-audio, .chat-anhang-bild, .chat-anhang-video,
                 .chat-anhang-datei, .chat-anhang-link) .bubble-text {
  padding-right: 0;                /* die 56 px braucht nur Text */
}
.chat-bubble:has(.chat-anhang-audio, .chat-anhang-bild, .chat-anhang-video,
                 .chat-anhang-datei, .chat-anhang-link) .bubble-meta {
  position: static;
  /* NICHT inline-flex: `position:static` macht daraus wieder einen
     Inline-Kasten, und der klebt links unter dem Anhang. */
  display: flex;
  justify-content: flex-end;
  margin-top: 2px;
}
/* Rueckfall fuer Browser ohne :has(). Muss ein EIGENER Regelblock sein -
   eine unbekannte Pseudoklasse verwirft sonst die ganze Regel mit. */
.chat-bubble.hat-audio { padding-bottom: 6px; }
.chat-bubble.hat-audio .bubble-text { padding-right: 0; }
.chat-bubble.hat-audio .bubble-meta {
  position: static;
  display: flex;
  justify-content: flex-end;
  margin-top: 2px;
}
/* Ersatzlink, wenn die Wiedergabe endgueltig scheitert. Der hatte bisher
   ueberhaupt keine Regel - also Browser-Blau mit Unterstrich mitten in
   der gruenen Blase, und als reiner Text keine Flaeche, die ein Daumen
   sicher trifft. */
.chat-anhang-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 4px;
  padding: 8px 12px;
  background: #FFF7E0;
  border: 1px solid #FCD34D;
  border-radius: 8px;
  color: #92400E;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}
.chat-anhang-link:active { background: #FDE68A; }
.chat-anhang-bild {
  max-width: 100%;
  max-height: 240px;
  /* Gehoert zwingend zu den width/height-Attributen im Markup: damit
     rechnet der Browser aus beiden das Seitenverhaeltnis und haelt den
     Platz frei, bevor das Bild geladen ist. Eine feste Hoehe hier wuerde
     genau das kaputtmachen. */
  height: auto;
  border-radius: 10px;
  margin-top: 4px;
  display: block;
}
.chat-anhang-datei {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 8px 12px;
  background: #F3F4F6;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #1F2937;
  text-decoration: none;
}
.chat-anhang-datei:active { background: #E5E7EB; }
.chat-anhang-datei .anh-icon { font-size: 1.4rem; }

/* ===================================================================
   Profilbild-Avatare (Chat) + Einstellungen-Screen
   =================================================================== */
/* Container, in denen ein Profilbild über die Initialen gelegt wird. */
.avatar, .hdr-avatar, .pb-preview {
  position: relative;
  overflow: hidden;
}
/* Das Profilbild liegt deckend über dem Initialen-Kreis; schlägt das
   Laden fehl (kein Bild -> 404), blendet onerror es aus. */
.avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  background: inherit;
}
/* Kleiner Avatar vor dem Sendernamen in Gruppen-Nachrichten. */
.bubble-sender {
  display: flex;
  align-items: center;
  gap: 5px;
}
.avatar.avatar-mini {
  width: 18px; height: 18px;
  min-width: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center; justify-content: center;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  flex: 0 0 18px;
  text-transform: uppercase;
}

/* Einstellungen: Abschnitte */
.settings-section {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid #ECEFF1;
}
.settings-section:last-child { border-bottom: none; margin-bottom: 0; }
/* Profilbild-Bearbeitung */
.pb-edit {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}
.pb-preview {
  width: 88px; height: 88px;
  border-radius: 50%;
  background: #94A3B8;
  color: #fff;
  font-weight: 700;
  font-size: 1.6rem;
  display: inline-flex;
  align-items: center; justify-content: center;
  background-size: cover;
  background-position: center;
  flex: 0 0 88px;
  text-transform: uppercase;
}
.pb-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.pb-actions .primary { width: 100%; padding: 11px; }
.ghost-btn {
  width: 100%;
  padding: 10px;
  background: #F3F4F6;
  color: #B91C1C;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}
.ghost-btn:active { background: #E5E7EB; }
/* Passwort-Eingabefelder */
.pst-input {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  font-family: inherit;
  margin-bottom: 10px;
  box-sizing: border-box;
}
.pst-input:focus { outline: none; border-color: #FFC107; }

/* ============================================================
   Tour (Hauswirtschaft) - Praefix .thw-
   Der Bereich wird im Stehen an der Wohnungstuer bedient: grosse
   Trefferflaechen, kraeftige Zustandsfarben, keine Feinheiten.
   ============================================================ */
.thw-body { padding: 14px 16px 26px; }
.thw-fuss {
  padding: 10px 16px 20px;
  font-size: 12px;
  line-height: 1.45;
}
.thw-body > .thw-fuss { padding-left: 0; padding-right: 0; }
.thw-hinweis {
  padding: 10px 16px 0;
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: #6B7280;
}
.thw-hinweis.error { color: #B91C1C; font-weight: 600; }
.thw-msg { margin: 10px 0 0; font-size: 0.88rem; line-height: 1.4; }
.thw-msg.error { color: #B91C1C; font-weight: 600; }

/* --- Warteschlange: was noch nicht beim Server ist.
   Bewusst LAUT (gelb/rot, oben, auf jedem Bildschirm des Bereichs) -
   ein Mitarbeiter darf nie glauben, etwas sei angekommen, was noch
   auf dem Handy liegt. */
.thw-queue { padding: 10px 14px 0; }
.thw-queue.hidden { display: none; }
.thw-q-wartet, .thw-q-fehler {
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 8px;
}
.thw-q-wartet {
  background: #FEF3C7; border: 1px solid #FDE68A; color: #92400E;
  font-weight: 600;
}
.thw-q-fehler {
  background: #FEE2E2; border: 1px solid #FCA5A5; color: #991B1B;
  font-weight: 600;
}
.thw-q-fehler ul { margin: 6px 0 8px; }
.thw-q-fehler li {
  background: transparent; padding: 2px 0;
  font-weight: 400; font-size: 0.82rem;
}
/* Statt eines Knopfes: wann es von selbst weitergeht. */
.thw-q-auto {
  margin-top: 6px; font-size: 0.8rem; font-weight: 400; opacity: 0.85;
}
.thw-q-btn {
  background: #FFFFFF; border: 1px solid rgba(0,0,0,0.18);
  border-radius: 8px; padding: 7px 12px; font-family: inherit;
  font-size: 0.82rem; font-weight: 700; cursor: pointer;
  color: inherit; margin-right: 8px;
}

/* --- Kopfzeilen / Zustand der Tour --- */
.thw-kopf {
  margin: 12px 14px 0; padding: 12px 14px;
  border-radius: 12px; background: #EFF6FF; border: 1px solid #BFDBFE;
  font-size: 0.9rem; line-height: 1.45;
}
.thw-kopf.thw-laeuft { background: #ECFDF5; border-color: #A7F3D0; }
.thw-kopf.thw-fertig { background: #F3F4F6; border-color: #E5E7EB; }
.thw-kopf b { font-size: 1rem; }
.thw-kopf .thw-zeit-status {
  display: block; margin-top: 6px; color: #92400E; font-weight: 600;
}
/* Feiertag (NRW) als eigene Zeile im Kasten - die Kastenfarbe
   (laeuft/beendet) bleibt, der gelbe Titel darueber auch. */
.thw-kopf .thw-zeit-status.thw-feiertag-txt { color: #B91C1C; font-weight: 700; }
.thw-kunde {
  margin: 0 0 12px; font-size: 0.95rem; line-height: 1.45;
  font-weight: 600; color: #1F2937;
}
.thw-kundenkarte {
  margin: 12px 14px 0; padding: 12px 14px;
  border-radius: 12px; background: #EFF6FF; border: 1px solid #BFDBFE;
}
.thw-budget { margin: 10px 14px 0; }

/* --- Knopfreihen --- */
.thw-btnzeile { padding: 12px 14px 0; }
.thw-btnzeile-unten {
  display: flex; flex-direction: column; gap: 10px;
  padding: 6px 14px 26px;
}
.thw-btnzeile-2 { display: flex; gap: 10px; margin-top: 10px; }
.thw-btnzeile-2 > * { flex: 1; }
.thw-gross { width: 100%; padding: 14px; font-size: 1.02rem; }
.thw-btn-sek {
  width: 100%; padding: 12px;
  background: #FFFFFF; color: #1F2937;
  border: 1px solid #CBD5E1; border-radius: 8px;
  font-family: inherit; font-size: 0.95rem; font-weight: 600;
  cursor: pointer;
}
.thw-btn-sek:active { background: #F3F4F6; }
.thw-btn-warn {
  width: 100%; padding: 12px;
  background: #FFFFFF; color: #B91C1C;
  border: 1px solid #FCA5A5; border-radius: 8px;
  font-family: inherit; font-size: 0.95rem; font-weight: 700;
  cursor: pointer;
}
.thw-btn-warn:active { background: #FEE2E2; }

/* --- Formularfelder --- */
.thw-label {
  display: block; margin: 14px 0 5px;
  font-weight: 700; font-size: 0.9rem; color: #374151;
}
.thw-body > .thw-label:first-of-type { margin-top: 0; }
.thw-feld {
  width: 100%; box-sizing: border-box; padding: 11px;
  border: 1px solid #CBD5E1; border-radius: 8px;
  font-family: inherit; font-size: 1rem; background: #FFFFFF;
}
textarea.thw-feld { resize: vertical; }
.thw-feld:focus { outline: none; border-color: #FFC107; }
.thw-feld.thw-fehlt { border-color: #DC2626; background: #FEF2F2; }
.thw-zeitpaar { display: flex; gap: 10px; }
.thw-zeitpaar > div { flex: 1; }
.thw-suchzeile { padding: 4px 14px 0; }
/* Tagesliste: Fruehere Tage zugeklappt UEBER heute - der heutige Tag
   steht so ohne Scrollen direkt unter Banner und Statuszeile. Eigene
   Knopfklasse: width/margin der globalen button-Regel zuruecksetzen. */
.thw-frueher-knopf {
  display: block; width: calc(100% - 28px); min-height: 44px;
  margin: 10px 14px; padding: 10px 14px;
  background: #F9FAFB; color: #374151;
  border: 1px dashed #CBD5E1; border-radius: 8px;
  font-family: inherit; font-size: 0.9rem; font-weight: 600;
  text-align: left; cursor: pointer;
}
.thw-frueher-knopf:active { background: #F3F4F6; }
.thw-frueher-hinweis {
  margin: 4px 14px 0; font-size: 0.85rem; color: #4B5563; line-height: 1.4;
}

/* --- Tagesliste + Halte --- */
.thw-tag-card, .thw-halt {
  position: relative;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-left: 4px solid #CBD5E1;
  padding: 12px 14px;
  margin: 10px 14px;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.thw-tag-card.thw-heute { border-left-color: #16A34A; background: #F0FDF4; }
/* Feiertag (NRW): Flaeche hell rot (gewinnt gegen das Gruen von
   "heute"), Name in einer eigenen Zeile unter dem Datum - nicht als
   Pille, die rote Pille heisst hier "storniert". Der gruene Balken
   links bleibt am heutigen Tag stehen. */
.thw-tag-card.thw-feiertag {
  background: #FEE2E2; border-color: #FCA5A5; border-left-color: #B91C1C;
}
.thw-tag-card.thw-heute.thw-feiertag { border-left-color: #16A34A; }
.thw-feiertag-zeile {
  margin-top: 3px; font-size: 0.85rem; font-weight: 700; color: #B91C1C;
}
.thw-halt-zeit {
  font-weight: 700; font-size: 1rem; color: #111827;
  display: inline-block; min-width: 4.6em;
}
.thw-halt-name { font-weight: 700; font-size: 1rem; color: #111827; }
/* Planzeit unter der fortlaufenden Tourzeit (ab 0.7.0.458) - nur,
   wenn sich die Tour verschoben hat; klein und grau, die grosse
   Zeile ist die, nach der die Kraft faehrt. */
.thw-halt-plan { margin-top: 2px; font-size: 0.8rem; color: #6B7280; }
.ta-halt .thw-halt-plan { flex: none; margin-top: 0; white-space: nowrap; }
.thw-halt-adresse {
  margin-top: 4px; font-size: 0.85rem; color: #4B5563; line-height: 1.35;
}
.thw-halt-adresse a { color: #1D4ED8; text-decoration: none; }
.thw-zustand {
  display: inline-block; margin-top: 8px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 0.74rem; font-weight: 700; letter-spacing: .02em;
  background: #F3F4F6; color: #4B5563;
}
.thw-zustand.thw-z-offen { background: #F3F4F6; color: #4B5563; }
.thw-zustand.thw-z-laeuft { background: #DBEAFE; color: #1D4ED8; }
.thw-zustand.thw-z-erfasst { background: #D1FAE5; color: #047857; }
.thw-zustand.thw-z-storno { background: #FEE2E2; color: #991B1B; }
/* Erledigt, aber ohne Unterschrift: orange #FB923C wie in der
   Tourenplanung (TOUR_APP_KONZEPT 4.5) - als Rand, damit der Text auf
   dem hellen Grund lesbar bleibt. */
.thw-zustand.thw-z-ohne {
  background: #FFEDD5; color: #9A3412; box-shadow: inset 0 0 0 1px #FB923C;
}
.thw-zustand.thw-z-info { background: #E5E7EB; color: #4B5563; }

/* --- Alle Touren (ab 0.6.13.839): nur ansehen ---
   Karten und Status-Pillen sind die der Tour (thw-*), damit Farben und
   Worte dieselben sind wie auf dem Handy draussen. Neu ist nur die
   Gliederung: Bereich -> Tour (antippen = Kunden aufklappen). */
.ta-datum {
  margin: 12px 14px 0; font-weight: 700; font-size: 0.95rem; color: #1F2937;
}
.ta-bereich { margin-top: 14px; }
.ta-bereich-titel {
  margin: 0 14px; font-size: 1.05rem; font-weight: 800; color: #111827;
}
.ta-hinweis {
  margin: 6px 14px 0; font-size: 0.85rem; line-height: 1.4;
}
.ta-tour { cursor: pointer; }
.ta-tour.ta-laeuft { border-left-color: #1D4ED8; }
.ta-tour-kopf {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 10px;
}
.ta-pfeil { color: #6B7280; font-size: 1.15rem; line-height: 1; }
.ta-wo { color: #1D4ED8; font-weight: 600; }
/* "🚗 Fährt – 12 Min. (seit 10:20 Uhr)" (ab 0.6.13.888): unterwegs statt
   beim Kunden - in Orangebraun, damit das Büro auf einen Blick sieht,
   wer gerade fährt und wer beim Kunden ist (blau). */
.ta-wo.ta-faehrt { color: #9A3412; }
.ta-halte { margin-top: 10px; border-top: 1px solid #E5E7EB; }
/* Uhrzeit | Name | Status in EINER Zeile: der Name bricht notfalls in
   sich um, die Pille bleibt rechts stehen. */
.ta-halt {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid #F3F4F6;
}
.ta-halt:last-child { border-bottom: none; }
.ta-halt .thw-zustand { margin-top: 0; flex: none; }
.ta-halt-zeit {
  flex: none; white-space: nowrap;
  font-weight: 700; font-size: 0.9rem; color: #111827;
}
.ta-halt-name {
  flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere;
  font-size: 0.92rem; color: #1F2937;
}
.ta-halt-info .ta-halt-zeit,
.ta-halt-info .ta-halt-name { color: #4B5563; font-weight: 600; }
/* Feiertag (NRW) im Tagesschalter: rote Schrift, die Flaeche bleibt
   die des Schalters (rote Flaeche hiesse hier "abgesagt"). */
.aufg-tab.ta-feiertag { color: #B91C1C; }
/* Leistungsart als Chip neben dem Status ("§ 45b") - nur Anzeige,
   gewaehlt wird sie in der Kundenakte. Bewusst neutral: Gelb gibt es
   nur einmal, Gruen/Blau/Rot tragen den Status. */
.thw-art-chip {
  display: inline-block; margin: 8px 0 0 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 0.74rem; font-weight: 700; letter-spacing: .02em;
  background: #FFFFFF; color: #334155; border: 1px solid #CBD5E1;
}
/* HW 4h-Guthaben-Pruefung (ab 0.7.0.143): Chips auf der Halt-Karte.
   Gelb = Pruefung faellig, noch offen; Gruen/Rot = Ergebnis, Farben
   wie die Status-Chips (thw-z-erfasst / thw-z-storno). Betraege in
   Euro zeigt das Handy NICHT (Inhaber-Order). */
.thw-guthaben-chip, .thw-guthaben-ok, .thw-guthaben-ng {
  display: inline-block; margin: 8px 0 0 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 0.74rem; font-weight: 700; letter-spacing: .02em;
}
.thw-guthaben-chip { background: #FDE68A; color: #713F12; }
.thw-guthaben-ok { background: #D1FAE5; color: #047857; }
.thw-guthaben-ng { background: #FEE2E2; color: #991B1B; }
/* Info-Halt (Freitext-Zelle wie "Büro"): grau, flach, nicht antippbar. */
.thw-halt.thw-info {
  background: #F3F4F6; border-color: #E5E7EB; border-left-color: #D1D5DB;
  box-shadow: none; padding: 9px 14px;
}
/* #4B5563 statt #6B7280: Die Zeile traegt Uhrzeiten, nach denen die
   Kraft ihren Tag plant - 6,9:1 auf #F3F4F6 (vorher 4,39:1, unter AA).
   Grau bleibt grau (Entscheidung 11), nur dunkler. */
.thw-info-zeile { font-size: 0.9rem; font-weight: 600; color: #4B5563; }
/* Doku: Leistungsart als Text, Pflichttext mit Zaehler. */
.thw-art-zeile {
  margin: 0; font-size: 0.95rem; font-weight: 600; color: #1F2937;
}
.thw-text-fuss {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 10px; margin-top: 5px;
}
.thw-tipp { font-size: 0.8rem; color: #6B7280; line-height: 1.35; }
.thw-zaehler {
  font-size: 0.8rem; font-weight: 700; color: #B45309; white-space: nowrap;
}
.thw-zaehler.thw-zaehler-ok { color: #047857; }
/* Einsatz: fuer einen frueheren Monat fehlt noch die Unterschrift. */
.thw-vormonat {
  margin-top: 10px; padding: 8px 10px; border-radius: 8px;
  background: #FFEDD5; border: 1px solid #FB923C; color: #9A3412;
  font-size: 0.85rem; font-weight: 600; line-height: 1.4;
}
/* HW 4h-Guthaben-Pruefung (ab 0.7.0.143): Box im Doku-Schritt -
   je Leistungsart eine Zeile mit Radio (vorhanden / nicht
   vorhanden) und bei "nicht vorhanden" einem Pflicht-Grundfeld.
   Stile wie die Massnahmen-Zeilen und thw-feld; Betraege in Euro
   gibt es hier nicht (Inhaber-Order). */
.thw-doku-guthaben { margin-top: 2px; }
.thw-doku-guthaben-zeile {
  border: 1px solid #E5E7EB; border-radius: 10px;
  padding: 10px 12px; margin-bottom: 8px; background: #FFFFFF;
}
.thw-doku-guthaben-zeile.thw-fehlt {
  border-color: #DC2626; background: #FEF2F2;
}
.thw-doku-guthaben-label {
  display: block; margin-bottom: 5px;
  font-weight: 700; font-size: 0.9rem; color: #374151;
}
.thw-guthaben-radios { display: flex; gap: 18px; flex-wrap: wrap; }
.thw-guthaben-radio {
  display: flex; align-items: center; gap: 7px; cursor: pointer;
  font-size: 0.95rem; color: #1F2937;
}
.thw-guthaben-radio input[type="radio"] {
  width: 22px; height: 22px; margin: 0; flex: none;
}
.thw-guthaben-grund { margin-top: 8px; }
/* Besonderheiten aus der HW-Kundenakte (Nachentscheidung 09.10.2026),
   am Halt und im Einsatz unter der Termin-Notiz. Eigene Flaeche, damit
   der Kontrast nicht von der Karte abhaengt (weiss, "naechster",
   "laeuft", erledigt): #1F2937 auf #F1F5F9 = 13,4:1. Bewusst neutral
   (Schiefer): Gelb gibt es nur einmal, Gruen/Blau/Rot/Orange tragen
   Status und fehlende Unterschrift. Das runde "i" ist gezeichnet, kein
   Emoji - es sieht auf jedem Handy gleich aus. Lange Texte werden
   umbrochen (auch ein einzelnes langes Wort), nie abgeschnitten;
   Zeilenumbrueche aus der Akte bleiben stehen. */
.thw-besonderheit {
  display: flex; align-items: flex-start; gap: 8px;
  margin-top: 6px; padding: 7px 10px;
  border-radius: 8px; background: #F1F5F9;
  border: 1px solid #CBD5E1; border-left: 4px solid #475569;
  color: #1F2937; font-size: 0.88rem; font-weight: 400; line-height: 1.4;
  text-align: left;
}
.thw-besonderheit-sym {
  flex: none; display: inline-block;
  width: 1.35em; height: 1.35em; margin-top: 0.05em;
  border-radius: 50%; background: #475569; color: #FFFFFF;
  font-size: 0.8rem; font-weight: 800; font-style: normal;
  line-height: 1.35em; text-align: center;
}
.thw-besonderheit-text {
  flex: 1 1 auto; min-width: 0;
  white-space: pre-line; overflow-wrap: anywhere; word-break: break-word;
}
.thw-besonderheit-text b { font-weight: 700; color: #111827; }
/* Der naechste laut Plan - der einzige Halt, der ins Auge springt. */
.thw-halt.thw-naechster {
  border-left-color: #FFC107;
  background: #FFFBEB;
  box-shadow: 0 2px 8px rgba(245,158,11,0.25);
}
.thw-halt.thw-laeuft-jetzt {
  border-left-color: #2563EB; background: #EFF6FF;
}
/* Erledigtes tritt zurueck, OHNE die Status-Chips zu blassen: grau
   werden nur Flaeche, Rahmen, Zeit, Name und Adresse. Eine opacity auf
   der ganzen Karte nahm auch "erledigt · Unterschrift fehlt" den
   Kontrast (2,9:1 statt 6,4:1) - und ein Kind kann sie nicht aufheben.
   Name/Zeit 7,2:1, Adresse 4,6:1 auf #F9FAFB. Die Beratungs-Tour
   (.tb-halt) regelt ihre Darstellung selbst (Regel darunter, gehoert
   der Beratungs-Sitzung) - die HW-Regeln treffen sie nicht. */
.thw-halt.thw-fertig:not(.tb-halt) {
  background: #F9FAFB; border-left-color: #E5E7EB; box-shadow: none;
}
.thw-halt.thw-fertig:not(.tb-halt) .thw-halt-zeit,
.thw-halt.thw-fertig:not(.tb-halt) .thw-halt-name { color: #4B5563; }
.thw-halt.thw-fertig:not(.tb-halt) .thw-halt-adresse,
.thw-halt.thw-fertig:not(.tb-halt) .thw-nr { color: #6B7280; }
/* Beratungs-Tour: dieselbe Zuruecknahme ohne opacity - die Chips
   ("✓ Nachweis erstellt", "Nicht angetroffen · 📷") behalten vollen
   Kontrast. */
.thw-halt.tb-halt.thw-fertig {
  background: #F9FAFB; border-left-color: #E5E7EB; box-shadow: none;
}
.thw-halt.tb-halt.thw-fertig .thw-halt-zeit,
.thw-halt.tb-halt.thw-fertig .thw-halt-name { color: #4B5563; }
.thw-halt.tb-halt.thw-fertig .thw-halt-adresse,
.thw-halt.tb-halt.thw-fertig .thw-nr { color: #6B7280; }
.thw-halt-aktionen {
  display: flex; flex-direction: column; gap: 8px;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px dashed #E5E7EB;
}
.thw-nr {
  display: inline-block; min-width: 1.6em;
  color: #475569; font-weight: 700; font-size: 0.8rem;
}

/* --- Laufender Einsatz: die Uhr --- */
.thw-uhr-box {
  margin: 6px 0 18px; padding: 22px 14px;
  border-radius: 14px; background: #ECFDF5; border: 1px solid #A7F3D0;
  text-align: center;
}
.thw-uhr {
  font-size: 2.9rem; font-weight: 800; line-height: 1.1;
  color: #065F46; font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}

/* --- Massnahmen abhaken --- */
.thw-mass {
  border: 1px solid #E5E7EB; border-radius: 10px;
  padding: 10px 12px; margin-bottom: 8px; background: #FFFFFF;
}
.thw-mass.thw-getan { background: #F0FDF4; border-color: #BBF7D0; }
.thw-mass.thw-offen { background: #FFFBEB; border-color: #FDE68A; }
.thw-mass-kopf {
  display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
}
.thw-mass-kopf input[type="checkbox"] {
  width: 24px; height: 24px; margin: 1px 0 0; flex: 0 0 24px;
}
.thw-mass-text {
  font-size: 0.95rem; line-height: 1.35; color: #1F2937; font-weight: 600;
}
/* display:block ist Pflicht - inline klebte der Hinweis ohne Abstand
   direkt an der Massnahme ("Wohnung reinigenwöchentlich"). */
.thw-mass-hinweis {
  display: block;
  font-size: 0.78rem; color: #6B7280; margin-top: 3px; font-weight: 400;
}
.thw-mass-grund { margin-top: 8px; }
.thw-mass-weg {
  background: transparent; border: none; color: #B91C1C;
  font-size: 0.8rem; font-weight: 700; cursor: pointer; padding: 4px 0 0;
  font-family: inherit;
}
.thw-katalog {
  margin-top: 10px; padding: 12px;
  border: 1px solid #E5E7EB; border-radius: 10px; background: #F9FAFB;
}
.thw-kat-item {
  padding: 10px 12px; margin-top: 8px; background: #FFFFFF;
  border: 1px solid #E5E7EB; border-radius: 8px;
  font-size: 0.92rem; cursor: pointer;
}
.thw-kat-item:active { background: #FEF3C7; }
.thw-eigen { display: flex; gap: 8px; margin-top: 10px; }
.thw-eigen .thw-feld { flex: 1; }
.thw-eigen .thw-btn-sek { width: auto; white-space: nowrap; }

/* --- Unterschrift: Umfang + Rolle + Feld --- */
.thw-umfang {
  border: 1px solid #E5E7EB; border-radius: 10px; overflow: hidden;
}
.thw-umfang-zeile {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 9px 12px; border-bottom: 1px solid #F3F4F6;
  font-size: 0.88rem;
}
.thw-umfang-zeile:last-child { border-bottom: none; }
.thw-umfang-links { min-width: 0; }
.thw-umfang-datum { font-weight: 700; color: #111827; }
.thw-umfang-was { color: #4B5563; font-size: 0.82rem; margin-top: 2px; }
.thw-umfang-rechts { text-align: right; white-space: nowrap; }
.thw-umfang-summe {
  display: flex; justify-content: space-between;
  padding: 11px 12px; background: #F9FAFB;
  font-weight: 800; font-size: 0.95rem; color: #111827;
}
.thw-rollen { display: flex; gap: 10px; }
.thw-rolle {
  flex: 1; padding: 12px 8px;
  background: #FFFFFF; border: 2px solid #CBD5E1; border-radius: 10px;
  font-family: inherit; font-size: 0.95rem; font-weight: 700;
  color: #4B5563; cursor: pointer;
}
.thw-rolle.thw-aktiv {
  border-color: #F59E0B; background: #FFFBEB; color: #92400E;
}
.thw-canvas {
  width: 100%; height: 190px; display: block;
  border: 1px solid #CBD5E1; border-radius: 10px;
  background: #FFFFFF; touch-action: none;
}
/* Ab .128 (Inhaber 31.10.2026): Unterschriftenfeld auf eigener Seite -
   grosse Zeichenflaeche (screen-tourhw-sign-feld). */
.thw-canvas-gross { height: 46vh; min-height: 340px; border-width: 2px; }
/* Ab .130 (Inhaber 31.10.2026): Feld-Screen ohne Scrollen - die
   Knoepfe stehen IMMER unten im Screen, das Zeichenfeld bekommt die
   gesamte Hoehe dazwischen (grosser als 46 vh). */
.thw-feld-body { overflow: hidden; display: flex; flex-direction: column; }
/* Ab 0.7.0.453: Seitlicher Abstand zum Bildschirmrand. Dort liegen auf
   Samsung die Wischgesten (Zurueck an den Seiten, Startseite unten) -
   ein Strich, der am Rand beginnt, loeste sie aus und brach die
   Unterschrift ab. Im Querformat auch die Kamera-Aussparung. */
#screen-tourhw-sign-feld .thw-feld-body {
  padding-left: max(28px, env(safe-area-inset-left));
  padding-right: max(28px, env(safe-area-inset-right));
}
/* Auf dem ganzen Blatt kein Scrollen, Zoomen oder Zurueckziehen - ein
   aufgelegter Handballen plus Finger war sonst ein Zoom. Tippen auf
   Knoepfe bleibt unberuehrt (touch-action betrifft nur Gesten). */
#screen-tourhw-sign-feld { touch-action: none; overscroll-behavior: none; }
/* Ab 0.7.0.453: Platz fuers Zeichnen. Im Querformat ist das Blatt nur
   so hoch wie das Handy breit (~375 px); Kopfzeile 61, zwei Textzeilen,
   Innenabstand 40 und Knopf 76 px liessen dem Feld 120 px (~3 cm).
   Kompakter: flache Kopfzeile, eine Infozeile, Hinweis im Feld,
   knappe Abstaende -> rund doppelt so hoch. */
#screen-tourhw-sign-feld .chat-header {
  padding-top: 2px !important; padding-bottom: 2px !important;
}
#screen-tourhw-sign-feld .thw-feld-body { padding-top: 6px; padding-bottom: 8px; }
/* Name · Rolle in der Kopfzeile (statt eigener Zeile ueber dem Feld). */
.thw-sign-kopf {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0;
}
.thw-sign-wer:empty { display: none; }
.thw-sign-wer::before { content: " · "; font-weight: 400; }
/* Feld LINKS, Knopf + Meldung RECHTS daneben: Im Querformat ist die
   Hoehe knapp, die Breite reichlich - so bekommt das Feld fast die
   ganze Hoehe des Blatts. */
#screen-tourhw-sign-feld .thw-feld-inhalt { flex-direction: row; gap: 14px; }
.thw-sign-seite {
  flex: 0 0 118px; display: flex; flex-direction: column;
  justify-content: flex-end; min-height: 0; overflow: hidden;
}
#screen-tourhw-sign-feld #tourhw-sign-feld-msg {
  margin: 0 0 8px; font-size: 0.78rem; line-height: 1.3;
  overflow: auto; min-height: 0;
}
#screen-tourhw-sign-feld #tourhw-sign-feld-msg:empty { display: none; }
#screen-tourhw-sign-feld #btn-tourhw-sign-save {
  margin: 0; flex: 1 1 auto; max-height: 160px; min-height: 64px;
  padding: 10px 8px; line-height: 1.25; white-space: normal;
  /* Die Pillen-Rundung der .primary-Knoepfe macht aus dem hohen
     Knopf ein Oval - hier wie eine Karte. */
  border-radius: 14px;
}
.thw-canvas-wrapp {
  position: relative; display: flex; flex-direction: column;
  flex: 1; min-height: 0; min-width: 0;
}
.thw-canvas-wrapp .thw-canvas-gross { flex: 1 1 0; height: auto; }
/* Unterschriftslinie mit X - nur Anzeige, nicht im gespeicherten Bild. */
.thw-sign-linie {
  position: absolute; left: 22px; right: 22px; bottom: 28%;
  border-bottom: 2px dashed #CBD5E1; pointer-events: none;
}
.thw-sign-linie b {
  position: absolute; left: 0; bottom: 2px; font-size: 1.3rem;
  color: #94A3B8; font-weight: 700; line-height: 1;
}
.thw-sign-text {
  position: absolute; left: 0; right: 0; bottom: calc(28% - 22px);
  text-align: center; font-size: 0.8rem; color: #94A3B8;
  pointer-events: none;
}
/* Drehknopf nur, solange das Blatt per CSS gedreht ist (Hochformat-
   Viewport); im echten Querformat dreht Android selbst. */
.chat-header .hdr-btn.thw-drehen-btn { display: none; }
.thw-feld-body .thw-canvas-gross { flex: 1; min-height: 120px; }
/* Ab 0.7.0.391 (Inhaber 05.11.2026): Unterschrift IMMER im
   Querformat - das Blatt (.thw-quer-blatt) wird IM Hochformat-
   Viewport per CSS 90° gedreht: Der Browser dreht sich nie, die
   Samsung-Drehungssperre wird dadurch egal, und das Canvas laeuft
   nicht neu auf (Transform aendert kein Layout = kein Resize,
   keine Freeze). Die Hinweisleiste ist statisch (oben, wird nicht
   mitgedreht); im nativen Querformat (iPhone dreht mit) ist das
   Blatt 1:1 ohne Drehung. Ersetzt: Querbox-Hinweis (.134) und die
   Android-Hochformat-Ausnahme (.158/.180, Body-Klasse thw-android). */
.thw-quer-hinweis { display: none; }
.thw-quer-wrapp {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.thw-quer-blatt {
  display: flex; flex-direction: column; width: 100%; height: 100%;
  background: #FFFFFF;
  /* flex: none ist WICHTIG: Im Hochformat-Viewport ist das Blatt
     (100dvh breit) breiter als der Flex-Container - ohne flex: none
     wuerde der Container es auf die Viewport-Breite ZUSAMMENDRUECKEN
     und das gedrehte Blaett wuerde den Screen nicht fuellen. */
  flex: none;
}
.thw-feld-inhalt { display: flex; flex-direction: column; flex: 1; min-height: 0; }
@media (orientation: portrait) {
  .thw-quer-hinweis {
    position: absolute; top: 0; left: 0; right: 0; z-index: 20;
    height: 36px; display: flex; align-items: center; justify-content: center;
    gap: 8px; background: #FFFBEB; border-bottom: 1px solid #FCD34D;
    color: #92400E; font-size: 12.5px; font-weight: 700; text-align: center;
  }
  .thw-quer-wrapp { top: 36px; }
  /* Blatt = Viewport minus Leiste, um 90° gedreht: es FUELLT exakt
     den restlichen Screen (seine Breite wird die Screen-Hoehe). */
  .thw-quer-blatt {
    width: calc(100dvh - 36px); height: 100dvw;
    transform: rotate(90deg);
  }
  /* Das Blatt steht seitlich: die Safe-Area-Padding-Logik der
     Kopfzeile (env safe-area-inset-top) greift am falschen Rand -
     flaches Padding. */
  .thw-quer-blatt .chat-header { padding-top: 10px; }
  /* Ab 0.7.0.431: Quer-Spiegelung (Klasse thw-quer-spiegel auf dem
     Screen, thwQuerSensor in app.js): liegt das Handy mit dem Kopf
     nach RECHTS quer, steht das per +90 grad gedrehte Blatt
     kopfueber - Button oben, Text unlesbar. Die Klasse dreht es in
     die andere Richtung (-90), dann ist es in JEDE Querlage
     richtig. Die Touch-Umrechnung kennt die zweite Richtung
     (thwSignPunkt). */
  .thw-quer-spiegel .thw-quer-blatt { transform: rotate(-90deg); }
  .chat-header .hdr-btn.thw-drehen-btn {
    display: inline-flex; color: #B45309; font-size: 1.6rem;
  }
}
@media (orientation: landscape) {
  /* Querformat ist kurz: das Feld darf mehr aufgeben, damit die
     Knoepfe sicher im Screen bleiben. */
  .thw-feld-body .thw-canvas-gross { min-height: 80px; }
}
.thw-warnung {
  margin: 10px 0 0; font-size: 0.8rem; line-height: 1.4;
  color: #991B1B; font-weight: 600;
}

/* --- Tour beenden: offene Halte begruenden --- */
.thw-offen-karte {
  border: 1px solid #FDE68A; background: #FFFBEB;
  border-radius: 10px; padding: 12px; margin-bottom: 10px;
}
.thw-offen-titel { font-weight: 700; font-size: 0.95rem; color: #92400E; }

/* ===== Globales Offline-Banner ===== */
/* Fixiert am unteren Rand, damit es in JEDEM Bereich zu sehen ist - auch
   in den bildschirmfuellenden Chat-Screens (die sind position:fixed und
   wuerden ein Banner im Seitenfluss verdecken).
   UNTEN und nicht oben: Oben sitzt die Kopfzeile mit dem Zurueck-Knopf
   (.chat-header, sticky, z-index 10) - die darf nichts ueberdecken.
   z-index 9500 liegt knapp UNTER dem Upload-Overlay (9999) und dem
   Boot-Ladescreen (10000). Das sind Vollbild-Zustaende, in denen ohnehin
   nichts zu bedienen ist; ueber allem anderen liegt das Banner. */
.offline-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 9500;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
  background: #78350F;
  color: #FEF3C7;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.18);
}
.offline-banner.hidden { display: none !important; }
.offline-banner-icon { flex: 0 0 auto; font-size: 1rem; }
.offline-banner-text { flex: 1 1 auto; min-width: 0; }
/* Antippbar (ab 0.6.13.831): oeffnet die Uebersicht "Offline & Übertragung". */
.offline-banner { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.offline-banner-pfeil { flex: 0 0 auto; font-size: 1.2rem; opacity: 0.8; }
/* Netz da, aber Gespeichertes wartet noch: ruhiger Ton derselben Familie. */
.offline-banner.offline-banner-wartet { background: #1E3A5F; color: #E0ECFA; }
/* Vom Server abgelehnt: braucht eine Entscheidung des Mitarbeiters. */
.offline-banner.offline-banner-fehler { background: #7F1D1D; color: #FEE2E2; }

/* ===== Einstellungen → Offline & Übertragung (ab 0.6.13.831) =====
   Reine Anzeige - keine Knoepfe (Vorgabe des Inhabers 09.10.2026). */
#off-liste { padding: 0 14px 6px; }
.off-eintrag {
  border: 1px solid #E5E7EB; border-radius: 10px;
  padding: 10px 12px; margin-bottom: 10px; background: #F8FAFC;
}
.off-eintrag.off-fehler { border-color: #FECACA; background: #FEF2F2; }
.off-titel { font-weight: 700; font-size: 0.95rem; color: #1F2937; }
.off-zeit { font-size: 0.8rem; color: #6B7280; margin-top: 2px; }
.off-grund { font-size: 0.85rem; color: #B91C1C; margin-top: 6px; }
/* Wischen nach links zum Verwerfen (ab 0.7.0.123, Inhaber 28.10.2026):
   jede .off-eintrag steht in einer .off-row, dahinter liegt der rote
   "Verwerfen"-Knopf. Wischen nach links verschiebt die Karte und
   enthüllt den Knopf, Tippen löscht den Eintrag aus der Warteschlange. */
.off-hinweis { margin: 2px 0 10px; padding: 8px 12px; font-size: 0.78rem;
               color: #92400E; background: #FFFBEB; border-radius: 10px; }
.off-row { position: relative; overflow: hidden; margin-bottom: 10px;
           border-radius: 10px;
           transition: height 0.24s ease, margin 0.24s ease, opacity 0.2s ease; }
.off-row .off-eintrag { position: relative; z-index: 1; margin-bottom: 0;
                        transition: transform 0.2s ease; will-change: transform; }
.off-row .off-eintrag.swiped { transform: translateX(-96px); }
.off-row .off-verwerfen { position: absolute; top: 0; right: 0; bottom: 0;
                          left: auto; z-index: 0; width: 96px; margin: 0;
                          padding: 0; min-height: 0; display: block;
                          border: 0; background: #9B1C1C; color: #fff;
                          font-size: 0.82rem; font-weight: 600;
                          border-radius: 0 10px 10px 0; }

/* Wartender Eintrag oben in einer Liste (postausgangKartenEinfuegen). */
.pa-karte {
  display: flex; flex-direction: column; gap: 2px;
  margin: 8px 14px; padding: 10px 12px;
  border: 1px dashed #93C5FD; border-radius: 10px;
  background: #EFF6FF; color: #1E3A5F;
}
.pa-karte-titel { font-weight: 700; font-size: 0.95rem;
                  white-space: pre-wrap; word-break: break-word; }
.pa-karte-sub { font-size: 0.8rem; color: #475569; }
/* Ohne Netz geschriebene Chat-Nachricht (chatWartendeZeigen). */
.chat-bubble.pa-blase { opacity: 0.75; border: 1px dashed #93C5FD; }
.pa-blase-info { display: block; margin-top: 4px; font-size: 0.72rem;
                 color: #475569; }

/* Platz schaffen, damit das Banner nichts verdeckt. Die Klasse
   'offline-an' setzt app.js am <body>, solange kein Netz da ist; die
   Variable --offline-bar traegt die GEMESSENE Bannerhoehe (der Text
   bricht auf schmalen Geraeten um - geraten waere sie mal zu klein,
   mal zu gross). Siehe offlineBannerZeichnen() in app.js. */
:root { --offline-bar: 0px; }
body.offline-an .screen:not(.chat-screen) {
  /* Grundwert der Regel .screen ist 80px - hier kommt das Banner drauf.
     ':not(.chat-screen)' ist PFLICHT, nicht Kosmetik: Die Vollbild-
     Bereiche tragen BEIDE Klassen (class="screen chat-screen"), und
     'body.offline-an .screen' (Spezifitaet 0-2-1) schlaegt '.chat-screen'
     (0-1-0). Ohne den Ausschluss bekaemen sie 80px+Banner Innenabstand
     ZUSAETZLICH zur gekuerzten Hoehe unten - doppelt abgezogen, und die
     Chat-Eingabezeile rutschte aus dem Bild. */
  padding-bottom: calc(80px + var(--offline-bar));
}
body.offline-an .chat-screen {
  /* Bildschirmfuellend und fix: muss KUERZER werden, sonst laege die
     Eingabezeile (#chat-input-row, letztes Flex-Kind) unter dem Banner. */
  height: calc(100vh - var(--offline-bar));
  height: calc(100dvh - var(--offline-bar));
}

/* ---- Rueckfrage vor dem Abhaken einer Verordnung -------------------
   Uebernimmt Hintergrund, Rundung und Schatten vom Upload-Overlay,
   damit sich die App nicht in jedem Bereich anders anfuehlt. Die Farben
   sind dieselben wie auf den Verordnungs-Karten: Bernstein als Rahmen
   des Vorgangs, Gruen fuer den bestaetigenden Knopf. */
.vo-frage {
  position: fixed;
  inset: 0;
  z-index: 10001;                 /* ueber Upload-Overlay (9999) */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(17, 24, 39, 0.72);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.vo-frage.hidden { display: none; }
.vo-frage-box {
  width: 100%;
  max-width: 340px;
  padding: 24px 22px 20px;
  text-align: center;
  background: #fff;
  border-radius: 16px;
  /* Der fruehere border-top: 5px solid #F59E0B ist entfallen. Ein
     farbiger Balken quer ueber den Kopf eines Dialogs ist ein Muster
     aus der Zeit vor den heutigen Systemdialogen - weder iOS noch
     Material kennen es. Die Zugehoerigkeit zur App tragen Kopfbereich
     und Symbol, nicht ein Streifen. */
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.vo-frage-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #ECFDF5;
  color: #16A34A;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}
.vo-frage-titel {
  margin-top: 14px;
  font-size: 18px;
  font-weight: 700;
  color: #111;
}
.vo-frage-text {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.45;
  color: #475569;
}
.vo-frage-knoepfe {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.vo-frage-btn {
  flex: 1 1 0;
  /* margin:0 hebt die globale button-Regel (margin: 14px 0) auf. Ohne
     das stehen ueber der Knopfzeile 34 px Luft (20 aus
     .vo-frage-knoepfe + 14 aus der globalen Regel) und darunter noch
     einmal 14 px, die niemand gesetzt hat - der Kasten sah unten
     ausgefranst aus. */
  margin: 0;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
}
.vo-frage-nein {
  border: 1px solid #CBD5E1;
  background: #fff;
  color: #334155;
}
.vo-frage-ja {
  border: none;
  background: #16A34A;
  color: #fff;
}
/* Tonart des Symbolkreises. Gruen (Vorgabe oben) = etwas abhaken,
   Bernstein = eine Zahlung bestaetigen. Es sind dieselben Farben, in
   denen die zugehoerige Karte den offenen Vorgang anzeigt - der Dialog
   soll erkennbar zu der Karte gehoeren, aus der er aufgeht. */
.vo-frage-icon.ton-gelb {
  background: #FEF3C7;
  color: #B45309;
}
/* Hervorgehobene Zeile zwischen Titel und Text: worum es geht. Beim
   Verwarngeld ist das der Betrag - er gehoert gross und allein
   hierher, nicht mitten in einen Fliesstext, in dem man ihn suchen
   muss. Ohne Inhalt traegt die Zeile .hidden und ist ganz weg, sonst
   klaffte im Verordnungs-Dialog ein leerer Kasten. */
.vo-frage-detail {
  margin-top: 14px;
  padding: 11px 14px;
  border-radius: 12px;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
}
/* Ab .137 (Inhaber 31.10.2026): Vorschau der Unterschrift in der
   Speicher-Abfrage (appFrage-Detail, gelber Kasten) - das Bild steht
   auf Weiss wie das Zeichenfeld selbst, darunter Name und Rolle. */
.thw-sign-prev {
  display: inline-flex; flex-direction: column; align-items: center;
  gap: 4px; padding: 10px 16px; background: #FFFFFF;
  border: 1px solid #E5E7EB; border-radius: 10px; max-width: 100%;
}
.thw-sign-prev img { max-width: 100%; max-height: 72px; width: auto; height: auto; }
.thw-sign-prev span { font-size: 0.85rem; font-weight: 700; color: #92400E; }
.vo-frage-betrag {
  display: block;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
  color: #92400E;
}
.vo-frage-frist {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  font-weight: 600;
  color: #B45309;
}

/* Ab 0.7.0.431: Die Ruckfragen (appFrage, #vo-frage) sind
   Viewport-Overlays und stehen deshalb IM gedrehten
   Unterschrift-Blatt seitwaerts - unlesbar, Button nicht zu tippen
   (Inhaber 11.11.2026, Samsung). Solange der Unterschrift-Screen
   sichtbar ist (Hochformat-Viewport = gedrehtes Blatt), drehen sie
   sich mit dem Blatt - in JEDE Querlage passend zur aktuellen
   Spiegelung. max-width 320: nach der Drehung wird daraus die
   Hohe, die ins 390 px enge Viewport-Band muss. :has() = Chrome
   105+ (Samsung-Chrome 155/156). */
@media (orientation: portrait) {
  body:has(#screen-tourhw-sign-feld:not(.hidden)) .vo-frage-box {
    transform: rotate(90deg);
    max-width: 320px;
  }
  body:has(#screen-tourhw-sign-feld.thw-quer-spiegel:not(.hidden)) .vo-frage-box {
    transform: rotate(-90deg);
  }
}
/* Ab 0.7.0.453: Die Rueckfrage auf dem Unterschrift-Blatt war HOEHER
   als das Querformat (ca. 420 px bei 375 px Handybreite) - der Knopf
   "Ja, speichern" ragte aus dem Bildschirm und war auf schmalen
   Samsung-Handys nicht zu treffen. Auf dem Blatt deshalb breit und
   flach: Knopf-Zeile immer sichtbar, ohne Symbolkreis, kleinere
   Vorschau; reicht es trotzdem nicht, scrollt der Inhalt. */
body:has(#screen-tourhw-sign-feld:not(.hidden)) .vo-frage-box {
  max-width: 470px; padding: 14px 18px 12px;
  display: flex; flex-direction: column;
}
body:has(#screen-tourhw-sign-feld:not(.hidden)) .vo-frage-icon { display: none; }
body:has(#screen-tourhw-sign-feld:not(.hidden)) .vo-frage-titel { margin-top: 0; }
body:has(#screen-tourhw-sign-feld:not(.hidden)) .vo-frage-detail {
  margin-top: 8px; padding: 6px 10px;
}
body:has(#screen-tourhw-sign-feld:not(.hidden)) .thw-sign-prev img { max-height: 54px; }
body:has(#screen-tourhw-sign-feld:not(.hidden)) .vo-frage-text {
  margin-top: 6px; font-size: 14px; line-height: 1.35;
}
body:has(#screen-tourhw-sign-feld:not(.hidden)) .vo-frage-knoepfe { margin-top: 10px; }
@media (orientation: portrait) {
  /* Gedreht: die Hoehe der Box wird zur Bildschirmbreite. */
  body:has(#screen-tourhw-sign-feld:not(.hidden)) .vo-frage-box {
    /* width statt max-width: Die Box ist breiter als der Hochformat-
       Viewport (sie liegt ja quer) - width:100% hielte sie schmal. */
    width: min(470px, calc(100vh - 60px)); max-width: none; flex: none;
    max-height: calc(100vw - 16px); overflow: auto;
  }
  body:has(#screen-tourhw-sign-feld:not(.hidden)) .vo-frage { padding: 8px; }
}
@media (orientation: landscape) {
  body:has(#screen-tourhw-sign-feld:not(.hidden)) .vo-frage-box {
    max-height: calc(100vh - 16px); overflow: auto;
  }
  body:has(#screen-tourhw-sign-feld:not(.hidden)) .vo-frage { padding: 8px; }
}

/* ============================================================
   Wunschfrei - Monatskalender des Mitarbeiters.

   Der Kalender ist die Bedienung, nicht nur eine Anzeige: der
   Mitarbeiter tippt den Tag an, den er frei haben moechte. Deshalb
   sind die Zellen bewusst gross (min. 44 px, die uebliche
   Fingerbreite) statt platzsparend - lieber scrollt man ein Stueck,
   als daneben zu tippen.

   Farben folgen dem Programm: rot = gewuenscht, gruen = genehmigt,
   grau = abgelehnt. Das Dienst-Wochenende ist KEINE Statusfarbe,
   sondern ein Rahmen - sonst kaeme es mit dem Status durcheinander.
   ============================================================ */
/* ACHTUNG: die globale Regel weiter oben gibt JEDEM <button>
   'display:block; width:100%; margin:14px 0'. Ohne das hier
   ausdrücklich aufzuheben, träge jede Kalenderzelle 28 px
   Aussenabstand - das Raster fiele auseinander. Deshalb setzt
   .wf-tag width/margin ausdrücklich zurück. Die Monatswahl braucht
   das nicht mehr selbst: sie ist eine .aufg-tabs-Leiste geworden,
   und .aufg-tab nimmt die globale Regel bereits zurück. */

/* --- Monatswahl: dieselbe Reiterleiste wie im Rest der App ---------
   Vorher standen hier freistehende Pillen mit schwarz gefüllter
   Auswahl (#0F172A) - die einzige Stelle der PWA, die ihr Menü so
   zeichnete, und damit genau der Bruch, den der Betreiber gesehen
   hat. Jetzt trägt der Behälter .aufg-tabs und jeder Monat
   .aufg-tab: die Monatswahl erbt damit die iOS-Fassung (systemgraue
   Schiene, weisser Regler mit Schlagschatten, haarfeine Teiler) und
   die Android-Fassung (Material-3-Segmentkopf mit Umriss, weichem
   Bernstein und Haken) OHNE eine einzige eigene Zeile dafür.
   Wer die Reiterleisten oben ändert, ändert diese hier mit.

   KEIN Querrollen mehr: zwei Monate sind der Regelfall
   (OFFENE_MONATE = 2), ein dritter Reiter kommt nur dazu, wenn
   zusätzlich ein bereits geschlossener Monat angezeigt wird.
   flex: 1 1 0 aus .aufg-tab teilt die Breite auf - wie in jeder
   anderen Leiste der App. */
/* Solange app.js die Reiter noch nicht geschrieben hat, ist der
   Behälter leer. Ohne diese Regel stünde beim Öffnen des Bereichs
   für einen Wimpernschlag eine leere graue Schiene unter der
   Kopfzeile - die Schiene ist ein ::before und braucht keinen
   Inhalt, um sichtbar zu sein. */
.wf-monate:empty { display: none; }
/* Monatsnamen sind länger als "Meine"/"Anrufe"/"Erteilen": auf einem
   360-px-Gerät bleiben je Reiter rund 130 px, "September 2026"
   braucht davon fast alles. Umbrechen dürfen sie deshalb - die Höhe
   bleibt trotzdem stehen, weil alle Reiter durch flex: 1 1 0 gleich
   breit sind und der Platz des Hakens auch ohne Haken freigehalten
   wird. Es ist also nie NUR EINER, der umbricht. */
.wf-monat-tab { white-space: normal; }

.wf-kopf {
  margin: 8px 14px 4px; padding: 12px 14px; border-radius: 12px;
  background: #ECFDF5; border: 1px solid #A7F3D0;
  font-size: 0.95rem; line-height: 1.45;
}
.wf-kopf.wf-gesperrt { background: #FEF2F2; border-color: #FECACA; }
.wf-kopf b { font-size: 1.05rem; }
.wf-kopf .wf-kopf-zeile { margin-top: 5px; color: #475569; font-size: 0.88rem; }

.wf-kalender { padding: 6px 10px 0; }
.wf-wochentage, .wf-gitter {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
}
.wf-wochentage { margin-bottom: 4px; }
.wf-wt {
  text-align: center; font-size: 0.75rem; font-weight: 700;
  color: #64748B; padding: 2px 0;
}
.wf-tag {
  /* width/margin heben die globale button-Regel auf, siehe oben. */
  width: 100%; margin: 0;
  min-height: 48px; border-radius: 9px; border: 1px solid #E2E8F0;
  background: #fff; padding: 4px 2px 3px;
  display: flex; flex-direction: column; align-items: center;
  justify-content: flex-start; gap: 2px;
  font-size: 0.95rem; color: #0F172A;
}
/* Leerzellen vor dem Monatsersten - kein Rahmen, kein Tippziel. */
.wf-tag.wf-leer { border: none; background: transparent; }
.wf-tag[disabled] { opacity: 1; }          /* Grau kommt ueber wf-aus */
.wf-tag.wf-aus { background: #F8FAFC; color: #64748B; }
.wf-tag.wf-wochenende { background: #F1F5F9; }
/* Feiertag (NRW): helle rote Flaeche, rote Zahl, der Kurzname unten in
   der Zelle - sichtbar, denn einen Tooltip gibt es auf dem Handy
   nicht (der volle Name steht in der Legende). Steht NACH aus/
   Wochenende, gewinnt also gegen deren Grau, aber VOR den
   Statusfarben: ein eigener Wunsch bleibt erkennbar, und Dienst-
   Rahmen und Heute-Ring liegen weiter obenauf. Deutlich heller als
   "gewuenscht" (#FCA5A5) und mit Namen - so verwechselt man ihn
   nicht mit dem eigenen Wunsch. */
.wf-tag.wf-feiertag {
  position: relative;
  background: #FEE2E2; border-color: #FCA5A5;
}
/* Zahl und Kurzname rot - aber nur, solange kein Status die Zelle
   faerbt: dann gilt dessen Schriftfarbe (die Statusregeln setzen sie
   am Knopf). Bewusst NICHT am Knopf selbst gesetzt, sonst faerbte sich
   auch das Dienst-Faehnchen rot. */
.wf-tag.wf-feiertag:not(.wf-beantragt):not(.wf-genehmigt):not(.wf-abgelehnt) .wf-tag-nr,
.wf-tag.wf-feiertag:not(.wf-beantragt):not(.wf-genehmigt):not(.wf-abgelehnt) .wf-tag-ft {
  color: #B91C1C;
}
/* Feiertag, der NICHT waehlbar ist (Kontingent voll, Wochenende ohne
   Rhythmus, Frist vorbei): ohne diese Regel ueberdeckte das Rot das
   Grau von wf-aus, und ausgerechnet der Feiertag saehe als einziger
   gesperrter Tag antippbar aus. Darum blasser - Flaeche nur ein Hauch
   Rot (FEIERTAG_FLAECHE), Zahl und Name gedimmt. Rot und Name bleiben,
   der Tag ist weiter als Feiertag erkennbar. wf-aus kommt nur ohne
   Status vor, mit den Statusfarben kollidiert das also nicht. */
.wf-tag.wf-feiertag.wf-aus { background: #FEF2F2; }
.wf-tag.wf-feiertag.wf-aus .wf-tag-nr,
.wf-tag.wf-feiertag.wf-aus .wf-tag-ft { opacity: .6; }
/* Kurzname und Zeichen (Punkt/Haken/Fahne) absolut gesetzt: die Zelle
   wird dadurch nicht hoeher, das Raster behaelt seine Zeilenhoehe -
   mit und ohne Feiertag im Monat. Der Name steht in der MITTE, gleich
   unter der Zahl, das Zeichen rutscht an den unteren Rand: auf Android
   ist die Zelle ein Kreis (--r-chip 100px), und nur in seiner Mitte
   ist er breit genug fuer "1. Weihn.".
   Volle Innenbreite (left/right 0) und eine Spur engere Buchstaben:
   auf 360 px breiten Geraeten bleiben je Zelle nur ~43 px, mit dem
   2-px-Dienst-Rahmen ~41 px - mit 2 px Rand je Seite wurden dort
   "2. Weihn." und "Pfingstm." zu "…" gekuerzt.
   top haengt an der Hoehe der Tageszahl darueber (Innenabstand 4px +
   0.95rem x Zeilenhoehe 1.1) statt an festen 21px: bei groesserer
   Systemschrift waechst die Zahl, und der Name rueckt mit, statt in
   sie hineinzuragen. Bei 16px Grundschrift sind es 20.7px - wie zuvor. */
.wf-tag-ft {
  position: absolute; left: 0; right: 0; top: calc(4px + 1.045rem);
  font-size: 0.56rem; font-weight: 700; line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-align: center; color: inherit;
}
.wf-tag.wf-feiertag .wf-tag-mark {
  position: absolute; left: 0; right: 0; bottom: 2px; text-align: center;
}
/* Dienst-Wochenende: kraeftiger Rahmen statt Flaeche, damit die
   Statusfarbe darin weiter erkennbar bleibt. */
.wf-tag.wf-dienst { border: 2px solid #F59E0B; }
.wf-tag.wf-heute { box-shadow: inset 0 0 0 2px #1A73E8; }
.wf-tag.wf-beantragt { background: #FCA5A5; color: #7F1D1D; border-color: #F87171; }
.wf-tag.wf-genehmigt { background: #86EFAC; color: #0F172A; border-color: #4ADE80; }
.wf-tag.wf-abgelehnt { background: #E5E7EB; color: #4B5563; border-color: #D1D5DB; }
.wf-tag-nr { font-weight: 700; line-height: 1.1; }
.wf-tag-mark { font-size: 0.72rem; line-height: 1; }

.wf-legende {
  display: flex; flex-wrap: wrap; gap: 10px 14px;
  padding: 14px 14px 2px; font-size: 0.78rem; color: #475569;
}
.wf-legende span { display: inline-flex; align-items: center; gap: 5px; }
.wf-leg-kasten {
  width: 14px; height: 14px; border-radius: 4px;
  border: 1px solid #E2E8F0; display: inline-block;
}
.wf-leg-kasten.wf-leg-feiertag { background: #FEE2E2; border-color: #FCA5A5; }
/* Die Feiertage des Monats mit vollem Namen - eine eigene, volle
   Zeile; als inline-flex wie die Legendeneintraege zerfiele der Satz
   in einzelne Bausteine mit Luecken dazwischen. */
.wf-legende .wf-leg-feiertage {
  display: block; flex-basis: 100%; color: #B91C1C; line-height: 1.45;
}
.wf-legende .wf-leg-ft-eintrag { display: inline; white-space: nowrap; }

/* ================================================================
   Chat: Nachricht weiterleiten (ab 0.6.13.666)
   ----------------------------------------------------------------
   ACHTUNG bei jedem Knopf hier: ganz oben steht eine globale Regel
   `button { display:block; width:100%; margin:14px 0; padding:14px 16px }`.
   Sie trifft jedes <button> ohne Ausnahme. Wo unten Abstaende oder
   Breiten stehen, neutralisieren sie genau diese Regel - nicht
   wegkuerzen, sonst stehen die Knoepfe wieder mit 14 px Luft im
   Aktionsblatt und die Leiste unten wird zu hoch.
   ================================================================ */

/* ---- Herkunftszeile ueber einer weitergeleiteten Nachricht ----
   Kursiv und blass: sie ordnet den Inhalt ein, konkurriert aber nicht
   mit ihm. Ohne sie liest sich ein fremder Satz wie eine eigene
   Aussage des Absenders. */
.bubble-weitergeleitet {
  /* flex statt block, seit das Bild des Verfassers davorsteht.
     align-items:flex-start und nicht center: bei einem langen Namen
     bricht die Zeile um, und der Kopf soll dann bei der ERSTEN Zeile
     stehen statt in der Mitte zu schweben. */
  display: flex;
  align-items: flex-start;
  gap: 5px;
  font-size: 0.72rem;
  font-style: italic;
  color: #64748B;
  margin-bottom: 3px;
}
/* Der Text braucht min-width:0, sonst weigert sich das Flex-Element,
   unter seine Inhaltsbreite zu schrumpfen - ein langer Name schoebe
   die Blase dann ueber den Bildschirmrand hinaus. */
.bubble-wl-text {
  min-width: 0;
  overflow-wrap: anywhere;
}
/* Kleiner als der Absender-Avatar darueber (18 px): wer die Nachricht
   geschrieben hat, ist eine Fussnote zu dem, der sie hergetragen hat.
   line-height 1 haelt das Bild trotz kursiver Zeile bei der Schrift. */
.avatar.avatar-wl {
  width: 15px; height: 15px;
  min-width: 15px;
  margin-top: 1px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center; justify-content: center;
  color: #fff;
  font-size: 0.5rem;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
  overflow: hidden;
  position: relative;
}
.chat-bubble.eigene .bubble-weitergeleitet { color: #4B5563; }

/* ---- Aktionsblatt (langer Druck auf eine Blase) ----
   Von unten eingeblendet, wie man es vom Teilen-Menue des Systems
   kennt. z-index ueber vo-frage (10001), damit eine Rueckfrage aus dem
   Blatt heraus trotzdem darueber liegen kann - deshalb bekommt die
   Rueckfrage weiter unten 10003. */
.chat-aktionen {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(17, 24, 39, 0.55);
}
.chat-aktionen.hidden { display: none !important; }
.chat-aktionen-box {
  width: 100%;
  max-width: 480px;
  background: #FFFFFF;
  border-radius: 16px 16px 0 0;
  padding: 8px 14px calc(14px + env(safe-area-inset-bottom));
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.22);
}
/* Der graue Balken oben sagt ohne Worte "das laesst sich wegwischen"
   bzw. "hier ist unten". */
.chat-aktionen-griff {
  width: 38px; height: 4px;
  margin: 4px auto 10px;
  border-radius: 2px;
  background: #CBD5E1;
}
.chat-akt-btn {
  display: block;
  width: 100%;
  margin: 0 0 8px;          /* globale button-Regel: 14px 0 -> hier 8px unten */
  padding: 14px 16px;
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  color: #1F2937;
  background: #F1F5F9;
  border: none;
  border-radius: 10px;
}
.chat-akt-btn:active { background: #E2E8F0; }
.chat-akt-btn.hidden { display: none !important; }
.chat-akt-loeschen { color: #B91C1C; background: #FEF2F2; }
.chat-akt-loeschen:active { background: #FEE2E2; }
.chat-akt-abbrechen {
  margin-bottom: 0;
  text-align: center;
  color: #475569;
  background: #FFFFFF;
  box-shadow: inset 0 0 0 1px #E2E8F0;
}

/* Rueckfrage MUSS ueber dem Aktionsblatt liegen: das Blatt bleibt
   waehrend des Loeschens stehen (es schliesst erst danach), und eine
   Rueckfrage dahinter waere unerreichbar. */
.vo-frage { z-index: 10003; }

/* --- Dialog und Aktionsblatt je System -------------------------------
   Beide sind Auswahl-Elemente und tragen deshalb dieselbe Handschrift
   wie die Reiterleisten und das Hauptmenue. Die Unterschiede sind
   genau die, an denen man die Systeme erkennt: iOS rundet zurueck-
   haltend und stellt die Knoepfe voll ueber die Breite, Material
   rundet stark (28 px) und stellt Textknoepfe nach rechts. */

/* iOS: schmalerer Dialog, ruhigere Rundung. */
.os-ios .vo-frage-box {
  max-width: 300px;
  border-radius: 14px;
}
/* iOS-Warnhinweise setzen die bestaetigende Antwort nach RECHTS und
   heben sie durch Fettung hervor, nicht durch eine Farbflaeche. */
.os-ios .vo-frage-knoepfe { gap: 8px; }

/* Material 3: deutlich staerkere Rundung, linksbuendiger Text. */
.os-android .vo-frage-box {
  max-width: 340px;
  border-radius: 28px;
  padding: 24px;
  text-align: left;
}
.os-android .vo-frage-icon { margin-bottom: 2px; }
.os-android .vo-frage-knoepfe { justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
/* width:auto hebt die globale button-Regel (width:100%) auf. Ohne das ist
   jeder Knopf so breit wie die ganze Zeile, darf wegen flex 0 0 auto aber
   nicht schrumpfen - justify-content:flex-end schob den ERSTEN Knopf
   („Zurück“/„Nein“) dann links aus dem Kasten (gemessen 375 px, left -239,
   Prüfstand der HW-Tour 09.10.2026). flex-wrap stellt zwei lange Texte
   untereinander statt sie abzuschneiden. */
.os-android .vo-frage-btn { flex: 0 1 auto; width: auto; max-width: 100%; padding: 12px 20px; }

/* Aktionsblatt: iOS kennt keinen Griff - das Blatt wird ueber
   "Abbrechen" geschlossen. Material 3 hat ihn, und rundet mit 28 px. */
.os-ios .chat-aktionen-box { border-radius: 14px 14px 0 0; }
.os-ios .chat-aktionen-griff { display: none; }
.os-android .chat-aktionen-box { border-radius: 28px 28px 0 0; }
.os-android .chat-aktionen-griff { background: #CAC4D0; }
/* Frueher stand hier border-radius:12px - mit hoeherer Spezifitaet
   als die Formen-Abschnitte weiter unten. Das Blatt behielt dadurch
   auf Android als einziges eckige Knoepfe, obwohl der Kommentar
   daneben "Material rundet stark" verspricht. */

/* ---- Ziel-Auswahl (eigener Vollbild-Screen) ---- */

/* Vorschau der Nachricht, die weitergeleitet wird. Aufgebaut wie ein
   Zitat: linker Balken, geduckte Farben. Sie soll beim Ueberfliegen
   EINE Frage beantworten - von wem stammt das, was ich hier gerade
   weitergebe? - und dann der Zielauswahl das Feld ueberlassen. */
.chat-fwd-vorschau {
  flex: 0 0 auto;
  padding: 10px 12px 10px 14px;
  background: #F8FAFC;
  border-bottom: 1px solid #ECEFF1;
  border-left: 3px solid #0EA5E9;
}
.chat-fwd-vorschau-kopf {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.chat-fwd-vorschau-wer {
  font-size: 0.8rem;
  font-weight: 700;
  color: #0F172A;
}
.chat-fwd-vorschau-kette {
  font-size: 0.72rem;
  font-style: italic;
  color: #64748B;
}
/* Hoechstens zwei Zeilen: die Karte ist ein Hinweis, keine zweite
   Nachrichtenansicht - und der Platz gehoert der Zielliste darunter.
   line-clamp braucht -webkit-box, auch 2026 noch, in beiden Browsern
   der Zielgeraete. */
.chat-fwd-vorschau-text {
  margin-top: 3px;
  font-size: 0.85rem;
  line-height: 1.35;
  color: #475569;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
}

.chat-fwd-suchzeile {
  flex: 0 0 auto;
  padding: 8px 12px;
  background: #FFFFFF;
  border-bottom: 1px solid #ECEFF1;
}
input.chat-fwd-suche {
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  font-size: 1rem;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  background: #F8FAFC;
}
.chat-fwd-ziele {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: #FFFFFF;
  -webkit-overflow-scrolling: touch;
}
.chat-fwd-gruppe {
  padding: 12px 14px 4px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748B;
  background: #F8FAFC;
}
/* Eine Zielzeile ist bewusst ein <div> und kein <button>: als Knopf
   traefe sie die globale button-Regel, und ein 100 % breiter Knopf mit
   14 px Aussenabstand je Zeile ergaebe eine Liste mit Luecken. */
.chat-fwd-ziel {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #FFFFFF;
  cursor: pointer;
  position: relative;
}
.chat-fwd-ziel:active { background: #F1F5F9; }
.chat-fwd-ziel::after {
  content: "";
  position: absolute;
  left: 14px; right: 0; bottom: 0;
  height: 1px;
  background: #ECEFF1;
}
.chat-fwd-ziel.hidden { display: none !important; }
.chat-fwd-name {
  flex: 1;
  min-width: 0;
  font-size: 0.98rem;
  color: #1F2937;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Kasten statt echter Checkbox: eine native Checkbox ist auf iOS und
   Android unterschiedlich gross und laesst sich nicht zuverlaessig
   einfaerben. */
.chat-fwd-haken {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  border: 2px solid #CBD5E1;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: transparent;
  background: #FFFFFF;
}
.chat-fwd-ziel.gewaehlt .chat-fwd-haken {
  border-color: #1A73E8;
  background: #1A73E8;
  color: #FFFFFF;
}
.chat-fwd-leiste {
  flex: 0 0 auto;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: #FFFFFF;
  border-top: 1px solid #ECEFF1;
}
button.chat-fwd-senden {
  display: block;
  width: 100%;
  margin: 0;               /* globale button-Regel neutralisieren */
  padding: 14px 16px;
  font-size: 1rem;
  font-weight: 700;
  color: #1F2937;
  background: #FFC107;
  border: none;
  border-radius: 10px;
}
button.chat-fwd-senden:active { background: #E6AC00; }
/* Ohne diese Regel saehe der gesperrte Knopf genauso aus wie ein
   bedienbarer - der Mitarbeiter tippt dann ins Leere und sucht den
   Fehler bei sich. */
button.chat-fwd-senden:disabled {
  background: #E2E8F0;
  color: #94A3B8;
  cursor: default;
}

/* Der Leer-Hinweis liegt direkt im .chat-screen, und der hat
   padding:0 - ohne eigenen Rand klebte der Text an beiden
   Displaykanten. */
#chat-list-empty { padding: 14px; margin: 0; }

/* Die Reiter des Chats brauchen keine eigenen Regeln mehr - die
   Segmentschalter-Gestaltung weiter oben gilt fuer alle Leisten.
   Die Klasse .chat-liste-tab bleibt trotzdem im Markup: sie haelt die
   Aufgaben-Klickbindung fern, die sonst ALLE .aufg-tab einsammelt
   (siehe app.js, "aufg-tab:not(...)"). */

/* ===================================================================
   Chatliste: nach links wischen legt den Chat ins Archiv
   ===================================================================
   Aufbau wie beim Wischen in der Leads-App: .konv-row ist der feste
   Rahmen (overflow:hidden), der Knopf liegt absolut darunter am
   rechten Rand, die Karte .konv-item liegt darueber und wird per
   translateX zur Seite geschoben. Die Karte MUSS deckend sein,
   sonst schiene der Knopf durch sie hindurch.

   Der Knopf ist absichtlich kein Papierkorb: archiviert wird NUR fuer
   den Wischenden, die Kolleginnen und Kollegen behalten den Chat.
   Deshalb auch kein Rot - Rot verspricht "weg", und das waere hier
   schlicht gelogen. */
.konv-row {
  position: relative;
  overflow: hidden;
  background: #FFFFFF;
}
/* Die globale button-Regel (display:block, width:100%, margin:14px 0)
   wuerde diesen Knopf ueber die ganze Zeile spannen - alle vier Werte
   muessen deshalb ausdruecklich zurueckgesetzt werden. */
.konv-row .konv-aktion {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 96px;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: #64748B;
  color: #FFFFFF;
  border: none;
  border-radius: 0;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  z-index: 1;
}
.konv-row .konv-aktion .konv-aktion-icon { font-size: 1.25rem; }
.konv-row .konv-aktion:active { background: #475569; }
/* Zurueckholen aus dem Archiv - gruen, weil es der aufbauende Weg ist. */
.konv-row.im-archiv .konv-aktion { background: #0F7B3C; }
.konv-row.im-archiv .konv-aktion:active { background: #0B5C2C; }
.konv-row .konv-item {
  z-index: 2;
  transition: transform 0.18s ease-out;
  will-change: transform;
}
.konv-row .konv-item.swiped { transform: translateX(-96px); }
/* Beim Archivieren faehrt die Zeile zusammen statt zu verschwinden -
   ohne die Bewegung wirkt die Liste, als haette sie etwas verloren. */
.konv-row.faellt-weg {
  transition: height 0.2s ease, opacity 0.2s ease;
  height: 0 !important;
  opacity: 0;
}

/* ===================================================================
   Kurzmeldung am unteren Rand (Toast) mit optionalem Rueckgaengig
   =================================================================== */
.app-toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: calc(100vw - 32px);
  padding: 12px 16px;
  background: #1F2937;
  color: #FFFFFF;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.28);
  font-size: 0.92rem;
}
.app-toast.hidden { display: none !important; }
.app-toast-text {
  flex: 1;
  min-width: 0;
}
/* Auch hier die globale button-Regel abraeumen (siehe .konv-aktion). */
.app-toast-aktion {
  flex: 0 0 auto;
  display: inline-block;
  width: auto;
  margin: 0;
  padding: 4px 6px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: #FFC107;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
}
.app-toast-aktion.hidden { display: none !important; }
.app-toast-aktion:active { background: rgba(255,255,255,0.12); }


/* ===================================================================
   Vereinheitlichung der Formen (Untermenues und ihr Inhalt)
   ===================================================================
   Die Regeln weiter oben sind ueber Jahre gewachsen und bringen jede
   ihren eigenen Rundungswert mit. Statt drei Dutzend Stellen einzeln
   anzufassen - und dabei die zu treffen, die aus gutem Grund anders
   sind (Bildvorschauen, Fortschrittsbalken, Kreise) - stehen die
   Formen der BEDIENELEMENTE hier gebuendelt.

   Wer eine Form aendern will, aendert sie oben bei --r-* und nicht
   hier; hier steht nur, WELCHE Elemente welchem Wert folgen. */

/* --- Knoepfe in den Unterbereichen -------------------------------- */
.ghost-btn,
.aufg-done-btn,
.zeit-stempel-btn,
.ma-dok-btn,
.thw-btn-sek,
.thw-btn-warn,
button.chat-fwd-senden,
.madok-viewer-close,
.madok-viewer-extern,
.chat-akt-btn,
.vo-frage-btn {
  border-radius: var(--r-knopf);
}
/* Mindest-Trefferflaeche auch dort, wo die Regeln sie nie gesetzt
   haben. */
.ghost-btn,
.aufg-done-btn,
.ma-dok-btn,
.thw-btn-sek,
.thw-btn-warn {
  min-height: 44px;
}

/* --- Kennzeichnungen und kleine Auswahlfelder ---------------------- */
.aufg-tag,
.wf-tag,
.badge,
.faq-bpill,
.faq-chip {
  border-radius: var(--r-chip);
}
/* .thw-kat-item stand hier faelschlich mit drin - es ist eine
   vollbreite Listenzeile, keine Kennzeichnung. Auf Android haette
   --r-chip sie zu einer 100-px-Pille gemacht. */
.thw-kat-item { border-radius: var(--r-karte); }

/* --- Karten und Kaesten, die als Auswahl dienen -------------------- */
.ma-dok-ordner,
.ma-dok-card,
.kontakt-card,
.termin-card,
.wa-strecke-card,
.not-card,
.zeit-status-card,
.push-banner {
  border-radius: var(--r-karte);
}

/* --- Blaetter und Dialoge ------------------------------------------ */
.vo-frage-box { border-radius: var(--r-blatt); }
.chat-aktionen-box {
  border-radius: var(--r-blatt) var(--r-blatt) 0 0;
}

/* --- Die Umrisse angleichen ----------------------------------------
   Bernsteinfarbene Rahmen (#FDE68A, #FCD34D) waren der Versuch, die
   Hausfarbe ueberall unterzubringen. Bei einem Dutzend Kaesten
   uebereinander ergibt das einen gelben Schleier statt einer klaren
   Kante. Ein neutraler Umriss traegt besser - die Hausfarbe steht
   jetzt an den Stellen, wo sie etwas bedeutet. */
.ma-dok-ordner,
.ma-dok-card,
.kontakt-card,
.madok-viewer-close,
.madok-viewer-zoombtn,
.madok-viewer-extern {
  border-color: #CAC4D0;
}

/* --- Die FAQ-Pillen ------------------------------------------------
   Sie werden in app.js erzeugt und trugen ihre Gestaltung dort als
   style-Attribut - damit waren sie von jeder Aenderung am Stylesheet
   ausgenommen. Die Farben kommen weiterhin von dort (sie haengen am
   Bereich), Form und Groesse jetzt von hier. */
.faq-bpill,
.faq-chip {
  /* Die globale button-Regel gibt auch diesen beiden width:100% und
     margin:14px 0 - in einer Chipleiste ergaebe das eine Kette
     bildschirmbreiter Bloecke. */
  width: auto;
  margin: 0;
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid rgba(0,0,0,0.10);
}
.faq-chip {
  justify-content: flex-start;
  text-align: left;
  white-space: normal;
}

/* --- Der Rollenschalter der Tour ----------------------------------
   Zwei Stellungen, gegenseitig ausschliessend - dasselbe Muster wie
   die Reiterleisten. Er bekommt deshalb dieselbe Handschrift. */
/* Der Rollenschalter ist ein Knopfpaar in einem Formular, keine
   Kennzeichnung - er folgt deshalb der Knopfform und nicht der
   Chipform. Vorher war er als einziger Knopf der App 8 px gerundet,
   waehrend alle anderen 12 px bzw. eine Pille trugen. */
.thw-rolle {
  border-radius: var(--r-knopf);
  min-height: 48px;
  border-width: 1px;
  border-color: #CAC4D0;
}
.os-android .thw-rolle { border-radius: 100px; }


/* ===================================================================
   FAQ
   ===================================================================
   Der Bereich war bis 0.6.13.702 praktisch vollstaendig inline
   gestaltet - Suchfeld und Chipleiste als style-Attribut im HTML,
   Antwortkarten und Hinweiskaesten als zusammengesetzte Zeichenketten
   in app.js. Ein style-Attribut schlaegt jede Regel im Stylesheet;
   deshalb ist der Bereich bei allen bisherigen Aenderungen
   unveraendert stehen geblieben.

   Was weiterhin aus app.js kommt, sind allein die FARBEN: sie haengen
   am Gesetz (SGB XI, SGB V, interne Prozesse) und werden dort in
   faqBereichStyle() berechnet. */
.faq-suchzeile { padding: 10px 14px 6px; }
.faq-suche {
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 12px 14px;
  /* 16 px ist Pflicht: darunter zoomt iOS beim Antippen eines
     Eingabefeldes von selbst hinein. */
  font-size: 16px;
  font-family: inherit;
  color: #1F2937;
  background: #F1F5F9;
  /* Frueher ein 2 px starker bernsteinfarbener Rahmen. Ein Suchfeld
     ist kein Warnhinweis - beide Systeme geben ihm eine ruhige
     Flaeche und hoechstens eine feine Kante. */
  border: 1px solid transparent;
  border-radius: var(--r-knopf);
  outline: none;
}
.faq-suche:focus {
  background: #FFFFFF;
  border-color: #FFC107;
}
/* Material stellt Suchfelder als voll gerundete Leiste dar - das ist
   dort das Erkennungszeichen der Suche schlechthin. */
.os-android .faq-suche { border-radius: 100px; padding: 12px 18px; }

.faq-bereiche {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 14px 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.faq-bereiche::-webkit-scrollbar { display: none; }
.faq-status {
  padding: 4px 14px;
  margin: 0;
  font-size: 0.85rem;
  color: #667085;
}
.faq-intro {
  padding: 8px 14px 2px;
  margin: 0;
  font-size: 0.9rem;
  color: #667085;
}
.faq-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 14px 4px;
}

/* Der Weg zurueck zur Themenuebersicht. Als Textknopf - beide
   Systeme fuehren so aus einer Unterebene heraus. */
.faq-back-chip {
  width: auto;
  margin: 10px 14px 2px;
  padding: 8px 12px 8px 6px;
  min-height: 40px;
  background: none;
  border: none;
  border-radius: var(--r-knopf);
  color: #2563EB;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
}
.faq-back-chip:active { background: #EFF6FF; }

/* Die Antwortkarte. Der farbige Streifen links steht fuer das
   Gesetz und ist die einzige Angabe, die aus app.js kommt. */
.faq-antwort {
  margin: 10px 14px;
  padding: 14px;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-left: 4px solid #CAC4D0;
  border-radius: var(--r-karte);
}
.faq-marken {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
}
.faq-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: var(--r-chip);
  font-size: 0.6875rem;
  font-weight: 600;
  white-space: nowrap;
}
.faq-stand {
  margin-left: auto;
  color: #6B7280;
  font-size: 0.6875rem;
}
.faq-frage {
  font-weight: 700;
  font-size: 0.9375rem;
  color: #111827;
  margin-bottom: 5px;
}
.faq-text {
  color: #1F2937;
  font-size: 0.9rem;
  line-height: 1.5;
}
.faq-hinweis {
  margin-top: 10px;
  padding: 10px 12px;
  border-left: 3px solid #CAC4D0;
  border-radius: var(--r-chip);
}
.faq-hinweis-kopf {
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 3px;
}
.faq-hinweis-text {
  color: #374151;
  font-size: 0.8125rem;
  line-height: 1.45;
}


/* ===================================================================
   Knoepfe: drei Formen fuer die ganze App
   ===================================================================
   Vorher waren rund vierzig Knopf-Regeln im Umlauf, jede mit eigener
   Rundung (6 bis 999 px) und eigener Hoehe (38 bis 56 px). Hier steht
   gebuendelt, welcher Knopf welcher Form folgt.

   Die Rundung selbst kommt aus --r-knopf ganz oben - Material rundet
   voll, iOS zurueckhaltend. Wer die Form aendern will, aendert sie
   dort und nicht hier.

   Ausdruecklich NICHT erfasst: runde Symbolknoepfe ohne Beschriftung
   (.send-btn, .mic-btn, .attach-btn, .not-mic-btn,
   .madok-viewer-zoombtn). Ein Symbol ohne Wort ist in beiden
   Systemen kreisfoermig - das ist keine Uneinheitlichkeit, sondern
   ein eigener Fall. */

/* --- 1. GEFUELLT: die eine Haupthandlung eines Bildschirms -------- */
.termin-meet-btn,
button.chat-fwd-senden,
.aufg-done-btn,
.ma-dok-btn-zahlung,
.aufgnew-form .primary,
.not-form .primary,
.ber-form .primary,
.nk-form .primary,
.pst-body .primary,
.pb-actions .primary,
.ber-nav-btn.primary {
  border-radius: var(--r-knopf);
  min-height: 48px;
  font-weight: 600;
}

/* --- 2. UMRISSEN: alles Gleichrangige daneben ---------------------
   Weisse Flaeche mit feiner Kante. Frueher trugen diese Knoepfe
   graue Fuellungen (#F1F5F9, #F3F4F6, #E2E8F0) oder bernsteinfarbene
   Raender - nebeneinander ergab das drei verschiedene "zweite"
   Knoepfe auf demselben Bildschirm. */
.fl-kontroll-btn,
.termin-rsvp-btn,
.ber-nav-btn,
.thw-btn-sek,
.thw-btn-warn,
.thw-q-btn,
.ghost-btn,
.chat-akt-btn,
.madok-viewer-close,
.madok-viewer-extern,
.zeit-stempel-btn,
.vo-frage-btn {
  border-radius: var(--r-knopf);
  min-height: 48px;
  font-weight: 600;
}
.fl-kontroll-btn,
.termin-rsvp-btn,
.ber-nav-btn,
.thw-btn-sek,
.thw-q-btn,
.ghost-btn,
.chat-akt-btn,
.madok-viewer-close,
.madok-viewer-extern {
  background: #FFFFFF;
  border: 1px solid #CAC4D0;
  color: #1F2937;
}
.fl-kontroll-btn:active,
.termin-rsvp-btn:active,
.ber-nav-btn:active,
.thw-btn-sek:active,
.thw-q-btn:active,
.ghost-btn:active,
.chat-akt-btn:active,
.madok-viewer-close:active,
.madok-viewer-extern:active { background: #F1F5F9; }

/* --- 3. TEXT: Nebenhandlungen ohne eigene Flaeche ----------------- */
.not-action-btn,
.ber-clear-btn,
.faq-back-chip {
  border-radius: var(--r-knopf);
  min-height: 40px;
  background: transparent;
  border: none;
  font-weight: 600;
}

/* --- Die Ausnahmen, die Ausnahmen bleiben sollen ------------------
   Wo eine Farbe eine Bedeutung traegt, gewinnt sie gegen die
   Umriss-Form von oben. Die Reihenfolge macht das: diese Regeln
   stehen dahinter. */
.chat-akt-loeschen { background: #FEF2F2; color: #B91C1C; }
.chat-akt-loeschen:active { background: #FEE2E2; }
.thw-btn-warn { border-color: #FCA5A5; color: #B91C1C; }
.thw-btn-warn:active { background: #FEF2F2; }
.fl-kontroll-box.due .fl-kontroll-btn {
  background: #DC2626; border-color: #DC2626; color: #FFFFFF;
}
.termin-rsvp-btn.ja.active {
  background: #DCFCE7; border-color: #16A34A; color: #166534;
}
.termin-rsvp-btn.nein.active {
  background: #FEE2E2; border-color: #DC2626; color: #991B1B;
}
/* Die Stempeluhr behaelt ihre Ampelfarben - sie sind dort die
   eigentliche Aussage. */
.zeit-stempel-btn.zeit-gruen {
  background: #16A34A; border-color: #16A34A; color: #FFFFFF;
}
.zeit-stempel-btn.zeit-gelb {
  background: #FACC15; border-color: #FACC15; color: #1F2937;
}
.zeit-stempel-btn.zeit-rot {
  background: #DC2626; border-color: #DC2626; color: #FFFFFF;
}
/* Der Abbruch im Aktionsblatt bleibt abgesetzt - er ist der Weg
   heraus und soll sich von den Handlungen darueber unterscheiden. */
.chat-akt-abbrechen {
  background: #FFFFFF;
  border: 1px solid #CAC4D0;
  box-shadow: none;
  color: #475569;
}
/* Der bestaetigende Knopf einer Rueckfrage bleibt gefuellt. */
.vo-frage-ja { background: #16A34A; color: #FFFFFF; border: none; }
.vo-frage-nein {
  background: #FFFFFF; border: 1px solid #CAC4D0; color: #1F2937;
}


/* ===================================================================
   Die letzten Knoepfe, die ihre Gestaltung selbst mitbrachten
   ===================================================================
   Sie standen als style-Attribut in app.js bzw. index.html und haben
   deshalb bei keiner Aenderung am Stylesheet mitgezogen - sie waren
   der Grund, warum die Knoepfe "nicht ueberall gleich" aussahen. */

/* --- Verordnungen abholen ------------------------------------------
   Vier Knoepfe in einer umbrechenden Reihe. Die FARBEN tragen eine
   Bedeutung (Fax / Anfahrt / Anruf / erledigt) und bleiben deshalb
   unterschiedlich - Form, Hoehe und Schrift sind einheitlich. */
.vo-btn {
  min-height: 48px;
  margin: 0;
  padding: 10px 14px;
  border-radius: var(--r-knopf);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}
.vo-btn-halb { flex: 1 1 45%; min-width: 130px; width: auto; }
.vo-btn-voll { flex: 1 1 100%; width: auto; }
.vo-btn-fax { background: #EFF6FF; border: 1px solid #93C5FD;
              color: #1E3A8A; }
.vo-btn-navi { background: #ECFDF5; border: 1px solid #A7F3D0;
               color: #065F46; }
.vo-btn-tel { background: #FFFFFF; border: 1px solid #CAC4D0;
              color: #0F172A; }
.vo-btn-fertig { background: #16A34A; border: none; color: #FFFFFF;
                 font-weight: 700; }
/* Fehlt der Beleg noch, sieht der Knopf warnend aus - druecken darf
   man ihn trotzdem, ueber das Abhaken entscheidet der Server. */
.vo-btn-fertig.vo-btn-wartet { background: #F59E0B; color: #1F2937; }
.vo-btn:active { filter: brightness(0.94); }

/* --- Aufnahme- und Vorhoerleiste (Chat und Notizen) ----------------
   Fuenf Knoepfe, die in der ersten Bestandsaufnahme durchgerutscht
   sind: sie stehen in Leisten, die nur waehrend einer Aufnahme
   sichtbar sind, und waren deshalb auf der Messseite ausgeblendet.
   Sie tragen jetzt dieselbe Form wie alle uebrigen. */
.not-rec-stop,
.rec-cancel,
.preview-send,
.preview-discard {
  border-radius: var(--r-knopf);
  min-height: 44px;
  font-family: inherit;
}
.rec-cancel, .preview-discard, .preview-send { padding: 8px 16px; }
/* Der Abbruch-Knopf der Notizaufnahme bleibt quadratisch-rund: er
   traegt nur ein Zeichen, keine Beschriftung. */
.not-rec-cancel { border-radius: var(--r-knopf); }

/* --- KI-Fragen ------------------------------------------------------ */
.kif-faq-btn {
  margin-left: auto;
  width: auto;
  min-height: 36px;
  padding: 4px 12px;
  background: none;
  border: 1px solid #A7F3D0;
  border-radius: var(--r-chip);
  color: #047857;
  font-size: 0.75rem;
  font-weight: 700;
}
.kif-faq-btn:disabled { border-color: #D1D5DB; color: #9CA3AF; }
.kif-zurueck-btn {
  display: block;
  width: auto;
  min-height: 40px;
  margin: 10px 14px 0;
  padding: 4px 8px 4px 0;
  background: none;
  border: none;
  border-radius: var(--r-knopf);
  /* Frueher #4F46E5 - ein Indigo, das sonst nirgends in der App als
     Knopffarbe vorkam. Blau ist die Farbe, die beide Systeme fuer
     Textknoepfe benutzen. */
  color: #2563EB;
  font-size: 0.875rem;
  font-weight: 700;
}
.kif-del-btn {
  margin: 0 0 0 auto;
  width: auto;
  min-height: 36px;
  padding: 4px 8px;
  background: none;
  border: none;
  border-radius: var(--r-chip);
  color: #6B7280;
  font-size: 0.8125rem;
  font-weight: 700;
}
/* Der Frage-Knopf des KI-Bereichs war der einzige Knopf der App ganz
   ohne Klasse und in eigenem Indigo. Er traegt jetzt .primary; damit
   entfaellt auch die Sonderfarbe des Weiter-Knopfs daneben. */
.kif-weiter-go { background: #FFC107; color: #1F2937; }
.kif-weiter-go:disabled { background: #FDE68A; color: #9CA3AF; }


/* ===================================================================
   Nachtrag: was die globale button-Regel sonst noch anrichtet
   ===================================================================
   `button` (ganz oben) setzt width:100%, margin:14px 0 und
   min-height:48px. Wer das nicht ausdruecklich zuruecknimmt, bekommt:

     * in einer Flex-Zeile gleich breite statt inhaltsbreite Knoepfe,
       und ein justify-content am Elternteil laeuft ins Leere,
     * 28 px zusaetzliche Hoehe je Zeile,
     * kleine Textknoepfe, die 48 px hoch werden.

   Deshalb steht hier gebuendelt, WELCHE Knoepfe was zuruecknehmen.
   Das ist keine Gestaltung, sondern Schadensbegrenzung an einer
   Regel, die es so nicht geben sollte - siehe den Hinweis dort. */

/* --- Breite und Aussenabstand zuruecknehmen ------------------------
   Alle diese Knoepfe stehen in Flex-Zeilen und sollen inhaltsbreit
   sein bzw. ihren Abstand vom Elternteil beziehen. */
.aufg-fab,
.aufg-done-btn,
.not-action-btn,
.rec-cancel,
.preview-discard,
.preview-send,
.thw-q-btn,
.thw-mass-weg,
.bubble-meta .like-pill,
.app-toast-aktion,
.kontakt-anruf,
.not-rec-stop,
.kif-weiter-go {
  width: auto;
  margin: 0;
}
/* Diese setzen ihre Breite bereits selbst (flex oder feste px) und
   brauchen nur den Aussenabstand zurueck. */
.thw-btn-sek,
.thw-btn-warn,
.thw-rolle,
.vo-frage-btn,
.ber-nav-btn,
.termin-rsvp-btn,
.ghost-btn,
.zeit-stempel-btn,
.not-mic-btn,
.not-rec-cancel,
.not-audio-play,
.fl-kontroll-btn,
.ma-dok-btn {
  margin: 0;
}
/* Der schwebende Knopf braucht seinen eigenen Abstand zum Rand -
   er sitzt absolut, das margin:0 oben wuerde ihn sonst gar nicht
   stoeren, aber sein width:100% hat ihn bildschirmbreit gemacht und
   ueber den linken Rand hinausragen lassen. */
.aufg-fab { right: 20px; bottom: 20px; }
/* Der kleine Textknopf unter dem Unterschriftenfeld war vollbreit. */
.ber-clear-btn { width: auto; }

/* --- Mindesthoehe zuruecknehmen ------------------------------------
   Kleine Knoepfe in engen Zeilen. 48 px waeren dort dreimal so hoch
   wie der Text daneben; die Trefferflaeche traegt bei ihnen die
   umgebende Zeile. */
.bubble-meta .like-pill,
.app-toast-aktion,
.thw-mass-weg,
.kif-faq-btn,
.kif-del-btn {
  min-height: 0;
}

/* --- Die Knoepfe, die in den Formen-Abschnitten fehlten ------------ */
/* GEFUELLT */
.kontakt-anruf,
.preview-send,
.not-rec-stop,
.kif-weiter-go {
  border-radius: var(--r-knopf);
  min-height: 48px;
  font-weight: 600;
}
/* UMRISSEN */
.rec-cancel,
.preview-discard,
.chat-anhang-link,
.chat-anhang-datei {
  border-radius: var(--r-knopf);
  font-family: inherit;
}
.chat-anhang-datei { min-height: 44px; }
/* Die Farben dieser beiden tragen eine Bedeutung (Abbruch bzw.
   Verwerfen) und bleiben deshalb rot. */
.rec-cancel, .preview-discard { min-height: 44px; }

/* --- Runde Symbolknoepfe: die vollstaendige Liste -------------------
   Ein Zeichen ohne Beschriftung ist in beiden Systemen kreisfoermig.
   Der frueher hier stehende Kommentar zaehlte drei davon nicht auf -
   und einer (.madok-viewer-zoombtn) wurde weiter oben sogar eckig
   gemacht. Vollstaendig sind es: */
.send-btn,
.attach-btn,
.mic-btn,
.not-mic-btn,
.not-rec-cancel,
.not-audio-play,
.madok-viewer-zoombtn,
.chat-header .hdr-btn {
  border-radius: 50%;
}


/* ==================== GIFs im Chat (Tenor) =========================
   ACHTUNG, die Hausfalle: ganz oben in dieser Datei steht eine Regel
   auf dem nackten Element `button` mit `display:block; width:100%;
   margin:14px 0`. Sie trifft JEDEN Knopf, auch die hier. Jede Klasse
   unten setzt `width` und `margin` deshalb ausdruecklich zurueck -
   sonst fuellt schon die erste GIF-Kachel die ganze Zeile.
   ------------------------------------------------------------------ */

/* Der GIF-Knopf steht neben der Bueroklammer und ist genauso rund und
   gross wie sie - nur traegt er Buchstaben statt eines Zeichens. */
.gif-btn {
  width: 44px; height: 44px;
  padding: 0; margin: 0;
  border-radius: 50%;
  border: none;
  background: #FFFFFF;
  color: #4B5563;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: inline-flex;
  align-items: center; justify-content: center;
  flex: 0 0 44px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.gif-btn:active { background: #E2E8F0; }

/* Das Auswahlblatt faehrt ueber den Verlauf und laesst die
   Eingabezeile frei - man sieht also weiter, wohin man schreibt.
   position:absolute (nicht fixed): Bezugsrahmen ist der
   Chat-Bildschirm, der selbst schon fest steht. */
.gif-blatt {
  position: absolute;
  left: 0; right: 0;
  bottom: calc(60px + env(safe-area-inset-bottom));
  max-height: 52vh;
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border-top: 1px solid #D1D5DB;
  box-shadow: 0 -6px 18px rgba(0,0,0,0.18);
  z-index: 30;
}
.gif-blatt.hidden { display: none; }

.gif-blatt-kopf {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-bottom: 1px solid #E5E7EB;
  flex: 0 0 auto;
}
.gif-suche {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  margin: 0;
  border: 1px solid #D1D5DB;
  border-radius: 20px;
  font-size: 1rem;
  background: #F3F4F6;
}
.gif-zu {
  width: auto; margin: 0;
  padding: 8px 14px;
  min-height: 44px;
  border: none;
  border-radius: 20px;
  background: #FFC107;
  color: #1F2937;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  flex: 0 0 auto;
}

/* Schnellbegriffe: eine Zeile Chips, waagerecht zu schieben. */
.gif-schnell {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px;
  flex: 0 0 auto;
  -webkit-overflow-scrolling: touch;
  /* Kein sichtbarer Rollbalken unter den Chips - derselbe Griff wie bei
     den Bereichs-Chips im FAQ (.faq-bereiche). Auf Android zeichnet
     Chromium sonst einen breiten Balken quer durch das Blatt. */
  scrollbar-width: none;
}
.gif-schnell::-webkit-scrollbar { display: none; }
.gif-schnell button {
  width: auto; margin: 0;
  flex: 0 0 auto;
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid #D1D5DB;
  border-radius: 16px;
  background: #F3F4F6;
  color: #374151;
  font-size: 0.85rem;
  cursor: pointer;
}
.gif-schnell button.aktiv {
  background: #FFC107;
  border-color: #E0A800;
  color: #1F2937;
  font-weight: 700;
}

/* Das Raster. Zwei Spalten auf dem Handy - bei drei waeren die GIFs so
   klein, dass man die Bewegung nicht mehr erkennt. */
.gif-raster {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 8px;
  overflow-y: auto;
  flex: 1 1 auto;
  -webkit-overflow-scrolling: touch;
}
.gif-raster button {
  width: 100%; margin: 0;
  padding: 0;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  background: #F9FAFB;
  overflow: hidden;
  cursor: pointer;
  min-height: 90px;
  display: block;
}
.gif-raster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gif-hinweis {
  margin: 0;
  padding: 16px;
  text-align: center;
  color: #6B7280;
  font-size: 0.9rem;
  flex: 0 0 auto;
}
.gif-hinweis.hidden { display: none; }

/* Ein gesendetes GIF im Verlauf. Bewusst OHNE den Umweg ueber das
   Vorschaubild (/thumb): das waere ein JPEG und damit ein Standbild. */
.chat-anhang-gif {
  max-width: 240px;
  max-height: 300px;
  border-radius: 8px;
  display: block;
}

/* ---------- DMS-Privat (ab 0.6.13.794, nur Administrator) ----------
   Ordner und Dokumente benutzen die Karten von „Meine Dokumente"
   (.ma-dok-ordner / .ma-dok-card) - hier nur, was dazukommt. */
#btn-dms-open .start-btn-icon { --sym: #1F2937; }
.dms-hochladen {
  display: flex; gap: 8px; padding: 6px 14px 10px;
}
.dms-hoch-btn {
  flex: 1 1 0; min-height: 46px; border-radius: 12px;
  border: 1px solid #E4DDCE; background: #FFFFFF; color: #211D17;
  font-size: 15px; font-weight: 700; cursor: pointer;
}
.dms-hoch-btn:active { background: #FFF7D6; }
.dms-input { display: none; }
.dms-frei {
  margin: 18px 14px; padding: 22px 18px; border-radius: 16px;
  background: #FFFFFF; border: 1px solid #E4DDCE; text-align: center;
}
.dms-frei-icon { font-size: 40px; line-height: 1; margin-bottom: 8px; }
.dms-frei-titel { font-size: 18px; font-weight: 800; color: #211D17; }
.dms-frei-text { margin: 8px 0 14px; color: #6B6459; font-size: 14px; }
.dms-frei .kontakte-suche { width: 100%; margin: 0; box-sizing: border-box; }
.dms-frei-btn {
  margin-top: 12px; width: 100%; min-height: 48px; border: none;
  border-radius: 12px; background: #F2C400; color: #211D17;
  font-size: 16px; font-weight: 800; cursor: pointer;
}
.dms-frei-btn:disabled { opacity: .6; }
.dms-frei-msg { margin-top: 10px; min-height: 18px; color: #B91C1C;
  font-size: 14px; font-weight: 600; }
/* Namensblatt vor dem Ablegen (ab 0.6.13.828): Kasten der Rückfrage
   (.vo-frage-box), etwas breiter für lange Dateinamen. */
/* Zwei Klassen: gewinnt so gegen .os-ios/.os-android .vo-frage-box
   (300/340 px) - sonst wäre auf dem Handy nur „Rechnung Telekom … 05"
   des Namens zu sehen. */
.vo-frage-box.dms-name-box { max-width: 420px; text-align: left; }
/* Auf Android setzt .os-android .vo-frage-btn flex: 0 0 auto - mit der
   globalen button-Regel (width: 100 %) wäre jeder Knopf zeilenbreit und
   „Abbrechen" rutschte links aus dem Kasten. */
.dms-name-box .vo-frage-btn { width: auto; }
.dms-name-box .vo-frage-icon { display: flex; margin: 0 auto; }
.dms-name-box .vo-frage-titel { text-align: center; }
.dms-name-erkannt {
  margin-top: 8px; font-size: 14px; line-height: 1.4; color: #6B6459;
  text-align: center;
}
.dms-name-erkannt.ist-erkannt { color: #15803D; font-weight: 600; }
.dms-name-feld {
  display: block; width: 100%; box-sizing: border-box;
  margin: 14px 0 0; font-size: 16px;       /* 16 px: iOS zoomt sonst */
}
.dms-name-fehler { min-height: 18px; margin-top: 6px; color: #B91C1C;
  font-size: 14px; font-weight: 600; }
.dms-name-original {
  /* hebt die globale button-Regel auf (100 % breit, 48 px hoch) */
  width: auto; min-height: 0; margin: 0; padding: 4px 0; border: none;
  background: none; color: #6B6459; font-size: 14px; font-weight: 600;
  text-align: left; text-decoration: underline; cursor: pointer;
  overflow-wrap: anywhere;
}
.dms-name-original.hidden { display: none; }

/* ---------- Übergabebuch (ab 0.6.13.809) ----------
   Kundenliste wie die Kontakte (Suchfeld .kontakte-suche), Karten an die
   Notizen angelehnt. Farben mit Bedeutung: Wichtig = Rot (Signal), Neu =
   gelber Rand #F2C400, automatisch = grau. Die globale button-Regel
   (width:100%; margin:14px 0) wird für die eigenen Knöpfe ausdrücklich
   zurückgenommen; die Kundenzeilen sind deshalb gar keine <button>. */
#btn-uebergabebuch-open .start-btn-icon { --sym: #B45309; }
/* Menü-Zahl: Form wie die übrigen Menü-Zähler, aber ROT (Signal) statt
   Grün - Wunsch des Inhabers. Weiß auf #D92D20 = 4,8:1. */
#uebergabebuch-badge { background: #D92D20; }
.ueb-status { margin: 0; padding: 2px 14px 6px; font-size: 0.85rem; }
.ueb-fehler { margin: 0; padding: 14px; }
.ueb-kunde {
  display: flex; align-items: center; gap: 10px;
  min-height: 56px; padding: 10px 14px;
  background: #FFFFFF; border-bottom: 1px solid #ECEFF1;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.ueb-kunde:active { background: #FEF3C7; }
.ueb-kunde-body {
  flex: 1 1 auto; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.ueb-kunde-name {
  font-size: 1rem; font-weight: 600; color: #1F2937;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ueb-kunde.hat-neu .ueb-kunde-name { font-weight: 800; }
.ueb-kunde-sub {
  font-size: 0.82rem; color: #6B7280;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ueb-zahl { flex: 0 0 auto; }
.ueb-pfeil { flex: 0 0 auto; color: #6B7280; font-size: 1.4rem; line-height: 1; }
/* Material setzt keinen Winkel ans Zeilenende (wie im Hauptmenü). */
.os-android .ueb-pfeil { display: none; }
#btn-ueb-neu { width: calc(100% - 28px); margin: 6px 14px 4px; }
.ueb-form { padding-top: 6px; }
.ueb-check {
  display: flex; align-items: center; gap: 10px;
  min-height: 44px; margin: 6px 0 0;
  color: #1F2937; font-size: 0.95rem; cursor: pointer;
}
.ueb-check input {
  flex: 0 0 auto; width: 22px; height: 22px; margin: 0;
  accent-color: #B45309;
}
/* Raster statt Flex: die beiden Knöpfe haben verschiedene Polster und
   Ränder (ghost/primary) - mit flex:1 1 0 wurden sie gemessen 172 und
   166 px breit. Zwei gleiche Spuren sind es in jedem Fall. */
.ueb-form-btns {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px; margin-top: 12px;
}
#ueb-form .ueb-form-btns button {
  width: 100%; margin: 0; min-height: 48px;
}
#btn-ueb-speichern:disabled { opacity: .6; }
.ueb-karte {
  position: relative;
  margin: 10px 14px; padding: 10px 12px 10px 14px;
  background: #FFFFFF;
  border: 1px solid #E5E7EB; border-left: 4px solid #CBD5E1;
  border-radius: var(--r-karte, 12px);
}
.ueb-karte.neu { border-color: #F2C400; border-width: 2px 2px 2px 4px; }
.ueb-karte.wichtig { background: #FEF2F2; border-left-color: #D92D20; }
.ueb-karte.auto { background: #F3F4F6; border-left-color: #D1D5DB; }
.ueb-karte.auto .ueb-karte-text { color: #6B7280; }
.ueb-karte-kopf {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin-bottom: 6px;
}
.ueb-karte-zeit { font-size: 0.8rem; color: #6B7280; }
.ueb-marke {
  display: inline-block; padding: 1px 8px;
  border-radius: var(--r-chip, 8px);
  font-size: 0.72rem; font-weight: 800; line-height: 1.5;
}
.ueb-marke-wichtig { background: #D92D20; color: #FFFFFF; }
.ueb-marke-neu { background: #F2C400; color: #1F2937; }
.ueb-marke-auto { background: #E5E7EB; color: #4B5563; }
.ueb-karte-text {
  font-size: 0.95rem; line-height: 1.4; color: #1F2937;
  white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere;
}
.ueb-karte-wer { margin-top: 6px; font-size: 0.8rem; font-weight: 600; color: #374151; }
.ueb-karte-gelesen { margin-top: 2px; font-size: 0.72rem; color: #6B7280; }

/* Chat-Verlauf aus dem Vorrat (ab 0.6.13.837): oben sagen, von wann. */
.chat-vorrat-hinweis {
  margin: 6px auto 8px; padding: 4px 10px; max-width: 90%;
  font-size: 0.78rem; color: #475569; text-align: center;
  background: #F1F5F9; border-radius: 10px;
  /* Bleibt beim Scrollen oben stehen - der Verlauf oeffnet am Ende, der
     Hinweis stand sonst ausserhalb des sichtbaren Bereichs (ab .844). */
  position: sticky; top: 4px; z-index: 2;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

/* ==================== Nachrichten (Superchat-Postfach, ab 0.6.13.848) ====
   Liste wie der Chat (.konv-item), Verlauf wie der Chat (.chat-bubble).
   Die Hausfalle: JEDER <button> bekommt oben width:100% und 14 px Rand -
   die eigenen Knoepfe hier setzen das ausdruecklich zurueck. */
.nr-werkzeug {
  display: flex; gap: 8px; align-items: center;
  padding: 8px 12px; background: #FFFFFF;
  border-bottom: 1px solid #ECEFF1; flex: 0 0 auto;
}
.nr-postfach {
  flex: 0 1 56%; min-width: 0; height: 40px; padding: 0 6px;
  font-size: 0.9rem; color: #1F2937; background: #FFFFFF;
  border: 1px solid #CBD5E1; border-radius: var(--r-knopf, 12px);
}
input.nr-suche {
  flex: 1 1 auto; min-width: 0; height: 40px; padding: 0 12px;
  font-size: 1rem; color: #1F2937; background: #F8FAFC;
  border: 1px solid #CBD5E1; border-radius: var(--r-knopf, 12px);
  -webkit-appearance: none; appearance: none;
}
input.nr-suche:focus { outline: none; border-color: #FFC107; background: #FFFFFF; }
.nr-status { margin: 0; padding: 4px 14px 0; flex: 0 0 auto; }
.nr-status:empty { display: none; }
/* Postfaecher stummschalten (ab 0.6.13.850): Zeilen wie die Push-Pause
   (.pst-toggle-row), rechts der Zustand in Worten. */
#nr-stumm-status { padding: 0 0 10px 0; }
.nr-stumm-zeile { font-weight: 600; cursor: pointer; }
.nr-stumm-zeile .nr-stumm-name {
  flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap;
}
.nr-stumm-zeile .nr-stumm-zustand {
  flex: 0 0 auto; font-size: 0.8rem; font-weight: 600; color: #475569;
  font-variant-emoji: emoji;
}
.nr-stumm-zeile.nr-ist-stumm { background: #F8FAFC; }
.nr-stumm-zeile input[type="checkbox"]:disabled { opacity: 0.5; }
#nr-liste {
  flex: 1 1 0; min-height: 0; overflow-y: auto; background: #FFFFFF;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
}
.nr-leer { padding: 18px 16px; margin: 0; text-align: center; }
.konv-item .nr-avatar {
  font-size: 1.35rem; font-weight: 400; text-transform: none;
  font-variant-emoji: emoji;
}
/* Kanal am Kreis - WhatsApp im eigenen Gruen (Inhaber-Wunsch: die
   Originalfarben bleiben, nie in die Hausfarben ziehen). */
.konv-item .nr-avatar.nr-k-wa { background: #DCF8C6; }
.konv-item .nr-avatar.nr-k-mail { background: #E3EEFB; }
.konv-item .nr-avatar.nr-k-sonst { background: #EEF1F5; }
.konv-item .konv-marke.nr-pf-marke {
  flex: 0 1 auto; max-width: 42%; overflow: hidden; text-overflow: ellipsis;
}

/* ---- Gespraech ---- */
.chat-header .nr-kopf {
  flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column;
  align-items: flex-start; gap: 1px;
}
.chat-header .nr-kopf .hdr-title {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; text-align: left;
}
.nr-kopf-sub {
  max-width: 100%; font-size: 0.74rem; color: #3B3B3B; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.chat-header .nr-erledigt-btn { font-size: 1.3rem; }
.chat-header .nr-erledigt-btn:disabled { opacity: 0.45; }
.nr-fenster {
  flex: 0 0 auto; padding: 4px 12px; font-size: 0.78rem; color: #475569;
  text-align: center; background: #F8FAFC; border-bottom: 1px solid #E2E8F0;
}
.nr-fenster:empty { display: none; }
#nr-verlauf {
  flex: 1 1 0; min-height: 0; overflow-y: auto;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: 10px 8px 14px 8px; background: #ECE5DD;
  display: flex; flex-direction: column; gap: 1px;
}
#nr-verlauf.nr-mail { background: #EEF2F6; }
#nr-verlauf .chat-bubble, #nr-verlauf .date-sep,
#nr-verlauf .nr-aeltere, #nr-verlauf .nr-leer { flex-shrink: 0; }
#nr-verlauf .chat-bubble { max-width: 86%; }
#nr-verlauf.nr-mail .chat-bubble { max-width: 94%; }
#nr-verlauf .bubble-text { overflow-wrap: anywhere; }
/* Interne Notiz (nur im Manager): gelb gestrichelt wie am PC. */
#nr-verlauf .chat-bubble.nr-notiz {
  align-self: center; max-width: 94%; background: #FFF8DB;
  border: 1px dashed #D4A800; box-shadow: none;
}
.nr-betreff-zeile { font-weight: 700; margin-bottom: 4px; padding-right: 56px; }
.nr-vorlage { font-size: 0.78rem; color: #475569; font-style: italic; margin-bottom: 2px; }
.nr-gekuerzt { font-size: 0.75rem; color: #64748B; margin-top: 4px; }
button.nr-aeltere {
  display: block; width: auto; min-height: 0; margin: 4px auto 8px;
  padding: 6px 14px; font-size: 0.85rem; font-weight: 600;
  color: #1F2937; background: rgba(255,255,255,0.92);
  border-radius: 999px; box-shadow: 0 1px 2px rgba(0,0,0,0.12);
}
.nr-bild-link { display: block; margin: 2px 0 4px; }
.nr-bild {
  display: block; max-width: 100%; max-height: 280px; border-radius: 6px;
  background: rgba(0,0,0,0.04);
}
.nr-audio { display: block; width: 240px; max-width: 100%; margin: 4px 0; }
.nr-video { display: block; max-width: 100%; max-height: 280px; margin: 4px 0; border-radius: 6px; }
.nr-datei {
  display: inline-block; max-width: 100%; margin: 3px 0; padding: 6px 9px;
  font-size: 0.88rem; color: #1F2937; text-decoration: none;
  background: rgba(0,0,0,0.06); border-radius: 6px; overflow-wrap: anywhere;
}
.nr-datei-fehlt { color: #64748B; }
.ticks.nr-fehler { color: #B91C1C; }

/* ---- Eingabe ---- */
.nr-eingabe {
  flex: 0 0 auto; background: #F0F0F0; border-top: 1px solid #D1D5DB;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom)) 8px;
}
.nr-sperre {
  margin: 0 2px 6px; padding: 8px 10px; font-size: 0.85rem; line-height: 1.35;
  color: #78350F; background: #FEF3C7; border-radius: 8px;
}
/* 1rem = 16px: darunter zoomt iOS beim Antippen ins Feld (ab 0.6.13.853). */
input.nr-betreff {
  display: block; width: 100%; height: 40px; margin: 0 0 6px; padding: 0 12px;
  font-size: 1rem; border-radius: var(--r-knopf, 12px);
}
input.nr-betreff.hidden { display: none !important; }
.nr-eingabe-zeile { display: flex; gap: 8px; align-items: flex-end; }
/* „Von:" bei Mail-Antworten (ab 0.7.0.551). 1rem im Feld: sonst zoomt
   iOS beim Antippen. */
.nr-von {
  display: flex; align-items: center; gap: 8px; margin: 0 2px 6px;
  font-size: 0.85rem; color: #4B5563;
}
.nr-von.hidden { display: none !important; }
select.nr-von-wahl {
  flex: 1 1 auto; min-width: 0; height: 36px; padding: 0 10px;
  font: inherit; font-size: 1rem; color: #1F2937; background: #FFFFFF;
  border: 1px solid #D1D5DB; border-radius: 10px;
}
select.nr-von-wahl:focus { border-color: #FFC107; outline: none; }
textarea.nr-text {
  flex: 1 1 auto; min-width: 0; height: 44px; min-height: 44px; max-height: 140px;
  padding: 11px 14px; font: inherit; font-size: 1rem; line-height: 1.3;
  color: #1F2937; background: #FFFFFF; border: 1px solid transparent;
  border-radius: 22px; resize: none; outline: none;
  box-shadow: 0 1px 1px rgba(0,0,0,0.06);
}
textarea.nr-text:focus { border-color: #FFC107; }
textarea.nr-text:disabled { background: #F3F4F6; }
.nr-eingabe .send-btn { min-height: 44px; }
.nr-eingabe .send-btn:disabled { opacity: 0.45; }
/* Bei einer Suche gelten die Faecher nicht (Treffer aus beiden). */
.aufg-tabs.nr-faecher-aus { opacity: 0.45; }

/* ---------- Interne Notiz (ab 0.6.13.856) ---------------------- */
/* Umschalter "Antworten | Interne Notiz" ueber dem Feld. Wie die
   Reiterleiste (Offen/Erledigt): graue Schiene, weisser Regler bei der
   gewaehlten Stellung - die globale button-Regel (display:block,
   width:100%, 48 px) darf hier nicht greifen. */
.nr-modus {
  display: flex; gap: 0;
  margin: 0 0 8px; padding: 5px 10px 6px;
  background: rgba(120,120,128,0.16);
  border-radius: 10px;
  position: relative;
}
.nr-modus-btn {
  flex: 1 1 0; min-width: 0;
  width: auto; margin: 0; min-height: 34px;
  padding: 0 8px;
  font-size: 0.875rem; font-weight: 590; line-height: 1.2;
  color: #4B5563; background: transparent; border: none;
  border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 5px; white-space: nowrap; overflow: hidden;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.nr-modus-btn + .nr-modus-btn::before {
  content: ""; position: absolute; left: 50%;
  top: 9px; bottom: 9px; width: 1px;
  background: rgba(60,60,67,0.26);
}
.nr-modus-btn.active::before { display: none; }
.nr-modus-btn.active {
  color: #1F2937; background: #FFFFFF;
  box-shadow: 0 3px 8px rgba(0,0,0,0.12), 0 1px 1px rgba(0,0,0,0.04);
  font-weight: 650;
}
.nr-modus-btn:active { opacity: 0.62; }
/* "Interne Notiz" ist ein gelber Modus: der Hinweis und das Feld
   tragen dasselbe Gelb wie die Sperrenzeile (#FEF3C7) - unuebersehbar,
   aber ruhiger als das Sende-Gelb. */
.nr-notiz-hinweis {
  margin: 0 2px 6px; padding: 6px 10px;
  font-size: 0.8rem; line-height: 1.35;
  color: #78350F; background: #FEF3C7; border-radius: 8px;
}
.nr-eingabe.nr-notiz-modus textarea.nr-text {
  background: #FEF3C7; border-color: transparent;
}
.nr-eingabe.nr-notiz-modus textarea.nr-text:focus {
  border-color: #F59E0B;
}
/* Speichern-Button: wie der Sende-Button, nur dunkleres Gelb, damit
   niemand die Notiz per Versehen "sendet". */
.nr-notiz-btn { background: #F59E0B; }
.nr-notiz-btn:active { background: #D97706; }

/* ---------- Mehrfachauswahl (ab 0.6.13.886) --------------------- */
/* Die Leiste steht STATT Faechern, Postfach und Suche - solange
   ausgewaehlt wird, muss also nichts davon sichtbar bleiben. */
#screen-nachrichten.nr-mf-an .nr-werkzeug,
#screen-nachrichten.nr-mf-an .nr-status { display: none; }
/* Kopfzeile: abbrechen links, Zahl in der Mitte, Aktionen rechts -
   ein Satz, nicht zwei uebereinanderliegende Knopfspalten. */
.nr-mf {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: #FFFBEB;
  border-bottom: 1px solid #FDE68A;
}
.nr-mf.hidden { display: none; }
.nr-mf-kopf { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.nr-mf-ende {
  width: 34px; height: 34px; min-width: 34px; min-height: 34px;
  margin: 0; padding: 0;
  border: none; border-radius: 50%;
  background: #FDE68A; color: #78350F;
  font-size: 1rem; font-weight: 700; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.nr-mf-ende:active { background: #FCD34D; }
.nr-mf-zahl {
  font-size: 0.85rem; font-weight: 600; color: #92400E;
  white-space: nowrap; min-width: 0;
  overflow: hidden; text-overflow: ellipsis;
}
.nr-mf-aktionen { display: flex; gap: 8px; margin-left: auto; flex: 0 0 auto; }
.nr-mf-knopf {
  width: auto; margin: 0; min-height: 34px; padding: 0 12px;
  font-size: 0.85rem; font-weight: 650; line-height: 1.2;
  border: none; border-radius: 999px;
  background: #FFC107; color: #1F2937;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.nr-mf-knopf:active { background: #F59E0B; }
.nr-mf-knopf:disabled { opacity: 0.35; }
.nr-mf-knopf.nr-mf-haupt { background: #F59E0B; color: #2A2113; }  /* Weiss auf Orange hatte 2,2:1 */
.nr-mf-knopf.nr-mf-haupt:active { background: #D97706; }
/* Auswahl an: Faecher, Postfach+Suche und Statuszeile ausblenden -
   die Leiste steht an deren Stelle. */
#screen-nachrichten.nr-mf-an .nr-faecher,
#screen-nachrichten.nr-mf-an .nr-werkzeug,
#screen-nachrichten.nr-mf-an .nr-status { display: none; }
/* Markierte Zeile: heller gelber Grund, das Auge findet das Markierte.
   Der Ankreuzkreis steht ZENTRIERT ueber dem Avatar (der sitzt 10 px
   von der Zeilenkante, 48 px breit -> Mitte 38 px). Ausserhalb der
   Auswahl ist er im Markup unsichtbar. */
#screen-nachrichten.nr-mf-an .konv-item .nr-mf-kreis {
  position: absolute;
  left: 26px; top: 22px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2px solid #CBD5E1;
  display: grid; place-items: center;
  pointer-events: none;
  z-index: 1;
}
.konv-item.nr-markiert { background: #FFFBEB; }
/* Mit #screen-nachrichten gefuehrt, weil die ID-Regel ueber dem Avatar
   hoeher wiegt als jede reine Klassenregel. */
#screen-nachrichten .konv-item.nr-markiert .nr-mf-kreis {
  background: #FFC107; border-color: #FFC107;
}
/* Der Haken: zwei Kanten, gedreht - klassisches Checkbox-Markenzeichen. */
#screen-nachrichten .konv-item.nr-markiert .nr-mf-kreis::after {
  content: "";
  width: 20px; height: 20px;
  border: none; border-radius: 0; background: none;
  border-left: 3.5px solid #1F2937;
  border-bottom: 3.5px solid #1F2937;
  transform: rotate(-45deg) translate(2px, -3px);
  box-sizing: border-box;
}
.konv-item.nr-markiert .konv-name { color: #92400E; }
/* ---------- MA-Befragung (ab 0.6.13.977) ---------- */
/* Viersatz an Aussagen mit je drei Emoticons (gut/teils/schlecht). */
.bef-hinweis {
  margin: 0 0 14px; padding: 12px 14px; font-size: 0.95rem; line-height: 1.45;
  color: #1F2937; background: #ECFDF5; border: 1px solid #A7F3D0;
  border-radius: 12px;
}
.bef-frage {
  margin: 0 0 14px; padding: 14px 14px 12px;
  background: #FFFFFF; border: 1px solid #E4E7EC; border-radius: 12px;
}
.bef-frage-txt {
  font-size: 1.02rem; line-height: 1.4; color: #111827; margin: 0 0 12px;
}
.bef-skala { display: flex; gap: 10px; }
.bef-emoji {
  position: relative; flex: 1 1 0; min-width: 0; display: flex;
  flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px;
  cursor: pointer; background: #F8FAFC; border: 2px solid #E4E7EC;
  border-radius: 12px; font: inherit; color: #64748B;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .1s, background .1s, transform .1s;
}
.bef-emoji:active { transform: scale(0.97); }
/* Ausgewaehlter Zustand (Inhaber 23.10.2026): das GANZE Feld wird in
   leichtem Gelb markiert + dunkle Umrandung + Haken - auf einen Blick
   erkennbar, was der MA gewaehlt hat. */
.bef-emoji.akt {
  border-color: #E6AC00; background: #FCD34D; color: #1F2937;
}
.bef-emoji.akt::after {
  content: "\2713";
  position: absolute; top: 4px; right: 8px;
  font-size: 0.8rem; font-weight: 800; color: #1F2937;
}
.bef-emoji.akt .bef-emoji-label { color: #1F2937; font-weight: 700; }
.bef-emoji-glyph { font-size: 1.9rem; line-height: 1; }
.bef-emoji-label { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.2px; }
/* Blinken der Befragungs-Kachel im Hauptmenue (Inhaber 23.10.2026):
   sanftes Pulsieren in Marken-Gelb, solange die Kachel sichtbar ist. */
#btn-befragung-open .start-btn-label { color: #92400E; font-weight: 700; }
#btn-befragung-open:not(.hidden) {
  animation: bef-kachel-puls 1.6s ease-in-out infinite;
}
@keyframes bef-kachel-puls {
  0%, 100% { background: #FFFFFF; box-shadow: inset 0 0 0 0 rgba(230, 172, 0, 0); }
  50%      { background: #FFFBEB; box-shadow: inset 0 0 0 2px rgba(230, 172, 0, 0.55); }
}
/* Absenden-Button (Inhaber 23.10.2026): erst bei BEANTWORTETEN Fragen
   freigeben - bis dahin eindeutig grau, nicht gelb. */
#btn-bef-absenden:disabled { background: #E5E7EB; color: #9CA3AF; }
.bef-danke-box {
  padding: 30px 18px; text-align: center; background: #FFFFFF;
  border: 1px solid #E4E7EC; border-radius: 12px; color: #374151;
}
.bef-danke-box p { font-size: 0.95rem; line-height: 1.5; }
.bef-status {
  min-height: 1.2em; margin: 10px 0 0; text-align: center;
  font-size: 0.9rem; color: #B91C1C;
}

/* =====================================================================
   MEIN KALENDER (PWA) - Monatsansicht im Google-Kalender-Design,
   0.6.13.998 (wiederhergestellt: Monatsblatt + Terminliste des
   angetippten Tages; "abgesagt" wird grau/durchgestrichen gezeigt).
   ===================================================================== */
#screen-meinkalender .not-body,
#screen-mk-termin .not-body {
  background: #FFFFFF;
}

/* --- Monatskopf (ab 0.6.13.998 ohne Pfeile/Heute; Wischen =
     Monatswechsel, Antippen des Namens = zu heute) ------------------ */
.mk-leiste {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 10px 6px;
  background: #FFFFFF;
}
.mk-titel {
  flex: 1; text-align: left;
  font-size: 1.05rem; font-weight: 700; color: #202124;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
/* --- Monatskopf-Navigation (Inhaber 11.11.2026: "Pfeile und Heute
     besser gestalten"): frueher zerrte der globale button-Reset
     (width:100%, min-height:48px, margin:14px) die drei Elemente in
     riesige graue Bloecke - Titel und Vorwaerts-Pfeil verschwanden
     dabei. Jetzt: Pfeile = kleine runde, zurueckhaltende Buttons wie
     die Kalender-Chips; "Heute" = gelbe Marken-Pille (wie button.chat-
     fwd-senden). Beide setzen die globalen button-Eigenschaften ab. */
.mk-pfeil {
  flex: 0 0 auto; width: 40px; height: 40px; margin: 0; padding: 0;
  min-height: 0; display: grid; place-items: center;
  border: 1px solid #DADCE0; border-radius: 50%;
  background: #FFFFFF; color: #3C4043;
  font-size: 1.6rem; font-weight: 500; line-height: 1;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background .15s;
}
.mk-pfeil:hover { background: #F1F3F4; }
.mk-pfeil:active { background: #FFFBEB; border-color: #E6AC00; }
.mk-heute {
  flex: 0 0 auto; width: auto; margin: 0; min-height: 0;
  padding: 9px 14px; border: none; border-radius: 999px;
  background: #FFC107; color: #1F2937;
  font-size: 0.85rem; font-weight: 700;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
  transition: background .15s;
}
.mk-heute:hover { background: #FFCA28; }
.mk-heute:active { background: #E6AC00; }

/* --- Kalenderwahl (nur bei >=2 Kalendern): Chip-Reihe --------------- */
.mk-wahl {
  display: flex; gap: 8px;
  padding: 0 10px 6px;
  overflow-x: auto; scrollbar-width: none;
}
.mk-wahl::-webkit-scrollbar { display: none; }
.mk-wahl-chip {
  flex: 0 0 auto; margin: 0;
  border: 1px solid #DADCE0; border-radius: 999px;
  background: #FFFFFF; color: #3C4043;
  font-size: 0.85rem; font-weight: 500;
  padding: 6px 12px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.mk-wahl-chip.an {
  background: #E8F0FE; border-color: #1A73E8; color: #174EA6;
}

/* --- Monatsblatt ----------------------------------------------------- */
.mk-blatt { padding: 2px 8px 2px; }
.mk-wt {
  display: grid; grid-template-columns: repeat(7, 1fr);
  padding: 2px 0 4px;
}
.mk-wt span {
  text-align: center;
  font-size: 0.7rem; font-weight: 600; letter-spacing: .04em;
  color: #5F6368;
}
.mk-gitter {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.mk-tag {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  width: 100%; min-height: 38px; padding: 2px 2px 4px;
  margin: 0; /* globale button{margin:14px 0} neutralisieren */
  border: 2px solid transparent; border-radius: 10px;
  background: transparent; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s;
}
.mk-tag:hover { background: #F8F9FA; }
.mk-tag-nr {
  font-size: 0.8rem; font-weight: 500; color: #202124;
  line-height: 1;
  width: 24px; height: 24px; display: grid; place-items: center;
}
/* Heute: blaue Ziffernscheibe wie bei Google */
.mk-heute-tag .mk-tag-nr {
  background: #1A73E8; color: #FFFFFF; border-radius: 50%;
  font-weight: 600;
}
/* Gewaehlter Tag: hellblauer Umschlag */
.mk-gewaehlt { background: #E8F0FE; border-color: #AECBFA; }
.mk-gewaehlt:hover { background: #DCE7FB; }
/* Fremder Monat: hell */
.mk-fremd .mk-tag-nr { color: #C4C7C5; }
/* Feiertag: goldener Strich unter der Zahl */
.mk-feiertag .mk-tag-nr { box-shadow: inset 0 -3px 0 #F9AB00; }
/* Terminpunkte */
.mk-punkte {
  display: flex; gap: 2.5px; align-items: center; justify-content: center;
  min-height: 6px;
}
.mk-punkte i {
  width: 6px; height: 6px; border-radius: 50%;
  display: inline-block;
}
/* Abgesagt: ausgegraute Punkte */
.mk-punkte i.mk-abg-p { opacity: .3; }

/* --- Kopf + Liste des angetippten Tages ----------------------------- */
.mk-tag-kopf {
  padding: 6px 12px 2px;
  font-size: 0.9rem; font-weight: 700; color: #202124;
}
.mk-tag-kopf .termin-feiertag-name {
  font-size: 0.78rem; font-weight: 500; color: #9A5B00;
}
.mk-tag-liste {
  display: flex; flex-direction: column; gap: 5px;
  padding: 4px 10px 12px;
}
.mk-leer {
  padding: 10px 4px; font-size: 0.82rem; color: #5F6368;
}
.mk-termin {
  display: flex; align-items: stretch; gap: 10px;
  width: 100%; text-align: left; margin: 0;
  background: #FFFFFF;
  border: 1px solid #E8EAED; border-radius: 10px;
  padding: 7px 10px; cursor: pointer;
  box-shadow: 0 1px 2px rgba(60, 64, 67, .10);
  -webkit-tap-highlight-color: transparent;
  transition: box-shadow .15s, transform .05s;
}
.mk-termin:hover { box-shadow: 0 2px 8px rgba(60, 64, 67, .18); }
.mk-termin:active { transform: scale(.995); }
.mk-termin-zeit {
  display: flex; flex-direction: column; align-items: flex-start;
  min-width: 42px; padding-top: 1px;
  font-size: 0.82rem; font-weight: 600; color: #202124;
}
.mk-termin-zeit small { font-size: 0.7rem; font-weight: 400; color: #5F6368; }
.mk-termin-balken { width: 4px; border-radius: 2px; flex: 0 0 4px; }
.mk-termin-text {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
  justify-content: center;
}
.mk-termin-titel {
  font-size: 0.88rem; font-weight: 500; color: #202124;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mk-abg-hinweis {
  font-size: 0.7rem; font-weight: 700; letter-spacing: .06em;
  color: #D93025; text-transform: uppercase;
}
.mk-termin-sub {
  font-size: 0.76rem; color: #5F6368;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mk-termin-serie { align-self: center; font-size: 0.88rem; color: #5F6368; }
/* Abgesagter Termin: grau + durchgestrichen */
.mk-termin.mk-abg .mk-termin-titel {
  text-decoration: line-through; color: #5F6368;
}
.mk-termin.mk-abg .mk-termin-zeit { color: #5F6368; }
.mk-termin.mk-abg .mk-termin-balken { opacity: .35; }
.mk-termin.mk-abg .mk-termin-sub { color: #6B7280; }
/* Offene Einladung: heller blauer Umschlag */
.mk-termin.mk-einladung { background: #F8FBFF; border-color: #D2E3FC; }

/* --- Statuszeile ------------------------------------------------------ */
.mk-status { font-size: 0.85rem; padding: 6px 16px 0; }

/* --- Detailansicht (screen-mk-termin) -------------------------------- */
.mk-detail { padding: 8px 16px 24px; }
.mk-d-kopf {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 6px 0 14px;
}
.mk-d-farbe {
  flex: 0 0 5px; width: 5px; align-self: stretch;
  min-height: 44px; border-radius: 3px;
}
.mk-d-titel { font-size: 1.3rem; font-weight: 600; color: #202124; line-height: 1.25; }
.mk-d-zeit { margin-top: 4px; font-size: 0.92rem; font-weight: 500; color: #5F6368; }
.mk-d-wdh { margin-top: 6px; font-size: 0.82rem; color: #5F6368; }
.mk-d-abg {
  margin: 0 0 14px;
  background: #FCE8E6; color: #C5221F;
  border-radius: 10px; padding: 11px 14px;
  font-size: 0.92rem; font-weight: 500;
}
.mk-d-zeile {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 11px 0;
  border-bottom: 1px solid #F1F3F4;
}
.mk-d-zeile:last-of-type { border-bottom: 0; }
.mk-d-sym { flex: 0 0 24px; text-align: center; font-size: 1.05rem; }
.mk-d-wert { font-size: 0.95rem; color: #3C4043; }
.mk-d-text { font-size: 0.95rem; color: #3C4043; white-space: pre-wrap; }
.mk-d-klein { font-size: 0.78rem; color: #5F6368; }
.mk-d-antwort {
  background: #F8F9FA; border-radius: 12px; padding: 12px 14px;
}
.mk-d-knoepfe { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.mk-d-knoepfe .primary { flex: 1; min-width: 120px; }
.mk-loeschen {
  border: 1px solid #DADCE0; border-radius: 10px;
  background: #FFFFFF; color: #D93025;
  font-size: 0.95rem; font-weight: 500;
  padding: 11px 18px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.mk-loeschen:hover { background: #FCE8E6; }

/* --- Formular (screen-mk-form) ---------------------------------------- */
.mk-form { padding: 0 16px 28px; }
.mk-form label {
  display: block;
  font-size: 0.8rem; font-weight: 600; color: #5F6368;
  margin: 20px 0 2px; letter-spacing: .02em;
}
.mk-form .mk-feld {
  width: 100%;
  border: 0; border-bottom: 1px solid #DADCE0; border-radius: 0;
  background: transparent;
  padding: 9px 2px;
  font-size: 1rem; color: #202124;
  outline: none;
  transition: border-color .15s;
}
.mk-form .mk-feld:focus { border-bottom: 2px solid #1A73E8; }
.mk-form textarea.mk-feld { resize: vertical; min-height: 64px; }
.mk-feld-titel { font-size: 1.3rem; font-weight: 500; margin-top: 10px; }
/* Ganztags-Schalter */
.mk-schalter {
  display: flex; justify-content: space-between; align-items: center;
  margin: 16px 0 4px;
  font-size: 0.95rem; font-weight: 500; color: #3C4043;
  cursor: pointer;
}
.mk-schalter input { width: 20px; height: 20px; accent-color: #1A73E8; }
/* Beginn/Ende-Zeile */
.mk-zeile {
  display: flex; align-items: center; gap: 10px;
}
.mk-zeile-lbl {
  flex: 0 0 44px;
  font-size: 0.8rem; font-weight: 600; color: #5F6368;
}
.mk-zeile .mk-datum { flex: 1.5; }
.mk-zeile .mk-zeit { flex: 1; }
/* Erinnerung-Chips */
.mk-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.mk-chip {
  border: 1px solid #DADCE0; border-radius: 999px;
  background: #FFFFFF; color: #3C4043;
  font-size: 0.85rem; font-weight: 500;
  padding: 8px 15px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.mk-chip.an { background: #E8F0FE; border-color: #1A73E8; color: #174EA6; }
/* Farbkreise */
.mk-farben { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.mk-farbe {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid transparent; padding: 0; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .1s;
}
.mk-farbe.an { border-color: #202124; transform: scale(1.1); }
.mk-hinweis { font-size: 0.78rem; color: #5F6368; margin: 8px 0 0; line-height: 1.45; }
.mk-fehler { color: #D93025; font-size: 0.88rem; font-weight: 500; }
#btn-mk-speichern { margin-top: 28px; width: 100%; }

/* --- Groessere Displays (Landschaft / Tablet) ------------------------- */
@media (min-width: 640px) {
  .mk-tag { min-height: 58px; }
  .mk-tag-nr { font-size: 0.98rem; }
  .mk-punkte i { width: 6px; height: 6px; }
  .mk-termin { padding: 10px 14px; }
  .mk-titel { font-size: 1.15rem; }
}

/* ---------- Beleg-Upload / Buchhaltung (ab 0.7.0.19) ------------------ */
/* Nur Inhaber: PDF/Foto hochladen, KI kontiert im Hintergrund auf dem
   Mobile-Server, Buchung auf dem Desktop. Code: app.js (bh*). */
.bh-inhalt { padding: 14px 14px 30px; }
.bh-taste { display: flex; gap: 10px; margin-bottom: 14px; }
.bh-btn { flex: 1; padding: 14px 10px; font-size: 0.95rem; font-weight: 600;
  border: none; border-radius: 12px; background: #FFC107; color: #1F2937; }
.bh-btn:active { background: #F59E0B; }
.bh-msg { font-size: 0.85rem; color: #1E3A8A; background: #EFF6FF;
  border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; line-height: 1.45; }
.bh-msg-fehl { color: #B91C1C; background: #FEF2F2; }
.bh-leer { color: #6B7280; font-size: 0.9rem; text-align: center;
  padding: 26px 12px; line-height: 1.5; }
.bh-eintrag { background: #fff; border: 1px solid #E5E7EB; border-radius: 12px;
  padding: 10px 12px; margin-bottom: 10px; }
.bh-zeile1 { display: flex; align-items: center; gap: 8px; }
.bh-icon { font-size: 1.1rem; line-height: 1; }
.bh-name { flex: 1; font-size: 0.92rem; font-weight: 600; color: #111827;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bh-betrag { font-size: 0.9rem; font-weight: 700; color: #111827;
  white-space: nowrap; }
.bh-konto { font-size: 0.8rem; color: #6B7280; margin-top: 5px; }
.bh-zeile2 { display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px; gap: 8px; }
.bh-st { font-size: 0.75rem; font-weight: 700; padding: 3px 9px;
  border-radius: 999px; white-space: nowrap; }
.bh-st-neu { color: #1D4ED8; background: #DBEAFE; }
.bh-st-ki  { color: #92400E; background: #FEF3C7; }
.bh-st-ko  { color: #C2410C; background: #FFEDD5; }
.bh-st-gb  { color: #15803D; background: #DCFCE7; }
.bh-st-ab  { color: #B91C1C; background: #FEE2E2; }
.bh-st-dl  { color: #4B5563; background: #F3F4F6; }
.bh-datum { font-size: 0.75rem; color: #6B7280; white-space: nowrap; }
/* ================================================================
   Azubis (ab 0.7.0.23, Inhaber 21.10.2026) - Freitag-Bewertung +
   Gespraechsprotokolle in der PWA. Alle Klassen azb*-praefixiert.
   ================================================================ */
.azb-seg {
  flex: 1;
  background: #FFFFFF;
  border: 1px solid #E4DDCE;
  border-radius: 10px;
  color: #5B554B;
  font-size: 0.95rem;
  padding: 8px 6px;
}
.azb-seg-active {
  background: #2563EB;
  border-color: #2563EB;
  color: #FFFFFF;
  font-weight: 600;
}
.azb-status { color: #6B6459; font-size: 0.85rem; margin: 8px 0; }
.azb-status-err { color: #B91C1C; }
.azb-label {
  display: block;
  color: #5B554B;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 12px 0 4px;
}
.azb-label-hint { font-weight: 400; color: #6B7280; }
.azb-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #E4DDCE;
  border-radius: 10px;
  padding: 10px;
  font-size: 1rem;
  background: #FFFFFF;
  color: #0F172A;
}
.azb-textarea { resize: vertical; font-family: inherit; }
.azb-checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 10px;
  background: #FFFFFF;
  border: 1px solid #E4DDCE;
  border-radius: 10px;
  padding: 8px 10px;
  max-height: 160px;
  overflow-y: auto;
}
.azb-checks label { font-size: 0.85rem; color: #0F172A; }
/* Bewertungskarte je Azubi */
.azb-bew-karte {
  background: #FFFFFF;
  border: 1px solid #E4DDCE;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.azb-bew-karte-erledigt { border-color: #86EFAC; background: #F0FDF4; }
.azb-bew-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 2px;
}
.azb-bew-woche { font-size: 0.78rem; color: #6B6459; margin-bottom: 8px; }
.azb-krit { margin: 8px 0; }
.azb-krit-label { font-size: 0.88rem; color: #5B554B; font-weight: 600; }
.azb-punkte { display: flex; gap: 6px; margin-top: 4px; }
.azb-punkt {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid #E4DDCE;
  background: #FFFFFF;
  font-size: 1rem;
  font-weight: 600;
  color: #0F172A;
}
.azb-punkt-aktiv { background: #2563EB; border-color: #2563EB; color: #FFFFFF; }
.azb-punkt-fest { opacity: 0.55; }
.azb-bew-summe { font-size: 0.9rem; color: #0F766E; font-weight: 700; margin-top: 6px; }
/* Protokoll-Liste */
.azb-g-eintrag {
  background: #FFFFFF;
  border: 1px solid #E4DDCE;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
}
.azb-g-eintrag:active { background: #F5F2EC; }
.azb-g-zeile1 { font-weight: 600; color: #0F172A; font-size: 0.92rem; }
.azb-g-zeile2 { font-size: 0.8rem; color: #6B6459; margin-top: 2px; }
.azb-g-kat {
  display: inline-block;
  font-size: 0.72rem;
  border-radius: 8px;
  padding: 1px 8px;
  background: #EFF6FF;
  color: #2563EB;
  margin-left: 6px;
}


/* =====================================================================
   KI-Chat (ab 0.7.0.30, gelber Akzent statt Gruen, Inhaber-Vorgabe
   21.10.2026; eingefuehrt ab 0.7.0.26): Chat-Board des PWA-Screens
   #screen-kichat. Aufbau wie die Azubis-Design-Sprache: helle Bubbles,
   gelber Akzent, eigener Praefix .kichat-* (kein Ueberbau der
   .chat-bubble des Mitarbeiter-Chats).
   ===================================================================== */
.kichat-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.kichat-nachricht { display: flex; flex-direction: column; max-width: 85%; }
.kichat-nachricht.kichat-user { align-self: flex-end; align-items: flex-end; }
.kichat-nachricht.kichat-ki   { align-self: flex-start; align-items: flex-start; }
.kichat-zeit { font-size: 0.6875rem; color: #6B6459; margin: 0 4px 3px; }
.kichat-bubbel {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.95rem;
  line-height: 1.45;
  word-wrap: break-word;
}
.kichat-nachricht.kichat-user .kichat-bubbel {
  background: #FFC107;
  color: #1F2937;
  border-bottom-right-radius: 4px;
}
.kichat-nachricht.kichat-ki .kichat-bubbel {
  background: #F5F2EC;
  color: #2B2A26;
  border: 1px solid #E4DDCE;
  border-bottom-left-radius: 4px;
}
.kichat-bubbel.kichat-denkt {
  color: #6B6459;
  font-style: italic;
}
/* ab 0.7.0.30: Spezifitaet erhoeht (nachricht + bubbel + fehler), damit
   die rote Fehler-Bubbel nicht vom .kichat-ki-Bubbel-Regel ueberstrichen
   wird (gleiche Klassentiefe, hier spaeter in der Datei). */
.kichat-nachricht .kichat-bubbel.kichat-fehler {
  background: #FDECEC;
  border: 1px solid #F3C1C1;
  color: #9B1C1C;
}
.kichat-leer {
  margin: auto;
  padding: 40px 18px;
  text-align: center;
  color: #6B6459;
  font-size: 0.9rem;
  line-height: 1.5;
}
.kichat-inputzeile {
  display: flex;
  gap: 8px;
  padding: 10px 14px 14px;
  border-top: 1px solid #E4DDCE;
  background: #FBFAF7;
}
.kichat-input {
  flex: 1;
  height: 44px;
  border: 1px solid #C9C3B8;
  border-radius: 22px;
  padding: 0 16px;
  font-size: 1rem;
  background: #FFFFFF;
  color: #2B2A26;
}
.kichat-input:focus { outline: 2px solid #E6AC00; border-color: #E6AC00; }
.kichat-senden {
  width: 44px;
  height: 44px;
  min-height: 0;   /* ab 0.7.0.30: globale button-min-height 48px ueberschreiben */
  margin: 0;
  border: none;
  border-radius: 50%;
  background: #FFC107;
  color: #1F2937;
  font-size: 1.1rem;
  flex: 0 0 auto;
}
.kichat-senden:active { background: #E6AC00; }
.kichat-senden:disabled {
  background: #E2E8F0;
  color: #94A3B8;
  cursor: default;
}

/* Sprach-Eingabe des KI-Chat (ab 0.7.0.27): Mikrotasten + Statuszeile. */
.kichat-sprache {
  width: 44px;
  height: 44px;
  min-height: 0;   /* ab 0.7.0.30: globale button-min-height 48px ueberschreiben */
  margin: 0;
  border: 1px solid #C9C3B8;
  border-radius: 50%;
  background: #FFFFFF;
  font-size: 1.1rem;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.kichat-sprache.kichat-sprache-an {
  background: #B3261E;
  border-color: #B3261E;
  animation: kichat-sprache-puls 1.2s ease-in-out infinite;
}
@keyframes kichat-sprache-puls {
  0%, 100% { box-shadow: 0 0 0 0 rgba(179, 38, 30, 0.35); }
  50%       { box-shadow: 0 0 0 8px rgba(179, 38, 30, 0); }
}
.kichat-sprache-status {
  cursor: pointer;
  margin: 0;
  padding: 0 16px 10px;
  font-size: 0.8rem;
  color: #6B7280;
  text-align: center;
  min-height: 1.2em;
  background: #FBFAF7;
}
.kichat-sprache-status.kichat-sprache-fehler { color: #9B1C1C; }

/* Antwort-Sprache des KI-Chat (ab 0.7.0.28): echte TTS-Sprachdatei
   (Telegram-artiges Audio-Element) oder der "Antwort anhören"-Knopf,
   der den Text per speechSynthesis vorspricht. */
.kichat-audio {
  width: 100%;
  max-width: 260px;
  margin-top: 6px;
  padding: 3px 4px;
  box-sizing: border-box;
  height: 40px;
  background: #F5F2EC;
  border: 1px solid #E4DDCE;
  border-radius: 12px;
}
/* ab 0.7.0.30: Kompakte Pill statt vollem Button (globales
   button{width:100%; min-height:48px} explizit zuruecksetzen). */
.kichat-sprich-btn {
  display: inline-block;
  width: auto;
  min-height: 0;
  margin: 6px 0 0;
  padding: 6px 12px;
  border: 1px solid #FCD34D;
  border-radius: 16px;
  background: #FFFBEB;
  color: #92400E;
  font-size: 0.8rem;
  cursor: pointer;
}
.kichat-sprich-btn.kichat-sprich-an {
  background: #FFC107;
  color: #1F2937;
  border-color: #E6AC00;
}

/* Sprachdatei-Bubble des KI-Chat (ab 0.7.0.29): der Audio-Player sitzt
   ohne Bubbles-Hintergrund, nur die Datei - wie bei Telegram. */
.kichat-audio-bubbel {
  background: transparent;
  border: none;
  padding: 0;
}

/* Leerer Chat (ab 0.7.0.30): grosses Icon + Beispiel-Frage-Chips. */
.kichat-leer-icon {
  font-size: 3.5rem;
  margin-bottom: 12px;
}
/* ab 0.7.0.30: Kompakte Pills statt vollem Button (globales
   button{width:100%; min-height:48px} explizit zuruecksetzen). */
.kichat-vorschlag {
  display: inline-block;
  width: auto;
  min-height: 0;
  margin: 8px 6px 0 0;
  padding: 7px 14px;
  border: 1px solid #E4DDCE;
  border-radius: 18px;
  background: #FFFFFF;
  color: #1F2937;
  font-size: 0.82rem;
  cursor: pointer;
}
.kichat-vorschlag:active {
  background: #FFFBEB;
  border-color: #FCD34D;
}

/* Nur mit Mikrofon (ab 0.7.0.37, Inhaber): Jarvis-Texteingabe und
   Senden-Button sind ausgeblendet, das Mikrofon zentriert und
   griffgroessig; Vorschlag-Chips gibt es nicht mehr (Leerzustand
   in app.js). Fallback ohne Web Speech schaltet die Eingabe per
   Inline-Style wieder frei. */
.kichat-inputzeile .kichat-input,
.kichat-inputzeile .kichat-senden {
  display: none;
}
.kichat-inputzeile {
  justify-content: center;
  padding-bottom: 18px;
}
.kichat-inputzeile .kichat-sprache {
  width: 64px;
  height: 64px;
  font-size: 1.7rem;
}
/* Stopp-Button (ab 0.7.0.43): erscheint in der Inputzeile, WAEHREND
   eine Antwort-Stimme laeuft (app.js jsvStoppSichtbar); ein Tipp
   stoppt die Wiedergabe sofort. Roter Akzent wie Aufnahme-Rot. */
.kichat-stopp {
  width: auto;
  height: 44px;
  min-height: 0;
  margin: 0 6px;
  padding: 0 16px;
  border: 1.5px solid #B3261E;
  border-radius: 22px;
  background: #FDECEA;
  color: #B3261E;
  font-size: 0.95rem;
  font-weight: 600;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: kichat-sprache-puls 1.2s ease-in-out infinite;
}
.kichat-stopp:active { background: #B3261E; color: #FFFFFF; }
/* Audio-Leiste (ab 0.7.0.44): Telegram-artige Antwort-Stimme in der
   Jarvis-Bubble — Fortschritt + Zeit, Tipp = Abspielen/Stoppen
   (app.js jsvVorlesen). Laeuft SOFORT automatisch, wenn die Antwort
   kommt (fertig-Zweig). */
.jsv-audiobar {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 260px;
  margin-top: 8px;
  padding: 8px 12px;
  border: 1px solid #FCD34D;
  border-radius: 18px;
  background: #FFFBEB;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.jsv-audiobar:active { background: #FEF3C7; }
.jsv-audiobar-ikon {
  color: #92400E;
  font-size: 1rem;
  flex: 0 0 auto;
}
.jsv-audiobar-koerper {
  flex: 1 1 auto;
  overflow: hidden;
  min-width: 0;
}
.jsv-audiobar-bahn {
  display: block;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: #FDE68A;
  overflow: hidden;
}
.jsv-audiobar-fuellung {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 2px;
  background: #B3261E;
  transition: width 0.2s linear;
}
.jsv-audiobar-zeit {
  flex: 0 0 auto;
  font-size: 0.75rem;
  color: #92400E;
  font-variant-numeric: tabular-nums;
}


/* Flyer-Liste: Umschalter "Auch Standorte anderer Mitarbeiter" (0.7.0.48) */
.fl-alle-reihe {
  display: block;
  padding: 8px 12px 2px;
  font-size: 13px;
  color: #374151;
}
.fl-alle-reihe input { margin-right: 6px; transform: scale(1.15); }

/* ab 0.7.0.63 — WhatsApp-Status (nr-keinwa) */
.ticks.nr-keinwa { color:#B91C1C; font-weight:700; font-size:1.05em; }
.nr-marke-keinwa { background:#B91C1C; color:#FFFFFF; border-radius:8px; padding:1px 6px; font-size:0.7rem; margin-left:4px; white-space:nowrap; }
.nr-kopf-keinwa { color:#B91C1C; font-weight:600; }

/* ---- HW-Tour Buerohalt (ab 0.7.0.176) --------------------------------
   Buerotext ("Bueroarbeit"/"Buero") im Wochenplan: in der PWA start-
   und beendbar wie ein Kundenhalt, aber ohne Kunde, Adresse, Buchung,
   Doku und Unterschrift. Alle Karten- und Button-Klassen werden
   wiederverwendet - neu ist nur das Marken-Gelb am Kartenrand, damit
   ein Buerohalt auf einen Blick von einem Kundenhalt zu unterscheiden
   ist. Status-Farben behalten Vorrang: "laeuft jetzt" bleibt blau,
   erledigtes tritt grau zurueck (diese Regeln stehen frueher in der
   Datei und gelten durch die :not-Ausschluesse weiter). */
.thw-halt.thw-buero:not(.thw-fertig):not(.thw-laeuft-jetzt) {
  border-left-color: #FFC107; background: #FFFBEB;
}

/* ================================================================
   HW-Tour: Fahrzeit pro Halt + Tagessumme (ab 0.7.0.181, Inhaber:
   "in PWA Hauswirtschaft Touren auch die Fahrzeiten anzeigen")
   Dieselbe Quelle wie die Desktop-Sicht "Touren (live)" (OSRM-Cache,
   vom Server gerechnet): die Zeile steht unter den Notizen des
   Halts, die Tagessumme im gelben Tag-Kasten (erbt .thw-zeit-status,
   keine eigene Regel).
   ================================================================ */
.thw-fahrt {
  margin-top: 6px; font-size: 0.85rem; color: #1F2937; line-height: 1.35;
  background: #FFFBEB; border-left: 3px solid #FCD34D;
  border-radius: 4px; padding: 3px 8px;
}
.thw-fahrt.thw-fahrt-offen { color: #92400E; }

/* ================================================================
   HW-Tour: Anfangszeit entsprechend der Fahrzeit (ab 0.7.0.182,
   Inhaber: "die Anfangszeiten anpassen", Vorschlag 04.11.2026):
   die groe Zeitzeile zeigt, wann man beim Kunden ist, die
   abgerechnete Planzeit steht klein darunter.
   ================================================================ */
.thw-halt-plan {
  margin-top: 2px; font-size: 0.78rem; color: #6B7280;
}
.thw-einsatz-zeit {
  margin-top: 2px; font-weight: 700; font-size: 1rem; color: #111827;
}

/* ================================================================
   Alle Touren: HW-Fahrzeit neben dem Halt (ab 0.7.0.415, Inhaber
   11.11.2026: "in PWA / alle Touren muessen neben den Halten die
   Fahrtzeiten angezeigt werden in der Hauswirtschaft"): die
   Halt-Zeile wird wrapp-faehig, die Fahrzeit-Leiste (thw-fahrt,
   dieselbe Komponente wie in der HW-Tour) nimmt eine eigene
   Zeile unter der Namenzeile ein.
   ================================================================ */
.ta-halt { flex-wrap: wrap; }
.ta-halt .thw-fahrt { flex: 1 1 100%; margin-top: 4px; }

/* =====================================================================
   Jarvis neu gestaltet (ab 0.7.0.490, Inhaber 16.11.2026: „Jarvis muss
   … geiler gestaltet sein"). Dunkle Bühne, EIN Gelb (#F2C400) als Licht.
   Der Mikrofon-Knopf ist eine leuchtende Kugel, die zeigt, was Jarvis
   gerade tut: app.js (jsvOrbTakt) setzt #screen-jarvis[data-zustand]
   = bereit | hoert | versteht | denkt | spricht und --pegel (0..1, Stimme).
   Alles ist auf #screen-jarvis begrenzt – andere Chats bleiben, wie sie sind.
   ===================================================================== */
#screen-jarvis {
  --jsv-gelb: #F2C400;
  --jsv-gelb-hell: #FFE680;
  --jsv-grund: #0B0E14;
  --jsv-text: #ECEDEF;
  --jsv-leise: #9AA0A9;
  --pegel: 0;
  background:
    radial-gradient(90% 32% at 50% 100%, rgba(242,196,0,0.09) 0%, rgba(242,196,0,0) 70%),
    radial-gradient(90% 40% at 50% -10%, rgba(242,196,0,0.07) 0%, rgba(242,196,0,0) 70%),
    var(--jsv-grund);
  color: var(--jsv-text);
}
#screen-jarvis .chat-header {
  background: rgba(11,14,20,0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  color: var(--jsv-text);
  box-shadow: none;
}
#screen-jarvis .chat-header .hdr-btn { color: var(--jsv-text); background: transparent; }
#screen-jarvis .chat-header .hdr-btn:active { background: rgba(255,255,255,0.08); }
#screen-jarvis .jsv-kopf {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; align-items: center; line-height: 1.15;
}
#screen-jarvis .chat-header .hdr-title {
  color: var(--jsv-text);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.95rem;
  font-weight: 700;
}
#screen-jarvis .jsv-zustand {
  margin-top: 2px;
  font-size: 0.72rem;
  color: var(--jsv-leise);
  display: inline-flex; align-items: center; gap: 6px;
}
#screen-jarvis .jsv-zustand::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: #4ADE80; box-shadow: 0 0 8px rgba(74,222,128,0.8);
}
#screen-jarvis[data-zustand="hoert"] .jsv-zustand::before,
#screen-jarvis[data-zustand="versteht"] .jsv-zustand::before,
#screen-jarvis[data-zustand="denkt"] .jsv-zustand::before,
#screen-jarvis[data-zustand="spricht"] .jsv-zustand::before {
  background: var(--jsv-gelb); box-shadow: 0 0 10px rgba(242,196,0,0.9);
  animation: jsv-blink 1s ease-in-out infinite;
}
@keyframes jsv-blink { 50% { opacity: 0.35; } }

/* ---- Verlauf ---- */
#screen-jarvis .kichat-list { background: transparent; padding: 18px 14px 10px; gap: 14px; }
#screen-jarvis .kichat-nachricht { max-width: 88%; animation: jsv-rein 0.32s ease-out both; }
@keyframes jsv-rein { from { opacity: 0; transform: translateY(8px); } }
#screen-jarvis .kichat-zeit { color: #6B7280; }
#screen-jarvis .kichat-bubbel { font-size: 0.97rem; line-height: 1.55; padding: 11px 15px; }
#screen-jarvis .kichat-nachricht.kichat-user .kichat-bubbel {
  background: linear-gradient(135deg, var(--jsv-gelb-hell) 0%, var(--jsv-gelb) 55%);
  color: #17140A;
  border: 0;
  border-radius: 18px 18px 5px 18px;
  box-shadow: 0 6px 20px rgba(242,196,0,0.18);
}
#screen-jarvis .kichat-nachricht.kichat-ki { position: relative; padding-left: 34px; }
#screen-jarvis .kichat-nachricht.kichat-ki::before {
  content: ""; position: absolute; left: 0; top: 4px;
  width: 24px; height: 24px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFF6C9 0%, var(--jsv-gelb) 45%, #8A6A00 100%);
  box-shadow: 0 0 12px rgba(242,196,0,0.45);
}
#screen-jarvis .kichat-nachricht.kichat-ki .kichat-bubbel {
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.09);
  color: var(--jsv-text);
  border-radius: 18px 18px 18px 5px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
#screen-jarvis .kichat-bubbel strong { color: var(--jsv-gelb); font-weight: 700; }
#screen-jarvis .kichat-nachricht.kichat-user .kichat-bubbel strong { color: inherit; }
#screen-jarvis .jsv-punkt { color: var(--jsv-gelb); font-weight: 700; margin-right: 4px; }
#screen-jarvis .kichat-nachricht .kichat-bubbel.kichat-fehler {
  background: rgba(179,38,30,0.14);
  border: 1px solid rgba(255,120,110,0.35);
  color: #FFB4AB;
}
/* Wartebubble: Arbeitsschritte als Liste (✓ erledigt, ● läuft) */
#screen-jarvis .kichat-bubbel.kichat-denkt { font-style: normal; color: var(--jsv-leise); min-width: 210px; }
#screen-jarvis .jsv-schritte { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
#screen-jarvis .jsv-schritte li {
  display: flex; gap: 8px; align-items: flex-start; font-size: 0.86rem; line-height: 1.35;
  /* globale Regel „ul li“ (weiße Karte) aufheben */
  background: transparent; border: 0; border-radius: 0; padding: 0; margin: 0; box-shadow: none;
}
#screen-jarvis .jsv-schritte li::before {
  content: "✓"; flex: 0 0 14px; color: #4ADE80; font-weight: 700; font-size: 0.8rem; margin-top: 1px;
}
#screen-jarvis .jsv-schritte li.jsv-aktiv { color: var(--jsv-text); }
#screen-jarvis .jsv-schritte li.jsv-aktiv::before {
  content: ""; width: 8px; height: 8px; flex: 0 0 8px; margin: 5px 3px 0;
  border-radius: 50%; background: var(--jsv-gelb);
  box-shadow: 0 0 10px rgba(242,196,0,0.9);
  animation: jsv-blink 0.9s ease-in-out infinite;
}
#screen-jarvis .jsv-schritte .jsv-uhr { margin-left: auto; padding-left: 10px; white-space: nowrap; color: #6B7280; font-variant-numeric: tabular-nums; }

/* Leerzustand */
#screen-jarvis .kichat-leer { color: var(--jsv-leise); padding: 28px 18px; }
#screen-jarvis .jsv-hero-kugel {
  width: 112px; height: 112px; margin: 0 auto 22px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFF6C9 0%, var(--jsv-gelb) 42%, #7A5D00 100%);
  box-shadow: 0 0 40px rgba(242,196,0,0.45), 0 0 110px rgba(242,196,0,0.2);
  animation: jsv-atmen 4s ease-in-out infinite;
}
#screen-jarvis .jsv-hero-titel { color: var(--jsv-text); font-size: 1.35rem; font-weight: 700; margin-bottom: 6px; }
#screen-jarvis .jsv-hero-text { font-size: 0.92rem; margin-bottom: 18px; }
#screen-jarvis .jsv-beispiele { display: flex; flex-direction: column; gap: 8px; max-width: 320px; margin: 0 auto; }
#screen-jarvis .jsv-beispiele span {
  display: block; padding: 9px 14px; border-radius: 14px;
  border: 1px dashed rgba(242,196,0,0.28); color: #C9CCD1; font-size: 0.85rem;
}
@keyframes jsv-atmen { 50% { transform: scale(1.05); box-shadow: 0 0 55px rgba(242,196,0,0.55), 0 0 130px rgba(242,196,0,0.25); } }

/* ---- Bedienleiste mit Kugel ---- */
#screen-jarvis .kichat-inputzeile {
  position: relative;
  background: linear-gradient(180deg, rgba(11,14,20,0) 0%, rgba(11,14,20,0.92) 45%);
  border-top: 0;
  padding: 24px 16px 8px;
  gap: 22px;
  align-items: center;
  justify-content: center;
}
#screen-jarvis .kichat-inputzeile .kichat-sprache {
  position: relative;
  width: 78px; height: 78px; min-height: 0;
  border: 0; border-radius: 50%;
  font-size: 0; color: transparent;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2317140A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='2' width='6' height='12' rx='3'/%3E%3Cpath d='M5 10a7 7 0 0 0 14 0M12 17v4M8 21h8'/%3E%3C/svg%3E") center / 30px no-repeat,
    radial-gradient(circle at 35% 30%, #FFF6C9 0%, var(--jsv-gelb) 42%, #8A6A00 100%);
  box-shadow:
    0 0 calc(22px + var(--pegel) * 70px) rgba(242,196,0,0.55),
    inset 0 -6px 14px rgba(0,0,0,0.25);
  transform: scale(calc(1 + var(--pegel) * 0.22));
  transition: transform 0.09s linear, box-shadow 0.09s linear;
  animation: jsv-atmen-klein 3.6s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
}
#screen-jarvis .kichat-inputzeile .kichat-sprache::before,
#screen-jarvis .kichat-inputzeile .kichat-sprache::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
}
#screen-jarvis .kichat-inputzeile .kichat-sprache::before { inset: -9px; border: 2px solid rgba(242,196,0,0.30); }
#screen-jarvis .kichat-inputzeile .kichat-sprache::after { inset: -20px; border: 1px solid rgba(242,196,0,0.14); }
@keyframes jsv-atmen-klein { 50% { filter: brightness(1.08); } }
/* hört zu: Wellen laufen nach außen, Kugel folgt der Stimme */
#screen-jarvis[data-zustand="hoert"] .kichat-inputzeile .kichat-sprache { animation: none; }
#screen-jarvis[data-zustand="hoert"] .kichat-inputzeile .kichat-sprache::before,
#screen-jarvis[data-zustand="hoert"] .kichat-inputzeile .kichat-sprache::after {
  inset: -6px; border: 2px solid rgba(242,196,0,0.55);
  animation: jsv-welle 1.6s ease-out infinite;
}
#screen-jarvis[data-zustand="hoert"] .kichat-inputzeile .kichat-sprache::after { animation-delay: 0.8s; }
@keyframes jsv-welle { from { transform: scale(1); opacity: 0.9; } to { transform: scale(1.75); opacity: 0; } }
/* versteht/denkt: Lichtring kreist */
#screen-jarvis[data-zustand="versteht"] .kichat-inputzeile .kichat-sprache::before,
#screen-jarvis[data-zustand="denkt"] .kichat-inputzeile .kichat-sprache::before {
  inset: -10px; border: 3px solid transparent;
  border-top-color: var(--jsv-gelb); border-right-color: rgba(242,196,0,0.4);
  animation: jsv-kreis 0.9s linear infinite;
}
#screen-jarvis[data-zustand="denkt"] .kichat-inputzeile .kichat-sprache::after {
  inset: -22px; border: 2px solid transparent;
  border-bottom-color: rgba(242,196,0,0.5);
  animation: jsv-kreis 1.8s linear infinite reverse;
}
@keyframes jsv-kreis { to { transform: rotate(360deg); } }
/* spricht: ruhiger Puls im Takt */
#screen-jarvis[data-zustand="spricht"] .kichat-inputzeile .kichat-sprache::before,
#screen-jarvis[data-zustand="spricht"] .kichat-inputzeile .kichat-sprache::after {
  animation: jsv-welle 1.1s ease-out infinite;
}
#screen-jarvis[data-zustand="spricht"] .kichat-inputzeile .kichat-sprache::after { animation-delay: 0.55s; }
#screen-jarvis .kichat-stopp {
  position: absolute; right: 16px; top: 50%; transform: translateY(-30%);
  height: 40px; margin: 0; padding: 0 14px 0 12px;
  background: rgba(255,255,255,0.07); color: var(--jsv-text);
  border: 1px solid rgba(255,255,255,0.14); border-radius: 20px;
  font-size: 0.85rem; animation: none; gap: 6px;
}
#screen-jarvis .kichat-stopp:active { background: rgba(255,255,255,0.16); color: #fff; }
#screen-jarvis .kichat-input {
  background: rgba(255,255,255,0.06); color: var(--jsv-text);
  border: 1px solid rgba(255,255,255,0.14);
}
#screen-jarvis .kichat-sprache-status {
  background: rgba(11,14,20,0.92); color: var(--jsv-leise);
  text-align: center; min-height: 1.2em; margin: 0;
  padding: 0 16px calc(10px + env(safe-area-inset-bottom, 0px));
}
#screen-jarvis .kichat-sprache-status.kichat-sprache-fehler { color: #FFB4AB; }
/* Antwort-Stimme */
#screen-jarvis .jsv-audiobar {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  color: var(--jsv-text);
}
#screen-jarvis .jsv-audiobar:active { background: rgba(242,196,0,0.12); }
#screen-jarvis .jsv-audiobar-ikon { display: inline-flex; color: var(--jsv-gelb); font-size: 0; }

/* ---- ab 0.7.0.543 (Inhaber 17.11.2026: „PWA ist nicht optimal … es muss
   mega sein“): Antwort wächst beim Schreiben, Abbrechen / Nochmal fragen,
   Beispiele zum Antippen, neues Gespräch. ---- */
/* Die App setzt jeden <button> auf volle Breite / 48 px – hier zurück. */
#screen-jarvis .kichat-list button,
#screen-jarvis .jsv-neu {
  width: auto; min-height: 0; margin: 0; font-family: inherit;
  -webkit-tap-highlight-color: transparent; cursor: pointer;
}
#screen-jarvis .jsv-neu {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; padding: 0;
}
/* Antwort, während sie geschrieben wird */
#screen-jarvis .kichat-nachricht.jsv-ruhig { animation: none; }
#screen-jarvis .jsv-cursor {
  display: inline-block; width: 8px; height: 1.05em; margin-left: 3px;
  vertical-align: -0.18em; border-radius: 2px; background: var(--jsv-gelb);
  box-shadow: 0 0 10px rgba(242,196,0,0.8);
  animation: jsv-blink 0.8s ease-in-out infinite;
}
/* kleine Knöpfe unter einer Blase */
#screen-jarvis .jsv-abbrechen,
#screen-jarvis .jsv-nochmal {
  display: inline-flex; align-items: center; align-self: flex-start;
  height: 34px; margin-top: 8px; padding: 0 14px;
  background: rgba(255,255,255,0.05); color: var(--jsv-leise);
  border: 1px solid rgba(255,255,255,0.14); border-radius: 17px;
  font-size: 0.82rem; font-weight: 600;
}
#screen-jarvis .jsv-nochmal { color: var(--jsv-gelb); border-color: rgba(242,196,0,0.4); }
#screen-jarvis .jsv-abbrechen:active,
#screen-jarvis .jsv-nochmal:active { background: rgba(255,255,255,0.14); }
#screen-jarvis .jsv-abbrechen:disabled { opacity: 0.55; }
#screen-jarvis .kichat-nachricht.jsv-abgebrochen .kichat-bubbel.kichat-fehler {
  background: rgba(255,255,255,0.04); border: 1px dashed rgba(255,255,255,0.16);
  color: var(--jsv-leise); font-style: italic;
}
/* Beispiele = Knöpfe */
#screen-jarvis .jsv-beispiele .jsv-beispiel {
  display: block; width: 100%; padding: 11px 14px; border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(242,196,0,0.28); color: #D8DADE;
  font-size: 0.88rem; text-align: left; line-height: 1.35;
  transition: background 0.12s, border-color 0.12s, transform 0.12s;
}
#screen-jarvis .jsv-beispiele .jsv-beispiel::after {
  content: "›"; float: right; margin-left: 10px; color: var(--jsv-gelb); font-weight: 700;
}
#screen-jarvis .jsv-beispiele .jsv-beispiel:active {
  background: rgba(242,196,0,0.14); border-color: var(--jsv-gelb); transform: scale(0.985);
}
#screen-jarvis .jsv-frueher {
  margin-top: 18px; padding: 6px 10px; background: transparent; border: 0;
  color: var(--jsv-leise); font-size: 0.8rem; text-decoration: underline;
}
#screen-jarvis .jsv-frueher.jsv-frueher-oben { align-self: center; margin-top: 0; }
#screen-jarvis .jsv-trenner {
  align-self: stretch; display: flex; align-items: center; gap: 10px;
  color: #6B7280; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
}
#screen-jarvis .jsv-trenner::before,
#screen-jarvis .jsv-trenner::after { content: ""; flex: 1; height: 1px; background: rgba(255,255,255,0.10); }
/* Textfeld + Senden statt Kugel: NUR auf Geräten ohne Mikrofon-Technik
   (ab 0.7.0.544 kein Umschalter mehr – Inhaber: „nur sprechen“). */
#screen-jarvis.jsv-tippen .kichat-inputzeile { padding: 14px 14px 8px; gap: 8px; justify-content: flex-start; }
#screen-jarvis.jsv-tippen .kichat-inputzeile .kichat-sprache,
#screen-jarvis.jsv-tippen .kichat-stopp { display: none !important; }
#screen-jarvis.jsv-tippen .kichat-inputzeile .kichat-input {
  display: block; flex: 1; min-width: 0; height: 44px;
}
#screen-jarvis.jsv-tippen .kichat-inputzeile .kichat-input::placeholder { color: #7B818B; }
#screen-jarvis.jsv-tippen .kichat-inputzeile .kichat-input:focus {
  outline: none; border-color: var(--jsv-gelb); box-shadow: 0 0 0 3px rgba(242,196,0,0.22);
}
#screen-jarvis.jsv-tippen .kichat-inputzeile .kichat-senden {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px;
  background: var(--jsv-gelb); color: #17140A;
}
#screen-jarvis .jsv-audiobar-bahn { background: rgba(255,255,255,0.14); }
#screen-jarvis .jsv-audiobar-fuellung { background: var(--jsv-gelb); }
#screen-jarvis .jsv-audiobar-zeit { color: var(--jsv-leise); }
@media (prefers-reduced-motion: reduce) {
  #screen-jarvis *, #screen-jarvis *::before, #screen-jarvis *::after { animation: none !important; transition: none !important; }
}

/* ================================================================
   Bibliothek (ab 0.7.0.503, Inhaber 16.11.2026) - KI-Video-/Bilder-
   Bibliothek. Für den großen Bildschirm gestaltet (Inhaber: „dieses
   PWA-Modul wird nur am Desktop verwendet“): eine Werkzeugleiste,
   Ordner und Medien als Kachelraster, Ablegen per Ziehen, Ansicht
   zweispaltig. Am Handy bricht alles sauber um.
   ================================================================ */
#btn-medien-open .start-btn-icon { --sym: #C026D3; }
.med-body { background: #F7F5F0; position: relative; }
/* Die App setzt jeden <button> auf volle Breite mit Rand (Handy-Formulare)
   - hier zurück auf Leisten-/Kachel-Knöpfe. */
.med-body button {
  display: inline-flex; align-items: center; justify-content: center;
  width: auto; min-height: 0; margin: 0; font-family: inherit;
}
.med-body .med-ordner, .med-body .med-kachel { width: 100%; }
.med-body .med-ordner { justify-content: flex-start; }
.med-body .med-kachel { display: flex; justify-content: flex-start; align-items: stretch; }
.med-rahmen { max-width: 1320px; margin: 0 auto; padding: 18px 22px 28px; box-sizing: border-box; }
.med-leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.med-suche {
  flex: 1 1 260px; min-width: 0; max-width: 420px; height: 40px; box-sizing: border-box;
  padding: 0 14px; font-size: 1rem; border: 1px solid #D9D2C3; border-radius: 10px;
  background: #FFFFFF; -webkit-appearance: none; appearance: none;
}
.med-suche:focus { outline: none; border-color: #F2C400; box-shadow: 0 0 0 3px rgba(242,196,0,.25); }
.med-filter { display: flex; gap: 0; border: 1px solid #D9D2C3; border-radius: 10px; overflow: hidden; background: #FFFFFF; }
.med-seg {
  min-width: 78px; height: 38px; padding: 0 14px; border: none; border-right: 1px solid #E4DDCE;
  background: transparent; color: #5B554B; font-size: 0.9rem; font-weight: 600; cursor: pointer;
}
.med-seg:last-child { border-right: none; }
.med-seg:hover { background: #FFF7D6; }
.med-seg-active, .med-seg-active:hover { background: #F2C400; color: #211D17; }
.med-leiste-luecke { flex: 1 1 0; }
.med-knopf {
  height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid #D9D2C3;
  background: #FFFFFF; color: #211D17; font-size: 0.92rem; font-weight: 700;
  cursor: pointer; white-space: nowrap;
}
.med-knopf:hover { background: #FFF7D6; }
.med-knopf:disabled { opacity: .55; cursor: default; }
.med-knopf-primaer { background: #F2C400; border-color: #F2C400; }
.med-knopf-primaer:hover { background: #E3B800; }
.med-ordner-form { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.med-status {
  margin-top: 12px; padding: 10px 14px; border-radius: 10px;
  background: #FFF7D6; color: #5B4A00; font-size: 0.9rem;
}
.med-status-err { background: #FEE2E2; color: #B91C1C; }
.med-abschnitt {
  margin: 22px 0 10px; font-size: 0.78rem; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: #8A8172;
}
.med-ordner-raster {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px;
}
.med-ordner {
  display: flex; align-items: center; gap: 12px; padding: 14px; min-height: 64px;
  background: #FFFFFF; border: 1px solid #E4DDCE; border-radius: 14px; text-align: left;
  cursor: pointer; box-shadow: 0 1px 2px rgba(33,29,23,.05); transition: border-color .1s, box-shadow .1s;
}
.med-ordner:hover { border-color: #F2C400; box-shadow: 0 3px 10px rgba(33,29,23,.08); }
.med-ordner-icon {
  flex: 0 0 42px; height: 42px; border-radius: 11px; background: #FFF3C4;
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem;
}
.med-ordner-text { min-width: 0; }
.med-ordner-name { display: block; font-weight: 700; color: #211D17; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.med-ordner-sub { display: block; font-size: 0.78rem; color: #8A6A00; margin-top: 2px; }
.med-raster {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px;
}
@media (max-width: 520px) {
  .med-rahmen { padding: 12px 12px 24px; }
  .med-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .med-suche { max-width: none; flex-basis: 100%; }
  .med-leiste-luecke { display: none; }
}
.med-kachel {
  display: flex; flex-direction: column; padding: 0; overflow: hidden;
  background: #FFFFFF; border: 1px solid #E4DDCE; border-radius: 14px;
  text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent;
  box-shadow: 0 1px 2px rgba(33,29,23,.05); transition: border-color .1s, box-shadow .1s, transform .1s;
}
.med-kachel:hover { border-color: #F2C400; box-shadow: 0 4px 14px rgba(33,29,23,.10); transform: translateY(-1px); }
.med-bild {
  position: relative; width: 100%; aspect-ratio: 4 / 3;
  background: #EFEBE2; display: flex; align-items: center;
  justify-content: center; font-size: 2rem; color: #9C9384;
}
.med-bild img { width: 100%; height: 100%; object-fit: cover; display: block; }
.med-play {
  position: absolute; right: 8px; bottom: 8px; padding: 2px 8px;
  border-radius: 999px; background: rgba(0,0,0,.65); color: #FFFFFF;
  font-size: 0.74rem; font-weight: 700;
}
.med-chip {
  position: absolute; left: 8px; top: 8px; padding: 2px 8px;
  border-radius: 999px; background: #16A34A; color: #FFFFFF;
  font-size: 0.6875rem; font-weight: 700;
}
.med-k-text { padding: 9px 12px 11px; min-width: 0; }
.med-k-name {
  display: block; font-size: 0.92rem; font-weight: 700; color: #211D17;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.med-k-meta {
  display: block; font-size: 0.76rem; color: #6B6459; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.med-leer { padding: 26px 14px; color: #6B6459; text-align: center; }
.med-hinweis { margin: 18px 0 0; font-size: 0.8rem; color: #6B6459; }
.med-ablegen {
  position: fixed; inset: 56px 0 0 0; z-index: 30; display: flex; align-items: center;
  justify-content: center; background: rgba(242,196,0,.16); border: 3px dashed #E3B800;
  pointer-events: none;
}
.med-ablegen-text {
  padding: 16px 26px; border-radius: 14px; background: #FFFFFF; color: #211D17;
  font-size: 1.1rem; font-weight: 800; box-shadow: 0 6px 20px rgba(0,0,0,.12);
}
/* Ansicht: links die Bühne, rechts Name, Angaben, Knöpfe */
.med-ansicht { display: flex; gap: 22px; align-items: flex-start; }
.med-buehne {
  flex: 1 1 auto; min-width: 0; background: #111111; border-radius: 14px; overflow: hidden;
  display: flex; align-items: center; justify-content: center; min-height: 320px;
}
.med-buehne img, .med-buehne video {
  display: block; max-width: 100%; max-height: calc(100vh - 140px); width: auto; height: auto;
}
.med-buehne video { width: 100%; }
.med-a-seite {
  flex: 0 0 320px; background: #FFFFFF; border: 1px solid #E4DDCE; border-radius: 14px; padding: 18px;
}
.med-a-name { font-size: 1.15rem; font-weight: 800; color: #211D17; word-break: break-word; }
.med-a-meta { font-size: 0.86rem; color: #6B6459; margin-top: 6px; line-height: 1.45; }
.med-a-beschreibung { margin-top: 10px; font-size: 0.92rem; color: #374151; white-space: pre-wrap; }
.med-a-knoepfe { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.med-a-knoepfe .med-knopf { width: 100%; }
@media (max-width: 860px) {
  .med-ansicht { flex-direction: column; }
  .med-a-seite { flex-basis: auto; width: 100%; box-sizing: border-box; }
  .med-buehne { min-height: 220px; width: 100%; }
}
/* Verschieben per Ziehen (ab 0.7.0.532): gezogene Kachel blass, oben
   eine Leiste mit den Zielen, Ordner-Kacheln leuchten beim Drüberziehen. */
.med-kachel-zieht { opacity: .45; }
/* Unterordner (ab 0.7.0.536): Pfad über dem Inhalt eines Unterordners */
.med-pfad { margin: 16px 0 0; font-size: 0.85rem; font-weight: 700; color: #8A6A00; }
@media (prefers-color-scheme: dark) { .med-pfad { color: #F2D36B; } }
.med-ziele {
  position: fixed; left: 50%; top: 66px; transform: translateX(-50%); z-index: 40;
  width: min(1100px, calc(100% - 32px)); box-sizing: border-box; padding: 12px 14px 14px;
  background: #FFFFFF; border: 2px solid #F2C400; border-radius: 16px;
  box-shadow: 0 10px 30px rgba(33,29,23,.18);
}
.med-ziele-titel { font-size: 0.8rem; font-weight: 800; color: #6B6459; margin-bottom: 8px; text-align: center; }
.med-ziele-liste { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-height: 30vh; overflow-y: auto; }
.med-ziel {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  border: 1px solid #D9D2C3; border-radius: 12px; background: #FBF9F5; color: #211D17;
  font-weight: 700; font-size: 0.9rem; max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.med-ziel-icon { flex: 0 0 auto; }
.med-ziel-aus { opacity: .4; }
.med-ziel-drueber, .med-ordner.med-ziel-drueber {
  border-color: #F2C400; background: #FFF3C4; box-shadow: 0 0 0 3px rgba(242,196,0,.35);
}
/* Hochlade-Assistent (ab 0.7.0.532) - Optik wie die Assistenten am PC:
   mittige Spalte, Punkte-Leiste, große Frage, Zurück/Weiter mittig. */
.med-wiz-huelle {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
  background: rgba(33,29,23,.45); padding: 16px; box-sizing: border-box;
}
.med-wiz {
  width: min(820px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; box-sizing: border-box;
  background: #F7F5F0; border-radius: 18px; padding: 22px 28px 16px; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.med-wiz button {
  display: inline-flex; align-items: center; justify-content: center;
  width: auto; min-height: 0; margin: 0; font-family: inherit;
}
.med-wiz-name { font-size: 0.85rem; font-weight: 700; color: #6B6459; }
.med-wiz-punkte { margin-top: 8px; font-size: 1.1rem; letter-spacing: 6px; }
.med-wiz-punkt { color: #948A76; }
.med-wiz-punkt-an { color: #F2C400; }
.med-wiz-schritt { font-size: 0.82rem; color: #6B6459; margin-top: 4px; }
.med-wiz-frage { margin: 6px 0 4px; font-size: 1.6rem; font-weight: 800; color: #211D17; }
.med-wiz-pflicht { color: #DC2626; }
.med-wiz-hinweis { margin: 0 auto 14px; max-width: 640px; font-size: 0.9rem; color: #6B6459; }
.med-wiz-flaeche { text-align: left; }
.med-wiz-waehlen { display: flex !important; margin: 0 auto 12px !important; height: 44px; min-width: 260px; }
.med-wiz-dateien { display: flex; flex-direction: column; gap: 6px; }
.med-wiz-zeile {
  display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 12px;
  background: #FFFFFF; border: 1px solid #E4DDCE; border-radius: 10px;
}
.med-wiz-zeile-icon { font-size: 1.2rem; }
.med-wiz-zeile-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #211D17; }
.med-wiz-zeile-gr { color: #6B6459; font-size: 0.85rem; }
.med-wiz-ablage {
  margin-top: 10px; min-height: 110px; display: flex; align-items: center; justify-content: center;
  border: 2px dashed #948A76; border-radius: 12px; color: #6B6459; font-size: 1rem;
}
.med-wiz-ablage-klein { min-height: 54px; }
.med-wiz-summe { margin-top: 8px; text-align: center; font-size: 0.85rem; color: #6B6459; }
.med-wiz-karten { display: flex; flex-direction: column; gap: 10px; }
.med-wiz-karte {
  display: flex; gap: 14px; padding: 12px 14px; background: #FFFFFF;
  border: 1px solid #E4DDCE; border-radius: 12px;
}
.med-wiz-vorschau {
  flex: 0 0 96px; height: 96px; border-radius: 10px; background: #F5F2EC; overflow: hidden;
  display: flex; align-items: center; justify-content: center; font-size: 2rem;
}
.med-wiz-vorschau img { width: 100%; height: 100%; object-fit: cover; display: block; }
.med-wiz-felder { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.med-wiz-datei { font-size: 0.78rem; color: #6B6459; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.med-wiz-label { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; font-weight: 700; color: #211D17; }
.med-wiz .med-suche { max-width: none; width: 100%; flex: 0 0 auto; font-weight: 400; }
.med-wiz-beschreibung { height: auto !important; min-height: 76px; padding: 8px 14px !important; resize: vertical; font-family: inherit; }
.med-wiz-ordner { display: block; max-width: 380px !important; margin: 0 auto; height: 44px !important; }
.med-wiz-zusammen { margin-top: 14px; text-align: center; color: #211D17; }
.med-wiz-zusammen ul { list-style: none; padding: 0; margin: 8px 0 0; color: #6B6459; }
.med-wiz-fehler { min-height: 1.2em; margin: 10px 0 0; color: #B91C1C; font-size: 0.9rem; }
.med-wiz-knoepfe { display: flex; justify-content: center; gap: 12px; margin-top: 10px; }
.med-wiz-zurueck { width: 160px !important; height: 44px; }
.med-wiz-weiter { width: 220px !important; height: 44px; }
.med-wiz-abbrechen {
  margin-top: 8px !important; border: none; background: transparent; color: #6B6459;
  padding: 6px 12px; cursor: pointer; font-size: 0.9rem;
}
.med-wiz-abbrechen:hover { color: #211D17; text-decoration: underline; }
@media (max-width: 520px) {
  .med-wiz { padding: 16px 14px 12px; }
  .med-wiz-frage { font-size: 1.3rem; }
  .med-wiz-karte { flex-direction: column; }
  .med-wiz-vorschau { flex-basis: auto; width: 100%; height: 140px; }
  .med-wiz-zurueck { width: 120px !important; }
  .med-wiz-weiter { width: auto !important; flex: 1 1 auto; }
}
@media (prefers-color-scheme: dark) {
  .med-ziele { background-color: #24211D; }
  .med-ziele-titel { color: #B3AB9C; }
  .med-ziel { background-color: #2D2924; border-color: #3B362F; color: #EEE9E0; }
  .med-ziel-drueber, .med-ordner.med-ziel-drueber { background-color: #4F410B; border-color: #F2C400; }
  .med-wiz { background-color: #2D2924; }
  .med-wiz-name, .med-wiz-schritt, .med-wiz-hinweis, .med-wiz-summe,
  .med-wiz-datei, .med-wiz-zeile-gr, .med-wiz-abbrechen, .med-wiz-zusammen ul { color: #B3AB9C; }
  .med-wiz-frage, .med-wiz-label, .med-wiz-zeile-name, .med-wiz-zusammen { color: #EEE9E0; }
  .med-wiz-zeile, .med-wiz-karte { background-color: #24211D; border-color: #3B362F; }
  .med-wiz-vorschau { background-color: #2F2812; }
  .med-wiz-ablage { border-color: #6B6459; color: #B3AB9C; }
  .med-wiz-fehler { color: #FCA5A5; }
  .med-wiz-abbrechen:hover { color: #EEE9E0; }
}


/* ===== HIG-Ueberarbeitung (Apple Human Interface Guidelines, 16.11.2026) =====
   Vier Teile, alle hier am Dateiende gesammelt, damit die Regeln oben
   unangetastet bleiben:
     1. Tippflaechen >= 44 x 44 px      (accessibility.md › Mobility,
                                          buttons.md › Best practices)
     2. Schriftgroessen fuer Eingabefelder (iOS zoomt unter 16 px)
     3. Weniger Bewegung                (accessibility.md › Cognitive)
     4. Dunkelmodus nach Handy-Vorgabe  (dark-mode.md › Best practices:
        KEIN eigener Schalter in der App, das System entscheidet)
   ============================================================================ */

/* --- 1. Tippflaechen: Apple empfiehlt 44 x 44 pt als Standard. Die
   folgenden Knoepfe waren 32-40 px hoch; gleiche Selektoren wie oben,
   deshalb gewinnen sie hier durch die spaetere Stelle. ------------------- */
.chat-header .hdr-btn {
  width: 44px; height: 44px; min-width: 44px; min-height: 44px;
}
button.ghost,
.ma-dok-btn,
.aufg-done-btn,
.fl-umkreis-chips button,
.faq-bpill, .faq-chip, .faq-back-chip,
.not-action-btn, .ber-clear-btn,
.kif-faq-btn, .kif-zurueck-btn, .kif-del-btn,
.nr-modus-btn, .nr-mf-knopf,
.mk-heute { min-height: 44px; }
.aufg-tab,
.aufg-tab:only-child, .aufg-tab:only-child.active,
.os-android .aufg-tab { min-height: 44px; }
.mk-pfeil, .madok-viewer-zoombtn { width: 44px; height: 44px; }
.nr-mf-ende { width: 44px; height: 44px; min-width: 44px; min-height: 44px; }
.med-seg, .med-knopf { height: 44px; }
/* Schalter-Zeilen: die ganze Beschriftung ist die Tippflaeche */
.mk-schalter, .fl-alle-reihe { min-height: 44px; }
.fl-alle-reihe { display: flex; align-items: center; }
:where(select) { min-height: 44px; }

/* --- 2. Eingabefelder mindestens 16 px: darunter zoomt iOS beim
   Antippen hinein. Die globale Regel oben erfasst nur text/password;
   Datum, Telefon, Zahl, E-Mail, Suche, Auswahl und Textfelder standen
   auf der Browser-Vorgabe 13,3 px. :where() = Spezifitaet 0, jede
   eigene Klasse oben gewinnt weiterhin. -------------------------------- */
:where(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]),
       select, textarea) { font-size: 1rem; }
.nr-postfach { font-size: 1rem; height: 44px; }

/* --- 3. Weniger Bewegung (Bedienungshilfen › Bewegung reduzieren):
   Uebergaenge (Ein-/Ausblenden, Wischen, Aufklappen) entfallen.
   BEWUSST NICHT angefasst: jede `animation` - darunter das Blinken und
   Pulsieren, das auf Neues hinweist (Befragungs-Kachel, faellige
   Kontrollfotos, Aufnahme-Anzeige, Sprachknopf). Das ist eine geschuetzte
   Funktion des Inhabers und bleibt auch mit dieser Einstellung an. ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
}

/* --- 4. Dunkelmodus ---------------------------------------------------
   Grundlage: <meta name="color-scheme" content="light dark"> in
   index.html. style.css arbeitet mit festen Hexwerten statt Variablen,
   deshalb wiederholt der generierte Block unten jede Regel, die eine
   helle Flaeche, dunkle Schrift oder helle Kante setzt, mit dem dunklen
   Gegenstueck - nur als Farb-Langform (background-color, color,
   border-*-color), alle anderen Werte bleiben. Kraeftige Flaechen (Gelb,
   Rot, Gruen) werden mit ihrem Originalwert in derselben Reihenfolge
   wiederholt, damit die Kaskade wie im Hellen ausgeht.
   Hauspalette dunkel: Grund #181613, Karte #24211D, Karte-alt #2D2924,
   Kante #3B362F, starke Kante #7A7164, Schrift #EEE9E0, gedaempft
   #B3AB9C, Auswahl #4F410B, Hauch #2F2812. Gelb bleibt #F2C400/#FFC107
   mit dunkler Schrift #2A2113.
   NICHT umgefaerbt (nichts wird invertiert): Unterschriftenfelder
   (.ber-sig-canvas, .thw-canvas samt Linie/Text), Unterschrift-Vorschau,
   PDF-Seiten und Dokument-Buehne, Leaflet-Karten, Bilder/Videos, die
   pulsierende Befragungs-Kachel und der Jarvis-Bildschirm (eigene
   dunkle Palette).
   Neue Regeln oben bekommen KEIN automatisches Dunkel-Gegenstueck -
   wer eine helle Flaeche ergaenzt, haengt die dunkle Fassung hier an. */
:root { color-scheme: light dark; }
/* === DUNKELMODUS-BLOCK (generiert) ANFANG === */
@media (prefers-color-scheme: dark) {
  html,
  body { background-color: #2D2924; color: #EEE9E0; }
  .int-dot { background-color: #3B362F; }
  .int-dot.active { background-color: #F59E0B; color: #2A2113; }
  .int-dot.done { background-color: #16A34A; }
  .int-feld { color: #EEE9E0; border-color: #7A7164; background-color: #24211D; }
  h3 { color: #B3AB9C; }
  header { background-color: #FFC107; color: #2A2113; }
  label { color: #B3AB9C; }
  input[type=text],
  input[type=password],
  input:not([type]) { border-color: #7A7164; background-color: #24211D; }
  button.primary { background-color: #FFC107; color: #1F2937; }
  button.primary:active { background-color: #F59E0B; color: #2A2113; }
  button.danger { color: #FFFFFF; }
  button.ghost { color: #EEE9E0; border-color: #7A7164; }
  button.ghost:active { background-color: #2F2812; }
  .muted { color: #B3AB9C; }
  .error { color: #FCA5A5; }
  .feiertag-hinweis { color: #FCA5A5; }
  .feiertag-hinweis.feiertag-hinweis-an { background-color: #4A211E; }
  .feiertag-zeitraum { color: #FCA5A5; }
  .badge { background-color: #2F2812; color: #FCD34D; }
  ul li { background-color: #24211D; border-color: #3B362F; }
  .aktion-card { background-color: #24211D; border-color: #3B362F; }
  .aktion-card .sub { color: #B3AB9C; }
  .main-body { background-color: #24211D; }
  .start-buttons { background-color: #24211D; }
  .start-btn { background-color: #24211D; color: #EEE9E0; }
  .start-btn:active { background-color: #2D2924; }
  .start-btn::after { background-color: rgba(238, 233, 224, 0.14); }
  .start-btn .start-btn-icon { background-color: #2F2812; color: #EEE9E0; }
  .start-btn .start-btn-icon { background-color: var(--sym, #6B7280); color: #FFFFFF; }
  .os-android .start-btn .start-btn-icon { color: #B3AB9C; background-color: transparent; }
  .start-btn::before { border-right-color: rgba(238, 233, 224, 0.3); border-bottom-color: rgba(238, 233, 224, 0.3); }
  .os-android .start-btn::after { background-color: #3B362F; }
  .os-android .start-btn:active { background-color: rgba(0,0,0,0.06); }
  .zeit-status-card { background-color: #24211D; border-color: #3B362F; }
  .zeit-st-arbeit { color: #6EE7A0; }
  .zeit-st-pause { color: #FCD34D; }
  .zeit-st-aus { color: #B3AB9C; }
  .zeit-st-beendet { color: #FCA5A5; }
  .zeit-beendet-hinweis { background-color: #331B19; border-color: #7F2D2A; color: #FCA5A5; }
  .zeit-heute-summe { color: #B3AB9C; }
  .zeit-weiterlauf { color: #B3AB9C; }
  .zeit-menu-badge { color: #6EE7A0; }
  .zeit-menu-badge.pause { color: #FCD34D; }
  .zeit-gelb { background-color: #FACC15; color: #1F2937; }
  .zeit-gelb:active { background-color: #EAB308; color: #2A2113; }
  .zeit-abschnitt { color: #EEE9E0; }
  .zeit-kennzahlen { color: #EEE9E0; }
  .zeit-row { background-color: #24211D; border-color: #3B362F; }
  .zeit-row-pause { background-color: #3A2614; }
  .zeit-row-art { color: #EEE9E0; }
  .zeit-saldo-plus { color: #6EE7A0; }
  .zeit-saldo-minus { color: #FCA5A5; }
  .zeit-row.zeit-row-feiertag { background-color: #4A211E; border-color: #7F2D2A; }
  .zeit-row-feiertag .zeit-row-art { color: #FCA5A5; }
  .zeit-feiertag { color: #FCA5A5; }
  .wa-gesperrt-box { background-color: #331B19; border-color: #7F2D2A; color: #FCA5A5; }
  .wa-strecke-card { background-color: #24211D; border-color: #3B362F; }
  .wa-strecke-name { color: #EEE9E0; }
  .wa-strecke-sub { color: #B3AB9C; }
  .wa-strecke-termin { color: #FCD34D; }
  .wa-strecke-freq { color: #93C5FD; }
  .wa-strecke-dist { color: #EEE9E0; }
  .wa-strecke-go { color: #93C5FD; }
  .wa-strecke-flyerart { color: #6EE7A0; }
  .fl-flyerart-hint { color: #6EE7A0; }
  .wa-strecke-card.fl-gesperrt { border-left-color: #7A7164; background-color: #2D2924; }
  .wa-strecke-lock { color: #FCA5A5; }
  .fl-kontroll-status { color: #B3AB9C; }
  .fl-kontroll-btn { border-color: #7A7164; background-color: #2D2924; color: #EEE9E0; }
  .fl-kontroll-box.due .fl-kontroll-status { color: #FCA5A5; }
  .fl-kontroll-box.due .fl-kontroll-btn { background-color: #DC2626; color: #fff; }
  .fl-startfoto-gps { color: #FCA5A5; }
  .termin-card { background-color: #24211D; border-color: #3B362F; }
  .termin-card-kopf { color: #FCD34D; }
  .termin-card-kopf.termin-feiertag { color: #FCA5A5; }
  .termin-feiertag-name { background-color: #4A211E; color: #FCA5A5; }
  .termin-card-titel { color: #EEE9E0; }
  .termin-card-text { color: #EEE9E0; }
  .termin-meet-btn { background-color: #FFC107; color: #1A1A1A; }
  .termin-meet-btn:active { background-color: #FFA000; color: #2A2113; }
  .termin-status { color: #EEE9E0; }
  .termin-status.status-zugesagt b { color: #6EE7A0; }
  .termin-status.status-abgesagt b { color: #FCA5A5; }
  .termin-rsvp-btn { border-color: #7A7164; background-color: #24211D; color: #EEE9E0; }
  .termin-rsvp-btn.ja.active { background-color: #1F3A2A; color: #6EE7A0; }
  .termin-rsvp-btn.nein.active { background-color: #4A211E; color: #FCA5A5; }
  .kontakte-suche { border-color: #7A7164; background-color: #24211D; }
  .kontakt-card { background-color: #24211D; border-color: #6B5A12; }
  .kontakt-kopf:active { background-color: #2F2812; }
  .kontakt-avatar { background-color: #2F2812; border-color: #6B5A12; color: #FCD34D; }
  .kontakt-name { color: #EEE9E0; }
  .kontakt-ich { color: #FCD34D; }
  .kontakt-pos { color: #FCD34D; }
  .kontakt-pfeil { color: #FCD34D; }
  .kontakt-nummer { border-top-color: #6B5A12; }
  .kontakt-anruf { background-color: #FFC107; color: #1A1A1A; }
  .kontakt-anruf:active { background-color: #FFA000; color: #2A2113; }
  .ma-dok-ordner { background-color: #24211D; border-color: #6B5A12; }
  .ma-dok-ordner:active { background-color: #2F2812; }
  .ma-dok-ordner-icon { background-color: #2F2812; }
  .ma-dok-ordner-name { color: #EEE9E0; }
  .ma-dok-ordner-sub { color: #FCD34D; }
  .ma-dok-subhead-title { color: #EEE9E0; }
  .ma-dok-subhead-count { color: #FCD34D; background-color: #2F2812; }
  .ma-dok-card { background-color: #24211D; border-color: #6B5A12; }
  .ma-dok-card:active { background-color: #2F2812; }
  .ma-dok-badge { background-color: #331B19; border-color: #7F2D2A; color: #FCA5A5; }
  .ma-dok-badge-img { background-color: #1B2433; border-color: #34507A; color: #93C5FD; }
  .ma-dok-card-title { color: #EEE9E0; }
  .ma-dok-card-meta { color: #FCD34D; }
  .ma-dok-btn-mail { background-color: #2F2812; border-color: #6B5A12; color: #FCD34D; }
  .ma-dok-btn-mail:active { background-color: #2F2812; }
  .ma-dok-zahlung-offen { background-color: #331B19; border-color: #7F2D2A; color: #FCA5A5; }
  .ma-dok-zahlung-ok { background-color: #182B20; border-color: #2F5E44; color: #6EE7A0; }
  .ma-dok-ordner-warn { color: #FCA5A5; }
  .ma-dok-empty { color: #B3AB9C; }
  .ma-dok-empty-title { color: #EEE9E0; }
  .ma-dok-empty-sub { color: #B3AB9C; }
  .aufg-tabs { background-color: #24211D; border-bottom-color: #3B362F; }
  .aufg-tabs::before { background-color: rgba(120,120,128,0.16); }
  .aufg-tab { color: #EEE9E0; }
  .aufg-tab + .aufg-tab::before { background-color: rgba(238, 233, 224, 0.26); }
  .aufg-tab.active::before,
  .aufg-tab.active + .aufg-tab::before { background-color: transparent; }
  .aufg-tab.active::after { background-color: #24211D; }
  .aufg-tabs:has(.aufg-tab:only-child)::before { background-color: transparent; }
  .aufg-tab:only-child,
  .aufg-tab:only-child.active { color: #B3AB9C; }
  .os-android .aufg-tabs::before { border-color: #7A7164; background-color: transparent; }
  .os-android .aufg-tab { color: #B3AB9C; }
  .os-android .aufg-tab + .aufg-tab::before { background-color: #3B362F; }
  .os-android .aufg-tab.active + .aufg-tab::before { background-color: #3B362F; }
  .os-android .aufg-tab.active::after { background-color: #2F2812; }
  .os-android .aufg-tab.active { color: #F2D36B; }
  .os-android .aufg-tab:active { background-color: rgba(0,0,0,0.06); }
  .aufg-liste { background-color: #24211D; }
  .aufg-card { background-color: #24211D; }
  .aufg-card:active { background-color: #2D2924; }
  .aufg-card::after { background-color: rgba(238, 233, 224, 0.14); }
  .os-android .aufg-card::after,
  .os-android .konv-item::after,
  .os-android .user-item::after,
  .os-android .chat-fwd-ziel::after { background-color: #3B362F; }
  .os-android .aufg-card:active,
  .os-android .konv-item:active,
  .os-android .user-item:active,
  .os-android .chat-fwd-ziel:active { background-color: rgba(0,0,0,0.06); }
  .os-ios .aufg-card::after,
  .os-ios .konv-item::after,
  .os-ios .user-item::after,
  .os-ios .chat-fwd-ziel::after { background-color: rgba(238, 233, 224, 0.20); }
  .aufg-card.unseen { background-color: #2F2812; }
  .aufg-card.unseen::before { background-color: #FFC107; color: #2A2113; }
  .aufg-card-titel { color: #EEE9E0; }
  .aufg-card-meta { color: #B3AB9C; }
  .aufg-tag { background-color: #2F2812; color: #F2D36B; }
  .aufg-progress { color: #B3AB9C; }
  .aufg-card-sub { color: #B3AB9C; }
  .aufg-card-hinweis { color: #EEE9E0; }
  .aufg-tel-link { color: #FCD34D; }
  .aufg-fab { background-color: #FFC107; color: #1F2937; }
  .aufg-fab:active { background-color: #F59E0B; color: #2A2113; }
  .aufg-done-btn:disabled { background-color: #94A3B8; color: #2A2113; }
  .tour-kal-wrap { background-color: #24211D; border-bottom-color: #3B362F; }
  .tour-kal-select { border-color: #3B362F; background-color: #2D2924; color: #EEE9E0; }
  .tb-pfeil { color: #B3AB9C; }
  .tb-marke { background-color: #2D2924; color: #EEE9E0; }
  .tb-marke-bestand { background-color: #1B2433; color: #93C5FD; }
  .tb-marke-neu { background-color: #2F2812; color: #FCD34D; }
  .tb-rot { color: #FCA5A5; }
  .tb-kopf-unter { color: #B3AB9C; }
  .tb-verschoben { color: #B3AB9C; }
  .tb-verschoben.tb-verschoben-spaet { color: #FCA5A5; }
  .tb-verschoben.tb-verschoben-frueh { color: #6EE7A0; }
  .muted.tb-klein { color: #B3AB9C; }
  .tb-abschnitt { border-color: #3B362F; background-color: #24211D; }
  .tb-titel { color: #B3AB9C; }
  .tb-zeile { border-top-color: #3B362F; }
  .tb-lbl { color: #B3AB9C; }
  .tb-wert { color: #EEE9E0; }
  .tb-wert a,
  .tb-eintrag a { color: #93C5FD; }
  .tb-wert a.tb-navi { background-color: #1B2433; border-color: #34507A; }
  .tb-eintrag { border-top-color: #3B362F; }
  .tb-dok { border-top-color: #3B362F; }
  .tb-dok:active { background-color: #2D2924; }
  .tb-dok-sym { color: #FCA5A5; background-color: #4A211E; }
  .tb-dok-text { color: #EEE9E0; }
  .tb-foto-hinweis { color: #EEE9E0; }
  .tb-gps { color: #B3AB9C; }
  .tb-gps.tb-gps-ok { color: #6EE7A0; }
  .tb-gps.tb-gps-warn { color: #FCD34D; }
  .tb-dok-sym.tb-dok-foto { color: #93C5FD; background-color: #22304A; }
  .ber-tour-hinweis { background-color: #1B2433; border-color: #34507A; color: #93C5FD; }
  .aufgnew-body { background-color: #24211D; }
  .aufgnew-form label { color: #B3AB9C; }
  .aufgnew-form input,
  .aufgnew-form select,
  .aufgnew-form textarea { border-color: #7A7164; background-color: #24211D; }
  .aufgnew-form input:focus,
  .aufgnew-form select:focus,
  .aufgnew-form textarea:focus { background-color: #2F2812; }
  .aufgnew-form .primary { background-color: #FFC107; color: #1F2937; }
  .aufgnew-form .primary:active { background-color: #F59E0B; color: #2A2113; }
  .aufgnew-form .primary:disabled { background-color: #3B362F; color: #A8A091; }
  .not-body { background-color: #24211D; }
  .not-form { background-color: #24211D; border-bottom-color: #3B362F; }
  .not-form textarea { border-color: #7A7164; background-color: #24211D; }
  .not-form textarea:focus { background-color: #2F2812; }
  .not-form .primary { background-color: #FFC107; color: #1F2937; }
  .not-form .primary:active { background-color: #F59E0B; color: #2A2113; }
  .not-mic-btn { color: #FCD34D; background-color: #2F2812; border-color: #6B5A12; }
  .not-mic-btn:active { background-color: #4F410B; }
  .not-mic-btn.recording { background-color: #DC2626; color: #FFFFFF; }
  #not-msg { color: #B3AB9C; }
  #not-msg.error { color: #FCA5A5; }
  #not-msg.rec { color: #FCA5A5; }
  .not-rec-bar { background-color: #331B19; border-color: #7F2D2A; }
  .not-rec-time { color: #FCA5A5; }
  .not-rec-cancel { color: #FCA5A5; background-color: #24211D; border-color: #7F2D2A; }
  .not-rec-cancel:active { background-color: #4A211E; }
  .not-rec-stop::before { background-color: #24211D; }
  .not-audio { background-color: #2F2812; border-color: #6B5A12; }
  .not-audio-play { color: #1F2937; background-color: #FFC107; }
  .not-audio-play:active { background-color: #F59E0B; color: #2A2113; }
  .not-audio-time { color: #FCD34D; }
  .not-audio-fehler { color: #FCD34D; }
  .not-liste { background-color: #24211D; }
  .not-card { background-color: #2F2812; }
  .not-card-text { color: #EEE9E0; }
  .not-card-meta { color: #FCD34D; }
  .not-action-btn { color: #FCD34D; }
  .not-action-btn:active { background-color: #2F2812; }
  .not-action-btn.danger { color: #FCA5A5; }
  .not-empty { color: #B3AB9C; }
  .not-card.editing { background-color: #24211D; }
  .not-card-edit { background-color: #2F2812; }
  .ber-body { background-color: #24211D; }
  .ber-form { background-color: #24211D; }
  .ber-form label { color: #B3AB9C; }
  .ber-form input[type="text"],
  .ber-form input[type="email"],
  .ber-form input[type="date"],
  .ber-form input[type="time"],
  .ber-form select,
  .ber-form textarea { border-color: #7A7164; background-color: #24211D; color: #EEE9E0; }
  .ber-form select { border-color: #7A7164; background-color: #24211D; }
  .ber-form select:focus { background-color: #2F2812; }
  .ber-form select:hover { border-color: #7A7164; }
  .ber-form select:not([value=""]):valid { border-color: #6B5A12; }
  .ber-alter-badge { background-color: #2F2812; color: #FCD34D; border-color: #6B5A12; }
  .ber-alter-badge:empty,
  .ber-alter-badge.leer { background-color: #2D2924; color: #A8A091; border-color: #3B362F; }
  .ber-osm-hint { color: #B3AB9C; }
  .ber-osm-panel { background-color: #24211D; border-color: #6B5A12; }
  .ber-osm-liste li { border-bottom-color: #3B362F; color: #EEE9E0; }
  .ber-osm-liste li:hover,
  .ber-osm-liste li:active { background-color: #2F2812; }
  .ber-osm-liste li .ber-osm-line1 { color: #EEE9E0; }
  .ber-osm-liste li .ber-osm-line2 { color: #B3AB9C; }
  .ber-osm-status { color: #B3AB9C; }
  .ber-osm-status.error { color: #FCA5A5; }
  .fl-form label { color: #EEE9E0; }
  .fl-form input,
  .fl-form select,
  .fl-form textarea { border-color: #7A7164; background-color: #24211D; color: #EEE9E0; }
  .fl-form input:focus,
  .fl-form select:focus,
  .fl-form textarea:focus { background-color: #2F2812; }
  .fl-step-titel { color: #FCD34D; }
  .fl-h3 { color: #FCD34D; border-top-color: #6B5A12; }
  .fl-foto-preview img { border-color: #3B362F; }
  .fl-form .primary.big:disabled { background-color: #3B362F; color: #A8A091; }
  .fl-detail-name { color: #EEE9E0; }
  .fl-detail-sub { color: #B3AB9C; }
  .fl-detail-status.rot { color: #FCA5A5; }
  .fl-detail-status.gruen { color: #6EE7A0; }
  .fl-detail-last { color: #B3AB9C; }
  .fl-besuch-gesperrt { background-color: #182B20; border-color: #2F5E44; color: #6EE7A0; }
  .aktion-card.fl-faellig { background-color: #331B19; }
  .fl-umkreis { border-color: #6B5A12; background-color: #2F2812; }
  .fl-umkreis-titel { color: #FCD34D; }
  .fl-umkreis-chips button { color: #FCD34D; background-color: #24211D; border-color: #6B5A12; }
  .fl-umkreis-chips button.aktiv { background-color: #FFC107; color: #1F2937; }
  .fl-umkreis-chips button:active { background-color: #2F2812; }
  .fl-umkreis-chips button.aktiv:active { background-color: #F59E0B; color: #2A2113; }
  .fl-umkreis-status { color: #B3AB9C; }
  .fl-umkreis-status.fehler { color: #FCA5A5; }
  .fl-umkreis-liste li:active { background-color: #2F2812; }
  .fl-umkreis-name { color: #EEE9E0; }
  .fl-umkreis-sub { color: #B3AB9C; }
  .fl-umkreis-schon { color: #6EE7A0; }
  .fl-umkreis-dist { color: #B3AB9C; }
  .fl-umkreis-dist.hier { color: #6EE7A0; }
  .ber-form input[type="date"]::-webkit-calendar-picker-indicator { color: #B3AB9C; background-color: transparent; }
  .ber-form input:focus,
  .ber-form textarea:focus,
  .ber-form select:focus { background-color: #2F2812; }
  .ber-section { color: #FCD34D; border-bottom-color: #6B5A12; }
  .ber-hint { color: #B3AB9C; }
  .ber-warnbox { border-color: #7F2D2A; background-color: #331B19; color: #FCA5A5; }
  .ber-warnbox-liste li { background-color: transparent; }
  .ber-warnbox-zaehler.ok { color: #6EE7A0; }
  .ber-warnbox-zaehler.lang { color: #FCD34D; }
  .ber-form textarea.required-empty { background-color: #331B19; }
  .ber-form.show-errors input[required]:invalid,
  .ber-form.show-errors input[required]:placeholder-shown,
  .ber-form.show-errors select[required]:invalid { background-color: #331B19; }
  .ber-required > .ber-star { color: #FCA5A5; }
  .ber-section .ber-star { color: #FCA5A5; }
  .ber-clear-btn { color: #FCD34D; border-color: #6B5A12; }
  .ber-radio { background-color: #2D2924; border-color: #3B362F; }
  .ber-radio:has(input[type="radio"]:checked) { background-color: #2F2812; }
  .ber-form .primary { background-color: #FFC107; color: #1F2937; }
  .ber-form .primary:active { background-color: #F59E0B; color: #2A2113; }
  .ber-form .primary:disabled { background-color: #3B362F; color: #A8A091; }
  .ber-stepper { background-color: #24211D; border-bottom-color: #3B362F; }
  .ber-step-dot { border-color: #7A7164; }
  .ber-step-dot.active,
  .ber-step-dot.done { background-color: #F2C400; color: #2A2113; }
  .ber-nav-btn { background-color: #24211D; color: #EEE9E0; border-color: #7A7164; }
  .ber-nav-btn.primary { background-color: #F2C400; color: #1F2937; }
  .ber-nav-btn:disabled { background-color: #3B362F; color: #A8A091; border-color: #3B362F; }
  .nks-hist-bars { background-color: #24211D; border-color: #3B362F; }
  .nks-bar { background-color: #FFC107; color: #2A2113; }
  .nks-bar-cnt { color: #EEE9E0; }
  .nks-bar-lbl { color: #B3AB9C; }
  .nks-tbl { background-color: #24211D; border-color: #3B362F; }
  .nks-tbl th,
  .nks-tbl td { border-bottom-color: #3B362F; }
  .nks-tbl th { background-color: #2D2924; color: #B3AB9C; }
  .nk-body { background-color: #24211D; }
  .nk-section { color: #B3AB9C; background-color: #2D2924; border-top-color: #3B362F; border-bottom-color: #3B362F; }
  .nk-form { background-color: #24211D; }
  .nk-form label { color: #B3AB9C; }
  .nk-form input,
  .nk-form select { border-color: #7A7164; background-color: #24211D; color: #EEE9E0; }
  .nk-form input:focus,
  .nk-form select:focus { background-color: #2F2812; }
  .nk-form .primary { background-color: #FFC107; color: #1F2937; }
  .nk-form .primary:active { background-color: #F59E0B; color: #2A2113; }
  #nk-liste { background-color: #24211D; }
  .nk-card { background-color: #24211D; }
  .nk-card::after { background-color: #2D2924; }
  .nk-card-name { color: #EEE9E0; }
  .nk-card-termin { color: #93C5FD; background-color: #1B2433; border-color: #34507A; }
  .nk-card-meta { color: #B3AB9C; }
  .nk-leistung-tag { background-color: #2F2812; color: #FCD34D; }
  .push-banner { background-color: #2F2812; border-color: #6B5A12; color: #EEE9E0; }
  .push-banner:active { background-color: #4F410B; }
  .push-banner-text small { color: #B3AB9C; }
  .ptr-indicator { color: #FCD34D; }
  .kif-loader { background-color: #1B2433; border-color: #34507A; }
  .kif-spin { color: #A5B4FC; }
  .kif-loader-frage { color: #A5B4FC; }
  .kif-phase { color: #A5B4FC; }
  .kif-elapsed { color: #B3AB9C; }
  .kif-loader-hinweis { border-top-color: #34507A; color: #B3AB9C; }
  .kif-bubble.frage { background-color: #22304A; border-color: #34507A; color: #EEE9E0; }
  .kif-bubble.antwort { background-color: #24211D; border-color: #3B362F; color: #EEE9E0; }
  .kif-bubble.wartet { background-color: #2D2924; border-color: #34507A; color: #A5B4FC; }
  .kif-weiter { border-top-color: #3B362F; }
  .kif-weiter-input { border-color: #34507A; }
  .kif-weiter-go:disabled { background-color: #3A4380; }
  .boot-overlay { background-color: #FFC107; color: #2A2113; }
  .upload-box { background-color: #24211D; }
  .upload-erfolg { color: #6EE7A0; }
  .upload-title { color: #EEE9E0; }
  .upload-hint { color: #FCD34D; background-color: #2F2812; }
  .madok-viewer { background-color: #2F2812; }
  .madok-viewer-header { background-color: #2F2812; border-bottom-color: #6B5A12; }
  .madok-viewer-title { color: #FCD34D; }
  .madok-viewer-close { border-color: #6B5A12; background-color: #24211D; color: #FCD34D; }
  .madok-viewer-close:active { background-color: #2F2812; }
  .madok-viewer-zoombtn { background-color: #24211D; color: #EEE9E0; }
  .madok-viewer-zoombtn:active { background-color: #4F410B; }
  .madok-viewer-loading,
  .madok-viewer-error { background-color: #2F2812; }
  .madok-viewer-loading-text { color: #FCD34D; }
  .madok-viewer-error-icon { background-color: #2F2812; color: #FCD34D; }
  .madok-viewer-error-text { color: #FCD34D; }
  .madok-viewer-extern { color: #FCD34D; background-color: #24211D; border-color: #6B5A12; }
  .madok-viewer-extern:active { background-color: #2F2812; }
  .start-btn .start-btn-sub { color: #B3AB9C; }
  .start-btn .start-btn-label { color: #EEE9E0; }
  .pst-body { background-color: #24211D; }
  .pst-info { background-color: #2D2924; border-color: #3B362F; color: #B3AB9C; }
  .pst-toggle-row { background-color: #24211D; border-color: #3B362F; color: #EEE9E0; }
  .pst-time-cell { background-color: #24211D; border-color: #3B362F; color: #B3AB9C; }
  .pst-time-cell input[type="time"] { border-color: #7A7164; }
  .pst-body .primary { background-color: #FFC107; color: #1F2937; }
  .chat-screen { background-color: #24211D; }
  .chat-header { background-color: #FFC107; color: #2A2113; }
  .chat-header .hdr-avatar { background-color: #7BB662; color: #fff; }
  #chat-konv-list { background-color: #24211D; }
  .konv-item { background-color: #24211D; }
  .konv-item:active { background-color: #2D2924; }
  .konv-item::after { background-color: #2D2924; }
  .konv-item .avatar { background-color: #7BB662; color: #FFFFFF; }
  .konv-item .konv-name { color: #EEE9E0; }
  .konv-item .konv-time { color: #B3AB9C; }
  .konv-item.unread .konv-time { color: #6EE7A0; }
  .konv-item .konv-preview { color: #B3AB9C; }
  .konv-item .konv-marke { background-color: #2D2924; color: #B3AB9C; }
  #chat-new-users { background-color: #24211D; }
  .user-item { background-color: #24211D; }
  .user-item:active { background-color: #2D2924; }
  .user-item::after { background-color: #2D2924; }
  .user-item .avatar { background-color: #7BB662; color: #FFFFFF; }
  .user-item .user-name { color: #EEE9E0; }
  #chat-msg-list { background-color: #0B141A; }
  .date-sep { background-color: rgba(36, 33, 29, 0.85); color: #B3AB9C; }
  .chat-bubble.eigene { background-color: #005C4B; color: #EEE9E0; }
  .chat-bubble.fremd { background-color: #24211D; color: #EEE9E0; }
  .chat-bubble.geloescht { background-color: #2D2924; color: #B3AB9C; }
  .chat-bubble.eigene.tail.geloescht::after { border-left-color: #2D2924; }
  .chat-bubble.fremd.tail.geloescht::after { border-right-color: #2D2924; }
  .bubble-geloescht { color: #B3AB9C; }
  .chat-bubble.eigene.tail::after { border-left-color: #005C4B; }
  .chat-bubble.fremd.tail::after { border-right-color: #24211D; }
  .bubble-meta { color: #B3AB9C; }
  .bubble-meta .ticks.sent { color: #A8A091; }
  .bubble-meta .like-pill { background-color: rgba(36, 33, 29, 0.85); color: #B3AB9C; }
  .bubble-meta .like-pill:active { background-color: #2F2812; }
  .bubble-meta .like-pill.liked { background-color: #FFC107; color: #1F2937; }
  .bubble-meta .like-pill.readonly { background-color: rgba(36, 33, 29, 0.85); }
  .chat-bubble.eigene .bubble-meta .like-pill { background-color: rgba(36, 33, 29, 0.6); }
  #chat-input-row { background-color: #2D2924; border-top-color: #7A7164; }
  #chat-input { background-color: #24211D; }
  .send-btn { background-color: #FFC107; color: #1F2937; }
  .send-btn:active { background-color: #F59E0B; color: #2A2113; }
  .attach-btn,
  .mic-btn { background-color: #24211D; color: #B3AB9C; }
  .attach-btn:active,
  .mic-btn:active { background-color: #3B362F; }
  .mic-btn.recording { background-color: #DC2626; color: white; }
  .recording-bar { background-color: #331B19; color: #FCA5A5; border-top-color: #7F2D2A; }
  .rec-cancel { color: #FCA5A5; }
  .preview-bar { background-color: #2F2812; border-top-color: #6B5A12; }
  .preview-discard { color: #FCA5A5; }
  .preview-discard:active { background-color: #4A211E; }
  .preview-send { background-color: #FFC107; color: #1F2937; }
  .preview-send:active { background-color: #F59E0B; color: #2A2113; }
  .chat-anhang-link { background-color: #2F2812; border-color: #6B5A12; color: #FCD34D; }
  .chat-anhang-link:active { background-color: #4F410B; }
  .chat-anhang-datei { background-color: #2D2924; border-color: #7A7164; color: #EEE9E0; }
  .chat-anhang-datei:active { background-color: #3B362F; }
  .settings-section { border-bottom-color: #3B362F; }
  .pb-preview { background-color: #94A3B8; color: #fff; }
  .ghost-btn { background-color: #2D2924; color: #FCA5A5; border-color: #3B362F; }
  .ghost-btn:active { background-color: #3B362F; }
  .pst-input { border-color: #7A7164; }
  .thw-hinweis { color: #B3AB9C; }
  .thw-hinweis.error { color: #FCA5A5; }
  .thw-msg.error { color: #FCA5A5; }
  .thw-q-wartet { background-color: #2F2812; border-color: #6B5A12; color: #FCD34D; }
  .thw-q-fehler { background-color: #4A211E; border-color: #7F2D2A; color: #FCA5A5; }
  .thw-q-fehler li { background-color: transparent; }
  .thw-q-btn { background-color: #24211D; }
  .thw-kopf { background-color: #1B2433; border-color: #34507A; }
  .thw-kopf.thw-laeuft { background-color: #182B20; border-color: #2F5E44; }
  .thw-kopf.thw-fertig { background-color: #2D2924; border-color: #3B362F; }
  .thw-kopf .thw-zeit-status { color: #FCD34D; }
  .thw-kopf .thw-zeit-status.thw-feiertag-txt { color: #FCA5A5; }
  .thw-kunde { color: #EEE9E0; }
  .thw-kundenkarte { background-color: #1B2433; border-color: #34507A; }
  .thw-btn-sek { background-color: #24211D; color: #EEE9E0; border-color: #7A7164; }
  .thw-btn-sek:active { background-color: #2D2924; }
  .thw-btn-warn { background-color: #24211D; color: #FCA5A5; border-color: #7F2D2A; }
  .thw-btn-warn:active { background-color: #4A211E; }
  .thw-label { color: #EEE9E0; }
  .thw-feld { border-color: #7A7164; background-color: #24211D; }
  .thw-feld.thw-fehlt { background-color: #331B19; }
  .thw-frueher-knopf { background-color: #2D2924; color: #EEE9E0; border-color: #7A7164; }
  .thw-frueher-knopf:active { background-color: #2D2924; }
  .thw-frueher-hinweis { color: #B3AB9C; }
  .thw-tag-card,
  .thw-halt { background-color: #24211D; border-color: #3B362F; border-left-color: #7A7164; }
  .thw-tag-card.thw-heute { background-color: #182B20; }
  .thw-tag-card.thw-feiertag { background-color: #4A211E; border-color: #7F2D2A; }
  .thw-feiertag-zeile { color: #FCA5A5; }
  .thw-halt-zeit { color: #EEE9E0; }
  .thw-halt-name { color: #EEE9E0; }
  .thw-halt-plan { color: #B3AB9C; }
  .thw-halt-adresse { color: #B3AB9C; }
  .thw-halt-adresse a { color: #93C5FD; }
  .thw-zustand { background-color: #2D2924; color: #B3AB9C; }
  .thw-zustand.thw-z-offen { background-color: #2D2924; color: #B3AB9C; }
  .thw-zustand.thw-z-laeuft { background-color: #22304A; color: #93C5FD; }
  .thw-zustand.thw-z-erfasst { background-color: #1F3A2A; color: #6EE7A0; }
  .thw-zustand.thw-z-storno { background-color: #4A211E; color: #FCA5A5; }
  .thw-zustand.thw-z-ohne { background-color: #3A2614; color: #FDBA74; }
  .thw-zustand.thw-z-info { background-color: #3B362F; color: #B3AB9C; }
  .ta-datum { color: #EEE9E0; }
  .ta-bereich-titel { color: #EEE9E0; }
  .ta-pfeil { color: #B3AB9C; }
  .ta-wo { color: #93C5FD; }
  .ta-wo.ta-faehrt { color: #FDBA74; }
  .ta-halte { border-top-color: #3B362F; }
  .ta-halt { border-bottom-color: #3B362F; }
  .ta-halt-zeit { color: #EEE9E0; }
  .ta-halt-name { color: #EEE9E0; }
  .ta-halt-info .ta-halt-zeit,
  .ta-halt-info .ta-halt-name { color: #B3AB9C; }
  .aufg-tab.ta-feiertag { color: #FCA5A5; }
  .thw-art-chip { background-color: #24211D; color: #EEE9E0; border-color: #7A7164; }
  .thw-guthaben-chip { background-color: #4F410B; color: #FCD34D; }
  .thw-guthaben-ok { background-color: #1F3A2A; color: #6EE7A0; }
  .thw-guthaben-ng { background-color: #4A211E; color: #FCA5A5; }
  .thw-halt.thw-info { background-color: #2D2924; border-color: #3B362F; border-left-color: #7A7164; }
  .thw-info-zeile { color: #B3AB9C; }
  .thw-art-zeile { color: #EEE9E0; }
  .thw-tipp { color: #B3AB9C; }
  .thw-zaehler { color: #FCD34D; }
  .thw-zaehler.thw-zaehler-ok { color: #6EE7A0; }
  .thw-vormonat { background-color: #3A2614; color: #FDBA74; }
  .thw-doku-guthaben-zeile { border-color: #3B362F; background-color: #24211D; }
  .thw-doku-guthaben-zeile.thw-fehlt { background-color: #331B19; }
  .thw-doku-guthaben-label { color: #EEE9E0; }
  .thw-guthaben-radio { color: #EEE9E0; }
  .thw-besonderheit { background-color: #2D2924; border-color: #7A7164; color: #EEE9E0; }
  .thw-besonderheit-text b { color: #EEE9E0; }
  .thw-halt.thw-naechster { background-color: #2F2812; }
  .thw-halt.thw-laeuft-jetzt { background-color: #1B2433; }
  .thw-halt.thw-fertig:not(.tb-halt) { background-color: #2D2924; border-left-color: #3B362F; }
  .thw-halt.thw-fertig:not(.tb-halt) .thw-halt-zeit,
  .thw-halt.thw-fertig:not(.tb-halt) .thw-halt-name { color: #B3AB9C; }
  .thw-halt.thw-fertig:not(.tb-halt) .thw-halt-adresse,
  .thw-halt.thw-fertig:not(.tb-halt) .thw-nr { color: #B3AB9C; }
  .thw-halt.tb-halt.thw-fertig { background-color: #2D2924; border-left-color: #3B362F; }
  .thw-halt.tb-halt.thw-fertig .thw-halt-zeit,
  .thw-halt.tb-halt.thw-fertig .thw-halt-name { color: #B3AB9C; }
  .thw-halt.tb-halt.thw-fertig .thw-halt-adresse,
  .thw-halt.tb-halt.thw-fertig .thw-nr { color: #B3AB9C; }
  .thw-halt-aktionen { border-top-color: #3B362F; }
  .thw-nr { color: #B3AB9C; }
  .thw-uhr-box { background-color: #182B20; border-color: #2F5E44; }
  .thw-uhr { color: #6EE7A0; }
  .thw-mass { border-color: #3B362F; background-color: #24211D; }
  .thw-mass.thw-getan { background-color: #182B20; border-color: #2F5E44; }
  .thw-mass.thw-offen { background-color: #2F2812; border-color: #6B5A12; }
  .thw-mass-text { color: #EEE9E0; }
  .thw-mass-hinweis { color: #B3AB9C; }
  .thw-mass-weg { color: #FCA5A5; }
  .thw-katalog { border-color: #3B362F; background-color: #2D2924; }
  .thw-kat-item { background-color: #24211D; border-color: #3B362F; }
  .thw-kat-item:active { background-color: #2F2812; }
  .thw-umfang { border-color: #3B362F; }
  .thw-umfang-zeile { border-bottom-color: #3B362F; }
  .thw-umfang-datum { color: #EEE9E0; }
  .thw-umfang-was { color: #B3AB9C; }
  .thw-umfang-summe { background-color: #2D2924; color: #EEE9E0; }
  .thw-rolle { background-color: #24211D; border-color: #7A7164; color: #B3AB9C; }
  .thw-rolle.thw-aktiv { background-color: #2F2812; color: #FCD34D; }
  .thw-quer-blatt { background-color: #24211D; }
}
@media (prefers-color-scheme: dark) and (orientation: portrait) {
  .thw-quer-hinweis { background-color: #2F2812; border-bottom-color: #6B5A12; color: #FCD34D; }
}
@media (prefers-color-scheme: dark) {
  .thw-warnung { color: #FCA5A5; }
  .thw-offen-karte { border-color: #6B5A12; background-color: #2F2812; }
  .thw-offen-titel { color: #FCD34D; }
  .off-eintrag { border-color: #3B362F; background-color: #2D2924; }
  .off-eintrag.off-fehler { border-color: #7F2D2A; background-color: #331B19; }
  .off-titel { color: #EEE9E0; }
  .off-zeit { color: #B3AB9C; }
  .off-grund { color: #FCA5A5; }
  .off-hinweis { color: #FCD34D; background-color: #2F2812; }
  .pa-karte { border-color: #34507A; background-color: #1B2433; color: #93C5FD; }
  .pa-karte-sub { color: #B3AB9C; }
  .chat-bubble.pa-blase { border-color: #34507A; }
  .pa-blase-info { color: #B3AB9C; }
  .vo-frage-box { background-color: #24211D; }
  .vo-frage-icon { background-color: #182B20; color: #6EE7A0; }
  .vo-frage-titel { color: #EEE9E0; }
  .vo-frage-text { color: #B3AB9C; }
  .vo-frage-nein { border-color: #7A7164; background-color: #24211D; color: #EEE9E0; }
  .vo-frage-icon.ton-gelb { background-color: #2F2812; color: #FCD34D; }
  .vo-frage-detail { background-color: #2F2812; border-color: #6B5A12; }
  .vo-frage-betrag { color: #FCD34D; }
  .vo-frage-frist { color: #FCD34D; }
  .wf-kopf { background-color: #182B20; border-color: #2F5E44; }
  .wf-kopf.wf-gesperrt { background-color: #331B19; border-color: #7F2D2A; }
  .wf-kopf .wf-kopf-zeile { color: #B3AB9C; }
  .wf-wt { color: #B3AB9C; }
  .wf-tag { border-color: #3B362F; background-color: #24211D; color: #EEE9E0; }
  .wf-tag.wf-leer { background-color: transparent; }
  .wf-tag.wf-aus { background-color: #2D2924; color: #B3AB9C; }
  .wf-tag.wf-wochenende { background-color: #2D2924; }
  .wf-tag.wf-feiertag { background-color: #4A211E; border-color: #7F2D2A; }
  .wf-tag.wf-feiertag:not(.wf-beantragt):not(.wf-genehmigt):not(.wf-abgelehnt) .wf-tag-nr,
  .wf-tag.wf-feiertag:not(.wf-beantragt):not(.wf-genehmigt):not(.wf-abgelehnt) .wf-tag-ft { color: #FCA5A5; }
  .wf-tag.wf-feiertag.wf-aus { background-color: #331B19; }
  .wf-tag-ft { color: inherit; }
  .wf-tag.wf-beantragt { background-color: #7F2D2A; color: #FCA5A5; }
  .wf-tag.wf-genehmigt { background-color: #2F5E44; color: #EEE9E0; }
  .wf-tag.wf-abgelehnt { background-color: #3B362F; color: #B3AB9C; border-color: #7A7164; }
  .wf-legende { color: #B3AB9C; }
  .wf-leg-kasten { border-color: #3B362F; }
  .wf-leg-kasten.wf-leg-feiertag { background-color: #4A211E; border-color: #7F2D2A; }
  .wf-legende .wf-leg-feiertage { color: #FCA5A5; }
  .bubble-weitergeleitet { color: #B3AB9C; }
  .chat-bubble.eigene .bubble-weitergeleitet { color: #B3AB9C; }
  .chat-aktionen-box { background-color: #24211D; }
  .chat-aktionen-griff { background-color: #3B362F; }
  .chat-akt-btn { color: #EEE9E0; background-color: #2D2924; }
  .chat-akt-btn:active { background-color: #3B362F; }
  .chat-akt-loeschen { color: #FCA5A5; background-color: #331B19; }
  .chat-akt-loeschen:active { background-color: #4A211E; }
  .chat-akt-abbrechen { color: #B3AB9C; background-color: #24211D; }
  .os-android .chat-aktionen-griff { background-color: #3B362F; }
  .chat-fwd-vorschau { background-color: #2D2924; border-bottom-color: #3B362F; }
  .chat-fwd-vorschau-wer { color: #EEE9E0; }
  .chat-fwd-vorschau-kette { color: #B3AB9C; }
  .chat-fwd-vorschau-text { color: #B3AB9C; }
  .chat-fwd-suchzeile { background-color: #24211D; border-bottom-color: #3B362F; }
  input.chat-fwd-suche { border-color: #3B362F; background-color: #2D2924; }
  .chat-fwd-ziele { background-color: #24211D; }
  .chat-fwd-gruppe { color: #B3AB9C; background-color: #2D2924; }
  .chat-fwd-ziel { background-color: #24211D; }
  .chat-fwd-ziel:active { background-color: #2D2924; }
  .chat-fwd-ziel::after { background-color: #2D2924; }
  .chat-fwd-name { color: #EEE9E0; }
  .chat-fwd-haken { border-color: #7A7164; background-color: #24211D; }
  .chat-fwd-ziel.gewaehlt .chat-fwd-haken { background-color: #1A73E8; }
  .chat-fwd-leiste { background-color: #24211D; border-top-color: #3B362F; }
  button.chat-fwd-senden { color: #1F2937; background-color: #FFC107; }
  button.chat-fwd-senden:active { background-color: #E6AC00; color: #2A2113; }
  button.chat-fwd-senden:disabled { background-color: #3B362F; color: #A8A091; }
  .konv-row { background-color: #24211D; }
  .ma-dok-ordner,
  .ma-dok-card,
  .kontakt-card,
  .madok-viewer-close,
  .madok-viewer-zoombtn,
  .madok-viewer-extern { border-color: #7A7164; }
  .thw-rolle { border-color: #7A7164; }
  .faq-suche { color: #EEE9E0; background-color: #2D2924; }
  .faq-suche:focus { background-color: #24211D; }
  .faq-status { color: #B3AB9C; }
  .faq-intro { color: #B3AB9C; }
  .faq-back-chip { color: #93C5FD; }
  .faq-back-chip:active { background-color: #1B2433; }
  .faq-antwort { background-color: #24211D; border-color: #3B362F; border-left-color: #7A7164; }
  .faq-stand { color: #B3AB9C; }
  .faq-frage { color: #EEE9E0; }
  .faq-text { color: #EEE9E0; }
  .faq-hinweis { border-left-color: #7A7164; }
  .faq-hinweis-text { color: #EEE9E0; }
  .fl-kontroll-btn,
  .termin-rsvp-btn,
  .ber-nav-btn,
  .thw-btn-sek,
  .thw-q-btn,
  .ghost-btn,
  .chat-akt-btn,
  .madok-viewer-close,
  .madok-viewer-extern { background-color: #24211D; border-color: #7A7164; color: #EEE9E0; }
  .fl-kontroll-btn:active,
  .termin-rsvp-btn:active,
  .ber-nav-btn:active,
  .thw-btn-sek:active,
  .thw-q-btn:active,
  .ghost-btn:active,
  .chat-akt-btn:active,
  .madok-viewer-close:active,
  .madok-viewer-extern:active { background-color: #2D2924; }
  .not-action-btn,
  .ber-clear-btn,
  .faq-back-chip { background-color: transparent; }
  .chat-akt-loeschen { background-color: #331B19; color: #FCA5A5; }
  .chat-akt-loeschen:active { background-color: #4A211E; }
  .thw-btn-warn { border-color: #7F2D2A; color: #FCA5A5; }
  .thw-btn-warn:active { background-color: #331B19; }
  .fl-kontroll-box.due .fl-kontroll-btn { background-color: #DC2626; color: #FFFFFF; }
  .termin-rsvp-btn.ja.active { background-color: #1F3A2A; color: #6EE7A0; }
  .termin-rsvp-btn.nein.active { background-color: #4A211E; color: #FCA5A5; }
  .zeit-stempel-btn.zeit-gelb { background-color: #FACC15; color: #1F2937; }
  .zeit-stempel-btn.zeit-rot { color: #FFFFFF; }
  .chat-akt-abbrechen { background-color: #24211D; border-color: #7A7164; color: #B3AB9C; }
  .vo-frage-nein { background-color: #24211D; border-color: #7A7164; color: #EEE9E0; }
  .vo-btn-fax { background-color: #1B2433; border-color: #34507A; color: #93C5FD; }
  .vo-btn-navi { background-color: #182B20; border-color: #2F5E44; color: #6EE7A0; }
  .vo-btn-tel { background-color: #24211D; border-color: #7A7164; color: #EEE9E0; }
  .vo-btn-fertig.vo-btn-wartet { background-color: #F59E0B; color: #1F2937; }
  .kif-faq-btn { border-color: #2F5E44; color: #6EE7A0; }
  .kif-faq-btn:disabled { border-color: #7A7164; color: #A8A091; }
  .kif-zurueck-btn { color: #93C5FD; }
  .kif-del-btn { color: #B3AB9C; }
  .kif-weiter-go { background-color: #FFC107; color: #1F2937; }
  .kif-weiter-go:disabled { background-color: #4F410B; color: #A8A091; }
  .gif-btn { background-color: #24211D; color: #B3AB9C; }
  .gif-btn:active { background-color: #3B362F; }
  .gif-blatt { background-color: #24211D; border-top-color: #7A7164; }
  .gif-blatt-kopf { border-bottom-color: #3B362F; }
  .gif-suche { border-color: #7A7164; background-color: #2D2924; }
  .gif-zu { background-color: #FFC107; color: #1F2937; }
  .gif-schnell button { border-color: #7A7164; background-color: #2D2924; color: #EEE9E0; }
  .gif-schnell button.aktiv { background-color: #FFC107; color: #1F2937; }
  .gif-raster button { border-color: #3B362F; background-color: #2D2924; }
  .gif-hinweis { color: #B3AB9C; }
  .dms-hoch-btn { border-color: #3B362F; background-color: #24211D; color: #EEE9E0; }
  .dms-hoch-btn:active { background-color: #2F2812; }
  .dms-frei { background-color: #24211D; border-color: #3B362F; }
  .dms-frei-titel { color: #EEE9E0; }
  .dms-frei-text { color: #B3AB9C; }
  .dms-frei-btn { background-color: #F2C400; color: #211D17; }
  .dms-frei-msg { color: #FCA5A5; }
  .dms-name-erkannt { color: #B3AB9C; }
  .dms-name-erkannt.ist-erkannt { color: #6EE7A0; }
  .dms-name-fehler { color: #FCA5A5; }
  .dms-name-original { color: #B3AB9C; }
  .ueb-kunde { background-color: #24211D; border-bottom-color: #3B362F; }
  .ueb-kunde:active { background-color: #2F2812; }
  .ueb-kunde-name { color: #EEE9E0; }
  .ueb-kunde-sub { color: #B3AB9C; }
  .ueb-pfeil { color: #B3AB9C; }
  .ueb-check { color: #EEE9E0; }
  .ueb-karte { background-color: #24211D; border-color: #3B362F; border-left-color: #7A7164; }
  .ueb-karte.wichtig { background-color: #331B19; }
  .ueb-karte.auto { background-color: #2D2924; border-left-color: #7A7164; }
  .ueb-karte.auto .ueb-karte-text { color: #B3AB9C; }
  .ueb-karte-zeit { color: #B3AB9C; }
  .ueb-marke-neu { background-color: #F2C400; color: #1F2937; }
  .ueb-marke-auto { background-color: #3B362F; color: #B3AB9C; }
  .ueb-karte-text { color: #EEE9E0; }
  .ueb-karte-wer { color: #EEE9E0; }
  .ueb-karte-gelesen { color: #B3AB9C; }
  .chat-vorrat-hinweis { color: #B3AB9C; background-color: #2D2924; }
  .nr-werkzeug { background-color: #24211D; border-bottom-color: #3B362F; }
  .nr-postfach { color: #EEE9E0; background-color: #24211D; border-color: #7A7164; }
  input.nr-suche { color: #EEE9E0; background-color: #2D2924; border-color: #7A7164; }
  input.nr-suche:focus { background-color: #24211D; }
  .nr-stumm-zeile .nr-stumm-zustand { color: #B3AB9C; }
  .nr-stumm-zeile.nr-ist-stumm { background-color: #2D2924; }
  #nr-liste { background-color: #24211D; }
  .konv-item .nr-avatar.nr-k-wa { background-color: #005C4B; }
  .konv-item .nr-avatar.nr-k-mail { background-color: #1B2433; }
  .konv-item .nr-avatar.nr-k-sonst { background-color: #2D2924; }
  .nr-kopf-sub { color: #EEE9E0; }
  .nr-fenster { color: #B3AB9C; background-color: #2D2924; border-bottom-color: #3B362F; }
  #nr-verlauf { background-color: #0B141A; }
  #nr-verlauf.nr-mail { background-color: #2D2924; }
  #nr-verlauf .chat-bubble.nr-notiz { background-color: #2F2812; }
  .nr-vorlage { color: #B3AB9C; }
  .nr-gekuerzt { color: #B3AB9C; }
  button.nr-aeltere { color: #EEE9E0; background-color: rgba(36, 33, 29, 0.92); }
  .nr-datei { color: #EEE9E0; }
  .nr-datei-fehlt { color: #B3AB9C; }
  .ticks.nr-fehler { color: #FCA5A5; }
  .nr-eingabe { background-color: #2D2924; border-top-color: #7A7164; }
  .nr-sperre { color: #FCD34D; background-color: #2F2812; }
  .nr-von { color: #B3AB9C; }
  select.nr-von-wahl { color: #EEE9E0; background-color: #24211D; border-color: #7A7164; }
  textarea.nr-text { color: #EEE9E0; background-color: #24211D; }
  textarea.nr-text:disabled { background-color: #2D2924; }
  .nr-modus-btn { color: #B3AB9C; }
  .nr-modus-btn + .nr-modus-btn::before { background-color: rgba(238, 233, 224, 0.26); }
  .nr-modus-btn.active { color: #EEE9E0; background-color: #24211D; }
  .nr-notiz-hinweis { color: #FCD34D; background-color: #2F2812; }
  .nr-eingabe.nr-notiz-modus textarea.nr-text { background-color: #2F2812; }
  .nr-notiz-btn { background-color: #F59E0B; color: #2A2113; }
  .nr-mf { background-color: #2F2812; border-bottom-color: #6B5A12; }
  .nr-mf-ende { background-color: #4F410B; color: #FCD34D; }
  .nr-mf-ende:active { background-color: #4F410B; }
  .nr-mf-zahl { color: #FCD34D; }
  .nr-mf-knopf { background-color: #FFC107; color: #1F2937; }
  .nr-mf-knopf:active { background-color: #F59E0B; color: #2A2113; }
  .nr-mf-knopf.nr-mf-haupt { background-color: #F59E0B; color: #2A2113; }
  #screen-nachrichten.nr-mf-an .konv-item .nr-mf-kreis { background-color: #24211D; border-color: #7A7164; }
  .konv-item.nr-markiert { background-color: #2F2812; }
  #screen-nachrichten .konv-item.nr-markiert .nr-mf-kreis { background-color: #FFC107; color: #2A2113; }
  #screen-nachrichten .konv-item.nr-markiert .nr-mf-kreis::after { background-color: transparent; }
  .konv-item.nr-markiert .konv-name { color: #FCD34D; }
  .bef-hinweis { color: #EEE9E0; background-color: #182B20; border-color: #2F5E44; }
  .bef-frage { background-color: #24211D; border-color: #3B362F; }
  .bef-frage-txt { color: #EEE9E0; }
  .bef-emoji { background-color: #2D2924; border-color: #3B362F; color: #B3AB9C; }
  .bef-emoji.akt { background-color: #4F410B; color: #EEE9E0; }
  .bef-emoji.akt::after { color: #EEE9E0; }
  .bef-emoji.akt .bef-emoji-label { color: #EEE9E0; }
  #btn-bef-absenden:disabled { background-color: #3B362F; color: #A8A091; }
  .bef-danke-box { background-color: #24211D; border-color: #3B362F; color: #EEE9E0; }
  .bef-status { color: #FCA5A5; }
  #screen-meinkalender .not-body,
  #screen-mk-termin .not-body { background-color: #24211D; }
  .mk-leiste { background-color: #24211D; }
  .mk-titel { color: #EEE9E0; }
  .mk-pfeil { border-color: #3B362F; background-color: #24211D; color: #B3AB9C; }
  .mk-pfeil:hover { background-color: #2D2924; }
  .mk-pfeil:active { background-color: #2F2812; }
  .mk-heute { background-color: #FFC107; color: #1F2937; }
  .mk-heute:hover { background-color: #FFCA28; color: #2A2113; }
  .mk-heute:active { background-color: #E6AC00; color: #2A2113; }
  .mk-wahl-chip { border-color: #3B362F; background-color: #24211D; color: #B3AB9C; }
  .mk-wahl-chip.an { background-color: #1B2433; color: #93C5FD; }
  .mk-wt span { color: #B3AB9C; }
  .mk-tag:hover { background-color: #2D2924; }
  .mk-tag-nr { color: #EEE9E0; }
  .mk-heute-tag .mk-tag-nr { color: #FFFFFF; }
  .mk-gewaehlt { background-color: #1B2433; border-color: #34507A; }
  .mk-gewaehlt:hover { background-color: #1B2433; }
  .mk-fremd .mk-tag-nr { color: #C4C7C5; }
  .mk-tag-kopf { color: #EEE9E0; }
  .mk-tag-kopf .termin-feiertag-name { color: #9A5B00; }
  .mk-leer { color: #B3AB9C; }
  .mk-termin { background-color: #24211D; border-color: #3B362F; }
  .mk-termin-zeit { color: #EEE9E0; }
  .mk-termin-zeit small { color: #B3AB9C; }
  .mk-termin-titel { color: #EEE9E0; }
  .mk-abg-hinweis { color: #FCA5A5; }
  .mk-termin-sub { color: #B3AB9C; }
  .mk-termin-serie { color: #B3AB9C; }
  .mk-termin.mk-abg .mk-termin-titel { color: #B3AB9C; }
  .mk-termin.mk-abg .mk-termin-zeit { color: #B3AB9C; }
  .mk-termin.mk-abg .mk-termin-sub { color: #B3AB9C; }
  .mk-termin.mk-einladung { background-color: #24211D; border-color: #34507A; }
  .mk-d-titel { color: #EEE9E0; }
  .mk-d-zeit { color: #B3AB9C; }
  .mk-d-wdh { color: #B3AB9C; }
  .mk-d-abg { background-color: #331B19; color: #FCA5A5; }
  .mk-d-zeile { border-bottom-color: #3B362F; }
  .mk-d-wert { color: #B3AB9C; }
  .mk-d-text { color: #B3AB9C; }
  .mk-d-klein { color: #B3AB9C; }
  .mk-d-antwort { background-color: #2D2924; }
  .mk-loeschen { border-color: #3B362F; background-color: #24211D; color: #FCA5A5; }
  .mk-loeschen:hover { background-color: #331B19; }
  .mk-form label { color: #B3AB9C; }
  .mk-form .mk-feld { border-bottom-color: #3B362F; color: #EEE9E0; }
  .mk-schalter { color: #B3AB9C; }
  .mk-zeile-lbl { color: #B3AB9C; }
  .mk-chip { border-color: #3B362F; background-color: #24211D; color: #B3AB9C; }
  .mk-chip.an { background-color: #1B2433; color: #93C5FD; }
  .mk-hinweis { color: #B3AB9C; }
  .mk-fehler { color: #FCA5A5; }
  .bh-btn { background-color: #FFC107; color: #1F2937; }
  .bh-btn:active { background-color: #F59E0B; color: #2A2113; }
  .bh-msg { color: #93C5FD; background-color: #1B2433; }
  .bh-msg-fehl { color: #FCA5A5; background-color: #331B19; }
  .bh-leer { color: #B3AB9C; }
  .bh-eintrag { background-color: #24211D; border-color: #3B362F; }
  .bh-name { color: #EEE9E0; }
  .bh-betrag { color: #EEE9E0; }
  .bh-konto { color: #B3AB9C; }
  .bh-st-neu { color: #93C5FD; background-color: #22304A; }
  .bh-st-ki { color: #FCD34D; background-color: #2F2812; }
  .bh-st-ko { color: #FDBA74; background-color: #3A2614; }
  .bh-st-gb { color: #6EE7A0; background-color: #1F3A2A; }
  .bh-st-ab { color: #FCA5A5; background-color: #4A211E; }
  .bh-st-dl { color: #B3AB9C; background-color: #2D2924; }
  .bh-datum { color: #B3AB9C; }
  .azb-seg { background-color: #24211D; border-color: #3B362F; color: #B3AB9C; }
  .azb-status { color: #B3AB9C; }
  .azb-status-err { color: #FCA5A5; }
  .azb-label { color: #B3AB9C; }
  .azb-label-hint { color: #B3AB9C; }
  .azb-input { border-color: #3B362F; background-color: #24211D; color: #EEE9E0; }
  .azb-checks { background-color: #24211D; border-color: #3B362F; }
  .azb-checks label { color: #EEE9E0; }
  .azb-bew-karte { background-color: #24211D; border-color: #3B362F; }
  .azb-bew-karte-erledigt { border-color: #2F5E44; background-color: #182B20; }
  .azb-bew-name { color: #EEE9E0; }
  .azb-bew-woche { color: #B3AB9C; }
  .azb-krit-label { color: #B3AB9C; }
  .azb-punkt { border-color: #3B362F; background-color: #24211D; color: #EEE9E0; }
  .azb-bew-summe { color: #6EE7A0; }
  .azb-g-eintrag { background-color: #24211D; border-color: #3B362F; }
  .azb-g-eintrag:active { background-color: #2D2924; }
  .azb-g-zeile1 { color: #EEE9E0; }
  .azb-g-zeile2 { color: #B3AB9C; }
  .azb-g-kat { background-color: #1B2433; color: #93C5FD; }
  .kichat-zeit { color: #B3AB9C; }
  .kichat-nachricht.kichat-user .kichat-bubbel { background-color: #FFC107; color: #1F2937; }
  .kichat-nachricht.kichat-ki .kichat-bubbel { background-color: #2D2924; color: #EEE9E0; border-color: #3B362F; }
  .kichat-bubbel.kichat-denkt { color: #B3AB9C; }
  .kichat-nachricht .kichat-bubbel.kichat-fehler { background-color: #331B19; border-color: #7F2D2A; color: #FCA5A5; }
  .kichat-leer { color: #B3AB9C; }
  .kichat-inputzeile { border-top-color: #3B362F; background-color: #24211D; }
  .kichat-input { border-color: #7A7164; background-color: #24211D; color: #EEE9E0; }
  .kichat-senden { background-color: #FFC107; color: #1F2937; }
  .kichat-senden:active { background-color: #E6AC00; color: #2A2113; }
  .kichat-senden:disabled { background-color: #3B362F; color: #A8A091; }
  .kichat-sprache { border-color: #7A7164; background-color: #24211D; }
  .kichat-sprache.kichat-sprache-an { background-color: #B3261E; }
  .kichat-sprache-status { color: #B3AB9C; background-color: #24211D; }
  .kichat-sprache-status.kichat-sprache-fehler { color: #FCA5A5; }
  .kichat-audio { background-color: #2D2924; border-color: #3B362F; }
  .kichat-sprich-btn { border-color: #6B5A12; background-color: #2F2812; color: #FCD34D; }
  .kichat-sprich-btn.kichat-sprich-an { background-color: #FFC107; color: #1F2937; }
  .kichat-vorschlag { border-color: #3B362F; background-color: #24211D; color: #EEE9E0; }
  .kichat-vorschlag:active { background-color: #2F2812; border-color: #6B5A12; }
  .kichat-stopp { background-color: #331B19; color: #FCA5A5; }
  .kichat-stopp:active { background-color: #B3261E; color: #FFFFFF; }
  .jsv-audiobar { border-color: #6B5A12; background-color: #2F2812; }
  .jsv-audiobar:active { background-color: #2F2812; }
  .jsv-audiobar-ikon { color: #FCD34D; }
  .jsv-audiobar-bahn { background-color: #4F410B; }
  .jsv-audiobar-zeit { color: #FCD34D; }
  .fl-alle-reihe { color: #EEE9E0; }
  .ticks.nr-keinwa { color: #FCA5A5; }
  .nr-kopf-keinwa { color: #FCA5A5; }
  .thw-halt.thw-buero:not(.thw-fertig):not(.thw-laeuft-jetzt) { background-color: #2F2812; }
  .thw-fahrt { color: #EEE9E0; background-color: #2F2812; border-left-color: #6B5A12; }
  .thw-fahrt.thw-fahrt-offen { color: #FCD34D; }
  .thw-halt-plan { color: #B3AB9C; }
  .thw-einsatz-zeit { color: #EEE9E0; }
  .med-body { background-color: #2D2924; }
  .med-suche { border-color: #3B362F; background-color: #24211D; }
  .med-filter { border-color: #3B362F; background-color: #24211D; }
  .med-seg { border-right-color: #3B362F; color: #B3AB9C; }
  .med-seg:hover { background-color: #2F2812; }
  .med-seg-active,
  .med-seg-active:hover { background-color: #F2C400; color: #211D17; }
  .med-knopf { border-color: #3B362F; background-color: #24211D; color: #EEE9E0; }
  .med-knopf:hover { background-color: #2F2812; }
  .med-knopf-primaer { background-color: #F2C400; color: #2A2113; }
  .med-knopf-primaer:hover { background-color: #E3B800; color: #2A2113; }
  .med-status { background-color: #2F2812; color: #F2D36B; }
  .med-status-err { background-color: #4A211E; color: #FCA5A5; }
  .med-abschnitt { color: #A8A091; }
  .med-ordner { background-color: #24211D; border-color: #3B362F; }
  .med-ordner-icon { background-color: #2F2812; }
  .med-ordner-name { color: #EEE9E0; }
  .med-ordner-sub { color: #F2D36B; }
  .med-kachel { background-color: #24211D; border-color: #3B362F; }
  .med-bild { background-color: #2D2924; color: #A8A091; }
  .med-k-name { color: #EEE9E0; }
  .med-k-meta { color: #B3AB9C; }
  .med-leer { color: #B3AB9C; }
  .med-hinweis { color: #B3AB9C; }
  .med-ablegen-text { background-color: #24211D; color: #EEE9E0; }
  .med-a-seite { background-color: #24211D; border-color: #3B362F; }
  .med-a-name { color: #EEE9E0; }
  .med-a-meta { color: #B3AB9C; }
  .med-a-beschreibung { color: #EEE9E0; }
}
/* === DUNKELMODUS-BLOCK (generiert) ENDE === */

/* Dunkelmodus: Grundflaechen und Ergaenzungen von Hand */
@media (prefers-color-scheme: dark) {
  html, body { background-color: #181613; color: #EEE9E0; }
  /* Felder und Knoepfe ohne eigene Klasse (Spezifitaet 0) */
  :where(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]),
         select, textarea) {
    background-color: #24211D; color: #EEE9E0; border-color: #7A7164;
  }
  ::placeholder { color: #A8A091; opacity: 1; }
  :where(button) { background-color: #2D2924; color: #EEE9E0; }
  :where(a:link, a:visited) { color: #93C5FD; }
  /* Kachel-Symbol in Fast-Schwarz verschwaende auf der dunklen Karte */
  #btn-dms-open .start-btn-icon { --sym: #57534E; }
  /* Chat/WhatsApp: fremde Blase im Original-Dunkelton von WhatsApp
     (Grund #0B141A, eigene Blase #005C4B - nie Hauspalette) */
  .chat-bubble.fremd:not(.geloescht) { background-color: #202C33; }
  .chat-bubble.fremd.tail:not(.geloescht)::after { border-right-color: #202C33; }
  /* Befragungs-Kachel: ihr Pulsieren (geschuetzt, keyframes oben) malt
     die Flaeche hell - die Schrift bleibt deshalb dunkel. */
  #btn-befragung-open { color: #1F2937; }
  #btn-befragung-open .start-btn-label { color: #92400E; }
  #btn-befragung-open .start-btn-sub { color: #6B6459; }
  #btn-befragung-open::before { border-color: rgba(60, 60, 67, 0.3); }

  /* Farben, die app.js bzw. index.html direkt ins style-Attribut
     schreiben (Logik bleibt unveraendert, deshalb hier). Inline-Stile
     schlagen das Stylesheet - nur !important kommt dagegen an. */
  [style*="background:#fff;" i], [style*="background: #fff;" i] { background-color: #24211D !important; }
  [style*="background:#F8FAFC" i] { background-color: #2D2924 !important; }
  [style*="background:#E5E7EB" i] { background-color: #3B362F !important; }
  [style*="background:#FEF2F2" i] { background-color: #331B19 !important; }
  [style*="background:#FEF3C7" i] { background-color: #2F2812 !important; }
  [style*="background:#ECFDF5" i] { background-color: #182B20 !important; }
  [style*="background:#D1FAE5" i] { background-color: #1F3A2A !important; }
  [style*="background:#E0E7FF" i] { background-color: #22304A !important; }
  [style*="background: rgb(255, 251, 235)"] { background-color: #2F2812 !important; }
  [style*="background: rgb(236, 253, 245)"] { background-color: #182B20 !important; }
  [style*="color:#111827" i], [style*="color:#0F172A" i],
  [style*="color:#374151" i], [style*="color:#334155" i] { color: #EEE9E0 !important; }
  [style*="color:#475569" i], [style*="color:#64748B" i],
  [style*="color:#6B7280" i] { color: #B3AB9C !important; }
  [style*="color:#9CA3AF" i], [style*="color:#94A3B8" i] { color: #A8A091 !important; }
  [style*="color:#B91C1C" i], [style*="color:#991B1B" i],
  [style*="color: rgb(185, 28, 28)"] { color: #FCA5A5 !important; }
  [style*="color:#92400E" i] { color: #FCD34D !important; }
  [style*="color:#047857" i], [style*="color:#065F46" i],
  [style*="color: rgb(21, 128, 61)"] { color: #6EE7A0 !important; }
  [style*="color:#1D4ED8" i] { color: #93C5FD !important; }
  [style*="color:#4F46E5" i], [style*="color:#4338CA" i] { color: #A5B4FC !important; }
  [style*="solid #cbd5e1" i] { border-color: #7A7164 !important; }
  [style*="solid #E2E8F0" i], [style*="solid #E5E7EB" i],
  [style*="solid #E4DDCE" i] { border-color: #3B362F !important; }
  [style*="solid #FDE68A" i] { border-color: #6B5A12 !important; }
  [style*="solid #A7F3D0" i] { border-color: #2F5E44 !important; }
  [style*="#FCA5A5" i][style*="border" i] { border-color: #7F2D2A !important; }
  [style*="border-color: rgb(252, 211, 77)"] { border-color: #6B5A12 !important; }
  [style*="border-color: rgb(167, 243, 208)"] { border-color: #2F5E44 !important; }
}
/* ===== Ende HIG-Ueberarbeitung ===== */

/* ===== Bonusstand / Werbeprämie (ab 0.7.0.558) ===== */
.bonus-summe { display: flex; gap: 8px; margin: 0 0 4px; }
.bonus-summe > div { flex: 1; background: #FFFAE6; border: 1px solid #E4DDCE;
  border-radius: 12px; padding: 10px 8px; text-align: center; }
.bonus-summe b { display: block; font-size: 1.05rem; color: #2A2113; }
.bonus-summe span { font-size: 0.78rem; color: #6B6459; }
.bonus-karte .bonus-status { display: inline-block; margin: 6px 0 2px;
  padding: 2px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 700;
  background: #EDE9E1; color: #3F3A33; }
.bonus-status.st-warte_rechnung { background: #E0E7FF; color: #312E81; }
.bonus-status.st-provision_berechnet { background: #CCFBF1; color: #134E4A; }
.bonus-status.st-bonus_geplant { background: #FFEB94; color: #2A2113; }
.bonus-status.st-bonus_ausgezahlt { background: #DCFCE7; color: #14532D; }
.bonus-status.st-kein_anspruch { background: #F1F0EC; color: #6B6459; }
.bonus-schritte { display: flex; gap: 4px; margin: 8px 0 6px; }
.bonus-schritt { flex: 1; font-size: 0.68rem; color: #9C9486; text-align: center; }
.bonus-schritt span { display: block; height: 5px; border-radius: 3px;
  background: #E4DDCE; margin-bottom: 3px; }
.bonus-schritt.an span { background: #F2C400; }
.bonus-schritt.an { color: #5B554B; }
.bonus-schritt.jetzt { font-weight: 700; color: #2A2113; }
.bonus-betrag { font-size: 1.5rem; font-weight: 800; color: #2A2113; margin-top: 4px; }
.bonus-bem { margin-top: 6px; padding: 6px 8px; background: #F8F6F1;
  border-radius: 8px; font-size: 0.88rem; }
.bonus-bem span { display: block; font-size: 0.74rem; color: #8A8273; }
@media (prefers-color-scheme: dark) {
  .bonus-summe > div { background: #2C2716; border-color: #3B362F; }
  .bonus-summe b, .bonus-betrag, .bonus-schritt.jetzt { color: #F5EFE2; }
  .bonus-summe span, .bonus-schritt.an { color: #B3AB9C; }
  .bonus-schritt span { background: #3B362F; }
  .bonus-bem { background: #2A2621; }
}

/* Zweite Stufe der Anmeldung (ab 0.7.0.1096): Haken gross genug fuer den Daumen */
.lo-vertrauen { display: flex; align-items: center; gap: 10px; margin: 14px 0 4px; }
.lo-vertrauen input { width: 24px; height: 24px; margin: 0; flex: none; }
