/* Kommunikationsportal – Design-System (Kunde, Arbeiter, Verwaltung)
   Gestaltung „06 Edelweiss“ (26.10.2026): Markenfarben aus dem Logo —
   Lavendel, Lila, Weiß, dunkles Logo-Blau als Schrift. Hell ist die
   Voreinstellung, weil die Arbeiter im Tageslicht lesen. Die frühere
   schwarze Fassung gibt es weiter, aber nur mit data-theme="dark" am
   <html>-Element; nicht an die Systemeinstellung gekoppelt.

   Regeln:
   - Jede Farbe ist ein Token auf :root. Komponenten nennen nie einen Farbwert.
   - Karten ohne Schatten und ohne Rahmen, Trennung über Fläche und Abstand.
   - Status unterscheidet sich in der Helligkeit, nicht nur im Farbton
     (dringend L* 39 · nicht möglich 63 · offen 77 · bestellt 87 · erledigt 96).
   - Schrift mindestens 4.5:1; #8C84B8 (3.4:1 auf Weiß) nie für Text.
   - Tippflächen mindestens 44 px. Bewegung nur auf transform/opacity. */

/* ---------------- Schriften: selbst gehostet (public/fonts/, SIL OFL 1.1).
   Nur Latin wird immer geladen; Latin-ext holt der Browser erst, wenn ein
   Zeichen daraus vorkommt (z. B. ł, ș in Namen). */
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/static/fonts/montserrat-latin-600-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/static/fonts/montserrat-latin-ext-600-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* Montserrat 500 für Überschriften (04.11.2026: 600 wirkte zu verspielt, 500 liegt näher am Logo-Schriftzug). */
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/static/fonts/montserrat-latin-500-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/static/fonts/montserrat-latin-ext-500-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Mulish"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/static/fonts/mulish-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Mulish"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/static/fonts/mulish-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Mulish"; font-style: normal; font-weight: 500 600; font-display: swap;
  src: url(/static/fonts/mulish-latin-600-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Mulish"; font-style: normal; font-weight: 500 600; font-display: swap;
  src: url(/static/fonts/mulish-latin-ext-600-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Mulish"; font-style: normal; font-weight: 650 800; font-display: swap;
  src: url(/static/fonts/mulish-latin-700-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Mulish"; font-style: normal; font-weight: 650 800; font-display: swap;
  src: url(/static/fonts/mulish-latin-ext-700-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* Kyrillisch (Russisch, seit 04.11.2026). Griechisch und Armenisch haben Montserrat
   und Mulish nicht — dort nimmt der Browser die Systemschrift des Geräts. */
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/static/fonts/montserrat-cyrillic-500-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/static/fonts/montserrat-cyrillic-600-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Mulish"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/static/fonts/mulish-cyrillic-400-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Mulish"; font-style: normal; font-weight: 500 600; font-display: swap;
  src: url(/static/fonts/mulish-cyrillic-600-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Mulish"; font-style: normal; font-weight: 650 800; font-display: swap;
  src: url(/static/fonts/mulish-cyrillic-700-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
  /* Flächen */
  --bg: #F6F5FB;            /* Seitengrund */
  --surface: #FFFFFF;       /* Karten, Felder */
  --surface-2: #EFEDF7;     /* Flächen in Karten: Notiz, Reiter-Schiene */
  --surface-3: #DCD7EE;     /* Lavendel: gewählter Reiter, Zähler */

  /* Schrift — Logo-Blau, Nebentext violettgrau */
  --ink: #204069;           /* auf Grund 9.7:1, auf Weiß 10.5:1 */
  --ink-2: #33496E;         /* Feldbeschriftungen, 9.1:1 */
  --muted: #5A5872;         /* auf Grund 6.3:1, auf Lavendel 4.9:1 */

  /* Linien. Karten haben keinen Rahmen (--card-line); Bedienelemente schon. */
  --line: #E6E2F2;          /* Haarlinien in Tabellen und Listen, Schmuck */
  --line-strong: #8C84B8;   /* Rahmen von Feldern und Knöpfen, 3.4:1 auf Weiß */
  --card-line: transparent;

  /* Marke */
  --accent: #5E5596;        /* Hauptknöpfe, Links; Weiß darauf 6.5:1 */
  --accent-hover: #463F78;  /* Weiß darauf 9.4:1 */
  --accent-text: #5E5596;   /* Lila als Schrift: 6.0:1 auf Grund, 4.7:1 auf Lavendel */
  --accent-soft: #DCD7EE;   /* Lavendel: aktive Chips, gewählte Einträge */
  --accent-soft-ink: #2E2856; /* Schrift auf Lavendel, 9.7:1 */
  --accent-line: #C9C3E3;
  --accent-ink: #FFFFFF;
  --plum: #7B2D7F;
  --lilac: #8C84B8;         /* Mittel-Lila: nur Rahmen und Figur, nie Schrift */

  /* Status. Fläche + Schrift, jeweils eigene Helligkeitsstufe. */
  --urgent: #B3203A;        --urgent-ink: #FFFFFF;    /* L* 39, 6.6:1 */
  --blocked: #BC86BF;       --blocked-ink: #2A0B2C;   /* L* 63, 6.2:1 */
  --open-fill: #EDB54A;     --open-fill-ink: #3D2600; /* L* 77, 7.7:1 */
  --ordered: #DCD7EE;       --ordered-ink: #2E2856;   /* L* 87, 9.7:1 */
  --done-fill: #ECF7EF;     --done-fill-ink: #1B6A3D; /* L* 96, 6.0:1 */

  /* Status als Schrift ohne Fläche (auf Weiß / Grund) */
  --danger: #B3203A;        /* 6.6 / 6.1 */
  --danger-soft: #FBE9EB;   /* Fehlerkasten; --danger darauf 5.6:1 */
  --on-danger: #FFFFFF;
  --open: #8A4B00;          /* 6.8 / 6.3; auf --open-soft 6.0 */
  --open-soft: #FCEFD3;
  --done: #1B6A3D;          /* 6.6 / 6.1; auf --done-soft 6.0 */
  --done-soft: #ECF7EF;
  --warn-soft: #FCEFD3;
  --warn-line: #EDB54A;

  /* Dunkler Kopfbereich der Arbeiter-App (Logo-Negativfassung darauf) */
  --hero-bg: #204069;
  --hero-ink: #FFFFFF;      /* 10.5:1 */
  --hero-muted: #DCD7EE;    /* 7.5:1 */
  --hero-track: rgba(255, 255, 255, .18);
  --hero-bar: #DCD7EE;
  --hero-done: #9FE0B5;     /* 6.9:1 */
  --hero-urgent: #FF9AA6;   /* 5.2:1 */

  /* Maskottchen Delta */
  --delta-face: #204069;
  --delta-front: #FFFFFF;
  --delta-front-line: #DCD7EE;
  --delta-mid: #8C84B8;
  --delta-back: #7B2D7F;
  --delta-cheek: #C9A3CB;
  --delta-err-fill: #F6E9F6;
  --delta-err-line: #7B2D7F;

  /* Über Fotos und für Dialoge — unabhängig von hell/dunkel */
  --scrim: rgba(0, 0, 0, .62);
  --on-scrim: #FFFFFF;
  --scrim-btn: rgba(255, 255, 255, .14);
  --lightbox-bg: rgba(0, 0, 0, .96);
  --backdrop: rgba(32, 64, 105, .42);
  --qr-bg: #FFFFFF;         /* QR-Codes immer auf Weiß, auch in der dunklen Fassung */

  /* Druck: immer Schwarz auf Weiß */
  --print-paper: #FFFFFF;
  --print-ink: #000000;
  --print-line: #999999;
  --print-sub: #444444;
  --print-faint: #666666;

  /* Form */
  --r-xs: 8px;
  --r-sm: 10px;
  --radius-sm: 10px;      /* Altname, weiter benutzt */
  --r: 14px;              /* Felder, kleine Flächen */
  --radius: 14px;         /* Altname */
  --r-lg: 20px;           /* Karten */
  --r-xl: 24px;
  --pill: 999px;

  /* Flach. Nur das Blatt, das sich über die Seite legt, wirft etwas. */
  --shadow: none;
  --shadow-lift: 0 24px 64px -24px rgba(32, 64, 105, .32);

  --font: "Mulish", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Montserrat", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --ease: cubic-bezier(.32, .72, 0, 1);
  /* leicht überschwingend: für Dinge, die „aufploppen“ (Delta, Kalender) */
  --ease-spring: cubic-bezier(.34, 1.4, .64, 1);
  color-scheme: light;
}

/* Dunkle Fassung (vom 21.09. bis 26.10.2026 die Voreinstellung): echtes Schwarz,
   neutrale Grautöne, Lila-Akzent. Status mit eigener Helligkeitsleiter
   (bestellt 23 · erledigt 10 · dringend 64 · offen 78 · nicht möglich 33). */
:root[data-theme="dark"] {
  --bg: #000000;
  --surface: #0c0c0e;
  --surface-2: #151518;
  --surface-3: #1e1e23;
  --ink: #ffffff;
  --ink-2: #d6d6db;
  --muted: #8a8a94;
  --line: #1f1f25;
  --line-strong: #4a4a55;
  --card-line: #1f1f25;
  --accent: #6d4aee;        /* Weiß darauf 5.4:1 */
  --accent-hover: #5b3ae0;  /* vorher #7f5eff: Weiß darauf nur 4.2:1 */
  --accent-text: #a992ff;   /* 8.2:1 auf Schwarz */
  --accent-soft: #191233;
  --accent-soft-ink: #e4dcff;
  --accent-line: #3a2d6b;
  --accent-ink: #ffffff;
  --urgent: #ff6b6b;        --urgent-ink: #1a0004;
  --blocked: #7b2d7f;       --blocked-ink: #ffffff;
  --open-fill: #f5b544;     --open-fill-ink: #1a0004;
  --ordered: #3a2d6b;       --ordered-ink: #e4dcff;
  --done-fill: #052016;     --done-fill-ink: #34d399;
  --danger: #ff6b6b;
  --danger-soft: #260f10;
  --on-danger: #1a0004;
  --open: #f5b544;
  --open-soft: #211905;
  --done: #34d399;
  --done-soft: #052016;
  --warn-soft: #211905;
  --warn-line: #4a3813;
  --hero-bg: #151518;
  --hero-ink: #ffffff;
  --hero-muted: #d6d6db;
  --hero-track: rgba(255, 255, 255, .14);
  --hero-bar: #a992ff;
  --hero-done: #9fe0b5;
  --hero-urgent: #ff9aa6;
  --delta-face: #ffffff;
  --delta-front: #151518;
  --delta-front-line: #d8d6eb;
  --delta-mid: #a9a6cc;
  --delta-back: #c38ec0;
  --delta-cheek: #7b2d7f;
  --delta-err-fill: #260f10;
  --delta-err-line: #c38ec0;
  --backdrop: rgba(0, 0, 0, .6);
  --shadow-lift: 0 24px 64px -20px rgba(0, 0, 0, .9);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-text); }
/* Überschriften: Montserrat 600. Sie ist breit — deshalb kleiner und ohne
   enge Laufweite, sonst bricht jeder Objektname um. */
h1, h2, h3 { font-family: var(--font-head); font-weight: 500; line-height: 1.2; margin: 0; letter-spacing: .01em; text-wrap: balance; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.12rem; }
p { margin: 0; text-wrap: pretty; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
:where(button, a, input, textarea, select):focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-xs);
}

.wrap { max-width: 640px; margin: 0 auto; padding: 16px 16px calc(40px + env(safe-area-inset-bottom, 0px)); }

/* ---------------- Knöpfe */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 18px;
  border: 1.5px solid transparent; border-radius: var(--pill);
  font: inherit; font-family: var(--font-head); font-weight: 600; font-size: .92rem; line-height: 1.2; letter-spacing: .01em;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease), transform .12s var(--ease), opacity .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.975); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-2); border-color: var(--accent); }
