/* ============================================================================
   ALLROUNDER — MDC Maschen Distribution Center
   Ein Stilbestand fuer alle sechs Apps (seit 22.08.2026).
   Dark Industrial / Premium · eine Familie mit der MDC-Homepage
   ----------------------------------------------------------------------------
   CSP: default-src 'self' — keine Inline-Styles, keine data:-URIs, keine
   externen Ressourcen. Schriften lokal unter /fonts/. JS setzt Werte NUR
   über das CSSOM (style.setProperty) — Startwerte und Übergänge wohnen hier.
   ============================================================================ */

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

/* ----------------------------------------------------------------- Tokens */
:root {
  color-scheme: dark;

  /* MDC-Marke (Pantone → sRGB) — identisch zur Homepage */
  --brand-navy:  #0C2340;
  --brand-royal: #0033A0;
  --brand-blue:  #003DA5;
  --brand-cyan:  #0085CA;
  --brand-sky:   #99D6EA;

  /* Flächen (Navy, geschichtet) */
  --color-bg:           #081628;
  --color-bg-deep:      #050f1d;
  --color-surface:      #0e2138;
  --color-surface-2:    #16314f;
  --color-surface-line: #244463;

  /* Text — dim gegenüber der Homepage leicht aufgehellt (App = kleine
     Schriftgrade, WCAG AA ≥ 4,5:1 auf --color-surface) */
  --color-text:       #eef4fb;
  --color-text-muted: #a7bcd6;
  --color-text-dim:   #7f97b5;

  /* Akzent */
  --color-accent:          #0091d8;
  --color-accent-bright:   var(--brand-sky);
  --color-accent-deep:     var(--brand-blue);
  --color-accent-contrast: #06121f;
  --akzent-text:           #4cc2f1;   /* Akzent als KLEINER Text (AA) */
  --accent-glow:  rgba(0, 145, 216, 0.38);
  --accent-faint: rgba(0, 145, 216, 0.12);
  --accent-line:  rgba(0, 145, 216, 0.32);

  /* Semantik */
  --gruen:       #3ecf9c;
  --gruen-hauch: rgba(62, 207, 156, 0.10);
  --gruen-linie: rgba(62, 207, 156, 0.38);
  --warn:        #ffc078;
  --warn-hauch:  rgba(255, 192, 120, 0.10);
  --warn-linie:  rgba(255, 192, 120, 0.36);
  --rot:         #ff8f85;
  --rot-hauch:   rgba(255, 110, 100, 0.11);
  --rot-linie:   rgba(255, 120, 110, 0.42);
  --blau:        var(--brand-sky);

  /* Typografie */
  --font-display: "Montserrat", "Inter", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "Cascadia Mono", monospace;

  /* Radius */
  --radius-sm:   8px;
  --radius:      14px;
  --radius-lg:   22px;
  --radius-pill: 999px;

  /* Tiefe */
  --shadow-sm:     0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow:        0 18px 50px -22px rgba(0, 0, 0, 0.7);
  --shadow-accent: 0 16px 44px -18px var(--accent-glow);

  /* Bewegung */
  --duration-fast:   160ms;
  --duration-normal: 320ms;
  --duration-slow:   620ms;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-back: cubic-bezier(0.34, 1.4, 0.64, 1);

  /* Layout */
  --kopf-h: 58px;
  --inhalt-max: 860px;
}

/* ------------------------------------------------------------------ Basis */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}

button { font: inherit; color: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }

::selection {
  background: var(--color-accent);
  color: var(--color-accent-contrast);
}

:focus-visible {
  outline: 2px solid var(--color-accent-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Dezente dunkle Rollbalken (Desktop) */
* { scrollbar-width: thin; scrollbar-color: var(--color-surface-line) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--color-surface-line); border-radius: 99px; }
*::-webkit-scrollbar-track { background: transparent; }

.verborgen { display: none !important; }
.oben-abstand { margin-top: 0.65rem; }

/* ------------------------------------------------------------- Atmosphäre
   Wie die Homepage: Gitter + zwei Lichtinseln. Reine CSS-Verläufe —
   CSP-sicher (keine data:-URIs), einmal gemalt, keine Laufzeitkosten. */
.hintergrund {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--color-bg);
}
.hg-gitter {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right,  rgba(238, 244, 251, 0.028) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(238, 244, 251, 0.028) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 95% 60% at 50% 0%, #000 25%, transparent 78%);
  mask-image: radial-gradient(ellipse 95% 60% at 50% 0%, #000 25%, transparent 78%);
}
.hg-schein {
  position: absolute;
  border-radius: 50%;
  opacity: 0.55;
}
.hg-schein-eins {
  width: 74vw; height: 74vw;
  max-width: 720px; max-height: 720px;
  top: -18vw; right: -16vw;
  background: radial-gradient(circle, rgba(0, 145, 216, 0.22), transparent 62%);
}
.hg-schein-zwei {
  width: 64vw; height: 64vw;
  max-width: 620px; max-height: 620px;
  bottom: -16vw; left: -18vw;
  background: radial-gradient(circle, rgba(0, 61, 165, 0.28), transparent 62%);
}

/* ------------------------------------------------------------------- Kopf */
.kopf {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: var(--kopf-h);
  padding: calc(0.4rem + env(safe-area-inset-top)) 0.95rem 0.4rem;
  background: color-mix(in oklab, var(--color-bg-deep) 82%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-surface-line);
}
.kopf-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}
.kopf-zeichen { width: 21px; height: 21px; }
.kopf-marke, .marke-block {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--color-text);
  font-size: 0.98rem;
}
.kopf-gruss {
  flex: 1;
  color: var(--color-text-muted);
  font-size: 0.86rem;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kopf-konto {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-surface-line);
  background: color-mix(in oklab, var(--color-surface) 70%, transparent);
  color: var(--color-text-muted);
  border-radius: 50%;
  transition:
    color var(--duration-fast) var(--ease-out-expo),
    border-color var(--duration-fast) var(--ease-out-expo),
    background-color var(--duration-fast) var(--ease-out-expo);
}
.kopf-konto svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) {
  .kopf-konto:hover { color: var(--color-accent-bright); border-color: var(--accent-line); background: var(--accent-faint); }
}

/* ----------------------------------------------------------------- Layout */
main {
  max-width: var(--inhalt-max);
  margin: 0 auto;
  padding: 1rem 0.95rem 2.5rem;
}

/* Ansichts-Eintritt: display none→block startet die Animation neu —
   ein weicher Auftritt pro Ansichtswechsel, nur transform/opacity. */
.ansicht { animation: ansicht-eintritt 0.42s var(--ease-out-expo) both; }
@keyframes ansicht-eintritt {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.ansicht-kicker {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--akzent-text);
  margin: 0.5rem 0 0.35rem;
}
.ansicht-kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 0 4px var(--accent-faint);
  flex-shrink: 0;
}

.ansicht > h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 5.4vw, 1.95rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
}

.ansicht h2, .karten-titel {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  margin: 1.7rem 0 0.7rem;
}
.ansicht h2::before, .karten-titel::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--color-accent), var(--brand-sky));
  flex-shrink: 0;
}
.karten-titel { margin-top: 0 !important; }
.ansicht h2:empty { display: none; }   /* z. B. #kal-tag-titel vor JS-Füllung */

.untertitel {
  color: var(--color-text-muted);
  font-size: 0.94rem;
  max-width: 48ch;
  margin: 0 0 1.1rem;
}

/* ----------------------------------------------------------------- Karten */
.karte {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 30%),
    var(--color-surface);
  border: 1px solid var(--color-surface-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  padding: 1.1rem;
  margin: 0 0 0.9rem;
}
fieldset.karte { min-width: 0; padding: 0.85rem 1.1rem 1.1rem; }
fieldset.karte legend {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--akzent-text);
  padding: 0 0.5rem;
  margin-left: -0.25rem;
}

