/* Klingelfrei · Oberfläche
   Marke (Variante A „Messingglocke“, 30.09.2026): Nachtblau --marke-* als Grundfarbe, Messing --warm-* als Akzent.
   Logo bilder/klingelfrei-icon.svg, Wortmarke bilder/klingelfrei-wortmarke.svg. Alle Markenfarben hängen an den
   Variablen unter „Gestaltungswerte“; Kontraste nach WCAG AA geprüft, hell und dunkel (doku/marke/).
   Schriften: Inter (Text) und Poppins SemiBold (Titel, wie die Wortmarke), beide unter der
   SIL Open Font License 1.1, Lizenztexte in fonts/OFL-*.txt. Symbole nach Lucide (ISC-Lizenz). */

/* ── Schriften ─────────────────────────────────────────────────────────────── */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/inter-var-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/inter-var-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/poppins-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/poppins-600-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ── Gestaltungswerte ──────────────────────────────────────────────────────── */
:root {
  color-scheme: light;
  /* Marke: Nachtblau (Grundfarbe) und Messing („warm“, Akzent wie die Glocke im Logo) */
  --marke-50: #eef3f9; --marke-100: #dde6f1; --marke-200: #bacce2; --marke-300: #8ba7cb; --marke-400: #5e82b1;
  --marke-500: #3a6194; --marke-600: #284c7b; --marke-700: #1f3b5f; --marke-800: #16294a; --marke-900: #0f1d34;
  --warm: #d4a23c;          /* Messing im Logo, nur für Flächen und Zeichen, nicht für Text */
  --warm-punkt: #b07d17;    /* Punkte und Linien, mindestens 3:1 zur Fläche */
  --warm-hell: #faf0d9; --warm-rand: #ebd29a; --warm-dunkel: #7e560d; --warm-dunkel-2: #6d4a0a;
  --marke-schatten: 15, 29, 52;                          /* Nachtblau als RGB für Schatten und Schleier */
  /* Altnamen aus der Zeit vor Klingelfrei (Zweige, die noch --teal-* oder --koralle* nutzen): zeigen auf die Marke */
  --teal-50: var(--marke-50); --teal-100: var(--marke-100); --teal-200: var(--marke-200); --teal-300: var(--marke-300);
  --teal-500: var(--marke-500); --teal-600: var(--marke-600); --teal-700: var(--marke-700); --teal-800: var(--marke-800);
  --teal-900: var(--marke-900);
  --koralle: var(--warm-punkt); --koralle-hell: var(--warm-hell); --koralle-dunkel: var(--warm-dunkel);

  --grund: #f5f4f0;
  --flaeche: #ffffff;
  --flaeche-2: #faf9f6;
  --flaeche-3: #f0eee8;
  --tinte: #172233;
  --tinte-2: #3c4656;
  --leise: #5a6473;
  --linie: #e5e2da;
  --linie-2: #d3cfc5;
  --linie-hover: #b9b4a8;

  --primaer: var(--marke-600);
  --primaer-hover: var(--marke-700);
  --primaer-text: #ffffff;
  --akzent-text: var(--marke-600);
  --akzent-bg: var(--marke-50);
  --akzent-rand: #c7d6e9;
  --wortmarke: var(--marke-700);
  --wortmarke-punkt: var(--warm);
  --fokus: rgba(40, 76, 123, .38);
  --marke-punkt: var(--marke-500);                      /* Punkte in Markenfarbe, Status „in Arbeit“ */
  --zaehler-bg: var(--warm-dunkel); --zaehler-text: #ffffff;   /* Zähler an den Reitern (Handy) */

  --rot: #b42318;      --rot-bg: #feeceb;      --rot-punkt: #e5484d;    --rot-rand: #f7cdc9;
  --gruen: #0f7a4c;    --gruen-bg: #e6f6ee;    --gruen-punkt: #22a06b;
  --gelb: #7c5e00;     --gelb-bg: #fbf3d5;     --gelb-punkt: #e2ad00;   --gelb-rand: #efdc9c;
  --blau: #1d4ed8;     --blau-bg: #eaf0ff;     --blau-punkt: #3b82f6;
  --violett: #6d28d9;  --violett-bg: #f2ecff;  --violett-punkt: #8b5cf6;
  --orange: #b4480b;   --orange-bg: #ffefe5;   --orange-punkt: #f97316;
  --schiefer: #475569; --schiefer-bg: #eef2f6; --schiefer-punkt: #94a3b8;
  --tuerkis: #0f6b64;  --tuerkis-bg: #e3f3f1;  --tuerkis-punkt: #14a394;

  --r-s: 8px; --r: 12px; --r-l: 16px; --r-xl: 22px;
  --schatten-1: 0 1px 2px rgba(var(--marke-schatten), .06);
  --schatten-2: 0 1px 3px rgba(var(--marke-schatten), .05), 0 6px 18px -6px rgba(var(--marke-schatten), .12);
  --schatten-3: 0 2px 8px rgba(var(--marke-schatten), .06), 0 24px 56px -16px rgba(var(--marke-schatten), .28);
  --schrift: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --schrift-titel: "Poppins", "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --leiste-breite: 264px;
  --unten-hoehe: 64px;
  --tempo: .18s;
  --federung: cubic-bezier(.2, .8, .2, 1);
  --pfeil-unten: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a6473' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --grund: #0b111b;
    --flaeche: #121a27;
    --flaeche-2: #0e1520;
    --flaeche-3: #1a2435;
    --tinte: #e6eaf0;
    --tinte-2: #b5bfcc;
    --leise: #8c97a7;
    --linie: #212c3d;
    --linie-2: #2e3b50;
    --linie-hover: #425168;

    /* Dunkel führt Messing: Knöpfe wie die Glocke auf dem Nachtblau des Logos */
    --warm-punkt: #e0b354;
    --warm-hell: rgba(212, 162, 60, .15); --warm-rand: rgba(212, 162, 60, .36); --warm-dunkel: #e8c06a; --warm-dunkel-2: #d9ad4f;
    --primaer: #e0b354;
    --primaer-hover: #ebc46f;
    --primaer-text: #1c1405;
    --akzent-text: #a3c1ec;
    --akzent-bg: rgba(94, 130, 177, .16);
    --akzent-rand: rgba(94, 130, 177, .40);
    --wortmarke: #e6eaf0;
    --fokus: rgba(224, 179, 84, .45);
    --marke-punkt: #7fa3d6;
    --zaehler-bg: #e0b354; --zaehler-text: #1c1405;

    --rot: #ff9f97;      --rot-bg: rgba(229, 72, 77, .15);   --rot-rand: rgba(229, 72, 77, .38); --rot-punkt: #f2555a;
    --gruen: #72deaa;    --gruen-bg: rgba(34, 160, 107, .16);
    --gelb: #f2cf5b;     --gelb-bg: rgba(226, 173, 0, .14);  --gelb-rand: rgba(226, 173, 0, .34);
    --blau: #a3c1ff;     --blau-bg: rgba(59, 130, 246, .17);
    --violett: #c9b5ff;  --violett-bg: rgba(139, 92, 246, .19);
    --orange: #ffb27d;   --orange-bg: rgba(249, 115, 22, .15);
    --schiefer: #c3cfda; --schiefer-bg: rgba(148, 163, 184, .14);
    --tuerkis: #6adccd;  --tuerkis-bg: rgba(29, 179, 162, .15);

    --schatten-1: 0 1px 2px rgba(0, 0, 0, .45);
    --schatten-2: 0 1px 3px rgba(0, 0, 0, .4), 0 8px 22px -8px rgba(0, 0, 0, .55);
    --schatten-3: 0 24px 60px -16px rgba(0, 0, 0, .75);
    --pfeil-unten: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238c97a7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  }
}

/* ── Grundlagen ────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  font-family: var(--schrift); font-size: .9375rem; line-height: 1.55; color: var(--tinte); background: var(--grund);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--schrift-titel); font-weight: 600; letter-spacing: -.01em; color: var(--tinte); }
h1 { font-size: 1.625rem; line-height: 1.2; }
h2 { font-size: 1.0625rem; line-height: 1.35; }
h3 { font-size: .9375rem; font-weight: 600; line-height: 1.4; }
a { color: var(--akzent-text); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--primaer); outline-offset: 2px; }
::selection { background: var(--marke-200); color: var(--marke-900); }
.symbole { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { width: 1.25rem; height: 1.25rem; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Hilfsklassen (von den Skripten genutzt) */
.versteckt { display: none !important; }
.leise { color: var(--leise); }
.klein { font-size: .8125rem; }
.fuell { flex: 1; }
.sr-nur { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.zahl { font-variant-numeric: tabular-nums; }

/* ── Knöpfe ────────────────────────────────────────────────────────────────── */
.knopf {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 2.5rem; padding: .5rem 1rem; border-radius: 10px; border: 1px solid var(--linie-2);
  background: var(--flaeche); color: var(--tinte); font-size: .875rem; font-weight: 600; line-height: 1.2;
  text-decoration: none; white-space: nowrap; box-shadow: var(--schatten-1);
  transition: background var(--tempo), border-color var(--tempo), box-shadow var(--tempo), transform var(--tempo), color var(--tempo);
}
.knopf:hover { border-color: var(--linie-hover); background: var(--flaeche-2); text-decoration: none; }
.knopf:active { transform: translateY(1px); }
.knopf .i { width: 1.125rem; height: 1.125rem; }
.knopf.primaer { background: var(--primaer); border-color: transparent; color: var(--primaer-text);
  box-shadow: 0 1px 2px rgba(var(--marke-schatten), .28), inset 0 1px 0 rgba(255, 255, 255, .14); }
.knopf.primaer:hover { background: var(--primaer-hover); box-shadow: 0 6px 18px -6px rgba(var(--marke-schatten), .5), inset 0 1px 0 rgba(255, 255, 255, .14); }
.knopf.gefahr { background: #d13a2f; border-color: transparent; color: #fff; }
.knopf.gefahr:hover { background: #b42318; }
.knopf.leise-knopf { background: transparent; border-color: transparent; box-shadow: none; color: var(--tinte-2); }
.knopf.leise-knopf:hover { background: var(--flaeche-3); color: var(--tinte); }
.knopf.warn-text { color: var(--rot); }
.knopf.warn-text:hover { background: var(--rot-bg); border-color: var(--rot-rand); }
.knopf.gross { min-height: 3rem; padding: .75rem 1.25rem; font-size: .9375rem; border-radius: 12px; }
.knopf.klein { min-height: 2rem; padding: .3rem .7rem; font-size: .8125rem; border-radius: 8px; gap: .375rem; }
.knopf.klein .i { width: 1rem; height: 1rem; }
.knopf.breit { width: 100%; }
.knopf:disabled, .knopf[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.knopf.laedt { cursor: progress; }
.knopf.laedt > .i { display: none; }
.knopf.laedt::before { content: ""; width: 1em; height: 1em; flex: none; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: drehen .7s linear infinite; }
.knopf-icon {
  display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 10px; color: var(--tinte-2);
  transition: background var(--tempo), color var(--tempo);
}
.knopf-icon:hover { background: var(--flaeche-3); color: var(--tinte); }
.knopf-icon:disabled { opacity: .35; cursor: default; background: none; }
.knopf-icon.gefahr-icon:hover:not(:disabled) { background: var(--rot-bg); color: var(--rot); }
@keyframes drehen { to { transform: rotate(360deg); } }

/* ── Eingabefelder ─────────────────────────────────────────────────────────── */
label { display: block; margin: 0 0 .375rem; font-size: .8125rem; font-weight: 500; color: var(--tinte-2); }
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  display: block; width: 100%; min-height: 2.625rem; padding: .55rem .8rem; border: 1px solid var(--linie-2); border-radius: 10px;
  background: var(--flaeche); color: var(--tinte); font-size: .9375rem; line-height: 1.4;
  transition: border-color var(--tempo), box-shadow var(--tempo), background var(--tempo);
}
input:not([type="checkbox"]):not([type="radio"]):hover, select:hover, textarea:hover { border-color: var(--linie-hover); }
input:not([type="checkbox"]):not([type="radio"]):focus, select:focus, textarea:focus { outline: none; border-color: var(--primaer); box-shadow: 0 0 0 3px var(--fokus); }
input[readonly] { background: var(--flaeche-2); }
::placeholder { color: var(--leise); opacity: .85; }
textarea { min-height: 7.5rem; resize: vertical; line-height: 1.55; }
select { appearance: none; -webkit-appearance: none; padding-right: 2.25rem; background-image: var(--pfeil-unten); background-repeat: no-repeat; background-position: right .7rem center; background-size: 1rem; cursor: pointer; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--primaer); width: 1.05rem; height: 1.05rem; margin: 0; }
input[type="date"], input[type="time"] { min-width: 0; }
@supports (-webkit-touch-callout: none) { input[type="date"], input[type="time"] { -webkit-appearance: none; appearance: none; } }
.feld { min-width: 0; }
.feld-hinweis { margin: .375rem 0 0; font-size: .78rem; color: var(--leise); }
.formular { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; align-items: end; }
.formular .ganz, .formular > .meldung, .kennzahlen > .meldung { grid-column: 1 / -1; }
.formular > .meldung { margin: 0; }
.formular .unten { align-self: end; }
.eingabe-zeile { display: flex; gap: .5rem; align-items: stretch; }
.eingabe-zeile > input { flex: 1; min-width: 0; }

/* Schalter (Kontrollkästchen als Kippschalter, funktioniert ohne Pseudo-Elemente) */
.schalter { display: inline-flex; align-items: center; gap: .75rem; margin: 0; color: var(--tinte); font-size: .9rem; font-weight: 500; cursor: pointer; }
.schalter input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; width: 2.5rem; height: 1.5rem; flex: none; border-radius: 999px; cursor: pointer;
  background-color: var(--linie-2);
  background-image: radial-gradient(circle, #fff 0 8px, rgba(0, 0, 0, .12) 8.5px, transparent 10px);
  background-size: 1.5rem 1.5rem; background-repeat: no-repeat; background-position: 0 50%;
  transition: background-color var(--tempo), background-position var(--tempo) var(--federung);
}
.schalter input[type="checkbox"]:checked { background-color: var(--primaer); background-position: 1rem 50%; }
.schalter input[type="checkbox"]:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--fokus); }
.schalter-liste { display: flex; flex-direction: column; gap: .875rem; }
.schalter-zeile { display: flex; flex-wrap: wrap; gap: .875rem 2rem; padding: .25rem 0; }