/* Seit 17.11.2026 auch mit Rahmen: rahmenlos wirkten „Bearbeiten“, „Löschen“,
   „Widerrufen“ usw. wie Text und nicht wie Knöpfe (Daniel). */
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); border-color: var(--accent); }
.btn-danger { background: var(--danger); color: var(--on-danger); }
.btn-ghost-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-ghost-danger:hover { background: var(--danger-soft); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: .84rem; }
.btn-lg { min-height: 52px; font-size: 1rem; letter-spacing: .03em; padding: 0 24px; }
.btn-block { display: flex; width: 100%; }
.btn-on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-soft-ink); }
.plus { font-size: 1.3em; font-weight: 500; line-height: 1; margin-top: -2px; }

/* ---------------- Formulare */
.field { display: block; margin-bottom: 16px; }
.field-label { display: block; font-weight: 700; font-size: .88rem; margin-bottom: 6px; color: var(--ink-2); }
.field-label .muted { font-weight: 400; }
input[type=text], input[type=password], input[type=search], input[type=number], input[type=date], input[type=time], input[type=url], textarea, select {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: var(--r);
  padding: 12px 14px; min-height: 48px;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
textarea { resize: vertical; min-height: 96px; }
/* Safari (iPad/iPhone) gibt Datum- und Uhrzeitfeldern eine eigene Mindestbreite
   und zentriert den Wert — dann ragen sie über ihre Spalte hinaus (04.11.2026,
   am iPad gesehen). Ohne Eigen-Darstellung halten sie sich an die Breite; der
   Auswahl-Dialog beim Antippen bleibt. */
input[type=date], input[type=time] {
  -webkit-appearance: none; appearance: none;
  display: block; min-width: 0; max-width: 100%; text-align: left;
}
input[type=date]::-webkit-date-and-time-value, input[type=time]::-webkit-date-and-time-value { text-align: left; margin: 0; }
/* Safari ohne Eigen-Darstellung: der Wert klebte am oberen Rand und ein leeres
   Feld fiel in sich zusammen (Testrunde 15.11.2026). Feste Höhe und Zeilenhöhe
   setzen den Text in die Mitte, auch wenn das Feld noch leer ist. */
input[type=date], input[type=time] { height: 48px; line-height: 22px; padding-top: 12px; padding-bottom: 12px; }
input[type=date]::-webkit-date-and-time-value, input[type=time]::-webkit-date-and-time-value { min-height: 22px; line-height: 22px; }
input[type=date]::-webkit-datetime-edit, input[type=time]::-webkit-datetime-edit { padding: 0; line-height: 22px; }
.date-text { display: block; font-size: .84rem; color: var(--muted); margin-top: 6px; }
input:focus, textarea:focus, select:focus {
  border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 34%, transparent);
}
.form-error { color: var(--danger); background: var(--danger-soft); border-radius: var(--r); padding: 11px 14px; margin-bottom: 14px; font-size: .92rem; }
.form-section { margin-bottom: 20px; }
.check-field { display: flex; align-items: center; gap: 10px; }
.check-field input { width: auto; accent-color: var(--accent); }