/* ----------------------------------------------------------------- Felder */
label {
  display: block;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin: 0.65rem 0 0.3rem;
}
input, select, textarea {
  width: 100%;
  min-width: 0;                /* darf in Grid-/Flex-Spalten schrumpfen */
  min-height: 48px;
  font: inherit;
  color: var(--color-text);
  background: var(--color-bg-deep);
  border: 1px solid var(--color-surface-line);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  transition:
    border-color var(--duration-fast) var(--ease-out-expo),
    box-shadow var(--duration-fast) var(--ease-out-expo),
    background-color var(--duration-fast) var(--ease-out-expo);
}
textarea { min-height: 0; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--color-text-dim); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--accent-faint), 0 8px 24px -16px var(--accent-glow);
  background: var(--color-bg);
}
input:user-invalid { border-color: var(--rot-linie); }

/* Zahlen sind Messwerte: Mono, tabellarisch — wie an der Waage. */
input[type="number"] {
  font-family: var(--font-mono);
  font-size: 1rem;               /* nie unter 16px: iOS zoomt sonst beim Fokus */
  letter-spacing: 0.01em;
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="date"], input[type="time"] { font-family: var(--font-mono); font-size: 1rem; }

/* Select mit CSS-Chevron (Verlauf-Trick — CSP-sicher, kein Bild) */
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.6rem;
  background-image:
    linear-gradient(45deg, transparent 49%, var(--color-text-muted) 51%),
    linear-gradient(135deg, var(--color-text-muted) 49%, transparent 51%);
  background-position:
    calc(100% - 21px) calc(50% - 2px),
    calc(100% - 15px) calc(50% - 2px);
  background-size: 6px 6px;
  background-repeat: no-repeat;
}
select option { background: var(--color-bg-deep); color: var(--color-text); }

.feld-gitter { display: grid; gap: 0.6rem; }
.feld-gitter > div { min-width: 0; }
.feld-gitter.zwei { grid-template-columns: 1fr 1fr; }
.feld-gitter.drei { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 355px) { .feld-gitter { gap: 0.45rem; } }

.feld-hilfe { color: var(--color-text-dim); font-size: 0.79rem; margin: 0.45rem 0 0; }

/* Produktwahl im ACT-Modus: antippbare Trefferliste statt datalist
   (die war auf dem iPhone praktisch unsichtbar). */
.produkt-treffer {
  max-height: 15rem;
  overflow-y: auto;
  margin-top: 0.55rem;
  border: 1px solid var(--color-surface-line);
  border-radius: 10px;
  background: var(--color-bg-deep);
}
.produkt-treffer-knopf {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--color-surface-line);
  padding: 0.6rem 0.8rem;
  min-height: 44px;
  font-size: 0.92rem;
}
.produkt-treffer-knopf:hover,
.produkt-treffer-knopf:focus-visible {
  background: var(--accent-faint);
  color: var(--color-accent-bright);
  outline: none;
}
.produkt-treffer .feld-hilfe { padding: 0.5rem 0.8rem; margin: 0; }
/* Kopfzeile der Trefferliste, wenn die P1-F10-Zuordnung einengt. Klebt
   oben fest, damit "alle zeigen" auch nach dem Scrollen erreichbar ist. */
.treffer-filter {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.45rem 0.8rem;
  background: var(--accent-faint);
  border-bottom: 1px solid var(--color-surface-line);
}
.treffer-filter-text {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.79rem;
  color: var(--color-accent-bright);
}
/* FM = steht zusaetzlich in P1-F12 (Futtermittel-Hersteller). */
.fm-marke {
  margin-left: 0.45rem;
  padding: 0.05rem 0.32rem;
  border: 1px solid var(--color-surface-line);
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  color: var(--color-text-dim);
  vertical-align: 0.08em;
}
.produkt-gewaehlt {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid var(--color-accent);
  border-radius: 10px;
  background: var(--accent-faint);
  padding: 0.5rem 0.7rem;
  min-height: 48px;
}
.produkt-gewaehlt-haken { color: var(--color-accent-bright); font-weight: 700; }
.produkt-gewaehlt-name { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.feld-zwischentitel {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-text-dim);
  margin: 1rem 0 0.1rem;
}

/* Produkt-Modus: Basis = getönte Radios; moderne Browser bekommen
   einen segmentierten Schalter (progressive Verbesserung). */
.radio-zeile { display: flex; gap: 1rem; margin-bottom: 0.7rem; }
.radio {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.92rem;
  font-weight: 500;
}
.radio input { width: auto; min-height: 0; accent-color: var(--color-accent); }

@supports selector(:has(*)) {
  .radio-zeile {
    background: var(--color-bg-deep);
    border: 1px solid var(--color-surface-line);
    border-radius: var(--radius-pill);
    padding: 4px;
    gap: 4px;
  }
  .radio {
    flex: 1;
    min-height: 44px;
    padding: 0.5rem 0.6rem;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition:
      color var(--duration-fast) var(--ease-out-expo),
      background-color var(--duration-fast) var(--ease-out-expo),
      box-shadow var(--duration-fast) var(--ease-out-expo);
  }
  .radio input { position: absolute; opacity: 0; pointer-events: none; }
  .radio:has(input:checked) {
    background: var(--color-surface-2);
    color: var(--color-text);
    box-shadow: inset 0 0 0 1px var(--accent-line), var(--shadow-sm);
  }
  .radio:has(input:focus-visible) {
    outline: 2px solid var(--color-accent-bright);
    outline-offset: 2px;
  }
}

/* ---------------------------------------------------------------- Knöpfe */
.knopf, #nochmal-knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 48px;
  padding: 0.65rem 1.35rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  color: var(--color-accent-contrast);
  background: linear-gradient(135deg, #33b1ea, var(--color-accent));
  box-shadow: var(--shadow-accent);
  transition:
    transform var(--duration-fast) var(--ease-out-expo),
    box-shadow var(--duration-normal) var(--ease-out-expo),
    background-color var(--duration-fast) var(--ease-out-expo),
    border-color var(--duration-fast) var(--ease-out-expo),
    color var(--duration-fast) var(--ease-out-expo);
}
@media (hover: hover) {
  .knopf:hover { transform: translateY(-2px); box-shadow: 0 20px 48px -16px var(--accent-glow); }
}
.knopf:active { transform: translateY(0) scale(0.99); }
.knopf:focus-visible { outline: 2px solid var(--color-accent-bright); outline-offset: 3px; }
.knopf[disabled] { opacity: 0.55; cursor: default; transform: none; }

.knopf-voll { width: 100%; min-height: 52px; font-size: 1rem; }

.knopf-leise, #nochmal-knopf {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-surface-line);
  box-shadow: none;
  font-weight: 500;
}
@media (hover: hover) {
  .knopf-leise:hover, #nochmal-knopf:hover {
    border-color: var(--accent-line);
    background: var(--accent-faint);
    color: var(--color-accent-bright);
    transform: translateY(-2px);
  }
}
.knopf-klein {
  min-height: 44px;
  padding: 0.4rem 0.9rem;
  font-size: 0.78rem;
}
.knopf-zeile { display: flex; gap: 0.6rem; margin-top: 0.5rem; }
.knopf-zeile .knopf { flex: 1; }
.werkzeug-zeile { display: flex; gap: 0.6rem; margin-bottom: 0.9rem; }
.werkzeug-zeile input { flex: 1; }
.werkzeug-zeile .knopf { flex-shrink: 0; }
/* Abstand nach oben als Klasse statt style="…": die CSP (style-src 'self')
   blockiert Inline-Stile still. Stehen bewusst NACH .karte, damit sie
   dessen margin-Kurzform überstimmen. */
.abstand-oben-s { margin-top: 0.5rem; }
.abstand-oben-m { margin-top: 0.7rem; }
.abstand-oben-l { margin-top: 1rem; }

/* ------------------------------------------------- Statistik-Leiste (HUD)
   Dezenter Spielstand über dem Formular: Mono-Werte, ruhige Chips.
   Leer → unsichtbar, kein Springen beim Laden. */
#statistik-leiste {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.3rem 0 0.55rem;
  margin: 0.2rem 0 0.1rem;
  scrollbar-width: none;
}
#statistik-leiste::-webkit-scrollbar { display: none; }
#statistik-leiste:empty { display: none; }

.stat-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  flex-shrink: 0;
  min-width: 76px;
  padding: 0.5rem 0.85rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 45%),
    var(--color-surface);
  border: 1px solid var(--color-surface-line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}
.stat-wert {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--color-accent-bright);
  font-variant-numeric: tabular-nums;
}
.stat-name {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--color-text-dim);
}

