/* AH Werkbank – Grundgerüst. CI der Website: Nacht #0D1821, Cyan #1EB4D4, Barlow + Big Shoulders Display.
   Grund in Edelstahl-Grau (Abzugshauben), Status-Farben aus dem Arbeitsalltag: Fett-Gelb = offen, Grün = raus. */
:root {
  --nacht: #0D1821;
  --nacht-2: #172A3D;
  --cyan: #1EB4D4;
  --cyan-tief: #0A7891;
  --cyan-hauch: rgba(30, 180, 212, .14);
  --stahl: #E4EAEE;
  --stahl-2: #D3DCE2;
  --papier: #FFFFFF;
  --tinte: #1B252D;
  --grau: #5B6B76;
  --linie: #D3DCE1;
  --gelb: #E5A229;
  --gelb-hauch: #FFF4D6;
  --gruen: #1F8A5B;
  --gruen-hauch: #E3F4EA;
  --rot: #B42318;
  --rot-hauch: #FDECEA;
  --grund: #FFFFFF;
  --flaeche: #F3F6F8;     /* aktive Punkte, Segmente */
  --rand: #E3E8EC;        /* Kartenrand */
  --radius: 12px;
  --schrift: Barlow, system-ui, -apple-system, "Segoe UI", sans-serif;
  --anzeige: "Big Shoulders Display", Barlow, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--grund); color: var(--tinte); font: 400 15.5px/1.5 var(--schrift); }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--cyan-tief); }