/* ---------------- Laden */
.loading { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 80px 0; color: var(--muted); }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--line-strong); border-top-color: var(--accent); animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- Kopfbereiche */
.scan-head { padding: 14px 2px 20px; }
.scan-head-small { padding: 4px 2px 14px; }
.scan-head-small .scan-head-name { font-weight: 700; font-size: 1.05rem; }
.eyebrow { font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 8px; }
.scan-desc { margin-top: 8px; }
.scan-next { margin-top: 10px; color: var(--accent-text); font-weight: 700; }
.new-btn { margin-bottom: 22px; }
.section-title {
  font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700;
  color: var(--muted); margin: 24px 0 10px; display: flex; align-items: center; gap: 8px;
}
.topbar { display: flex; align-items: center; gap: 12px; min-height: 44px; margin-bottom: 8px; }
.topbar-title { font-weight: 600; color: var(--muted); font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.back { display: inline-flex; align-items: center; min-height: 44px; padding-right: 8px; color: var(--accent-text); font-weight: 700; text-decoration: none; }
.hint { font-size: .88rem; color: var(--muted); margin: 0 2px 12px; }
/* Kennzeichnung „maschinell übersetzt“: klein und still; die Tippfläche reicht über negative Außenränder auf 44 px. */
.tr-badge { font: inherit; font-size: .75rem; font-weight: 400; color: var(--muted); background: none; border: 0; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; padding: 12px 8px; margin: -12px -8px; white-space: nowrap; }
.tr-badge.tr-static { text-decoration: none; cursor: default; padding: 0; margin: 0; }
.tr-badge[aria-pressed=true] { color: var(--accent-text); }
/* Verwaltung: Dialog „Übersetzungen“ */
.hint-warn { background: var(--warn-soft); border: 1px solid var(--warn-line); border-radius: var(--r); padding: 10px 12px; color: var(--ink); }
.tr-field { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.tr-field h3 { margin: 0 0 4px; font-size: 1rem; }
.tr-row { margin: 10px 0 0; }
.tr-row-head { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.tr-row-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
/* Datenschutz-Hinweis über dem Foto-Feld: sichtbar, aber kein Alarm. */
.photo-hint { display: flex; gap: 8px; align-items: flex-start; background: var(--warn-soft); border: 1px solid var(--warn-line); border-radius: var(--r); padding: 10px 12px; margin: 0 0 10px; font-size: .9rem; line-height: 1.35; }
.photo-hint svg { flex: none; margin-top: 2px; color: var(--open); }
.hint-danger { color: var(--danger); background: var(--danger-soft); padding: 11px 14px; border-radius: var(--r); margin-bottom: 16px; }

/* ---------------- Reiter */
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface); border-radius: var(--pill); margin-bottom: 16px; }
.tab {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; border-radius: var(--pill); font-weight: 700; font-size: .93rem;
  color: var(--muted); text-decoration: none; border: 0; background: none; font-family: inherit; cursor: pointer;
  transition: color .15s var(--ease), background-color .15s var(--ease);
}
.tab[aria-selected="true"] { background: var(--accent-soft); color: var(--accent-soft-ink); }
.tab-count { font-size: .76rem; min-width: 22px; padding: 1px 7px; border-radius: var(--pill); background: var(--surface-2); color: var(--ink-2); text-align: center; font-variant-numeric: tabular-nums; }
.tab[aria-selected="true"] .tab-count { background: var(--surface); color: var(--accent-soft-ink); }

/* ---------------- Kalender (Arbeiter) */
.cal { background: var(--surface); border: 1px solid var(--card-line); border-radius: var(--r-lg); padding: 14px; margin-bottom: 18px; box-shadow: var(--shadow); }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.cal-title { font-family: var(--font-head); font-weight: 500; font-size: 1rem; }
.cal-nav { display: flex; gap: 4px; }
.cal-nav button {
  width: 44px; height: 44px; border-radius: var(--pill); border: 1.5px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 1.1rem; cursor: pointer;
  display: grid; place-items: center;
  transition: background-color .15s var(--ease), transform .12s var(--ease);
}
.cal-nav button:hover { background: var(--surface-2); }
.cal-nav button:active { transform: scale(.94); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-wd { text-align: center; font-size: .68rem; font-weight: 700; color: var(--muted); padding-bottom: 6px; letter-spacing: .04em; }
.cal-day {
  position: relative; height: 44px;
  display: grid; place-items: center; gap: 0;
  border: 0; background: none; font: inherit; font-size: .9rem; font-variant-numeric: tabular-nums;
  color: var(--ink); border-radius: var(--pill); cursor: pointer;
  transition: background-color .15s var(--ease), color .15s var(--ease), transform .12s var(--ease);
}
.cal-day:active { transform: scale(.9); }
.cal-day-off { color: color-mix(in srgb, var(--muted) 55%, transparent); }
.cal-day:hover:not(.cal-day-sel) { background: var(--surface-2); }
.cal-day-service::after {
  content: ''; position: absolute; bottom: 5px; left: 50%; translate: -50% 0;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
}
.cal-day-today { font-weight: 700; color: var(--accent-text); }
.cal-day-sel { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.cal-day-sel.cal-day-today { color: var(--accent-ink); }
.cal-day-sel::after { background: var(--accent-ink); }
.cal-legend { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: .78rem; color: var(--muted); }
.cal-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: inline-block; }

/* ---------------- Listen: Reklamationen */
.ticket-list { display: flex; flex-direction: column; gap: 10px; }
.ticket-card {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--card-line); border-radius: var(--r-lg);
  padding: 14px; font: inherit; color: inherit; cursor: pointer; box-shadow: var(--shadow);
  transition: border-color .15s var(--ease), transform .12s var(--ease);
}
.ticket-card:hover { border-color: var(--accent-line); }
.ticket-card:active { transform: scale(.99); }
.ticket-card-urgent { box-shadow: inset 4px 0 0 var(--urgent); }
.tc-thumb { position: relative; flex: 0 0 60px; height: 60px; border-radius: var(--r); overflow: hidden; background: var(--surface-2); display: grid; place-items: center; color: var(--accent-text); font-size: 1.35rem; }
.tc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tc-count { position: absolute; right: 4px; bottom: 4px; font-size: .68rem; font-weight: 700; background: var(--scrim); color: var(--on-scrim); border-radius: 6px; padding: 0 5px; }
.tc-body { flex: 1; min-width: 0; }
.tc-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: .8rem; color: var(--muted); align-items: baseline; }
/* Erledigt-Zeitpunkt leicht hervorgehoben: das ist im Archiv die eigentliche Nachricht. */
.tc-date-done { color: var(--done); font-weight: 700; }
.tc-id { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.tc-qr { font-weight: 600; color: var(--muted); }
.tc-urgent { color: var(--urgent-ink); background: var(--urgent); font-weight: 700; border-radius: var(--pill); padding: 0 8px; }
.tc-note { margin-top: 3px; font-size: .98rem; font-weight: 700; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.tc-note.muted { font-weight: 400; }
.tc-sub { margin-top: 3px; font-size: .8rem; color: var(--muted); }
.tc-chevron { color: var(--lilac); font-size: 1.4rem; line-height: 1; flex-shrink: 0; }

/* ---------------- Leerzustände */
.empty-state { text-align: center; padding: 48px 16px; display: grid; gap: 8px; justify-items: center; }
.empty-inline { padding: 22px 0; }
.empty-icon { width: 52px; height: 52px; border-radius: var(--pill); background: var(--surface-2); display: grid; place-items: center; font-size: 1.4rem; color: var(--muted); margin-bottom: 4px; }
.empty-state h1 { font-size: 1.4rem; }

/* ---------------- Foto-Auswahl */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.photo { position: relative; aspect-ratio: 1; border-radius: var(--r); overflow: hidden; background: var(--surface-2); display: grid; place-items: center; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-add {
  border: 2px dashed var(--line-strong); background: var(--surface); color: var(--accent-text); font-weight: 700; cursor: pointer;
  display: grid; place-items: center; gap: 4px; text-align: center; font-size: .78rem; padding: 8px;
  transition: border-color .15s var(--ease), color .15s var(--ease);
}
.photo-add:hover { border-color: var(--accent); color: var(--accent-text); }
.photo-add-icon { font-size: 1.5rem; line-height: 1; }
.photo-remove {
  position: absolute; top: 5px; right: 5px; width: 30px; height: 30px; border-radius: var(--pill);
  border: 0; background: var(--scrim); color: var(--on-scrim); cursor: pointer; font-size: .85rem;
  display: grid; place-items: center;
}
/* Sichtbar 30 px, tippbar 44 px. */
.photo-remove::after { content: ''; position: absolute; inset: -7px; }
.progress { height: 6px; border-radius: var(--pill); background: var(--surface-3); overflow: hidden; margin-bottom: 14px; }
.progress-bar { height: 100%; width: 0; background: var(--accent); transition: transform .2s var(--ease); }

/* ---------------- Kategorien */
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 16px; }
.cat-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 80px; padding: 12px 8px;
  background: var(--surface); color: var(--ink);
  border: 1.5px solid var(--line-strong); border-radius: var(--r-lg);
  font: inherit; font-weight: 700; font-size: .88rem; cursor: pointer;
  transition: border-color .15s var(--ease), background-color .15s var(--ease), transform .12s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.cat-btn:active { transform: scale(.97); }
.cat-btn-on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-soft-ink); }
.cat-btn-danger.cat-btn-on { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }
.cat-icon { font-size: 1.45rem; line-height: 1; }
.cat-label { text-align: center; line-height: 1.2; }