/* ----------------------------------------------------------------- Listen */
.liste { display: flex; flex-direction: column; gap: 0.6rem; }
.zeile {
  background: var(--color-surface);
  border: 1px solid var(--color-surface-line);
  border-radius: var(--radius);
  padding: 0.75rem 0.9rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  transition:
    border-color var(--duration-normal) var(--ease-out-expo),
    transform var(--duration-normal) var(--ease-out-expo),
    box-shadow var(--duration-normal) var(--ease-out-expo);
}
@media (hover: hover) {
  .zeile:hover { border-color: var(--accent-line); }
}
.zeile-mitte { flex: 1; min-width: 0; }
.zeile-titel { font-weight: 600; font-size: 0.95rem; overflow-wrap: anywhere; }
.zeile-meta {
  color: var(--color-text-dim);
  font-size: 0.79rem;
  margin-top: 0.15rem;
  font-variant-numeric: tabular-nums;
}
.zeile-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}
.zeile-aktionen { display: flex; flex-direction: column; gap: 0.35rem; flex-shrink: 0; }

.zeile.ueberfaellig {
  border-color: var(--rot-linie);
  background:
    linear-gradient(90deg, var(--rot-hauch), transparent 45%),
    var(--color-surface);
  box-shadow: inset 3px 0 0 0 var(--rot);
}
.zeile.erledigt-zeile { opacity: 0.55; }
.zeile.erledigt-zeile .zeile-titel {
  text-decoration: line-through;
  text-decoration-color: rgba(167, 188, 214, 0.6);
  color: var(--color-text-muted);
}

/* Leerzustände: ruhig, mit Charme aus dem Text */
.leer-hinweis {
  color: var(--color-text-dim);
  font-size: 0.88rem;
  text-align: center;
  padding: 1.35rem 1rem;
  border: 1px dashed var(--color-surface-line);
  border-radius: var(--radius);
}

/* --------------------------------------------------------------- Abzeichen */
.abzeichen {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.07em;
  background: var(--color-bg-deep);
  border: 1px solid var(--color-surface-line);
  color: var(--color-text-muted);
  border-radius: var(--radius-pill);
  padding: 0.18rem 0.6rem;
  vertical-align: middle;
}
.abzeichen-warn  { background: var(--warn-hauch);  color: var(--warn);  border-color: var(--warn-linie); }
.abzeichen-rot   { background: var(--rot-hauch);   color: var(--rot);   border-color: var(--rot-linie); }
.abzeichen-gruen { background: var(--gruen-hauch); color: var(--gruen); border-color: var(--gruen-linie); }
.abzeichen-blau  { background: var(--accent-faint); color: var(--blau); border-color: var(--accent-line); }

/* ------------------------------------------------- Meldungen & Hinweise */
.fehlertext {
  background: var(--rot-hauch);
  border: 1px solid var(--rot-linie);
  color: var(--rot);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  font-size: 0.88rem;
  animation: karte-pop 0.35s var(--ease-out-expo) both;
}
/* Passwort-Erfolg: JS entfernt .fehlertext → grüne Bestätigung */
#passwort-meldung:not(.fehlertext) {
  background: var(--gruen-hauch);
  border: 1px solid var(--gruen-linie);
  color: var(--gruen);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  font-size: 0.88rem;
}
.hinweis-block {
  background: var(--warn-hauch);
  border: 1px solid var(--warn-linie);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  margin-top: 0.6rem;
  font-size: 0.88rem;
}
.hinweis-block strong { color: var(--warn); font-weight: 600; }
.hinweis-block p { margin: 0.2rem 0 0; color: var(--color-text-muted); }

/* Erfolgskarte nach dem Speichern */
.erfolg-karte {
  border-color: var(--gruen-linie);
  background:
    radial-gradient(120% 90% at 0% 0%, var(--gruen-hauch), transparent 55%),
    var(--color-surface);
  animation: karte-pop 0.45s var(--ease-out-back) both;
}
.erfolg-titel {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--gruen);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
}
@keyframes karte-pop {
  from { opacity: 0; transform: scale(0.965) translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* „Weiter mit …"-Vorschlag + „Nochmal"-Knopf im Erfolgsbereich */
.weiter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  margin: 0.8rem 0.5rem 0 0;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-pill);
  background: var(--accent-faint);
  color: var(--color-accent-bright);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition:
    transform var(--duration-fast) var(--ease-out-expo),
    background-color var(--duration-fast) var(--ease-out-expo),
    border-color var(--duration-fast) var(--ease-out-expo),
    box-shadow var(--duration-normal) var(--ease-out-expo);
}
@media (hover: hover) {
  .weiter-chip:hover {
    background: rgba(0, 145, 216, 0.22);
    border-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-accent);
  }
}
.weiter-chip:active { transform: translateY(0); }
#nochmal-knopf { margin-top: 0.8rem; }

/* ------------------------------------------------------------ Fortschritt */
.fortschritt-karte {
  background:
    radial-gradient(130% 100% at 0% 0%, var(--accent-faint), transparent 55%),
    var(--color-surface);
}
.fortschritt-zahlen {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.fortschritt-balken {
  position: relative;
  height: 14px;
  background: var(--color-bg-deep);
  border: 1px solid var(--color-surface-line);
  border-radius: var(--radius-pill);
  margin-top: 0.6rem;
}
#produkte-balken {
  position: relative;
  z-index: 1;
  height: 100%;
  width: 0;                                   /* Startwert — JS setzt via CSSOM */
  background: linear-gradient(90deg, var(--color-accent-deep), var(--color-accent) 55%, #35b5ef);
  border-radius: var(--radius-pill);
  overflow: hidden;
  transition: width 0.7s var(--ease-out-expo);
}
/* Sanfter Schimmer über dem gefüllten Teil (nur transform/opacity) */
#produkte-balken::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 32%, rgba(255, 255, 255, 0.3) 50%, transparent 68%);
  transform: translateX(-100%);
  animation: balken-schimmer 3s var(--ease-out-expo) infinite;
}
@keyframes balken-schimmer {
  0%        { transform: translateX(-100%); }
  55%, 100% { transform: translateX(100%); }
}
/* Meilenstein-Kerben: Eich-Striche auf der Messlatte (left via CSSOM) */
.stufen-marke {
  position: absolute;
  z-index: 2;
  top: -4px;
  bottom: -4px;
  width: 2px;
  border-radius: 2px;
  background: rgba(153, 214, 234, 0.55);
  transform: translateX(-50%);
  pointer-events: none;
}

/* Produktliste */
.produkt-zeile { cursor: pointer; align-items: center; }
@media (hover: hover) {
  .produkt-zeile:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
}
.produkt-zeile:active { transform: scale(0.995); }
.produkt-haken {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  font-size: 0.85rem;
}
.produkt-haken.gut {
  color: var(--gruen);
  background: var(--gruen-hauch);
  border: 1px solid var(--gruen-linie);
  animation: haken-pop 0.35s var(--ease-out-back);
}
.produkt-haken.offen {
  color: var(--color-text-dim);
  border: 1px dashed var(--color-surface-line);
}
@keyframes haken-pop {
  0%   { transform: scale(0.5); }
  70%  { transform: scale(1.12); }
  100% { transform: scale(1); }
}

/* ----------------------------------------------------------------- To-dos */
.todo-haken {
  position: relative;
  width: 44px;
  height: 44px;
  min-width: 44px;
  display: grid;
  place-items: center;
  border: none;
  background: transparent;
  color: transparent;
  font-size: 0.85rem;
  border-radius: 50%;
}
.todo-haken::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 2px solid var(--color-surface-line);
  transition:
    border-color var(--duration-fast) var(--ease-out-expo),
    background-color var(--duration-fast) var(--ease-out-expo);
}
@media (hover: hover) {
  .todo-haken:hover::before { border-color: var(--color-accent-bright); }
}
.todo-haken.fertig {
  color: var(--gruen);
  animation: haken-pop 0.35s var(--ease-out-back);
}
.todo-haken.fertig::before {
  border-color: var(--gruen-linie);
  background: var(--gruen-hauch);
}
.einklappbar { cursor: pointer; user-select: none; color: var(--color-text-muted); }
@media (hover: hover) { .einklappbar:hover { color: var(--color-text); } }
#todos-erledigt-pfeil { color: var(--color-text-dim); font-size: 0.85em; }