.mono { font-family: var(--mono); font-weight: 500; font-size: .92em; letter-spacing: -.01em; }
.fehlt { color: var(--rot); font-weight: 600; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Rahmen: helle Seitenleiste + Inhalt ---------- */
.rahmen { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.leiste { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 28px; padding: 22px 12px 14px; background: var(--papier); border-right: 1px solid var(--rand); overflow-y: auto; }
.leiste__marke { display: flex; align-items: center; gap: 10px; padding: 0 10px; color: var(--nacht); text-decoration: none; font: 800 20px/1 var(--anzeige); letter-spacing: .05em; text-transform: uppercase; }
.leiste__marke img { width: 36px; height: 36px; border-radius: 8px; }
.leiste ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.leiste__punkte a { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px; color: var(--tinte); text-decoration: none; font-weight: 500; transition: background .15s, color .15s; }
.leiste svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.leiste__punkte a[aria-current] { background: var(--flaeche); color: var(--nacht); font-weight: 700; }
.leiste__punkte a[aria-current]::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--cyan); }
.leiste .zahl { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 99px; background: var(--gelb); color: var(--nacht); font-size: 12px; text-align: center; }
/* Unterpunkte mit Führungslinie */
.leiste__unter { margin: 2px 0 6px 21px !important; padding-left: 10px !important; border-left: 1px solid var(--rand); gap: 0 !important; }
.leiste__unter a { padding: 6px 10px; font-size: 14.5px; color: var(--grau); }
.leiste__unter a[aria-current]::before { left: -11px; top: 6px; bottom: 6px; }
.leiste__unter small { margin-left: auto; font-size: 12.5px; color: var(--grau); }
.leiste__gruppe { margin: 14px 0 2px; padding: 0 12px; font-size: 12.5px; font-weight: 600; letter-spacing: .02em; color: var(--grau); }
/* Benutzer unten: Kürzel, Name, Firma; Menü klappt nach oben auf */
.leiste__ich { position: relative; margin-top: auto; border-top: 1px solid var(--rand); padding-top: 12px; }
.leiste__ich summary { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; cursor: pointer; list-style: none; }
.leiste__ich summary::-webkit-details-marker { display: none; }
.leiste__ich summary > svg { margin-left: auto; color: var(--grau); transition: transform .15s; }
.leiste__ich[open] summary > svg { transform: rotate(180deg); }
.leiste__kuerzel { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--nacht); color: #fff; font-size: 12.5px; font-weight: 700; letter-spacing: .03em; }
.leiste__wer { display: grid; min-width: 0; line-height: 1.25; }
.leiste__wer strong { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leiste__wer small { font-size: 12.5px; color: var(--grau); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leiste__menue { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); display: grid; padding: 6px; border: 1px solid var(--rand); border-radius: 10px; background: var(--papier); box-shadow: 0 12px 32px rgba(13,24,33,.12); }
.leiste__menue a, .leiste__menue button { display: block; text-decoration: none; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: none; text-align: left; font-size: 14.5px; font-weight: 500; color: var(--tinte); cursor: pointer; }
@media (hover: hover) {
  .leiste__punkte a:hover, .leiste__ich summary:hover, .leiste__menue button:hover { background: var(--flaeche); }
}

/* Berichte: beim Überfahren klappt rechts „Neuer Bericht“ mit den vier Arten auf (nur mit Maus, nicht am Handy) */
.leiste__berichte { position: relative; }
.leiste__neu { display: none; }
@media (hover: hover) and (min-width: 901px) {
  .leiste { overflow: visible; z-index: 20; }   /* sticky = eigene Ebene: über den Inhalt heben, sonst liegt das Menü darunter */
  .leiste__neu {
    display: block; position: absolute; z-index: 40; left: calc(100% + 10px); top: -10px; width: 420px; padding: 14px;
    border: 1px solid var(--rand); border-radius: var(--radius); background: var(--papier); box-shadow: 0 18px 44px rgba(13,24,33,.16);
    opacity: 0; visibility: hidden; transform: translateX(-6px); transition: opacity .16s, transform .16s, visibility 0s .16s;
  }
  /* Brücke über die Lücke, damit das Menü beim Hinüberfahren offen bleibt */
  .leiste__neu::before { content: ""; position: absolute; top: 0; bottom: 0; right: 100%; width: 22px; }
  .leiste__berichte:hover > .leiste__neu, .leiste__neu:focus-within {
    opacity: 1; visibility: visible; transform: none; transition: opacity .16s .12s, transform .16s .12s, visibility 0s .12s;
  }
}
.leiste__neu-titel { display: block; margin: 0 2px 10px; font-size: 12.5px; font-weight: 600; letter-spacing: .02em; color: var(--grau); }

/* ---------- Berichtsarten: Karten zur Auswahl, Zeichen, kleine Marke ---------- */
.art-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--flaeche); color: var(--nacht); }
.art-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.art-icon--pauschale { background: var(--gelb-hauch); color: #8A5A00; }
.art-icon--neumontage { background: var(--gruen-hauch); color: var(--gruen); }
.art-icon--schiff { background: var(--cyan-hauch); color: var(--cyan-tief); }
.artwahl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.artkarte {
  position: relative; display: grid; align-content: start; gap: 6px; padding: 18px; min-width: 0;
  border: 1px solid var(--rand); border-radius: var(--radius); background: var(--papier); color: var(--tinte); text-decoration: none;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.artkarte .art-icon { margin-bottom: 8px; }
.artkarte strong { font-size: 17px; font-weight: 700; color: var(--nacht); }
.artkarte span:not(.art-icon) { font-size: 14px; line-height: 1.4; color: var(--grau); }
.artkarte small { justify-self: start; margin-top: 6px; padding: 2px 8px; border-radius: 99px; background: var(--flaeche); font-size: 12px; font-weight: 600; color: var(--grau); }
/* Gewählt: Karte wird nachtblau wie die Einwurf-Fläche darunter */
.artkarte[aria-current] { border-color: var(--nacht); background: var(--nacht); color: #fff; box-shadow: 0 10px 26px rgba(13,24,33,.18); }
.artkarte[aria-current] strong { color: #fff; }
.artkarte[aria-current] span:not(.art-icon) { color: rgba(255,255,255,.75); }
.artkarte[aria-current] small { background: rgba(255,255,255,.12); color: #fff; }
.artkarte[aria-current] .art-icon { background: var(--cyan); color: var(--nacht); }
.artkarte[aria-current]::after { content: ""; position: absolute; top: 16px; right: 16px; width: 9px; height: 5px; border: solid var(--cyan); border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg); }
@media (hover: hover) { .artkarte:not([aria-current]):hover { border-color: var(--cyan); box-shadow: 0 8px 22px rgba(13,24,33,.08); transform: translateY(-1px); } }
/* Klein im Menü der Seitenleiste: 2 × 2 */
.artwahl--klein { grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.artwahl--klein .artkarte, .leiste .leiste__neu .artkarte { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 10px; align-items: center; padding: 10px; font-weight: 400; }
.artwahl--klein .art-icon { grid-row: span 2; width: 34px; height: 34px; margin: 0; }
.artwahl--klein .art-icon svg { width: 18px; height: 18px; }
.artwahl--klein strong { font-size: 14.5px; }
.artwahl--klein small { margin: 0; padding: 0; background: none; font-size: 12px; font-weight: 400; }
.artmarke { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--grau); }
.artmarke .art-icon { width: 20px; height: 20px; border-radius: 5px; }
.artmarke .art-icon svg { width: 13px; height: 13px; stroke-width: 2; }

.inhalt { min-width: 0; padding: 40px clamp(16px, 4vw, 56px) 64px; max-width: 1280px; width: 100%; margin: 0 auto; }

/* ---------- Kopf jeder Seite ---------- */
.kopf { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.kopf--zeile { align-items: center; }
.kopf h1 { margin: 0; font: 700 clamp(28px, 3vw, 34px)/1.1 var(--schrift); letter-spacing: -.015em; color: var(--nacht); }
.kopf h1 .mono { font: 500 .55em/1 var(--mono); letter-spacing: 0; color: var(--grau); vertical-align: middle; margin-left: 6px; }
.unterkopf { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin: 0 0 12px; }
.unterkopf h2 { margin: 0; font-size: 17px; font-weight: 600; color: var(--nacht); }
.unterkopf span { font-size: 14px; color: var(--grau); }

/* ---------- Segment-Schalter (Zeitraum, Werte) ---------- */
.segment { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--rand); border-radius: 10px; background: var(--papier); }
.segment a { padding: 6px 12px; border-radius: 7px; color: var(--grau); text-decoration: none; font-size: 14.5px; font-weight: 500; white-space: nowrap; }
.segment a[aria-current] { background: var(--flaeche); color: var(--nacht); font-weight: 700; }
.segment b { margin-left: 4px; font-weight: 700; color: var(--nacht); }
.segment--klein a { padding: 5px 10px; font-size: 14px; }
@media (hover: hover) { .segment a:hover { color: var(--nacht); } }

/* ---------- Kennzahlen: eine Leiste, durch Linien geteilt ---------- */
.kennzahlen { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 20px; border: 1px solid var(--rand); border-radius: var(--radius); background: var(--papier); }
.kennzahl { display: grid; gap: 6px; padding: 18px 20px; min-width: 0; }
.kennzahl + .kennzahl { border-left: 1px solid var(--rand); }
.kennzahl__titel { font-size: 13.5px; color: var(--grau); }
.kennzahl strong { display: flex; align-items: center; gap: 8px; font-size: 30px; font-weight: 600; line-height: 1.1; color: var(--nacht); font-variant-numeric: tabular-nums; }
.kennzahl small { font-size: 13px; color: var(--grau); }
.delta { font-style: normal; font-size: 12.5px; font-weight: 700; padding: 2px 7px; border-radius: 99px; background: var(--flaeche); color: var(--grau); }
.delta--plus { background: var(--gruen-hauch); color: var(--gruen); }

/* ---------- Raster Übersicht: Verlauf + Einwurf ---------- */
.raster { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 20px; margin-bottom: 20px; align-items: stretch; }
.verlauf { display: flex; flex-direction: column; }
.verlauf__kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.verlauf__kopf p { margin: 2px 0 0; font-size: 14px; color: var(--grau); }
.balken { flex: 1; display: grid; grid-template-columns: auto 1fr; gap: 10px; min-height: 220px; }
.balken__skala { display: flex; flex-direction: column; justify-content: space-between; padding-bottom: 26px; font-size: 12px; color: var(--grau); text-align: right; }
.balken__skala b { font-weight: 500; line-height: 1; transform: translateY(-50%); }
.balken__skala b:last-child { transform: translateY(50%); }
.balken__flaeche { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: clamp(2px, .5vw, 6px); align-items: stretch;
  background: linear-gradient(var(--rand), var(--rand)) top / 100% 1px no-repeat, linear-gradient(var(--rand), var(--rand)) bottom 26px left 0 / 100% 1px no-repeat; }
.balken__spalte { display: grid; grid-template-rows: 1fr 26px; min-width: 0; }
.balken__spalte i { align-self: end; height: var(--h); min-height: 0; border-radius: 4px 4px 0 0; background: var(--nacht); transition: background .15s; }
.balken__spalte--heute i { background: var(--cyan); }
.balken__spalte small { padding-top: 7px; font-size: 11.5px; color: var(--grau); text-align: center; white-space: nowrap; overflow: visible; }
@media (hover: hover) { .balken__spalte:hover i { background: var(--cyan-tief); } }
.leer-karte { display: grid; justify-items: center; gap: 4px; padding: 44px 22px; text-align: center; }
.leer-karte__zeichen { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 8px; border-radius: 50%; background: var(--cyan-hauch); color: var(--cyan-tief); }
.leer-karte__zeichen svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.leer-karte p { margin: 0; max-width: 52ch; color: var(--grau); font-size: 14.5px; }
.zurueck { display: inline-block; margin-bottom: 6px; font-size: 14px; font-weight: 600; text-decoration: none; color: var(--grau); }
.zurueck:hover { color: var(--nacht); }

/* ---------- Knöpfe ---------- */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px;
  border: 1.5px solid var(--nacht); border-radius: 8px; background: var(--papier); color: var(--nacht);
  font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s;
}
.knopf:active { transform: translateY(1px); }
.knopf[disabled] { opacity: .45; cursor: not-allowed; }
.knopf--haupt { background: var(--cyan); border-color: var(--cyan); color: var(--nacht); }
.knopf--leise { border-color: transparent; background: transparent; color: var(--nacht); }
.knopf--gefahr { color: var(--rot); }
.knopf--klein { min-height: 34px; padding: 0 12px; font-size: 14px; }
@media (hover: hover) {
  .knopf:hover:not([disabled]) { background: var(--stahl); }
  .knopf--haupt:hover:not([disabled]) { background: #45C4DF; border-color: #45C4DF; }
  .knopf--leise:hover:not([disabled]) { background: rgba(13,24,33,.06); }
}

/* ---------- Meldungen ---------- */
.blitz { margin: 0 0 16px; padding: 11px 14px; border-radius: 8px; border-left: 4px solid var(--cyan); background: var(--papier); font-weight: 500; }
.blitz--ok { border-left-color: var(--gruen); background: var(--gruen-hauch); }
.blitz--fehler { border-left-color: var(--rot); background: var(--rot-hauch); color: #7A1A12; }
.blitz--warn { border-left-color: var(--gelb); background: var(--gelb-hauch); color: #6B4A00; }
.leer { margin: 0; padding: 18px 0 4px; color: var(--grau); }

/* ---------- Einwurf: Lieferschein ablegen (Startseite) ---------- */
.einwurf { position: relative; margin-bottom: 10px; }
.einwurf__flaeche {
  position: relative; display: flex; align-items: center; gap: 28px; min-height: 176px; padding: 28px 36px; overflow: hidden;
  border-radius: 14px; background: var(--nacht); color: #fff; cursor: pointer;
  box-shadow: inset 0 0 0 2px rgba(30,180,212,.0); transition: box-shadow .2s, transform .2s;
}
/* Lüftungsgitter: Lamellen, durch die der Lieferschein „eingezogen“ wird */
.einwurf__gitter {
  flex: none; width: 132px; height: 112px; border-radius: 10px; border: 2px solid rgba(255,255,255,.22);
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.16) 0 6px, transparent 6px 14px);
  position: relative; overflow: hidden;
}
.einwurf__gitter::after {
  content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent, rgba(30,180,212,.55), transparent);
  transform: translateY(-100%); opacity: 0;
}
.einwurf__text { display: grid; gap: 6px; }
.einwurf__text strong { font: 800 clamp(28px, 3.4vw, 40px)/1 var(--anzeige); letter-spacing: .03em; text-transform: uppercase; }
.einwurf__text span { color: rgba(255,255,255,.78); font-size: 16px; max-width: 46ch; }
.einwurf__text u { color: var(--cyan); text-underline-offset: 3px; }
.einwurf__flaeche:hover, .einwurf--ziel .einwurf__flaeche { box-shadow: inset 0 0 0 2px var(--cyan); }
.einwurf--ziel .einwurf__flaeche { transform: scale(1.01); }
.einwurf--ziel .einwurf__gitter::after, .einwurf[data-zustand="arbeitet"] .einwurf__gitter::after { opacity: 1; animation: zug 1.1s linear infinite; }
#lieferschein:focus-visible + .einwurf__flaeche { outline: 3px solid var(--cyan); outline-offset: 3px; }
@keyframes zug { to { transform: translateY(100%); } }
.einwurf__status { margin: 10px 2px 0; min-height: 1.5em; font-weight: 600; }
.einwurf[data-zustand="fehler"] .einwurf__status { color: var(--rot); }
.ohne-lieferschein { margin: 0 0 28px; }
/* Als Karte neben dem Verlauf: Gitter oben, Text darunter, „Ohne Lieferschein“ als Fußzeile */
.einwurf--karte { display: flex; flex-direction: column; margin: 0; padding: 22px; border-radius: var(--radius); background: var(--nacht); color: #fff; }
.einwurf--karte .einwurf__flaeche { flex: 1; flex-direction: column; align-items: stretch; gap: 20px; min-height: 0; padding: 0; border-radius: 10px; background: none; box-shadow: none; }
.einwurf--karte .einwurf__gitter { width: 100%; height: auto; min-height: 112px; flex: 1; }
.einwurf--karte .einwurf__text strong { font-size: clamp(26px, 2.4vw, 32px); }
.einwurf--karte .einwurf__text span { font-size: 15px; }
.einwurf--karte .einwurf__flaeche:hover .einwurf__gitter, .einwurf--karte.einwurf--ziel .einwurf__gitter { border-color: var(--cyan); }
.einwurf--karte.einwurf--ziel { box-shadow: 0 0 0 3px var(--cyan); }
.einwurf--karte .einwurf__status { margin: 8px 0 0; min-height: 0; color: var(--cyan); }
.einwurf--karte .ohne-lieferschein { margin: 14px 0 0; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.14); }
.einwurf--karte .ohne-lieferschein .knopf { border-color: rgba(255,255,255,.35); background: transparent; color: #fff; }
@media (hover: hover) { .einwurf--karte .ohne-lieferschein .knopf:hover { background: rgba(255,255,255,.08); } }

/* ---------- Blöcke, Spalten ---------- */
.spalten { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 20px; align-items: start; }
.spalten--kunde { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.stapel { display: grid; gap: 20px; }
.block { background: var(--papier); border: 1px solid var(--rand); border-radius: var(--radius); padding: 20px 22px; }
.block h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font: 600 17px/1.3 var(--schrift); color: var(--nacht); }
.block h3 { margin: 20px 0 6px; font-size: 15px; }
.block__zahl { font: 600 13px/1 var(--schrift); padding: 3px 8px; border-radius: 99px; background: var(--flaeche); color: var(--grau); }
.block__mehr { margin: 10px 0 0; font-size: 14px; font-weight: 600; }

/* ---------- Berichtsliste ---------- */
.liste { list-style: none; margin: 0; padding: 0; }
.liste li + li { border-top: 1px solid var(--linie); }
.liste__zeile { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 6px; color: inherit; text-decoration: none; border-radius: 6px; }
.liste__zeile:hover { background: #F5F8FA; }
.liste__nr { display: grid; justify-items: start; gap: 3px; color: var(--grau); font-size: 13.5px; }
.liste__haupt { display: grid; min-width: 0; }
.liste__haupt strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.liste__haupt small { color: var(--grau); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.liste__stand { display: grid; justify-items: end; gap: 4px; }
.liste__stand small { font-size: 12.5px; color: var(--grau); }
.liste__stand small.schritt { color: var(--nacht); font-weight: 700; }

/* ---------- Laufweg: Kanalstück mit drei Abschnitten ---------- */
.laufweg { display: inline-flex; gap: 3px; }
.laufweg__teil { position: relative; width: 26px; height: 8px; border-radius: 2px; background: var(--stahl-2); overflow: hidden; }
.laufweg__teil--fertig { background: var(--nacht); }
.laufweg--komplett .laufweg__teil--fertig { background: var(--gruen); }
.laufweg__teil--jetzt { background: var(--gelb-hauch); box-shadow: inset 0 0 0 1.5px var(--gelb); }
.laufweg__teil--jetzt::after {
  content: ""; position: absolute; inset: 0; width: 200%;
  background: repeating-linear-gradient(90deg, transparent 0 5px, rgba(229,162,41,.55) 5px 8px);
  animation: luft 1.4s linear infinite;
}
@keyframes luft { to { transform: translateX(-16px); } }
.laufweg--text { gap: 4px; }
.laufweg--text .laufweg__teil { width: auto; height: auto; min-width: 118px; padding: 7px 12px 6px; border-radius: 6px; font-size: 13px; font-weight: 700; text-align: center; color: var(--grau); }
.laufweg--text .laufweg__teil span { position: relative; z-index: 1; }
.laufweg--text .laufweg__teil--fertig { color: #fff; }
.laufweg--text .laufweg__teil--jetzt { color: #6B4A00; }
.laufweg--text .laufweg__teil:first-child { border-radius: 6px 2px 2px 6px; }
.laufweg--text .laufweg__teil:last-child { border-radius: 2px 6px 6px 2px; }
.status { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12.5px; font-weight: 700; }

/* ---------- Suche, Reiter, Tabelle ---------- */
.suche { display: flex; gap: 8px; margin-bottom: 14px; max-width: 620px; }
.suche input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 1.5px solid var(--stahl-2); border-radius: 8px; background: var(--papier); }
.suche input:focus { border-color: var(--cyan); outline: none; box-shadow: 0 0 0 3px var(--cyan-hauch); }
.reiter { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.reiter a { padding: 7px 14px; border-radius: 99px; background: var(--flaeche); color: var(--nacht); text-decoration: none; font-weight: 600; font-size: 14px; }
.reiter a span { color: var(--grau); font-weight: 500; margin-left: 2px; }
.reiter a[aria-current] { background: var(--nacht); color: #fff; }
.reiter a[aria-current] span { color: rgba(255,255,255,.7); }
.tabelle { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--papier); border: 1px solid var(--rand); border-radius: var(--radius); overflow: hidden; }
.tabelle th { text-align: left; font-size: 13px; font-weight: 600; color: var(--grau); padding: 12px 14px; border-bottom: 1px solid var(--rand); }
.tabelle td { padding: 11px 14px; border-top: 1px solid var(--linie); vertical-align: top; }
.tabelle td a { color: var(--nacht); text-decoration: none; }
.tabelle td a:hover { text-decoration: underline; }
.tabelle small { color: var(--grau); }
.tabelle tbody tr:hover { background: #F7FAFB; }
.zahlspalte { text-align: right; }

/* ---------- Formulare ---------- */
.formular { display: grid; gap: 14px; }
.formular label { display: grid; gap: 5px; font-weight: 600; font-size: 14px; color: var(--nacht); }
.formular label small { font-weight: 400; color: var(--grau); font-size: 13px; }
.formular input:not([type="checkbox"]):not([type="file"]), .formular textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border: 1.5px solid var(--stahl-2); border-radius: 8px; background: #FBFCFD; font-weight: 400;
}
.formular textarea { resize: vertical; line-height: 1.45; }
.formular input:focus, .formular textarea:focus { border-color: var(--cyan); outline: none; box-shadow: 0 0 0 3px var(--cyan-hauch); background: #fff; }
.formular__knoepfe { display: flex; gap: 10px; justify-content: flex-end; padding-top: 4px; }
.formular__abstand { margin-top: 14px !important; }
.reihe { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.reihe--plz { grid-template-columns: 110px 1fr; }
.reihe--datei { grid-template-columns: 1fr auto; align-items: end; }
.formular label.haken { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.formular label.haken input { width: 18px; height: 18px; accent-color: var(--cyan-tief); }
code { font-family: var(--mono); font-size: .88em; background: var(--stahl); padding: 1px 5px; border-radius: 4px; }
.datei { display: flex; gap: 10px; align-items: center; margin: 12px 0; padding: 10px 12px; border-radius: 8px; background: var(--stahl); }
.datei svg { width: 26px; height: 26px; fill: none; stroke: var(--nacht); stroke-width: 1.6; flex: none; }
.datei span { display: grid; }
.datei small { color: var(--grau); }
.werte { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 10px 0 0; font-size: 14.5px; }
.werte dt { color: var(--grau); }
.werte dd { margin: 0; word-break: break-word; }

/* ---------- einfache Seiten (Anmeldung, Fehler, Einrichtung) ---------- */
body.einfach { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--nacht); }
.karte-mitte { width: 100%; max-width: 420px; padding: 32px 30px; border-radius: 14px; background: var(--papier); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.karte-mitte.breit { max-width: 820px; }
.karte-mitte__logo { display: block; width: 72px; height: 72px; border-radius: 12px; margin-bottom: 14px; }
.karte-mitte h1 { margin: 0 0 6px; font: 800 34px/1 var(--anzeige); letter-spacing: .03em; text-transform: uppercase; color: var(--nacht); }
.karte-mitte > p { color: var(--grau); margin: 0 0 18px; }
.karte-mitte .knopf--haupt { width: 100%; }
.tabelle-einfach { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabelle-einfach td, .tabelle-einfach th { padding: 6px 8px; border-top: 1px solid var(--linie); text-align: left; }
.zwischen { font-size: 17px; margin: 22px 0 8px; display: flex; gap: 10px; align-items: center; }
.ampel { width: 28px; font-weight: 700; }
.ampel.gut { color: var(--gruen); } .ampel.schlecht { color: var(--rot); } .ampel.hinweis { color: var(--gelb); }
.zaehler-rot, .zaehler-gruen { font-size: 12.5px; padding: 2px 8px; border-radius: 99px; }
.zaehler-rot { background: var(--rot-hauch); color: var(--rot); } .zaehler-gruen { background: var(--gruen-hauch); color: var(--gruen); }

.tabelle tbody tr:first-child td { border-top: 0; }
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Bearbeiten / Löschen je Zeile */
.aktionsspalte { width: 1%; white-space: nowrap; text-align: right; }
.tabelle td.aktionsspalte { padding-top: 7px; padding-bottom: 7px; vertical-align: middle; }
.symbolknopf { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; color: var(--grau); }
.symbolknopf svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) {
  .symbolknopf:hover { background: var(--flaeche); color: var(--nacht); }
  .symbolknopf--gefahr:hover { background: var(--rot-hauch); color: var(--rot); }
}

/* Kunde löschen: zugeklappt, erst nach dem Aufklappen der rote Knopf */
.formular__hinweis { margin: -4px 0 4px; font-size: 13.5px; color: var(--grau); }
.gefahrzone summary { cursor: pointer; font-weight: 700; color: var(--rot); list-style: none; }
.gefahrzone summary::-webkit-details-marker { display: none; }
.gefahrzone summary::before { content: "›"; display: inline-block; margin-right: 8px; transition: transform .15s; }
.gefahrzone[open] summary::before { transform: rotate(90deg); }
.gefahrzone[open] { border-color: #F3C4BF; }
.gefahrzone p { margin: 10px 0 14px; font-size: 14.5px; color: var(--tinte); }
.knopf--loeschen { border-color: var(--rot); background: var(--rot); color: #fff; }
@media (hover: hover) { .knopf--loeschen:hover:not([disabled]) { background: #8F1C13; border-color: #8F1C13; } }

/* ---------- Anmeldung: Formular links, Markenfläche rechts ---------- */
body.anmelden { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.anmelden__formular { display: flex; flex-direction: column; padding: 28px clamp(20px, 4vw, 40px); }
.anmelden__marke { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; color: var(--nacht); text-decoration: none; font: 800 20px/1 var(--anzeige); letter-spacing: .05em; text-transform: uppercase; }
.anmelden__marke img { border-radius: 8px; }
.anmelden__mitte { width: 100%; max-width: 360px; margin: auto; padding: 40px 0; }
.anmelden__mitte h1 { margin: 0 0 6px; font-size: 26px; font-weight: 700; letter-spacing: -.01em; color: var(--nacht); text-align: center; }
.anmelden__mitte > p { margin: 0 0 26px; color: var(--grau); text-align: center; }
.anmelden__mitte .knopf--haupt { width: 100%; margin-top: 8px; }
.anmelden__hilfe { margin: 16px 0 0; font-size: 13px; color: var(--grau); text-align: center; }
.anmelden__buehne { display: grid; place-items: center; padding: 48px clamp(24px, 5vw, 72px); background: var(--nacht); color: #fff; text-align: center;
  /* Lamellen wie am Lüftungsgitter, nur am unteren Rand */
  background-image: repeating-linear-gradient(to bottom, rgba(255,255,255,.05) 0 6px, transparent 6px 14px);
  background-size: 100% 34%; background-position: bottom; background-repeat: no-repeat; }
.anmelden__buehne > div { display: grid; justify-items: center; gap: 14px; max-width: 520px; }
.anmelden__buehne h2 { margin: 0; font: 800 clamp(34px, 3.6vw, 48px)/1.02 var(--anzeige); letter-spacing: .02em; text-transform: uppercase; }
.anmelden__buehne p { margin: 0 0 14px; font-size: 17px; color: rgba(255,255,255,.78); }
.anmelden__buehne .laufweg__teil { background: rgba(255,255,255,.1); color: rgba(255,255,255,.6); }
.anmelden__buehne .laufweg__teil--fertig { background: var(--cyan); color: var(--nacht); }
.anmelden__buehne .laufweg__teil--jetzt { background: var(--gelb-hauch); color: #6B4A00; }

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  .kennzahlen { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kennzahl:nth-child(3) { border-left: 0; }
  .kennzahl:nth-child(n + 3) { border-top: 1px solid var(--rand); }
  .raster { grid-template-columns: 1fr; }
  .artwahl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Handy und Tablet ---------- */
@media (max-width: 900px) {
  .rahmen { grid-template-columns: 1fr; }
  .leiste { position: fixed; inset: auto 0 0 0; height: auto; z-index: 30; flex-direction: row; gap: 0; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--rand); overflow: visible; }
  .leiste__marke, .leiste__ich, .leiste .leiste__unter, .leiste__gruppe { display: none; }
  .leiste__punkte { grid-template-columns: repeat(4, 1fr); width: 100%; }
  .leiste__punkte a { flex-direction: column; gap: 3px; padding: 7px 4px; font-size: 11.5px; }
  .leiste__punkte a[aria-current] { background: none; }
  .leiste__punkte a[aria-current]::before { left: 30%; right: 30%; top: -7px; bottom: auto; width: auto; height: 3px; border-radius: 0 0 3px 3px; }
  .leiste .zahl { position: absolute; top: 2px; left: calc(50% + 8px); margin: 0; min-width: 18px; padding: 0 5px; font-size: 11px; }
  .inhalt { padding: 22px 16px 96px; }
  .raster .einwurf--karte { order: -1; }   /* am Handy zuerst die Hauptaufgabe */
  .einwurf--karte .einwurf__gitter { min-height: 72px; }
  body.anmelden { grid-template-columns: 1fr; }
  .anmelden__buehne { display: none; }
  .spalten--kunde { grid-template-columns: 1fr; }
  .einwurf__flaeche { flex-direction: column; align-items: flex-start; gap: 18px; padding: 24px 22px; }
  .einwurf__gitter { width: 100%; height: 56px; }
  .liste__zeile { grid-template-columns: 1fr auto; gap: 4px 12px; }
  .liste__nr { grid-column: 1 / -1; grid-auto-flow: column; justify-content: start; gap: 10px; font-size: 12.5px; }
  .artwahl { gap: 10px; }
  .artkarte { padding: 14px; }
  .artkarte span:not(.art-icon) { font-size: 13.5px; }
  .tabelle thead { display: none; }
  .tabelle, .tabelle tbody, .tabelle tr, .tabelle td { display: block; }
  .tabelle tr { padding: 10px 14px; border-top: 1px solid var(--linie); }
  .tabelle td { border: 0; padding: 2px 0; }
  .tabelle td:empty { display: none; }
  .tabelle td.aktionsspalte { width: auto; padding-top: 4px; text-align: left; }
  .tabelle td[data-l]:not(:first-child)::before { content: attr(data-l) ": "; color: var(--grau); font-size: 13px; }
  .zahlspalte { text-align: left; }
  .reihe { grid-template-columns: 1fr; }
  .reihe--plz { grid-template-columns: 100px 1fr; }
}