/* ---------------- Detailansicht */
.ticket-detail { display: grid; gap: 16px; }
.td-head { display: grid; gap: 6px; }
.td-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.td-qr { color: var(--muted); font-weight: 700; font-size: .92rem; }
.td-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.td-meta { color: var(--muted); font-size: .88rem; }
.td-note { background: var(--surface); border-radius: var(--r-lg); padding: 16px; white-space: pre-wrap; word-break: break-word; }
.td-planned { background: var(--accent-soft); color: var(--accent-soft-ink); padding: 12px 16px; border-radius: var(--r-lg); font-weight: 700; }
.td-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.td-img { border: 0; padding: 0; background: none; border-radius: var(--r); overflow: hidden; cursor: pointer; aspect-ratio: 1; }
.td-img img { width: 100%; height: 100%; object-fit: cover; }
.td-done { background: var(--done-soft); border-radius: var(--r-lg); padding: 16px; display: grid; gap: 8px; }
.td-done-head { font-weight: 700; color: var(--done); }
.td-close-note { background: var(--surface); }
.td-delete-info { font-size: .84rem; color: var(--muted); }
.td-actions { display: grid; gap: 8px; }
body.scan .td-actions.td-sticky, body.worker .td-actions.td-sticky {
  position: sticky; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 5;
}

/* ---------------- Plaketten */
/* Status-Plaketten: Fläche + Schrift aus den Status-Token. Die Helligkeit
   der Fläche trägt den Unterschied, der Farbton bestätigt ihn nur. */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .76rem; font-weight: 700; padding: 3px 10px; border-radius: var(--pill);
  background: var(--surface-3); color: var(--accent-soft-ink); letter-spacing: .01em;
}
.badge-urgent { background: var(--urgent); color: var(--urgent-ink); }
.badge-blocked { background: var(--blocked); color: var(--blocked-ink); }
.badge-open, .badge-mat-open { background: var(--open-fill); color: var(--open-fill-ink); }
.badge-mat-ordered { background: var(--ordered); color: var(--ordered-ink); }
.badge-done, .badge-mat-delivered { background: var(--done-fill); color: var(--done-fill-ink); }
.badge-cat { background: var(--surface-2); color: var(--muted); }
.badge-today { background: var(--accent-soft); color: var(--accent-soft-ink); }
.chip { display: inline-flex; align-items: center; padding: 4px 11px; border-radius: var(--pill); font-size: .8rem; font-weight: 700; background: var(--surface-2); color: var(--ink-2); }
.chip-urgent { background: var(--urgent); color: var(--urgent-ink); }
.chip-warn { background: var(--open-fill); color: var(--open-fill-ink); }
.chip-ok { background: var(--done-fill); color: var(--done-fill-ink); }

/* ---------------- Dialoge */
.dialog {
  border: 0; padding: 0; background: transparent; max-width: min(520px, calc(100vw - 32px)); width: 100%;
  color: var(--ink);
}
.dialog-wide { max-width: min(760px, calc(100vw - 32px)); }
.dialog::backdrop { background: var(--backdrop); backdrop-filter: blur(4px); }
.dialog-body {
  background: var(--surface); border-radius: var(--r-xl); padding: 24px;
  box-shadow: var(--shadow-lift); display: grid; gap: 4px;
  /* minmax(0, 1fr): ohne das wächst die Spalte auf die Breite des längsten
     Inhalts (z. B. die QR-Adresse) — am Handy ragte das Fenster links hinaus
     und der Griff stand nicht mehr mittig (Testrunde 15.11.2026). */
  grid-template-columns: minmax(0, 1fr);
  max-height: min(84dvh, 760px); overflow-y: auto; overflow-x: hidden;
}
.dialog-title { font-size: 1.15rem; margin-bottom: 6px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.pick-list { display: grid; gap: 8px; margin: 14px 0; }

/* ---------------- Lightbox */
.lightbox { max-width: none; width: 100vw; height: 100dvh; background: var(--lightbox-bg); display: grid; place-items: center; border: 0; padding: 0; }
.lightbox::backdrop { background: var(--lightbox-bg); }
.lb-img { max-width: 100vw; max-height: 100dvh; object-fit: contain; }
.lb-counter { position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); left: 50%; translate: -50% 0; color: var(--on-scrim); font-size: .85rem; font-variant-numeric: tabular-nums; }
.lb-btn { position: absolute; width: 48px; height: 48px; border-radius: var(--pill); border: 0; background: var(--scrim-btn); color: var(--on-scrim); font-size: 1.4rem; cursor: pointer; display: grid; place-items: center; }
.lb-close { top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; }
.lb-prev { left: 12px; top: 50%; translate: 0 -50%; }
.lb-next { right: 12px; top: 50%; translate: 0 -50%; }
.lb-open { position: absolute; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); left: 50%; translate: -50% 0; color: var(--on-scrim); font-size: .86rem; min-height: 44px; display: inline-flex; align-items: center; }

/* ---------------- Hinweis-Einblendung */
.toast {
  position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); translate: -50% 12px;
  max-width: calc(100vw - 32px); background: var(--ink); color: var(--bg);
  padding: 13px 20px; border-radius: var(--pill); font-weight: 700; font-size: .92rem;
  box-shadow: var(--shadow-lift); opacity: 0; pointer-events: none;
  transition: opacity .18s var(--ease), translate .18s var(--ease); z-index: 100;
}
.toast.show { opacity: 1; translate: -50% 0; }
.toast[data-kind="error"] { background: var(--danger); color: var(--on-danger); }

/* ---------------- Arbeiter-App */
body.worker { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 4px 8px env(safe-area-inset-bottom, 0px);
}
.tabbar-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 64px; text-decoration: none; color: var(--muted); font-size: .72rem; font-weight: 700;
  -webkit-tap-highlight-color: transparent;
  transition: color .15s var(--ease);
}
.tabbar-item-on { color: var(--accent-soft-ink); }
.tabbar-icon { font-size: 1.25rem; line-height: 1; width: 64px; border-radius: var(--pill); transition: background-color .15s var(--ease); }
.tabbar-item-on .tabbar-icon { background: var(--accent-soft); }

.obj-list { display: grid; gap: 12px; }
.obj-card {
  display: block; width: 100%; text-align: left; padding: 16px; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--card-line); border-radius: var(--r-lg); box-shadow: var(--shadow);
  transition: border-color .15s var(--ease), transform .12s var(--ease);
  font: inherit; cursor: pointer;
}
.obj-card:active { transform: scale(.99); }
.obj-card-today { border-color: var(--accent-line); }
.obj-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.obj-name { font-size: 1.06rem; margin: 0; }
.obj-addr { color: var(--muted); font-size: .88rem; margin-top: 3px; }
.obj-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.obj-sub { color: var(--muted); font-size: .84rem; margin-top: 8px; }
.obj-note { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: .9rem; }
.obj-detail-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.notes-box { background: var(--warn-soft); border: 1px solid var(--warn-line); border-radius: var(--r-lg); padding: 16px; margin-bottom: 16px; }
.note-item + .note-item { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--warn-line); }
.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
/* Montserrat läuft breiter: zwei Knöpfe nebeneinander dürfen umbrechen statt
   über den Rand zu ragen. */
.quick-actions .btn { min-width: 0; white-space: normal; text-align: center; line-height: 1.2; padding: 8px 12px; }

.task-list { display: grid; gap: 8px; }
.task-row {
  display: flex; flex-direction: column; gap: 12px;
  padding: 16px; background: var(--surface); border: 1px solid var(--card-line); border-radius: var(--r-lg);
}
.task-overdue { box-shadow: inset 4px 0 0 var(--urgent); }
.task-due { box-shadow: inset 4px 0 0 var(--accent); }
/* Klare Zustände (Testrunde 15.11.2026): heute erledigt / zurückgestellt /
   alt. Nicht fällige Aufgaben zeigt die Arbeiter-App gar nicht. */