/* --------------------------------------------------------------- Kalender */
.kalender-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}
#kal-titel {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.kalender-kopf .knopf {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  font-size: 1.15rem;
  line-height: 1;
}
.kalender-wochentage, .kalender-gitter {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}
.kalender-wochentage span {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--color-text-dim);
  text-transform: uppercase;
  padding: 0.25rem 0 0.35rem;
}
.kal-tag {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2px;
  min-height: 50px;
  padding: 0.28rem 0.34rem;
  background: var(--color-bg-deep);
  border: 1px solid var(--color-surface-line);
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-text-muted);
  transition:
    border-color var(--duration-fast) var(--ease-out-expo),
    background-color var(--duration-fast) var(--ease-out-expo),
    box-shadow var(--duration-fast) var(--ease-out-expo);
}
@media (hover: hover) {
  .kal-tag:not(:disabled):hover { border-color: var(--accent-line); }
}
.kal-tag.fremdmonat { opacity: 0.22; cursor: default; }
.kal-tag.heute { border-color: var(--color-accent-bright); color: var(--color-accent-bright); }
.kal-tag.gewaehlt {
  background: var(--accent-faint);
  border-color: var(--color-accent);
  color: var(--color-text);
  box-shadow: 0 6px 18px -8px var(--accent-glow);
}
.kal-punkte { display: flex; gap: 3px; flex-wrap: wrap; }
.kal-punkt { width: 6px; height: 6px; border-radius: 50%; }
.kal-punkt.termin  { background: var(--blau); box-shadow: 0 0 6px rgba(153, 214, 234, 0.55); }
.kal-punkt.aufgabe { background: var(--warn); box-shadow: 0 0 6px rgba(255, 192, 120, 0.45); }
.kal-legende {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  margin-top: 0.65rem;
}
.legende-punkt { font-size: 0.8em; vertical-align: 0.08em; }
.legende-termin  { color: var(--blau); }
.legende-aufgabe { color: var(--warn); }

/* ------------------------------------------------------------- Auswertung */
.kpi-reihe {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.7rem;
  margin-bottom: 0.9rem;
}
.kpi-reihe:empty { display: none; }
.kpi {
  position: relative;
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-surface-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 0.85rem 1rem 0.9rem;
}
.kpi::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent), var(--brand-sky));
}
.kpi.gut::before  { background: linear-gradient(90deg, var(--gruen), rgba(62, 207, 156, 0.35)); }
.kpi.warn::before { background: linear-gradient(90deg, var(--rot), var(--warn)); }
.kpi-wert {
  font-family: var(--font-mono);
  font-size: clamp(1.45rem, 5.5vw, 1.85rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.kpi-name {
  font-family: var(--font-mono);
  color: var(--color-text-dim);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  margin-top: 0.2rem;
}
.kpi-zusatz { font-size: 0.78rem; color: var(--color-text-muted); margin-top: 0.3rem; }
.kpi.gut .kpi-zusatz  { color: var(--gruen); }
.kpi.warn .kpi-zusatz { color: var(--rot); }

.balken-liste { display: flex; flex-direction: column; gap: 0.55rem; }
.balken-zeile {
  display: grid;
  grid-template-columns: minmax(92px, 132px) 1fr 2.8rem;
  gap: 0.6rem;
  align-items: center;
  font-size: 0.82rem;
}
.balken-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--color-text-muted); }
.balken-schiene {
  background: var(--color-bg-deep);
  border: 1px solid var(--color-surface-line);
  border-radius: var(--radius-pill);
  height: 10px;
  overflow: hidden;
}
.balken-wert {
  height: 100%;
  width: 0;                                   /* Startwert — JS setzt via CSSOM */
  background: linear-gradient(90deg, var(--color-accent), var(--brand-sky));
  border-radius: var(--radius-pill);
  transition: width 0.7s var(--ease-out-expo);
}
.balken-zahl {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-dim);
}

.chip-liste {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 0.25rem;
}
.chip {
  background: var(--color-bg-deep);
  border: 1px solid var(--color-surface-line);
  color: var(--color-text-muted);
  border-radius: var(--radius-pill);
  padding: 0.25rem 0.7rem;
  font-size: 0.78rem;
}

/* Etikett-Lesen: Vorschlags-Chips (04.09.2026). Ein Chip ist ein KNOPF -
   Antippen uebernimmt den Wert ins Feld; nichts wird von allein
   gespeichert. Die Quelle steht dran (Barcode | gelesen). */
.etikett-chips { margin: 0.5rem 0 0.65rem; max-height: none; }
button.etikett-chip {
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent-faint);
  border-color: var(--accent-line);
  color: var(--color-text);
}
button.etikett-chip:active { transform: scale(0.97); }
button.etikett-chip .chip-quelle {
  font-size: 0.68rem;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}
button.etikett-chip.uebernommen {
  background: var(--gruen-hauch);
  border-color: var(--gruen-linie);
}
button.etikett-chip.unsicher {
  background: var(--warn-hauch);
  border-color: var(--warn-linie);
}
.etikett-chip-hinweis {
  /* Hinweis ohne Uebernahmeziel (z. B. nur Monat lesbar) */
  cursor: default;
  background: var(--color-bg-deep);
}

/* Benannte Foto-Kacheln (Prozess-Bauplan 04.09.2026): Etikett und
   Palette gesamt haben feste Plaetze - jede Erfassung traegt dieselbe
   Foto-Reihe, und Fehlendes ist auf einen Blick sichtbar. */
.foto-kacheln {
  display: grid;
  /* Drei Plaetze seit dem 04.09.2026: Etikett, Gebinde, Palette. */
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}
@media (max-width: 370px) {
  .foto-kacheln { grid-template-columns: 1fr 1fr; }
}
.foto-kachel {
  cursor: pointer;
  font: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.7rem 0.5rem;
  border: 1.5px dashed var(--color-surface-line);
  border-radius: var(--radius);
  background: var(--color-bg-deep);
  color: var(--color-text);
  position: relative;
  overflow: hidden;
  min-height: 92px;
  justify-content: center;
}
.foto-kachel:active { transform: scale(0.98); }
.foto-kachel .kachel-bild { font-size: 1.5rem; line-height: 1; }
.foto-kachel .kachel-name { font-weight: 600; font-size: 0.85rem; }
.foto-kachel .kachel-stand {
  font-size: 0.72rem;
  color: var(--color-text-muted);
}
.foto-kachel img.kachel-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
}
.foto-kachel.belegt {
  border-style: solid;
  border-color: var(--gruen-linie);
  background: var(--gruen-hauch);
}
.foto-kachel.belegt .kachel-stand { color: var(--gruen); }
.foto-kachel .kachel-name,
.foto-kachel .kachel-stand,
.foto-kachel .kachel-bild { position: relative; z-index: 1; }
.foto-thumb-art {
  /* .foto-thumb ist bereits position:relative (Foto-Reihe unten) */
  position: absolute;
  left: 0.25rem;
  bottom: 0.25rem;
  font-size: 0.62rem;
  padding: 0.05rem 0.4rem;
  border-radius: var(--radius-pill);
  background: var(--accent-faint);
  border: 1px solid var(--accent-line);
  color: var(--color-text);
  pointer-events: none;
}