/* Segment-Auswahl (Filter, Status) */
.segment { display: inline-flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--flaeche-3); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.segment::-webkit-scrollbar { display: none; }
.segment label { position: relative; margin: 0; flex: none; }
.segment input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.segment label span, .segment button {
  display: flex; align-items: center; justify-content: center; gap: .4rem; min-height: 2rem; padding: .35rem .8rem; border-radius: 8px;
  font-size: .8125rem; font-weight: 600; color: var(--leise); white-space: nowrap; transition: background var(--tempo), color var(--tempo), box-shadow var(--tempo);
}
.segment label:hover span, .segment button:hover { color: var(--tinte); }
.segment input:checked + span, .segment button[aria-pressed="true"] { background: var(--flaeche); color: var(--tinte); box-shadow: 0 1px 2px rgba(var(--marke-schatten), .1), 0 1px 1px rgba(var(--marke-schatten), .05); }
.segment input:focus-visible + span { box-shadow: 0 0 0 3px var(--fokus); }
@media (prefers-color-scheme: dark) {
  .segment input:checked + span, .segment button[aria-pressed="true"] { background: var(--linie-2); }
}

/* ── Chips, Status, Abzeichen ──────────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: .375rem; min-height: 1.5rem; padding: .15rem .625rem .15rem .5rem; border-radius: 999px;
  background: var(--k-bg, var(--schiefer-bg)); color: var(--k-text, var(--schiefer));
  font-size: .75rem; font-weight: 600; line-height: 1.2; white-space: nowrap;
}
.chip::before { content: ""; width: .4375rem; height: .4375rem; flex: none; border-radius: 50%; background: var(--k-punkt, currentColor); }
.chip.ohne-punkt::before { display: none; }
.chip.ohne-punkt { padding-left: .625rem; }
.chip .i { width: .875rem; height: .875rem; }
.k-Notdienst { --k-bg: var(--rot-bg); --k-text: var(--rot); --k-punkt: var(--rot-punkt); }
.k-Termin { --k-bg: var(--blau-bg); --k-text: var(--blau); --k-punkt: var(--blau-punkt); }
.k-Angebot { --k-bg: var(--violett-bg); --k-text: var(--violett); --k-punkt: var(--violett-punkt); }
.k-Rechnung { --k-bg: var(--gelb-bg); --k-text: var(--gelb); --k-punkt: var(--gelb-punkt); }
.k-Sonstiges { --k-bg: var(--schiefer-bg); --k-text: var(--schiefer); --k-punkt: var(--schiefer-punkt); }
.k-Anfrage { --k-bg: var(--gruen-bg); --k-text: var(--gruen); --k-punkt: var(--gruen-punkt); }
.k-Bestandskunde { --k-bg: var(--tuerkis-bg); --k-text: var(--tuerkis); --k-punkt: var(--tuerkis-punkt); }
.k-Lieferant { --k-bg: var(--orange-bg); --k-text: var(--orange); --k-punkt: var(--orange-punkt); }
.k-Werbung { --k-bg: var(--schiefer-bg); --k-text: var(--schiefer); --k-punkt: var(--schiefer-punkt); }
.chip.k-Spam { background: transparent; color: var(--leise); box-shadow: inset 0 0 0 1px var(--linie-2); --k-punkt: var(--linie-hover); }
.t-portal { --k-bg: var(--warm-hell); --k-text: var(--warm-dunkel); --k-punkt: var(--warm-punkt); }
/* Anrufkategorien des Betriebs (seit 29.09.2026 einstellbar): Farbe aus den Merkmalen statt aus dem Namen.
   Notfall rot, Auffangkategorie schiefer, die übrigen nach ihrer Position; mit der Standardliste ergibt das die
   gewohnten Farben (Termin blau, Angebot violett, Rechnung gelb). Unbekannte oder alte Namen: neutral umrandet. */
.kf-notfall { --k-bg: var(--rot-bg); --k-text: var(--rot); --k-punkt: var(--rot-punkt); }
.kf-0 { --k-bg: var(--blau-bg); --k-text: var(--blau); --k-punkt: var(--blau-punkt); }
.kf-1 { --k-bg: var(--violett-bg); --k-text: var(--violett); --k-punkt: var(--violett-punkt); }
.kf-2 { --k-bg: var(--gelb-bg); --k-text: var(--gelb); --k-punkt: var(--gelb-punkt); }
.kf-3 { --k-bg: var(--gruen-bg); --k-text: var(--gruen); --k-punkt: var(--gruen-punkt); }
.kf-4 { --k-bg: var(--orange-bg); --k-text: var(--orange); --k-punkt: var(--orange-punkt); }
.kf-5 { --k-bg: var(--tuerkis-bg); --k-text: var(--tuerkis); --k-punkt: var(--tuerkis-punkt); }
.kf-auffang { --k-bg: var(--schiefer-bg); --k-text: var(--schiefer); --k-punkt: var(--schiefer-punkt); }
.kf-alt { --k-bg: transparent; --k-text: var(--leise); --k-punkt: var(--linie-hover); box-shadow: inset 0 0 0 1px var(--linie-2); }

.status { display: inline-flex; align-items: center; gap: .4rem; font-size: .75rem; font-weight: 600; color: var(--tinte-2); white-space: nowrap; }
.status::before { content: ""; width: .7rem; height: .7rem; flex: none; border-radius: 50%; border: 2px solid var(--s-farbe, var(--linie-hover)); background: var(--s-fuell, transparent); }
.s-offen { --s-farbe: var(--warm-punkt); }
.s-in_arbeit { --s-farbe: var(--marke-punkt); --s-fuell: linear-gradient(90deg, var(--marke-punkt) 50%, transparent 50%); color: var(--akzent-text); }
.s-erledigt { --s-farbe: var(--gruen-punkt); --s-fuell: var(--gruen-punkt); color: var(--gruen); }

.abzeichen { display: inline-flex; align-items: center; gap: .3rem; min-height: 1.375rem; padding: .1rem .5rem; border-radius: 6px; font-size: .72rem; font-weight: 600; line-height: 1.2; white-space: nowrap; background: var(--schiefer-bg); color: var(--schiefer); }
.abzeichen .i { width: .8rem; height: .8rem; stroke-width: 2.4; }
.abzeichen.rot { background: var(--rot-bg); color: var(--rot); }
.abzeichen.gruen { background: var(--gruen-bg); color: var(--gruen); }
.abzeichen.gelb { background: var(--gelb-bg); color: var(--gelb); }
.abzeichen.blau { background: var(--blau-bg); color: var(--blau); }
.abzeichen.teal { background: var(--akzent-bg); color: var(--akzent-text); }

.avatar {
  display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; flex: none; border-radius: 50%;
  background: var(--k-bg, var(--flaeche-3)); color: var(--k-text, var(--tinte-2));
  font-size: .8125rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; user-select: none;
}
.avatar .i { width: 1.125rem; height: 1.125rem; }
.avatar.klein { width: 2rem; height: 2rem; font-size: .72rem; }

.punkt { display: inline-block; width: .5rem; height: .5rem; flex: none; border-radius: 50%; background: var(--schiefer-punkt); }
.punkt.ok { background: var(--gruen-punkt); }
.punkt.aus { background: var(--rot-punkt); }
.punkt.warn { background: var(--gelb-punkt); }
.punkt.lebt { box-shadow: 0 0 0 0 rgba(34, 160, 107, .55); animation: puls 2.2s ease-out infinite; }
@keyframes puls { 0% { box-shadow: 0 0 0 0 rgba(34, 160, 107, .5); } 70% { box-shadow: 0 0 0 7px rgba(34, 160, 107, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 160, 107, 0); } }

/* ── Karten, Meldungen, Leerzustände ───────────────────────────────────────── */
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r-l); box-shadow: var(--schatten-1); }
.karte-kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; padding: 1.125rem 1.25rem; border-bottom: 1px solid var(--linie); }
.karte-kopf p { color: var(--leise); font-size: .8125rem; margin-top: .125rem; }
.karte-inhalt { padding: 1.25rem; }
.stapel { display: flex; flex-direction: column; gap: 1.25rem; }