.task-done { box-shadow: inset 4px 0 0 var(--done-fill-ink); background: var(--done-fill); }
.task-blocked { box-shadow: inset 4px 0 0 var(--blocked); }
.task-old { opacity: .68; }
.task-flag.task-flag-done { color: var(--done-fill-ink); display: inline-flex; align-items: center; }
.task-actions-one { grid-template-columns: 1fr; }
.admin-back { margin-top: 12px; }
.task-main { min-width: 0; flex: 1; }
.task-title { font-weight: 700; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.task-desc, .task-meta { font-size: .84rem; margin-top: 3px; }
.task-flag { color: var(--danger); font-weight: 700; }
.task-flag-due { color: var(--accent-text); }
.task-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.task-actions .btn { width: 100%; }
@media (min-width: 560px) {
  .task-row { flex-direction: row; align-items: flex-start; justify-content: space-between; }
  .task-actions { display: flex; flex-shrink: 0; }
  .task-actions .btn { width: auto; }
}
.archive-box { margin-top: 20px; }
.archive-box summary { cursor: pointer; font-weight: 700; color: var(--accent-text); padding: 10px 0; min-height: 44px; display: flex; align-items: center; }

/* ---------------- Material */
.prod-list { display: grid; gap: 8px; }
.prod-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; background: var(--surface); border: 1.5px solid var(--card-line); border-radius: var(--r-lg);
  transition: border-color .15s var(--ease), background-color .15s var(--ease);
}
.prod-row-on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-soft-ink); }
.prod-row-on .muted { color: var(--accent-soft-ink); }
.prod-main { min-width: 0; }
.prod-name { font-weight: 700; }
.prod-unit { font-size: .84rem; }
.qty { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.qty-btn {
  width: 44px; height: 44px; border-radius: var(--pill);
  border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font: inherit; font-size: 1.25rem; font-weight: 700; cursor: pointer;
  display: grid; place-items: center;
  transition: background-color .15s var(--ease), transform .12s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.qty-btn:active { transform: scale(.9); }
.qty-btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.qty-plus { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.qty-value { min-width: 2ch; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.cart-bar {
  position: fixed; left: 0; right: 0; bottom: calc(72px + env(safe-area-inset-bottom, 0px)); z-index: 35;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.cart-info { font-weight: 700; font-size: .92rem; }
.req-list { display: grid; gap: 10px; }
.req-card { padding: 16px; background: var(--surface); border: 1px solid var(--card-line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.req-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.req-items { margin: 10px 0 0; padding-left: 20px; }
.req-note { margin-top: 8px; font-size: .9rem; }
.req-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.maps-btn { margin-top: 10px; gap: 6px; }

/* ---------------- Anmeldung / Konto */
.login-form { margin-top: 20px; }
.lang-list { display: grid; gap: 8px; }
.logout-btn { margin-top: 28px; }

/* ---------------- Verwaltung */
body.admin .wrap { max-width: 1100px; }
.login-card { max-width: 420px; margin: 8vh auto 0; background: var(--surface); border: 1px solid var(--card-line); border-radius: var(--r-xl); padding: 32px 28px; }
.login-card h1 { font-size: 1.45rem; margin-bottom: 4px; }
.login-card > .muted { margin-bottom: 22px; font-size: .93rem; }

.appbar {
  position: sticky; top: 0; z-index: 10;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
/* Zwei Zeilen: oben Logo und Konto, darunter die Bereiche in einer Leiste
   (04.11.2026). Vorher brach das Menü bei schmalem Fenster in drei Zeilen um. */
.appbar-inner { max-width: 1100px; margin: 0 auto; padding: 10px 16px 4px; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand user" "nav nav"; align-items: center; gap: 4px 16px; }
.appbar .brand { grid-area: brand; min-width: 0; }
.appbar .userbox { grid-area: user; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-head); font-weight: 600; color: var(--ink); }
.brand-logo { height: 34px; width: auto; display: block; }
.brand-name { padding-left: 12px; border-left: 1.5px solid var(--line); font-size: .95rem; }
.appbar .brand-logo { height: 28px; }
.appbar .brand-name { font-size: .88rem; }
@media (max-width: 640px) { .appbar .brand-name { display: none; } }
.login-card .brand { margin-bottom: 22px; flex-direction: column; align-items: flex-start; gap: 10px; }
.login-card .brand-name { padding-left: 0; border-left: 0; }
.login-card .brand-logo { height: 44px; }
.nav { grid-area: nav; display: flex; gap: 2px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -8px; padding: 0 8px 4px; }
.nav::-webkit-scrollbar { display: none; }
.nav a, .nav button { flex: none; white-space: nowrap; }
.nav a, .nav button {
  padding: 8px 12px; border-radius: var(--pill); text-decoration: none; color: var(--muted);
  font-weight: 700; font-size: .9rem; border: 0; background: none; font-family: inherit; cursor: pointer;
  min-height: 44px; display: inline-flex; align-items: center;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.nav a:hover, .nav button:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"], .nav button[aria-current="page"] { background: var(--accent-soft); color: var(--accent-soft-ink); }
.userbox { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.who { color: var(--muted); font-size: .88rem; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 22px 0 18px; }
.card { background: var(--surface); border: 1px solid var(--card-line); border-radius: var(--r-lg); padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card h2 { margin-bottom: 12px; }
/* min(…, 100%): in schmalen Karten nie breiter als der Platz — sonst ragen Felder hinaus. */
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.grid-2 > * { min-width: 0; }
/* Aktionen in Tabellen dürfen umbrechen, statt aus der Tabelle zu ragen. */
.cell-actions { text-align: right; }
.cell-actions > * { white-space: nowrap; }
.cell-nowrap { white-space: nowrap; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar select, .toolbar input { width: auto; flex: 1 1 180px; }
.seg { display: inline-flex; padding: 3px; background: var(--surface); border-radius: var(--pill); gap: 2px; }
.seg button {
  border: 0; background: none; font: inherit; font-weight: 700; font-size: .88rem; color: var(--muted);
  padding: 8px 16px; border-radius: var(--pill); cursor: pointer; min-height: 44px;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.seg button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-soft-ink); }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 0 12px 10px; font-weight: 700; }
.table td { padding: 12px; border-top: 1px solid var(--line); vertical-align: top; }
.row-off { opacity: .55; }
/* Tabellen am Handy als Karten: Name und Einheit waren abgeschnitten
   (Testrunde 15.11.2026). Jede Zelle bekommt ihre Spaltenüberschrift. */
@media (max-width: 640px) {
  .table-stack thead { display: none; }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack tr { padding: 12px 0; border-top: 1px solid var(--line); }
  .table-stack tr:first-child { border-top: 0; }
  .table-stack td { border: 0; padding: 3px 0; }
  .table-stack td[data-label]::before { content: attr(data-label); display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
  .table-stack .cell-actions { text-align: left; display: flex; flex-wrap: wrap; gap: 8px; padding-top: 10px; }
}
.dialog-danger { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
.plain-list { list-style: none; margin: 0 0 14px; padding: 0; }
.plain-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.plain-list li:last-child { border-bottom: 0; }

.qr-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.qr-card { position: relative; margin: 0; }
.qr-select { position: absolute; top: 14px; right: 14px; width: 20px; height: 20px; accent-color: var(--accent); }
.qr-top { display: flex; gap: 14px; }
.qr-img { width: 92px; height: 92px; border-radius: var(--r); cursor: pointer; background: var(--qr-bg); padding: 5px; border: 1px solid var(--line); }
.qr-info { min-width: 0; flex: 1; }
.qr-name { font-family: var(--font-head); font-weight: 500; font-size: 1.02rem; }
.qr-desc { color: var(--muted); font-size: .86rem; margin-top: 2px; }
.qr-stats { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.stat { font-size: .8rem; font-weight: 700; padding: 4px 11px; border-radius: var(--pill); background: var(--surface-2); color: var(--ink-2); text-decoration: none; }
.stat-open { background: var(--open-fill); color: var(--open-fill-ink); }
.qr-last { color: var(--muted); font-size: .8rem; margin-top: 8px; }
.qr-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.banner { background: var(--warn-soft); border: 1px solid var(--warn-line); border-radius: var(--r-lg); padding: 14px 16px; margin-bottom: 18px; font-size: .92rem; }
.banner code { background: color-mix(in srgb, var(--surface) 60%, transparent); padding: 1px 6px; border-radius: 6px; }
.blocked-box { box-shadow: inset 4px 0 0 var(--blocked); }
.new-qr summary { cursor: pointer; font-family: var(--font-head); font-weight: 600; color: var(--accent-text); min-height: 44px; display: flex; align-items: center; }
.url-box { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; background: var(--surface-2); border-radius: var(--r); padding: 10px 12px; margin-top: 14px; min-width: 0; }
/* Die Adresse bricht um statt das Fenster zu verbreitern; ganz lesbar ist sie
   ohnehin nützlicher als mit „…“ abgeschnitten. */
.url-box code { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; word-break: break-all; font-size: .84rem; }
.big-qr { width: 100%; max-width: 280px; margin: 16px auto; background: var(--qr-bg); padding: 14px; border-radius: var(--r); }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); display: grid; gap: 10px; }
.danger-zone p { font-size: .88rem; color: var(--muted); }
.schedule-box { border: 0; border-radius: var(--r-lg); padding: 16px; margin-bottom: 16px; background: var(--surface-2); }
/* Auswahlfelder im Einsatzplan nicht über die ganze Breite ziehen (04.11.2026). */
.schedule-box select, .schedule-box input[type=time] { max-width: 300px; }
.schedule-box .grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 12px; max-width: 616px; }
.day-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.day-box {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 13px; min-height: 44px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--pill);
  font-weight: 600; cursor: pointer; user-select: none;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.day-box:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-soft-ink); }
.day-box input { accent-color: var(--accent); }
.warn-text { color: var(--danger); font-weight: 600; }
.admin-list .ticket-card { box-shadow: none; }

/* ---------------- Druck */
#print-area { display: none; }
@media print {
  @page { size: A4; margin: 10mm; }
  body { background: var(--print-paper); color: var(--print-ink); }
  body * { visibility: hidden; }
  body.printing #print-area, body.printing #print-area * { visibility: visible; }
  /* Die Verwaltungsseite darf beim Druck keinen Platz belegen. Nur unsichtbar
     (visibility) reichte nicht: ihre Höhe ergab eine zweite, leere Seite
     (Testrunde 15.11.2026, A4 vom iPhone). */
  body.printing > :not(#print-area) { display: none !important; }
  body.printing #print-area { display: flex; flex-wrap: wrap; gap: 6mm; position: static; }
  .label { width: 58mm; border: 1px solid var(--print-line); border-radius: 3mm; padding: 4mm; text-align: center; page-break-inside: avoid; background: var(--print-paper); color: var(--print-ink); }
  .label img { width: 44mm; height: 44mm; margin: 0 auto 2mm; }
  .label-name { font-family: var(--font-head); font-weight: 600; font-size: 11pt; }
  .label-desc { font-size: 8pt; color: var(--print-sub); margin-top: 1mm; }
  .label-hint { font-size: 7pt; color: var(--print-faint); margin-top: 2mm; }
  .splash, .delta-toast { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ================================================================ Anfassen
   Eindrücken passiert sofort, Loslassen federt zurück. Bewegung bleibt auf
   transform und opacity, damit nichts ruckelt. Wer reduzierte Bewegung
   eingestellt hat, bekommt sie am Ende der Datei wieder abgeschaltet. */

.btn, .obj-card, .ticket-card, .cat-btn, .qty-btn, .tabbar-item, .cal-day,
.day-box, .tab, .seg button, .nav button, .prod-row, .photo-add, .photo-remove,
.archive-box summary, .new-qr summary, .stat, .back, .cal-nav button, .reset,
.cal-toggle, .cal-today-btn {
  touch-action: manipulation;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
}

/* Der Druck nach unten darf NICHT animiert werden — sonst hinkt er dem Finger
   nach. Nur das Zurückfedern beim Loslassen bekommt Zeit. */
.btn:active, .obj-card:active, .ticket-card:active, .cat-btn:active,
.qty-btn:active, .cal-day:active, .day-box:active, .prod-row:active,
.tab:active, .seg button:active { transition-duration: 0s; }

.obj-card, .ticket-card, .prod-row {
  transition: border-color .15s var(--ease), background-color .15s var(--ease),
              transform .22s var(--ease), box-shadow .22s var(--ease);
}
.obj-card:active, .ticket-card:active { transform: scale(.985); box-shadow: none; }
.prod-row:active { transform: scale(.99); }
.tab:active, .seg button:active { transform: scale(.96); }
.tabbar-icon { transition: transform .2s var(--ease); }
.tabbar-item:active .tabbar-icon { transform: scale(.86); }
.cal-nav button:active { transform: scale(.9); }

/* Mengen springen kurz auf, damit die Zahl den Tipp quittiert. */
.qty-value { transition: transform .18s var(--ease); }
.qty-value-pop { transform: scale(1.3); }

/* Erledigte Aufgabe sackt weg, bevor die Liste neu aufbaut. */
.task-row { transition: opacity .26s var(--ease), transform .26s var(--ease), border-color .15s var(--ease); }
.task-row-settling { opacity: .35; transform: scale(.985); pointer-events: none; }
.task-row-settling .task-actions { opacity: .4; }

/* Karten, die gerade verschwinden (widerrufene Anfrage, erledigte Meldung). */
.leaving { opacity: 0; transform: scale(.97); transition: opacity .22s var(--ease), transform .22s var(--ease); pointer-events: none; }

/* Hinweis kommt federnd, nicht linear. */
.toast { transition: opacity .2s var(--ease), translate .26s var(--ease), scale .26s var(--ease); scale: .96; }
.toast.show { scale: 1; }

/* Dialoge sind auf dem Handy Blätter, die von unten hochkommen — mit Griff. */
@media (max-width: 560px) {
  .dialog {
    max-width: none; width: 100%; margin: 0;
    position: fixed; left: 0; right: 0; bottom: 0; top: auto;
  }
  .dialog-body {
    border-radius: 26px 26px 0 0;
    box-shadow: 0 -1px 0 var(--line-strong), var(--shadow-lift);
    padding-top: 14px;
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    max-height: 88dvh;
    overscroll-behavior: contain;
  }
  .dialog-body::before {
    content: ''; display: block; width: 38px; height: 4px; border-radius: 2px;
    background: var(--line-strong); margin: 0 auto 16px;
  }
  .dialog[open] { animation: sheet-in .3s var(--ease); }
}
@keyframes sheet-in { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* Listen federn nicht die ganze Seite mit, wenn man am Ende weiterzieht. */
.dialog-body, .table-wrap, .prod-list { overscroll-behavior: contain; }

@media (prefers-reduced-motion: reduce) {
  .dialog[open] { animation: none; }
  .task-row-settling, .leaving { transform: none; }
  .qty-value-pop { transform: none; }
}

/* ================================================================ Symbole
   Strich-Symbole sitzen auf der Schriftlinie und erben die Farbe. Sie sind
   Beiwerk: der Text trägt die Bedeutung, nicht das Bild. */
.chip svg, .btn svg, .badge svg, .obj-note svg, .note-item svg, .td-done-head svg {
  flex: 0 0 auto;
  vertical-align: -0.16em;
  opacity: .9;
}
.chip, .badge { gap: 5px; }
.obj-note svg, .note-item svg { opacity: .75; }
.tabbar-icon { display: grid; place-items: center; height: 24px; }
.empty-icon svg { opacity: .8; }
.tc-thumb svg { opacity: .55; }

/* ================================================================ Seitenwechsel
   Der neue Bildschirm kommt von der Seite herein, der alte geht mit. Zurück
   läuft dieselbe Bewegung andersherum — daran erkennt der Daumen ohne Nachdenken,
   ob er tiefer geht oder zurück. Browser ohne View-Transitions tauschen hart
   aus; die App funktioniert identisch, sie sieht nur nüchterner aus. */
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root), ::view-transition-new(root) {
    animation-duration: .26s;
    animation-timing-function: var(--ease);
    /* Beide Bildschirme liegen während des Wechsels übereinander. */
    mix-blend-mode: normal;
  }
  html[data-nav="forward"]::view-transition-new(root) { animation-name: nav-in-right; }
  html[data-nav="forward"]::view-transition-old(root) { animation-name: nav-out-left; }
  html[data-nav="back"]::view-transition-new(root) { animation-name: nav-in-left; }
  html[data-nav="back"]::view-transition-old(root) { animation-name: nav-out-right; }
}
@keyframes nav-in-right { from { transform: translateX(26px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes nav-out-left { from { transform: none; opacity: 1; } to { transform: translateX(-16px); opacity: 0; } }
@keyframes nav-in-left  { from { transform: translateX(-26px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes nav-out-right{ from { transform: none; opacity: 1; } to { transform: translateX(16px); opacity: 0; } }

/* Die untere Leiste bleibt beim Wechsel stehen. Sie gehört zum Gerät,
   nicht zur Seite — sie darf nicht mitwandern. */
.tabbar { view-transition-name: tabbar; }
::view-transition-group(tabbar) { animation: none; }
::view-transition-old(tabbar), ::view-transition-new(tabbar) { animation: none; mix-blend-mode: normal; }

/* Weicher Einstieg: Karten kommen gestaffelt von unten, ohne View-Transitions
   blendet auch der ganze Bildschirm ein. Nur bei Seitenwechseln, nie beim
   Abhaken — sonst zappelt die Liste bei jedem Tipp. */
@media (prefers-reduced-motion: no-preference) {
  .view-enter-fade { animation: view-fade .28s var(--ease) both; }
  .view-enter :is(.ticket-list, .obj-list, .req-list, .pick-list, .prod-list, .task-list) > * { animation: rise-in .42s var(--ease) both; }
  .view-enter :is(.ticket-list, .obj-list, .req-list, .pick-list, .prod-list, .task-list) > :nth-child(2) { animation-delay: .04s; }
  .view-enter :is(.ticket-list, .obj-list, .req-list, .pick-list, .prod-list, .task-list) > :nth-child(3) { animation-delay: .08s; }
  .view-enter :is(.ticket-list, .obj-list, .req-list, .pick-list, .prod-list, .task-list) > :nth-child(4) { animation-delay: .12s; }
  .view-enter :is(.ticket-list, .obj-list, .req-list, .pick-list, .prod-list, .task-list) > :nth-child(n+5) { animation-delay: .16s; }
}
@keyframes view-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise-in { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }

/* Die Ladeanzeige erscheint erst nach 220 ms und blendet sich ein, statt
   aufzublitzen. Unter der Schwelle sieht man sie nie. */
.loading { animation: fade-in .2s var(--ease); }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ================================================================ Tageskopf
   Eine große Zahl trägt den Bildschirm, alles andere ordnet sich unter.
   Vorher waren Überschrift, Kalender und Karten gleich laut — dann hat der
   Blick keinen Anfang und die Seite wirkt wie ein Formular. */
.day-head { padding: 10px 2px 18px; }
.day-head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.day-main { min-width: 0; }
.day-title { font-size: 2.4rem; letter-spacing: -0.005em; line-height: 1.04; }
.day-count { font-variant-numeric: tabular-nums; }
.day-unit { font-size: 1.1rem; font-weight: 600; letter-spacing: 0; color: var(--muted); display: block; margin-top: 2px; }
.day-sub { margin-top: 6px; font-size: .92rem; }
.day-head-done .day-title { color: var(--done); }
.day-alert { display: flex; align-items: center; gap: 7px; margin-top: 14px; color: var(--danger); font-weight: 600; font-size: .92rem; }
.day-note { margin-top: 14px; font-size: .92rem; }

/* Der Ring wird erfasst, nicht gelesen — deshalb keine Prozentzahl. */
.ring-wrap { position: relative; width: 64px; height: 64px; flex: 0 0 64px; display: grid; place-items: center; }
.ring { position: absolute; inset: 0; width: 64px; height: 64px; }
.ring circle { fill: none; stroke-width: 5; }
.ring-track { stroke: var(--surface-3); }
.ring-bar { stroke: var(--accent); stroke-linecap: round; transition: stroke-dasharray .5s var(--ease); }
.day-head-done .ring-bar { stroke: var(--done); }
.ring-text { font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.ring-check { color: var(--done); }
@media (prefers-reduced-motion: reduce) { .ring-bar { transition: none; } }

/* ================================================================ Wochenstreifen
   Der Kalender steht oben, wie besprochen — aber als Woche. Der volle Monat
   nahm den halben ersten Bildschirm für einen Schalter ein, den man an den
   meisten Tagen nicht anfasst. Ein Tipp holt ihn zurück. */
.cal-compact { padding: 8px 6px 4px; }
.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-week .cal-day { height: auto; padding: 7px 0 9px; display: grid; gap: 2px; place-items: center; border-radius: var(--r); }
.cal-day-wd { font-size: .64rem; font-weight: 700; letter-spacing: .06em; opacity: .65; }
.cal-day-n { font-size: 1rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.cal-week .cal-day-service::after { position: static; margin-top: 1px; }
.cal-foot { display: flex; align-items: center; gap: 8px; padding: 6px 6px 4px; }
.cal-toggle {
  font: inherit; font-size: .8rem; font-weight: 600; color: var(--muted);
  background: none; border: 0; cursor: pointer; padding: 6px 4px;
  display: inline-flex; align-items: center; gap: 5px; min-height: 44px;
}
.cal-toggle:hover { color: var(--ink); }
.cal-caret { font-size: .9em; line-height: 1; }
.cal-today-btn {
  margin-left: auto; font: inherit; font-size: .8rem; font-weight: 600;
  color: var(--accent-text); background: none; border: 0; cursor: pointer;
  padding: 6px 4px; min-height: 44px;
}
.cal .cal-head .cal-toggle { font-family: var(--font-head); font-size: 1rem; color: var(--ink); }

/* ================================================================ Filter (Verwaltung)
   Oben rechts neben der Überschrift, aufklappbar. Gesetzte Filter stehen als
   Chips darunter — sonst sucht man später, warum eine Liste leer ist. */
.head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-panel {
  background: var(--surface); border: 1px solid var(--card-line); border-radius: var(--r-lg);
  padding: 16px 18px; margin-bottom: 14px; display: grid; gap: 4px;
}
.filter-panel .field { margin-bottom: 10px; }
.filter-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip-filter { border: 0; font: inherit; font-weight: 700; cursor: pointer; background: var(--accent-soft); color: var(--accent-soft-ink); min-height: 32px; }
.chip-filter:hover { background: var(--surface-3); color: var(--ink); }

/* Positionen einer von Hand angelegten Material-Anfrage */
.req-lines { display: grid; gap: 8px; margin-bottom: 10px; }
.req-line { display: grid; grid-template-columns: 1fr 88px auto; gap: 8px; align-items: center; }
.req-line input { width: 100%; }

/* Startzeiten je Wochentag */
.start-grid { display: grid; gap: 8px; margin-top: 10px; }
.start-row { display: grid; grid-template-columns: 2.6rem minmax(0, 150px) minmax(0, 1fr); gap: 10px; align-items: center; }
.start-day { font-weight: 700; font-size: .9rem; }
.start-row > * { min-width: 0; }
.start-row input[type=time] { width: 100%; }
.start-same { font-size: .8rem; line-height: 1.25; color: var(--muted); min-width: 0; }

/* Beginn des Einsatzes: die Uhrzeit steht rechts neben dem Objektnamen, weil
   der Tag chronologisch läuft und die Liste danach sortiert ist. */
.obj-time {
  font-size: .92rem; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--accent-text); letter-spacing: -0.01em; flex: 0 0 auto;
}
.obj-time-line { font-weight: 700; color: var(--accent-text); font-variant-numeric: tabular-nums; }

/* ================================================================ Kopfbereich Arbeiter
   Dunkles Logo-Blau, unten abgerundet, Negativ-Logo darauf. Steht auf den
   Hauptseiten (Heute, Material, Konto, Anmeldung); Unterseiten behalten den
   hellen Zurück-Balken. Reicht auf dem Handy bis an den Rand. */
.hero {
  margin: -16px -16px 18px;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 20px 24px;
  background: var(--hero-bg); color: var(--hero-ink);
  border-radius: 0 0 28px 28px;
}
@media (min-width: 672px) { .hero { border-radius: 0 0 var(--r-xl) var(--r-xl); } }
.hero-logo { width: 168px; height: auto; display: block; margin-bottom: 18px; }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.hero-top .hero-logo { margin-bottom: 0; }
.hero h1 { color: var(--hero-ink); }
.hero .muted, .hero .eyebrow, .hero .day-unit, .hero .day-note { color: var(--hero-muted); }
.hero .day-head { padding: 0; }
.hero .day-head-done .day-title { color: var(--hero-done); }
.hero .day-alert { color: var(--hero-urgent); }
.hero .ring-track { stroke: var(--hero-track); }
.hero .ring-bar { stroke: var(--hero-bar); }
.hero .day-head-done .ring-bar, .hero .ring-check { stroke: var(--hero-done); color: var(--hero-done); }
.hero .ring-text { color: var(--hero-ink); }
.hero-sub { margin-top: 6px; }

/* Kundenseite: Logo oben */
.scan-logo { width: 196px; height: auto; display: block; margin: 6px 0 22px; }
.scan-brand-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 22px; }
.scan-brand-row .scan-logo { margin: 0; min-width: 0; }

/* ================================================================ Start-Animation
   public/splash.js. data-splash deckt die Seite ab, bis das Logo geladen ist
   (höchstens 0,5 s), danach liegt .splash darüber. Nach spätestens 2 s ist
   beides weg; Antippen beendet sofort. */
html[data-splash] body { overflow: hidden; }
html[data-splash]::after { content: ''; position: fixed; inset: 0; z-index: 999; background: var(--bg); }
.splash {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center; padding: 24px;
  background: var(--bg); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.splash-logo { width: min(82vw, 440px); height: auto; overflow: visible; }

/* ================================================================ Maskottchen Delta
   Das vordere Logo-Dreieck mit Gesicht. Erscheint nur an Momenten (Danke,
   Laden, Fehler, leere Liste, Tag erledigt), fächert einmal auf, blinzelt
   einmal und steht dann still. Ersetzt nie den Text daneben. */
.delta { display: inline-block; line-height: 0; flex: none; }
.delta svg { width: 100%; height: auto; overflow: visible; }
.delta-front { fill: var(--delta-front); stroke: var(--delta-front-line); }
.delta-mid { stroke: var(--delta-mid); }
.delta-back { stroke: var(--delta-back); }
.delta-dot { fill: var(--delta-face); }
.delta-line { fill: none; stroke: var(--delta-face); stroke-linecap: round; stroke-linejoin: round; }
.delta-cheek { fill: var(--delta-cheek); opacity: .7; }
.delta-error .delta-front { fill: var(--delta-err-fill); stroke: var(--delta-err-line); }
.delta-mid, .delta-back { transform-box: view-box; transform-origin: 223.75px 208px; }
.delta-eyes { transform-box: fill-box; transform-origin: center; }

@media (prefers-reduced-motion: no-preference) {
  .delta-mid { animation: delta-fan-mid .62s var(--ease) both; }
  .delta-back { animation: delta-fan-back .7s var(--ease) .06s both; }
  .delta-eyes { animation: delta-blink .22s ease-in-out .78s 1; }
}
@keyframes delta-fan-mid { from { transform: rotate(-8deg); } to { transform: none; } }
@keyframes delta-fan-back { from { transform: rotate(-15deg); } to { transform: none; } }
@keyframes delta-blink { 0%, 100% { transform: none; } 50% { transform: scaleY(.1); } }

/* Zustandsansicht: Delta über Überschrift und Text */
.empty-state .delta { margin-bottom: 4px; }
.empty-inline .delta { margin-bottom: 0; }
.loading .delta { margin-right: 4px; }
.loading { flex-wrap: wrap; font-weight: 700; color: var(--muted); }
.loading-text { display: inline-flex; align-items: center; gap: 8px; }

/* Danke-Sprechblase mit Delta, unten rechts, verschwindet von selbst */
.delta-toast {
  position: fixed; right: 12px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 100;
  display: flex; align-items: flex-end; gap: 6px; max-width: calc(100vw - 24px);
  opacity: 0; translate: 0 16px; scale: .92; transform-origin: 100% 100%; pointer-events: none;
  transition: opacity .3s var(--ease), translate .55s var(--ease-spring), scale .55s var(--ease-spring);
}
.delta-toast.show { opacity: 1; translate: 0 0; scale: 1; pointer-events: auto; }
/* Erst kommt Delta hoch und fächert auf, dann die Sprechblase — wie beim Start der App. */
.delta-toast .delta { translate: 0 22px; opacity: 0; transition: translate .6s var(--ease-spring), opacity .25s var(--ease); }
.delta-toast.show .delta { translate: 0 0; opacity: 1; }
.delta-toast .delta-bubble { scale: .8; opacity: 0; transform-origin: 100% 100%; transition: scale .45s var(--ease-spring), opacity .2s var(--ease); }
.delta-toast.show .delta-bubble { scale: 1; opacity: 1; transition-delay: .22s; }
.delta-toast .delta-mid { animation-delay: .2s; }
.delta-toast .delta-back { animation-delay: .26s; }
.delta-toast .delta-eyes { animation-delay: .95s; }
body.worker .delta-toast, body.worker .toast { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
.delta-bubble {
  background: var(--ink); color: var(--bg);
  font-weight: 700; font-size: .92rem; line-height: 1.3;
  padding: 10px 14px; border-radius: 16px 16px 4px 16px;
}

/* Tag erledigt: Delta statt Ring */
.ring-wrap .delta { width: 64px; }

/* ================================================================ Tippflächen
   Unter dem Finger mindestens 44 px. Mit Maus bleiben die kleinen Knöpfe
   der Verwaltung kompakt. */
@media (pointer: coarse) {
  .btn-sm { min-height: 44px; }
  .chip-filter { min-height: 44px; }
  .qr-select { width: 28px; height: 28px; }
}

/* ---------------- Feedback zur App (24.11.2026) */
.fab {
  position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 20;
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px;
  border: 0; border-radius: var(--pill); background: var(--accent); color: var(--accent-ink);
  font: inherit; font-weight: 700; cursor: pointer; box-shadow: var(--shadow-lift);
}
.fab:hover { background: var(--accent-hover); }
.fab:focus-visible { outline: 3px solid var(--accent-hover); outline-offset: 3px; }
/* In der Arbeiter-App liegt die untere Leiste darunter. */
body.worker .fab { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
/* Platz am Seitenende, damit die Schaltfläche nichts verdeckt. */
body.has-fab #app::after { content: ''; display: block; height: 72px; }
.fb-area { display: grid; gap: 8px; margin-top: 8px; }
.fb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fb-chip {
  min-height: 44px; padding: 0 14px; border: 1.5px solid var(--line-strong); border-radius: var(--pill);
  background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer;
}
.fb-chip[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-soft-ink); border-color: var(--accent); }
.legal-links { margin: 18px 0 8px; text-align: center; font-size: .88rem; color: var(--muted); }
.legal-links a { color: var(--accent-text); }
.fb-card { display: grid; gap: 8px; }
.fb-card-head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.fb-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.fb-unread { font-weight: 700; }
.legal-page { max-width: 720px; margin: 0 auto; padding: 24px 16px 56px; }
.legal-page h1 { margin-bottom: 8px; }
.legal-page h2 { margin: 22px 0 6px; font-size: 1.05rem; }
.legal-page p, .legal-page li { line-height: 1.55; }
.legal-page .todo { background: var(--open-soft); color: var(--open); border-radius: 8px; padding: 1px 6px; font-weight: 700; }
/* Datenschutzinformation für Mitarbeiter: Sprachwahl, ruhige Hinweise, Druck auf einer A4-Seite */
.legal-lang { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 4px; }
.legal-lang-note { font-size: .88rem; color: var(--muted); }
.legal-actions { margin-top: 24px; }
.legal-page ul { padding-left: 1.2em; margin: 4px 0; }
@media print {
  body.legal-doc * { visibility: visible; }
  body.legal-doc .no-print { display: none !important; }
  body.legal-doc .legal-page { max-width: none; padding: 0; column-count: 2; column-gap: 8mm; font-size: 7.4pt; line-height: 1.25; }
  body.legal-doc .legal-page img { width: 40mm; height: auto; }
  body.legal-doc .legal-page h1 { font-size: 11pt; margin: 2mm 0; column-span: all; }
  body.legal-doc .legal-page h2 { font-size: 8pt; margin: 2mm 0 .5mm; }
  body.legal-doc .legal-page p, body.legal-doc .legal-page li { line-height: 1.25; margin: 0 0 .8mm; }
  body.legal-doc .legal-page section { break-inside: avoid; }
}
.fb-list { display: grid; gap: 12px; }

.fb-prompt { display: grid; gap: 10px; justify-items: start; margin-top: 22px; padding: 16px; background: var(--surface); border-radius: var(--r-xl); }
.fb-prompt p { margin: 0; font-weight: 700; }

/* Übersetzen unter dem Reklamationstext */
.td-translate { margin: 8px 0 12px; }
.td-translation { margin-top: 8px; }