/* --------------------------------------------------------------- Anmelden */
.anmelden-schicht {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background:
    radial-gradient(60vw 60vw at 88% -8%, rgba(0, 145, 216, 0.24), transparent 62%),
    radial-gradient(52vw 52vw at -10% 106%, rgba(0, 61, 165, 0.3), transparent 62%),
    linear-gradient(to right,  rgba(238, 244, 251, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(238, 244, 251, 0.02) 1px, transparent 1px),
    linear-gradient(180deg, var(--color-bg), var(--color-bg-deep));
  background-size: auto, auto, 56px 56px, 56px 56px, auto;
}
.anmelden-karte {
  width: 100%;
  max-width: 370px;
  background:
    linear-gradient(165deg, var(--color-surface-2), var(--color-surface) 62%);
  border: 1px solid var(--color-surface-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  padding: 1.9rem 1.5rem 1.5rem;
  animation: anmelden-auftritt var(--duration-slow) var(--ease-out-expo) both;
}
@keyframes anmelden-auftritt {
  from { opacity: 0; transform: translateY(22px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}
.marke { text-align: center; margin-bottom: 1.3rem; }
.marke-zeichen { width: 46px; height: 46px; margin: 0 auto 0.8rem; }
.marke-block { font-size: 1.55rem; display: block; letter-spacing: 0.24em; padding-left: 0.24em; }
.marke-unter {
  display: block;
  font-family: var(--font-mono);
  color: var(--color-text-dim);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.26em;
  margin-top: 0.45rem;
}
.anmelden-karte .knopf { margin-top: 1.1rem; }
.anmelden-karte .fehlertext { margin-top: 0.8rem; }

/* ------------------------------------------------- Fußleiste (Schwebedock) */
.fussleiste {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(0.65rem + env(safe-area-inset-bottom));
  z-index: 35;
  width: min(560px, calc(100% - 1.3rem));
  margin-inline: auto;
  display: flex;
  gap: 2px;
  padding: 5px;
  background: color-mix(in oklab, var(--color-bg-deep) 86%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--color-surface-line);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow);
}
.fuss-knopf {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  border: none;
  background: none;
  color: var(--color-text-dim);
  padding: 0.5rem 0.1rem 0.55rem;
  border-radius: var(--radius-pill);
  transition:
    color var(--duration-fast) var(--ease-out-expo),
    background-color var(--duration-fast) var(--ease-out-expo),
    box-shadow var(--duration-fast) var(--ease-out-expo);
}
.fuss-knopf span:last-of-type {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Seit den Belege-Reitern (12.08.2026) sind es bis zu ACHT Knöpfe. In
   einer Reihe blieben bei 375 px nur 41 px je Knopf — unter der
   Tippgrenze, und „Auswertung" war abgeschnitten. Darum bricht die
   Leiste auf schmalen Geräten in zwei Reihen um; der Inhalt bekommt
   entsprechend mehr Fußraum, sonst verschwindet er darunter. */
@media (max-width: 560px) {
  .fussleiste { flex-wrap: wrap; }
  /* Seit „Muster" (13.09.2026) sind es NEUN Knöpfe (zehn beim Motivator):
     bei 22 % je Knopf stand der neunte allein in einer dritten Reihe. Mit
     18 % passen fünf je Reihe -> zwei Reihen, 67 px je Knopf bei 375 px. */
  .fuss-knopf { flex: 1 0 18%; }
  #inhalt { padding-bottom: calc(158px + env(safe-area-inset-bottom)); }
}
.fuss-zeichen { display: grid; place-items: center; line-height: 1; }
.fuss-zeichen svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (hover: hover) {
  .fuss-knopf:hover { color: var(--color-text-muted); }
}
.fuss-knopf.aktiv {
  color: var(--color-accent-bright);
  background: var(--accent-faint);
  box-shadow: inset 0 0 0 1px var(--accent-line);
  font-weight: 600;
}
.fuss-knopf.aktiv .fuss-zeichen svg { filter: drop-shadow(0 0 7px var(--accent-glow)); }
@media (max-width: 379px) {
  .fuss-knopf span:last-of-type { font-size: 0.56rem; letter-spacing: 0; }
}

/* ------------------------------------------------ Feier-Schicht (Meilenstein) */
#feier-schicht,
.feier-schicht {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  overflow: hidden;
  background: rgba(5, 15, 29, 0.82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: feier-blende 0.3s ease-out both;
}
@keyframes feier-blende { from { opacity: 0; } to { opacity: 1; } }
.feier-karte {
  position: relative;
  z-index: 2;
  width: min(340px, 92vw);
  text-align: center;
  background: linear-gradient(165deg, var(--color-surface-2), var(--color-surface) 70%);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow), var(--shadow-accent), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  padding: 2rem 1.6rem 1.6rem;
  animation: feier-auftritt 0.5s var(--ease-out-back) both;
}
@keyframes feier-auftritt {
  from { opacity: 0; transform: scale(0.85) translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.feier-zahl {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(3.4rem, 20vw, 4.8rem);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(120deg, var(--brand-sky), var(--color-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.35rem;
}
.feier-titel {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.35rem;
}
.feier-text { color: var(--color-text-muted); font-size: 0.92rem; margin-bottom: 1.4rem; }
.feier-karte .knopf { width: 100%; }

/* Flitter: 12 Stück, vom Entwickler ins DOM gelegt. Nur transform/opacity,
   Vielfalt über nth-child-Zyklen (robust, egal wo die Karte im DOM steht). */
.feier-flitter {
  position: absolute;
  z-index: 1;
  top: -24px;
  left: 50%;
  width: 7px;
  height: 12px;
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  will-change: transform;
  animation: feier-fall var(--dauer, 3.2s) linear var(--warten, 0s) infinite;
}
@keyframes feier-fall {
  0%   { transform: translate3d(0, -4vh, 0) rotate(0deg); opacity: 0; }
  6%   { opacity: 1; }
  85%  { opacity: 1; }
  100% { transform: translate3d(var(--sway, 0rem), 106vh, 0) rotate(var(--dreh, 540deg)); opacity: 0; }
}
.feier-flitter:nth-child(odd)  { width: 8px; height: 8px; border-radius: 50%; --sway: 2.4rem; --dreh: 520deg; }
.feier-flitter:nth-child(even) { --sway: -2.6rem; --dreh: -460deg; }
.feier-flitter:nth-child(4n+1) { background: #35b5ef; }
.feier-flitter:nth-child(4n+2) { background: var(--brand-sky); }
.feier-flitter:nth-child(4n+3) { background: var(--color-text); }
.feier-flitter:nth-child(4n)   { background: var(--gruen); }
.feier-flitter:nth-child(3n+1) { --dauer: 3.4s; }
.feier-flitter:nth-child(3n+2) { --dauer: 2.8s; }
.feier-flitter:nth-child(3n)   { --dauer: 3.9s; }
.feier-flitter:nth-child(5n+1) { --warten: 0s; }
.feier-flitter:nth-child(5n+2) { --warten: 0.5s; }
.feier-flitter:nth-child(5n+3) { --warten: 0.95s; }
.feier-flitter:nth-child(5n+4) { --warten: 0.25s; }
.feier-flitter:nth-child(5n)   { --warten: 0.7s; }
.feier-flitter:nth-child(12n+1)  { left: 5%; }
.feier-flitter:nth-child(12n+2)  { left: 13%; }
.feier-flitter:nth-child(12n+3)  { left: 22%; }
.feier-flitter:nth-child(12n+4)  { left: 30%; }
.feier-flitter:nth-child(12n+5)  { left: 39%; }
.feier-flitter:nth-child(12n+6)  { left: 48%; }
.feier-flitter:nth-child(12n+7)  { left: 56%; }
.feier-flitter:nth-child(12n+8)  { left: 65%; }
.feier-flitter:nth-child(12n+9)  { left: 73%; }
.feier-flitter:nth-child(12n+10) { left: 82%; }
.feier-flitter:nth-child(12n+11) { left: 90%; }
.feier-flitter:nth-child(12n)    { left: 96%; }

/* ------------------------------------------------------------------ Konto */
#abmelden-knopf { width: 100%; }
@media (hover: hover) {
  #abmelden-knopf:hover {
    border-color: var(--rot-linie);
    background: var(--rot-hauch);
    color: var(--rot);
  }
}

/* ---------------------------------------------------- Desktop (ab 700 px) */
@media (min-width: 700px) {
  body { padding-bottom: 3rem; }
  main { padding-top: calc(var(--kopf-h) + 4.6rem); }

  .kopf { padding-inline: 1.4rem; }

  /* Navigation dockt oben unter dem Kopf an (DOM-Reihenfolge egal: fixed) */
  .fussleiste {
    position: fixed;
    top: calc(var(--kopf-h) + 0.75rem);
    bottom: auto;
    width: min(var(--inhalt-max), calc(100% - 2rem));
  }
  .fuss-knopf {
    flex-direction: row;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.55rem 0.4rem;
  }
  .fuss-knopf span:last-of-type { font-size: 0.8rem; }
  .fuss-zeichen svg { width: 18px; height: 18px; }

  .karte { padding: 1.35rem 1.5rem; }
  fieldset.karte { padding: 1.1rem 1.5rem 1.5rem; }
  .balken-zeile { grid-template-columns: 150px 1fr 2.8rem; }
  .kal-tag { min-height: 58px; }
  .zeile { padding: 0.85rem 1.05rem; }
  .zeile-aktionen { flex-direction: row; align-items: center; }
}

/* --------------------------------------------------------- Reduzierte Bewegung */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .feier-flitter { display: none; }
  .fuss-knopf.aktiv .fuss-zeichen svg { filter: none; }
}

/* ================================================== Nachtrag 08.08.2026
   Fotos + endloser Spielstand (gleiches Token-System wie oben). */

/* Aufgaben-Chip ist ein BUTTON (antippbar) - Reset + Warnton */
button.stat-chip {
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-out-expo),
    border-color var(--duration-fast) var(--ease-out-expo);
}
button.stat-chip:hover {
  transform: translateY(-2px);
  border-color: var(--color-accent);
}
.stat-chip-warn {
  border-color: var(--rot-linie);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 45%),
    var(--rot-hauch);
}
.stat-chip-warn .stat-wert { color: var(--rot); }

/* Foto-Aufnahme im Formular */
#foto-knopf { width: 100%; }
.foto-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.6rem;
}
.foto-thumbs:empty { margin-top: 0; }
.foto-thumb {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--color-surface-line);
  box-shadow: var(--shadow-sm);
}
.foto-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}
.foto-thumb-neu { border-color: var(--accent-line); }
.foto-weg {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: rgba(5, 15, 29, 0.78);
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.foto-weg:hover { background: var(--rot); color: #fff; }

/* Foto-Streifen an Eintrags-Zeilen */
.foto-streifen {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.45rem;
}
.foto-streifen img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--color-surface-line);
  cursor: zoom-in;
  transition: transform var(--duration-fast) var(--ease-out-expo);
}
.foto-streifen img:hover { transform: scale(1.06); }

/* Foto-Grossansicht (Lightbox) */
.foto-schicht {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(5, 15, 29, 0.92);
  display: grid;
  place-items: center;
  gap: 0.9rem;
  padding: 1rem;
  grid-template-rows: 1fr auto;
}
.foto-schicht img {
  max-width: 100%;
  max-height: 78vh;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  align-self: end;
}
.foto-zu { align-self: start; }

/* ============================== ACT-Belege (Wareneingang/-ausgang)
   Fremde Daten, nur zum Lesen: keine Bearbeitungsspuren, keine Knöpfe
   die nach Ändern aussehen. Der Nummernkreis trägt die Farbe, damit man
   R/B/SCL/T am Rand sofort auseinanderhält. */
.beleg-kopf { margin-bottom: 0.7rem; }
.beleg-kopf .such-feld { width: 100%; }
.beleg-zeile { cursor: pointer; align-items: flex-start; }
.beleg-kreis {
  flex-shrink: 0;
  min-width: 2.4rem;
  padding: 0.25rem 0.4rem;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.03em;
  background: var(--accent-faint);
  color: var(--color-accent-bright);
}
.kreis-T { background: rgba(153, 214, 234, 0.16); color: var(--brand-sky, #99D6EA); }
.kreis-B { background: rgba(255, 255, 255, 0.08); color: var(--color-text); }
.beleg-betreff {
  margin-top: 0.2rem;
  font-size: 0.79rem;
  color: var(--color-text-dim);
  overflow-wrap: anywhere;
}
.beleg-betreff-gross {
  margin: 0 0 0.7rem;
  font-size: 0.95rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.beleg-titelkarte { display: flex; align-items: center; gap: 0.8rem; }
.beleg-titelkarte h2 { margin: 0; }
.beleg-felder {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.3rem 0.7rem;
  font-size: 0.82rem;
}
.beleg-feldname { color: var(--color-text-dim); white-space: nowrap; }
.beleg-feldwert { min-width: 0; overflow-wrap: anywhere; }
/* Beleg-Zeile ist ein echter Link (neuer Tab) - iOS zeigt PDFs so
   zuverlässig an, eingebettete Betrachter nicht. */
.beleg-datei {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 52px;
  padding: 0.5rem 0.2rem;
  border-top: 1px solid var(--color-surface-line);
  color: inherit;
  text-decoration: none;
}
.beleg-datei:first-of-type { border-top: none; }
.beleg-datei:hover,
.beleg-datei:focus-visible { color: var(--color-accent-bright); outline: none; }
.beleg-datei-zeichen {
  flex-shrink: 0;
  padding: 0.3rem 0.45rem;
  border: 1px solid var(--color-surface-line);
  border-radius: 7px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--color-text-dim);
}

/* Werte, die der Beleg zwar nennt, die sich aber NICHT sicher auf die
   Listen der App abbilden ließen - sie gehen als Freitext in die Maske. */
.beleg-ungewiss {
  color: var(--color-text-dim);
  font-style: italic;
}
.beleg-ungewiss::after {
  content: " (frei)";
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-style: normal;
}
/* Nach einer Übernahme aus dem Warenausgang: Herkunft und was fehlt. */
.uebernahme-hinweis {
  margin: 0 0 1rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-lg);
  background: var(--accent-faint);
  color: var(--color-accent-bright);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

/* ------------------------------------------------------- Einlagerung
   Eigene Seite, aber DASSELBE Formular (es zieht um, siehe modusSetzen
   in app.js). Darum braucht sie fast kein eigenes Aussehen - nur die
   Vorgangs-Karte oben und das Abzeichen in den Motivator-Listen. */
#einlagerung-vorgang .knopf { margin-bottom: 0.7rem; }
#einlagerung-vorgang .zeile-titel {
  font-family: var(--font-mono);
  font-size: 1.05rem;
}
.zeile-titel .abzeichen { margin-left: 0.5rem; }

/* ================================== Aufgaben-Antworten + Mitteilungen */
.antwort-faden {
  margin-top: 0.5rem;
  border-left: 2px solid var(--accent-line);
  padding-left: 0.6rem;
  display: grid;
  gap: 0.3rem;
}
.antwort { font-size: 0.85rem; overflow-wrap: anywhere; }
.antwort-von { color: var(--akzent-text); font-weight: 600; }
.antwort-eingabe {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.antwort-eingabe input { flex: 1; min-width: 0; }

/* ------------------------------------------------- Meldung statt alert()
   Review L3 (13.08.2026): alert() blockiert die ganze Seite und faellt
   aus der Gestaltung. Die Schicht liegt UEBER allem (Anmeldeschicht hat
   z-index 100) und verschwindet von selbst. */
#meldung-schicht {
  position: fixed;
  top: 4.2rem;
  left: 50%;
  transform: translateX(-50%) translateY(-0.5rem);
  max-width: min(92vw, 34rem);
  padding: 0.65rem 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-surface-line);
  border-radius: 10px;
  color: var(--color-text);
  font-size: 0.95rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 110;
}
#meldung-schicht.sichtbar {
  opacity: 1;
  transform: translateX(-50%);
}

/* Vorgangsakte (17.08.2026): was offen ist, muss in der Liste auffallen,
   ohne sie zu zerschreien - eine Zeile in Warnfarbe reicht. */
.beleg-offen {
  margin-top: 0.15rem;
  font-size: 0.82rem;
  color: var(--warn);
}
.beleg-filter {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  cursor: pointer;
}
.beleg-filter input { width: 1.1rem; height: 1.1rem; }

/* Vorlauf aus dem Containerplan (17.08.2026): was kommt, ruhig - was
   überfällig ist, nimmt die Warnfarbe des hinweis-blocks. */
.vorlauf-block {
  background: var(--color-surface-2, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--color-linie, rgba(255, 255, 255, 0.12));
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  margin-top: 0.6rem;
  font-size: 0.88rem;
}
.vorlauf-block strong { font-weight: 600; }
.vorlauf-block p { margin: 0.2rem 0 0; color: var(--color-text-muted); }
.beleg-erwartet {
  margin-top: 0.15rem;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}
/* Archiv (03.09.2026): erledigte Vorgänge — ruhig, kein Warnton. */
.beleg-archiv {
  margin-top: 0.15rem;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  opacity: 0.8;
}

/* ================= Anmeldung mit Namensauswahl (Apps fuer MEHRERE) ===
   Ausgeliefert wird der Kachelblock nur, wo APP_NAMENSWAHL gesetzt ist
   (heute M&H). Die Stile stehen trotzdem in JEDER App - CSS fuer nicht
   vorhandene Elemente kostet nichts, und ein zweiter CSS-Bestand waere
   genau die Kopie, die wir am 22.08.2026 abgeschafft haben. */
/* Wer arbeitet gerade? Zwei Kacheln statt Tippen - gross genug fuer
   Handschuhe, gleich breit, damit keiner der beiden Namen wichtiger
   aussieht als der andere. */
.anmelden-frage {
  margin: 0 0 0.7rem;
  text-align: center;
  color: var(--color-text-dim);
  font-size: 0.85rem;
}
.anmelden-kacheln {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
.anmelden-kachel {
  min-height: 76px;
  padding: 0.7rem 0.5rem;
  border: 1px solid var(--color-surface-line);
  border-radius: var(--radius-lg);
  background: var(--color-bg-deep);
  color: var(--color-text);
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: background var(--duration-fast), border-color var(--duration-fast),
              transform var(--duration-fast);
}
.anmelden-kachel:hover,
.anmelden-kachel:focus-visible {
  background: var(--accent-faint);
  border-color: var(--color-accent);
  color: var(--color-accent-bright);
  outline: none;
}
.anmelden-kachel:active { transform: scale(0.97); }
/* Nebenweg (Carsten, Notfall) - muss erreichbar sein, darf aber den
   beiden Namen nicht die Aufmerksamkeit wegnehmen. */
#anmelden-anderes {
  display: block;
  margin: 0.9rem auto 0;
  background: none;
  border: none;
  color: var(--color-text-dim);
  text-decoration: underline;
  text-underline-offset: 3px;
}
#anmelden-anderes:hover,
#anmelden-anderes:focus-visible {
  color: var(--color-accent-bright);
  outline: none;
}
.anmelden-gewaehlt {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 48px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-lg);
  background: var(--accent-faint);
}
.anmelden-gewaehlt-name {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 600;
  font-size: 1.05rem;
}
/* Nur in der Anmeldekarte: der Name ist die Aussage, "wechseln" der
   Nebenweg. (Im Erfassen bleibt knopf-klein wie er ist.) */
