@import url("schrift.css");
/* =====================================================================
   SORQA – Oberfläche (tablet- und handschuhtauglich)
   Ab 1.46 nach dem Design-Manual (Corporate Design, Fassung 1.2): Gestaltungswerte (Tokens) unten,
   Hell- und Dunkelmodus nach Einstellung des Geräts, Hausschrift IBM Plex Sans, eigene Icons (.ic),
   Ampel mit Formen. Grundsätze: große Tippziele, Ampelfarben überall gleich, feste Größen für Bilder.
   Ab 1.431.0 (AW5) der gemeinsame Kern für App und Zentrale: Was nur ein Teil braucht, steht in dessen
   assets/css/teil.css (app/ bzw. zentrale/), geladen nach dieser Datei (stil_tags() in inc/bootstrap.php).
   ===================================================================== */

/* Hausschrift (ab 1.435.0): IBM Plex Sans für Text, IBM Plex Mono für Zahlen, gemeinsam mit Himmelhaus Solutions.
   Die @font-face-Regeln stehen nur in schrift.css. Fehlt die Schrift, nimmt der Browser die Gerätschrift. */
:root {
  /* --- Markenfarben (Manual Kapitel 03) --- */
  --ink-900: #14232c; --ink-800: #1c3340; --ink-700: #2b4656; --ink-600: #44606f;
  --ink-500: #5f7a89; --ink-400: #7d909c; --ink-300: #a9bac5; --ink-200: #cdd8df;
  --ink-100: #e6ecf0; --ink-50: #f4f7f9; --weiss: #ffffff;
  --gruen-800: #17512a; --gruen-700: #206d30; --gruen-600: #2e8b3e; --gruen-500: #3fa352;
  --gruen-400: #7fd18b; --gruen-200: #c4ebca; --gruen-100: #e5f6e8;
  --signal-gelb: #f2b134; --signal-braun: #8a5a00;

  /* --- Ampel (Zustand), immer mit Form (Kapitel 04) --- */
  --ampel-offen: #5f7a89;  --ampel-offen-flaeche: #e6ecf0;  --ampel-offen-text: #44606f;
  --ampel-arbeit: #b36b00; --ampel-arbeit-flaeche: #fff1d9; --ampel-arbeit-text: #6d4a00;
  --ampel-fertig: #2e8b3e; --ampel-fertig-flaeche: #e3f4e6; --ampel-fertig-text: #1d6b2a;
  --ampel-problem: #c62828; --ampel-problem-flaeche: #fde3e1; --ampel-problem-text: #9c1c1c;
  --ampel-fehlt: var(--ampel-problem); --ampel-fehlt-flaeche: var(--ampel-problem-flaeche); --ampel-fehlt-text: var(--ampel-problem-text); /* 1.412: wie Designsystem 1.3 */
  --arbeit-rand: #f3cf8d; --fertig-rand: #b5dcbf; --problem-rand: #f2b8b3;

  /* --- Kennfarben: Behälter und Hälften (keine Ampelfarben) --- */
  --gibo: #2f6694; --gibo-flaeche: #dce8f4;
  --rupa: #7a4518; --rupa-flaeche: #f3e4d4;
  /* 1.412: Namen aus dem Designsystem (behaelter-1 = Gitterbox, behaelter-2 = Rungenpalette) */
  --behaelter-1: var(--gibo); --behaelter-1-flaeche: var(--gibo-flaeche); --behaelter-2: var(--rupa); --behaelter-2-flaeche: var(--rupa-flaeche);
  --haelfte-1: #007c89; --haelfte-1-flaeche: #d2eef1;
  --haelfte-2: #6a3fa0; --haelfte-2-flaeche: #ebdff8;
  /* Ab 1.107: Teilproben C und D */
  --haelfte-3: #8a5a00; --haelfte-3-flaeche: #f3e6cc;
  --haelfte-4: #3d5a99; --haelfte-4-flaeche: #dde5f5;

  /* --- Kategorien (Standardsatz für komplexere Projekte, Manual 1.1): feste Reihenfolge, Farbe bleibt am Ding,
         ab 4 Kategorien immer mit Form, höchstens 10, danach „Sonstige“. Nie für Zustand, Knöpfe oder Text. --- */
  --kat-1: #2a6fc9; --kat-1-flaeche: #e1ebf7; --kat-1-text: #204d82;
  --kat-2: #d4621f; --kat-2-flaeche: #f9e9e0; --kat-2-text: #7e4625;
  --kat-3: #13998a; --kat-3-flaeche: #def1ef; --kat-3-text: #136460;
  --kat-4: #7655c9; --kat-4-flaeche: #ece7f7; --kat-4-text: #4a3f82;
  --kat-5: #b58900; --kat-5-flaeche: #f5eedb; --kat-5-text: #6d5b14;
  --kat-6: #c2417f; --kat-6-flaeche: #f6e4ed; --kat-6-text: #74345a;
  --kat-7: #6e8b1e; --kat-7-flaeche: #ebefe0; --kat-7-text: #465c24;
  --kat-8: #3a8fd0; --kat-8-flaeche: #e3eff8; --kat-8-text: #295e86;
  --kat-9: #a0561a; --kat-9-flaeche: #f2e7df; --kat-9-text: #613f22;
  --kat-10: #b8549e; --kat-10-flaeche: #f5e7f1; --kat-10-text: #6e3e6b;
  --kat-sonst: #7d909c; --kat-sonst-flaeche: #edeff1; --kat-sonst-text: #4e5f6a;
  /* Menge (hell nach dunkel) und Abweichung vom Soll (Blau zu wenig, Orange zu viel, Grau im Soll) */
  --menge-1: #dbe7f6; --menge-2: #a8c6ec; --menge-3: #6d9fdc; --menge-4: #2a6fc9; --menge-5: #1b4a8a;
  --abw-minus-2: #2a6fc9; --abw-minus-1: #9dbde8; --abw-mitte: #e6ecf0; --abw-plus-1: #eab48f; --abw-plus-2: #d4621f;
  /* Hinweis (Info): neutral, kein Zustand */
  --info: #1f5fa8; --info-flaeche: #e1ebf7; --info-text: #1a4a80; --info-rand: #bcd3ea;

  /* --- Rollen (diese Namen benutzt die Oberfläche) --- */
  --seite: var(--ink-50);
  --karte: var(--weiss);
  --flaeche-2: #f7f9fa;            /* leicht abgesetzte Fläche in Karten */
  --flaeche-3: #eef1f4;            /* Chips, Steuertasten */
  --text: var(--ink-900);
  --text-zweit: var(--ink-600);
  --linie: var(--ink-200);
  --kopf: var(--ink-900);          /* Kopfleiste, in beiden Modi dunkel */
  --kopf-text: var(--ink-100);
  --tinte: var(--ink-900);         /* ausgewählte Teile, Marken (G 611 C) */
  --tinte-hell: var(--ink-100);
  --auf-tinte: var(--weiss);       /* Schrift auf --tinte */
  --auf-farbe: var(--weiss);       /* Schrift auf kräftigen Farben (Rot, Grün, Blau), in beiden Modi weiß */
  --aktion: var(--gruen-700);      /* Hauptknopf, Links */
  --aktion-hover: var(--gruen-800);
  --aktion-text: var(--weiss);
  --link: var(--gruen-700);
  --icon-akzent: var(--gruen-600); /* das eine grüne Element im Icon */
  --fokus: var(--signal-gelb);      /* Fokusring außen, 3 px */
  --fokus-innen: var(--ink-900);    /* Fokusring innen, 2 px: der Doppelring ist auf jeder Fläche sichtbar (1.2) */

  /* --- Schrift --- */
  --schrift: "IBM Plex Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --schrift-zahl: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --schrift-druck: "IBM Plex Sans", Arial, "Liberation Sans", sans-serif;
  --font-text: var(--schrift); --font-zahl: var(--schrift-zahl); --font-druck: var(--schrift-druck);
  /* 1.412: Schriftgrößen-Skala und Abstände aus dem Designsystem. 14 px ist das Minimum (--gr-fuss). */
  --gr-fuss: 14px; --gr-klein: 16px; --gr-text: 18px; --gr-titel-3: 22px; --gr-titel-2: 28px; --gr-kennzahl: 36px; --gr-anzeige: 56px;
  --a1: 4px; --a2: 8px; --a3: 12px; --a4: 16px; --a6: 24px; --a8: 32px; --a12: 48px;

  /* --- Raster und Maße (Grundeinheit 4 px) --- */
  --tipp-min: 48px; --tipp: 56px; --tipp-halle: 72px;
  --ecke-0: 0px; --ecke-s: 4px; --ecke-m: 8px; --ecke-l: 12px; --ecke-pille: 999px;
  --inhalt-max: 1180px; --bp-tablet: 701px; --bp-buero: 1101px; --strich: 2px; --fokus-ring: 3px;
  --schatten: 0 1px 2px rgba(20,35,44,.12), 0 4px 12px rgba(20,35,44,.08);

  /* --- Namen bis 1.45 (bleiben als Verweise, damit nichts bricht) --- */
  --blau: var(--tinte);
  --blau-hell: var(--tinte-hell);
  --gibo-hell: var(--gibo-flaeche);
  --rupa-hell: var(--rupa-flaeche);
  --gedimmt: var(--text-zweit);
  --rand: var(--linie);
  --flaeche: var(--seite);
  --grau: var(--ampel-offen);
  --grau-hell: var(--flaeche-3);
  --orange: #b36b00;               /* kräftige Flächen (Knöpfe) bleiben in beiden Modi gleich */
  --orange-hell: var(--ampel-arbeit-flaeche);
  --gelb: #b36b00;
  --gruen: var(--gruen-600);
  --gruen-hell: var(--ampel-fertig-flaeche);
  --rot: #c62828;
  --rot-hell: var(--ampel-problem-flaeche);
  --radius: var(--ecke-l);
  --tippziel: var(--tipp);
  --kopf-hoehe: 60px;
  --h1: var(--haelfte-1);
  --h1-hell: var(--haelfte-1-flaeche);
  --h2: var(--haelfte-2);
  --h2-hell: var(--haelfte-2-flaeche);
  --h3: var(--haelfte-3);
  --h3-hell: var(--haelfte-3-flaeche);
  --h4: var(--haelfte-4);
  --h4-hell: var(--haelfte-4-flaeche);
  font-size: 18px;
  color-scheme: light;
}

/* Dunkelmodus (Manual Kapitel 03): Tinte wird Fläche, Knöpfe und Links Grün 400 mit dunkler Schrift, Kopfleiste bleibt dunkel. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --seite: var(--ink-900); --karte: var(--ink-800); --flaeche-2: #182c38; --flaeche-3: #24404f;
    --text: var(--ink-100); --text-zweit: var(--ink-300); --linie: var(--ink-700);
    --tinte: var(--ink-100); --tinte-hell: var(--ink-700); --auf-tinte: var(--ink-900);
    --aktion: var(--gruen-400); --aktion-hover: var(--gruen-200); --aktion-text: var(--ink-900); --link: var(--gruen-400);
    --icon-akzent: var(--gruen-400);
    --ampel-offen: #a9bac5; --ampel-arbeit: #f2b134; --ampel-fertig: #7fd18b; --ampel-problem: #ff8a80;
    --ampel-offen-flaeche: #2b4656; --ampel-arbeit-flaeche: #4a3a12; --ampel-fertig-flaeche: #1f4a2a; --ampel-problem-flaeche: #5a2424;
    --ampel-offen-text: #e6ecf0; --ampel-arbeit-text: #ffe3a6; --ampel-fertig-text: #c4ebca; --ampel-problem-text: #ffd6d2;
    --arbeit-rand: #7a5a1c; --fertig-rand: #2f6b3c; --problem-rand: #8a3a3a;
    --gibo: #8fbbe6; --gibo-flaeche: #1e3a52; --rupa: #e0a573; --rupa-flaeche: #4a2e18;
    --haelfte-1: #5fd0dc; --haelfte-1-flaeche: #0e4249; --haelfte-2: #c3a3ef; --haelfte-2-flaeche: #3a2a55;
    --haelfte-3: #e0b25c; --haelfte-3-flaeche: #3d2e10; --haelfte-4: #9db6ee; --haelfte-4-flaeche: #1f2b47;
    --kat-1: #5a86e0; --kat-1-flaeche: #2d4a6d; --kat-1-text: #b5c9f1;
    --kat-2: #d9733a; --kat-2-flaeche: #51453e; --kat-2-text: #eec0a6;
    --kat-3: #1fa58a; --kat-3-flaeche: #1d5355; --kat-3-text: #9ad6ca;
    --kat-4: #8f78dc; --kat-4-flaeche: #3c466c; --kat-4-text: #cdc2ef;
    --kat-5: #b88d12; --kat-5-flaeche: #484c33; --kat-5-text: #dfcc94;
    --kat-6: #cf5a8f; --kat-6-flaeche: #4e3e56; --kat-6-text: #e9b5cd;
    --kat-7: #82a03a; --kat-7-flaeche: #39523e; --kat-7-text: #c7d4a6;
    --kat-8: #3f97d4; --kat-8-flaeche: #264f69; --kat-8-text: #a9d0ec;
    --kat-9: #b0693a; --kat-9-flaeche: #45423e; --kat-9-text: #dbbca6;
    --kat-10: #cc6cb4; --kat-10-flaeche: #4d4360; --kat-10-text: #e8bddd;
    --kat-sonst: #a9bac5; --kat-sonst-flaeche: #435965; --kat-sonst-text: #d8e0e5;
    --menge-1: #2a4566; --menge-2: #3d64a0; --menge-3: #5a86e0; --menge-4: #8fb0ee; --menge-5: #c4d6f6;
    --abw-minus-2: #5a86e0; --abw-minus-1: #33507a; --abw-mitte: #2b4656; --abw-plus-1: #6b4a33; --abw-plus-2: #d9733a;
    --info: #8fb0ee; --info-flaeche: #22395a; --info-text: #cfdcf7; --info-rand: #3d5f8a;
    --schatten: 0 1px 2px rgba(0,0,0,.4), 0 4px 12px rgba(0,0,0,.3);
    color-scheme: dark;
  }
}

/* Ab 1.46.2: Dunkel fest gewählt (Mein Zugang → Darstellung), unabhängig von der Geräteeinstellung */
:root[data-theme="dark"] {
    --seite: var(--ink-900); --karte: var(--ink-800); --flaeche-2: #182c38; --flaeche-3: #24404f;
    --text: var(--ink-100); --text-zweit: var(--ink-300); --linie: var(--ink-700);
    --tinte: var(--ink-100); --tinte-hell: var(--ink-700); --auf-tinte: var(--ink-900);
    --aktion: var(--gruen-400); --aktion-hover: var(--gruen-200); --aktion-text: var(--ink-900); --link: var(--gruen-400);
    --icon-akzent: var(--gruen-400);
    --ampel-offen: #a9bac5; --ampel-arbeit: #f2b134; --ampel-fertig: #7fd18b; --ampel-problem: #ff8a80;
    --ampel-offen-flaeche: #2b4656; --ampel-arbeit-flaeche: #4a3a12; --ampel-fertig-flaeche: #1f4a2a; --ampel-problem-flaeche: #5a2424;
    --ampel-offen-text: #e6ecf0; --ampel-arbeit-text: #ffe3a6; --ampel-fertig-text: #c4ebca; --ampel-problem-text: #ffd6d2;
    --arbeit-rand: #7a5a1c; --fertig-rand: #2f6b3c; --problem-rand: #8a3a3a;
    --gibo: #8fbbe6; --gibo-flaeche: #1e3a52; --rupa: #e0a573; --rupa-flaeche: #4a2e18;
    --haelfte-1: #5fd0dc; --haelfte-1-flaeche: #0e4249; --haelfte-2: #c3a3ef; --haelfte-2-flaeche: #3a2a55;
    --haelfte-3: #e0b25c; --haelfte-3-flaeche: #3d2e10; --haelfte-4: #9db6ee; --haelfte-4-flaeche: #1f2b47;
    --kat-1: #5a86e0; --kat-1-flaeche: #2d4a6d; --kat-1-text: #b5c9f1;
    --kat-2: #d9733a; --kat-2-flaeche: #51453e; --kat-2-text: #eec0a6;
    --kat-3: #1fa58a; --kat-3-flaeche: #1d5355; --kat-3-text: #9ad6ca;
    --kat-4: #8f78dc; --kat-4-flaeche: #3c466c; --kat-4-text: #cdc2ef;
    --kat-5: #b88d12; --kat-5-flaeche: #484c33; --kat-5-text: #dfcc94;
    --kat-6: #cf5a8f; --kat-6-flaeche: #4e3e56; --kat-6-text: #e9b5cd;
    --kat-7: #82a03a; --kat-7-flaeche: #39523e; --kat-7-text: #c7d4a6;
    --kat-8: #3f97d4; --kat-8-flaeche: #264f69; --kat-8-text: #a9d0ec;
    --kat-9: #b0693a; --kat-9-flaeche: #45423e; --kat-9-text: #dbbca6;
    --kat-10: #cc6cb4; --kat-10-flaeche: #4d4360; --kat-10-text: #e8bddd;
    --kat-sonst: #a9bac5; --kat-sonst-flaeche: #435965; --kat-sonst-text: #d8e0e5;
    --menge-1: #2a4566; --menge-2: #3d64a0; --menge-3: #5a86e0; --menge-4: #8fb0ee; --menge-5: #c4d6f6;
    --abw-minus-2: #5a86e0; --abw-minus-1: #33507a; --abw-mitte: #2b4656; --abw-plus-1: #6b4a33; --abw-plus-2: #d9733a;
    --info: #8fb0ee; --info-flaeche: #22395a; --info-text: #cfdcf7; --info-rand: #3d5f8a;
    --schatten: 0 1px 2px rgba(0,0,0,.4), 0 4px 12px rgba(0,0,0,.3);
    color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* ab 1.179.1: Auf dem iPhone (Safari) wird die Seite sonst breiter als der Bildschirm, sobald irgendetwas rechts übersteht
   (Tabelle, langer Wert, Datums- oder Auswahlfeld): Der Inhalt schrumpft auf etwa zwei Drittel, rechts bleibt ein leerer Balken.
   „clip“ zählt Überstehendes nicht zur Seitenbreite; Tabellen mit eigenem Scrollen (.tabelle-scroll) bleiben bedienbar. */
/* ab 1.179.2 auch auf body: iOS Safari beachtet es auf html allein nicht (Seite blieb breiter, Meldungsbox lag rechts außerhalb) */
@supports (overflow: clip) { html, body { overflow-x: clip; } }
input, select, textarea { max-width: 100%; }
body {
  margin: 0;
  font-family: var(--schrift);
  color: var(--text);
  background: var(--flaeche);
  line-height: 1.4;
}
body.dialog-offen { overflow: hidden; }
 /* Die Seite hält ihre Lage selbst (siehe doku.js) */
a { color: var(--link); }
h1 { font-size: 1.6rem; margin: .2em 0 .4em; }
h2 { font-size: 1.25rem; margin: .2em 0 .6em; }
h3 { font-size: 1.05rem; margin: .6em 0 .4em; }
code { background: var(--flaeche-3); padding: 1px 5px; border-radius: var(--ecke-s); font-size: .85em; word-break: break-all; }
.gedimmt { color: var(--gedimmt); }
.klein { font-size: .85rem; }
.abgeschnitten { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
[hidden] { display: none !important; }
/* 1.412: Fokus überall als Doppelring (Designsystem): außen 3 px Signal-Gelb, innen 2 px Tinte. Einzelne Teile setzen ihn genauer. */
:focus-visible { outline: var(--fokus-ring) solid var(--fokus); outline-offset: 2px; box-shadow: 0 0 0 2px var(--fokus-innen); }

/* ---------- Icons (ab 1.46): eigener Icon-Satz, siehe inc/icons.php ---------- */
svg.ic { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 4; flex: none; vertical-align: -.25em; overflow: visible; }
svg.ic.klein { width: 1em; height: 1em; vertical-align: -.15em; }
svg.ic.gross { width: 32px; height: 32px; }
svg.ic.riesig { width: 48px; height: 48px; }
.ic-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
/* Auf kräftigen Flächen ist der Akzent nicht grün, sondern so hell wie der Strich (Manual Kapitel 07) */
.btn.primaer, .btn.ok, .btn.start, .btn.gefahr, .btn.stopp, .btn.pause, .bl-seg.aktiv, .chip-link.aktiv, .fl-kachel.aktiv, .knopf-wahl input:checked + span { --icon-akzent: currentColor; }
.kopfleiste, .login-seite, .toast { --icon-akzent: var(--gruen-400); }
/* Ampelformen als Icon: offen = Ring, arbeit = halber Ring, fertig = Scheibe mit Haken, problem = Dreieck, fehlt = gestrichelter Ring */
svg.am { stroke: none; width: 1.1em; height: 1.1em; vertical-align: -.18em; }
.am-offen { color: var(--ampel-offen); }
.am-arbeit { color: var(--ampel-arbeit); }
.am-fertig { color: var(--ampel-fertig); }
.am-problem { color: var(--ampel-problem); }
.am-fehlt { color: var(--ampel-fehlt); }
/* Ampelpunkte (.ampel) bekommen dieselben Formen über eine Maske; die Farbe setzen die Regeln weiter unten */
:root {
  --m-offen: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='1 1 22 22'><circle cx='12' cy='12' r='8' fill='none' stroke='%23000' stroke-width='2.5'/></svg>");
  --m-arbeit: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='1 1 22 22'><circle cx='12' cy='12' r='8' fill='none' stroke='%23000' stroke-width='2.5'/><path d='M12 4A8 8 0 0 1 12 20Z'/></svg>");
  --m-fertig: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='1 1 22 22'><mask id='m'><rect width='24' height='24' fill='%23fff'/><path d='M7.5 12.2L10.5 15.2L16.5 9' fill='none' stroke='%23000' stroke-width='2.5'/></mask><circle cx='12' cy='12' r='9.25' mask='url(%23m)'/></svg>");
  --m-problem: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='1 1 22 22'><mask id='m'><rect width='24' height='24' fill='%23fff'/><path d='M12 9V13.5' stroke='%23000' stroke-width='2.5'/><rect x='10.75' y='15.5' width='2.5' height='2.5' fill='%23000'/></mask><path d='M12 2.5L22.5 20.5H1.5Z' mask='url(%23m)'/></svg>");
  --m-fehlt: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='1 1 22 22'><circle cx='12' cy='12' r='8' fill='none' stroke='%23000' stroke-width='2.5' stroke-dasharray='3.2 2.1'/></svg>");
}
.ampel, .pu-punkt { -webkit-mask: var(--am-maske, var(--m-offen)) center / contain no-repeat; mask: var(--am-maske, var(--m-offen)) center / contain no-repeat; border-radius: 0!important; }
:root {
  --m-auf: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='butt'><path d='M5 9L12 16L19 9'/></svg>");
  --m-zu: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='butt'><path d='M5 15L12 8L19 15'/></svg>");
  --m-weiter: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='butt'><path d='M9 5L16 12L9 19'/></svg>");
  --m-haken: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='butt'><path d='M4 12L10 18L20 6'/></svg>");
  --m-waage: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='butt'><path d='M3 7H21M12 7V15'/><path d='M4 15H20V21H4Z'/><rect x='14' y='17' width='4' height='2' fill='%23000' stroke='none'/></svg>");
}
/* Zeichen in ::before/::after (ab 1.46): Icon als Maske in der Textfarbe */
.mask-ic, .schritt.waegung .s-titel strong::before, .alter-fraktion > summary::after, .rh-gruppe > summary::after, .mr-ereignis .knopf-wahl input:checked + span::before, .dx-nicht > summary::before, .ak-pfeil::before {
  content: ''; display: inline-block; width: 1.1em; height: 1.1em; vertical-align: -.2em; background: currentColor;
  -webkit-mask: var(--m-ic) center / contain no-repeat; mask: var(--m-ic) center / contain no-repeat;
}

/* ---------- Kopfleiste (ab 1.6): Logo, Pfad, Zugang, Menü – immer angeheftet ---------- */
.kopfleiste {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 8px;
  padding: 4px 10px; background: var(--kopf); color: var(--weiss);
  box-shadow: 0 2px 6px rgba(0,0,0,.2); min-height: 52px;
}
.kopfleiste .logo { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--ecke-m); }
.kopfleiste .logo:hover, .kopfleiste .logo:focus-visible { background: rgba(255,255,255,.15); }
.pfad { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 2px; overflow: hidden; white-space: nowrap; font-size: 1rem; }
.pfad-punkt { color: var(--auf-farbe); text-decoration: none; padding: 6px 6px; line-height: 32px; border-radius: var(--ecke-m); overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 10 auto; display: block; }
a.pfad-punkt { opacity: .85; }
a.pfad-punkt:hover { opacity: 1; background: rgba(255,255,255,.15); }
.pfad-punkt.aktuell { font-weight: 800; font-size: 1.1rem; flex: 0 1 auto; }
.pfad-punkt.aktuell:has(> .sap-marke) { flex-shrink: 0; overflow: visible; } /* „G 611 C“ wird nie gekürzt */
.pfad-trenner { opacity: .6; flex: none; }
.pfad .sap-marke { font-size: 1.05rem; box-shadow: 0 0 0 1.5px rgba(255,255,255,.75); }
.kopfleiste .konto {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; justify-content: center;
  padding: 0 10px; border-radius: var(--ecke-m); color: var(--auf-farbe); text-decoration: none; max-width: 200px;
}
.kopfleiste .konto:hover, .kopfleiste .konto.aktiv { background: rgba(255,255,255,.18); }
.konto-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .95rem; }
.nav-menue { position: relative; flex: none; }
.nav-menue > summary {
  list-style: none; cursor: pointer; min-width: 48px; min-height: 44px; border-radius: var(--ecke-m);
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--auf-farbe);
}
.nav-menue > summary::-webkit-details-marker { display: none; }
.nav-menue[open] > summary { background: rgba(255,255,255,.18); }
/* Offenes Menü (ab 1.6.0): unsichtbare Fläche über der Seite, unter dem Menü – ein Tipp daneben schließt
   nur das Menü und löst nichts darunter aus. Pfad und Logo in der Kopfleiste bleiben antippbar. */
.nav-menue[open] > summary::before { content: ''; position: fixed; inset: 0; z-index: -1; cursor: default; }
.nav-menue-liste {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 260px; max-width: calc(100vw - 16px); z-index: 70;
  max-height: calc(100vh - 80px); max-height: calc(100dvh - 80px); overflow-y: auto;
  background: var(--karte); border-radius: var(--ecke-m); box-shadow: 0 6px 24px rgba(0,0,0,.25); padding: 6px;
  display: flex; flex-direction: column;
}
.nav-menue-liste a { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; min-height: 46px; padding: 0 12px; border-radius: var(--ecke-m); font-weight: 600; }
.nav-menue-liste a.aktiv, .nav-menue-liste a:hover { background: var(--blau-hell); }
.nav-menue-liste a.abmelden { color: var(--gedimmt); font-weight: 500; }
.nav-symbol { width: 1.5em; text-align: center; flex: none; }

.nav-menue-liste hr { border: 0; border-top: 1px solid var(--grau-hell); margin: 4px 6px; }
@media (max-width: 1000px) { .konto-name { display: none; } }
/* Handy: Pfad zeigt nur die letzten beiden Punkte (Zurück + aktuelle Seite) */
@media (max-width: 640px) {
  .kopfleiste { padding: 3px 6px; gap: 4px; min-height: 50px; }
  .kopfleiste .logo { width: 40px; height: 40px; }
  .kopfleiste .logo svg { width: 30px; height: 30px; }
  .pfad > :not(:nth-last-child(-n+3)) { display: none; }
  /* Die übergeordnete Seite als „‹“ (Platz für den Hauptpunkt); der Text bleibt für Vorlesehilfen */
  .pfad-trenner { display: none; }
  .pfad-punkt.zurueck { flex: none; font-size: 0; padding: 0 4px; min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; opacity: 1; margin-left: 4px; }
  .pfad-punkt.zurueck::before { content: '‹'; font-size: 2rem; line-height: 1; margin-top: -4px; }
  .kopfleiste .konto { padding: 0 6px; min-width: 40px; }
}
/* Handy quer: flachere Kopfleiste, damit für die Arbeit mehr Höhe bleibt */
@media (max-height: 500px) {
  .kopfleiste { min-height: 44px; padding-top: 0; padding-bottom: 0; }
  .kopfleiste .logo { width: 40px; height: 40px; }
}
/* Die Seitenüberschrift steht schon als Hauptpunkt in der Kopfleiste (nur für Vorlesehilfen behalten). Ab 1.36.1 auch am PC. */
.titel-wie-pfad { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }

.login-hilfe summary { cursor: pointer; color: var(--blau); min-height: 44px; display: flex; align-items: center; }

/* ---------- Seite & Karten ---------- */
.seite { max-width: 1400px; margin: 0 auto; padding: 16px; }
.seite.schmal { max-width: 520px; padding-top: 10vh; }
.karte {
  background: var(--karte); border: 1px solid var(--rand); border-radius: var(--radius);
  padding: 16px; margin-bottom: 16px; box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.karte.leer { text-align: center; padding: 40px 16px; }
.karte.laden { min-height: 60vh; display: flex; align-items: center; justify-content: center; color: var(--gedimmt); }
.fehlerbox { border-color: var(--rot); }
.haken-zeile { display: flex; gap: 12px; align-items: center; min-height: 56px; margin: 8px 0 14px; cursor: pointer; }
.haken-zeile input { width: 28px; height: 28px; flex: none; }
/* ab 1.189: Haken selbst gezeichnet (der Standard-Haken wurde im dunklen Modus am Handy schwarz) */
.haken-zeile input[type=checkbox], .schalter input[type=checkbox] {
  -webkit-appearance: none; appearance: none; flex: none; margin: 0; display: inline-grid; place-content: center;
  background: var(--karte); border: 2px solid var(--ink-300, var(--rand)); border-radius: var(--ecke-m); cursor: pointer;
}
.haken-zeile input[type=checkbox]::after, .schalter input[type=checkbox]::after {
  content: ''; width: 7px; height: 14px; margin-top: -2px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg) scale(0); transition: transform .1s;
}
.haken-zeile input[type=checkbox]:checked, .schalter input[type=checkbox]:checked { background: var(--blau); border-color: var(--blau); }
.haken-zeile input[type=checkbox]:checked::after, .schalter input[type=checkbox]:checked::after { transform: rotate(45deg) scale(1); }

.pruefpunkte li { padding: 4px 0; }
.pruefliste { width: 100%; border-collapse: collapse; margin: 8px 0 16px; }
.pruefliste td { padding: 8px 6px; border-bottom: 1px solid var(--rand); vertical-align: top; }
.pruefliste td:first-child { width: 2.2em; font-size: 1.2em; }
.pruefliste .klein { display: block; color: var(--gedimmt, var(--text-zweit)); font-size: .9em; }