.meldung {
  display: flex; align-items: flex-start; gap: .625rem; margin: 1rem 0 0; padding: .75rem .875rem; border-radius: 12px; border: 1px solid transparent;
  font-size: .875rem; line-height: 1.5; overflow-wrap: anywhere; animation: einblenden .22s ease-out;
}
.meldung::before {
  content: ""; width: 1.125rem; height: 1.125rem; flex: none; margin-top: .05rem; background: currentColor;
  -webkit-mask: var(--m-symbol) center / contain no-repeat; mask: var(--m-symbol) center / contain no-repeat;
}
.meldung.info { background: var(--blau-bg); color: var(--blau);
  --m-symbol: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4M12 8h.01'/%3E%3C/svg%3E"); }
.meldung.fehler { background: var(--rot-bg); color: var(--rot); border-color: var(--rot-rand);
  --m-symbol: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 8v4M12 16h.01'/%3E%3C/svg%3E"); }
.meldung.ok { background: var(--gruen-bg); color: var(--gruen);
  --m-symbol: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m8.5 12.5 2.5 2.5 5-5.5'/%3E%3C/svg%3E"); }
.meldung.warnung { background: var(--gelb-bg); color: var(--gelb); border-color: var(--gelb-rand);
  --m-symbol: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z'/%3E%3Cpath d='M12 9v4M12 17h.01'/%3E%3C/svg%3E"); }
.meldung.warnung .meldung-inhalt { gap: .125rem; }
.meldung.warnung .meldung-inhalt span { color: var(--tinte-2); }
.meldung-inhalt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .5rem; }
.meldung .link-feld { display: flex; gap: .5rem; }
.meldung .link-feld input { min-height: 2rem; padding: .3rem .6rem; font-size: .8125rem; color: var(--tinte); }
@keyframes einblenden { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

.leer { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .5rem; padding: 2.5rem 1.5rem; color: var(--leise); }
.leer h3 { color: var(--tinte); font-family: var(--schrift-titel); font-size: 1rem; margin-top: .5rem; }
.leer p { max-width: 34ch; font-size: .875rem; }
.leer .knopf { margin-top: .75rem; }
.leer-bild { position: relative; display: grid; place-items: center; width: 5.5rem; height: 5.5rem; border-radius: 50%; background: var(--akzent-bg); color: var(--akzent-text); }
.leer-bild::before, .leer-bild::after { content: ""; position: absolute; inset: -.625rem; border-radius: 50%; border: 1px solid var(--akzent-rand); opacity: .7; }
.leer-bild::after { inset: -1.375rem; opacity: .35; }
.leer-bild .i { width: 2.125rem; height: 2.125rem; stroke-width: 1.75; }
.leer-bild .leer-puls { position: absolute; top: 1rem; right: 1rem; width: .75rem; height: .75rem; border-radius: 50%; background: var(--warm); box-shadow: 0 0 0 3px var(--flaeche); }

.skelett { display: flex; gap: .875rem; padding: .875rem 1rem; list-style: none; }
.skelett-text { flex: 1; display: flex; flex-direction: column; gap: .55rem; padding-top: .2rem; }
.s-kreis, .s-zeile { background: linear-gradient(90deg, var(--flaeche-3) 25%, var(--flaeche-2) 50%, var(--flaeche-3) 75%); background-size: 200% 100%; animation: schimmer 1.4s ease-in-out infinite; }
.s-kreis { width: 2.5rem; height: 2.5rem; border-radius: 50%; flex: none; }
.s-zeile { height: .7rem; border-radius: 6px; }
.s-zeile.kurz { width: 40%; } .s-zeile.mittel { width: 70%; }
@keyframes schimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ── App-Rahmen: Seitenleiste (breit) bzw. Kopf- und Reiterleiste (schmal) ── */
.app { display: grid; grid-template-columns: var(--leiste-breite) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.leiste {
  position: sticky; top: 0; height: 100vh; height: 100dvh; z-index: 30; display: flex; flex-direction: column; gap: 1.25rem;
  padding: 1.25rem .875rem 1rem; background: var(--flaeche); border-right: 1px solid var(--linie); overflow-y: auto;
}
.leiste-marke { display: inline-flex; align-items: center; gap: .625rem; padding: .25rem .5rem; color: var(--wortmarke); text-decoration: none; align-self: flex-start; border-radius: 10px; }
.logo-icon { width: 2rem; height: 2rem; flex: none; }
@media (prefers-color-scheme: dark) { .logo-icon { border-radius: 50%; box-shadow: 0 0 0 1px rgba(224, 179, 84, .35); } }
.logo-wort { height: 1.5rem; width: auto; }
.leiste-betrieb { padding: .875rem .9375rem; border-radius: var(--r); background: var(--flaeche-2); border: 1px solid var(--linie); }
.betrieb-name { font-family: var(--schrift-titel); font-weight: 600; font-size: .9375rem; line-height: 1.3; color: var(--tinte); overflow-wrap: anywhere; }
.betrieb-zeit { display: flex; align-items: center; gap: .45rem; margin-top: .3rem; font-size: .8rem; color: var(--leise); }
.betrieb-zeit.offen .punkt { background: var(--gruen-punkt); }
.assistentin { display: flex; align-items: center; gap: .625rem; margin-top: .75rem; padding-top: .75rem; border-top: 1px dashed var(--linie-2); }
.assistentin-bild { position: relative; width: 2rem; height: 2rem; flex: none; }
.assistentin-bild .logo-icon { width: 2rem; height: 2rem; }
.assistentin-bild::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: .7rem; height: .7rem; border-radius: 50%; background: var(--gelb-punkt); box-shadow: 0 0 0 2px var(--flaeche-2); }
.assistentin.bereit .assistentin-bild::after { background: var(--gruen-punkt); }
.assistentin-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.assistentin-text strong { font-size: .8125rem; font-weight: 600; color: var(--tinte); }
.assistentin-text span { font-size: .75rem; color: var(--leise); }

.reiter { display: flex; flex-direction: column; gap: 2px; }
.reiter button {
  position: relative; display: flex; align-items: center; gap: .75rem; width: 100%; padding: .625rem .75rem; border-radius: 10px;
  color: var(--tinte-2); font-size: .9rem; font-weight: 500; text-align: left; transition: background var(--tempo), color var(--tempo);
}
.reiter button:hover { background: var(--flaeche-3); color: var(--tinte); }
.reiter button.aktiv { background: var(--akzent-bg); color: var(--akzent-text); font-weight: 600; }
.reiter-symbol { display: inline-grid; place-items: center; }
.reiter-symbol .i { width: 1.25rem; height: 1.25rem; }
.reiter-zahl {
  margin-left: auto; display: inline-grid; place-items: center; min-width: 1.5rem; height: 1.375rem; padding: 0 .45rem; border-radius: 999px;
  background: var(--flaeche-3); color: var(--tinte-2); font-size: .72rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.reiter button.aktiv .reiter-zahl { background: var(--flaeche); color: var(--akzent-text); }
.reiter-zahl:empty { display: none; }
.reiter-zahl.dringend, .reiter button.aktiv .reiter-zahl.dringend { background: var(--rot-punkt); color: #fff; }
.reiter-zahl.dringend + .reiter-zahl { margin-left: .25rem; }
.leiste-konto { margin-top: auto; display: flex; align-items: center; gap: .625rem; padding: .75rem .5rem 0; border-top: 1px solid var(--linie); }
.konto-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.konto-text #wer { font-size: .8125rem; font-weight: 600; color: var(--tinte); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.konto-rolle { font-size: .72rem; color: var(--leise); }

.inhalt { min-width: 0; width: 100%; max-width: 1480px; margin: 0 auto; padding: 1.75rem 2rem 3rem; }
.seitenkopf { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 1.5rem; margin-bottom: 1.5rem; }
.seitenkopf-text p { margin-top: .375rem; color: var(--leise); max-width: 62ch; }
.seitenkopf .gruss { margin: 0 0 .25rem; color: var(--leise); font-size: .875rem; font-weight: 500; }
.seitenkopf-aktionen { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
[data-seite] { animation: seite-ein .25s ease-out; }
@keyframes seite-ein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ── Anliegen: Kennzahlen ──────────────────────────────────────────────────── */
.kennzahlen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.35fr); gap: 1rem; }
.kennzahl { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: .75rem; min-height: 6.75rem; padding: 1.125rem 1.25rem; border-radius: var(--r-l); background: var(--flaeche); border: 1px solid var(--linie); box-shadow: var(--schatten-1); overflow: hidden; }
.kennzahl-kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.kennzahl-titel { font-size: .8125rem; font-weight: 500; color: var(--leise); }
.kennzahl-symbol { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; flex: none; border-radius: 10px; background: var(--akzent-bg); color: var(--akzent-text); }
.kennzahl-symbol .i { width: 1.125rem; height: 1.125rem; }
.kennzahl-wert { font-family: var(--schrift-titel); font-weight: 600; font-size: 2rem; line-height: 1; letter-spacing: -.02em; color: var(--tinte); font-variant-numeric: tabular-nums; }
.kennzahl.warnung { border-color: var(--rot-rand); background: linear-gradient(180deg, var(--rot-bg), var(--flaeche) 70%); }
.kennzahl.warnung .kennzahl-wert { color: var(--rot); }
.kennzahl.warnung .kennzahl-symbol { background: var(--rot-bg); color: var(--rot); }
.status-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.status-liste li { display: flex; align-items: center; gap: .55rem; font-size: .8125rem; color: var(--tinte-2); }
.status-liste .st-wert { margin-left: auto; font-weight: 600; color: var(--tinte); text-align: right; }
.status-liste .st-fehler .st-wert { color: var(--rot); }
.status-liste .st-warn .st-wert { color: var(--gelb); }

.hinweis-karte { display: flex; align-items: flex-start; gap: .875rem; margin-top: 1rem; padding: .875rem 1rem; border-radius: var(--r-l); background: var(--akzent-bg); border: 1px solid var(--akzent-rand); color: var(--tinte); }
.hinweis-symbol { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; flex: none; border-radius: 10px; background: var(--flaeche); color: var(--akzent-text); box-shadow: var(--schatten-1); }
.hinweis-symbol .i { width: 1.125rem; height: 1.125rem; }
.hinweis-text { flex: 1; min-width: 0; font-size: .875rem; line-height: 1.5; }
.hinweis-text strong { display: block; font-weight: 600; }
.hinweis-text p { color: var(--tinte-2); margin-top: .125rem; }
.hinweis-karte .knopf { align-self: center; }
.nummer { font-variant-numeric: tabular-nums; white-space: nowrap; }
.knopf.kopiert { color: var(--gruen); border-color: var(--gruen-punkt); }
.seitenkopf-datum { font-size: .875rem; font-weight: 500; color: var(--leise); }

/* ── Anliegen: Liste und Detail ────────────────────────────────────────────── */
.posteingang { display: grid; grid-template-columns: minmax(340px, 5fr) minmax(0, 7fr); gap: 1.25rem; align-items: start; margin-top: 1.25rem; }
.liste-bereich { min-width: 0; overflow: hidden; }
.liste-kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem 1rem .875rem 1.25rem; border-bottom: 1px solid var(--linie); }
.liste-kopf h2 { display: flex; align-items: baseline; gap: .5rem; }
.liste-kopf #anzahl { font-family: var(--schrift); font-size: .8125rem; font-weight: 500; color: var(--leise); letter-spacing: 0; }
.liste { list-style: none; margin: 0; padding: .5rem; display: flex; flex-direction: column; gap: .25rem; }
.liste > li { list-style: none; }
.eintrag {
  position: relative; display: flex; gap: .875rem; width: 100%; padding: .875rem .875rem .875rem 1rem; border-radius: var(--r); border: 1px solid transparent;
  text-align: left; color: inherit; transition: background var(--tempo), border-color var(--tempo), box-shadow var(--tempo);
}
.eintrag:hover { background: var(--flaeche-2); border-color: var(--linie); }
.eintrag.gewaehlt { background: var(--akzent-bg); border-color: var(--akzent-rand); }
.eintrag.dringend::before { content: ""; position: absolute; left: 0; top: .875rem; bottom: .875rem; width: 3px; border-radius: 0 3px 3px 0; background: var(--rot-punkt); }
.eintrag.erledigt .eintrag-name, .eintrag.erledigt .eintrag-text { color: var(--leise); }
.eintrag.erledigt .avatar { filter: grayscale(1); opacity: .6; }
.eintrag-inhalt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.eintrag-kopf { display: flex; align-items: baseline; gap: .5rem; min-width: 0; }
.eintrag-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: .9375rem; color: var(--tinte); }
.eintrag-kunde { flex: none; color: var(--akzent-text); display: inline-flex; align-self: center; }
.eintrag-kunde .i { width: .95rem; height: .95rem; stroke-width: 2.4; }
.eintrag-zeit { margin-left: auto; flex: none; font-size: .75rem; color: var(--leise); white-space: nowrap; font-variant-numeric: tabular-nums; }
.eintrag-nummer { font-size: .8rem; color: var(--leise); font-variant-numeric: tabular-nums; }
.eintrag-text { font-size: .875rem; line-height: 1.45; color: var(--tinte-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.eintrag-fuss { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem .5rem; margin-top: .375rem; }
.eintrag-fuss .status { margin-left: auto; }
/* Dringend (Notfall-Kategorie, „möchte einen Menschen“, Anrufbeantworter): am Desktop oben angeheftet, klar rot */
.dringend-bereich { margin-bottom: .375rem; padding: .25rem .375rem .375rem; border-radius: var(--r); border: 1px solid var(--rot-rand); background: var(--rot-bg); }
.dringend-kopf { display: flex; align-items: center; gap: .5rem; padding: .5rem .5rem .5rem .625rem; color: var(--rot); }
.dringend-kopf .i { width: 1.05rem; height: 1.05rem; }
.dringend-kopf h3 { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.dringend-zahl { margin-left: auto; display: inline-grid; place-items: center; min-width: 1.5rem; height: 1.375rem; padding: 0 .45rem; border-radius: 999px; background: var(--rot-punkt); color: #fff; font-size: .72rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.liste.dringend-liste { padding: 0; }
.dringend-liste .eintrag { background: var(--flaeche); border-color: var(--rot-rand); }
.dringend-liste .eintrag:hover { border-color: var(--rot-punkt); background: var(--flaeche); }
.dringend-liste .eintrag.gewaehlt { background: var(--akzent-bg); border-color: var(--akzent-rand); }

.detail-bereich { position: sticky; top: 1.5rem; min-width: 0; max-height: calc(100vh - 3rem); max-height: calc(100dvh - 3rem); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.detail-leiste { display: none; }
.detail { padding: 1.5rem 1.75rem; }
.detail-leer { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .5rem; min-height: 26rem; color: var(--leise); }
.detail-leer h3 { font-family: var(--schrift-titel); color: var(--tinte); font-size: 1rem; margin-top: 1rem; }
.detail-leer p { max-width: 32ch; font-size: .875rem; }
.detail.laedt { opacity: .55; transition: opacity .15s; }
.detail-kopf { display: flex; flex-direction: column; gap: .5rem; padding-bottom: 1.25rem; }
.detail-chips { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.detail-name { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .625rem; font-family: var(--schrift-titel); font-size: 1.5rem; font-weight: 600; line-height: 1.25; letter-spacing: -.01em; overflow-wrap: anywhere; }
.detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; color: var(--leise); font-size: .875rem; }
.detail-meta span { display: inline-flex; align-items: center; gap: .35rem; }
.detail-meta .i { width: 1rem; height: 1rem; }
.detail-aktionen { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .75rem; padding: 1.25rem 0; border-top: 1px solid var(--linie); border-bottom: 1px solid var(--linie); }
.rueckruf { justify-content: flex-start; gap: .875rem; min-height: 3.5rem; padding: .625rem 1.125rem; text-align: left; }
.rueckruf .i { width: 1.375rem; height: 1.375rem; }
.rueckruf-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.rueckruf-text small { font-size: .78rem; font-weight: 500; opacity: .85; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
.rueckruf-fehlt { display: flex; align-items: center; gap: .625rem; min-height: 3.5rem; padding: .625rem 1rem; border-radius: 12px; border: 1px dashed var(--linie-2); color: var(--leise); font-size: .875rem; }
.status-wahl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-self: stretch; }
.status-wahl button { min-height: 100%; padding: .5rem .5rem; flex-direction: column; gap: .3rem; font-size: .78rem; }
.status-wahl button::before { content: ""; width: .75rem; height: .75rem; border-radius: 50%; border: 2px solid var(--s-farbe); background: var(--s-fuell, transparent); }
.status-wahl button[data-status="offen"] { --s-farbe: var(--warm-punkt); }
.status-wahl button[data-status="in_arbeit"] { --s-farbe: var(--marke-punkt); --s-fuell: linear-gradient(90deg, var(--marke-punkt) 50%, transparent 50%); }
.status-wahl button[data-status="erledigt"] { --s-farbe: var(--gruen-punkt); --s-fuell: var(--gruen-punkt); }
.status-wahl button[aria-pressed="true"] { cursor: default; }
.detail-flags { display: flex; flex-wrap: wrap; gap: .5rem; padding-top: 1rem; }
.detail-abschnitt { padding: 1.375rem 0; border-bottom: 1px solid var(--linie); }
.detail-abschnitt:last-child { border-bottom: 0; padding-bottom: .25rem; }
.abschnitt-titel { display: flex; align-items: center; gap: .5rem; margin: 0 0 .875rem; font-family: var(--schrift); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--leise); }
.abschnitt-titel .i { width: 1rem; height: 1rem; }
.zusammenfassung { font-size: 1.0625rem; line-height: 1.6; color: var(--tinte); }
.details-text { margin-top: .625rem; color: var(--tinte-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.fakten { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .625rem; margin: 1.125rem 0 0; }
.fakt { display: flex; gap: .75rem; padding: .75rem .875rem; border-radius: var(--r); background: var(--flaeche-2); border: 1px solid var(--linie); min-width: 0; }
.fakt > .i { width: 1.125rem; height: 1.125rem; margin-top: .1rem; color: var(--leise); }
.fakt div { min-width: 0; }
.fakt dt { font-size: .75rem; font-weight: 500; color: var(--leise); }
.fakt dd { margin: .125rem 0 0; font-size: .875rem; font-weight: 500; color: var(--tinte); overflow-wrap: anywhere; }
.aufnahme { width: 100%; height: 2.5rem; margin-top: .25rem; }
.termin-formular { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); gap: .75rem; align-items: end; }
.termin-kalender { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-bottom: 1.125rem; }
.termin-formular-fuss { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; margin-top: .25rem; }
.termine { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.termine li { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; padding: .625rem .875rem; border-radius: 10px; border: 1px solid var(--linie); background: var(--flaeche-2); font-size: .875rem; }
.termine li .i { width: 1.05rem; height: 1.05rem; color: var(--leise); }
.termine li .abzeichen { margin-left: auto; }
.verlauf { list-style: none; margin: 0; padding: 0; }
.verlauf li { position: relative; padding: 0 0 1.125rem 1.75rem; }
.verlauf li::before { content: ""; position: absolute; left: .4rem; top: 1.15rem; bottom: .1rem; width: 2px; border-radius: 2px; background: var(--linie); }
.verlauf li:last-child { padding-bottom: 0; }
.verlauf li:last-child::before { display: none; }
.verlauf li::after { content: ""; position: absolute; left: .09rem; top: .28rem; width: .75rem; height: .75rem; border-radius: 50%; background: var(--flaeche); border: 2.5px solid var(--v-farbe, var(--linie-hover)); }
.v-kopf { display: flex; flex-wrap: wrap; align-items: baseline; gap: .125rem .625rem; }
.v-titel { font-size: .875rem; font-weight: 600; color: var(--tinte); }
.v-kopf time { font-size: .75rem; color: var(--leise); font-variant-numeric: tabular-nums; }
.v-text { margin-top: .125rem; font-size: .8125rem; color: var(--tinte-2); overflow-wrap: anywhere; }
.art-angelegt { --v-farbe: var(--marke-punkt); }
.art-alarm, .art-alarm_geplant { --v-farbe: var(--warm-punkt); }
.art-durchstellen { --v-farbe: var(--rot-punkt); }
.art-status { --v-farbe: var(--blau-punkt); }
.art-termin { --v-farbe: var(--violett-punkt); }
.art-sms { --v-farbe: var(--gruen-punkt); }
.art-erinnerung { --v-farbe: var(--gelb-punkt); }
.detail-schleier { display: none; }

/* ── Gespräche (Detail und Testen) ─────────────────────────────────────────── */
.chat {
  display: flex; flex-direction: column; gap: .5rem; height: 22rem; padding: 1rem; overflow-y: auto; overscroll-behavior: contain;
  background: var(--flaeche-2); border: 1px solid var(--linie); border-radius: 14px; scrollbar-width: thin;
}
.chat:empty { align-items: center; justify-content: center; }
.chat:empty::before { content: attr(data-leer); max-width: 30ch; text-align: center; font-size: .875rem; color: var(--leise); }
.chat .m { max-width: 85%; padding: .625rem .875rem; border-radius: 16px; font-size: .9rem; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; animation: blase-ein .24s var(--federung); }
.chat .a { align-self: flex-start; background: var(--flaeche); color: var(--tinte); border: 1px solid var(--linie); border-bottom-left-radius: 6px; box-shadow: var(--schatten-1); }
.chat .u { align-self: flex-end; background: var(--primaer); color: var(--primaer-text); border-bottom-right-radius: 6px; }
.chat .h { align-self: center; max-width: 100%; padding: .2rem .625rem; border-radius: 999px; background: var(--flaeche-3); color: var(--leise); font-size: .75rem; text-align: center; }
.chat.gespraech { height: auto; max-height: 34rem; }
.gespraech .m[data-wer]:first-child::before, .gespraech .a + .u::before, .gespraech .u + .a::before {
  content: attr(data-wer); display: block; margin-bottom: .125rem; font-size: .72rem; font-weight: 700; letter-spacing: .02em; opacity: .75;
}
@keyframes blase-ein { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }

/* ── Postfach ──────────────────────────────────────────────────────────────── */
.mail-liste, .kunden-liste, .team-liste { list-style: none; margin: 0; padding: 0; }
.mail-liste li.mail { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .25rem 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--linie); transition: background var(--tempo); }
.mail-liste li.mail:last-child { border-bottom: 0; }
.mail-liste li.mail:hover { background: var(--flaeche-2); }
.mail-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; min-width: 0; }
.mail-absender { font-weight: 600; color: var(--tinte); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mail-zeit { font-size: .75rem; color: var(--leise); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mail-betreff { grid-column: 1 / -1; font-size: .9rem; color: var(--tinte); overflow-wrap: anywhere; }
.mail-grund { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: .375rem .625rem; margin-top: .25rem; font-size: .8125rem; color: var(--leise); }
.mail-grund .i { display: inline-block; width: .95rem; height: .95rem; margin-right: .375rem; vertical-align: -.15rem; color: var(--akzent-text); }
#mail-info:empty { display: none; }
#mail-info:not(:empty) { font-size: .8125rem; color: var(--leise); }
#mail-info.fehler { color: var(--rot); }

/* ── Kunden ────────────────────────────────────────────────────────────────── */
.kunden-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: .75rem; padding: 1.25rem; }
.kunde { display: flex; gap: .875rem; padding: 1rem; border-radius: var(--r); border: 1px solid var(--linie); background: var(--flaeche); min-width: 0; transition: border-color var(--tempo), box-shadow var(--tempo); }
.kunde:hover { border-color: var(--linie-2); box-shadow: var(--schatten-2); }
.kunde .avatar { background: var(--akzent-bg); color: var(--akzent-text); }
.kunde-inhalt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .25rem; }
.kunde-name { font-weight: 600; color: var(--tinte); overflow-wrap: anywhere; }
.kunde-kontakt { display: flex; flex-direction: column; gap: .125rem; font-size: .8125rem; }
.kunde-kontakt a, .kunde-kontakt span { display: inline-flex; align-items: center; gap: .4rem; min-width: 0; color: var(--tinte-2); text-decoration: none; overflow-wrap: anywhere; }
.kunde-kontakt a:hover { color: var(--akzent-text); text-decoration: underline; }
.kunde-kontakt .i { width: .9rem; height: .9rem; color: var(--leise); }
.kunde-notiz { margin-top: .25rem; font-size: .8125rem; color: var(--leise); overflow-wrap: anywhere; }
.kunden-liste > .leer { grid-column: 1 / -1; }

/* ── Testen ────────────────────────────────────────────────────────────────── */
.test-raster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; align-items: start; }
.test-karte .karte-inhalt { display: flex; flex-direction: column; gap: .875rem; }
.chat-kopf { display: flex; align-items: center; gap: .625rem; }
.chat-kopf .logo-icon { width: 2.25rem; height: 2.25rem; }
.chat-kopf strong { display: block; font-size: .9rem; }
.chat-kopf span { font-size: .78rem; color: var(--leise); }
.anruf-bereich { display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: .5rem 0 .25rem; }
.anruf-knopf { display: flex; flex-direction: column; align-items: center; gap: .625rem; padding: .25rem; border-radius: 16px; color: var(--tinte); font-weight: 600; font-size: .875rem; }
.anruf-knopf:focus-visible { outline: none; }
.anruf-knopf:focus-visible .anruf-kreis { box-shadow: 0 0 0 4px var(--fokus); }
.anruf-kreis {
  position: relative; display: grid; place-items: center; width: 4.5rem; height: 4.5rem; border-radius: 50%;
  background: linear-gradient(160deg, #26b27e, #16925f); color: #fff; box-shadow: 0 10px 24px -8px rgba(22, 146, 95, .65);
  transition: transform var(--tempo), background var(--tempo), box-shadow var(--tempo);
}
.anruf-knopf:hover .anruf-kreis { transform: scale(1.04); }
.anruf-knopf:active .anruf-kreis { transform: scale(.97); }
.anruf-kreis .i { width: 1.75rem; height: 1.75rem; }
.anruf-kreis .i-aus { display: none; }
.anruf-knopf.aktiv .anruf-kreis { background: linear-gradient(160deg, #ef5b50, #d13a2f); box-shadow: 0 10px 24px -8px rgba(209, 58, 47, .7); }
.anruf-knopf.aktiv .anruf-kreis .i-an { display: none; }
.anruf-knopf.aktiv .anruf-kreis .i-aus { display: block; }
.anruf-knopf.aktiv .anruf-kreis::before, .anruf-knopf.aktiv .anruf-kreis::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(209, 58, 47, .45); animation: ring 1.8s ease-out infinite; }
.anruf-knopf.aktiv .anruf-kreis::after { animation-delay: .9s; }
@keyframes ring { from { transform: scale(1); opacity: 1; } to { transform: scale(1.7); opacity: 0; } }
#ton-info:empty { display: none; }

/* ── Einstellungen ─────────────────────────────────────────────────────────── */
.einstellung { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: 1.25rem 2.5rem; padding: 1.5rem; border-bottom: 1px solid var(--linie); }
.einstellung:last-of-type { border-bottom: 0; }
.einstellung-info h2 { font-size: 1rem; }
.einstellung-info p { margin-top: .375rem; font-size: .8125rem; color: var(--leise); line-height: 1.5; }
.einstellung-felder { min-width: 0; }
.zeiten { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .625rem 1.25rem; }
.zeit-zeile { display: grid; grid-template-columns: 6.25rem minmax(0, 1fr); align-items: center; gap: .75rem; }
.zeit-zeile label { margin: 0; font-weight: 600; color: var(--tinte); font-size: .875rem; }
.speicherleiste {
  position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .75rem 1rem;
  padding: .875rem 1.5rem; border-top: 1px solid var(--linie); border-radius: 0 0 var(--r-l) var(--r-l);
  background: var(--flaeche); background: color-mix(in srgb, var(--flaeche) 90%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.speicherleiste .meldung { margin: 0; margin-right: auto; padding: .45rem .75rem; }
.team-liste li { display: flex; align-items: center; gap: .875rem; padding: .875rem 1.25rem; border-bottom: 1px solid var(--linie); }
.team-liste li:last-child { border-bottom: 0; }
.team-person { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.team-person strong { font-weight: 600; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-person span { font-size: .8125rem; color: var(--leise); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-zuletzt { font-size: .78rem; color: var(--leise); text-align: right; white-space: nowrap; }
.team-einladen { padding: 1.25rem; border-top: 1px solid var(--linie); background: var(--flaeche-2); border-radius: 0 0 var(--r-l) var(--r-l); }
.team-einladen h3 { margin-bottom: .75rem; }
#postfach-status:empty { display: none; }
#postfach-status { margin-top: 1rem; }
.feld-hinweis.warn { color: var(--gelb); }
.einstellung-felder.formular { align-content: start; }          /* Felder oben, auch wenn der Hinweistext links länger ist */
.team-liste .team-zuletzt .knopf { margin-left: .25rem; }

/* Stimme und Name am Telefon: Auswahl mit Hörprobe (dashboard.js, stimmenZeichnen) */
.stimmen-wahl { margin: .25rem 0 0; padding: 0; border: 0; min-width: 0; }
.stimmen-wahl > .feld-hinweis { margin: 0 0 .75rem; }
.stimmen { display: grid; gap: 1rem; }
.stimmen-titel { margin: 0 0 .5rem; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--leise); }
.stimmen-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); gap: .5rem; }
.stimme {
  position: relative; display: flex; align-items: center; gap: .5rem; min-height: 3.5rem; margin: 0; padding: .5rem .5rem .5rem .875rem;
  border: 1px solid var(--linie-2); border-radius: var(--r); background: var(--flaeche); cursor: pointer;
  transition: border-color var(--tempo), background var(--tempo), box-shadow var(--tempo);
}
.stimme:hover { border-color: var(--linie-hover); }
.stimme input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.stimme-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.stimme-text strong { display: flex; align-items: center; gap: .375rem; font-size: .9375rem; font-weight: 600; color: var(--tinte); }
.stimme-text strong .abzeichen { font-size: .66rem; padding: .05rem .4rem; }
.stimme-text > span { font-size: .78rem; color: var(--leise); }
.stimme-haken { display: none; place-items: center; width: 1.375rem; height: 1.375rem; flex: none; border-radius: 50%; background: var(--primaer); color: var(--primaer-text); }
.stimme-haken .i { width: .875rem; height: .875rem; stroke-width: 3; }
.stimme:has(input:checked) { border-color: var(--primaer); background: var(--akzent-bg); box-shadow: inset 0 0 0 1px var(--primaer); }
.stimme:has(input:checked) .stimme-haken { display: grid; }
.stimme:has(input:focus-visible) { outline: 2px solid var(--primaer); outline-offset: 2px; }
.stimme-probe {
  display: grid; place-items: center; width: 2.25rem; height: 2.25rem; flex: none; border-radius: 50%;
  background: var(--flaeche-3); color: var(--tinte-2); transition: background var(--tempo), color var(--tempo), transform var(--tempo);
}
.stimme-probe .i { width: 1rem; height: 1rem; fill: currentColor; stroke-width: 1.5; }
.stimme-probe:hover { background: var(--akzent-bg); color: var(--akzent-text); }
.stimme-probe:active { transform: scale(.94); }
.stimme-probe.laedt { animation: puls-probe 1s ease-in-out infinite; }
.stimme-probe.spielt { background: var(--warm); color: #1c1405; }
@keyframes puls-probe { 50% { opacity: .55; } }

/* Postfach: Abruf und Versand im selben Formular, darunter das Ergebnis von „Verbindung testen“ */
.formular-titel { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .25rem 0 -.25rem; padding-top: 1rem;
  border-top: 1px solid var(--linie); font-size: .9375rem; }
.formular > .feld:first-child + .formular-titel { border-top: 0; padding-top: .25rem; }
.formular > .feld-hinweis.ganz { margin: -.5rem 0 0; }
.postfach-knoepfe { display: flex; flex-wrap: wrap; gap: .625rem; }
.test-ergebnis { list-style: none; margin: 1rem 0 0; padding: 0; border: 1px solid var(--linie); border-radius: var(--r); overflow: hidden; }
.test-ergebnis li { display: flex; align-items: flex-start; gap: .75rem; padding: .75rem .875rem; background: var(--flaeche-2); }
.test-ergebnis li + li { border-top: 1px solid var(--linie); }
.test-ergebnis .punkt { margin-top: .45rem; }
.test-ergebnis strong { display: block; font-size: .875rem; font-weight: 600; }
.test-ergebnis span.text { display: block; font-size: .8125rem; color: var(--tinte-2); overflow-wrap: anywhere; }
.test-ergebnis li.fehler span.text { color: var(--rot); }
.hinweis-karte.warn { background: var(--gelb-bg); border-color: transparent; }
.hinweis-karte.warn .hinweis-symbol { color: var(--gelb); }
@media (max-width: 767.98px) { .postfach-knoepfe .knopf { flex: 1; } }

/* Mailregeln: Liste in Reihenfolge, darunter Formular für neue bzw. bearbeitete Regel */
.regel-liste { list-style: none; margin: 0; padding: 0; }
.regel { display: flex; align-items: center; gap: .875rem; padding: .875rem 1.25rem; border-bottom: 1px solid var(--linie); }
.regel:last-child { border-bottom: 0; }
.regel.aus .regel-text { opacity: .55; }
.regel.bearbeitet { background: var(--akzent-bg); }
.regel-nr { display: inline-grid; place-items: center; width: 1.75rem; height: 1.75rem; flex: none; border-radius: 8px; background: var(--flaeche-3); color: var(--tinte-2); font-size: .75rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.regel-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .3rem; line-height: 1.4; }
.regel-wenn { font-size: .875rem; color: var(--tinte); overflow-wrap: anywhere; }
.regel-wenn strong { font-weight: 600; }
.regel-dann { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem; font-size: .8125rem; color: var(--leise); overflow-wrap: anywhere; }
.regel-dann strong { color: var(--tinte-2); font-weight: 600; }
.regel-dann > .i { width: .95rem; height: .95rem; color: var(--akzent-text); }
.regel-aktionen { display: flex; align-items: center; gap: .125rem; flex: none; }
.regel-aktionen .schalter { margin-right: .5rem; }
.regel-aktionen .knopf-icon { width: 2.25rem; height: 2.25rem; }
.regel-aktionen .knopf-icon .i { width: 1.05rem; height: 1.05rem; }
.regel-aktionen .knopf-icon:disabled { opacity: .3; cursor: default; background: none; }
.regel-aktionen .knopf-icon.loeschen:hover, .regel-aktionen .knopf-icon.bestaetigen { background: var(--rot-bg); color: var(--rot); }
.regel-neu { padding: 1.25rem; border-top: 1px solid var(--linie); background: var(--flaeche-2); border-radius: 0 0 var(--r-l) var(--r-l); }
.regel-liste:empty + .regel-neu { border-top: 0; border-radius: 0 0 var(--r-l) var(--r-l); }
.regel-neu h3 { margin-bottom: .75rem; }
.regel-formular .feld-hinweis { margin: -.25rem 0 0; }
.regel-formular .feld-hinweis:empty { display: none; }
.regel-knoepfe { display: flex; flex-wrap: wrap; gap: .625rem; }
@media (max-width: 767.98px) {
  .regel { flex-wrap: wrap; padding: .875rem 1rem; gap: .75rem; }
  .regel-aktionen { width: 100%; justify-content: flex-end; }
  .regel-aktionen .schalter { margin-right: auto; }
  .regel-neu { padding: 1rem; }
  .regel-knoepfe .knopf { flex: 1; }
}

/* Kategorien je Betrieb: geordnete Liste, eine Karte je Kategorie */
.kat-standard { margin-left: .375rem; font-family: var(--schrift); letter-spacing: 0; vertical-align: .15em; }
.kat-karte > .karte-kopf { align-items: flex-start; }
.kat-karte > .karte-kopf > div:first-child { flex: 1 1 28rem; }
.kat-spalte textarea { min-height: 4.25rem; resize: none; overflow: hidden; }
.kat-warnungen { display: flex; flex-direction: column; gap: .625rem; padding: 1rem 1.25rem 0; }
.kat-warnungen:empty { display: none; }
.kat-warnungen .meldung { margin: 0; }
.kat-liste { list-style: none; margin: 0; padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: .875rem; }
.kat { position: relative; border: 1px solid var(--linie); border-radius: var(--r-l); background: var(--flaeche); box-shadow: var(--schatten-1); transition: border-color var(--tempo), box-shadow var(--tempo); }
.kat:focus-within { border-color: var(--linie-2); box-shadow: var(--schatten-2); }
.kat.ist-notfall::before { content: ""; position: absolute; left: -1px; top: .875rem; bottom: .875rem; width: 3px; border-radius: 0 3px 3px 0; background: var(--rot-punkt); }
.kat-kopf { display: flex; align-items: center; gap: .75rem; padding: .625rem .625rem .625rem 1rem; border-bottom: 1px solid var(--linie); border-radius: var(--r-l) var(--r-l) 0 0; background: var(--flaeche-2); }
.kat-nr { display: inline-grid; place-items: center; width: 1.875rem; height: 1.875rem; flex: none; border-radius: 50%; background: var(--k-bg, var(--flaeche-3)); color: var(--k-text, var(--tinte-2)); font-size: .8125rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.kat-name { position: relative; flex: 1; min-width: 0; max-width: 26rem; }
.kat-name input { font-weight: 600; }
.kat-name input[readonly] { padding-left: 2.25rem; background: var(--flaeche); cursor: default; }
.kat-name > .i { position: absolute; left: .8rem; top: 1.3125rem; transform: translateY(-50%); width: 1rem; height: 1rem; color: var(--leise); pointer-events: none; }
.kat-knoepfe { display: flex; align-items: center; gap: .125rem; margin-left: auto; }
.kat-knoepfe .knopf-icon { width: 2.25rem; height: 2.25rem; }
.kat-inhalt { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.125rem 1.75rem; padding: 1rem 1.125rem 1.125rem; }
.kat-spalte { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.feld-titel { display: block; margin: 0 0 .375rem; padding: 0; font-size: .8125rem; font-weight: 500; color: var(--tinte-2); }
label .leise, .feld-titel .leise { font-weight: 400; }
fieldset.feld { min-width: 0; margin: 0; padding: 0; border: 0; }
.pflicht-liste { display: flex; flex-direction: column; gap: .375rem; }
.pflicht-zeile { display: flex; align-items: center; gap: .25rem; }
.pflicht-zeile input:not([type="checkbox"]):not([type="radio"]) { min-height: 2.25rem; padding: .4rem .7rem; font-size: .875rem; }
.pflicht-zeile .knopf-icon { width: 2.25rem; height: 2.25rem; }
.pflicht-zeile .knopf-icon .i { width: 1rem; height: 1rem; }
.pflicht-neu { margin-top: .375rem; }
.schalter-text { display: flex; flex-direction: column; line-height: 1.35; }
.schalter-text strong { font-weight: 600; }
.schalter-text small { font-size: .78rem; font-weight: 400; color: var(--leise); }
.kat .alarm-wahl { display: flex; flex-direction: column; align-items: flex-start; gap: .875rem; }
.kat:not(.ist-notfall) .nur-notfall, .kat.ist-notfall .ohne-notfall { display: none; }
.wahl-karten { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.wahl-karte {
  position: relative; display: flex; align-items: flex-start; gap: .625rem; margin: 0; padding: .7rem .75rem; border: 1px solid var(--linie-2); border-radius: var(--r);
  background: var(--flaeche); color: var(--tinte); cursor: pointer; transition: border-color var(--tempo), background var(--tempo), box-shadow var(--tempo);
}
.wahl-karte:hover { border-color: var(--linie-hover); }
.wahl-karte input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.wahl-karte:has(input:checked) { border-color: var(--primaer); background: var(--akzent-bg); box-shadow: inset 0 0 0 1px var(--primaer); }
.wahl-karte:has(input:focus-visible) { box-shadow: inset 0 0 0 1px var(--primaer), 0 0 0 3px var(--fokus); }
.wahl-symbol { display: grid; place-items: center; width: 2rem; height: 2rem; flex: none; border-radius: 9px; background: var(--flaeche-3); color: var(--tinte-2); transition: background var(--tempo), color var(--tempo); }
.wahl-symbol .i { width: 1.05rem; height: 1.05rem; }
.wahl-karte:has(input:checked) .wahl-symbol { background: var(--flaeche); color: var(--akzent-text); box-shadow: var(--schatten-1); }
.wahl-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.wahl-text strong { font-size: .875rem; font-weight: 600; }
.wahl-text span { font-size: .78rem; color: var(--leise); }
.wahl-karte.gesperrt { cursor: not-allowed; opacity: .55; background: var(--flaeche-2); border-style: dashed; }
.wahl-karte.gesperrt:hover { border-color: var(--linie-2); }
.kat-fuss { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; padding: 0 1.25rem 1.25rem; }
/* Prüfmeldung am richtigen Feld (index und feld aus der Antwort des Servers) */
input[aria-invalid="true"]:not([type="checkbox"]):not([type="radio"]), textarea[aria-invalid="true"],
.ungueltig input:not([type="checkbox"]):not([type="radio"]) { border-color: var(--rot-punkt); box-shadow: 0 0 0 3px var(--rot-bg); }
.segment.ungueltig, .wahl-karten.ungueltig .wahl-karte { box-shadow: inset 0 0 0 1.5px var(--rot-punkt); }
.schalter.ungueltig input[type="checkbox"] { box-shadow: 0 0 0 3px var(--rot-bg), 0 0 0 4.5px var(--rot-punkt); }
.feld-fehler { margin: .375rem 0 0; font-size: .78rem; font-weight: 500; color: var(--rot); overflow-wrap: anywhere; }

/* ── Anmeldung und Einladung ───────────────────────────────────────────────── */
.auth-seite { background: var(--flaeche); }
.auth { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.auth-marke {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 2.5rem; padding: 2.5rem 3.5rem; color: #fff;
  background:
    radial-gradient(900px 480px at 110% -10%, rgba(139, 167, 203, .26), transparent 60%),
    radial-gradient(520px 360px at -10% 110%, rgba(212, 162, 60, .22), transparent 65%),
    linear-gradient(155deg, var(--marke-900) 0%, var(--marke-800) 45%, var(--marke-600) 100%);
}
.auth-marke::before {
  content: ""; position: absolute; right: -180px; bottom: -180px; width: 620px; height: 620px; border-radius: 50%; pointer-events: none;
  background: repeating-radial-gradient(circle, rgba(255, 255, 255, .07) 0 1px, transparent 1px 64px);
}
.auth-marke > * { position: relative; }
.auth-logo { display: inline-flex; align-items: center; gap: .75rem; color: #fff; }
.auth-logo .logo-icon { width: 2.75rem; height: 2.75rem; }
.auth-logo .logo-wort { height: 2rem; }
.auth-botschaft { margin: auto 0; max-width: 30rem; }
.auth-botschaft h2 { color: #fff; font-size: clamp(1.875rem, 3vw, 2.625rem); line-height: 1.15; letter-spacing: -.02em; }
.auth-botschaft h2 em { font-style: normal; color: #e8c06a; }
.auth-botschaft p { margin-top: 1rem; font-size: 1.0625rem; line-height: 1.6; color: #cde6e1; }
.auth-vorteile { list-style: none; margin: 1.75rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .75rem; }
.auth-vorteile li { display: flex; align-items: center; gap: .75rem; color: #e6f4f1; font-size: .9375rem; }
.auth-vorteile .i { width: 1.5rem; height: 1.5rem; padding: .25rem; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #e0b354; stroke-width: 2.5; }
.auth-vorschau { display: flex; flex-direction: column; gap: .75rem; max-width: 24rem; }
.vorschau-karte { display: flex; gap: .75rem; align-items: flex-start; padding: .875rem 1rem; border-radius: 16px; background: rgba(255, 255, 255, .96); color: #172233; box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .55); }
.vorschau-karte:nth-child(2) { margin-left: 2.5rem; background: rgba(255, 255, 255, .9); }
.vorschau-karte .logo-icon { width: 2rem; height: 2rem; }
.vorschau-karte .avatar { width: 2rem; height: 2rem; background: #e6f6ee; color: #0f7a4c; }
.vorschau-karte strong { display: block; font-size: .8125rem; }
.vorschau-karte p { font-size: .8125rem; color: #3c4656; line-height: 1.45; margin-top: .125rem; }
.vorschau-karte .chip { margin-top: .375rem; --k-bg: #feeceb; --k-text: #b42318; --k-punkt: #e5484d; }
.vorschau-zeit { margin-left: auto; font-size: .72rem; color: #5a6473; white-space: nowrap; }
.auth-fuss { font-size: .8125rem; color: #a7cfc8; }
.auth-inhalt { display: flex; align-items: center; justify-content: center; padding: 2.5rem 1.5rem; background: var(--flaeche); }
.auth-karte { width: 100%; max-width: 25rem; }
.auth-karte .auth-logo-mobil { display: none; }
.auth-karte h1 { font-size: 1.75rem; }
.auth-unter { margin-top: .5rem; color: var(--leise); }
.auth-form { display: flex; flex-direction: column; gap: 1.125rem; margin-top: 2rem; }
.auth-form .knopf { margin-top: .375rem; }
.feld-symbol { position: relative; }
.feld-symbol > .i { position: absolute; left: .875rem; top: 50%; transform: translateY(-50%); width: 1.125rem; height: 1.125rem; color: var(--leise); pointer-events: none; }
.feld-symbol > input:not([type="checkbox"]) { padding-left: 2.625rem; min-height: 3rem; border-radius: 12px; }
.feld-symbol > input.mit-knopf { padding-right: 3rem; }
.pw-zeigen { position: absolute; right: .375rem; top: 50%; transform: translateY(-50%); width: 2.375rem; height: 2.375rem; }
.pw-zeigen .i { width: 1.125rem; height: 1.125rem; }
.pw-zeigen .i-zu { display: none; }
.pw-zeigen[aria-pressed="true"] .i-auf { display: none; }
.pw-zeigen[aria-pressed="true"] .i-zu { display: block; }
.auth-hilfe { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--linie); font-size: .8125rem; color: var(--leise); }
.pw-regeln { list-style: none; margin: -.25rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; font-size: .8125rem; color: var(--leise); }
.pw-regeln li { display: flex; align-items: center; gap: .5rem; transition: color var(--tempo); }
.pw-regeln li::before { content: ""; width: 1rem; height: 1rem; flex: none; border-radius: 50%; border: 1.5px solid var(--linie-2); background: var(--flaeche); transition: background var(--tempo), border-color var(--tempo); }
.pw-regeln li.erfuellt { color: var(--gruen); }
.pw-regeln li.erfuellt::before {
  border-color: var(--gruen-punkt); background: var(--gruen-punkt) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / .625rem no-repeat;
}
.einladung-fuer { margin-top: .5rem; color: var(--tinte-2); }
.einladung-fuer strong { color: var(--tinte); }

/* ── Terminseite für Endkunden ─────────────────────────────────────────────── */
.termin-seite { background: radial-gradient(900px 420px at 50% -120px, var(--marke-100), transparent 70%), var(--grund); }
@media (prefers-color-scheme: dark) { .termin-seite { background: radial-gradient(900px 420px at 50% -120px, rgba(94, 130, 177, .18), transparent 70%), var(--grund); } }
.termin-rahmen { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.25rem; padding: 2rem 1rem; }
.termin-karte { width: 100%; max-width: 28rem; padding: 2rem; border-radius: var(--r-xl); background: var(--flaeche); border: 1px solid var(--linie); box-shadow: var(--schatten-3); }
.termin-kopf { display: flex; align-items: center; gap: .875rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--linie); }
.termin-logo { display: grid; place-items: center; width: 3rem; height: 3rem; flex: none; border-radius: 14px; background: var(--akzent-bg); color: var(--akzent-text); }
.termin-logo .i { width: 1.5rem; height: 1.5rem; }
.termin-kicker { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--leise); }
.termin-kopf h1 { font-size: 1.25rem; margin-top: .125rem; overflow-wrap: anywhere; }
.termin-datum { display: flex; align-items: center; gap: 1.25rem; margin-top: 1.5rem; }
.kalenderblatt { width: 4.75rem; flex: none; overflow: hidden; border-radius: 16px; background: var(--flaeche); border: 1px solid var(--linie); box-shadow: var(--schatten-2); text-align: center; }
.kalenderblatt span { display: block; padding: .3rem 0; background: var(--primaer); color: var(--primaer-text); font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.kalenderblatt strong { display: block; padding: .375rem 0 .5rem; font-family: var(--schrift-titel); font-size: 1.875rem; font-weight: 600; line-height: 1.1; color: var(--tinte); font-variant-numeric: tabular-nums; }
.termin-wochentag { font-family: var(--schrift-titel); font-size: 1.125rem; font-weight: 600; line-height: 1.3; color: var(--tinte); }
.termin-zeit { display: flex; align-items: center; gap: .4rem; margin-top: .375rem; color: var(--tinte-2); font-size: .9375rem; }
.termin-zeit .i { width: 1.05rem; height: 1.05rem; color: var(--leise); }
.termin-text { margin-top: 1.5rem; color: var(--tinte-2); }
.termin-knoepfe { display: flex; flex-direction: column; gap: .625rem; margin-top: 1.25rem; }
.termin-karte .meldung { margin-top: 1.25rem; }
.termin-ergebnis { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .5rem; margin-top: 1.5rem; padding: 1.5rem 1rem; border-radius: var(--r-l); background: var(--flaeche-2); border: 1px solid var(--linie); animation: einblenden .3s ease-out; }
.termin-ergebnis .ergebnis-symbol { display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: 50%; background: var(--gruen-bg); color: var(--gruen); animation: aufploppen .45s var(--federung); }
.termin-ergebnis.abgesagt .ergebnis-symbol { background: var(--blau-bg); color: var(--blau); }
.termin-ergebnis.fehler .ergebnis-symbol { background: var(--rot-bg); color: var(--rot); }
.termin-ergebnis .ergebnis-symbol .i { width: 1.75rem; height: 1.75rem; stroke-width: 2.5; }
.termin-ergebnis h2 { font-size: 1.125rem; margin-top: .25rem; }
.termin-ergebnis p { color: var(--tinte-2); font-size: .9rem; max-width: 30ch; }
@keyframes aufploppen { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
.termin-fuss { max-width: 28rem; text-align: center; font-size: .78rem; line-height: 1.5; color: var(--leise); }
.termin-fuss .i { display: inline-block; width: .95rem; height: .95rem; margin-right: .3rem; vertical-align: -.2rem; }
.lade-punkte { display: inline-flex; gap: .3rem; vertical-align: middle; margin-left: .25rem; }
.lade-punkte i { width: .35rem; height: .35rem; border-radius: 50%; background: currentColor; opacity: .4; animation: lade 1s ease-in-out infinite; }
.lade-punkte i:nth-child(2) { animation-delay: .15s; } .lade-punkte i:nth-child(3) { animation-delay: .3s; }
@keyframes lade { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: .9; transform: translateY(-2px); } }

/* ── KeulTech-Verwaltung ───────────────────────────────────────────────────── */
.kopfleiste {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .875rem; padding: .75rem 2rem;
  background: var(--flaeche); background: color-mix(in srgb, var(--flaeche) 88%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--linie);
}
.kopfleiste .leiste-marke { padding: 0; }
.kopf-tag { padding: .2rem .6rem; border-radius: 999px; background: var(--warm-hell); color: var(--warm-dunkel); font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.kopf-wer { font-size: .8125rem; color: var(--leise); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.inhalt.mittig { max-width: 1240px; }
.system-kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .875rem; padding: 1.25rem; }
.system-kachel { display: flex; align-items: center; gap: .875rem; padding: 1rem; border-radius: var(--r); background: var(--flaeche-2); border: 1px solid var(--linie); min-width: 0; }
.system-kachel .kennzahl-symbol { width: 2.5rem; height: 2.5rem; }
.system-kachel div { min-width: 0; }
.system-kachel .sk-titel { font-size: .78rem; color: var(--leise); }
.system-kachel .sk-wert { display: flex; align-items: center; gap: .45rem; font-weight: 600; color: var(--tinte); overflow-wrap: anywhere; }
.betriebe-liste { display: flex; flex-direction: column; }
.betrieb { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.6fr) auto; align-items: center; gap: .75rem 1.5rem; padding: 1.125rem 1.25rem; border-bottom: 1px solid var(--linie); }
.betrieb:last-child { border-bottom: 0; }
.betrieb-kopf { display: flex; align-items: center; gap: .875rem; min-width: 0; }
.betrieb-kopf .avatar { border-radius: 12px; background: var(--akzent-bg); color: var(--akzent-text); }
.betrieb-titel { min-width: 0; }
.betrieb-titel strong { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem .5rem; font-weight: 600; overflow-wrap: anywhere; }
.betrieb-titel span { font-size: .8125rem; color: var(--leise); }
.betrieb-daten { display: flex; flex-wrap: wrap; gap: .375rem 1.25rem; font-size: .8125rem; color: var(--tinte-2); }
.betrieb-daten span { display: inline-flex; align-items: center; gap: .375rem; }
.betrieb-daten .i { width: .95rem; height: .95rem; color: var(--leise); }
.betrieb-aktionen { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }
.betrieb.gesperrt .betrieb-kopf .avatar { filter: grayscale(1); opacity: .6; }
.karte-meldung:has(> .meldung:not(.versteckt)) { padding: 0 1.25rem 1rem; }
.system-kacheln > .meldung { grid-column: 1 / -1; margin: 0; }

dialog.dialog {
  width: min(28rem, calc(100vw - 2rem)); padding: 0; border: 1px solid var(--linie); border-radius: var(--r-xl);
  background: var(--flaeche); color: var(--tinte); box-shadow: var(--schatten-3);
}
dialog.dialog[open] { animation: dialog-ein .22s var(--federung); }
dialog.dialog::backdrop { background: rgba(var(--marke-schatten), .45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.dialog form { display: flex; flex-direction: column; gap: 1rem; padding: 1.5rem; }
.dialog h2 { font-size: 1.125rem; }
.dialog p { color: var(--leise); font-size: .875rem; margin-top: -.5rem; }
.dialog-knoepfe { display: flex; justify-content: flex-end; gap: .625rem; margin-top: .5rem; }
@keyframes dialog-ein { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

/* ── Breite Bildschirme: Feinheiten ────────────────────────────────────────── */
@media (max-width: 1279.98px) {
  .kennzahlen { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kennzahl { min-height: 0; gap: .5rem; padding: 1rem 1.125rem; }
  .kennzahl-wert { font-size: 1.75rem; }
  .kennzahl.status-kachel { grid-column: 1 / -1; min-height: 0; }
  .status-kachel .status-liste { flex-direction: row; flex-wrap: wrap; gap: .5rem 1.75rem; }
  .status-kachel .status-liste .st-wert { margin-left: .25rem; }
  .posteingang { grid-template-columns: minmax(320px, 1fr) minmax(0, 1.25fr); }
  .detail-aktionen { grid-template-columns: 1fr; }
}

/* ── Schmale Bildschirme (Tablet, Handy): Kopfleiste oben, Reiter unten ───── */
@media (max-width: 1023.98px) {
  .app { display: block; }
  .leiste {
    position: sticky; top: 0; height: auto; flex-direction: row; align-items: center; gap: .75rem; overflow: visible;
    padding: .625rem .75rem .625rem 1rem; padding-top: calc(.625rem + env(safe-area-inset-top)); border-right: 0; border-bottom: 1px solid var(--linie);
    background: var(--flaeche); background: color-mix(in srgb, var(--flaeche) 90%, transparent);
  }
  .leiste::before { content: ""; position: absolute; inset: 0; z-index: -1; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
  .leiste-marke { padding: 0; }
  .leiste-marke .logo-wort { display: none; }
  .leiste-betrieb { flex: 1; min-width: 0; padding: 0; background: none; border: 0; }
  .betrieb-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .betrieb-zeit { margin-top: .05rem; font-size: .75rem; }
  .assistentin { display: none; }
  .leiste-konto { margin: 0; padding: 0; border: 0; gap: .25rem; }
  .leiste-konto .avatar, .leiste-konto .konto-text { display: none; }
  .reiter {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; flex-direction: row; gap: 0;
    padding: .375rem .375rem calc(.375rem + env(safe-area-inset-bottom)); background: var(--flaeche);
    border-top: 1px solid var(--linie); box-shadow: 0 -8px 24px -16px rgba(var(--marke-schatten), .35);
  }
  .reiter button { flex: 1 1 0; min-width: 0; flex-direction: column; justify-content: center; gap: .2rem; padding: .25rem 0; border-radius: 12px; font-size: .65625rem; font-weight: 600; letter-spacing: -.005em; text-align: center; color: var(--leise); }
  .reiter button:hover { background: transparent; }
  .reiter button.aktiv { background: transparent; color: var(--akzent-text); }
  .reiter-symbol { position: relative; width: 3.5rem; max-width: 100%; height: 1.875rem; border-radius: 999px; transition: background var(--tempo); }
  .reiter button.aktiv .reiter-symbol { background: var(--akzent-bg); }
  .reiter-text { white-space: nowrap; }
  .reiter-zahl { position: absolute; top: .1rem; left: calc(50% + .45rem); margin: 0; min-width: 1.125rem; height: 1.125rem; padding: 0 .3rem; font-size: .625rem; background: var(--zaehler-bg); color: var(--zaehler-text); box-shadow: 0 0 0 2px var(--flaeche); }
  .reiter button.aktiv .reiter-zahl { background: var(--zaehler-bg); color: var(--zaehler-text); }
  .reiter-zahl.dringend { display: none; }
  .inhalt { padding: 1.25rem 1rem calc(var(--unten-hoehe) + 2rem + env(safe-area-inset-bottom)); }
  h1 { font-size: 1.375rem; }
  .seitenkopf { margin-bottom: 1.125rem; }

  .posteingang { display: block; }
  .detail-bereich {
    position: fixed; inset: 0; z-index: 60; max-height: none; border: 0; border-radius: 0; box-shadow: none; background: var(--flaeche);
    transform: translateX(100%); visibility: hidden; transition: transform .3s var(--federung), visibility 0s linear .3s;
  }
  body.detail-offen .detail-bereich { transform: none; visibility: visible; transition: transform .3s var(--federung); }
  body.detail-offen { overflow: hidden; }
  .detail-leiste {
    position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: .5rem; min-height: 3.5rem;
    padding: .375rem .75rem; padding-top: calc(.375rem + env(safe-area-inset-top)); background: var(--flaeche); border-bottom: 1px solid var(--linie);
  }
  .detail-leiste .knopf { padding-left: .5rem; }
  .detail { padding: 1.25rem 1.125rem calc(2rem + env(safe-area-inset-bottom)); }
  .detail-leer { display: none; }
  .test-raster { grid-template-columns: 1fr; }
  .speicherleiste { bottom: calc(var(--unten-hoehe) + env(safe-area-inset-bottom)); }
}
@media (max-width: 900px) {
  .einstellung { grid-template-columns: 1fr; gap: 1rem; }
  .kat-inhalt { grid-template-columns: 1fr; }
}
@media (min-width: 640px) and (max-width: 1023.98px) {
  .detail-bereich { left: auto; width: min(36rem, 100%); border-left: 1px solid var(--linie); box-shadow: var(--schatten-3); }
  body.detail-offen .detail-schleier { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(var(--marke-schatten), .35); animation: einblenden .2s ease-out; }
}

/* ── Handy ─────────────────────────────────────────────────────────────────── */
@media (max-width: 767.98px) {
  body { font-size: .9375rem; }
  input:not([type="checkbox"]):not([type="radio"]), select, textarea { font-size: 1rem; }  /* verhindert das Hineinzoomen unter iOS */
  .knopf { min-height: 2.75rem; }
  .knopf.klein { min-height: 2.25rem; }
  .kennzahlen { gap: .625rem; }
  .kennzahl { min-height: 0; padding: .875rem .875rem .9375rem; gap: .5rem; }
  .kennzahl-symbol { display: none; }
  .kennzahl-titel { font-size: .75rem; line-height: 1.3; }
  .kennzahl-wert { font-size: 1.625rem; }
  .kennzahl.status-kachel { padding: .75rem .875rem; }
  .status-kachel .kennzahl-titel { display: none; }
  .status-kachel .status-liste { flex-direction: row; flex-wrap: wrap; gap: .375rem 1rem; }
  .status-kachel .status-liste li { gap: .4rem; font-size: .78rem; }
  .status-kachel .status-liste .st-wert { margin-left: 0; }
  .hinweis-karte { align-items: center; gap: .75rem; padding: .75rem .75rem .75rem .875rem; }
  .hinweis-symbol { width: 2rem; height: 2rem; }
  .hinweis-text { font-size: .8125rem; }
  .hinweis-text .nummer { display: block; font-size: .9375rem; }
  .hinweis-karte .knopf { width: 2.5rem; min-height: 2.5rem; padding: 0; }
  .hinweis-karte .knopf span { display: none; }
  .seitenkopf-datum { display: none; }
  .liste-kopf { padding: .875rem .875rem .75rem 1rem; }
  .liste-kopf .segment { width: 100%; }
  .liste-kopf .segment label { flex: 1 1 auto; }
  .liste { padding: .375rem; }
  .eintrag { padding: .8125rem .75rem .8125rem .875rem; gap: .75rem; }
  .eintrag .avatar { width: 2.25rem; height: 2.25rem; font-size: .75rem; }
  .detail-name { font-size: 1.3125rem; }
  .termin-formular { grid-template-columns: 1fr 1fr; }
  .termin-formular .feld:first-child { grid-column: 1 / -1; }
  .termin-formular-fuss .knopf { flex: 1; }
  .status-wahl button { font-size: .75rem; }
  .mail-liste li.mail { padding: .875rem 1rem; }
  .kunden-liste { grid-template-columns: 1fr; padding: 1rem; }
  .karte-kopf, .karte-inhalt { padding-left: 1rem; padding-right: 1rem; }
  .einstellung { padding: 1.25rem 1rem; }
  .zeiten { grid-template-columns: 1fr; }
  .zeit-zeile { grid-template-columns: 5.75rem minmax(0, 1fr); }
  .speicherleiste { padding: .75rem 1rem; }
  .speicherleiste .knopf { flex: 1; }
  .team-liste li { padding: .875rem 1rem; flex-wrap: wrap; }
  .team-zuletzt { width: 100%; text-align: left; padding-left: 2.875rem; }
  .team-einladen { padding: 1rem; }
  .chat { height: 20rem; }
  .kat-warnungen { padding: .875rem 1rem 0; }
  .kat-liste { padding: .875rem 1rem; gap: .75rem; }
  .kat-kopf { gap: .5rem; padding: .5rem .375rem .5rem .75rem; }
  .kat-nr { width: 1.625rem; height: 1.625rem; font-size: .75rem; }
  .kat-knoepfe .knopf-icon { width: 2.5rem; height: 2.5rem; }
  .kat-name > .i { top: 1.375rem; }
  .kat-inhalt { padding: .875rem; gap: 1rem; }
  .wahl-karten { grid-template-columns: 1fr; }
  .kat .alarm-wahl { align-items: stretch; }
  .kat .alarm-wahl .segment label { flex: 1 1 auto; }
  .kat-fuss { padding: 0 1rem 1rem; }

  .auth { display: block; }
  .auth-marke { padding: 1.25rem 1.25rem 2.75rem; gap: 1.25rem; padding-top: calc(1.25rem + env(safe-area-inset-top)); }
  .auth-marke::before { width: 380px; height: 380px; right: -150px; bottom: -190px; }
  .auth-logo .logo-icon { width: 2.25rem; height: 2.25rem; }
  .auth-logo .logo-wort { height: 1.625rem; }
  .auth-botschaft { margin: 0; }
  .auth-botschaft h2 { font-size: 1.625rem; }
  .auth-botschaft p { font-size: .9375rem; margin-top: .625rem; }
  .auth-vorteile, .auth-vorschau, .auth-fuss { display: none; }
  .auth-inhalt { position: relative; margin-top: -1.5rem; padding: 1.75rem 1.25rem 2.5rem; border-radius: 24px 24px 0 0; align-items: flex-start; min-height: 60vh; }
  .auth-form { margin-top: 1.5rem; }

  .termin-karte { padding: 1.5rem 1.25rem; border-radius: var(--r-l); }
  .kopfleiste { padding: .625rem 1rem; padding-top: calc(.625rem + env(safe-area-inset-top)); }
  .kopfleiste .logo-wort, .kopf-wer { display: none; }
  .inhalt.mittig { padding-bottom: 2.5rem; }
  .betrieb { grid-template-columns: 1fr; padding: 1rem; }
  .system-kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .625rem; padding: 1rem; }
  .system-kachel { padding: .75rem .875rem; }
  .nur-breit { display: none; }
  .betrieb-aktionen { justify-content: flex-start; }
  .dialog-knoepfe .knopf { flex: 1; }
}
@media (max-width: 1100px) and (min-width: 768px) {
  .auth-marke { padding: 2rem 2.25rem; }
  .auth-vorschau { display: none; }
}
@media (max-width: 380px) {
  .reiter button { font-size: .6rem; }
  .kennzahl-wert { font-size: 1.375rem; }
  .kennzahl { padding: .75rem; }
}

/* ── Support-Zugang und zweiter Faktor ─────────────────────────────────────── */
.abzeichen.koralle { background: var(--warm-hell); color: var(--warm-dunkel); }          /* Altname: Messing */
.mono { font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; }

/* Balken „Support-Modus“ im Portal: immer sichtbar, auch am Handy und über der Detailansicht */
.support-balken {
  position: sticky; top: 0; z-index: 90; display: flex; align-items: center; gap: .75rem; min-height: 2.75rem;
  padding: .45rem .75rem .45rem 1rem; padding-top: calc(.45rem + env(safe-area-inset-top));
  background: repeating-linear-gradient(135deg, #7e560d 0 16px, #6d4a0a 16px 32px); color: #fff;
  font-size: .875rem; line-height: 1.35; box-shadow: 0 2px 12px rgba(74, 50, 6, .3);
}
.support-symbol { display: grid; place-items: center; width: 1.875rem; height: 1.875rem; flex: none; border-radius: 9px; background: rgba(255, 255, 255, .17); }
.support-symbol .i { width: 1.05rem; height: 1.05rem; }
.support-text { flex: 1; min-width: 0; }
.support-text strong { font-weight: 700; letter-spacing: .01em; }
.support-text b { font-weight: 600; }
.support-zeit { white-space: nowrap; font-variant-numeric: tabular-nums; }
.support-balken .knopf { flex: none; background: #fff; color: #8f2a0b; border-color: transparent; box-shadow: 0 1px 2px rgba(0, 0, 0, .18); }
.support-balken .knopf:hover { background: #fbf4e4; }
.support-balken[hidden] { display: none; }
body.support-modus .app-hinweis, body.support-modus #app-hinweise { display: none !important; }
body.support-modus { --balken-h: 2.75rem; }
body.support-modus .detail-bereich { top: calc(var(--balken-h) + 1.5rem); max-height: calc(100dvh - var(--balken-h) - 3rem); }
@media (min-width: 1024px) { body.support-modus .leiste { top: var(--balken-h); height: calc(100dvh - var(--balken-h)); } }
@media (max-width: 1023.98px) {
  body.support-modus .leiste { top: var(--balken-h); }
  body.support-modus .detail-bereich { top: var(--balken-h); max-height: none; }
  body.support-modus .detail-leiste { padding-top: .375rem; }
}

/* Code aus der Authenticator-App */
input.code-eingabe:not([type="checkbox"]):not([type="radio"]) {
  min-height: 3.25rem; text-align: center; font-size: 1.5rem; font-weight: 600; letter-spacing: .32em;
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums;
}
.code-eingabe::placeholder { letter-spacing: .32em; opacity: .45; }
input.code-eingabe.lang:not([type="checkbox"]):not([type="radio"]) { font-size: 1.125rem; letter-spacing: .1em; }
.dialog input.code-eingabe:not([type="checkbox"]):not([type="radio"]), .faktor-code-zeile input.code-eingabe:not([type="checkbox"]):not([type="radio"]) { min-height: 2.75rem; font-size: 1.25rem; letter-spacing: .24em; }
.auth-schritt[hidden] { display: none; }
.auth-zurueck { display: inline-flex; align-items: center; gap: .375rem; margin: -.5rem 0 1.25rem; font-size: .8125rem; font-weight: 600; color: var(--leise); text-decoration: none; }
.auth-zurueck:hover { color: var(--tinte); }
.auth-zurueck .i { width: 1rem; height: 1rem; }
.auth-symbol { display: grid; place-items: center; width: 3rem; height: 3rem; margin-bottom: 1.25rem; border-radius: 14px; background: var(--akzent-bg); color: var(--akzent-text); }
.auth-symbol .i { width: 1.5rem; height: 1.5rem; }
.auth-weiter { margin-top: 1.25rem; }
.link-knopf { align-self: center; padding: .25rem .5rem; border-radius: 6px; font-size: .8125rem; font-weight: 600; color: var(--akzent-text); }
.link-knopf:hover { background: var(--akzent-bg); }

/* Einrichtung: Schritte, QR-Code, Schlüssel zum Abtippen */
.faktor-schritte { list-style: none; counter-reset: schritt; margin: 1.5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .75rem; }
.faktor-schritte li { counter-increment: schritt; position: relative; padding-left: 2.25rem; font-size: .875rem; color: var(--tinte-2); line-height: 1.45; }
.faktor-schritte li::before {
  content: counter(schritt); position: absolute; left: 0; top: .05rem; display: grid; place-items: center; width: 1.5rem; height: 1.5rem;
  border-radius: 50%; background: var(--akzent-bg); color: var(--akzent-text); font-size: .75rem; font-weight: 700;
}
.faktor-schritte strong { display: block; color: var(--tinte); font-weight: 600; }
.faktor-qr { display: flex; align-items: center; gap: 1.125rem; margin-top: 1.25rem; padding: 1rem; border-radius: var(--r-l); border: 1px solid var(--linie); background: var(--flaeche-2); }
.faktor-qr img { width: 9.5rem; height: 9.5rem; flex: none; padding: .375rem; border-radius: 12px; background: #fff; box-shadow: var(--schatten-1); image-rendering: pixelated; }
.faktor-qr-text { min-width: 0; display: flex; flex-direction: column; gap: .5rem; font-size: .8125rem; color: var(--leise); }
.schluessel { display: block; padding: .5rem .625rem; border-radius: 8px; border: 1px dashed var(--linie-2); background: var(--flaeche); color: var(--tinte);
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace; font-size: .8125rem; font-weight: 600; letter-spacing: .06em; line-height: 1.5; overflow-wrap: anywhere; }
.faktor-qr .knopf { align-self: flex-start; }

/* Wiederherstellungscodes: einmal angezeigt, zum Aufbewahren */
.codes-liste { list-style: none; counter-reset: code; margin: 1.25rem 0 0; padding: 1rem 1.125rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 1.25rem; border-radius: var(--r-l); border: 1px solid var(--linie); background: var(--flaeche-2); }
.codes-liste li { counter-increment: code; display: flex; align-items: baseline; gap: .5rem; font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace; font-size: .9375rem; font-weight: 600; letter-spacing: .03em; color: var(--tinte); white-space: nowrap; }
.codes-liste li::before { content: counter(code, decimal-leading-zero); font-family: var(--schrift); font-size: .6875rem; font-weight: 600; letter-spacing: 0; color: var(--leise); }
.codes-knoepfe { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.haken-zeile { display: flex; align-items: flex-start; gap: .625rem; margin: 1.25rem 0 0; font-size: .875rem; font-weight: 500; color: var(--tinte); cursor: pointer; }
.haken-zeile input { margin-top: .15rem; }

/* Einstellungen: Anmeldung absichern, Zugriffe durch KeulTech-Support */
.faktor-stand { display: flex; align-items: center; gap: .875rem; padding: .875rem 1rem; border-radius: var(--r); border: 1px solid var(--linie); background: var(--flaeche-2); }
.faktor-stand .kennzahl-symbol { flex: none; background: var(--flaeche-3); color: var(--leise); }
.faktor-stand.an .kennzahl-symbol { background: var(--gruen-bg); color: var(--gruen); }
.faktor-stand-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.faktor-stand-text strong { font-weight: 600; }
.faktor-stand-text span { font-size: .8125rem; color: var(--leise); }
.faktor-aktionen { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .875rem; }
.faktor-ablauf { margin-top: 1rem; padding: 1rem; border-radius: var(--r-l); border: 1px solid var(--akzent-rand); background: var(--akzent-bg); }
.faktor-ablauf .faktor-qr { margin-top: .875rem; background: var(--flaeche); }
.faktor-ablauf .codes-liste { background: var(--flaeche); }
.faktor-code-zeile { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .625rem; margin-top: .875rem; }
.faktor-code-zeile .feld { flex: 1 1 11rem; max-width: 15rem; }
.zugriff-liste { list-style: none; margin: 0; padding: 0; }
.zugriff { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .25rem .875rem; padding: .875rem 1.25rem; border-bottom: 1px solid var(--linie); }
.zugriff:last-child { border-bottom: 0; }
.zugriff-symbol { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 10px; background: var(--warm-hell); color: var(--warm-dunkel); }
.zugriff-symbol .i { width: 1.05rem; height: 1.05rem; }
.zugriff-text { min-width: 0; display: flex; flex-direction: column; gap: .125rem; line-height: 1.4; }
.zugriff-wann { font-weight: 600; font-size: .875rem; color: var(--tinte); }
.zugriff-grund { font-size: .8125rem; color: var(--tinte-2); overflow-wrap: anywhere; }
.zugriff-bereiche { font-size: .75rem; font-weight: 600; color: var(--warm-dunkel); }
.zugriff-bereiche.gelesen { display: inline-flex; align-items: center; gap: .3rem; }
.zugriff-bereiche.gelesen .i { width: .85rem; height: .85rem; }
.zugriff-meta { display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; font-size: .78rem; color: var(--leise); white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.zugriff-hinweis { padding: .875rem 1.25rem; border-top: 1px solid var(--linie); background: var(--flaeche-2); border-radius: 0 0 var(--r-l) var(--r-l); font-size: .78rem; color: var(--leise); }

/* Verwaltung: laufende Support-Sitzung, Dialog „Support-Zugang öffnen“ */
.support-hinweis { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; padding: .875rem 1rem; border-radius: var(--r-l); border: 1px solid var(--warm-rand); background: var(--warm-hell); }
.support-hinweis .zugriff-symbol { background: var(--flaeche); box-shadow: var(--schatten-1); }
.support-hinweis-text { flex: 1 1 16rem; min-width: 0; font-size: .875rem; line-height: 1.45; color: var(--tinte); }
.support-hinweis-text strong { display: block; font-weight: 600; }
.support-hinweis-text span { color: var(--tinte-2); }
.support-hinweis-knoepfe { display: flex; flex-wrap: wrap; gap: .5rem; }
.dialog-kopf { display: flex; align-items: flex-start; gap: .875rem; }
.dialog-kopf p { margin-top: .125rem; }
.dialog-symbol { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; flex: none; border-radius: 12px; background: var(--warm-hell); color: var(--warm-dunkel); }
.dialog-symbol .i { width: 1.25rem; height: 1.25rem; }
.feld-reihe { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .875rem; }
.dialog .meldung { margin: 0; }
.support-regeln { list-style: none; margin: 0; padding: .75rem .875rem; display: flex; flex-direction: column; gap: .375rem; border-radius: var(--r); background: var(--flaeche-2); border: 1px solid var(--linie); font-size: .8125rem; color: var(--tinte-2); }
.support-regeln li { display: flex; align-items: flex-start; gap: .5rem; }
.support-regeln .i { width: 1rem; height: 1rem; margin-top: .1rem; color: var(--akzent-text); stroke-width: 2.4; }
.betrieb-aktionen .knopf.support-knopf { color: var(--warm-dunkel); border-color: var(--warm-rand); background: var(--warm-hell); }
.betrieb-aktionen .knopf.support-knopf:hover { border-color: var(--warm-punkt); }
.anmeldung-karte .karte-inhalt { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; }
.anmeldung-karte .faktor-stand { flex: 1 1 18rem; }

@media (max-width: 767.98px) {
  .support-balken { gap: .5rem; padding-left: .75rem; font-size: .78rem; line-height: 1.3; }
  .support-symbol { display: none; }
  .support-rest { display: none; }
  .support-balken .knopf { min-height: 2.25rem; padding: .3rem .6rem; }
  .faktor-qr { flex-direction: column; align-items: flex-start; }
  .codes-liste { gap: .5rem .75rem; padding: .875rem; }
  .codes-liste li { font-size: .875rem; }
  .zugriff { grid-template-columns: auto minmax(0, 1fr); padding: .875rem 1rem; }
  .zugriff-meta { grid-column: 2; flex-direction: row; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; text-align: left; }
  .feld-reihe { grid-template-columns: 1fr; }
}

/* ── Weniger Bewegung ──────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Native App (Klasse app-nativ am <html>, gesetzt von app-nativ.js): fester Streifen hinter der Statusleiste, damit beim
   Scrollen kein Inhalt unter Uhrzeit und Akku durchläuft (im Browser übernimmt das die Leiste des Browsers) */
.app-nativ body::before {
  content: ""; position: fixed; inset: 0 0 auto 0; height: env(safe-area-inset-top, 0px); z-index: 10000; pointer-events: none;
  background: color-mix(in srgb, var(--flaeche) 88%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.app-nativ body.auth-seite::before { background: rgba(var(--marke-schatten), .45); }