.anmelden-gewaehlt .knopf-klein {
  background: none;
  border: 1px solid var(--color-surface-line);
  color: var(--color-text-dim);
}
.anmelden-gewaehlt .knopf-klein:hover,
.anmelden-gewaehlt .knopf-klein:focus-visible {
  border-color: var(--color-accent);
  color: var(--color-accent-bright);
  outline: none;
}

/* ============================ Startbildschirm (Poster, APP_STARTBILD) */
.start-schicht {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: var(--color-bg-deep);
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 0.9rem;
  padding: 1rem;
  place-items: center;
}
.start-schicht img {
  max-width: 100%;
  max-height: calc(100vh - 7rem);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  object-fit: contain;
}
.start-schicht .knopf { max-width: 420px; width: 100%; }

/* ==================================== Erfassen im Funkloch (22.08.2026)
   Zwei Leisten unter dem Kopf. Sie sind AUSKUNFT, keine Fehlermeldung:
   im Lagergang ist fehlendes Netz der Normalfall, und wer dort mit
   roten Warnungen arbeitet, liest sie nach zwei Tagen nicht mehr. */
.netz-leiste, .warteschlange {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 0 0 0.7rem;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius);
  font-size: 0.92rem;
  line-height: 1.35;
}
.netz-leiste {
  background: var(--warn-hauch);
  border: 1px solid var(--warn-linie);
  color: var(--warn);
}
.netz-zeichen { font-size: 1.1rem; }
.warteschlange {
  background: var(--accent-faint);
  border: 1px solid var(--color-accent);
  color: var(--color-text);
}
.warte-zahl {
  min-width: 1.9rem;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  background: var(--color-accent);
  color: var(--color-bg-deep);
  font-weight: 700;
  text-align: center;
}
.warte-klaerfall {
  flex-basis: 100%;
  margin-top: 0.4rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--color-surface-line);
  font-size: 0.88rem;
}
.warte-zeile {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: space-between;
  margin-top: 0.35rem;
  overflow-wrap: anywhere;
}
/* Der Grund darf umbrechen, der Knopf nicht: "verwerfe / n" ueber zwei
   Zeilen sah aus wie ein Fehler und stand genau so auf dem Bild. */