.brotkrumen a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; text-decoration: none; }
.seiten-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.seiten-kopf h1 { margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; min-width: 48px; padding: 8px 16px;
  font: inherit; font-weight: 600; font-size: 1rem; line-height: 1.15;
  color: var(--text); background: var(--karte); border: 2px solid var(--rand); border-radius: var(--ecke-m);
  cursor: pointer; text-decoration: none; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: background .1s, transform .05s;
}
.btn:hover { background: var(--blau-hell); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
/* Ab 1.446.0: Knopf eines gesendeten Formulars (shared/assets/js/app.js, formularSperren) und Ladebalken bis zur neuen Seite
   (Farbe --ladebalken: SORQA-Grün, im Betreiber-Bereich der Zentrale die helle Schrift der Kopfleiste, zentrale/assets/css/teil.css) */
.btn.sendet:disabled { opacity: .7; cursor: progress; }
html.seite-laedt, html.seite-laedt * { cursor: progress; }
html.seite-laedt::before {
  content: ""; position: fixed; top: 0; left: 0; z-index: 10000; height: 3px; width: 100%;
  background: linear-gradient(90deg, transparent 0, var(--ladebalken, var(--gruen-400)) 30%, var(--ladebalken, var(--gruen-400)) 70%, transparent 100%);
  background-size: 50% 100%; background-repeat: no-repeat; animation: seite-laedt 1.1s linear infinite;
}
@keyframes seite-laedt { from { background-position: -50% 0; } to { background-position: 150% 0; } }
@media (prefers-reduced-motion: reduce) { html.seite-laedt::before { animation: none; background: var(--ladebalken, var(--gruen-400)); opacity: .7; } }
.btn.gross { min-height: var(--tippziel); padding: 10px 20px; font-size: 1.05rem; }
.btn.riesig { min-height: 72px; padding: 12px 28px; font-size: 1.25rem; }
.btn.breit { width: 100%; }
.btn.icon { padding: 0; min-width: 52px; font-size: 1.3rem; }
.btn.primaer { background: var(--aktion); border-color: var(--aktion); color: var(--aktion-text); }
.btn.primaer:hover { background: var(--aktion-hover); border-color: var(--aktion-hover); }
.btn.gefahr { background: var(--rot); border-color: var(--rot); color: var(--auf-farbe); }
.btn.gefahr-text { color: var(--rot); border-color: var(--problem-rand); }
.btn.ok, .btn.start { background: var(--gruen); border-color: var(--gruen); color: var(--auf-farbe); }
.btn.ok:hover, .btn.start:hover { background: #24702f; }
.btn.stopp { background: var(--rot); border-color: var(--rot); color: var(--auf-farbe); }
.btn.stopp:hover { background: #a11f1f; }
.btn.warn { background: var(--ampel-arbeit-flaeche); border-color: var(--orange); color: var(--ampel-arbeit-text); }
.btn.aktiv { background: var(--blau-hell); border-color: var(--blau); }
.btn.x { min-height: 44px; min-width: 44px; padding: 0; border: none; font-size: 1.3rem; }
@media (max-width: 480px) { .btn { white-space: normal; } }
/* Knopfregeln (ab 1.179, Kurzfassung in docs/ENTWICKLUNG.md „Knöpfe“):
   - Hauptknopf .btn.primaer: höchstens einer je Karte oder Leiste, steht vorn (links).
   - Zweitknopf .btn (Rahmen), leiser Knopf .btn.leise (ohne Rahmen und Fläche).
   - Größen: Standard 48 px, .gross 56 px (Formular absenden), .riesig 72 px (Halle), .klein 44 px (Tabellenzeile).
   - Mehrere Knöpfe nebeneinander stehen immer in einer Aktionsleiste .knopfzeile (gleich .knopfreihe):
     gleicher Abstand (8 px), gleiche Höhe, links bündig; .rechts für rechts bündig.
   - Handy (bis 600 px): jeder Knopf der Leiste nimmt die volle Breite, untereinander mit gleichem Abstand.
     Nur-Icon-Knöpfe (.icon, .x, .klein) bleiben klein.
   - Keine Einzelstile für Breite oder Abstand einzelner Knöpfe auf Seiten. */
.knopfzeile, .knopfreihe { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.knopfzeile { margin-top: 10px; }
.knopfzeile.rechts, .knopfreihe.rechts { justify-content: flex-end; }
.btn.klein { min-height: 44px; min-width: 44px; padding: 4px 12px; font-size: .9rem; }
.btn.leise { background: transparent; border-color: transparent; }
.btn.leise:hover { background: var(--blau-hell); }
@media (max-width: 600px) {
  .knopfzeile > .btn, .knopfreihe > .btn {
    flex: 1 1 100%; min-width: 0; white-space: normal; text-align: center;
  }
  .knopfzeile > .btn.icon, .knopfzeile > .btn.x, .knopfzeile > .btn.klein,
  .knopfreihe > .btn.icon, .knopfreihe > .btn.x, .knopfreihe > .btn.klein { flex: 0 0 auto; min-width: 48px; }
}

/* ---------- Formulare ---------- */
.feld { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; min-width: 0; }
.feld > span { font-weight: 600; font-size: .9rem; color: var(--gedimmt); }
/* Dateiauswahl: Knopf im Stil von .btn, daneben der Dateiname */
.feld input[type=file] { font: inherit; color: var(--text); cursor: pointer; }
.feld input[type=file]::file-selector-button {
  font: inherit; font-weight: 600; min-height: 44px; padding: 8px 16px; margin-right: 12px;
  color: var(--text); background: var(--karte); border: 2px solid var(--rand); border-radius: var(--ecke-m); cursor: pointer;
}
.feld input[type=file]:hover::file-selector-button { background: var(--blau-hell); }
input:not([type]), input[type=text], input[type=number], input[type=date], input[type=datetime-local], input[type=time], input[type=password], input[type=email], input[type=search], input[type=url], input[type=tel], input[type=month], select, textarea {
  font: inherit; font-size: 1.05rem; min-height: 52px; padding: 8px 12px; width: 100%;
  border: 2px solid var(--rand); border-radius: var(--ecke-m); background: var(--karte); color: var(--text);
}
textarea { min-height: 70px; resize: vertical; }
/* ab 1.189: Datumsfelder am iPhone auf Feldbreite (sonst ragen sie über den Rand) */
input[type=date], input[type=datetime-local], input[type=time] { -webkit-appearance: none; appearance: none; min-width: 0; max-width: 100%; display: block; text-align: left; }
input[type=date]::-webkit-date-and-time-value, input[type=datetime-local]::-webkit-date-and-time-value, input[type=time]::-webkit-date-and-time-value { text-align: left; min-height: 1.2em; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, .zahlfeld:focus-visible { outline: 3px solid var(--fokus); outline-offset: 2px; box-shadow: 0 0 0 2px var(--fokus-innen); border-color: var(--blau); }
.raster { display: grid; gap: 0 14px; }
.raster.zwei { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.raster.drei { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 700px) { .raster.zwei, .raster.drei { grid-template-columns: 1fr; } }

.suffix-feld { max-width: 90px; text-transform: uppercase; font-weight: 700; text-align: center; font-size: 1.3rem !important; }
.knopfgruppe { display: flex; flex-wrap: wrap; gap: 8px; }
.knopf-wahl input { position: absolute; opacity: 0; pointer-events: none; }
.knopf-wahl span {
  display: inline-flex; flex-direction: column; justify-content: center; min-height: var(--tippziel); padding: 8px 20px;
  border: 2px solid var(--rand); border-radius: var(--ecke-m); font-weight: 600; cursor: pointer; background: var(--karte);
}
.knopf-wahl span small { font-weight: 400; font-size: .8rem; opacity: .85; max-width: 320px; }
.knopf-wahl input:checked + span { background: var(--blau); border-color: var(--blau); color: var(--auf-tinte); }
.knopf-wahl input:focus-visible + span { outline: 3px solid var(--fokus); outline-offset: 2px; box-shadow: 0 0 0 2px var(--fokus-innen); }
.aufklapp { margin-bottom: 12px; }
.aufklapp summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; color: var(--blau); }
.schalter { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; cursor: pointer; font-weight: 600; margin-right: 14px; }
.schalter input { width: 28px; height: 28px; accent-color: var(--blau); }
.checkliste { display: flex; flex-wrap: wrap; }
.foto-auswahl { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.foto-vorschau { max-height: 120px; border-radius: var(--ecke-m); border: 1px solid var(--rand); }

.meldung { padding: 10px 14px; border-radius: var(--ecke-m); margin: 8px 0; }
.meldung.fehler { background: var(--ampel-problem-flaeche); color: var(--ampel-problem-text); border: 1px solid var(--problem-rand); }
.meldung.warn { background: var(--ampel-arbeit-flaeche); color: var(--ampel-arbeit-text); border: 1px solid var(--arbeit-rand); }
.meldung.info { background: var(--blau-hell); color: var(--info-text); border: 1px solid var(--info-rand); }
.meldung ul { margin: 4px 0 0; padding-left: 1.2em; }

.badge { display: inline-block; padding: 1px 8px; border-radius: var(--ecke-pille); background: var(--blau-hell); color: var(--blau); font-size: var(--gr-fuss); font-weight: 700; margin-left: 6px; vertical-align: middle; }
.badge.warn { background: var(--ampel-arbeit-flaeche); color: var(--ampel-arbeit-text); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: var(--ecke-pille); background: var(--flaeche-3); font-size: .85rem; font-weight: 600; white-space: nowrap; }
/* Neuigkeiten (ab 1.216): Versionen seit dem letzten Update hervorheben */
.neuigkeiten .karte.hervor { border-left: 5px solid var(--gruen); }
.neuigkeiten .karte ul { margin: 0; padding-left: 1.2em; }
.neuigkeiten .karte li + li { margin-top: 4px; }
/* ab 1.462: Neuigkeiten nach Art (neuigkeiten_html(), App und Wissensportal) */
.nk-gruppe + .nk-gruppe { margin-top: 10px; }
.nk-gruppe ul { margin: 4px 0 0; padding-left: 1.2em; }
.nk-gruppe li + li { margin-top: 4px; }
.nk-kopf { margin: 0; }
.nk-art { display: inline-block; padding: 1px 10px; border-radius: var(--ecke-pille); font-size: var(--gr-fuss); font-weight: 700; background: var(--blau-hell); color: var(--blau); }
.nk-art.nk-verbessert { background: var(--ampel-fertig-flaeche); color: var(--ampel-fertig-text); }
.nk-art.nk-behoben { background: var(--ampel-arbeit-flaeche); color: var(--ampel-arbeit-text); }
.neuigkeiten h2.nk-alle { margin: 18px 0 8px; }
.prot { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: var(--ecke-m); background: var(--blau-hell); color: var(--blau); font-weight: 800; font-size: .85rem; white-space: nowrap; }
.prot.leer { background: var(--flaeche-3); color: var(--gedimmt); font-weight: 600; }

/* ---------- Sichere Zahleneingabe ---------- */
.zahlfeld {
  display: inline-flex; align-items: center; gap: 8px; min-height: var(--tippziel); min-width: 140px; padding: 6px 14px;
  font: inherit; font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums;
  background: var(--karte); border: 2px solid var(--rand); border-radius: var(--ecke-m); cursor: pointer; color: var(--text); text-align: left;
}
.zahlfeld:hover { border-color: var(--blau); background: var(--blau-hell); }
.zahlfeld .zf-zahl { flex: 1; }
.zahlfeld .zf-einheit { font-size: .85rem; color: var(--gedimmt); font-weight: 600; }
.zahlfeld .zf-stift { font-size: .9rem; color: var(--blau); opacity: .8; }
.zahlfeld.leer .zf-zahl { color: var(--gedimmt); font-weight: 600; font-size: 1rem; }
.zahlfeld.klein { min-height: 44px; min-width: 90px; font-size: 1.05rem; padding: 4px 10px; }
.zahlfeld:disabled { opacity: .6; cursor: wait; }

.dialog.zahl { max-width: 420px; }
.zb-label { font-weight: 700; margin-bottom: 4px; }
.ziffernblock { display: flex; flex-direction: column; gap: 8px; user-select: none; }
.zb-anzeige {
  display: flex; align-items: baseline; justify-content: flex-end; gap: 8px; min-height: 72px; padding: 8px 16px;
  background: #0f1923; color: var(--auf-farbe); border-radius: var(--ecke-l); font-variant-numeric: tabular-nums;
}
.zb-zahl { font-size: 2.4rem; font-weight: 800; letter-spacing: .02em; }
.zb-anzeige.leer .zb-zahl { color: #6f7f8f; }
.zb-anzeige.markiert .zb-zahl { background: #2d5f8f; border-radius: var(--ecke-m); padding: 0 6px; }
.zb-einheit { font-size: 1.1rem; color: #b8c6d4; }
.zb-tasten { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.zb-taste {
  min-height: 64px; font: inherit; font-size: 1.6rem; font-weight: 800; border: 2px solid var(--rand); border-radius: var(--ecke-l);
  background: var(--karte); color: var(--text); cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.zb-taste:active { background: var(--blau-hell); transform: scale(.97); }
.zb-taste.zb-steuer { background: var(--flaeche-3); font-size: 1.3rem; }
.zb-c { min-height: 44px; font-size: .9rem; color: var(--gedimmt); }
.alt-neu-werte { display: flex; align-items: center; justify-content: center; gap: 14px; font-size: 1.5rem; font-weight: 800; padding: 12px; background: var(--flaeche-2); border-radius: var(--ecke-m); flex-wrap: wrap; }
.alt-neu-werte .alt { color: var(--gedimmt); text-decoration: line-through; }
.alt-neu-werte .neu { color: var(--blau); }
.alt-neu-werte .pfeil { color: var(--gedimmt); }

/* ---------- Login ---------- */
.login-seite { background: var(--kopf); }
.login-karte h1 { margin-top: 0; }
.login-logo { margin-bottom: 6px; line-height: 0; }
/* sorqa.app: Feld „Firmenadresse“ mit fester Endung (ab 1.60, nur Zentrale) */

.firma-eingabe input { flex: 1 1 auto; min-width: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }

.firma-andere { margin: 8px 0 0; text-align: center; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%);
  background: var(--gruen); color: var(--auf-farbe); padding: 14px 24px; border-radius: var(--ecke-l);
  font-weight: 700; font-size: 1.05rem; box-shadow: 0 6px 20px rgba(0,0,0,.25);
  transition: transform .2s, visibility .2s; z-index: 400; max-width: calc(100vw - 32px);
  visibility: hidden; pointer-events: none;
}
.toast.sichtbar { transform: translate(-50%, 0); visibility: visible; }
.toast { opacity: .92; }
.toast.fehler { background: var(--rot); }
.toast.warn { background: var(--ampel-arbeit-flaeche); color: var(--ampel-arbeit-text); border: 1px solid var(--arbeit-rand); }
/* Eindringlich (ab 1.256): rot, fest, bis bestätigt */
.toast.wichtig { background: var(--rot); opacity: 1; pointer-events: auto; cursor: pointer; border: 2px solid var(--auf-farbe); }

/* ---------- Meldungen als Pop-up (ab 1.57): schweben oben, blenden von selbst aus, verschieben die Seite nicht ---------- */
.pop-stapel {
  position: fixed; left: 50%; top: calc(var(--kopf-hoehe, 50px) + 8px); transform: translateX(-50%);
  width: min(560px, calc(100vw - 24px)); z-index: 450; display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.pop {
  margin: 0; padding: 12px 16px; border-radius: var(--ecke-m); font-weight: 600; overflow-wrap: anywhere;
  box-shadow: 0 6px 20px rgba(0,0,0,.25); pointer-events: auto; cursor: pointer;
  animation: pop-aus 5s ease-in forwards;
}
.pop.info, .pop.ok { opacity: .92; }
/* Feste Hinweise (ab 1.306, Vertrag, Speicher, zweiter Faktor): liegen über dem Inhalt, bleiben, bis man sie wegklickt */
.pop.bleibt { animation: none; opacity: .92; }
.pop.bleibt a { font-weight: 700; margin-left: 4px; color: inherit; }
.pop.bleibt .pop-x { float: right; margin: -2px -6px 4px 10px; opacity: .7; }
.pop.fehler, .pop.warn { animation-duration: 10s; }
/* Eindringlich (ab 1.256): rot, bleibt stehen, bis "Verstanden" gedrückt wird */
.pop.wichtig { background: var(--rot); color: var(--auf-farbe); border: 2px solid var(--auf-farbe); animation: none; opacity: .92; cursor: default; display: flex; align-items: center; gap: 12px; }
.pop.wichtig .pop-text { flex: 1 1 auto; }
.pop.wichtig .btn { flex: none; min-height: 40px; }
.pop:hover, .pop:focus { animation-play-state: paused; }
.pop.fehler { background: var(--ampel-problem-flaeche); color: var(--ampel-problem-text); border: 1px solid var(--problem-rand); }
.pop.warn { background: var(--ampel-arbeit-flaeche); color: var(--ampel-arbeit-text); border: 1px solid var(--arbeit-rand); }
.pop.info { background: var(--blau-hell); color: var(--info-text); border: 1px solid var(--info-rand); }
.pop.ok { background: var(--ampel-fertig-flaeche); color: var(--ampel-fertig-text); border: 1px solid var(--fertig-rand); }
.pop.weg { display: none; }
@keyframes pop-aus { 0% { opacity: 0; } 4%, 85% { opacity: .92; } 99% { opacity: 0; } 100% { opacity: 0; visibility: hidden; pointer-events: none; } }
@media print { .pop-stapel { display: none; } }

/* ---------- Diktieren (ab 1.9): Hinweis nur auf Geräten mit Bildschirmtastatur ---------- */
.diktat-hinweis { display: none; margin: 6px 0 0; color: var(--gedimmt); font-size: .9rem; }
@media (hover: none) and (pointer: coarse) { .diktat-hinweis { display: block; } }
textarea.diktat-feld { min-height: 7.5em; }

/* ---------- Feste Leiste unten (ab 1.456.0, Baustein für App und Zentrale) ----------
   Klasse fuss-leiste: klebt unten, beginnt rechts neben der linken Leiste. app.js misst die Höhe und gibt der Seite unten
   genauso viel Abstand (--fuss-platz), damit die Leiste nie Inhalt verdeckt (z. B. „Plan einfrieren“ in der Probenplanung). */
.fuss-leiste { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; }
.hat-leiste .fuss-leiste { left: var(--sl-breite, 0px); }
body.hat-fuss-leiste { padding-bottom: var(--fuss-platz, 0px); }

/* ---------- Netz-Aussetzer (ab 1.9): Leiste unten, solange Eingaben aufs Netz warten ---------- */
:root { --netz-leiste: 52px; }
.netz-leiste {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 450; min-height: var(--netz-leiste);
  display: flex; align-items: center; justify-content: center; gap: 6px 12px;
  padding: 6px 12px calc(6px + env(safe-area-inset-bottom)); background: var(--ampel-arbeit-flaeche); color: var(--ampel-arbeit-text);
  border-top: 3px solid var(--gelb); box-shadow: 0 -4px 14px rgba(0,0,0,.18); font-weight: 700; font-size: .95rem;
}
.netz-leiste .nl-text { flex: 0 1 auto; min-width: 0; }
.netz-leiste .btn { min-height: 40px; padding: 4px 14px; flex: none; }
/* Dialoge und Hinweise rücken über die Leiste, damit „Speichern“ und der Ziffernblock frei bleiben */
body.netz-weg .dialog-huelle { bottom: var(--netz-leiste); }
body.netz-weg .toast { bottom: calc(var(--netz-leiste) + 16px); }
body.netz-weg main.seite { padding-bottom: calc(var(--netz-leiste) + 16px); }

/* ---------- Dialog ---------- */
.dialog-huelle {
  position: fixed; inset: 0; background: rgba(15, 25, 35, .55); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 12px;
}
.dialog {
  background: var(--karte); border-radius: var(--ecke-l); width: 100%; max-width: 560px; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px);
  display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(0,0,0,.35);
}
.dialog.breit { max-width: 1000px; }
.dialog-kopf { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 0 20px; gap: 10px; }
/* Sortiernummer und Hälfte oben in jedem Dialog der Sortierseite */
.dialog-kontext { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 20px; background: var(--flaeche-3); border-bottom: 1px solid var(--rand); font-size: 1.15rem; font-weight: 800; border-radius: var(--radius) var(--radius) 0 0; }
.dialog-kontext .suffix { font-size: 1.3rem; }
.dialog-kontext .h-pill { font-size: 1rem; padding: 3px 10px; }
.dialog-kontext.h1 { background: var(--h1-hell); }
.dialog-kontext.h2 { background: var(--h2-hell); }
.dialog-kontext.h3 { background: var(--h3-hell); }
.dialog-kontext.h4 { background: var(--h4-hell); }
.dialog.in-h1 { border-top: 6px solid var(--h1); }
.dialog.in-h2 { border-top: 6px solid var(--h2); }
.dialog.in-h3 { border-top: 6px solid var(--h3); }
.dialog.in-h4 { border-top: 6px solid var(--h4); }
.dialog-kopf h2 { margin: 0; font-size: 1.2rem; }
.dialog-rumpf { padding: 12px 20px; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.dialog-text { font-size: 1.05rem; }
.dialog-fuss { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 12px 20px 16px; border-top: 1px solid var(--rand); }
.dialog-fuss .links { margin-right: auto; }
.foto-gross { max-width: 100%; max-height: 75vh; display: block; margin: 0 auto; border-radius: var(--ecke-m); }
/* Foto-Ansicht (ab 1.75): Vollbild, Zoom mit zwei Fingern, Doppeltipp, Mausrad oder + / − */
.foto-viewer { position: fixed; inset: 0; z-index: 400; background: #0b1117; color: #fff; outline: none; touch-action: none; user-select: none; -webkit-user-select: none; }
.fv-flaeche { position: absolute; inset: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; touch-action: none; cursor: zoom-in; }
.foto-viewer.gezoomt .fv-flaeche { cursor: grab; }
.fv-bild { max-width: none; max-height: none; flex: none; transform-origin: center center; will-change: transform; -webkit-user-drag: none; pointer-events: none; }
.fv-bild.weich { transition: transform .18s ease-out; }
.foto-viewer.laedt .fv-bild { opacity: .35; }
.fv-knopf { position: absolute; display: inline-flex; align-items: center; justify-content: center; min-width: 48px; height: 48px; padding: 0 10px; border: 0; border-radius: var(--ecke-pille);
  background: rgba(20, 30, 40, .72); color: #fff; font-size: 1.5rem; font-weight: 700; cursor: pointer; }
.fv-knopf:hover, .fv-knopf:focus-visible { background: rgba(40, 60, 80, .9); }
.fv-knopf:disabled { opacity: .3; cursor: default; }
.fv-knopf .ic { width: 26px; height: 26px; }
.fv-zu { top: max(10px, env(safe-area-inset-top)); right: max(10px, env(safe-area-inset-right)); }
.fv-zurueck, .fv-vor { top: 50%; margin-top: -24px; }
.fv-zurueck { left: max(8px, env(safe-area-inset-left)); }
.fv-vor { right: max(8px, env(safe-area-inset-right)); }
.fv-unten { position: absolute; left: 0; right: 0; bottom: max(10px, env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: center; gap: 12px; pointer-events: none; }
.fv-unten > * { pointer-events: auto; }
.fv-zaehler { font-size: .95rem; font-weight: 700; padding: 4px 10px; border-radius: var(--ecke-pille); background: rgba(20, 30, 40, .72); }
.fv-zaehler:empty { display: none; }
.fv-leiste { display: inline-flex; gap: 2px; background: rgba(20, 30, 40, .72); border-radius: var(--ecke-pille); padding: 2px; }
.fv-leiste .fv-knopf { position: static; background: transparent; height: 44px; }
.fv-leiste .fv-prozent { font-size: .9rem; min-width: 64px; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .fv-zurueck, .fv-vor { top: auto; bottom: max(64px, calc(env(safe-area-inset-bottom) + 54px)); margin-top: 0; } }

/* ---------- Menü (Mehr / Kamera) ---------- */
.popup-hinterlage { position: fixed; inset: 0; z-index: 349; background: transparent; }
.popup-menue {
  position: fixed; z-index: 350; min-width: 260px; max-width: calc(100vw - 16px); overflow-y: auto; overscroll-behavior: contain; background: var(--karte); border: 1px solid var(--rand);
  border-radius: var(--ecke-l); padding: 6px; box-shadow: 0 12px 32px rgba(0,0,0,.22); display: flex; flex-direction: column;
}
.menue-punkt {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; min-height: 52px; padding: 8px 14px;
  border: none; background: none; font: inherit; font-weight: 600; text-align: left; border-radius: var(--ecke-m); cursor: pointer; color: var(--text);
}
.menue-punkt small { font-weight: 400; color: var(--gedimmt); font-size: .8rem; }
.menue-punkt:hover { background: var(--blau-hell); }
.menue-punkt.gefahr { color: var(--rot); }
.menue-punkt:disabled { color: var(--gedimmt); cursor: default; background: none; font-weight: 400; font-size: .85rem; min-height: 36px; }
.popup-menue hr { border: none; border-top: 1px solid var(--rand); margin: 4px 6px; }

/* ---------- Kamera ---------- */
.kamera-buehne { background: #111; border-radius: var(--ecke-m); overflow: hidden; display: flex; justify-content: center; min-height: 200px; }

.kamera-ampel { position: absolute; top: 8px; left: 8px; padding: 4px 10px; border-radius: var(--ecke-pille); font-size: .9rem; font-weight: 600; background: rgba(0,0,0,.65); color: #fff; }

/* ---------- Ampel (überall gleich) ---------- */
.ampel { width: 18px; height: 18px; border-radius: 50%; background: var(--ampel-offen); --am-maske: var(--m-offen); display: inline-block; flex: none; }
.s-in_arbeit .ampel, .st-begonnen > .ampel, .st-begonnen > .s-kopf .ampel { background: var(--ampel-arbeit); --am-maske: var(--m-arbeit); }
.s-abgeschlossen .ampel, .st-fertig > .ampel, .st-fertig > .s-kopf .ampel { background: var(--ampel-fertig); --am-maske: var(--m-fertig); }
.s-problem .ampel { background: var(--ampel-problem); --am-maske: var(--m-problem); }
.ampel-pille { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 8px; border-radius: var(--ecke-pille); font-weight: 700; font-size: .9rem; background: var(--grau-hell); }
.ampel-pille.a-gruen { background: var(--gruen-hell); color: var(--ampel-fertig-text); } .ampel-pille.a-gruen .ampel { background: var(--ampel-fertig); --am-maske: var(--m-fertig); }
.ampel-pille.a-gelb { background: var(--ampel-arbeit-flaeche); color: var(--ampel-arbeit-text); } .ampel-pille.a-gelb .ampel { background: var(--ampel-arbeit); --am-maske: var(--m-arbeit); }
.ampel-pille.a-rot { background: var(--rot-hell); color: var(--ampel-problem-text); } .ampel-pille.a-rot .ampel { background: var(--ampel-problem); --am-maske: var(--m-problem); }
.ampel-pille.a-grau { color: var(--gedimmt); }
.status-pille { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 6px; border-radius: var(--ecke-pille); background: var(--flaeche-3); font-weight: 700; font-size: .85rem; }
.status-pille .ampel { width: 14px; height: 14px; }

/* Fortschritt (abgeschlossen / in Arbeit / Problem) */
.fortschritt { display: flex; height: 14px; border-radius: var(--ecke-pille); background: var(--grau-hell); overflow: hidden; margin: 10px 0; }
.fortschritt span { display: block; height: 100%; }
.fs-abgeschlossen { background: var(--gruen); }
.fs-in_arbeit { background: var(--orange); }
.fs-problem { background: var(--rot); }

/* Mini-Fortschritt je Sortierung: ein Segment je Schritt */
.schritte { display: flex; align-items: center; gap: 3px; flex-wrap: nowrap; min-width: 0; }
.schritte .sg { flex: 1 1 0; min-width: 6px; height: 12px; border-radius: var(--ecke-s); background: var(--grau-hell); border: 1px solid var(--linie); padding: 0; }

.schritte button.sg { cursor: pointer; height: 28px; }

/* ---------- Projekte (Startseite) ---------- */
.kpi-leiste { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
@media (max-width: 760px) { .kpi-leiste { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { background: var(--karte); border: 1px solid var(--rand); border-radius: var(--radius); padding: 12px 16px; display: flex; flex-direction: column; }
.kpi strong { font-size: 1.8rem; line-height: 1.1; }
.kpi strong small { font-size: 1rem; color: var(--gedimmt); }
.kpi span { color: var(--gedimmt); font-weight: 600; font-size: .85rem; }
.kpi.k-laeuft strong { color: var(--orange); }
.kpi.k-problem strong { color: var(--rot); }
.kpi strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 760px) { .kpi { padding: 10px 12px; } .kpi strong { font-size: 1.15rem; } }
/* Wert passt sich der Kachelbreite an, damit „-12.452,14 €“ in einer Zeile bleibt (Handy wie PC) */
@supports (container-type: inline-size) {
  .kpi { container-type: inline-size; }
  .kpi strong { font-size: clamp(1.05rem, 12.5cqi, 1.8rem); }
}
/* Kennzahl mit Titel oben (ab 1.179, z. B. Finanzen): <div class="kpi akzent k-…"><span>Titel</span><strong>Wert</strong><small>Zusatz</small></div>.
   Ab 1.434 ohne farbigen Randstreifen (Designsysteme SORQA und Himmelhaus); ein Problem zeigt der Wert in Rot. */
.kpi.akzent { gap: 4px; }
.kpi.akzent > span { display: flex; align-items: center; gap: 6px; }
.kpi.akzent > small { color: var(--gedimmt); font-size: .8rem; }
.kpi.akzent.k-problem > strong { color: var(--rot); }
.chip-link { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: var(--ecke-pille); border: 2px solid var(--rand); background: var(--karte); text-decoration: none; color: var(--text); font-weight: 700; }
.chip-link span { background: var(--flaeche-3); border-radius: var(--ecke-pille); padding: 0 8px; font-size: .85rem; }
.chip-link.aktiv { background: var(--blau); border-color: var(--blau); color: var(--auf-tinte); }
.chip-link.aktiv span { background: rgba(255,255,255,.25); }

.zs-raster { display: grid; grid-template-columns: minmax(110px, 190px) minmax(calc(var(--tage, 14) * var(--tb, 48px)), 1fr); gap: 0; align-items: center; }

/* Projekt-Zeilen durch hellgraue Linien getrennt (ab 1.6) */

.zs-achse + a.zs-name, .zs-achse + a.zs-name + .zs-spur { border-top: 0; }

.zs-strich small { display: block; font-size: var(--gr-fuss); }
.zs-strich.we { color: var(--text-zweit); }

.zs-balken.a-gruen { border-color: var(--gruen); background: var(--gruen-hell); }

.zs-balken.a-rot { border-color: var(--rot); background: var(--rot-hell); }

/* Meilensteine im Zeitstrahl (ab 1.75): Strich = Min-Soll im Balken, Raute = laut Prognose erreicht am … */
.zs-meilenstein { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; transform: rotate(45deg); border: 2px solid var(--karte); z-index: 2; pointer-events: auto; }
.zs-meilenstein.ziel { background: var(--gruen); }

.projekt-karte, .projekt-kopf { border-left: 8px solid var(--grau); margin-bottom: 0; }

.projekt-karte.a-gruen, .projekt-kopf.a-gruen { border-left-color: var(--gruen); }
.projekt-karte.a-gelb, .projekt-kopf.a-gelb { border-left-color: var(--gelb); }

@media (max-width: 640px) {
  .projekt-kopf .pk-kopf .pk-titel { flex: 1 1 calc(100% - 116px); min-width: 0; overflow-wrap: anywhere; }

   /* ab 1.27: eigene Zeile, der Name behält die Breite */
}

.pk-zahlen div { display: flex; flex-direction: column; border-top: 1px solid var(--grau-hell); padding: 5px 0; }
.pk-zahlen dt { font-size: var(--gr-fuss); color: var(--gedimmt); font-weight: 600; }
.pk-zahlen dd { margin: 0; font-weight: 800; font-size: 1.05rem; }
.pk-zahlen dd.rot { color: var(--rot); }

.pk-aktionen .btn { flex: 1; }

/* ---------- Projekt-Dashboard ---------- */

.status-zaehler strong { font-size: 1.6rem; line-height: 1.1; }
.status-zaehler span { font-size: .8rem; color: var(--gedimmt); font-weight: 600; }
@media (max-width: 480px) {   .status-zaehler span { font-size: var(--gr-fuss); text-align: center; hyphens: auto; -webkit-hyphens: auto; } }

.laeuft-eintrag a { text-decoration: none; color: var(--text); font-size: 1.1rem; }
.laeuft-eintrag .btn { min-height: 44px; }
.uhr { font-variant-numeric: tabular-nums; font-weight: 800; display: inline-block; min-width: 4.6ch; }

@keyframes blinken { 50% { opacity: .25; } }

/* Aktionsleiste der Projektseite (ab 1.6): Suche immer frei, daneben Filter, Ansicht und Mehr */
.aktionsleiste { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; align-items: center; }
.aktionsleiste .rechts { display: flex; flex-wrap: wrap; gap: 10px; }

.suche-form input[type=search] { width: 100%; min-height: 52px; font-size: 1.1rem; }
.aktionsleiste > .btn { min-height: 52px; }

/* Kleine Projektübersicht: angeheftet unter der Kopfleiste, sobald die große aus dem Bild ist */

.projekt-kurz.sichtbar { transform: none; visibility: visible; }

.projekt-kurz .fortschritt { flex: 1 1 80px; min-width: 0; margin: 0; }

.pkz-st .ampel { width: 12px; height: 12px; }

.projekt-kurz .pkz-suche { min-width: 44px; min-height: 44px; }

/* Handy: Suche über die ganze Breite, darunter Filter und Mehr */
@media (max-width: 600px) {

  .aktionsleiste #btn-filter { flex: 1 1 auto; }
}

.filter summary, .soll-ist summary, .tagesablauf summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-formular { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 14px; }
.filter-aktiv { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -4px 0 14px; }
#btn-filter[aria-expanded="true"] { background: var(--blau-hell); border-color: var(--blau); }
.filter-knoepfe { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 12px; grid-column: 1 / -1; }

.soll-ist .btn { margin-top: 10px; }
.soll-tabelle .zahlfeld { min-width: 72px; }

/* Tagesablauf */
.tagesablauf { overflow-x: auto; }

.ta-achse span { position: absolute; transform: translateX(-50%); font-size: var(--gr-fuss); color: var(--gedimmt); }

.ta-block.laeuft { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.18) 0 6px, transparent 6px 12px); }

/* Kacheln (Behälter) */
.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 14px; }
.kachel {
  background: var(--karte); border: 1px solid var(--rand); border-left: 8px solid var(--grau); border-radius: var(--radius);
  display: flex; flex-direction: column; gap: 8px; padding: 10px 12px 12px;
}
.kachel.s-in_arbeit { border-left-color: var(--orange); }
.kachel.s-abgeschlossen { border-left-color: var(--gruen); }
.kachel.s-problem { border-left-color: var(--rot); }
.kachel.laeuft { box-shadow: 0 0 0 2px var(--orange); }

.k-sap { white-space: nowrap; font-size: 1.2rem; flex: none; }
.k-kopf .btn.icon { min-height: 46px; min-width: 46px; padding: 0; font-size: 1.15rem; }

.flag { background: var(--orange-hell); color: var(--ampel-arbeit-text); border-radius: var(--ecke-m); padding: 1px 8px; font-weight: 700; font-size: .85rem; }

.k-aktionen { display: flex; gap: 8px; margin-top: auto; }
.k-aktionen .btn { flex: 1; min-height: var(--tippziel); white-space: nowrap; }
/* Schmale Kachel mit drei Knöpfen: Pausieren/Stoppen nur als Icon (Pause, Stopp), Öffnen bleibt mit Text */
.kachel { container-type: inline-size; }
@container (max-width: 340px) {
  .k-aktionen .kn-text { display: none; }
  .k-aktionen .btn.pause, .k-aktionen .btn.stopp, .k-aktionen .btn.start[data-aktion="fortsetzen"] { flex: 0 0 64px; padding: 0; justify-content: center; }
}

/* Listenansicht */
.als-tabelle .kacheln { grid-template-columns: 1fr; gap: 6px; }
.als-tabelle .kachel { display: grid; grid-template-columns: minmax(300px, 1.2fr) minmax(180px, 1fr) minmax(140px, 1fr) auto; grid-template-areas: "kopf chips schritte aktionen" "kopf info info aktionen"; align-items: center; gap: 4px 14px; padding: 6px 10px; }
.als-tabelle .k-kopf { grid-area: kopf; }
.als-tabelle .k-chips { grid-area: chips; }
.als-tabelle .schritte { grid-area: schritte; }
.als-tabelle .k-info { grid-area: info; }
.als-tabelle .problem-text { grid-column: 1 / -1; }
.als-tabelle .k-aktionen { grid-area: aktionen; margin: 0; }
.als-tabelle .k-thumb, .als-tabelle .k-thumb img { width: 48px; height: 48px; }

@media (max-width: 1000px) {
  .als-tabelle .kachel { grid-template-columns: minmax(0, 1fr); grid-template-areas: "kopf" "chips" "schritte" "info" "aktionen"; }
}
/* Schmale Kachel: Die Marke „G 611 C“ hat Vorrang – Ampelpunkt entfällt (der farbige Rand zeigt den Stand), Bild etwas kleiner */
@container (max-width: 320px) {

  .k-kopf .k-thumb, .k-kopf .k-thumb img { width: 44px; height: 44px; }
}

/* ---------- Tabellen ---------- */
.tabelle-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tabelle { width: 100%; border-collapse: collapse; }
.tabelle th, .tabelle td { padding: 10px; border-bottom: 1px solid var(--rand); text-align: left; vertical-align: middle; }
.tabelle th { font-size: .85rem; color: var(--gedimmt); background: var(--flaeche-2); }
.tabelle.kompakt th, .tabelle.kompakt td { padding: 6px 8px; }
.tabelle .zahl { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tabelle td.ok { color: var(--gruen); font-weight: 700; }
.tabelle td.abw { color: var(--ampel-arbeit-text); font-weight: 700; }
.tabelle tr.summe td { font-weight: 700; background: var(--flaeche-2); }
.tabelle td.aktionen { white-space: nowrap; text-align: right; }
.tabelle td.aktionen .btn { min-height: 48px; padding: 4px 14px; }

/* ---------- Zeilenlisten, Info-Kacheln, gestapelte Tabellen (ab 1.182) ----------
   Regel in docs/ENTWICKLUNG.md, „Tabellen, Zeilenlisten und Info-Kacheln“. Keine Einzelstile auf Seiten.
   Zeilenliste: <ul class="zeilenliste"><li class="zeile"> mit .z-kopf (Titel, Unterzeile), <dl class="z-angaben">
   aus .z-angabe (dt Beschriftung, dd Wert) und .z-aktionen (Knöpfe). Breit: drei Bereiche nebeneinander,
   die Angaben in gleich breiten Spalten (--spalten); Handy: Titel und Knöpfe oben, Angaben darunter. */
.zeilenliste { list-style: none; margin: 0; padding: 0; container-type: inline-size; }
.zeilenliste > .zeile { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 3fr) minmax(96px, auto); grid-template-areas: "kopf angaben aktionen"; align-items: center; gap: 6px 16px; padding: 10px 0; border-bottom: 1px solid var(--rand); }
.zeilenliste > .zeile:last-child { border-bottom: 0; }
.zeilenliste.kompakt > .zeile { padding: 4px 0; }
.zeilenliste > .zeile[hidden] { display: none; }
.zeilenliste > .zeile.ungelesen { background: var(--blau-hell); margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: var(--ecke-m); }
.zeilenliste > .zeile.leer { display: block; color: var(--gedimmt); }
.z-kopf { grid-area: kopf; min-width: 0; overflow-wrap: anywhere; }
.z-titel { font-weight: 700; }
.z-unter { display: block; color: var(--gedimmt); font-size: .85rem; }
.pos-umfang { margin: 4px 0 0; padding-left: 18px; font-size: .85rem; color: var(--gedimmt); }
.pos-umfang li { margin: 0; }
.z-angaben { grid-area: angaben; display: grid; grid-template-columns: repeat(var(--spalten, 4), minmax(0, 1fr)); gap: 6px 16px; margin: 0; min-width: 0; }
.zeilenliste.spalten-2 { --spalten: 2; } .zeilenliste.spalten-3 { --spalten: 3; }
.z-angabe { min-width: 0; overflow-wrap: break-word; }
.z-angabe.breit { grid-column: span 2; }
.z-angabe > dt { font-size: var(--gr-fuss); font-weight: 700; color: var(--gedimmt); }
.z-angabe > dd { margin: 0; }
.z-angabe > dd.negativ { color: var(--rot); } /* ab 1.373: Betrag unter null */
.z-angabe.zahl > dd { font-variant-numeric: tabular-nums; white-space: nowrap; }
.zeilenliste.zwei > .zeile { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "kopf aktionen"; } /* ab 1.295: nur Titel und Knöpfe (E-Mail-Texte) */
.mail-liste > .zeile.aktiv { background: var(--blau-hell); margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: var(--ecke-m); }
.mail-liste .z-titel { text-decoration: none; margin-right: 6px; }
.z-aktionen { grid-area: aktionen; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.zeilenliste > .zeile > .z-breit { grid-column: 1 / -1; } /* ab 1.212: aufklappbares Formular unter der Zeile (Bank-Import) */
/* Ab 1.358 (Mittelmodus): Reicht die Breite der Liste selbst nicht (Tablet, schmales Fenster, viele Spalten), stehen Titel
   und Knöpfe oben und die Angaben darunter in so vielen Spalten, wie Platz ist. Nie Ziffer für Ziffer umbrechen. */
@container (max-width: 860px) {
  .zeilenliste > .zeile { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "kopf aktionen" "angaben angaben"; }
  .z-angaben { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px 20px; }
  .z-angabe.breit { grid-column: auto; }
}

/* Info-Kacheln: <dl class="infokacheln"><div class="infokachel"><dt>Beschriftung</dt><dd>Wert</dd></div></dl>,
   für wenige Angaben (Name–Wert-Paare) statt einer zweispaltigen Tabelle. */
.infokacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 10px; margin: 0 0 12px; }
.infokachel { background: var(--flaeche-2); border-radius: var(--ecke-m); padding: 10px 12px; min-width: 0; overflow-wrap: anywhere; }
.infokachel > dt { font-size: .8rem; font-weight: 700; color: var(--gedimmt); }
.infokachel > dd { margin: 2px 0 0; font-weight: 700; }
.infokachel > dd small { font-weight: 400; color: var(--gedimmt); }
/* ab 1.286.1: Modul-Kacheln (Verwaltung → Vertrag): Name groß, darunter Stand und Beschreibung */
.infokachel.modul-kachel > dt { font-size: 1rem; color: inherit; display: flex; align-items: center; gap: 6px; }

/* Bleibende Tabellen: .tabelle.stapeln wird auf dem Handy zu Karten je Zeile; jede Zelle zeigt ihre Spalte
   als Beschriftung (data-label, setzt app.js aus dem Tabellenkopf). Matrizen (Zeile × Spalte) stattdessen
   in .tabelle-scroll lassen. */
@media (max-width: 600px) {
  .tabelle.stapeln, .tabelle.stapeln tbody, .tabelle.stapeln tfoot { display: block; width: 100%; }
  .tabelle.stapeln thead { display: none; }
  .tabelle.stapeln tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; padding: 10px 0; border-bottom: 1px solid var(--rand); }
  .tabelle.stapeln th, .tabelle.stapeln td { display: block; padding: 0; border: 0; background: none; text-align: left; white-space: normal; min-width: 0; overflow-wrap: anywhere; }
  .tabelle.stapeln tr > :first-child, .tabelle.stapeln td[colspan], .tabelle.stapeln td.aktionen { grid-column: 1 / -1; }
  .tabelle.stapeln tr > :first-child { font-weight: 700; }
  .tabelle.stapeln td[data-label]::before { content: attr(data-label); display: block; font-size: var(--gr-fuss); font-weight: 700; color: var(--gedimmt); }
  .tabelle.stapeln tr > :first-child::before, .tabelle.stapeln td.aktionen::before { content: none; }
  .tabelle.stapeln tr.summe { background: var(--flaeche-2); padding: 10px 8px; }
  .tabelle.stapeln .nur-breit { display: block; }
}

/* ---------- Plausibilität ---------- */
.plausi { font-weight: 700; padding: 2px 10px; border-radius: var(--ecke-m); display: inline-block; font-size: .9rem; white-space: nowrap; }
.plausi.umbruch { white-space: normal; }
.plausi:empty { display: none; }
.p-ok { background: var(--gruen-hell); color: var(--ampel-fertig-text); }
.p-warnung { background: var(--ampel-arbeit-flaeche); color: var(--ampel-arbeit-text); }
.p-fehler { background: var(--rot-hell); color: var(--ampel-problem-text); }
.p-keine { color: var(--gedimmt); font-weight: 400; }

/* ---------- Sortierung (Dokumentation) ---------- */
.doku-kopf { border-left: 8px solid var(--grau); }

.doku-kopf.s-abgeschlossen { border-left-color: var(--gruen); }

/* Auftrag als Marke „G 611 C“: Behältertyp, letzte 3 Ziffern der SAP-Nummer, Suffix (ab 1.6) */
.sap-marke {
  display: inline-flex; align-items: center; gap: .28em; padding: .06em .38em; border-radius: .32em;
  background: var(--blau); color: var(--auf-tinte); font-weight: 800; line-height: 1.25; white-space: nowrap;
  font-variant-numeric: tabular-nums; letter-spacing: .01em;
}
.sm-typ { font-weight: 700; opacity: .8; }
/* Behältertyp in eigener Farbe (ab 1.6.2): GiBo blau, RuPa braun */
.sap-marke.typ-r { background: var(--rupa); }
.chip.typ-g, .pu-bt.typ-g { background: var(--gibo-hell); color: var(--blau); }
.chip.typ-r, .pu-bt.typ-r { background: var(--rupa-hell); color: var(--rupa); }

.sm-suffix { background: var(--signal-gelb); color: #1d2329; border-radius: .22em; padding: 0 .22em; min-width: 1.1em; text-align: center; }
.sap-marke.gross { font-size: 1em; padding: .04em .3em; border-radius: .2em; box-shadow: 0 2px 0 rgba(0,0,0,.15); }
a .sap-marke, button .sap-marke { cursor: pointer; }
.suffix { display: inline-flex; align-items: center; justify-content: center; background: var(--blau); color: var(--auf-tinte); border-radius: var(--ecke-m); padding: 0 .35em; min-width: 1.4em; font-weight: 800; line-height: 1.25; }
.suffix.gross { font-size: 3rem; border-radius: var(--ecke-l); min-width: 1.3em; box-shadow: 0 2px 0 rgba(0,0,0,.15); }

.sap-voll strong { color: var(--text); font-variant-numeric: tabular-nums; }
/* Hälften-Etiketten */
.h-pill { display: inline-flex; align-items: center; border-radius: var(--ecke-m); padding: 1px 8px; font-weight: 800; font-size: .8rem; letter-spacing: .03em; color: var(--auf-farbe); background: var(--grau); white-space: nowrap; }
.h-pill.h1 { background: var(--h1); }
.h-pill.h2 { background: var(--h2); }
.h-pill.h3 { background: var(--h3); }
.h-pill.h4 { background: var(--h4); }
.h-pill.gross { font-size: 1.4rem; padding: 4px 16px; border-radius: var(--ecke-m); margin: 0; }

.zp-anzeige { display: flex; align-items: center; gap: 8px; font-size: 1.7rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.zp-anzeige.gestoppt { font-size: 1.15rem; }
.zp-anzeige small { font-size: .9rem; color: var(--gedimmt); }

.zeit-panel.klein .zp-anzeige.gestoppt { font-size: .9rem; }
.zeit-panel.klein .btn { min-height: 48px; padding: 6px 14px; }

.kennzahl { background: var(--flaeche-2); border-radius: var(--ecke-m); padding: 8px 12px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.kennzahl > span { font-size: .8rem; color: var(--gedimmt); font-weight: 600; }
.kennzahl strong { font-size: 1.3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kennzahl strong.klein { white-space: normal; font-size: .95rem; }
.kennzahl strong.plausi { font-size: 1rem; align-self: flex-start; max-width: 100%; white-space: normal; } /* Handy: „-7,20 kg (1,9 %)“ bricht um statt die Seite zu verbreitern */

.fs-text { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: .9rem; color: var(--gedimmt); margin-top: 6px; }
.fs-text strong { color: var(--text); }

/* Kurzleiste: erscheint beim Scrollen unter der Kopfleiste, überlagert (verschiebt nichts) */
.kurzleiste {
  position: fixed; left: 0; right: 0; top: var(--kopf-hoehe); z-index: 55;
  display: flex; align-items: center; gap: 10px 16px; padding: 6px 16px; min-height: 64px;
  background: var(--karte); border-bottom: 3px solid var(--grau); box-shadow: 0 4px 12px rgba(0,0,0,.12);
  transform: translateY(-120%); visibility: hidden; transition: transform .18s ease, visibility .18s, top .18s ease;
}
.kurzleiste.sichtbar { transform: none; visibility: visible; }
.kurzleiste.s-in_arbeit { border-bottom-color: var(--orange); }
.kurzleiste.s-abgeschlossen { border-bottom-color: var(--gruen); }
.kurzleiste.s-problem { border-bottom-color: var(--rot); }

.kl-sn strong { font-size: 1.4rem; }
.kl-sn .suffix { font-size: 1.6rem; }

.kurzleiste.in-h1 { background: var(--h1-hell); }
.kurzleiste.in-h2 { background: var(--h2-hell); }
.kurzleiste.in-h3 { background: var(--h3-hell); }
.kurzleiste.in-h4 { background: var(--h4-hell); }

@media (max-width: 1000px) { .kurzleiste { flex-wrap: wrap; row-gap: 4px; padding-bottom: 8px; }  }

/* Handy (bis 640 px breit, quer bis 500 px hoch): Die Kopfleiste bleibt stehen und zeigt schon
   „G 611 C“. Die Kurzleiste darunter braucht deshalb nur Hälfte, Zeit und Fortschritt – eine Zeile. */
@media (max-width: 640px), (max-height: 500px) {
  .kurzleiste { padding: 4px 8px 5px; min-height: 0; gap: 4px 8px; flex-wrap: nowrap; }

  .kurzleiste .schritte { gap: 2px; }

}
@media (max-width: 360px) {
  .kurzleiste { gap: 4px 6px; }

}
@media (prefers-reduced-motion: reduce) { .kurzleiste { transition: none; } }

/* Arbeitsablauf */
.ablauf { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }

.haelfte-kopf h2 { margin: 0; }

.haelfte-bereich.h3 { border-color: var(--h3); background: var(--h3-hell); }
.haelfte-bereich.h4 { border-color: var(--h4); background: var(--h4-hell); }
/* Hälften kräftiger abgesetzt (ab 1.6): Kopf als farbiges Band, mit Pfeil zum Zuklappen */
.haelfte-bereich.zwei > .haelfte-kopf { margin: -10px -10px 0; padding: 6px 6px 6px 12px; border-radius: var(--ecke-m) 10px 0 0; background: var(--grau); color: var(--auf-farbe); }

.haelfte-bereich.zu > .haelfte-kopf { margin-bottom: -10px; border-radius: var(--ecke-m); }

.hk-stand .ampel { width: 14px; height: 14px; }

.hk-klapp { margin-left: auto; min-width: 52px; min-height: 48px; font-size: 1.2rem; background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.55); color: var(--auf-farbe); }
.hk-klapp:hover { background: rgba(255,255,255,.3); }
@media (max-width: 600px) {

  .haelfte-bereich.zwei > .haelfte-kopf { margin: -6px -6px 0; padding: 4px 4px 4px 10px; gap: 2px 10px; }
  .haelfte-bereich.zu > .haelfte-kopf { margin-bottom: -6px; }

}
.schritt { margin: 0; border-left: 8px solid var(--grau); scroll-margin-top: calc(var(--kopf-hoehe) + 72px); }
.schritt.st-begonnen { border-left-color: var(--orange); }
.schritt.st-fertig { border-left-color: var(--gruen); }
.schritt.waegung { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; align-items: center; gap: 10px 14px; padding: 12px 14px; }
/* Gesamtwägungen (Brutto, Zwischen, Tara) heben sich ab 1.6 deutlich von den Fraktionen ab */
.schritt.waegung { background: var(--info-flaeche); border: 2px solid var(--info-rand); border-left-width: 8px; box-shadow: 0 2px 6px rgba(20,35,44,.12); }

.schritt.waegung.st-begonnen { border-left-color: var(--orange); }

.schritt.waegung .s-titel { display: flex; flex-direction: column; min-width: 0; }
.schritt.waegung .s-titel strong { font-size: 1.25rem; }
.schritt.waegung .s-titel strong::before { --m-ic: var(--m-waage); margin-right: .3em; }
.schritt.waegung .s-wert { font-size: 1.7rem; }
.schritt.waegung .s-wert.fehlt { font-size: 1.2rem; }
.schritt.waegung .s-titel small { color: var(--gedimmt); }
.schritt.waegung .s-titel .bem { color: var(--text); font-style: italic; }
.s-wert { font-size: 1.5rem; font-weight: 800; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.s-wert.fehlt { font-size: .95rem; color: var(--gedimmt); font-weight: 600; }
/* Ab 1.33: Wägung in einer Zeile (Name, Gewicht, Foto, großer Knopf zum Wiegen/Ändern); am Handy ohne Ampelpunkt (der linke Rand zeigt den Stand) */
@media (max-width: 700px) {
  .schritt.waegung { grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 6px 8px; padding: 6px 8px 6px 10px; }
  .schritt.waegung > .ampel { display: none; }

  .schritt.waegung .s-titel strong { font-size: 1rem; overflow-wrap: anywhere; line-height: 1.15; }
  .schritt.waegung .s-titel strong::before { content: none; }
  .schritt.waegung .s-titel small:not(.bem) { display: none; }
  .schritt.waegung .s-wert { font-size: 1.15rem; }
  .schritt.waegung .s-wert.fehlt { font-size: 1rem; }
  .schritt.waegung .btn { min-height: 52px; min-width: 96px; padding: 6px 12px; font-size: 1.05rem; }

  .schritt.waegung .foto-mini.fehlt small { display: none; }
}
@media (max-width: 380px) { .schritt.waegung .btn { min-width: 84px; padding: 6px 8px; } }
.schritt.kat { padding: 0; overflow: hidden; }
.s-kopf {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 64px;
  background: var(--karte); border: none; font: inherit; text-align: left; cursor: pointer; color: var(--text);
}
.schritt.kat.offen { box-shadow: 0 0 0 3px var(--blau); }
.schritt.kat.offen .s-kopf { background: var(--blau-hell); border-bottom: 1px solid var(--rand); }
.s-name { font-weight: 800; font-size: 1.1rem; flex: 1 1 auto; min-width: 0; }
.s-name .h-pill { margin-right: 8px; vertical-align: 2px; }
.s-name small { font-weight: 600; color: var(--gedimmt); }
.s-info { color: var(--gedimmt); font-size: .9rem; text-align: right; flex: 0 1 auto; }
.s-status { flex: none; font-size: var(--gr-fuss); font-weight: 800; text-transform: uppercase; letter-spacing: .03em; padding: 2px 8px; border-radius: var(--ecke-m); background: var(--grau-hell); color: var(--gedimmt); min-width: 84px; text-align: center; }
.st-begonnen .s-status { background: var(--orange-hell); color: var(--ampel-arbeit-text); }

.s-status { cursor: inherit; user-select: none; min-width: 120px; }
.pfeil { color: var(--gedimmt); flex: none; }
@media (max-width: 700px) { .s-kopf { flex-wrap: wrap; } .s-info { order: 5; flex-basis: 100%; text-align: left; padding-left: 30px; } }
.s-inhalt { padding: 12px 16px 16px; }

/* Zustand der Fraktion: flaches Etikett über die ganze Breite, sieht bewusst nicht wie ein Knopf aus */
.fs-ok { flex-basis: 100%; font-weight: 800; color: var(--ampel-fertig-text); background: var(--gruen-hell); font-size: 1.1rem; border-left: 6px solid var(--gruen); border-radius: var(--ecke-s); padding: 8px 14px; cursor: default; user-select: none; }
.fs-ok.leer { background: repeating-linear-gradient(135deg, var(--gruen-hell) 0 10px, var(--fertig-rand) 10px 20px); }
.fraktion-status .weiter { margin-left: auto; }
@media (max-width: 600px) { .fraktion-status .btn { flex: 1 1 auto; } .fraktion-status .weiter { margin-left: 0; flex-basis: 100%; } }
.hinweise { flex-basis: 100%; color: var(--ampel-arbeit-text); }

.unterblock > .btn.riesig { margin-top: 10px; width: 100%; }

/* Handy (bis 600 px): Kopf kompakt, Sortiernummer und Suffix bleiben groß, nichts ragt über den Rand */
@media (max-width: 600px) {

  .kennzahl { padding: 6px 8px; }
  .kennzahl strong { font-size: 1.05rem; }
  .kennzahl strong.klein { font-size: .8rem; white-space: normal; }

  .tabelle.waege-tabelle th, .tabelle.waege-tabelle td { padding: 6px 4px; }
  .tabelle.waege-tabelle th { white-space: normal; font-size: var(--gr-fuss); }
  .waege-tabelle .foto-mini, .waege-tabelle .foto-mini img { width: 56px; height: 42px; }
  .waege-tabelle td.aktionen .btn { padding: 4px 12px; }
  .s-kopf { gap: 8px; padding: 10px; }
  .s-status { min-width: 0; }
}
@media (max-width: 359px) {
  /* sehr schmal: Stift der Wägungen ganz sichtbar, ohne seitliches Wischen in der Tabelle */
  .tabelle.waege-tabelle th, .tabelle.waege-tabelle td { padding: 6px 2px; }
  .waege-tabelle .foto-mini, .waege-tabelle .foto-mini img { width: 40px; height: 30px; }
  .waege-tabelle td.aktionen .btn { padding: 4px 6px; min-width: 40px; }
}

.alter-symbol svg { width: 100%; height: 100%; }

.alter-summe { margin-top: 10px; padding: 8px 12px; border-radius: var(--ecke-m); font-weight: 700; background: var(--flaeche-2); }

/* Fotos: feste Größen, damit nichts springt */

.foto-mini.gross, .foto-mini.gross img { width: 120px; height: 90px; }

.foto-mini.fehlt small { font-size: var(--gr-fuss); font-weight: 700; }

.foto-neu { width: 72px; height: 54px; min-height: 54px; font-size: 1.4rem; }
.foto-leiste.klein .foto-mini, .foto-leiste.klein .foto-mini img, .foto-leiste.klein .foto-neu { width: 60px; height: 45px; min-height: 45px; }

.netto-manuell { margin: 0; padding: 10px 14px; }
.netto-manuell summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; }
.abschluss { border-left: 8px solid var(--grau); }
.abschluss.s-abgeschlossen { border-left-color: var(--gruen); }
.abschluss.s-problem { border-left-color: var(--rot); }
.angaben { margin-top: 14px; }

.kv span { font-size: .8rem; color: var(--gedimmt); font-weight: 600; }
.kv strong { font-weight: 600; word-break: break-word; }
.galerie summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 6px; scroll-margin-top: calc(var(--kopf-hoehe) + 72px); }

/* Wägedialog */

.waege-dialog > .meldung { grid-column: 1 / -1; margin: 0; }

.tk-optionen .zahlfeld { width: 100%; }

/* Abweichendes Behältergewicht nur für diese Wägung (ab 1.3.3) */

.tk-abweichend { display: flex; flex-direction: column; gap: 4px; }
.tk-feld-name { font-size: .78rem; font-weight: 700; color: var(--gedimmt); line-height: 1.2; }
.tk-abweichend.aktiv .tk-feld-name { color: var(--ampel-arbeit-text); }
.tk-abweichend.aktiv .zahlfeld { border-color: var(--orange); background: var(--orange-hell); }
.tk-standard { min-height: 40px; padding: 4px 8px; font-size: .85rem; }

/* Wägedialog auf dem Handy (ab 1.3.3): kein fester Ziffernblock mehr. Das Gewicht ist ein großes Feld,
   Tippen öffnet den schmalen Ziffernblock unten (quer: rechts). Dialog füllt den Bildschirm,
   „Abbrechen“ und „Speichern“ stehen immer unten im Bild. */

@media (max-width: 600px), (max-height: 500px) {
  .dialog-huelle.waege-huelle { padding: 0; align-items: stretch; }
  .dialog-huelle.waege-huelle .dialog.waege { max-width: none; max-height: none; height: 100vh; height: 100dvh; border-radius: 0; }

  .dialog.waege .dialog-kontext { border-radius: 0; }

  .dialog.waege .dialog-kopf h2 { font-size: 1.05rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dialog.waege .dialog-rumpf { flex: 1; min-height: 0; padding: 8px 12px; }

  .dialog.waege .dialog-fuss { flex-wrap: nowrap; gap: 8px; padding: 8px 12px; padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
  .dialog.waege .dialog-fuss .btn { flex: 1 1 0; min-width: 0; min-height: 52px; padding: 0 10px; }

}
/* Handy quer: Sortiernummer/Hälfte und Titel in einer Zeile, damit für den Inhalt Platz bleibt */
@media (max-height: 500px) {
  .dialog.waege { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, auto); grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: "kontext kopf" "rumpf rumpf" "fuss fuss"; }
  .dialog.waege .dialog-kontext { grid-area: kontext; padding: 4px 12px; border-bottom: 0; flex-wrap: nowrap; min-width: 0; }

  .dialog.waege .dialog-rumpf { grid-area: rumpf; border-top: 1px solid var(--rand); padding: 6px 12px; }
  .dialog.waege .dialog-fuss { grid-area: fuss; padding-top: 6px; padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px)); }

}

/* ---------- Stammdaten ---------- */

.sd-zeile.inaktiv { opacity: .6; }
.sd-zeile.neu { border-style: dashed; border-color: var(--blau); }

.feld.schmal .zahlfeld { min-width: 90px; }

.sd-bild > span { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.sd-bild small { font-size: var(--gr-fuss); color: var(--gedimmt); }

@media print {
  .kopfleiste, .knopfzeile, .k-aktionen, .aktionsleiste, .toast, .kurzleiste, .btn { display: none !important; }
}

/* ---------- Benutzer (ab 1.3) ---------- */
.rollen-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rollen-liste li { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.rolle-pille { display: inline-block; padding: 2px 10px; border-radius: var(--ecke-pille); font-weight: 700; font-size: .85rem; white-space: nowrap; }
.rolle-pille.r-admin { background: #3b1f6e; color: var(--auf-farbe); }
.rolle-pille.r-sortierleiter { background: var(--blau); color: var(--auf-tinte); }
.rolle-pille.r-sortierkraft { background: var(--gruen-hell); color: var(--ampel-fertig-text); border: 1px solid var(--fertig-rand); }
.rolle-pille.r-visitor { background: var(--grau-hell); color: var(--text-zweit); }
.mail-vorschau { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; background: var(--flaeche-2, rgba(127,127,127,.08)); border: 1px solid var(--rand); border-radius: var(--ecke-m); padding: 12px 14px; margin: 0; }
/* Vertragstexte im Manager (ab 1.322, SK6): Vorschau wie beim Kunden, Änderungen zur letzten Fassung, Platzhalter-Knöpfe */

.vt-vorschau p, .vt-vorschau ul { margin: 0 0 8px; }

@media (max-width: 600px) { .vt-fassungen > .zeile { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "kopf kopf" "angaben angaben" "aktionen aktionen"; }  }
.hinweis-pille { display: inline-block; padding: 1px 8px; border-radius: var(--ecke-pille); font-weight: 700; font-size: .8rem; }
.hinweis-pille.rot { background: var(--rot-hell); color: var(--ampel-problem-text); }
.hinweis-pille.orange { background: var(--orange-hell); color: var(--ampel-arbeit-text); }
.benutzer-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.benutzer-karte { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.benutzer-karte.inaktiv { opacity: .7; background: var(--flaeche); }
.bk-kopf { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.bk-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bk-name strong { font-size: 1.1rem; overflow-wrap: anywhere; }
.bk-status { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.bk-aktionen { margin-top: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 8px; } /* ab 1.458.0: alle Knöpfe gleich breit */
.bk-aktionen > .btn, .bk-aktionen > form > .btn { width: 100%; justify-content: flex-start; margin: 0; }
.bk-aktionen > form { display: contents; }
.seite.schmal.konto-seite { max-width: 860px; padding-top: 16px; } /* ab 1.36.1: sonst gilt der große Abstand der Anmeldeseiten (10vh) */
.konto-daten { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; }
.konto-daten dt { color: var(--gedimmt); }
.konto-daten dd { margin: 0; font-weight: 600; }
/* ab 1.180: freiwillige Freigaben auf der Seite Vertrag */

.freigabe-zeile p { margin: 0 0 8px; }
@media (max-width: 600px) {
  .benutzer-liste { grid-template-columns: 1fr; }

}
.passwort-zeile { display: flex; gap: 8px; }
.passwort-zeile input { flex: 1; min-width: 0; }
.passwort-klar { font-family: ui-monospace, Consolas, monospace; font-size: 1.15rem; letter-spacing: .04em; }
.zahlfeld.gesperrt, .zahlfeld.gesperrt:hover { cursor: default; background: var(--flaeche); border-color: var(--rand); color: var(--text); opacity: 1; }

/* ---------- Pausieren (ab 1.2.3): eigene Farbe Blau mit Pause-Icon ---------- */
:root { --pause: var(--info); --pause-hell: var(--info-flaeche); }
.btn.pause { background: var(--pause); border-color: var(--pause); color: var(--auf-farbe); }
.btn.pause:hover { background: #0d4f9a; }

.uhr.steht { color: var(--pause); }
.zeit-panel.pausiert { background: var(--pause-hell); box-shadow: inset 0 0 0 2px var(--pause); }
.zeit-panel.klein.pausiert { background: none; box-shadow: none; }
@media (max-width: 700px) {  .zeit-panel.klein .btn { min-width: 48px; padding: 0 10px; justify-content: center; } }

.kachel.pausiert { box-shadow: 0 0 0 2px var(--pause); }
.laeuft-eintrag.pausiert { border-color: var(--pause); background: var(--pause-hell); }
.ta-block.pausiert { background-image: repeating-linear-gradient(90deg, rgba(21,101,192,.35) 0 4px, transparent 4px 10px); }

@media (max-width: 600px) {

  .laeuft-eintrag .btn { flex: 1 1 40%; }
}
/* Pause-Symbol als zwei Balken (sieht auf jedem Gerät gleich aus) */
.ico-pause { display: inline-block; width: .72em; height: .85em; border-left: .26em solid currentColor; border-right: .26em solid currentColor; box-sizing: border-box; vertical-align: -.08em; margin-right: .3em; flex: none; }
.kn-icon.ico-pause { margin-right: 0; }

/* ===== 1.3: Schutz gegen gleichzeitiges Überschreiben ===== */
:root { --sperre: var(--ampel-arbeit-text); --sperre-hell: var(--ampel-arbeit-flaeche); --sperre-rand: var(--orange); }

.sperr-hinweis .btn { min-height: 48px; }

.schritt.kat.belegt > .s-kopf { background-image: repeating-linear-gradient(135deg, rgba(224,168,0,.12) 0 10px, transparent 10px 20px); }

.konflikt-liste { margin: 8px 0; padding-left: 0; list-style: none; max-height: 40vh; overflow: auto; }
.konflikt-liste > li { padding: 8px 10px; border-left: 4px solid var(--orange); background: var(--orange-hell); border-radius: var(--ecke-m); margin-bottom: 6px; }
.konflikt-liste ul { margin: 4px 0 0; padding-left: 18px; }
.konflikt-liste .kf-feld { color: var(--gedimmt); }
.konflikt-liste .alt { text-decoration: line-through; color: var(--gedimmt); }
.konflikt-liste .neu { font-weight: 700; color: var(--blau); }
@media (max-width: 600px) {  .sperr-hinweis .btn { flex: 1 1 100%; } }

/* ---------- Altersbestimmung: Stichprobe und Übersicht je Hälfte (ab 1.3) ---------- */
.stichprobe { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; margin-bottom: 10px; border-radius: var(--ecke-m); background: var(--flaeche-2); border-left: 6px solid var(--grau); }
.stichprobe.a-orange { border-left-color: var(--orange); background: var(--orange-hell); }
.stichprobe.a-gruen { border-left-color: var(--gruen); background: var(--gruen-hell); }

.sp-zahl { font-size: 2.2rem; font-weight: 800; line-height: 1; min-width: 1.6em; text-align: center; font-variant-numeric: tabular-nums; }

.sp-was small { color: var(--gedimmt); }

.a-orange .sp-balken i { background: var(--orange); }
.a-gruen .sp-balken i { background: var(--gruen); }
.a-orange > .sp-zaehler .ampel, .a-orange > .au-kopf .ampel, tr.a-orange .ampel, .alter-fraktion.a-orange > summary .ampel { background: var(--ampel-arbeit); --am-maske: var(--m-arbeit); }
.a-gruen > .sp-zaehler .ampel, .a-gruen > .au-kopf .ampel, tr.a-gruen .ampel, .alter-fraktion.a-gruen > summary .ampel { background: var(--ampel-fertig); --am-maske: var(--m-fertig); }
/* Altersbestimmung in der Fraktion: zugeklappt, die Kopfzeile zeigt den Stand (ab 1.6) */
.alter-fraktion > summary { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; min-height: 48px; cursor: pointer; list-style: none; }
.alter-fraktion > summary::-webkit-details-marker { display: none; }
.alter-fraktion > summary::after { --m-ic: var(--m-auf); margin-left: auto; color: var(--gedimmt); }
.alter-fraktion[open] > summary::after { --m-ic: var(--m-zu); }
.alter-fraktion[open] > summary { margin-bottom: 8px; }

.alter-uebersicht { margin-top: 12px; border-left: 6px solid var(--grau); }

.au-kopf { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; width: 100%; min-height: 48px; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }

.alter-uebersicht.auf > .au-kopf { margin-bottom: 8px; }

.au-wiegen .btn.icon { min-width: 48px; min-height: 48px; font-size: 1.2rem; }
.alter-tabelle td { vertical-align: middle; }

.alter-tabelle .sp-summe { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; }

.link-knopf { border: none; background: none; padding: 4px 0; min-height: 40px; font: inherit; font-weight: 700; color: var(--blau); text-decoration: underline; cursor: pointer; text-align: left; }
@media (max-width: 600px) {

  /* Handy: jede Fraktion als Zeile mit Name oben und Soll / O / CE / T / Σ darunter (kein seitliches Scrollen) */

  .alter-tabelle td { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; padding: 0; border: 0; text-align: center; }

}

/* ---------- Ziffernblock auf dem Handy (ab 1.2.4) ----------
   Hochkant: kompakte Leiste unten, oben bleibt die Seite mit dem bearbeiteten Feld sichtbar.
   Quer: Leiste rechts. Schließen: „Abbrechen“, Tippen daneben, Zurück-Taste oder Esc. */
.zb-ok, .zb-c2, .zb-beschriftung, .x-wort { display: none; }
.zahlfeld.zf-aktiv { outline: 4px solid var(--orange); outline-offset: 2px; }
@media (max-width: 600px), (max-height: 500px) {
  .dialog-huelle.blatt { padding: 0; background: rgba(15, 25, 35, .32); align-items: flex-end; }
  .dialog-huelle.blatt .dialog {
    max-width: none; width: 100%; border-radius: var(--ecke-l) var(--ecke-l) 0 0; box-shadow: 0 -8px 30px rgba(0,0,0,.3);
    max-height: calc(100vh - 56px); max-height: calc(100dvh - 56px);
    display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas: "kopf x" "rumpf rumpf";
  }
  .dialog-huelle.blatt .dialog-kopf { display: contents; }
  .dialog-huelle.blatt .dialog-kopf h2 { grid-area: kopf; align-self: center; padding: 4px 12px; font-size: 1rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dialog-huelle.blatt .dialog.mit-kontext .dialog-kopf h2 { display: none; }
  .dialog-huelle.blatt .dialog-kontext { grid-area: kopf; align-self: center; background: none; border: 0; border-radius: 0; padding: 4px 12px; font-size: 1.05rem; gap: 6px; min-width: 0; flex-wrap: nowrap; overflow: hidden; }
  .dialog-huelle.blatt .dialog-kontext .h-pill { font-size: .9rem; white-space: nowrap; }
  .dialog-huelle.blatt .btn.x {
    grid-area: x; margin: 6px 8px 0 0; min-height: 48px; padding: 0 16px; border: 2px solid var(--rand); border-radius: var(--ecke-l);
    background: var(--karte); font-size: 1.05rem; font-weight: 800; color: var(--text); white-space: nowrap;
  }
  .dialog-huelle.blatt .x-wort { display: inline; }
  .dialog-huelle.blatt .dialog-rumpf { grid-area: rumpf; padding: 6px 10px 10px; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
  .dialog-huelle.blatt .dialog-fuss { display: none; }
  .dialog-huelle.blatt .zahl-dialog { display: flex; flex-direction: column; gap: 6px; }
  .dialog-huelle.blatt .zahl-dialog > .zb-label, .dialog-huelle.blatt .zahl-dialog > .zb-gespeichert { display: none; }
  .dialog-huelle.blatt .zahl-dialog > .gedimmt, .dialog-huelle.blatt .zahl-dialog > .meldung { margin: 0; font-size: .85rem; padding: 6px 10px; }
  .dialog-huelle.blatt .zahl-dialog > .gedimmt { padding: 0 2px; }
  .dialog-huelle.blatt .ziffernblock { gap: 6px; }
  .dialog-huelle.blatt .zb-anzeige { min-height: 58px; padding: 6px 12px; justify-content: space-between; align-items: center; border-radius: var(--ecke-m); }
  .dialog-huelle.blatt .zb-beschriftung { display: flex; flex-direction: column; min-width: 0; margin-right: auto; line-height: 1.2; }
  .dialog-huelle.blatt .zb-b-titel { font-size: .85rem; font-weight: 700; color: #dbe5ee; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dialog-huelle.blatt .zb-b-alt { font-size: var(--gr-fuss); color: #9fb2c4; white-space: nowrap; }
  .dialog-huelle.blatt .zb-zahl { font-size: 2rem; white-space: nowrap; }
  .dialog-huelle.blatt .zb-tasten.mit-ok {
    grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 52px; gap: 6px;
    grid-template-areas: "z7 z8 z9 zr" "z4 z5 z6 zc" "z1 z2 z3 ok" "z0 z0 z0 ok";
  }
  .dialog-huelle.blatt .zb-tasten.mit-ok.dezimal { grid-template-areas: "z7 z8 z9 zr" "z4 z5 z6 zc" "z1 z2 z3 ok" "kk z0 z0 ok"; }
  .dialog-huelle.blatt .zb-taste { min-height: 0; font-size: 1.5rem; border-radius: var(--ecke-m); }
  .dialog-huelle.blatt .zb-z7 { grid-area: z7; } .dialog-huelle.blatt .zb-z8 { grid-area: z8; } .dialog-huelle.blatt .zb-z9 { grid-area: z9; }
  .dialog-huelle.blatt .zb-z4 { grid-area: z4; } .dialog-huelle.blatt .zb-z5 { grid-area: z5; } .dialog-huelle.blatt .zb-z6 { grid-area: z6; }
  .dialog-huelle.blatt .zb-z1 { grid-area: z1; } .dialog-huelle.blatt .zb-z2 { grid-area: z2; } .dialog-huelle.blatt .zb-z3 { grid-area: z3; }
  .dialog-huelle.blatt .zb-z0 { grid-area: z0; } .dialog-huelle.blatt .zb-komma { grid-area: kk; } .dialog-huelle.blatt .zb-zurueck { grid-area: zr; }
  .dialog-huelle.blatt .zb-cc, .dialog-huelle.blatt .zb-c2 { grid-area: zc; display: block; }
  .dialog-huelle.blatt .zb-ok {
    grid-area: ok; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    background: var(--blau); border-color: var(--blau); color: var(--auf-tinte); padding: 0 2px;
  }
  .dialog-huelle.blatt .zb-ok:active { background: #163a5c; }
  .dialog-huelle.blatt .zb-ok-haken { font-size: 1.7rem; line-height: 1; }
  .dialog-huelle.blatt .zb-ok-text { font-size: .8rem; font-weight: 800; line-height: 1.1; hyphens: manual; -webkit-hyphens: manual; text-align: center; }
  .dialog-huelle.blatt .dkx-sap { white-space: nowrap; }
  .dialog-huelle.blatt .btn.zb-c { display: none; }
}
/* Kleine Handys hochkant (bis 640 px Höhe): Tasten etwas flacher, damit oben mehr von der Seite bleibt */
@media (max-width: 600px) and (max-height: 640px) {
  .dialog-huelle.blatt .zb-tasten.mit-ok { grid-auto-rows: 46px; }
  .dialog-huelle.blatt .zb-anzeige { min-height: 52px; }
}
/* Handy quer: Ziffernblock als Leiste rechts über die volle Höhe, links bleibt die Seite sichtbar */
@media (max-height: 500px) {
  .dialog-huelle.blatt { align-items: stretch; justify-content: flex-end; }
  .dialog-huelle.blatt .dialog {
    width: min(440px, 68vw); height: 100vh; height: 100dvh; max-height: none; border-radius: var(--ecke-l) 0 0 var(--ecke-l); border-top-width: 0;
    border-left: 6px solid var(--grau); box-shadow: -8px 0 30px rgba(0,0,0,.3); padding-right: env(safe-area-inset-right, 0px);
  }
  .dialog-huelle.blatt .dialog.in-h1 { border-left-color: var(--h1); }
  .dialog-huelle.blatt .dialog.in-h2 { border-left-color: var(--h2); }
  .dialog-huelle.blatt .dialog.in-h3 { border-left-color: var(--h3); }
  .dialog-huelle.blatt .dialog.in-h4 { border-left-color: var(--h4); }
  /* Feld liegt rechts (z. B. Behälter im Wägedialog): Ziffernblock links, das Feld bleibt sichtbar */
  .dialog-huelle.blatt.links { justify-content: flex-start; }
  .dialog-huelle.blatt.links .dialog {
    border-radius: 0 var(--ecke-l) var(--ecke-l) 0; border-left: 0; border-right: 6px solid var(--grau); box-shadow: 8px 0 30px rgba(0,0,0,.3);
    padding-right: 0; padding-left: env(safe-area-inset-left, 0px);
  }
  .dialog-huelle.blatt.links .dialog.in-h1 { border-right-color: var(--h1); }
  .dialog-huelle.blatt.links .dialog.in-h2 { border-right-color: var(--h2); }
  .dialog-huelle.blatt.links .dialog.in-h3 { border-right-color: var(--h3); }
  .dialog-huelle.blatt.links .dialog.in-h4 { border-right-color: var(--h4); }
  .dialog-huelle.blatt .btn.x { min-height: 42px; margin-top: 4px; padding: 0 12px; }
  .dialog-huelle.blatt .dialog-kontext { font-size: .95rem; padding: 4px 8px 4px 10px; }
  .dialog-huelle.blatt .dialog-kontext .suffix { font-size: 1.1rem; }
  .dialog-huelle.blatt .dialog-kontext .h-pill { font-size: .8rem; padding: 2px 8px; }
  .dialog-huelle.blatt .dialog-rumpf { display: flex; flex-direction: column; padding-top: 4px; padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px)); }
  .dialog-huelle.blatt .zahl-dialog { flex: 1; min-height: 0; gap: 4px; }
  .dialog-huelle.blatt .zahl-dialog > .gedimmt, .dialog-huelle.blatt .zahl-dialog > .meldung { font-size: var(--gr-fuss); padding: 2px 6px; }
  .dialog-huelle.blatt .ziffernblock { flex: 1; min-height: 0; gap: 4px; }
  .dialog-huelle.blatt .zb-anzeige { min-height: 46px; padding: 2px 10px; }
  .dialog-huelle.blatt .zb-zahl { font-size: 1.6rem; }
  .dialog-huelle.blatt .zb-tasten.mit-ok { flex: 1; min-height: 0; grid-auto-rows: minmax(34px, 1fr); grid-template-rows: repeat(4, minmax(34px, 1fr)); gap: 4px; }
  .dialog-huelle.blatt .zb-taste { font-size: 1.3rem; }
}
/* Handy hochkant: weniger Rand, damit der Inhalt die Breite nutzt. Sortiernummer, Suffix und Mehr
   in einer Zeile, Angaben darunter über die ganze Breite */
@media (max-width: 480px) {
  .seite { padding: 10px; }
  .karte { padding: 12px; }
  .doku-kopf { border-left-width: 6px; }
  .dk-zeile > .btn.icon { min-width: 44px; }

  .dk-zeile > .kopf-thumb { grid-row: 1; grid-column: 1; }

  .dk-titel > .sn-titel { grid-row: 1; grid-column: 2; min-width: 0; }
  .dk-titel > :not(.sn-titel) { grid-column: 1 / -1; }

}

/* =====================================================================
   Probenübersicht: Proben je Sortierort × Sortiergruppe, Puffer (ab 1.2.5)
   ===================================================================== */
.ampel-pille.a-orange { background: var(--orange-hell); color: var(--ampel-arbeit-text); } .ampel-pille.a-orange .ampel { background: var(--ampel-arbeit); --am-maske: var(--m-arbeit); }
.pu-zeile.a-gruen > .ampel, .pu-ort-karte.a-gruen .pu-ort-titel .ampel, .proben-zeile.a-gruen > .ampel, .pu-punkt.a-gruen { background: var(--ampel-fertig); --am-maske: var(--m-fertig); }
.pu-zeile.a-orange > .ampel, .pu-ort-karte.a-orange .pu-ort-titel .ampel, .proben-zeile.a-orange > .ampel, .pu-punkt.a-orange { background: var(--ampel-arbeit); --am-maske: var(--m-arbeit); }
.pu-zeile.a-rot > .ampel, .pu-ort-karte.a-rot .pu-ort-titel .ampel, .proben-zeile.a-rot > .ampel, .pu-punkt.a-rot { background: var(--ampel-problem); --am-maske: var(--m-problem); }
.pu-zeile.a-aus > .ampel, .pu-ort-karte.a-aus .pu-ort-titel .ampel { background: var(--linie); --am-maske: var(--m-fehlt); }

/* Kopf mit Gesamtfortschritt */

.pg-prozent { margin-left: auto; font-size: 1.8rem; font-weight: 800; font-variant-numeric: tabular-nums; }

.pg-zahlen { display: flex; flex-wrap: wrap; gap: 6px 8px; }

.pg-z strong { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.pg-fertig { background: var(--gruen-hell); border-color: var(--fertig-rand); }
.pg-arbeit { background: var(--orange-hell); border-color: var(--arbeit-rand); }
.pg-puffer { background: var(--grau-hell); border-style: dashed; }
.pg-rot { background: var(--rot-hell); border-color: var(--problem-rand); color: var(--ampel-problem-text); font-weight: 700; }

/* Balken (fertig grün, in Arbeit orange) */

.pu-balken span { display: block; height: 100%; }

/* Min-Soll (ab 1.75): senkrechter Strich im Balken, Meilensteine im Kopf */

.pg-regel-zeile .btn { margin-left: auto; }

/* Ab 1.119: Feld Schicht × Kampagne antippen öffnet seine Stichprobeneinheiten */

.pg-hm td.a-gruen .ampel { background: var(--ampel-fertig); --am-maske: var(--m-fertig); }
.pg-hm td.a-orange .ampel { background: var(--ampel-arbeit); --am-maske: var(--m-arbeit); }
/* Kennzahlen-Kette (ab 1.115): je Zahl eine Zeile, am Handy Name und Wert oben, Erklärung darunter */

.pg-kette li { counter-increment: kk; display: grid; grid-template-columns: 10rem 14rem 1fr; gap: 2px 12px; align-items: baseline; padding: 6px 10px; border-left: 4px solid transparent; }

.pg-kette li.kk-ok { border-left-color: var(--gruen); }
.pg-kette li.kk-warn { border-left-color: var(--rot); }

.pg-kette .kk-wert strong { font-size: 1.15rem; }

.feld-einheit input { max-width: 8rem; }
@media (max-width: 760px) {

  .pg-kette .kk-text { grid-column: 1 / -1; }
}

/* Tabelle (Tablet/PC) */
.pu-tabelle-wrap { padding: 6px; overflow-x: auto; }

.pu-tabelle th { font-weight: 700; text-align: center; padding: 4px; }
.pu-ecke, .pu-tabelle .pu-ort { width: 128px; text-align: left !important; vertical-align: middle; }

.pu-ort small, .pu-ort-titel small { display: block; font-weight: 400; color: var(--gedimmt); font-size: .8rem; }

button.pu-feld:hover { background: rgba(20, 35, 44, .06); }

.pu-zahl strong { font-size: 1.5rem; }

.pu-gesamt .pu-zahl strong { font-size: 1.8rem; }
.pu-zeilen { display: flex; flex-wrap: wrap; gap: 0 8px; font-size: .78rem; line-height: 1.3; }
.pu-arbeit { color: var(--ampel-arbeit-text); font-weight: 700; }
.pu-puffer { color: var(--text-zweit); background: var(--grau-hell); border: 1px dashed var(--grau); border-radius: var(--ecke-m); padding: 0 5px; }

.pu-aktionen { margin-top: 10px; }
.pu-feld, .pu-hinweis, .pu-zeilen { overflow-wrap: anywhere; }
@media (max-width: 1000px) {
  .pu-ecke, .pu-tabelle .pu-ort { width: 96px; }

  .pu-zahl strong { font-size: 1.3rem; }
  .pu-zeilen { font-size: var(--gr-fuss); }

}

/* Liste (Handy) */

.pu-ort-karte { padding: 10px 12px; border-left: 6px solid var(--grau); }
.pu-ort-karte.a-gruen { border-left-color: var(--gruen); }

button.pu-zeile:active { background: var(--blau-hell); }
.pu-zeile > .ampel { grid-area: a; }

.pu-zeile > .pu-zahl { grid-area: z; }

.pu-gruppen-karte { border-left-color: var(--blau); }
@media (max-width: 720px) {

  .pg-prozent { font-size: 1.4rem; }
}

/* Übersicht bearbeiten (ab 1.23): Soll direkt in jedes Feld tippen, Plus legt Behälter an */
.proben-kopf .pk-b-projekt { flex: 1 1 0; min-width: 0; }
.proben-kopf .pk-bearbeiten { margin-left: auto; align-self: center; flex: none; }
@media (max-width: 480px) {

  .proben-kopf .pk-bearbeiten { min-width: 52px; font-size: 1.3rem; padding: 0; }
}
.pu-bearbeiten { padding-bottom: 96px; }
.pu-b-hilfe { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; padding: 10px 14px; background: var(--blau-hell); border-color: var(--blau); }
.pu-b-hilfe p { margin: 0; }

.btn.pu-b-plus, .btn.pu-b-detail { min-height: 40px; min-width: 40px; padding: 0 8px; font-size: 1.2rem; }

.pu-b-zeile > .ampel { width: 12px; height: 12px; }
.pu-b-zeile.a-gruen > .ampel { background: var(--ampel-fertig); --am-maske: var(--m-fertig); }
.pu-b-zeile.a-orange > .ampel { background: var(--ampel-arbeit); --am-maske: var(--m-arbeit); }
.pu-b-zeile.a-rot > .ampel { background: var(--ampel-problem); --am-maske: var(--m-problem); }
.pu-b-zeile.a-aus > .ampel { background: transparent; border: 2px dashed var(--rand); }

.pu-b-name .pu-b-ist { display: block; font-weight: 400; }
.pu-b-zeile .pu-soll-eingabe { max-width: none; }

.btn.pu-neu-hier { align-self: flex-start; }
@media (max-width: 480px) {

  .pu-b-leiste .btn { flex: 1 1 auto; }

}

/* Detail eines Feldes (Dialog) */

.pu-d-soll { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.pu-d-label { font-weight: 700; }
.pu-d-zahlen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; }
.pu-d-zahlen div { background: var(--flaeche); border-radius: var(--ecke-m); padding: 6px 10px; }
.pu-d-zahlen dt { font-size: .78rem; color: var(--gedimmt); }
.pu-d-zahlen dd { margin: 0; font-size: 1.3rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.pu-d-zahlen dd.rot { color: var(--rot); }

.pu-sn-kopf .sap-marke { font-size: 1.15rem; }
.pu-sn-kopf .suffix { font-size: 1.2rem; }
.status-text { font-size: .85rem; font-weight: 700; color: var(--gedimmt); }

@media (max-width: 600px) {
  .pu-d-zahlen { gap: 4px; }
  .pu-d-zahlen div { padding: 3px 8px; }
  .pu-d-zahlen dt { font-size: var(--gr-fuss); }
  .pu-d-zahlen dd { font-size: 1.1rem; }
  .pu-sn-knoepfe .btn { flex: 1 1 auto; }
}

/* Puffer-Kennzeichen auf Projektseite und Sortierseite */

.kachel.ist-puffer { background: var(--flaeche-2); border-style: dashed; }
.kachel.ist-puffer .k-titel, .kachel.ist-puffer .schritte { opacity: .7; }

/* Kompakte Zeile „Proben“ auf Projektkarte und Projektkopf */

.pz-balken span { display: block; height: 100%; }

.pz-zahl strong { font-size: 1.15rem; }

/* Prognose „Fertig bei heutigem Tempo …“ (ab 1.9): nur Anzeige, nicht anklickbar */
.proben-zeile.prognose:hover { background: var(--flaeche); }

.proben-legende ul { margin: 8px 0 0; padding-left: 20px; }
.proben-legende li { margin: 4px 0; }
.knopf-reihe { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

/* Anmeldeseite: Hilfe, wenn config.php nicht passt (ab 1.3.1) */
.config-hilfe h2 { font-size: 1.05rem; margin: 2px 0 6px; color: inherit; }
.config-hilfe p { margin: 6px 0; }
.config-hilfe ol { margin: 8px 0 4px; padding-left: 1.3em; }
.config-hilfe li { margin: 6px 0; }
.config-hilfe .cfg-zeilen { margin: 6px 0 2px; padding: 4px 10px; background: var(--karte); border: 1px solid var(--arbeit-rand); border-radius: var(--ecke-m); }
.config-hilfe .cfg-zeilen > div { padding: 5px 0; }
.config-hilfe .cfg-zeilen > div + div { border-top: 1px dashed var(--arbeit-rand); }
.config-hilfe .cfg-zeilen code { display: block; background: none; padding: 0; font-size: .85rem; color: var(--ampel-arbeit-text); word-break: normal; overflow-wrap: anywhere; }
.config-hilfe .cfg-zeilen span { display: block; font-size: .8rem; color: #8a7a5a; }
.config-hilfe + .btn { margin-top: 8px; }

/* ---------- Sortierliste importieren (ab 1.3.4) ---------- */

.import-seite h2 { margin: 0 0 10px; font-size: 1.15rem; }
.import-hilfe summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }

.import-wahl.gewaehlt { border-color: var(--blau); background: var(--blau-hell); }
.import-wahl input { width: 22px; height: 22px; flex: none; margin: 0; }

.iz-sap { font-size: 1.1rem; font-variant-numeric: tabular-nums; }

.import-hochladen p { margin-top: 0; }
.import-datei input[type=file] { width: 100%; min-height: var(--tippziel); padding: 8px; font: inherit; border: 2px dashed var(--rand); border-radius: var(--ecke-l); background: var(--flaeche); cursor: pointer; }

/* Hauptknopf bleibt beim Scrollen durch die Vorschau unten sichtbar */

@media (max-width: 600px) {

  .import-unterfeld.raster.drei { grid-template-columns: 1fr 1fr; }

  .import-knoepfe a.btn { flex: 1 1 calc(50% - 4px); min-height: 44px; padding: 6px 10px; font-size: 1rem; }
  .import-hochladen .knopfreihe .btn { flex: 1 1 100%; }
}
@media (max-height: 500px) {
  /* Handy quer: Knopfleiste einzeilig und flach */

  .import-knoepfe .btn { min-height: 44px; padding: 6px 12px; font-size: 1rem; }

}

/* ---------------- 1.4: Fraktionen erst nach Brutto/Zwischen, Pflichtanzahl ---------------- */
.karte.kat.wartet > .s-kopf { opacity: .55; cursor: not-allowed; }

.feld .opt { font-weight: 400; color: var(--gedimmt); font-size: var(--gr-fuss); }

/* ---------------- 1.5: Wareneingang (annehmen, freigeben) ---------------- */
.nur-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:root { --we-angemeldet: var(--ampel-offen); --we-angenommen: var(--orange); --we-freigegeben: var(--gruen); --we-puffer: #5b6b7b; --we-fehlt: #c0392b; }

.we-zaehler .chip-link { min-height: 44px; padding: 0 14px; font: inherit; font-weight: 700; cursor: pointer; gap: 6px; }

/* Ab 1.119: „Alle freigeben“ (nur Hausmüll) über der Liste */

.we-knoepfe .btn.gross { min-height: 52px; padding: 6px 14px; gap: 6px; }

.we-knoepfe .we-zurueck { min-width: 52px; justify-content: center; }
   /* Zurücksetzen immer nur als Icon; der Text steht im Tooltip */

.we-brutto .foto-mini, .we-brutto .foto-mini img { width: 48px; height: 36px; }

@media (max-width: 760px) {

  .we-knoepfe .btn.gross { flex: 0 0 auto; min-height: 48px; padding: 6px 10px; font-size: 1rem; }
  .we-knoepfe .btn.gross.haupt { flex: 1 1 auto; }
  .we-knoepfe .btn.icon { min-width: 48px; min-height: 48px; }

}
@media (max-width: 600px) {
  /* Handy: Filter als Symbol + Zahl in einer Reihe, Knöpfe nur mit Symbol (außer dem Hauptknopf) */

  .we-zaehler .chip-link { min-width: 0; min-height: 44px; padding: 0 4px; gap: 3px; justify-content: center; font-size: .9rem; }

  .we-zaehler .kn-text { display: none; }

  .we-knoepfe .btn.gross:not(.haupt), .we-knoepfe .btn.icon, .we-knoepfe .we-brutto-knopf { min-width: 44px; width: 44px; justify-content: center; }

}
@media (max-width: 359px) {

  .we-knoepfe .btn.gross:not(.haupt), .we-knoepfe .btn.icon, .we-knoepfe .we-brutto-knopf { min-width: 40px; width: 40px; }
}
/* Sortierseite: Hinweis, solange der Behälter nicht freigegeben ist */

.we-sperre .btn { min-height: 48px; }

.we-chip.angemeldet { background: var(--grau-hell); color: var(--text-zweit); border-color: var(--grau); }
/* Probenübersicht: Wareneingang je Feld und im Kopf */
.pu-we { color: var(--we-freigegeben); font-weight: 700; white-space: nowrap; }
.pu-we.offen { color: var(--ampel-arbeit-text); }
.pg-we { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 8px; padding: 6px 10px; min-height: 44px; border: 1px solid var(--rand); border-left: 5px solid var(--we-angenommen); border-radius: var(--ecke-m); color: var(--text); text-decoration: none; font-size: .95rem; }
.pg-we:hover { background: var(--blau-hell); }
.pg-we strong { font-size: 1.1rem; font-variant-numeric: tabular-nums; }

/* ---------- Eigene Seiten ab 1.6: Datensicherung, Legende, Hilfe & FAQ ---------- */
.seite.seite-schmal { max-width: 860px; }
.seite-schmal .karte > h2 { margin-top: 0; }
.seite-schmal .karte > .btn { margin: 4px 0 6px; }
.schritte-liste { margin: 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 8px; }

.karte > h2 + .lg-zeile { border-top: 0; }

.lg-beispiel .sap-marke { font-size: 1.3rem; }

.lg-symbol svg { width: 100%; height: 100%; }

.ampel-pille.a-pause { background: var(--pause-hell); color: var(--info-text); } .ampel-pille.a-pause .ampel { background: var(--pause); }
.faq { border-top: 1px solid var(--grau-hell); }
.karte > h2 + .faq { border-top: 0; }
.faq > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 0; font-weight: 700; }
.faq > summary::-webkit-details-marker { display: none; }
.faq > summary::before { content: '›'; flex: none; width: 1em; font-size: 1.4rem; line-height: 1; color: var(--blau); transition: transform .15s; }
.faq[open] > summary::before { transform: rotate(90deg); }
.faq > p { margin: 0 0 12px 1.6em; }

@media (prefers-reduced-motion: reduce) { .faq > summary::before { transition: none; } }

/* ---------- Probleme (ab 1.7) ---------- */
.nav-menue > summary { position: relative; }
.nav-punkt { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: var(--ecke-pille); background: var(--rot); color: var(--auf-farbe);
  font-size: var(--gr-fuss); font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--blau); }
.nav-vermerk { margin-left: auto; padding: 0 8px; border-radius: var(--ecke-pille); border: 1px solid var(--gelb, currentColor); font-size: var(--gr-fuss); line-height: 20px; white-space: nowrap; }
.nav-zahl { margin-left: auto; min-width: 24px; padding: 0 8px; border-radius: var(--ecke-pille); background: var(--rot); color: var(--auf-farbe); font-size: .8rem; line-height: 22px; text-align: center; }
a.kpi { color: inherit; text-decoration: none; }
a.kpi:hover { background: var(--blau-hell); }
a.problem-text { display: block; text-decoration: none; }
a.problem-text:hover { text-decoration: underline; }

.problem-eintrag .btn { flex: none; }

.problem-verlauf li { padding: 6px 10px; border-left: 4px solid var(--gruen); background: var(--ampel-fertig-flaeche); border-radius: var(--ecke-m); overflow-wrap: anywhere; white-space: pre-line; }

.chip-link span.rot { background: var(--rot); color: var(--auf-farbe); }

.problem-karte { border-left: 6px solid var(--rot); }
.problem-karte.geloest { border-left-color: var(--gruen); }

/* ---------- Gruppen und Rechte (ab 1.7) ---------- */
.gruppen-karte { margin-top: 16px; }
.gruppen-karte .seiten-kopf { margin-bottom: 4px; }
.gruppen-karte h2 { margin: 0; }
.rechte-huelle { overflow-x: clip; margin: 0 -4px; padding: 0 4px; } /* kein eigener Rollbereich: Kopf haftet an der Seite (ab 1.360, Regel „Ein Rollbereich“ in docs/ENTWICKLUNG.md) */
.rechte-tabelle { border-collapse: separate; border-spacing: 0; width: 100%; }
.rechte-tabelle th, .rechte-tabelle td { padding: 6px 8px; border-bottom: 1px solid var(--grau-hell); text-align: center; vertical-align: middle; }
.rechte-tabelle thead th { vertical-align: bottom; font-weight: 600; }
.rechte-tabelle thead th small { display: block; font-weight: 500; }
.rechte-tabelle .rt-recht { text-align: left; position: sticky; left: 0; z-index: 1; background: var(--karte); min-width: 150px; max-width: 260px; }
.rechte-tabelle .rt-recht strong { display: block; }
.rechte-tabelle .rt-recht small { display: block; font-weight: 400; font-size: .78rem; line-height: 1.25; }
/* Mittlere Breite: Tabelle rückt zusammen statt seitlich zu rollen (kein Rollbereich, damit der Kopf haftet) */
@media (max-width: 1000px) {
  .rechte-tabelle th, .rechte-tabelle td { padding: 6px 2px; }
  .rechte-tabelle .rt-recht { min-width: 100px; padding-left: 6px; }
  .rechte-tabelle thead th .rolle-pille { font-size: .78rem; padding: 2px 6px; }
  .rechte-tabelle thead th small { font-size: var(--gr-fuss); }
  .rt-haken { min-width: 32px; }
  .rechte-tabelle .rt-recht { min-width: 80px; max-width: 140px; }
  .rechte-tabelle .rt-recht strong { font-size: .88rem; overflow-wrap: break-word; hyphens: auto; }
  .rt-knoepfe { gap: 2px; flex-wrap: wrap; }
}
.rt-knoepfe { display: flex; justify-content: center; gap: 4px; margin-top: 4px; }
.btn.icon.klein { min-width: 36px; min-height: 36px; padding: 0 6px; font-size: .95rem; }
.rt-haken { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; cursor: pointer; }
.rt-haken input { width: 24px; height: 24px; accent-color: var(--blau); cursor: pointer; }
.rt-haken input:disabled { cursor: default; }
.rolle-pille:not(.r-admin):not(.r-sortierleiter):not(.r-sortierkraft):not(.r-visitor) { background: var(--ampel-arbeit-flaeche); color: var(--ampel-arbeit-text); border: 1px solid var(--arbeit-rand); }
@media (max-width: 600px) {
  .rechte-tabelle .rt-recht small { display: none; }
  .rechte-tabelle .rt-recht { min-width: 120px; }
}

/* ---------- Kamera in der App (ab 1.7): Vorschau und Auslöser passen aufs Handy ---------- */

.kamera-immer input { width: 22px; height: 22px; }
.knopfgruppe.senkrecht { flex-direction: column; align-items: stretch; }
.knopfgruppe.senkrecht .knopf-wahl span { width: 100%; }
@media (max-width: 600px), (max-height: 520px) {
  .dialog-huelle.mit-kamera-dialog { padding: 0; }
  .dialog.kamera-dialog { border-radius: 0; height: 100vh; height: 100dvh; max-height: none; }

  .kamera-dialog .dialog-rumpf { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 6px 8px; padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
   /* Schließen über Abbrechen oben */
  .kamera-dialog .kamera { flex: 1; min-height: 0; display: flex; flex-direction: column; }

  .kamera-dialog .kamera-video, .kamera-dialog .kamera-bild { width: 100%; height: 100%; max-height: none; }
  .kamera-dialog .kamera-status { margin: 4px 0; }

  .kamera-dialog .kamera-knoepfe .btn.riesig { order: -1; flex: 1 1 100%; min-height: 64px; font-size: 1.25rem; }
  .kamera-dialog .kamera-knoepfe .btn.gross, .kamera-dialog .kamera-wahl { flex: 1 1 40%; min-width: 0; }

}
@media (max-height: 520px) and (orientation: landscape) {
  /* Handy quer: Bild links, Knöpfe rechts */
  .kamera-dialog .kamera { flex-direction: row; gap: 8px; }
  .kamera-dialog .kamera-knoepfe { flex-direction: column; flex-wrap: nowrap; width: 38%; margin-top: 0; justify-content: center; }
  .kamera-dialog .kamera-knoepfe .btn.gross, .kamera-dialog .kamera-wahl { flex: none; width: 100%; }
  .kamera-dialog .kamera-knoepfe .btn.riesig { flex: none; width: 100%; }

}
.rechte-tabelle thead th { vertical-align: top; }
/* Ab 1.357: Kopfzeile mit den Gruppen haftet beim Rollen unter der Kopfleiste (sticky an der Seite, ohne eigenen Rollbereich). */
.rechte-tabelle thead th { position: sticky; top: var(--kopf-hoehe, 60px); z-index: 3; background: var(--karte); box-shadow: 0 1px 0 var(--rand); }
.rechte-tabelle thead th.rt-recht { z-index: 4; }
.rechte-handy { display: none; }
.rh-gruppe { border-top: 1px solid var(--grau-hell); }
.rh-gruppe > summary { cursor: pointer; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 52px; padding: 6px 0; list-style: none; }
.rh-gruppe > summary::-webkit-details-marker { display: none; }
.rh-gruppe > summary::after { --m-ic: var(--m-auf); margin-left: auto; color: var(--gedimmt); }
.rh-gruppe[open] > summary::after { --m-ic: var(--m-zu); }
.rh-gruppe .knopfreihe { margin: 4px 0 8px; }
.rh-recht { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; border-top: 1px dashed var(--grau-hell); cursor: pointer; }
.rh-recht input { flex: none; width: 26px; height: 26px; margin-top: 2px; accent-color: var(--blau); }
.rh-recht span { display: flex; flex-direction: column; min-width: 0; }
.rh-recht small { font-size: .8rem; line-height: 1.3; }
@media (max-width: 600px) {
  .rechte-huelle { display: none; }
  .rechte-handy { display: block; }
}

/* ---------- Meldungen und Glocke (ab 1.8) ---------- */
.glocke > summary { font-size: 1.3rem; min-width: 44px; }
.glocke-liste { width: 380px; padding: 0; gap: 0; color: var(--text); text-align: left; }
.glocke-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--grau-hell); position: sticky; top: 0; background: var(--karte); }
.glocke-kopf a { font-size: .9rem; color: var(--blau); min-height: 32px; display: inline-flex; align-items: center; }
.glocke-eintraege { display: flex; flex-direction: column; gap: 4px; padding: 6px; }
.glocke-leer { padding: 14px 10px; margin: 0; }
.glocke-eintraege .glocke-eintrag { display: flex; flex-direction: column; align-items: stretch; gap: 2px; min-height: 0; padding: 9px 10px 9px 12px; border-radius: var(--ecke-m);
  color: var(--text); text-decoration: none; font-weight: 400; border-left: 4px solid transparent; }
a.glocke-eintrag:hover { background: var(--blau-hell); }
/* ab 1.177: jede Meldung einzeln entfernen, oben „Alle gelesen“ und „Alle entfernen“ */
.glocke-zeile { display: flex; align-items: stretch; gap: 2px; }
.glocke-zeile .glocke-eintrag { flex: 1 1 auto; min-width: 0; }
.ge-weg { flex: none; width: 44px; border: 0; background: transparent; color: var(--gedimmt); border-radius: var(--ecke-m); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.ge-weg:hover { background: var(--blau-hell); color: var(--text); }
.glocke-aktionen { display: flex; gap: 8px; padding: 6px 14px; border-bottom: 1px solid var(--grau-hell); }
.glocke-aktionen[hidden] { display: none; }
.glocke-knopf { border: 0; background: transparent; color: var(--blau); font: inherit; font-size: .9rem; min-height: 36px; padding: 0 8px 0 0; cursor: pointer; }
.glocke-knopf[hidden] { display: none; }
.glocke-eintraege .glocke-eintrag.neu { background: var(--ampel-arbeit-flaeche); border-left-color: var(--gelb); }
.ge-titel { font-weight: 700; overflow-wrap: anywhere; }
.ge-text { font-size: .9rem; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ge-zeit { font-size: .8rem; color: var(--gedimmt); }
.glocke.wackelt > summary { animation: glocke-wackeln .8s ease-in-out 2; }
@keyframes glocke-wackeln { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(14deg); } 40% { transform: rotate(-12deg); } 60% { transform: rotate(8deg); } 80% { transform: rotate(-4deg); } }
@media (prefers-reduced-motion: reduce) { .glocke.wackelt > summary { animation: none; } }
.toast.meldung { background: var(--kopf); }
/* Handy: Liste über die ganze Breite (die Glocke steht nicht ganz rechts) */
@media (max-width: 640px) {
  .glocke-liste { position: fixed; left: 8px; right: 8px; top: calc(var(--kopf-hoehe, 50px) + 4px); width: auto; max-width: none;
    max-height: calc(100vh - var(--kopf-hoehe, 50px) - 16px); max-height: calc(100dvh - var(--kopf-hoehe, 50px) - 16px); }
}
/* Schmales Handy: Zugang steht auch im Menü, so bleibt Platz für den Pfad */
@media (max-width: 400px) { .kopfleiste .konto { display: none; } }
.push-status { font-weight: 700; margin: .4em 0; }
.push-status.an { color: var(--gruen); }
.push-status.nicht { color: var(--gedimmt); }

.mr-ereignis .knopf-wahl span { flex-direction: row; align-items: center; gap: 6px; }

/* ---------- Zuordnung Eintrag × Müllkategorie (ab 1.228, PA2b): Matrix, erste Spalte bleibt beim Wischen stehen ---------- */
.zuordnung-matrix th, .zuordnung-matrix td { vertical-align: middle; }

.zuordnung-matrix .zm-gruppe th { background: var(--grau-hell); text-align: left; text-transform: none; padding-top: 10px; }

.zuordnung-matrix .zm-zelle input { width: 24px; height: 24px; margin: 8px; cursor: pointer; accent-color: var(--blau); }
.zuordnung-matrix .zm-inaktiv th[scope="row"] { font-weight: 400; color: var(--gedimmt); }

/* ---------- Datenexport (ab 1.10) ---------- */
.datenexport .ampel-pille { margin: 0 0 6px; }

.gl-meilensteine > li { padding: 6px 0; border-top: 1px solid var(--grau-hell); overflow-wrap: anywhere; }
.gl-meilensteine ul { list-style: none; margin: 2px 0 0 28px; padding: 0; }

/* Ab 1.80: Seite Lückenprüfung (pruefung.php), gedruckt = Prüfbericht */

.gl-luecken > li { padding: 8px 0; border-top: 1px solid var(--grau-hell); overflow-wrap: anywhere; }

.gl-zeile > .btn, .gl-zeile > form { flex: none; white-space: nowrap; }

.gl-ne summary, .gl-gruppe summary { cursor: pointer; }
.gl-ne summary { color: var(--text-zweit); }

.gl-ne form { display: grid; gap: 6px; margin-top: 6px; }

/* ab 1.193 (MN2): Begründung je Abweichung im Prüfbericht */

.dx-sn ul { list-style: none; margin: 0; padding: 0; min-width: 0; overflow-wrap: anywhere; }
.dx-sn li { padding: 1px 0; }

.dx-nicht > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--gedimmt); list-style: none; }
.dx-nicht > summary::-webkit-details-marker { display: none; }

.dx-marken a { text-decoration: none; }

.dx-csv a { min-height: 44px; display: inline-flex; align-items: center; }

/* ---------- Änderungsverlauf (ab 1.11) ---------- */
.verlauf-liste { list-style: none; margin: 8px 0 0; padding: 0; }
.verlauf-liste li { padding: 8px 0; border-top: 1px solid var(--grau-hell); }
.verlauf-kopf { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: .85rem; color: var(--gedimmt); }

.verlauf-text { overflow-wrap: anywhere; }

/* ---------- Jahresvergleich (ab 1.11) ---------- */
.vg-wahl > summary { cursor: pointer; min-height: 44px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.vg-liste { list-style: none; margin: 8px 0; padding: 0; }
.vg-projekt { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; min-height: 44px; cursor: pointer; }
.vg-projekt input { width: 22px; height: 22px; margin-top: 2px; flex: none; }
.vg-tabelle th[scope=row] { font-weight: 400; color: var(--text); background: none; font-size: 1rem; }

@media (max-width: 600px) {
  .tabelle.vg-tabelle th, .tabelle.vg-tabelle td { padding: 6px 4px; }

  .vg-tabelle th[scope=row] { font-size: .9rem; hyphens: auto; -webkit-hyphens: auto; }

}

/* ---------- Auswertung mit Diagrammen (ab 1.214, AB1). SVG vom Server, Farben je Fraktion fest im Diagramm ---------- */

.aw-art small.chip { font-size: var(--gr-fuss); padding: 0 6px; margin-left: 2px; }
.aw-art-bild { flex: none; width: 30px; height: 26px; position: relative; }
.aw-art-balken { background: linear-gradient(var(--kat-1), var(--kat-1)) 0 2px / 90% 6px no-repeat, linear-gradient(var(--kat-2), var(--kat-2)) 0 10px / 62% 6px no-repeat, linear-gradient(var(--kat-3), var(--kat-3)) 0 18px / 38% 6px no-repeat; }
.aw-art-gestapelt { background: linear-gradient(90deg, var(--kat-1) 0 45%, var(--kat-2) 45% 75%, var(--kat-3) 75%) 0 3px / 100% 8px no-repeat, linear-gradient(90deg, var(--kat-1) 0 30%, var(--kat-2) 30% 70%, var(--kat-3) 70%) 0 15px / 100% 8px no-repeat; }
.aw-art-ring { border-radius: 50%; width: 26px; background: conic-gradient(var(--kat-1) 0 45%, var(--kat-2) 45% 72%, var(--kat-3) 72% 88%, var(--kat-4) 88%); -webkit-mask: radial-gradient(circle, transparent 6px, #000 7px); mask: radial-gradient(circle, transparent 6px, #000 7px); }
.aw-art-woerter::before { content: "Aa"; position: absolute; inset: 0; font-size: 1.1rem; font-weight: 800; color: var(--kat-4); line-height: 26px; }
.aw-art-woerter::after { content: "a"; position: absolute; right: 0; top: -2px; font-size: var(--gr-fuss); color: var(--kat-3); }
/* Ab 1.219: Beziehungswolke (Netz) und Mengendiagramm (Venn) */
.aw-art-wolke { background: radial-gradient(circle at 7px 8px, var(--kat-1) 5px, transparent 5.5px), radial-gradient(circle at 22px 7px, var(--kat-2) 4px, transparent 4.5px),
  radial-gradient(circle at 17px 20px, var(--kat-3) 6px, transparent 6.5px), linear-gradient(35deg, transparent 48%, var(--ink-400) 48% 54%, transparent 54%); }
.aw-art-mengen::before, .aw-art-mengen::after { content: ""; position: absolute; top: 4px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--kat-1); background: color-mix(in srgb, var(--kat-1) 20%, transparent); }
.aw-art-mengen::before { left: 0; }
.aw-art-mengen::after { right: 0; border-color: var(--kat-2); background: color-mix(in srgb, var(--kat-2) 20%, transparent); }

.aw-mengen-wahl > summary { display: inline-flex; list-style: none; }
.aw-mengen-wahl > summary::-webkit-details-marker { display: none; }
.aw-mengen-wahl form { margin-top: 10px; }

.aw-menge input { width: 22px; height: 22px; margin: 0; }

.aw-was .feld { margin-bottom: 8px; min-width: 160px; }

.aw-kopf strong { font-size: 1.5rem; line-height: 1.2; }
.aw-kopf span { color: var(--gedimmt); }

@media (max-width: 600px) {   .aw-kopf strong { font-size: 1.25rem; } }

.aw-tabelle th[scope=row] { font-weight: 600; color: var(--text); background: none; font-size: 1rem; text-transform: none; letter-spacing: 0; }

/* Ab 1.377 (SA5): Gesamtspalte eines Projekts (nach Masse) */
.aw-tabelle .aw-gesamt, .vg-tabelle .aw-gesamt { font-weight: 700; border-left: 2px solid var(--linie, currentColor); }
/* Ab 1.225 (AB6): Pivot-Tabelle, erste Spalte bleibt beim Wischen stehen */

.pv-tabelle th[scope=row] { position: sticky; left: 0; z-index: 1; background: var(--karte); font-weight: 600; text-transform: none; letter-spacing: 0; font-size: 1rem; }

.pv-tabelle .pv-summe, .pv-tabelle tr.pv-summe th, .pv-tabelle tr.pv-summe td { font-weight: 700; background: var(--blau-hell); }

.pv-tabelle thead th:first-child, .pv-tabelle th[scope=row] { min-width: 9em; }

   /* ab 1.298: Leiste unter jeder Ansicht */
.aw-aktionen .btn { min-height: 44px; }
   /* Diagramm: Bild, Bericht, Ansicht speichern in einer Reihe */

.aw-bericht > summary { display: inline-flex; list-style: none; }
.aw-bericht > summary::-webkit-details-marker { display: none; }
.aw-bericht form { margin-top: 10px; max-width: 640px; }

.aw-bericht input[type=text], .aw-bericht textarea { width: 100%; }

.aw-gemerkt-weg .btn { padding: 2px 6px; min-height: 0; }

.aw-abschnitt-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; margin-top: 10px; }
.aw-abschnitt-knoepfe form { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }

/* ---------- Baukasten und Sichtbarkeit im Projektformular (ab 1.12) ---------- */
.bk-details { border: 1px solid var(--rand); border-radius: var(--ecke-m); padding: 0 12px; margin: 12px 0; }
.bk-details > summary { cursor: pointer; min-height: 48px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.bk-details[open] > summary { border-bottom: 1px solid var(--grau-hell); margin-bottom: 8px; }
.bk-gruppe { border: none; margin: 0 0 12px; padding: 0; min-width: 0; }
.bk-kopf { display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap; }
.bk-kopf strong { margin-right: auto; }
.bk-liste .schalter { font-weight: 400; min-height: 44px; }
.bk-liste .schalter small { color: var(--gedimmt); }
.bk-liste .schalter.gedimmt { color: var(--gedimmt); }
.bk-typ { margin: 4px 0 8px; }
.bk-typ-name { display: block; font-size: .85rem; color: var(--gedimmt); text-transform: uppercase; letter-spacing: .03em; }
.auftraggeber { color: var(--gedimmt); }
/* Ab 1.154: Fraktionen und Erfassung je Projekt (PJ8); abweichende Zeilen orange markiert */
.fe-zeile { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; padding: 6px 8px; border-left: 4px solid transparent; border-bottom: 1px solid var(--grau-hell); }
.fe-zeile.abweichung { border-left-color: var(--orange); background: var(--orange-hell); }
.fe-name { display: flex; flex-direction: column; flex: 1 1 180px; min-width: 0; overflow-wrap: anywhere; }
.fe-werte { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; flex: 3 1 300px; }
.fe-werte .schalter { font-weight: 400; min-height: 44px; }
.fe-foto { display: inline-flex; align-items: center; gap: 6px; }
.fe-foto select { min-height: 44px; }
.fe-merkmal { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; } /* ab 1.162: Merkmal mit Stichprobe */
.fe-stichprobe { display: inline-flex; align-items: center; gap: 4px; }
.fe-stichprobe select { min-height: 44px; max-width: 14em; }
.fe-wert { width: 5.5em; min-height: 44px; }

/* ---------------- 1.14: Bereichsleiste (Sortierliste · Soll/Ist · Eingang), Soll/Ist-Blatt, Bruttowägung im WE ---------------- */
.bereich-leiste { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.bl-segmente { display: flex; flex: 1 1 auto; min-width: 0; background: var(--grau-hell); border-radius: var(--ecke-pille); padding: 3px; gap: 3px; }
.bl-seg { flex: 1 1 0; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 10px;
  border-radius: var(--ecke-pille); text-decoration: none; color: var(--text); font-weight: 700; white-space: nowrap; overflow: hidden; }
.bl-seg:hover { background: rgba(255,255,255,.6); }
.bl-seg.aktiv { background: var(--blau); color: var(--auf-tinte); }
.bl-sym { font-size: 1.05rem; line-height: 1; }
.bl-kurz { display: none; }
.bl-soll, .bl-neu { flex: none; min-height: 50px; border-radius: var(--ecke-pille); padding: 0 14px; gap: 6px; font-weight: 800; }
.bl-soll .ampel { width: 14px; height: 14px; }

@media (max-width: 760px) {
  .bl-lang { display: none; }
  .bl-kurz { display: inline; }
}
@media (max-width: 600px) {
  /* Handy: nur Symbole, der aktuelle Bereich mit Kurznamen */
  .bereich-leiste { gap: 5px; }
  .bl-seg { padding: 0 6px; }
  .bl-seg:not(.aktiv) .bl-kurz { display: none; }
  .bl-seg:not(.aktiv) { flex: 0 0 48px; }

}

/* Meilenstein-Leiste (ab 1.86, Stufe S7) unter der Bereichsleiste: Punkte mit Linie, Name und „erreicht am …“.
   Am Handy nur die Punkte, der nächste offene Meilenstein mit Namen; darunter immer „n von m erreicht · Nächster …“. */

.ms-leiste .ms { flex: 1 1 0; min-width: 0; position: relative; }

.ms-leiste .ms > a, .ms-leiste .ms > span[title] { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 2px;
  text-align: center; color: inherit; text-decoration: none; border-radius: var(--ecke-m); min-height: 44px; }

.pk-verzug a { color: inherit; }

.si-ort-titel .ampel { width: 14px; height: 14px; }

.si-zeile .ampel { width: 14px; height: 14px; }

.si-ist small { color: var(--orange); font-weight: 700; font-size: .8rem; }

@media (max-width: 420px) {

  .si-fuss .btn { flex: 1 1 auto; }
}

/* ---- 1.15: Sortierung am Handy ---------------------------------------- */
/* Lang-/Kurzform: Am Handy nur die Kurzform (weniger Text, mehr Symbole) */
.t-kurz { display: none; }
@media (max-width: 600px) {
  .t-lang { display: none; }
  .t-kurz { display: inline; }
}

/* Zeiten korrigieren: eine Zeile je Zeit (Art, Datum/Uhrzeit, Löschen) */

.zeit-zeile .zeit-feld { flex: 1 1 auto; min-width: 0; min-height: 48px; font-size: 1rem; }
.zeit-zeile .zeit-weg { flex: none; }

.foto-datei { margin: 6px 0 0; word-break: break-all; }

/* Kurzleiste am Handy: Zeit in einer Zeile, Fortschritt überlappt nichts */

.kl-schritte .schritte { min-width: 0; overflow: hidden; }

/* Kennzahlen im Kopf (Netto, Σ, Abweichung): am Handy kompakt in einer Reihe */
@media (max-width: 600px) {

  .kennzahl { padding: 6px 8px; }
  .kennzahl > span { font-size: var(--gr-fuss); }
  .kennzahl strong { font-size: 1.05rem; }
  .kennzahl strong.plausi { font-size: .85rem; padding: 1px 6px; white-space: nowrap; display: inline-flex; gap: 3px; align-items: center; }

}

/* Knöpfe der Fraktion nebeneinander statt untereinander */
@media (max-width: 600px) {

  .fraktion-status .btn { flex: 1 1 40%; min-width: 0; padding-left: 8px; padding-right: 8px; }
  .fraktion-status .btn[aria-label="Wieder öffnen"] { flex: 0 0 56px; }
  .fraktion-status .weiter { margin-left: 0; flex: 1 1 60%; }
  .unterblock > .btn.riesig { min-height: 56px; padding: 8px 14px; font-size: 1.1rem; }
}

/* ---------- Such- und Filtermuster (ab 1.16, filter.js): überall gleich ---------- */
.fl { margin-bottom: 14px; }
.fl-zeile { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
/* Suchfeld nimmt den Platz; weitere Knöpfe (z. B. „Alle“) rutschen am Handy in eine zweite Zeile */
.fl-suche { flex: 1 1 190px; min-width: 0; margin: 0; display: block; }
.fl-suche label { display: block; margin: 0; }
.fl-feld { width: 100%; min-height: 52px; font-size: 1.05rem; padding: 0 14px; border-radius: var(--ecke-l); }
.fl-zeile > .btn { min-height: 52px; flex: none; }

.fl-knopf { display: inline-flex; align-items: center; gap: 6px; padding: 0 16px; font-weight: 700; }
.fl-knopf.an { background: var(--blau-hell); border-color: var(--blau); color: var(--blau); }
.fl-knopf .badge { margin-left: 2px; background: var(--blau); color: var(--auf-tinte); min-width: 22px; text-align: center; }
.ico-filter {
  display: inline-block; width: 1.15em; height: 1.15em; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 4h18l-7 8.5V19l-4 2v-8.5z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 4h18l-7 8.5V19l-4 2v-8.5z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.fl-aktiv { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fl-chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 6px 0 14px; border-radius: var(--ecke-pille);
  border: 2px solid var(--blau); background: var(--blau-hell); color: var(--blau); font: inherit; font-size: .92rem; font-weight: 700;
  text-decoration: none; cursor: pointer; max-width: 100%;
}
.fl-chip .fl-x { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--karte); font-size: .8rem; }
.fl-chip.fl-c-gruppe, .fl-chip.fl-c-sortierung { border-style: dashed; background: var(--karte); }
.fl-chip.fl-alle { border-color: var(--rand); background: var(--karte); color: var(--gedimmt); padding-right: 14px; }
/* Pop-up: große Symbol-Kacheln je Gruppe, antippen = wählen, nochmal = aufheben */
.dialog.fl-tafel { max-width: 640px; }
.fl-tafel .dialog-rumpf { padding-top: 4px; }
.fl-gruppe { margin: 0 0 14px; }
.fl-g-titel { margin: 0 0 8px; font-size: 1rem; }
.fl-trenner { border-top: 1px dashed var(--rand); margin: 4px 0 12px; }
.fl-kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.fl-kachel {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 72px; padding: 8px 6px; border-radius: var(--ecke-l); border: 2px solid var(--rand); background: var(--karte);
  font: inherit; font-size: .9rem; font-weight: 700; color: var(--text); cursor: pointer; text-align: center; line-height: 1.15;
}
.fl-kachel .fl-k-sym { font-size: 1.35rem; line-height: 1; }
.fl-kachel .fl-k-text { overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; max-width: 100%; }
.fl-kachel .fl-k-n { position: absolute; top: 4px; right: 6px; font-size: var(--gr-fuss); color: var(--gedimmt); font-weight: 700; }
.fl-kachel.aktiv { border-color: var(--blau); background: var(--blau); color: var(--auf-tinte); box-shadow: 0 0 0 3px var(--fokus); }
.fl-kachel.aktiv .fl-k-n { color: var(--auf-tinte); opacity: .8; }
.fl-kachel.leer { opacity: .5; }
.fl-kachel.f-grau:not(.aktiv) { border-left: 6px solid var(--grau); }
.fl-kachel.f-orange:not(.aktiv) { border-left: 6px solid var(--orange); }
.fl-kachel.f-gruen:not(.aktiv) { border-left: 6px solid var(--gruen); }
.fl-kachel.f-rot:not(.aktiv) { border-left: 6px solid var(--rot); }
.fl-kachel.f-blau:not(.aktiv) { border-left: 6px solid var(--info); }
.fl-kachel.f-typ-g:not(.aktiv) { background: var(--gibo-hell); color: var(--blau); }
.fl-kachel.f-typ-r:not(.aktiv) { background: var(--rupa-hell); color: var(--rupa); }
.fl-kachel.f-we-angemeldet:not(.aktiv) { border-color: var(--we-angemeldet); }
.fl-kachel.f-we-angenommen:not(.aktiv) { border-color: var(--we-angenommen); }
.fl-kachel.f-we-puffer:not(.aktiv) { border-color: var(--we-puffer); border-style: dashed; }
.fl-kachel.f-we-fehlt:not(.aktiv) { border-color: var(--we-fehlt); }
.fl-kachel.f-we-freigegeben:not(.aktiv) { border-color: var(--we-freigegeben); }
@media (max-width: 600px) {
  .fl-zeile { gap: 6px; }
  .fl-knopf { padding: 0 12px; min-width: 52px; justify-content: center; }
  .fl-knopf .kn-text { display: none; }
  .fl-kacheln { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .fl-kachel { min-height: 64px; font-size: .82rem; padding: 6px 4px; }
  .fl-kachel .fl-k-sym { font-size: 1.2rem; }
  /* Pop-up am Handy: Blatt von unten, Daumen erreicht alles; oben bleibt die Liste sichtbar */
  .dialog-huelle.mit-fl-tafel { align-items: flex-end; padding: 0; }
  .dialog.fl-tafel { max-height: 85vh; max-height: 85dvh; border-radius: var(--ecke-l) var(--ecke-l) 0 0; }
  .dialog.fl-tafel .dialog-fuss { padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0px)); }
  .dialog.fl-tafel .dialog-fuss .btn { flex: 1 1 0; }
  .dialog.fl-tafel .dialog-rumpf { padding: 4px 12px 8px; }
}

/* ---------- Kennzahl Lampen pro kg (ab 1.16): nur ein Hinweis, nie rot ---------- */

.lkg-zeile strong { font-size: 1.2rem; }

@media (max-width: 600px) {

  .lkg-zeile strong { font-size: 1.05rem; }

}
/* Soll/Ist (ab 1.16): Felder außerhalb des Filters blass, Suchtreffer als Liste über der Tabelle */

.pu-treffer { padding: 10px 12px; }

.pu-treffer-zeile .abgeschnitten { flex: 1 1 auto; min-width: 0; }

/* ---------- QR-Scan (ab 1.17): Knopf in der Kopfleiste, Scan-Fenster, gescannter Behälter ---------- */
.kopf-scan {
  flex: none; min-width: 44px; min-height: 44px; border: 0; border-radius: var(--ecke-m); background: transparent; color: var(--auf-farbe);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
}

.scan { display: flex; flex-direction: column; gap: 10px; }

.scan-status.warn { color: var(--ampel-arbeit-text); }
.scan-status.ok { color: var(--ampel-fertig-text); }

.scan-eingabe .scan-feld { flex: 1; min-width: 0; font-size: 1.1rem; min-height: 46px; }
.scan-eingabe .btn { min-width: 56px; font-size: 1.3rem; }
.dialog.scan-dialog { max-width: 560px; }

/* ---- Ab 1.19: E-Mail, Passwort vergessen, Zustimmung, Geräte, Rechtstexte ---- */
.meldung.ok { background: var(--ampel-fertig-flaeche); color: var(--ampel-fertig-text); border: 1px solid var(--fertig-rand); }
.hinweis-pille.gruen { background: var(--ampel-fertig-flaeche); color: var(--ampel-fertig-text); }
.hinweis-pille:not(.rot):not(.orange):not(.gruen):not(.blau) { background: var(--grau-hell); color: var(--text); }
.rechtliche-links { text-align: center; margin: 12px 16px 24px; }
.login-seite .rechtliche-links, .login-seite .rechtliche-links a { color: var(--auf-farbe); }
.login-seite .rechtliche-links a { text-decoration: underline; }
.rechtstext { overflow-wrap: anywhere; }
.rechtstext h2 { font-size: 1.05rem; margin: 18px 0 6px; }
.rechtstext p, .rechtstext li { line-height: 1.5; }
.rt-luecke { background: var(--ampel-arbeit-flaeche); color: var(--ampel-arbeit-text); padding: 0 4px; border-radius: var(--ecke-s); }
.rechtstext .kontaktformular { border-top: 1px solid var(--rand); margin-top: 16px; padding-top: 4px; }
.rechtstext .kontaktformular textarea { width: 100%; min-height: 140px; resize: vertical; }
.rechtstext .kontaktformular .haken-zeile { align-items: flex-start; min-height: 0; }
.rechtstext .kontaktformular .haken-zeile input { width: 24px; height: 24px; margin-top: 2px; }
.honig { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.rechtstext-auf { border: 1px solid var(--rand); border-radius: var(--ecke-m); padding: 0 12px; margin: 10px 0; }
.rechtstext-auf summary { min-height: 48px; display: flex; align-items: center; cursor: pointer; font-weight: 700; }
.rechtstext-auf .rechtstext { max-height: 50vh; overflow: auto; padding-bottom: 10px; }
.zustimmung-seite details.karte > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.geraete-liste { list-style: none; margin: 6px 0; padding: 0; }
.geraete-liste li { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 6px 0; border-top: 1px solid var(--rand); }
.geraete-liste li:first-child { border-top: 0; }
.geraete-liste form { margin: 0; }
.karte.hervorgehoben { border: 2px solid var(--blau); }
.konto-seite .email-aendern { margin-top: 8px; }

/* Startseite Projekte (ab 1.24, 1.26): Die Suche füllt die Zeile bis nach rechts, der Filter ganz außen („Neues Projekt“ ab 1.212 im Seitenkopf) */
.fl[data-fl="fl-projekte-daten"] .fl-suche { flex: 1 1 240px; order: 1; }
.fl[data-fl="fl-projekte-daten"] .ansicht-menue { order: 3; }   /* ab 1.186.1: Darstellung zwischen Suche und Filter */
.fl[data-fl="fl-projekte-daten"] .fl-knopf { order: 4; }

/* Projektseite am Handy (ab 1.25, nach Patricks Skizze): Proben und Logistik als zwei gleich große Kacheln nebeneinander,
   darunter fünf kleine quadratische Status-Kacheln in einer Reihe (blau, grau, orange, grün, rot) mit Zahl und Symbol */

.pk-bereiche .proben-zeile { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-content: start; gap: 4px 8px; min-height: 0; padding: 8px 10px; }
.pk-bereiche .proben-zeile > * { grid-column: 1 / -1; min-width: 0; }

@media (max-width: 700px) {

  .pk-bereiche .pz-info, .pk-bereiche .pz-fehlt { font-size: .78rem; line-height: 1.25; }

  .status-zaehler strong { font-size: 1.35rem; }

  .status-zaehler .sz-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

}

/* ---------- 1.26: Kopfleiste mit „Projekte“, Projektkopf einklappbar, Tagesablauf im Kopf ---------- */
/* Logo = Link zu den Projekten; am PC mit Appname, am Handy nur das Logo */
.kopfleiste .logo { width: auto; padding: 0 8px; gap: 8px; color: var(--auf-farbe); text-decoration: none; }
.logo-name { font-weight: 800; font-size: 1.05rem; white-space: nowrap; flex: none; }
@media (max-width: 640px) { .logo-name { display: none; } .kopfleiste .logo { width: 40px; padding: 0; } }
/* Auf der Seite „Projekte“ selbst genügt der Hinweis „aktuell“ im Menü, der Pfad zeigt dieselbe Seite */
/* ab 1.35.1: auch Dispo und Meine Zeit ohne sichtbaren Seitentitel (er steht in der Kopfleiste), nur für Vorlesehilfen */
.seite-projekte-titel, .titel-nur-vorlesen { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }
.pk-umschalter { flex: none; min-width: 44px; min-height: 44px; font-size: 1.1rem; }

.projekt-kopf .tagesablauf { margin-top: 12px; padding: 10px 0 0; border-top: 1px solid var(--rand); overflow-x: auto; }

.projekt-kopf.zu .status-leiste { margin-top: 8px; }
/* Lampen/kg-Hinweis steht in der Legende (Hilfe) */

.lg-lkg-tabelle th { color: var(--gedimmt); font-weight: 600; font-size: .9rem; }

/* ---------- 1.29: Projektkopf am Handy, Tagesablauf als Kurzübersicht, „Läuft gerade“ einheitlich ---------- */
/* Titel behält immer eine Zeile für sich (Knöpfe rechts daneben), Ampel und Hinweise darunter; nie Buchstabe für Buchstabe */
.projekt-kopf .pk-kopf .pk-titel { min-width: min(100%, 10em); overflow-wrap: break-word; word-break: normal; hyphens: auto; }
@media (max-width: 640px) {
  .projekt-kopf .pk-kopf .pk-titel { flex: 1 1 calc(100% - 116px); min-width: 0; }

}

.ta-kurz-zeile.heute { font-weight: 700; }

.ta-titel { margin: 0 0 8px; font-size: 1.3rem; }
.ta-titel .gedimmt { font-size: .95rem; font-weight: 500; }

/* „Läuft gerade“: alle Kacheln gleich groß, gleiches Aussehen (Name und Uhr oben, ein Wechselschalter unten) */

.laeuft-raster .laeuft-eintrag { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 8px; width: auto; max-width: none; padding: 8px 10px; min-height: 104px; }
.laeuft-raster .le-name { min-width: 0; }

.laeuft-raster .le-knopf { grid-column: 1 / -1; width: 100%; min-height: 48px; justify-content: center; }

@media (max-width: 640px) {
  .projekt-kopf .pk-kopf .pk-titel { flex: 1 1 calc(100% - 130px); min-width: 0; font-size: 1.3rem; }

}
/* ---------- Arbeitszeit, Meine Zeit, Einsatzplanung (ab 1.28) ---------- */
/* Uhr in der Kopfleiste: grau = aus, grün = läuft, gelb = Pause. Mit Zeit nur, solange etwas läuft. */
.zeit-knopf > summary { font-size: 1.25rem; min-width: 44px; padding: 0 6px; gap: 4px; }

.zeit-knopf.zk-laeuft > summary { background: var(--gruen); opacity: 1; }
.zeit-knopf.zk-pause > summary { background: var(--gelb); color: var(--ampel-arbeit-text); opacity: 1; }
.zeit-knopf.zk-nein { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border-radius: var(--ecke-m); font-size: 1.25rem; color: var(--auf-farbe); text-decoration: none; opacity: .4; filter: grayscale(1); }

 /* 1.412: ohne Abdunkeln, sonst wird der Fokusring grau */

.zeit-liste { width: 330px; gap: 8px; padding: 12px; color: var(--text); }

.zk-knoepfe .btn { flex: 1; }
.zk-vorschlag { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: var(--ecke-m); background: var(--ampel-arbeit-flaeche); font-size: .9rem; }
.zk-vorschlag .btn { min-height: 40px; padding: 4px 10px; flex: none; }
a.zk-pruefen { color: var(--ampel-arbeit-text); text-decoration: none; font-weight: 600; min-height: 40px; }

.nav-menue-liste .zk-fuss a, .nav-menue-liste a.zk-link, .nav-menue-liste a.zk-pruefen { min-height: 36px; padding: 0 4px; font-weight: 600; }
@media (max-width: 640px) {
  .zeit-liste { position: fixed; left: 8px; right: 8px; top: calc(var(--kopf-hoehe, 50px) + 4px); width: auto; max-width: none; }
}
/* Schmales Handy: nur das Symbol (Farbe zeigt läuft/Pause) */

.zeiten-seite .btn.klein, .einsatz-seite .btn.klein, .zeit-liste .btn.klein, .schicht-dialog .btn.klein { min-height: 40px; min-width: 40px; padding: 4px 10px; font-size: .9rem; }

.woche-nav .btn { min-width: 48px; padding: 0 12px; font-size: 1.3rem; }

.schicht-karte.heute { border-left-color: var(--blau); background: var(--blau-hell); }
.schicht-karte.jetzt { border-left-color: var(--gruen); background: var(--gruen-hell); }

.sk-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }

@media (max-width: 520px) {

  .schicht-karte .sk-text { grid-column: 1 / -1; }
}

.zeit-eintrag.pruefen { background: var(--orange-hell); }

.zeit-eintrag .btn { grid-row: 1 / span 2; grid-column: 4; }

/* Einsatzplanung */
.einsatz-nav .einsatz-projekt { margin-left: auto; min-width: 200px; flex: 0 1 320px; }

.einsatz-tage .karte { margin: 0; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.einsatz-tag.heute { border-color: var(--blau); box-shadow: 0 0 0 2px var(--blau-hell); }

.person-chip.doppelt { background: var(--rot-hell); border-color: var(--rot); color: var(--ampel-problem-text); font-weight: 700; }

.person-zeile input { width: 24px; height: 24px; flex: none; }
.person-zeile .pz-name { font-weight: 600; flex: 1; min-width: 0; overflow-wrap: anywhere; }

.person-zeile.belegt { border-color: var(--orange); background: var(--orange-hell); }
.person-zeile:has(input:checked) { border-color: var(--blau); background: var(--blau-hell); }

/* Stammdaten → Müllkategorien (ab 1.104) */
.mk-kategorie { border-top: 1px solid var(--grau-hell); padding: 12px 0 4px; }
/* Ab 1.113: eine Müllkategorie zur Zeit (Wahl oben), darin Fraktionen / Merkmale / Unterweisung / Übersicht */

.mk-kopf + .mk-teile { margin-top: 12px; }
.mk-teile { margin: 10px 0 0; }
[data-mk-seite] { border-top: 0; }

/* Ab 1.105: Fraktionen und Merkmale je Müllkategorie (Stammdaten) und Merkmale beim Sortieren */

.mk-fraktion > summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-height: 36px; }
.mk-fraktion[open] > summary { margin-bottom: 6px; }

.merkmale .feld.merkmal { margin-top: 8px; }

.merkmale .knopfgruppe .btn { min-height: 44px; }

.baustein-zeile .pz-name small { display: block; font-weight: 400; }

.feld-zeile input { width: 22px; height: 22px; }
/* Teilproben des Projekts (ab 1.107): Behältertyp links, Anzahl rechts; darunter gewogen oder rechnerisch */

.tp-zeile .tp-name { flex: 1; min-width: 0; }

.tp-art input { width: 22px; height: 22px; flex: none; margin-top: 2px; }

/* Dispo-Status je Person (ab 1.75) */
.person-chip .ic { width: 1em; height: 1em; vertical-align: -0.12em; }

.person-zeile .pz-wahl { display: flex; align-items: center; gap: 10px; flex: 1 1 100%; min-width: 0; cursor: pointer; min-height: 40px; }

.schicht-karte .sk-antwort { display: flex; gap: 6px; flex-wrap: wrap; grid-column: 1 / -1; }
.klein-knoepfe { margin: -6px 0 12px; gap: 6px; }

.tabelle-huelle { overflow-x: auto; }
.einsatz-stunden td:first-child { white-space: nowrap; }
@media (max-width: 640px) {
  .einsatz-stunden th, .einsatz-stunden td { padding: 8px 5px; font-size: .9rem; }

}

/* ---------- Dispo: Kalkulation, Rest, Planvorschlag, Kosten (ab 1.35) ---------- */
.dispo-kalk, .kosten-karte { border-left: 6px solid var(--grau-hell); }
.dispo-kalk.a-gruen { border-left-color: var(--gruen); }
.dispo-kalk.a-gelb { border-left-color: var(--orange); }

.dp-kopf a { color: inherit; }
.dp-kopf .ampel { width: 14px; height: 14px; border-radius: 50%; background: var(--ampel-offen); --am-maske: var(--m-offen); flex: none; }

.dp-wert { display: block; font-size: 1.3rem; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.dispo-kalk .knopfzeile { margin-top: 10px; }

@media (max-width: 480px) {
  .dp-wert { font-size: 1.05rem; }

}

.kalk-tabelle td { vertical-align: middle; }
.kalk-faktor { margin: 10px 0 4px; }

.satz-liste li { display: flex; align-items: center; gap: 8px 12px; padding: 6px 0; border-bottom: 1px solid var(--grau-hell); flex-wrap: wrap; }

.satz-zeile input, .satz-zeile select { min-height: 44px; }

.kalk-liste li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--grau-hell); }

.kalk-liste .btn { grid-column: 2; grid-row: 1 / span 3; }

/* ===== 1.33: Aufklappbares sichtbar machen, Zeitfenster als Streifen ===== */

/* Kopfzeile eines aufklappbaren Fensters: leicht getönt, Zeiger, Pfeil rechts */
.aufklappbar > summary, .au-kopf, .alter-fraktion > summary { cursor: pointer; }
.aufklappbar { border: 1.5px solid var(--info-rand); border-radius: var(--ecke-l); background: var(--karte); padding: 0 10px 8px; margin-top: 8px; }
.aufklappbar > summary { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; min-height: 48px; list-style: none; font-weight: 700; }
.aufklappbar > summary::-webkit-details-marker { display: none; }
.aufklappbar > summary .ak-pfeil { margin-left: auto; }
.aufklappbar[open] > summary { margin-bottom: 6px; }
.tagesablauf.aufklappbar > summary { background: var(--info-flaeche); margin: 0 -10px; padding: 0 10px; border-radius: var(--ecke-m); }
.tagesablauf.aufklappbar[open] > summary { border-radius: var(--ecke-m) 10px 0 0; }
.tagesablauf .ak-info { font-weight: 500; font-size: .92rem; }
/* Altersbestimmung (Übersicht je Hälfte und in der Fraktion): getönter Kopf mit rundem Pfeil */

.alter-uebersicht { border: 1.5px solid var(--info-rand); border-left-width: 6px; }

.alter-fraktion > summary { background: var(--info-flaeche); margin: 0 -10px; padding: 0 10px; border-radius: var(--ecke-m); }

.alter-fraktion > summary .af-pfeil { margin-left: auto; }

/* Zeitfenster im Auftrag: niedriger Streifen, Einzelheiten per Tipp */
.zeit-panel.streifen { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; min-height: 0; padding: 4px 8px 4px 12px; gap: 4px 12px; align-items: center; }

.zeit-panel.streifen .btn.riesig { min-height: 56px; padding: 8px 20px; font-size: 1.15rem; }

.zeit-panel.streifen .zp-detail { display: none; grid-column: 1 / -1; grid-row: 2; margin: 0 0 4px; }

.zeit-panel.streifen .ak-chip { margin-left: 0; }

.ta-titel { font-size: .95rem; font-weight: 500; margin: 0 0 8px; }

@media (max-width: 700px) {
  .s-kopf .s-name { flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; }
  .s-kopf .ak-pfeil { width: 28px; height: 28px; }
  .au-kopf .au-titel { flex: 1 1 0; min-width: 0; }

  .alter-fraktion > summary .af-stand { order: 3; flex-basis: 100%; }

  .alter-fraktion > summary .af-pfeil { order: 2; }
}
.aufklappbar > summary .ak-titel { flex: 1 1 0; min-width: 0; }
.aufklappbar > summary .ak-pfeil { order: 2; }
.aufklappbar > summary .ak-info { order: 3; flex-basis: 100%; }

/* ---------------- Ab 1.34: Probleme sperren ihren Arbeitsschritt, Haken „sortiert“ ---------------- */

.chip.problem-schritt.gesperrt { background: var(--rot-hell); color: var(--ampel-problem-text); }
.sperr-hinweis-h.problem, .haelfte-bereich.zwei > .haelfte-kopf .sperr-hinweis-h.problem { background: var(--rot-hell); color: var(--ampel-problem-text); }
.schritt.waegung.mit-problem { border-color: var(--rot); }

.schritt.waegung .s-titel .sortier-hinweis { color: var(--ampel-arbeit-text); font-weight: 700; }

.hinweise.problem { color: var(--ampel-problem-text); font-weight: 700; }
/* Melden: Arbeitsschritt als große Kacheln */
.schritt-kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.schritt-kachel { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: var(--tippziel); padding: 8px 6px; border: 2px solid var(--rand); border-radius: var(--ecke-m); background: var(--karte); font: inherit; font-weight: 700; color: var(--text); cursor: pointer; }
.schritt-kachel .sk-symbol { font-size: 1.3rem; line-height: 1; }
.schritt-kachel.gewaehlt { border-color: var(--rot); background: var(--rot-hell); color: var(--ampel-problem-text); box-shadow: 0 0 0 2px var(--rot) inset; }
.problem-melden .feld + .feld { margin-top: 12px; }
/* Haken „sortiert“ links an jeder Fraktion: groß genug für den Daumen */
.schritt.kat.mit-haken { display: grid; grid-template-columns: auto minmax(0, 1fr); }
.schritt.kat.mit-haken.mit-leer { grid-template-columns: auto minmax(0, 1fr) auto; }

.schritt.kat.mit-haken > .s-inhalt { grid-column: 1 / -1; }

.sortiert-haken .sh-kasten { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 3px solid var(--grau); border-radius: var(--ecke-m); background: var(--karte); font-size: 1.4rem; font-weight: 900; line-height: 1; color: var(--auf-farbe); }

/* Stand in der Hälfte: „Sortiert 5/8“ + „Alle sortiert“ */

.sortiert-stand .ss-alle { min-height: 48px; padding: 6px 16px; font-size: 1rem; }

.sortier-hinweis-box .btn { min-height: 48px; }
@media (max-width: 700px) {
  .schritt.waegung .s-titel small.problem-hinweis, .schritt.waegung .s-titel small.sortier-hinweis { display: block; font-size: .8rem; }

  .sortiert-haken .sh-kasten { width: 30px; height: 30px; }

  /* Neben dem Haken bleibt der Name breit: Zustand und Angaben rutschen in die zweite Zeile */
  .schritt.kat.mit-haken .s-kopf { padding-left: 8px; }
  .schritt.kat.mit-haken .s-status { order: 5; margin-left: 26px; min-width: 0; }
  .schritt.kat.mit-haken .s-kopf .s-name { flex: 1 1 60%; }
  .schritt.kat.mit-haken .s-info { order: 6; flex: 1 1 auto; padding-left: 0; }
  .schritt.kat.mit-haken .s-info:empty { display: none; }
}

/* 1.33 (Nachbesserung): Tagesablauf im Kopf aufgeräumt */
.tagesablauf.aufklappbar > summary .ak-titel { font-size: 1.05rem; }

.tagesablauf .ta-kurz-zeile { grid-template-columns: 4.8em minmax(60px, 1fr) 8.6em; gap: 12px; min-height: 42px; padding: 0 12px; border-radius: 0; border-bottom: 1px solid var(--flaeche-3); }
.tagesablauf .ta-kurz-zeile.heute { background: var(--ampel-arbeit-flaeche); }

.tagesablauf .ta-kurz-text small { color: var(--gedimmt); font-size: .8rem; min-width: 1.8em; text-align: right; }
.tagesablauf .ta-kurz-mehr { justify-content: center; min-height: 44px; margin: 0; background: var(--info-flaeche); border-top: 0; width: 100%; box-sizing: border-box; }

@media (max-width: 480px) { .tagesablauf .ta-kurz-zeile { grid-template-columns: 4.2em minmax(40px, 1fr) 7.6em; gap: 8px; padding: 0 8px; font-size: .85rem; } .tagesablauf .ta-kurz-text small { display: none; } }
/* 1.33: „Läuft gerade“ als Symbol in der Statusreihe, Übersicht im Dialog */
.status-leiste.mit-laeuft { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 700px) { .status-leiste.mit-laeuft { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* ---------------- 1.38: Probleme je Fraktion, mit Foto, in der Logistik ---------------- */

.pe-knoepfe .pe-foto { min-width: var(--tippziel); justify-content: center; }
.problem-fraktion { display: flex; flex-direction: column; gap: 6px; }
.fraktion-gruppe { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px; border-radius: var(--ecke-m); background: var(--flaeche-2); }
.fraktion-gruppe .h-pill { flex: 0 0 100%; justify-self: start; width: max-content; }
.fraktion-wahl { min-height: 48px; padding: 6px 12px; border: 2px solid var(--rand); border-radius: var(--ecke-m); background: var(--karte); font: inherit; font-weight: 700; color: var(--text); cursor: pointer; }
.fraktion-wahl.gewaehlt { border-color: var(--rot); background: var(--rot-hell); color: var(--ampel-problem-text); box-shadow: 0 0 0 2px var(--rot) inset; }
.problem-foto-wahl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.pf-vorschau { width: 120px; height: 90px; object-fit: cover; border-radius: var(--ecke-m); border: 1px solid var(--rand); }

.we-zeile.mit-problem { border-left-color: var(--rot); background: var(--ampel-problem-flaeche); }
.we-knoepfe .we-problem { color: var(--auf-farbe); background: var(--rot); border-color: var(--rot); font-weight: 800; }

@media (max-width: 700px) {

  .we-knoepfe .we-problem { width: auto !important; min-width: 44px; padding: 4px 8px; }
}
.we-knoepfe .we-problem-plus { min-width: 52px; justify-content: center; }
   /* Problem-Plus nur als Icon; „Problem melden“ steht im Tooltip */

/* ---------- Waage (ab 1.41): Systemeinstellungen, Mein Zugang, Wägedialog ---------- */

.waage-gewicht { font-size: 2.4rem; font-weight: 800; text-align: center; margin: 4px 0; font-variant-numeric: tabular-nums; border-radius: var(--ecke-m); padding: 4px; }

.raster.vier { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 700px) { .raster.vier { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.wd-waage-knopf { width: 100%; font-variant-numeric: tabular-nums; font-weight: 800; }
.wd-waage-knopf.schwankt { background: var(--ampel-arbeit-flaeche); border-color: var(--arbeit-rand); color: var(--ampel-arbeit-text); }

/* ---------- Kopfleiste am Handy (ab 1.41): mehr Platz für den Titel ----------
   Zugang steht im Menü; links oben bleibt die Bildmarke (Link zur Startseite), daneben der schmale Zurück-Pfeil (ab 1.164.2);
   Knöpfe etwas schmaler, Abstände kleiner. QR, Uhr und Glocke bleiben. */
@media (max-width: 640px) {
  .kopfleiste { gap: 0; padding-left: 2px; padding-right: 2px; }
  .kopfleiste .konto { display: none; }
  .kopfleiste.hat-zurueck .pfad { margin-left: 0; }
  .pfad-punkt.zurueck { min-width: 30px; margin-left: 0; padding: 0; justify-content: flex-start; }
  .pfad-punkt.zurueck::before { font-size: 2.1rem; padding-left: 6px; }
  .pfad-punkt.aktuell { padding-left: 2px; padding-right: 4px; }
  .kopf-scan, .nav-menue > summary, .glocke > summary, .zeit-knopf > summary { min-width: 40px; }

  .pfad .sap-marke { font-size: .98rem; }
}
@media (max-width: 360px) {
  .kopf-scan, .nav-menue > summary, .glocke > summary, .zeit-knopf > summary { min-width: 36px; }
  .kopf-scan svg { width: 22px; height: 22px; }
  .nav-menue > summary, .glocke > summary { font-size: 1.25rem; }
}
.pfad-punkt.nach-oben { cursor: pointer; }
  [data-leitungen]:empty { display: none; }

/* Ab 1.42: Verwaltung mit Kopfnavigation (Benutzer · Rechte · Systemeinstellungen), Rechte nach Kategorien */
.rechte-tabelle .rt-kategorie th { position: sticky; left: 0; text-align: left; background: var(--grau-hell); font-weight: 700; padding: 8px; border-bottom: 0; }
.rh-kategorie { margin: 14px 0 2px; font-size: .95rem; font-weight: 700; }

/* Ab 1.43: Übersicht mit antippbaren Kennzahlen, Logistik-Stufen in Matrix und Feld-Dialog (Namen: LOGISTIK_STUFEN in inc/namen.php) */
:root { --st-fehlt: #b3261e; --st-angemeldet: var(--ampel-offen); --st-angenommen: var(--info); --st-puffer: #5b6b7b; --st-bereit: #0f7b6c; --st-arbeit: var(--orange); --st-problem: var(--rot); --st-fertig: var(--gruen); }

/* Kopfkachel: zwei Gruppen „Proben“ und „Logistik“, jede Zahl eine Kachel */

.pg-k-zahl { font-size: 1.45rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }

@media (max-width: 640px) {

  .pg-k-zahl { font-size: 1.25rem; }

}

/* Stufen-Balken (jeder Behälter in seiner Stufe) und Chips „Puffer 2“ */

.st-chip .st-sym { color: var(--st); min-width: 0; }

/* Feld-Dialog: Kennzahlen als Kacheln, Behälter nach Stufe gruppiert, Status als Badge, Aktionen als Verben */

.pu-kpi { display: flex; flex-direction: column; padding: 5px 9px; border-radius: var(--ecke-m); background: var(--st-hell, var(--flaeche)); }
.pu-kpi strong { font-size: 1.35rem; line-height: 1.15; font-variant-numeric: tabular-nums; }
.pu-kpi span { font-size: .78rem; color: var(--gedimmt); font-weight: 600; }


.st-badge .st-sym { color: var(--st); min-width: 0; }

@media (max-width: 640px) {

  .pu-kpi { padding: 4px 6px; }
  .pu-kpi strong { font-size: 1.15rem; }
  .pu-kpi span { font-size: var(--gr-fuss); line-height: 1.15; }
}

/* ---------- Zahlenschrift (ab 1.46, Manual Kapitel 05): Gewichte, Sortiernummern und Uhrzeiten mit festen Zeichenbreiten ---------- */
.sap-marke, .zahlfeld .zf-zahl, .zb-zahl, .uhr, .s-wert, .waage-gewicht, .tabelle .zahl, .sp-zahl, .pg-k-zahl, .pg-prozent,
.dp-wert, .zp-anzeige, .pu-kpi strong, .pu-d-zahlen dd, .zk-zeit, .iz-sap { font-family: var(--schrift-zahl); font-variant-numeric: tabular-nums; }
/* Marken (G 611 C, Protokoll-Nr., Suffix) mit kleiner Ecke, Knöpfe 8, Karten 12 (Manual Kapitel 06) */
.sap-marke, .prot, .suffix { border-radius: var(--ecke-s); }
.kopfleiste svg.ic.kopf-ic { width: 26px; height: 26px; }
.nav-symbol svg.ic { width: 22px; height: 22px; vertical-align: middle; }
svg.grafik { display: block; width: 100%; max-width: 320px; height: auto; margin: 0 auto 12px; }
svg.grafik.breit { max-width: 960px; }

/* ---------- Gruppe B: Icons auf Drucksachen (drucksachen.php, inc/drucksachen.php) ----------
   drucksachen.css setzt „.bogen-a4 svg { display:block; width:100%; height:100% }“ (für QR-Codes und Marken).
   Die eigenen Icons sollen dort so groß wie die Schrift bleiben und schwarz drucken. */
.bogen svg.ic, .bogen-a4 svg.ic, .etikett svg.ic { display: inline-block; width: 1.25em; height: 1.25em; color: #000; }
/* Abhak-Felder auf dem Wareneingangs-Aufkleber (DRUCK_HAKEN): Icon so hoch wie vorher das Zeichen (Schrift 9 mm) */
.we-hsym svg.ic { width: 1em; height: 1em; vertical-align: -.1em; }

/* Druck: etiketten.css blendet alles neben <main> aus – der Icon-Satz direkt nach <body> muss bleiben (unsichtbar) */

.bogen, .bogen-a4, .etikett { --icon-akzent: #000; }
@media print { svg.ic { --icon-akzent: currentColor; } }

/* ---------- 1.46.2: Feinschliff ---------- */
/* Problem melden: Warndreieck mit kleinem Plus-Zeichen an der Ecke statt zwei Symbolen nebeneinander */

.we-knoepfe .we-problem-plus .kn-icon > :nth-child(2) { position: absolute; right: -8px; bottom: -6px; font-size: .75em; border-radius: 50%; background: var(--karte); color: var(--text); }

/* Behälter-Kachel: die ganze Kachel öffnet die Sortierung, kein eigener „Öffnen“-Knopf mehr */
.kachel { position: relative; }

.kachel .k-chips, .kachel .k-info, .kachel .schritte { pointer-events: none; }

@media (hover: hover) { .kachel:hover { border-color: var(--aktion); } }
.kachel:focus-within { outline: var(--fokus-ring) solid var(--fokus); outline-offset: 1px; box-shadow: 0 0 0 2px var(--fokus-innen); }

/* ---------- 1.48: Wochenkalender (Dispo → Kalender, Meine Zeit → Kalender) ---------- */

.kal-karte { padding: 12px; }

.kal-tagknopf small { font-weight: 400; font-size: var(--gr-fuss); color: var(--text-zweit); }

.kal-raster { display: grid; grid-template-columns: 2.6em repeat(var(--kal-tage), minmax(120px, 1fr)); gap: 0 4px; }

.kal-achse span { position: absolute; right: 4px; transform: translateY(-50%); font-size: var(--gr-fuss); color: var(--text-zweit); font-variant-numeric: tabular-nums; }

.kal-beides .kal-ist { left: auto; width: 36px; }

.kal-ist .kal-block { width: 100%; left: 0; }

/* Ist, eigene Einträge (Meine Zeit) */

.kb-ist.laeuft { background-image: repeating-linear-gradient(135deg, transparent 0 6px, rgba(46,139,62,.15) 6px 12px); }
.kb-ist.pruefen { background: var(--ampel-arbeit-flaeche); border-color: var(--ampel-arbeit); color: var(--ampel-arbeit-text); }
/* Ist, zusammengefasst (Dispo): Fläche je halbe Stunde, Zahl = Personen gleichzeitig */

.kal-legende > span[class^="kal-leg"] { display: inline-block; width: 14px; height: 14px; border-radius: var(--ecke-s); vertical-align: middle; margin-right: 4px; }

/* Handy: ein Tag auf einmal, Tagwahl oben (ohne Script bleibt der Kalender seitlich verschiebbar) */
@media (max-width: 600px) {

  .kal.mit-tagwahl .kal-raster { grid-template-columns: 2.6em minmax(0, 1fr); }

  .kal-karte { padding: 8px; }

}

/* ---------- „x“ zum Leeren im Suchfeld (ab 1.49): überall gleich ---------- */
.fl-box { position: relative; display: block; }
.fl-box > input { padding-right: 52px; }
input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }
.fl-leeren { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--gedimmt); font-size: 1.7rem; line-height: 1; cursor: pointer; padding: 0; }
.fl-leeren:hover, .fl-leeren:focus-visible { background: rgba(128, 128, 128, .22); }

/* SORQA Manager in der Zentrale (ab 1.53): am Handy nur die wichtigsten Spalten */
@media (max-width: 760px) {
  .manager-seite .tabelle .nur-breit { display: none; }

}

/* Manager: Whitepaper-Anfragen (ab 1.54) */

.wp-aktionen > summary { list-style: none; cursor: pointer; }
.wp-aktionen > summary::-webkit-details-marker { display: none; }
.wp-aktionen[open] form { margin-top: 6px; display: grid; gap: 6px; min-width: 190px;
  padding: 8px; background: var(--karte); border: 1px solid var(--rand); border-radius: var(--ecke-l); }

/* Manager: Kundenanlage (ab 1.59) */

.anlage-schritte li { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }

/* Ab 1.61: Vertrag und Speicher (Kunden-App: Verwaltung → Vertrag und Speicher, Manager je Installation) */
.vertrag-hinweise { max-width: 1400px; margin: 0 auto; padding: 8px 16px 0; }
.vertrag-hinweise .meldung { margin: 0 0 6px; }
.vertrag-hinweise .meldung a { font-weight: 700; margin-left: 4px; }
.vertrag-daten { margin-bottom: 6px; }
.vertrag-speicher-titel { font-size: 1rem; margin: 16px 0 4px; }
.speicher-zahl { margin: 4px 0; }
.speicher-balken { height: 16px; }
.speicher-balken .sb-fotos { background: var(--ampel-fertig); }
.speicher-balken .sb-sicherungen { background: var(--gruen-600, #2e8b3e); opacity: .6; }
.speicher-balken .sb-datenbank { background: var(--ampel-offen); }
.speicher-balken .sb-arbeit.sb-fotos { background: var(--ampel-arbeit); }
.speicher-balken .sb-problem.sb-fotos { background: var(--ampel-problem); }
.speicher-balken.ist-arbeit { box-shadow: 0 0 0 2px var(--ampel-arbeit); }
.speicher-balken.ist-problem { box-shadow: 0 0 0 2px var(--ampel-problem); }
.speicher-legende { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 6px; padding: 0; color: var(--gedimmt); }
.speicher-legende li { display: flex; align-items: center; gap: 6px; }
.sb-punkt { display: inline-block; width: 10px; height: 10px; border-radius: var(--ecke-s); }
.sb-punkt.sb-fotos { background: var(--ampel-fertig); }
.sb-punkt.sb-sicherungen { background: var(--gruen-600, #2e8b3e); opacity: .6; }
.sb-punkt.sb-datenbank { background: var(--ampel-offen); }

.abgleich-zeile { overflow-wrap: anywhere; }

/* Ab 1.68: Manager mit offenen Punkten, Kundenansicht, einklappbaren Blöcken */
.hinweis-pille.blau { background: var(--info-flaeche); color: var(--info-text); }

/* Ab 1.431.0 (AW5, Designsystem 1.3): keine farbigen Randstreifen mehr, den Zustand zeigt die Ampel (Symbol und Fläche). */
.punkt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--rand); border-radius: var(--ecke-l); background: var(--karte); }
.punkt.gesehen { opacity: .65; }

.klapp-karte > summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 40px; margin: 0; } /* ab 1.458.0 überall */
.klapp-karte > summary > h2, .klapp-karte > summary > h3 { margin: 0; }
.klapp-karte:not([open]) { padding-bottom: 12px; }
.karte-gefahr { border-left: 4px solid var(--problem-rand); } /* Lösch-Karten (ab 1.458.0): roter Rand links, zu bis man sie öffnet */
.karte-gefahr > summary h2 .ico, .karte-gefahr > summary h2 svg { color: var(--rot); }

.klapp-info { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-left: auto; font-weight: 400; color: var(--gedimmt); font-size: .9rem; }

/* Ab 1.134: Akquise im Manager (zentrale/akquise.php) */
.manager-akquise .kpi-leiste { grid-template-columns: repeat(7, minmax(0, 1fr)); }
@media (max-width: 760px) { .manager-akquise .kpi-leiste { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
a.kpi { color: inherit; text-decoration: none; }
a.kpi:hover, a.kpi.aktiv { border-color: var(--aktion); }

/* ---------- Zweiter Faktor (ab 1.64, zweitfaktor.php) ---------- */
.pk-anmelden { margin-top: 12px; display: grid; gap: 8px; }
.pk-oder { text-align: center; margin: 0; }
.pk-neu { display: grid; gap: 8px; margin-top: 10px; }
.pk-neu .btn:not(.breit) { justify-self: start; }
.pk-liste { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 8px; }
.pk-liste li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--linie); }
.pk-liste form { margin: 0; }
.zwf-code-feld { font-size: 1.6rem; letter-spacing: .2em; text-align: center; font-variant-numeric: tabular-nums; }
.zwf-hilfe { margin-top: 12px; }
.zwf-hilfe summary { cursor: pointer; color: var(--blau); }
.zwf-schritte { padding-left: 1.3em; display: grid; gap: 10px; }
.zwf-qr-rahmen { margin: 10px 0; }
.zwf-qr { width: 220px; max-width: 100%; height: auto; display: block; border-radius: var(--ecke-m); }
.zwf-schluessel { font-size: 1rem; word-break: break-all; }
.zwf-codes { list-style: none; padding: 0; margin: 12px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.zwf-codes code { font-size: 1.2rem; letter-spacing: .08em; }
.feld-haken { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0; }
@media print {
  .keine-druck, .rechtliche-links { display: none !important; }
  .zwf-codes-karte { box-shadow: none; border: 1px solid #000; }
}

/* ---- Ab 1.65 (Stufenplan P4): Umschalter Deutsch/Englisch auf Anmeldung, sorqa.app, sorqa.info, Rechtstexten ---- */
.sprachwahl { display: flex; width: max-content; gap: 2px; padding: 2px; margin: 0 auto 28px; border: 1px solid rgba(255, 255, 255, .35); border-radius: var(--ecke-m); font-size: .85rem; line-height: 1; }
.sprachwahl a { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 36px; padding: 0 10px; border-radius: var(--ecke-m); color: var(--auf-farbe); text-decoration: none; font-weight: 700; letter-spacing: .04em; }
.sprachwahl a:hover { background: rgba(255, 255, 255, .12); }
.sprachwahl a.aktiv { background: rgba(255, 255, 255, .22); }
.rt-uebersetzung { margin-bottom: 12px; }
/* Logo auf der Anmeldekarte: im Dunkelmodus helle statt dunkle Kästchen (sonst unsichtbar auf dunkler Karte) */
.login-logo svg rect:not(:last-child) { fill: var(--tinte); }

/* Finanzen im Manager (ab 1.69, zentrale/finanzen.php) */
.finanz-seite [hidden] { display: none !important; }

.pos-tabelle td:nth-child(1) { min-width: 240px; width: 100%; }
.pos-tabelle td:nth-child(2) { min-width: 70px; }
.pos-tabelle td:nth-child(3) { min-width: 120px; }
.pos-tabelle select[data-pos-einheit] { width: 100%; min-height: 44px; } /* ab 1.442.1: Einheit als Auswahl */
.pos-tabelle td:nth-child(4) { min-width: 110px; }
.pos-tabelle textarea, .pos-tabelle input { width: 100%; min-height: 44px; }

@media (max-width: 600px) { .pos-tabelle.stapeln td { min-width: 0; width: auto; }  }

.pos-rabatt-wert input { min-width: 5rem; flex: 1; } /* ab 1.442.1: breit genug, dass man den Wert sieht */
.pos-rabatt-wert select { flex: 0 0 4.5rem; }
.pos-tabelle .pos-abzug { display: block; font-size: .8em; color: var(--gedimmt); }
.pos-tabelle .pos-abzug.fehler { color: var(--rot); font-weight: 600; }
.pos-tabelle .pos-mal { display: block; font-size: .8em; white-space: nowrap; margin-top: .2em; } /* ab 1.466: Monatsmiete, Anzahl × Monate */

.finanz-monate .finanz-balken { width: 45%; min-width: 120px; }
@media (max-width: 600px) { .finanz-monate .finanz-balken { width: auto; min-width: 48px; }  }

.fb-umsatz, .fl-umsatz { background: var(--gruen); }
.fb-ausgaben, .fl-ausgaben { background: var(--grau); }

/* Abrechnungsplan (ab 1.125, nur Zentrale) */

.plan-termin form { margin: 0 0 10px; }

/* Tickets (ab 1.73): Verlauf im Manager und auf der Support-Seite der App */

/* Ab 1.431.0 (AW5, Designsystem 1.3): keine farbigen Randstreifen mehr, den Zustand zeigt die Ampel (Symbol und Fläche). */
.ticket-verlauf > li { border-radius: var(--ecke-l); padding: 10px 14px; background: var(--flaeche-2); }

.ticket-verlauf > li.tv-notiz { background: var(--orange-hell); }
.ticket-verlauf > li.tv-system { background: none; border: 0; padding: 0 14px; }

/* Wissensportal im Manager (ab 1.74, zentrale/artikel.php): Textfeld, Anleitung, Vorschau */
.wissen-textfeld { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .92rem; line-height: 1.5; }
.wissen-anleitung { margin: 8px 0 14px; }
.wissen-anleitung summary { cursor: pointer; font-weight: 600; }
.wissen-anleitung code { white-space: nowrap; }

.wissen-vorschau .wissen-hinweis p { margin: 0; }
.wissen-vorschau .wissen-medium img, .wissen-vorschau .wissen-medium video { display: block; max-width: 100%; max-height: 420px; border-radius: var(--ecke-m); }

/* Ab 1.87: Seite „Erhebung“ (Hausmüll: Kampagnen, Schichten, Stichprobenadressen, Nachweise) */

.hm-seite form.inline { display: inline-block; margin: 4px 0; }
 /* ab 1.136: ausgefallene Adresse in der Zeile */
/* Ab 1.136 (M6): Bereiche der Erhebung zum Aufklappen, Titel und kurzer Stand in der Kopfzeile */
.hm-klappe > summary { display: flex; align-items: center; gap: 12px; min-height: 48px; cursor: pointer; list-style: none; }
.hm-klappe > summary::-webkit-details-marker { display: none; }

.hm-klappe[open] > summary { margin-bottom: 10px; }

.hm-einheiten a { text-decoration: none; }

/* Ab 1.119 (M6): am Handy je Schicht ein Block, darin je Kampagne ein Feld mit ihrem Namen (kein Wischen) */

.hm-behaelter .haken, .hm-behaelter .btn { margin-bottom: 12px; }

/* =====================================================================
   Ab 1.98: Feinschliff nach Designsystem 1.2 (ruhiger, moderner, klarer)
   Karten mit `schatten` statt kräftigem Rand, mehr Luft, Knöpfe ohne „hängenden“ Hover auf Touch-Geräten,
   Leisten, deren Text nie abgeschnitten wird (wischen statt kürzen), aufgeräumte Anmeldeseiten.
   ===================================================================== */
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
h1, h2, h3 { letter-spacing: -.01em; line-height: 1.2; }
h1 { font-weight: 800; }
h2 { font-weight: 800; }

/* Karten: dünne Linie und weicher Schatten, etwas mehr Innenabstand am PC */
.karte { border: 1px solid var(--linie); border-radius: var(--ecke-l); box-shadow: var(--schatten); }
@media (min-width: 701px) { .karte { padding: 20px 22px; } }
.seite { padding: 20px 16px 32px; }
@media (min-width: 1101px) { .seite { padding: 24px 32px 40px; } }

/* Knöpfe: Hover nur, wo es eine Maus gibt. Auf Handy und Tablet blieb der Hover nach dem Tippen stehen –
   bei roten Knöpfen wurde die weiße Schrift dann auf hellgrauer Fläche unlesbar. */
.btn { border-radius: var(--ecke-m); font-weight: 700; transition: background .12s, border-color .12s, box-shadow .12s, transform .05s; }
.btn.primaer, .btn.ok, .btn.start, .btn.gefahr, .btn.stopp, .btn.pause { box-shadow: 0 1px 2px rgba(20,35,44,.18); }
.btn.gefahr:hover { background: #a11f1f; border-color: #a11f1f; }
.btn.warn:hover { background: var(--ampel-arbeit-flaeche); border-color: var(--ampel-arbeit); }
.btn.gefahr-text { color: var(--ampel-problem); }
@media (hover: none) {
  .btn:hover { background: var(--karte); }
  .btn.primaer:hover { background: var(--aktion); border-color: var(--aktion); }
  .btn.gefahr:hover, .btn.stopp:hover { background: var(--rot); border-color: var(--rot); }
  .btn.ok:hover, .btn.start:hover { background: var(--gruen); border-color: var(--gruen); }
  .btn.aktiv:hover { background: var(--blau-hell); }
  .btn.warn:hover { background: var(--ampel-arbeit-flaeche); border-color: var(--orange); }
  .bl-seg:hover { background: transparent; }
  .bl-seg.aktiv:hover { background: var(--blau); }
}
/* Links, die wie Knöpfe aussehen, behalten immer die Schrift des Knopfs (nicht die Linkfarbe einer Umgebung) */
a.btn, a.btn:visited { text-decoration: none; }
a.btn.primaer, a.btn.primaer:visited { color: var(--aktion-text); }
a.btn.gefahr, a.btn.ok, a.btn.start, a.btn.stopp, a.btn.pause { color: var(--auf-farbe); }

/* Eingabefelder: Rahmen in Bedienelement-Kontrast, ruhiger Fokus */
input:not([type]), input[type=text], input[type=number], input[type=date], input[type=datetime-local], input[type=time], input[type=password], input[type=email], input[type=search], input[type=url], input[type=tel], input[type=month], select, textarea {
  border-width: 1.5px; border-color: var(--ink-300); transition: border-color .12s;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) input:not([type=checkbox]):not([type=radio]), :root:not([data-theme="light"]) select, :root:not([data-theme="light"]) textarea { border-color: var(--ink-500); } }
:root[data-theme="dark"] input:not([type=checkbox]):not([type=radio]), :root[data-theme="dark"] select, :root[data-theme="dark"] textarea { border-color: var(--ink-500); }
.feld > span { color: var(--text-zweit); font-size: .85rem; letter-spacing: .01em; }

/* Bereichs- und Verwaltungsleiste: Text wird nie abgeschnitten. Passt die Leiste nicht, lässt sie sich wischen;
   der aktuelle Punkt rollt von selbst ins Bild (app.js). Ecken wie Knöpfe (Pillenform nur für Zustände). */
.bl-segmente { position: relative; overflow-x: auto; scrollbar-width: none; border-radius: var(--ecke-l); background: var(--flaeche-3); padding: 4px; gap: 4px; scroll-padding: 0 12px; }
.bl-segmente::-webkit-scrollbar { display: none; }
.bl-seg { flex: 1 0 auto; overflow: visible; border-radius: var(--ecke-m); padding: 0 14px; color: var(--text-zweit); }
.bl-seg:hover { background: var(--karte); color: var(--text); }
.bl-seg.aktiv { color: var(--auf-tinte); box-shadow: 0 1px 2px rgba(20,35,44,.2); }

@media (max-width: 600px) {
  .bl-seg { padding: 0 10px; }
  .bl-seg:not(.aktiv) { flex: 0 0 auto; min-width: 46px; }
  .bl-seg.aktiv { flex: 0 0 auto; }
}

.zahlfeld { border-width: 1.5px; border-color: var(--ink-300); }
.chip-link { border-width: 1.5px; }

/* Tabellen: ruhiger Kopf */
.tabelle th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-zweit); font-weight: 700; }

/* ---------- Anmeldung, Passwort vergessen, zweiter Faktor, Notfall: aufgeräumt ---------- */
.login-seite main.seite.schmal { max-width: 440px; padding-top: max(6vh, 24px); }
.login-seite .karte { padding: 28px 26px 24px; border: none; border-radius: var(--ecke-l); box-shadow: 0 10px 40px rgba(0,0,0,.35); }
.login-karte .login-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.login-karte .login-logo svg { width: 40px; height: 40px; }
.login-karte .login-logo b { font-size: 1.6rem; font-weight: 800; letter-spacing: .02em; line-height: 1; }
.login-karte h1.login-titel { font-size: 1.35rem; margin: 0 0 4px; }
.login-karte .login-untertitel { margin: 0 0 18px; font-size: .95rem; }
.login-karte .btn.primaer { margin-top: 6px; }
.login-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; margin: 18px 0 0; font-size: .9rem; }
.login-links a { text-decoration: none; font-weight: 600; min-height: 32px; display: inline-flex; align-items: center; }
.login-links a:hover { text-decoration: underline; }
.login-links.zweit { margin-top: 6px; font-size: .82rem; }
.login-links.zweit a { color: var(--text-zweit); font-weight: 500; }
.login-seite .rechtliche-links { opacity: .8; margin-top: 20px; }
.login-seite .rechtliche-links a { text-decoration: none; }
.login-seite .rechtliche-links a:hover { text-decoration: underline; }
.konto-rechte summary { cursor: pointer; color: var(--link); font-weight: 600; min-height: 32px; }
.konto-rechte[open] summary { margin-bottom: 4px; }
/* Handy: Suchfeld, Filter und Plus bleiben in einer Zeile */
@media (max-width: 600px) { .fl .fl-zeile > .fl-suche, .fl[data-fl="fl-projekte-daten"] .fl-suche { flex-basis: 150px; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .zahlfeld { border-color: var(--ink-500); } }
:root[data-theme="dark"] .zahlfeld { border-color: var(--ink-500); }

/* =====================================================================
   Ab 1.99: Wiederholbare Muster für alle Seiten (Patrick 21.10.2026: „wiederholbare Designs für beste UX“)
   1. Seitenbreite: jede Seite mit Leiste nutzt .seite (1400 px), keine eigene Breite.
   2. Abstand: zwischen Leiste, Kennzahlen, Knopfzeile, Suche und Inhalt immer 16 px.
   3. Navigation: Hauptleiste (Manager, Verwaltung, Bereiche) = .bl-segmente; Unterreiter (Finanzen, Stammdaten) = gleiche
      Leiste, nur kleiner; Filter-Chips nur für Zustände.
   4. Kacheln: Karte, Kennzahl (.kpi) und Projektkarte haben dieselbe Fläche, Linie, Ecke und denselben Schatten,
      ohne farbige Randstreifen (Designsystem: Zustand zeigt die Ampel). Karten einer Reihe sind gleich hoch.
   ===================================================================== */
.bereich-leiste, .kpi-leiste, .fl { margin: 0 0 16px; }
.seite > .knopfzeile, .manager-inhalt > .knopfzeile { margin: 0 0 16px; }
.seite > .knopfzeile + .fl, .manager-inhalt > .knopfzeile + .fl { margin-top: 0; }

/* Kennzahlen: dieselbe Kachel wie Karten */
.kpi { border: 1px solid var(--linie); border-radius: var(--ecke-l); box-shadow: var(--schatten); padding: 14px 18px; text-decoration: none; color: var(--text); }
.kpi strong { font-family: var(--schrift-zahl); font-variant-numeric: tabular-nums; }
a.kpi:hover { border-color: var(--ink-300); }
@media (max-width: 700px) { .kpi-leiste { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Zeitstrahl-Kopf (ab 1.205.1): Datumsbereich groß links oben, darunter zurück/vor/Heute nebeneinander und die Zeitraum-Wahl */
.zs-kopf .zs-zeitraum { flex: 1 1 100%; order: -1; margin: 0; text-align: left; font-size: 1.35rem; min-width: 0; }

/* Projektname: höchstens zwei Zeilen, der Kopf ist immer zwei Zeilen hoch, damit alle Karten einer Reihe gleich aufgebaut sind */

.projekt-karte .pk-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.25; flex: 1 1 auto; min-width: 0; }

/* =====================================================================
   Ab 1.102: Ein Design, ein Layout (Patrick 21.10.2026: „Wir haben ein Design und 1 Layout“)
   1. Breite: Jede Seite nach der Anmeldung ist gleich breit (.seite, 1400 px). Schmal (.seite.schmal) sind nur
      die Seiten vor der Anmeldung (Anmelden, Passwort, zweiter Faktor, Zustimmung).
   2. Navigation zwischen Unterseiten (.seiten-nav: Manager, Verwaltung, Stammdaten, Dispo, Projektbereiche):
      am PC eine Spalte links, auf Tablet und Handy eine Zeile oben zum Wischen. Immer Symbol + kurzer Name.
   3. Ansicht wechseln auf derselben Seite (Liste/Kalender, Offen/Gelöst/Alle): Umschalter oben über die ganze Breite.
   ===================================================================== */
.bl-segmente { flex-wrap: nowrap; }
button.bl-seg { border: none; background: transparent; font: inherit; font-weight: 700; cursor: pointer; }
button.bl-seg.aktiv { background: var(--blau); }
.bl-gruppe { flex: none; align-self: stretch; width: 1px; margin: 8px 4px; background: var(--linie); font-size: 0; overflow: hidden; }
@media (min-width: 1101px) {
  .seite:has(> .seiten-nav) { display: grid; grid-template-columns: 248px minmax(0, 1fr); column-gap: 28px; align-items: start; }
  .seite:has(> .seiten-nav) > * { grid-column: 2; min-width: 0; }
  .seite > .seiten-nav { grid-column: 1; grid-row: 1 / span 100; position: sticky; top: 76px; margin: 0;
    flex-direction: column; align-items: stretch; gap: 10px; }
  .seiten-nav .bl-segmente { flex: none; flex-direction: column; overflow: visible; gap: 2px; padding: 8px;
    background: var(--karte); border: 1px solid var(--linie); box-shadow: var(--schatten); }
  .seiten-nav .bl-seg { flex: none; justify-content: flex-start; gap: 12px; min-height: 44px; padding: 0 12px; white-space: normal;
    text-align: left; line-height: 1.2; box-shadow: none; }
  .seiten-nav .bl-seg:hover { background: var(--flaeche-3); }
  .seiten-nav .bl-seg.aktiv:hover { background: var(--blau); }
  .seiten-nav .bl-sym { width: 1.4em; display: inline-flex; justify-content: center; }
  .seiten-nav .bl-lang { display: inline; }
  .seiten-nav .bl-kurz { display: none; }
  .seiten-nav .bl-gruppe { width: auto; height: auto; margin: 8px 0 0; padding: 12px 12px 4px; background: none; border-top: 1px solid var(--linie);
    font-size: var(--gr-fuss); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-zweit); }

}
@media (max-width: 1100px) {
  .seiten-nav .bl-seg { flex: 1 0 auto; }
}

.bl-zahl { font-size: .8rem; font-weight: 700; min-width: 1.6em; padding: 1px 6px; border-radius: var(--ecke-pille); background: var(--karte); color: var(--text-zweit); text-align: center; }
.bl-seg.aktiv .bl-zahl { background: rgba(255,255,255,.18); color: inherit; }
@media (max-width: 600px) { .ansicht-wahl .bl-seg .bl-kurz { display: inline; } .ansicht-wahl .bl-seg, .ansicht-wahl .bl-seg:not(.aktiv) { flex: 1 0 auto; padding: 0 8px; } .ansicht-wahl .bl-seg:has(.bl-zahl) .bl-sym { display: none; } }

/* ---------- Ab 1.110: Sicherheitsunterweisung (Dispo → Unterweisung, Stammdaten, Link aus der Einsatzmail) ---------- */

/* Ab 1.132 Stammdaten → Unterweisung: je PDF eine Karte mit Knöpfen, darunter klappt das Formular auf */

form.uw-karte { max-width: none; margin: 0; }

@media (max-width: 600px) {   .uw-weg .btn { width: 100%; } .uw-knoepfe .btn { padding: 0 8px; } }
/* Ab 1.132 Stammdaten → Kennzahlen: je Behältertyp eine aufklappbare Zeile wie bei den Fraktionen */

.kz-erklaerung ul { margin: 0 0 4px; padding-left: 20px; }

.kz-eingabe input { width: 8em; min-width: 0; }
.kz-felder small { font-size: .8rem; }

.uw-projekte li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }

/* Einsatzblätter und Unterschriftenliste (unterweisung.php?drucken=1): schlichtes Papier, je Blatt eine Seite */

.uw-tabelle th:nth-child(3) { width: 14%; }
.uw-tabelle th:nth-child(4) { width: 28%; }
@media print {
  body.uw-druck .uw-druck-seite { max-width: none; padding: 0; }

}

/* =====================================================================
   Ab 1.117: Seitenkopf, Wissen-Knopf, Menü (Patrick 22.10.2026: „seltsamer Header“, „Hilfe“ kürzer,
   „Navigation im Menü muss übersichtlicher werden“)
   1. Seitenkopf (seitenkopf_html()): Titel links, Aktionen rechts, darunter Kennzahlen, Suche/Filter, Inhalt.
      Am Handy steht der Titel schon in der Kopfleiste und bleibt nur für Vorlesehilfen.
   2. „Wissen“: kleiner ruhiger Knopf (kein Grün), führt zu passenden Artikeln im Wissensportal.
   3. Kopfleiste am breiten Bildschirm so breit wie die Seite (Logo über der Navigation, Menü über dem Inhalt).
   4. Menü: oben der eigene Zugang, dann Gruppen mit Überschrift, unten Abmelden und Version.
   ===================================================================== */
.btn.sk-wissen { min-height: 40px; padding: 0 12px; gap: 6px; font-size: .92rem; background: transparent; border: 1px solid var(--linie); color: var(--text-zweit); box-shadow: none; }
.btn.sk-wissen:hover { color: var(--text); border-color: var(--ink-300); background: var(--flaeche-3); }

/* =====================================================================
   Ab 1.211: Seitenkopf – ein Aufbau für alle Seiten in App und Manager (seitenkopf() in inc/layout.php,
   Regel in docs/ENTWICKLUNG.md „Seitenkopf“; Patrick 24.10.2026: „1 Layoutkonzept, das überall gilt“).
   Reihenfolge fest: Kopfzeile (Reiter/Angaben links, Aktionen rechts, Hauptaktion ganz rechts) → Erklärtext →
   Kennzahlen → Ansicht (Status-Chips) → Suche/Filter. Alle Teile mit gleichem Abstand, keine Einzelstile auf Seiten.
   ===================================================================== */
.seiten-kopf.sk { display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch; justify-content: flex-start; gap: 14px; margin: 0 0 18px; }
.sk > .kpi-leiste, .sk > .sk-reiter, .sk > .fl, .sk > .sk-text, .sk > .meldung { margin: 0; }
.sk-zeile { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; min-height: 48px; }
.sk-titel { margin: 0; font-size: 1.6rem; line-height: 1.2; overflow-wrap: anywhere; min-width: 0; }
.sk-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; max-width: 100%; }
.sk-links > .sk-reiter { min-width: 0; }
.sk-angaben { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; min-width: 0; }
.sk-aktionen { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-left: auto; }
.sk-aktionen > .btn, .sk-aktionen > form > .btn { min-height: 44px; }
.sk-aktionen > .primaer, .sk-aktionen > form:has(> .primaer) { order: 1; } /* Hauptaktion steht immer ganz rechts */
.sk-aktionen > form { margin: 0; display: contents; }
.sk-text { color: var(--text-zweit); max-width: 90ch; }
/* Reiter: Unterseiten desselben Bereichs als Umschalter (wie früher die Finanz-Reiter) */
.gruppen-karte .seiten-kopf.sk { margin-bottom: 4px; }
/* Titel nur für Vorlesehilfen: am Handy und am PC mit linker Leiste steht er schon im Pfad der Kopfleiste */
@media (max-width: 640px) {
  .sk-titel { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .sk-zeile { min-height: 0; }
  .sk-links, .sk-aktionen { width: 100%; }
  .sk-aktionen { margin-left: 0; justify-content: stretch; }
  .sk-aktionen > .btn { flex: 1 1 auto; }
  .sk-aktionen > .primaer, .sk-aktionen > form:has(> .primaer) { order: -1; flex-basis: 100%; } /* am Handy oben und breit */
  .sk-aktionen > .btn.sk-wissen { flex: 0 0 auto; }
}
@media (min-width: 641px) {
  body.hat-leiste .sk-reiter.wie-leiste { display: none; }   /* ab 1.212: dieselben Punkte stehen in der linken Leiste */
  body.hat-leiste .sk-titel { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* Nichts Sichtbares im Kopf (nur der versteckte Titel): kein Abstand */
@media (max-width: 640px) { .seiten-kopf.sk:not(:has(> :not(.sk-titel))) { margin: 0; } }
@media (min-width: 641px) { body.hat-leiste .seiten-kopf.sk:not(:has(> :not(.sk-titel))) { margin: 0; } }
/* Kopfzeile, deren Reiter am PC in der Leiste stehen und die sonst nichts zeigt: keine Höhe */
@media (min-width: 641px) { body.hat-leiste .sk-zeile:not(:has(.sk-aktionen, .sk-angaben, .sk-reiter:not(.wie-leiste))) { min-height: 0; } }

/* Ab 1.314 (SK1/SK2, docs/konzepte/seitenkoepfe-info-symbole.md): „+“ und „⋯“ rechts in der Suchzeile, Suchzeile haftet unter der Kopfleiste */
.sk-symbol { min-width: 52px; min-height: 52px; padding: 0; justify-content: center; flex: none; }
.fl-zeile > .sk-symbol, .fl-zeile > .aktionen-menue > summary { min-height: 52px; min-width: 52px; }
.fl-zeile > .aktionen-menue { flex: none; }
.sk-aktionen > .sk-symbol { min-height: 44px; min-width: 44px; }
@media (max-width: 640px) { .sk-aktionen > .sk-symbol { flex: none; width: 48px; min-width: 48px; order: 0; } .sk-aktionen { justify-content: flex-end; } }
.sk-ansicht-zeile { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sk-ansicht-zeile > .sk-ansicht { flex: 0 1 auto; min-width: 0; margin: 0; }
.sk-neu-mehr { display: flex; align-items: center; gap: 8px; margin-left: auto; }
/* Haftende Suchzeile: der Seitenkopf löst sich auf, damit die Suchzeile an der Seite haftet, nicht nur im Kopf. */
.seiten-kopf.sk:has(> .fl) { display: contents; }
.seiten-kopf.sk:has(> .fl) > * { margin: 0 0 14px; }
.seiten-kopf.sk:has(> .fl) > .fl {
  position: sticky; top: var(--kopf-hoehe, 52px); z-index: 30;
  margin: 0 0 14px; padding: 8px 0; background: var(--flaeche);
}
.seiten-kopf.sk:has(> .fl) > .sk-zeile { margin-bottom: 14px; }
@media print { .seiten-kopf.sk:has(> .fl) > .fl { position: static; } }
@media (max-width: 640px) { .fl-zeile > .sk-symbol, .fl-zeile > .aktionen-menue > summary { min-width: 48px; } }

/* Ab 1.315 (SK3): Kennzahl-Kacheln im Manager kompakter (Finanzen, Verträge …), Auswahlfeld im „⋯“-Menü */

.aktionen-menue .ansicht-liste .menue-feld { padding: 4px 8px; }
.aktionen-menue .ansicht-liste .menue-feld select { width: 100%; min-height: 44px; }

.nav-menue-liste { min-width: 280px; }
/* ab 1.175.1: Geschlossene Menüs (Glocke, Zeit, Konto) gar nicht erst anordnen. Sonst ragt die Meldungsliste (fest
   positioniert) auf dem Handy rechts über den Bildschirm hinaus, und die Seite lässt sich ins Leere nach links wischen. */
.nav-menue:not([open]) > .nav-menue-liste { display: none; }
.nav-menue-liste a { min-height: 44px; }
.nav-menue-liste a.nm-konto { min-height: 56px; padding: 6px 12px; }
.nm-konto-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.nm-konto-text b, .nm-konto-text small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nm-konto-text small { font-weight: 500; color: var(--text-zweit); font-size: .82rem; }

.nm-fuss { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--linie); }
.nm-fuss a.abmelden { flex: 1 1 auto; }
.nm-version { padding: 0 12px; font-size: .78rem; font-weight: 700; color: var(--text-zweit); white-space: nowrap; }

/* Ab 1.366: Stammdaten im Editor (Regionen, Programme, Behälter): Felder oben bündig, Häkchenlisten über die ganze Breite */

.ord-leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.ord-ort { display: contents; } /* ab 1.458.0: Startknopf „Reihenfolge ändern“ als Symbol in der Suchzeile */
.ord-tipp { flex-basis: 100%; }
.ord-liste { margin-bottom: 12px; -webkit-user-select: none; user-select: none; }
.ord-zeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: var(--tipp); padding: 0 6px 0 14px; margin-bottom: 8px; background: var(--karte); border: 1px solid var(--linie); border-radius: var(--ecke-m); will-change: transform; }
.ord-zeile.inaktiv { opacity: .6; }
.ord-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ord-griff { flex: 0 0 auto; width: var(--tipp-min); height: var(--tipp-min); border: 0; border-radius: var(--ecke-m); background: radial-gradient(circle, var(--text-zweit) 1.6px, transparent 2px) center / 9px 9px; cursor: grab; touch-action: none; }
.ord-griff:hover { background-color: var(--flaeche-2); }
.ord-griff:focus-visible { outline: var(--fokus-ring) solid var(--fokus); outline-offset: -2px; box-shadow: inset 0 0 0 5px var(--fokus-innen); }
.ord-liste.zieht { cursor: grabbing; }
.ord-liste.zieht .ord-zeile:not(.ord-zieht) { transition: transform .15s ease; }
.ord-zeile.ord-zieht { position: relative; z-index: 5; box-shadow: var(--schatten); border-color: var(--aktion); transition: none; }
.ord-zieht .ord-griff { cursor: grabbing; }
@media (prefers-reduced-motion: reduce) { .ord-liste.zieht .ord-zeile:not(.ord-zieht) { transition: none; } }

/* Lange Bereichsleisten (.bl-segmente): am Desktop umbrechen statt abschneiden, am Handy bleibt Wischen.
   Reiterleisten (.sk-reiter) brechen ab 1.367 nie um, sie lassen sich seitlich rollen (siehe „Reiterleiste“ am Ende). */
@media (min-width: 641px) {
  .bl-segmente { flex-wrap: wrap; overflow: visible; }
}

/* Probenplanung (ab 1.149, PJ3): drei Schritte untereinander, Soll-Ampel je Gruppe */

.pp-ampel td .ampel-pille { font-weight: 400; font-size: .85rem; }

/* Zusätze an Proben (ab 1.155) */

.zusatz-marke .ico, .zusatz-marke svg { width: 1em; height: 1em; }

.zusatz-antwort select, .zusatz-antwort input[type=text] { width: 100%; }

/* =====================================================================
   Ab 1.163 (NV2, docs/konzepte/navigation.md): eine Navigation, zwei Darstellungen. Dasselbe HTML (#seitenleiste)
   ist ab 1101 px die feste linke Leiste (248 px, schmal 64 px) und darunter die Schublade hinter dem Burger.
   Auf und zu ohne Skript: Schalter #sl-auf (Burger und Schleier sind Beschriftungen dazu).
   ===================================================================== */
.sl-schalter { display: none; }
.sl-burger {
  flex: none; position: relative; cursor: pointer; min-width: 48px; min-height: 44px; border-radius: var(--ecke-m);
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--auf-farbe);
}
.sl-burger:hover, .sl-schalter:checked ~ .kopfleiste .sl-burger { background: rgba(255,255,255,.18); }
.sl-burger:focus-visible { outline: 3px solid var(--fokus); outline-offset: 2px; }
.sl-schleier { display: none; }
.sl-schalter:checked ~ .sl-schleier { display: block; position: fixed; inset: 0; z-index: 79; background: rgba(15, 25, 35, .45); }
.seitenleiste {
  position: fixed; z-index: 80; top: 0; bottom: 0; left: 0; width: min(320px, 88vw);
  display: flex; flex-direction: column; gap: 2px; padding: 8px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  background: var(--karte); color: var(--text); box-shadow: 0 6px 24px rgba(0,0,0,.25);
  transform: translateX(-102%); visibility: hidden; transition: transform .2s ease, visibility 0s linear .2s;
}
.sl-schalter:checked ~ .seitenleiste { transform: none; visibility: visible; transition: transform .2s ease; }
@media (prefers-reduced-motion: reduce) { .seitenleiste, .sl-schalter:checked ~ .seitenleiste { transition: none; } }
.seitenleiste ul { list-style: none; margin: 0; padding: 0; }
.sl-eintrag, .sl-unterpunkt {
  position: relative; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: var(--ecke-m);
  color: var(--text); text-decoration: none; font-weight: 600; line-height: 1.2;
}
a.sl-eintrag:hover, a.sl-unterpunkt:hover { background: var(--flaeche-3); }
.sl-eintrag.aktiv, .sl-unterpunkt.aktiv, .sl-eintrag.aktiv:hover, .sl-unterpunkt.aktiv:hover { background: var(--blau-hell); }
.sl-eintrag:focus-visible, .sl-unterpunkt:focus-visible, .sl-kopf:focus-visible { outline: 3px solid var(--fokus); outline-offset: -3px; }
.sl-sym { width: 1.5em; flex: none; display: inline-flex; justify-content: center; }
.sl-text { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.seitenleiste .nm-konto { min-height: 56px; padding: 6px 12px; }
/* Ab 1.358: „Mein Zugang“ nur einmal (Patrick 28.10.): Steht der Knopf oben in der Kopfleiste (ab 401 px), fehlt er in der Leiste */
@media (min-width: 401px) { .seitenleiste .nm-konto { display: none; } .seitenleiste .nm-konto + .sl-gruppe { margin-top: 0; border-top: 0; } }
.sl-eintrag.gesperrt { color: var(--text-zweit); font-weight: 500; cursor: not-allowed; }
.sl-eintrag.gesperrt .sl-schloss { margin-left: auto; width: 16px; height: 16px; flex: none; } /* ab 1.459 statt Erklärtext */
.seitenleiste .nav-zahl { flex: none; margin-left: 0; }
.sl-gruppe { margin-top: 4px; border-top: 1px solid var(--linie); }
.sl-kopf {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 6px 12px 2px; border-radius: var(--ecke-m);
  font-size: var(--gr-fuss); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-zweit);
}
.sl-kopf::-webkit-details-marker { display: none; }
.sl-kopf .sl-sym { display: none; }
.sl-kopf::after { content: ''; flex: none; margin-left: auto; width: .45em; height: .45em; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-2px); transition: transform .15s; }
.sl-gruppe[open] > .sl-kopf::after { transform: rotate(-135deg) translateY(-1px); }
.sl-gruppe[data-fest] > .sl-kopf { cursor: default; }
.sl-gruppe[data-fest] > .sl-kopf::after { visibility: hidden; }
/* Projektgruppe: Überschrift = Projektname */
.sl-projekt > .sl-kopf { text-transform: none; letter-spacing: 0; font-size: .9rem; color: var(--text); }
.sl-unter { margin: 2px 0 4px 18px !important; padding: 0 0 0 4px !important; border-left: 2px solid var(--linie); }
/* Ebene 2 (1.169): kompakter, nie mitten im Wort umbrechen; zu lang = eine Zeile mit Auslassung (voller Name im Hinweis) */
.sl-unterpunkt { min-height: 36px; gap: 8px; padding: 0 8px; font-size: .9rem; font-weight: 500; }
.sl-unterpunkt .sl-sym { width: 1.25em; }
.sl-unterpunkt .sl-sym svg.ic { width: 18px; height: 18px; }
.sl-unterpunkt .sl-text { overflow: hidden; overflow-wrap: normal; white-space: nowrap; text-overflow: ellipsis; }
.sl-unterpunkt.aktiv { font-weight: 700; }
/* Ab 1.458.0: Zwischenüberschrift in den Unterpunkten (nav_eintrag_html(), Schlüssel 'gruppe') */
.sl-unter-gruppe { padding: 8px 8px 2px; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-zweit); }
.sl-unter-gruppe:first-child { padding-top: 2px; }
.hat-leiste.sl-symbole .seitenleiste .sl-unter-gruppe { display: none; }
.sl-fuss { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: auto; padding-top: 6px; border-top: 1px solid var(--linie); }
.sl-fuss .abmelden { flex: 1 1 0; min-width: 0; color: var(--text-zweit); font-weight: 500; }
.sl-fuss .abmelden .sl-text { overflow-wrap: normal; white-space: nowrap; }
.sl-fuss .nm-version { order: 3; flex: 1 1 100%; padding: 0 12px 4px; }
.sl-fuss .nm-recht { order: 4; font-weight: 500; }
.sl-fuss .nm-recht a { color: inherit; }
.sl-schmal-knopf { display: none; flex: none; min-width: 40px; min-height: 40px; border: none; border-radius: var(--ecke-m); background: transparent; color: var(--text-zweit); cursor: pointer; font-size: 1.1rem; }
.sl-schmal-knopf:hover { background: var(--flaeche-3); }
.sl-schmal-knopf:focus-visible { outline: 3px solid var(--fokus); }

@media (min-width: 1101px) {
  body.hat-leiste { --sl-breite: 264px; padding-left: var(--sl-breite); }
  body.hat-leiste.sl-schmal { --sl-breite: 64px; }
  .hat-leiste .kopfleiste { margin-left: calc(-1 * var(--sl-breite)); padding-left: 10px; }
  .hat-leiste .sl-burger, .hat-leiste .sl-schleier { display: none !important; }
  .hat-leiste .seitenleiste {
    z-index: 50; top: var(--kopf-hoehe, 52px); width: var(--sl-breite); transform: none; visibility: visible; transition: none;
    box-shadow: none; border-right: 1px solid var(--linie);
  }
  .hat-leiste .sl-schmal-knopf { display: inline-flex; align-items: center; justify-content: center; }
  /* Inhalt neben der Leiste (ab 1.164.3, Freiraum ab 1.170.1): Der Inhalt hat eine Höchstbreite und rundherum Luft zur Leiste,
     nach oben und rechts; der Freiraum wächst mit der Bildschirmbreite, bei großen Bildschirmen steht der Inhalt mittig. */
  .hat-leiste { --inhalt-max: 1680px; --frei: clamp(20px, 2.4vw, 72px); }
  .hat-leiste .seite:not(.schmal):not(.seite-schmal), .hat-leiste .vertrag-hinweise {
    max-width: none; margin-left: max(var(--frei), calc((100% - var(--inhalt-max)) / 2)); margin-right: max(var(--frei), calc((100% - var(--inhalt-max)) / 2));
    padding-left: 0; padding-right: 0;
  }
  .hat-leiste .seite:not(.schmal):not(.seite-schmal) { padding-top: clamp(20px, 1.8vw, 48px); padding-bottom: clamp(32px, 3vw, 72px); }
  /* Schmale Leiste: nur Symbole (Regeln unten bei .sl-symbole), Namen als Hinweis beim Darüberfahren */
  .sl-schmal .sl-schmal-knopf .ic { transform: scaleX(-1); }
}
@media (min-width: 641px) {
  /* Die eigene Spalte .seiten-nav entfällt (Patrick 24.10.2026, N1): Unterpunkte stehen in der Leiste (ab 1.358 auch auf dem Tablet) */
  .hat-leiste .seite:has(> .seiten-nav) { display: block; }
  .hat-leiste .seite > .seiten-nav:not(.projekt-bereiche) { display: none; }

  .hat-leiste .seite > .seiten-nav.projekt-bereiche:not(:has(.bl-soll, .bl-neu)) { display: none; }

}
/* Ab 1.358 Mittelmodus 641–1100 px (Tablet, schmales Fenster): links die schmale Leiste nur mit Symbolen, der Burger
   klappt dieselbe Leiste mit Namen über den Inhalt (Schalter #sl-auf, Schleier schließt). Vorher stand hier das ganze
   Menü noch einmal als Block über der Seite. */
@media (min-width: 641px) and (max-width: 1100px) {
  body.hat-leiste { --sl-breite: 64px; padding-left: var(--sl-breite); }
  .hat-leiste .kopfleiste { margin-left: calc(-1 * var(--sl-breite)); padding-left: 10px; }
  .hat-leiste .seitenleiste { z-index: 50; top: var(--kopf-hoehe, 52px); transform: none; visibility: visible; transition: none; box-shadow: none; border-right: 1px solid var(--linie); }
  .hat-leiste .sl-schalter:checked ~ .seitenleiste { z-index: 80; box-shadow: 0 6px 24px rgba(0,0,0,.25); }
}
/* Ab 1.431.0 (AW5): Leiste nur mit Symbolen, eine Regel für beide Fälle: am PC schmal geschaltet (sl-schmal) und im
   Mittelmodus, solange der Burger sie nicht aufklappt. Die Klasse sl-symbole setzt assets/js/leiste.js je nach Breite. */
.hat-leiste.sl-symbole .seitenleiste { width: var(--sl-breite); padding: 8px 6px; align-items: stretch; }
.hat-leiste.sl-symbole .seitenleiste :is(.sl-text, .nm-version) { display: none; }
.hat-leiste.sl-symbole .seitenleiste :is(.sl-eintrag, .sl-unterpunkt, .sl-kopf) { justify-content: center; padding: 0; }
.hat-leiste.sl-symbole .seitenleiste .sl-kopf { min-height: 24px; }
.hat-leiste.sl-symbole .seitenleiste .sl-kopf::after { margin: 0; }
.hat-leiste.sl-symbole .seitenleiste .sl-unter { margin: 2px 0 !important; padding: 0 !important; border-left: none; }
.hat-leiste.sl-symbole .seitenleiste .sl-unterpunkt { background: var(--flaeche-2, transparent); }
.hat-leiste.sl-symbole .seitenleiste .nav-zahl { position: absolute; top: 2px; right: 2px; min-width: 18px; padding: 0 4px; font-size: var(--gr-fuss); line-height: 16px; }
.hat-leiste.sl-symbole .seitenleiste .sl-fuss { flex-direction: column; }
@media (min-width: 2200px) { .hat-leiste { --inhalt-max: min(70vw, 2600px); } }
@media print {
  .seitenleiste, .sl-schleier, .sl-burger { display: none !important; }
  body.hat-leiste { padding-left: 0; }
  .hat-leiste .kopfleiste { margin-left: 0; }
}

/* ---------- Ab 1.165: Seite „Projekt bearbeiten“ (PS1, app/projekt_bearbeiten.php) ---------- */

.pb-gesperrt { display: flex; align-items: flex-start; gap: 6px; }
/* ab 1.311 (MP1): Plandatum je Meilenstein; gelb = Datum vor einem früheren Meilenstein */
.ms-plan-tabelle input[type=date] { max-width: 11rem; }

.pb-pruefliste li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* Ansicht der Projektübersicht (ab 1.167): Wahl und Kurzansicht (Name, Ampel, Status) */
.ansicht-wahl { display: flex; gap: 8px; margin: 0 0 12px; }
label.ansicht-wahl { margin: 0; flex: none; }
label.ansicht-wahl .fl-feld { width: auto; min-width: 120px; }

/* ---------- Kalender der Projektübersicht (ab 1.171) ---------- */
.kalender { padding: 12px; }

.kal-raster { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }

@media (max-width: 760px) {
  .kal-raster { display: block; }

}

/* Darstellungsmenü der Projektübersicht hinter einem Knopf (ab 1.171) */
.ansicht-menue { position: relative; flex: none; }
.ansicht-menue > summary { list-style: none; cursor: pointer; }
.ansicht-menue > summary::-webkit-details-marker { display: none; }
.ansicht-liste { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 180px; background: var(--karte); border: 1px solid var(--rand); border-radius: var(--radius); box-shadow: 0 6px 20px rgba(0,0,0,.18); padding: 4px; display: flex; flex-direction: column; }
.ansicht-liste a { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border-radius: var(--ecke-m); color: var(--text); text-decoration: none; font-weight: 600; }
.ansicht-liste a:hover, .ansicht-liste a:focus-visible { background: var(--flaeche-3); }
/* Aktionsmenü „…“ im Seitenkopf (ab 1.288): Links und Formular-Knöpfe sehen gleich aus */
.aktionen-menue .ansicht-liste { min-width: 240px; max-width: min(360px, 90vw); }
.ansicht-menue.nach-rechts > .ansicht-liste { left: 0; right: auto; } /* ab 1.471.1: Knopf steht links, Liste öffnet nach rechts (app.js) */
.ansicht-liste { max-width: calc(100vw - 16px); }
.aktionen-menue .ansicht-liste form { margin: 0; display: block; }
.aktionen-menue .ansicht-liste button { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: var(--ecke-m); background: none; color: var(--text); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.aktionen-menue .ansicht-liste button:hover, .aktionen-menue .ansicht-liste button:focus-visible { background: var(--flaeche-3); }
.aktionen-menue .ansicht-liste .gefahr-text { color: var(--rot, #b3261e); }
.aktionen-menue .ansicht-liste hr { border: 0; border-top: 1px solid var(--rand); margin: 4px 0; }
.ansicht-liste a.aktiv { background: var(--blau); color: var(--auf-tinte); }
@media (max-width: 700px) { .ansicht-menue > summary .kn-text { display: none; } }

/* ---------- Waagen-Kontrolle mit Prüfgewicht (ab 1.220, AB4): für die Halle, große Zahlen und Knöpfe ---------- */
.wk-zahl { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Info-Symbol „i“ (ab 1.317, SK4): Text als Sprechblase unter dem Symbol; <details>, am PC zusätzlich per Maus/Fokus (app.js) */
.info-i { position: relative; display: inline-block; vertical-align: middle; }
.info-i > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; color: var(--text-zweit); }
.info-i > summary::-webkit-details-marker { display: none; }
.info-i > summary svg { width: 18px; height: 18px; }
.info-i > summary:hover, .info-i > summary:focus-visible, .info-i[open] > summary { color: var(--text); background: var(--flaeche-3); }
.info-i .info-text { position: absolute; left: 0; top: calc(100% + 4px); z-index: 40; width: max-content; max-width: min(420px, calc(100vw - 32px)); padding: 10px 12px; background: var(--info-flaeche); color: var(--info-text); border: 1px solid var(--info-rand); border-radius: var(--radius); box-shadow: 0 6px 20px rgba(0,0,0,.18); font-size: .9rem; font-weight: 400; line-height: 1.4; text-align: left; white-space: normal; }
.info-i .info-text p { margin: 0 0 6px; }
/* Ab 1.381: Sitzt das „i“ in einer haftenden Zelle (Rechte-Tabelle), liegt die Zelle sonst unter der nächsten Zeile und verdeckt den Text */
th:has(> .info-i[open]), td:has(> .info-i[open]) { z-index: 2; }
.info-i .info-text p:last-child { margin-bottom: 0; }
@media (max-width: 700px) { .info-i { position: static; } .info-i .info-text { left: 16px; right: 16px; width: auto; max-width: none; } }
@media print { .info-i { display: none; } }
.info-zeile { margin: 6px 0; line-height: 1; }
/* Ab 1.458.0 (Platz-Regel): Ein „?“ direkt unter einer Überschrift rückt neben sie, statt eine eigene Zeile zu belegen. */
:is(h2, h3):has(+ .info-zeile) { display: inline-block; margin-right: 4px; }
:is(h2, h3) + .info-zeile { display: inline-block; vertical-align: .1em; margin: 0; }
:is(h2, h3) + .info-zeile + * { margin-top: 0; }
.sk-text-info { line-height: 1; }

/* Ab 1.326: Reiter Vertrieb aufgeräumt. Mini-Kacheln für „Geplant“, „+“ in der Titelzeile, Trichter in einer Zeile. */

.schalt-ziel[hidden] { display: none; }

.akquise-trichter li { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }

/* Ab 1.328 (BH2): Tara-Wägung vorziehen (Symbol neben dem Sperrhinweis), Leergewicht der Probe übernehmen */

.schritt.waegung .btn.vorziehen { min-width: 44px; min-height: 44px; padding: 6px 10px; }
.tara-eigen .btn { justify-content: flex-start; text-align: left; white-space: normal; }
@media (max-width: 700px) {
  .schritt.waegung .btn.vorziehen { min-width: 44px; min-height: 44px; padding: 6px 8px; }
}

/* Ab 1.334: Druckansicht „Unterweisungsnachweis“ (unterweisung.php?nachweisdruck=1): Tabellen ohne feste Spaltenbreite, Unterschriften als Bild */

@media print {

  @page { size: A4 landscape; margin: 12mm; }
}

/* Ab 1.337 (SO1): Sortierort aus dem Verzeichnis wählen (Suche mit Liste, „neu anlegen“) */
.so-wahl { position: relative; }
.so-wahl .so-suche { width: 100%; }
.so-liste { position: absolute; left: 0; top: 100%; z-index: 30; min-width: min(340px, 90vw); list-style: none; margin: 4px 0 0; padding: 4px; max-height: 260px; overflow-y: auto; background: var(--karte); border: 1px solid var(--linie); border-radius: var(--ecke-m); box-shadow: var(--schatten); }
.so-liste li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--ecke-m); cursor: pointer; }
.so-liste li:hover, .so-liste li[aria-selected="true"] { background: var(--flaeche-2); }
.so-liste li.gewaehlt { font-weight: 600; }
.so-liste li.so-neu { color: var(--link); font-weight: 600; border-top: 1px solid var(--linie); }
.so-liste li.so-leer { cursor: default; }
.so-meinst .knopfgruppe { flex-wrap: wrap; }
.so-liste .so-vorschlag { margin-left: auto; font-size: var(--gr-fuss); }

/* Ab 1.339: Editor-Ansicht (shared/inc/editor_ansicht.php): nur der Editor, Kopf mit ✕, feste Leiste unten im Formular */
.editor-kopf { display: flex; align-items: center; gap: 12px; margin: 4px 0 6px; }
.editor-titel { flex: 1; min-width: 0; margin: 0; font-size: 1.5rem; line-height: 1.25; overflow-wrap: anywhere; }
.editor-titel .hinweis-pille { font-size: .8rem; vertical-align: middle; }
.editor-unter { margin: 0 0 14px; }
.editor-leiste { position: sticky; bottom: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 16px -16px -16px; padding: 12px 16px; background: var(--karte); border-top: 1px solid var(--linie);
  border-radius: 0 0 var(--radius) var(--radius); box-shadow: 0 -4px 12px rgba(20,35,44,.08); }
.editor-leiste .editor-zu { margin-left: auto; }
@media (max-width: 600px) { /* Handy: Speichern und ✕ in einer Zeile, darunter „Speichern und schließen“ */
  .editor-titel { font-size: 1.25rem; }
  .editor-leiste { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: 10px 12px; margin: 16px -16px -16px; }
  .editor-leiste .editor-speichern { grid-column: 1; grid-row: 1; }
  .editor-leiste .editor-zu { grid-column: 2; grid-row: 1; margin-left: 0; min-width: 52px; padding: 0; justify-content: center; }
  .editor-leiste .editor-zu span { display: none; }
  .editor-leiste .editor-fertig, .editor-leiste > span { grid-column: 1 / -1; }
}

/* Reiterleiste (ab 1.367, reiter_html()): EIN Aussehen für alle Reiter und Umschalter in App und Zentrale – Seitenkopf,
   Status mit Zahl, Reiter in Karten, Monat/Woche, Sprache. Ruhiger Streifen, der gewählte Reiter blau, immer eine Zeile:
   passt sie nicht, rollt man seitlich (Wischen, am PC Mausrad; app.js blendet den Rand weich aus). */
.sk-reiter { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; gap: 4px; padding: 4px;
  background: var(--flaeche-3); border-radius: var(--ecke-l); max-width: 100%; width: fit-content; margin: 0 0 12px; }
.sk .sk-reiter, .kal-modi > .sk-reiter, .kal-kopf .sk-reiter, .uw-druck-kopf .sk-reiter { margin: 0; }
.sk-reiter::-webkit-scrollbar { display: none; }
.sk-reiter .chip-link { flex: none; white-space: nowrap; gap: 6px; min-height: 40px; padding: 0 14px; border: none; border-radius: var(--ecke-m);
  background: transparent; color: var(--text-zweit); font-size: .95rem; }
.sk-reiter button.chip-link { font-family: inherit; cursor: pointer; }
.sk-reiter .chip-link:hover { background: var(--karte); color: var(--text); }
.sk-reiter .chip-link.aktiv, .sk-reiter .chip-link.aktiv:hover { background: var(--blau); color: var(--auf-tinte); box-shadow: 0 1px 2px rgba(20,35,44,.2); }
.sk-reiter .chip-link .rz { background: transparent; padding: 0; font-size: .85rem; font-weight: 600; font-variant-numeric: tabular-nums; opacity: .65; }
.sk-reiter .chip-link .rz.rot { background: var(--rot); color: var(--auf-farbe); opacity: 1; padding: 0 7px; border-radius: var(--ecke-pille); }
.sk-reiter .chip-link.aktiv .rz:not(.rot) { opacity: .85; }
.sk-reiter.rand-links { -webkit-mask-image: linear-gradient(to right, transparent, #000 32px); mask-image: linear-gradient(to right, transparent, #000 32px); }
.sk-reiter.rand-rechts { -webkit-mask-image: linear-gradient(to left, transparent, #000 32px); mask-image: linear-gradient(to left, transparent, #000 32px); }
.sk-reiter.rand-links.rand-rechts { -webkit-mask-image: linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 32px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 32px), transparent); }

/* Ab 1.380: Mehrfachauswahl mit Live-Suche (auswahl_knopf_html, assets/js/auswahl.js) */
.btn.auswahl-knopf { min-height: 52px; flex: none; gap: 6px; }
.btn.auswahl-knopf .badge { font-variant-numeric: tabular-nums; }
.auswahl-inhalt { display: flex; flex-direction: column; gap: 10px; }
.auswahl-inhalt > .fl-suche { flex: none; }
.auswahl-leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.auswahl-schalter { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; cursor: pointer; }
.auswahl-zahl { margin: 0; }
.auswahl-liste { list-style: none; margin: 0; padding: 0; max-height: min(55vh, 520px); overflow-y: auto; border-top: 1px solid var(--rand); }
.auswahl-liste > li { border-bottom: 1px solid var(--rand); }
.auswahl-liste > li.gedimmt { padding: 12px 4px; }
.auswahl-zeile { display: flex; align-items: flex-start; gap: 10px; padding: 10px 4px; cursor: pointer; }
.auswahl-zeile > input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; }
.auswahl-zeile.an { background: var(--flaeche-3); }
.auswahl-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }

/* Importieren ohne Freigabe (ab 1.385): ausgegraut, der Klick führt zur Freigabe */
.btn.ausgegraut { opacity: .55; }

/* =====================================================================
   Platz-Regel (ab 1.457.0, Patrick 07.11.2026, Entscheidung 1a): oben kein verschenkter Platz, gilt für App und Zentrale.
   - Erklärtext steht hinter dem „?“ in der Kopfzeile (seitenkopf()), nie als Absatz über dem Inhalt.
   - Kennzahlen, Reiter, Filter-Knöpfe kompakt, zwischen den Teilen des Kopfs 10 px, zum Inhalt 12 px.
   - Kacheln, die dasselbe zählen wie Filter-Knöpfe, entfallen: Filter-Knöpfe mit Zahl, „Alle“ zuerst (docs/ENTWICKLUNG.md).
   ===================================================================== */
.seiten-kopf.sk { gap: 10px; margin-bottom: 12px; }
.seiten-kopf.sk:has(> .fl) > * { margin-bottom: 10px; }
.seiten-kopf.sk:has(> .fl) > .sk-zeile { margin-bottom: 10px; }
.sk-zeile { min-height: 40px; }
.sk-aktionen > .btn, .sk-aktionen > form > .btn, .sk-aktionen > .sk-symbol { min-height: 40px; }
.sk-aktionen > .sk-symbol { min-width: 40px; }
.sk-zeile:has(> .sk-aktionen) > .sk-links { flex: 1 1 0; }
.sk-hilfe { display: inline-flex; align-items: center; order: -1; }
.sk-hilfe .info-i > summary { width: 36px; height: 36px; border: 1px solid var(--linie); }
.sk-aktionen .info-i .info-text { left: auto; right: 0; }
.bereich-leiste, .kpi-leiste, .fl { margin-bottom: 12px; }
.kpi-leiste { gap: 8px; }
.kpi { padding: 8px 14px; }
.kpi strong { font-size: 1.4rem; }
@supports (container-type: inline-size) { .kpi strong { font-size: clamp(1.05rem, 10cqi, 1.4rem); } }
.sk-reiter .chip-link, .sk-ansicht .chip-link { min-height: 36px; }
@media (min-width: 1101px) {
  .hat-leiste .seite:not(.schmal):not(.seite-schmal) { padding-top: clamp(12px, 1vw, 24px); }
}
@media (max-width: 700px) { .sk-aktionen .info-i { position: static; } .sk-aktionen .info-i .info-text { left: 16px; right: 16px; } }
.sk-neu-mehr > .sk-aktionen, .fl-zeile > .sk-aktionen { margin-left: auto; flex-wrap: nowrap; }
.fl-zeile > .sk-aktionen { flex: none; }
.fl-zeile > .sk-aktionen, .sk-neu-mehr > .sk-aktionen { width: auto; justify-content: flex-end; }
.fl-zeile:has(> .sk-aktionen) { flex-wrap: nowrap; }
.fl-zeile:has(> .sk-aktionen) > :first-child { min-width: 0; }
@media (max-width: 640px) { .fl-zeile > .sk-aktionen .sk-wissen > span { display: none; } .fl-zeile > .sk-aktionen { gap: 6px; } }
/* Ab 1.458.0: einfache Kennzahlen (Wert und Name) in einer Zeile statt zwei, die mit Untertitel bleiben zweizeilig */
.kpi:not(.akzent) { flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 8px }
/* Ab 1.459.0 (Platz-Regel): eigene Bedienleiste der Seite im Seitenkopf ('leiste'); „?“, „Wissen“ und Aktionen stehen
   rechts in ihrer ersten Zeile. Weitere Leisten derselben Seite (z. B. Meilensteine) beginnen darunter in voller Breite. */
.sk-leiste-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sk-leiste-zeile > :first-child { flex: 1 1 0; min-width: 0; margin-bottom: 0; }
.sk-leiste-zeile > .sk-aktionen { order: 1; width: auto; flex: none; margin-left: auto; flex-wrap: nowrap; }
.sk-leiste-zeile > :not(:first-child):not(.sk-aktionen) { order: 2; flex: 1 1 100%; }
@media (max-width: 1100px) { .sk-leiste-zeile > :first-child { flex-basis: 100%; } } /* ohne linke Leiste braucht die Bedienleiste die ganze Breite */
/* Ab 1.459: Kartenkopf mit Überschrift links und Knopf rechts (z. B. Stammdaten → Meldungen „Bearbeiten“) */
.karte-kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.karte-kopf > h2 { margin: 0; }
.karte-kopf > .btn, .karte-kopf-knoepfe { margin-left: auto; }
.karte-kopf-knoepfe { display: flex; gap: 8px; }
@media (max-width: 640px) { .karte-kopf-knoepfe .btn:has(> svg) > span { display: none; } }
/* Ab 1.459: Knöpfe neben einer Suche (fl-zeile) bleiben am Handy klein in einer Zeile; Texte in <span> weichen dem Symbol */
@media (max-width: 640px) {
  .fl-zeile > .sk-aktionen > .btn, .fl-zeile > .sk-aktionen > .primaer { flex: none; flex-basis: auto; order: 0; }
  .fl-zeile > .sk-aktionen > .primaer { order: 1; }
  .fl-zeile > .sk-aktionen > .btn:has(> svg, > .ic) > span { display: none; }
}
/* Ab 1.459: Kopfzeile nur mit „?“/„Wissen“ (z. B. Daten prüfen, Etiketten, Tagesablauf): schmal statt eigener breiter Zeile */
.seiten-kopf.sk.sk-schmal { margin-bottom: 6px; }
.sk-schmal .sk-zeile { min-height: 0; }
.sk-schmal .sk-aktionen > .btn, .sk-schmal .sk-aktionen > .sk-symbol { min-height: 32px; padding-top: 0; padding-bottom: 0; font-size: .85rem; }
.sk-schmal .sk-aktionen > .sk-symbol { min-width: 32px; }
/* Ab 1.459: Zeile mit Schild/Ergebnis und dem „?“ dahinter */
.mit-info { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.mit-info > p { margin: 0; }
/* Ab 1.471.2 (Patrick 12.11.): Am Handy stehen Suche, Filter, Ansicht, „+“ und „⋯“ immer in EINER Zeile. Die Knöpfe werden
   schmal (44 px, nur Symbol), die Suche nimmt den Rest und darf schmal werden. Gilt für alle Seiten mit Suchzeile. */
@media (max-width: 640px) {
  .fl-zeile { flex-wrap: nowrap; gap: 6px; }
  .fl .fl-zeile > .fl-suche, .fl[data-fl="fl-projekte-daten"] .fl-suche { flex: 1 1 0; min-width: 64px; }
  .fl-zeile > .btn, .fl-zeile > .fl-knopf, .fl-zeile > .sk-symbol,
  .fl-zeile > .ansicht-menue > summary, .fl-zeile > .aktionen-menue > summary { min-width: 44px; padding: 0 8px; justify-content: center; }
  .fl-zeile > .sk-symbol { width: 44px; padding: 0; }
  .fl-zeile > .ansicht-menue > summary .kn-text { display: none; }
}