.warte-zeile .knopf-klein { white-space: nowrap; flex: 0 0 auto; }
/* Die Erfolgskarte, wenn NICHTS gespeichert wurde: sie darf sich nicht
   anfuehlen wie ein Haken. */
.erfolg-karte.warte-karte {
  border-color: var(--warn-linie);
  background: var(--warn-hauch);
}

/* Startliste (Stufe 17): der Anfang, den sich bisher jeder selbst
   suchen musste. Eigene Klasse statt der hinweis-Klasse - die ist bis
   zu einem hinweis()-Aufruf unsichtbar, und genau daran ist im Haus
   schon einmal ein fertig gebauter Block unsichtbar geblieben. */
/* Produktgedaechtnis (04.09.2026): Wissen zur Produktwahl - ruhig,
   unterhalb der gewaehlten Zeile, alles Kuer. */
.produkt-gedaechtnis {
  margin: .55rem 0 .2rem;
  padding: .55rem .7rem;
  border: 1px solid var(--color-surface-line);
  border-radius: var(--radius);
  background: var(--color-bg-deep);
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.gedaechtnis-titel {
  margin: 0;
  font-size: .78rem;
  color: var(--color-text-muted);
}
/* Blind-Bestaetigung (06.09.2026): der Hinweis ersetzt die Chips,
   der Vergleich kommt erst auf die Erfolgskarte. */
.blind-hinweis { color: #b3762a; font-weight: 600; }
.blind-vergleich { margin-top: .5rem; }
.blind-zeile { font-size: .82rem; }
.blind-zeile.deckt { color: var(--gruen); }
.blind-zeile.abweicht { color: #c0392b; font-weight: 600; }
.positions-stand { font-size: .8rem; font-weight: 600; }
.positions-stand.stand-gut { color: var(--gruen); }
.positions-stand.stand-warn { color: #e4b34c; }

/* Kontrollbogen-Vorschlaege (Stufe 3): vorbefuellt, bis zum Anfassen
   sichtbar markiert - ein Vorschlag ist keine Angabe. */
input.vorschlag, select.vorschlag {
  border-color: #e4b34c;
  background: rgba(228, 179, 76, 0.08);
}
.vorschlag-marke {
  display: block;
  margin-top: .2rem;
  font-size: .72rem;
  color: #e4b34c;
}

/* Abschluss-Ampel (Stufe 2): der Weg zur ACT-Meldung als Haken. */
.ampel-liste { margin: .5rem 0 .2rem; }
.ampel-zeile { margin: .15rem 0; font-size: .86rem; }
.ampel-zeile.ampel-gut { color: var(--gruen); }
.ampel-zeile.ampel-offen { color: var(--color-text-muted); }

.startliste { margin-bottom: 1rem; }
.startliste.startliste-leer { display: none; }
.startliste-kopf { margin: 0 0 .3rem; font-size: 1rem; }
.startliste-liste { list-style: none; margin: .5rem 0 0; padding: 0;
  display: flex; flex-direction: column; gap: .35rem; }
.startliste-zeile { display: flex; align-items: center; gap: .5rem;
  flex-wrap: wrap; }
.startliste-knopf { font: inherit; text-align: left; cursor: pointer;
  padding: .45rem .7rem; border-radius: 6px; border: 1px solid #c9d4de;
  background: #f4f8fb; color: #17324d; flex: 1 1 14rem; }
.startliste-knopf:hover, .startliste-knopf:focus-visible {
  background: #e4eff8; border-color: #8fb0cc; }
.startliste-datum { font-size: .82rem; color: #6b7a86;
  font-variant-numeric: tabular-nums; }
.startliste-mehr { font-size: .85rem; color: #6b7a86; }

/* LVS-Chip (Punkt 5, 04.09.2026): eingefrorene Bestandsliste als
   Angebot - Rahmen gelblich wie die Vorschlags-Marke, denn es IST
   einer. */
.lvs-chip { border: 1px dashed #b8860b; border-radius: 8px;
  padding: 0.4rem 0.6rem; margin: 0.5rem 0; }
.lvs-chip .knopf { margin-top: 0.3rem; }

/* Produktseite (Punkt 3, 04.09.2026) */
.pd-foto-grid { display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 6px; margin-top: .4rem; }
.pd-foto-grid img { width: 100%; height: 84px; object-fit: cover;
  border-radius: 6px; cursor: pointer; }
#pd-zurueck { margin-bottom: .4rem; }

/* Chargen-Suche in der Bestand-Ansicht (Stufe 3, 05.09.2026) */
.chargen-mini { width: 56px; height: 56px; object-fit: cover;
  border-radius: 6px; cursor: pointer; flex-shrink: 0; }

/* Stufe 5: geprüfter Stamm an der Lesezeile */
.chip-stamm-ok { border-color: #2f9e6e; color: #7fd6ab; }

/* Auslagerung aus CargoSoft im Warenausgang (06.09.2026) */
.auslagerung-position { border-top: 1px solid var(--linie, rgba(255,255,255,.14)); padding-top: .55rem; margin-top: .55rem; }
.auslagerung-plaetze { display: flex; flex-wrap: wrap; gap: .35rem; margin: .35rem 0 .2rem; }
.auslagerung-platz { font-family: ui-monospace, Consolas, monospace; font-weight: 600; font-size: 1.02rem; border: 1.5px solid currentColor; border-radius: .35rem; padding: .12rem .5rem; }
.auslagerung-zulauf { font-weight: 700; border: 2px solid currentColor; border-radius: .4rem; padding: .35rem .55rem; margin: .4rem 0 .2rem; }

/* ------------------------------------------------------------ Muster (Mona)
   Reiter "Muster" (13.09.2026): Aufträge aus der Büro-Musterdatenbank.
   Große Ziele (Handschuhe), Charge als Mono-Block, harte Farben nur für
   Prüfergebnisse. Alle Werte aus den Tokens oben - keine Parallel-Palette. */
.muster-kopf { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin-bottom: 0.5rem; }
.muster-auftrag.muster-zu { opacity: 0.72; }
.muster-alt { color: var(--rot); font-size: 0.85rem; margin: 0.2rem 0 0.6rem; }
.muster-pos { border-top: 1px solid var(--color-surface-line); padding: 0.7rem 0 0.5rem; }
.muster-pos-kopf { display: flex; gap: 0.6rem; align-items: flex-start; }
.muster-pos-status { flex: none; }
.muster-charge { display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem; margin-top: 0.3rem; font-family: var(--font-mono); }
.muster-pnr { color: var(--color-text-muted); font-size: 0.86rem; }
.muster-batch { font-size: 1.15rem; font-weight: 600; letter-spacing: 0.02em; color: var(--color-text); }
.muster-gezogen .muster-batch { color: var(--gruen); }
.muster-warn { color: var(--warn); font-weight: 500; font-size: 0.86rem; margin: 0.3rem 0; }
.muster-maske { margin-top: 0.6rem; padding: 0.8rem; border-radius: var(--radius); background: var(--color-bg-deep); border: 1px solid var(--color-surface-line); display: grid; gap: 0.7rem; }
.muster-handnummer { display: flex; align-items: baseline; gap: 0.6rem; padding: 0.5rem 0.7rem; border-radius: var(--radius-sm); background: var(--accent-faint); border: 1px dashed var(--accent-line); }
.muster-handnummer-lbl { font-size: 0.78rem; color: var(--color-text-muted); }
.muster-handnummer-wert { font-family: var(--font-mono); font-size: 1.25rem; font-weight: 600; color: var(--akzent-text); }
.muster-plaetze, .muster-werkzeug, .muster-probleme, .muster-foto-reihe { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.muster-platz { min-height: 44px; padding: 0.35rem 0.8rem; border-radius: var(--radius-pill); border: 1px solid var(--color-surface-line); background: var(--color-surface); color: var(--color-text); font-family: var(--font-mono); font-size: 0.95rem; }
.muster-platz.gewaehlt { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-accent-contrast); font-weight: 600; }
.muster-problem { font-family: var(--font-body); }
.muster-problem.gewaehlt { background: var(--warn); border-color: var(--warn); }
.muster-platz-frei { flex: 1 1 120px; min-height: 44px; }
.muster-scan { display: block; text-align: center; cursor: pointer; }
.muster-hand { display: flex; gap: 0.4rem; }
.muster-hand input { flex: 1; text-transform: uppercase; font-family: var(--font-mono); }
.muster-ok { color: var(--gruen); font-weight: 600; padding: 0.5rem 0.7rem; border-radius: var(--radius-sm); background: var(--gruen-hauch); border: 1px solid var(--gruen-linie); margin: 0; }
.muster-fehl { color: var(--rot); font-weight: 600; padding: 0.5rem 0.7rem; border-radius: var(--radius-sm); background: var(--rot-hauch); border: 1px solid var(--rot-linie); margin: 0; }
.muster-schalter { display: grid; gap: 0.5rem; }
.muster-haken { display: flex; align-items: center; gap: 0.5rem; min-height: 44px; }
.muster-haken input { width: 24px; height: 24px; }
.muster-foto-knopf { min-height: 48px; display: inline-flex; align-items: center; padding: 0.4rem 0.9rem; border-radius: var(--radius-sm); border: 1px solid var(--color-surface-line); background: var(--color-surface); cursor: pointer; }
.muster-foto-knopf.hat { border-color: var(--gruen-linie); background: var(--gruen-hauch); color: var(--gruen); }
.muster-warteschlange { padding: 0.6rem 0.8rem; border-radius: var(--radius-sm); background: var(--warn-hauch); border: 1px solid var(--warn-linie); color: var(--warn); }
.fuss-zahl { position: absolute; top: 4px; right: 12%; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--color-accent); color: var(--color-accent-contrast); font-size: 0.66rem; font-weight: 700; line-height: 18px; text-align: center; }
.fuss-knopf { position: relative; }

/* --------------------------------------- Kurze Erfassungsmaske (28.09.2026)
   Nur mit APP_KURZMASKE im HTML vorhanden; ohne Schalter bleiben die
   Regeln ungenutzt (CSS wird nie geschaltet, Regel 8). */
.schnell-zeile { margin: 0 0 1.2rem; }
.schnell-zeile .knopf { width: 100%; min-height: 56px; font-size: 1.05rem; }
.schnell-zeile .feld-hilfe { margin-top: 0.4rem; }
.mehr-block { margin: 0 0 0.9rem; }
.mehr-kopf {
  min-height: 48px; display: flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1.1rem; cursor: pointer; list-style: none;
  border: 1px dashed var(--color-surface-line); border-radius: var(--radius);
  color: var(--color-text-muted); background: var(--color-surface);
}
.mehr-kopf::-webkit-details-marker { display: none; }
.mehr-kopf::before { content: "▸"; color: var(--akzent-text); transition: transform var(--dauer-kurz, 150ms); }
.mehr-block[open] > .mehr-kopf { margin-bottom: 0.9rem; border-style: solid; }
.mehr-block[open] > .mehr-kopf::before { transform: rotate(90deg); }
.mehr-kopf:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.mehr-zahl { color: var(--warn); font-weight: 600; }
.nachmessen-klappe > .mehr-kopf { border: 0; padding: 0; background: none; min-height: 44px; }
.nachmessen-klappe > .mehr-kopf .karten-titel { margin: 0; }
.nachmessen-klappe[open] > .mehr-kopf { margin-bottom: 0.6rem; }

/* Handbuch-„?“ an jeder Ansicht (28.09.2026) */
.hilfe-link {
  display: inline-grid; place-items: center; width: 26px; height: 26px; margin-left: 0.6rem; vertical-align: 0.25em;
  border-radius: 50%; border: 1px solid var(--color-surface-line); color: var(--color-text-muted);
  font-size: 0.85rem; font-weight: 600; text-decoration: none; touch-action: manipulation;
}
.hilfe-link:hover, .hilfe-link:focus-visible { border-color: var(--color-accent); color: var(--color-accent); outline: none; }
