/*
 * EasyScan Plus – Gestaltung nach DESIGN 2.md (BRILLGRUPPE, Konzept 3),
 * uebertragen auf eine Anwendung mit Seitenmenue.
 * Zwei Textfarben (#656565, #E06C00), Roboto, Orange nur als Akzent.
 */

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/roboto-latin.woff2") format("woff2");
}

:root {
  --orange: #E06C00;
  --orange-hover: #C95F00;
  --orange-dunkel: #B04F00;
  --orange-tint: #FFF3E8;
  --text: #656565;
  --weiss: #FFFFFF;
  --grau: #F7F7F7;
  --linie: #E6E6E6;
  --linie-stark: #D4D4D4;
  --fuss: #333333;
  --fehler: #B3261E;
  --fehler-tint: #FDECEA;
  --ok: #2E7D32;
  --schatten: 0 1px 2px rgb(0 0 0 / .04), 0 8px 24px rgb(0 0 0 / .06);
  --rund-s: 6px;
  --rund-m: 12px;
  --rund-l: 16px;
  --menue: 252px;
  --kopf: 64px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Roboto", "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--grau);
}
img { max-width: 100%; display: block; }
a { color: var(--orange); text-decoration: none; }
a:hover { color: var(--orange-hover); text-decoration: underline; }
h1, h2, h3 { color: var(--text); font-weight: 700; line-height: 1.2; margin: 0; }
h1 { font-size: clamp(24px, 3vw, 32px); }
h2 { font-size: 22px; }
h3 { font-size: 17px; }
p { margin: 0 0 12px; }
small, .klein { font-size: 13px; }
:focus-visible { outline: 3px solid rgb(224 108 0 / .45); outline-offset: 2px; }
[hidden] { display: none !important; }
.nur-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-klein { width: 16px; height: 16px; }

/* ------------------------------------------------------------ Grundlayout */

.app { display: grid; grid-template-columns: var(--menue) minmax(0, 1fr); min-height: 100vh; }

.menue {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  background: var(--weiss);
  border-right: 1px solid var(--linie);
  padding: 20px 14px 16px;
  overflow-y: auto;
  z-index: 40;
}
.menue a.menue-logo { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 6px 10px 18px; margin: 0 0 4px; border-radius: 0; color: var(--text); border-bottom: 1px solid var(--linie); }
.menue a.menue-logo:hover { background: none; }
.menue-logo img { width: 100%; max-width: 200px; height: auto; }
.menue-logo em { font-style: normal; font-size: 12px; letter-spacing: .3em; color: var(--orange); font-weight: 600; text-transform: uppercase; }
.menue-gruppe { margin-top: 14px; }
.menue-titel { font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--orange); padding: 0 12px 6px; }
.menue a, .menue button.menue-link {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 10px 12px; margin: 2px 0;
  border-radius: var(--rund-s);
  color: var(--text); font: inherit; font-size: 15px; font-weight: 500;
  text-decoration: none; background: none; border: 0; cursor: pointer; text-align: left;
}
.menue a:hover, .menue button.menue-link:hover { background: var(--grau); color: var(--text); text-decoration: none; }
.menue a[aria-current="page"] { background: var(--orange-tint); color: var(--orange); box-shadow: inset 3px 0 0 var(--orange); }
.menue a[aria-current="page"] .icon { stroke: var(--orange); }
.menue-fuss { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--linie); }
.menue-fuss form { margin: 0; }

.haupt { min-width: 0; display: flex; flex-direction: column; }
.kopfleiste {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 16px;
  min-height: var(--kopf);
  padding: 10px 32px;
  background: rgb(255 255 255 / .96);
  border-bottom: 1px solid var(--linie);
}
.kopfleiste::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--orange); opacity: .9; }
.kopf-kunde { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.kopf-kunde small { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--orange); font-weight: 600; }
.kopf-kunde strong { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kopf-rechts { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.kopf-benutzer { display: flex; align-items: center; gap: 10px; color: var(--text); }
.kopf-benutzer:hover { text-decoration: none; color: var(--orange); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--orange); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; letter-spacing: .02em; flex: none; }
.kopf-benutzer > span:not(.avatar) { display: flex; flex-direction: column; line-height: 1.15; font-size: 14px; }
.kopf-benutzer > span small { font-size: 12px; }
.sprachwahl { display: flex; gap: 2px; margin: 0; }
.sprachwahl button { font: inherit; font-size: 13px; font-weight: 600; letter-spacing: .05em; padding: 4px 8px; border-radius: var(--rund-s); border: 1px solid transparent; background: none; color: var(--text); cursor: pointer; }
.sprachwahl button[aria-pressed="true"] { border-color: var(--orange); color: var(--orange); }
.menue-knopf { display: none; }

.als-kunde-leiste {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 32px; background: var(--orange-tint); border-bottom: 1px solid #F4D2B3; font-size: 14px;
}
.als-kunde-leiste strong { color: var(--orange); }
.als-kunde-leiste form { margin: 0 0 0 auto; }

.inhalt { width: 100%; min-width: 0; padding: 28px 32px 48px; }
.inhalt > *, .karte { min-width: 0; }
.fusszeile { margin-top: auto; padding: 18px 32px; font-size: 13px; color: var(--text); border-top: 1px solid var(--linie); background: var(--weiss); }

/* ------------------------------------------------------------ Seitenkopf */

.seitenkopf { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.seitenkopf > div:first-child { min-width: 0; }
.kicker { font-size: 13px; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--orange); margin-bottom: 6px; }
.titel-linie { width: 64px; height: 3px; background: var(--orange); margin-top: 12px; }
.seitenkopf-aktionen { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.einleitung { max-width: 880px; margin: -8px 0 24px; }

/* ------------------------------------------------------------ Buttons */

.btn, .btn-umriss, .btn-text, .btn-gefahr {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 10px 20px;
  font: inherit; font-size: 14px; font-weight: 600; letter-spacing: .025em; text-transform: uppercase;
  border-radius: var(--rund-s); border: 1px solid transparent; cursor: pointer;
  text-decoration: none; white-space: nowrap; line-height: 1.2;
}
.btn { background: linear-gradient(90deg, var(--orange-dunkel), var(--orange)); color: #fff; }
.btn:hover { background: linear-gradient(90deg, #943F00, var(--orange-hover)); color: #fff; text-decoration: none; }
.btn-umriss { background: var(--weiss); color: var(--orange); border-color: var(--orange); }
.btn-umriss:hover { background: var(--orange-tint); color: var(--orange-hover); text-decoration: none; }
.btn-text { background: none; color: var(--orange); padding-inline: 10px; text-transform: none; letter-spacing: 0; font-weight: 500; }
.btn-text:hover { background: var(--orange-tint); text-decoration: none; }
.btn-gefahr { background: var(--weiss); color: var(--fehler); border-color: #E7B7B3; }
.btn-gefahr:hover { background: var(--fehler-tint); text-decoration: none; color: var(--fehler); }
.btn-klein { min-height: 34px; padding: 6px 12px; font-size: 13px; }
.btn[disabled], .btn-umriss[disabled] { opacity: .5; cursor: not-allowed; }
.btn-gruppe { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ------------------------------------------------------------ Karten */

.karte { background: var(--weiss); border-radius: var(--rund-l); box-shadow: var(--schatten); padding: 28px; }
.karte + .karte { margin-top: 24px; }
.karte-kopf { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.karte-kopf h2 { font-size: 20px; }
.karte-kopf .btn-gruppe { margin-left: auto; }
.karte-schmal { max-width: 720px; }
.raster-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.raster-2 > .karte { margin-top: 0; }
.raster-2 + .karte, .kacheln + .karte { margin-top: 24px; }

/* Kacheln (Uebersicht) */
.kacheln { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-bottom: 24px; }
.kachel {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 4px;
  padding: 22px 22px 18px; border-radius: var(--rund-l);
  background: var(--weiss); box-shadow: var(--schatten); color: var(--text);
  transition: transform .2s ease, box-shadow .2s ease;
}
.kachel:hover { transform: translateY(-4px); text-decoration: none; color: var(--text); box-shadow: 0 1px 2px rgb(0 0 0 / .05), 0 14px 32px rgb(0 0 0 / .09); }
.kachel-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--orange); display: grid; place-items: center; margin-bottom: 8px; }
.kachel-icon .icon { stroke: #fff; }
.kachel-zahl { font-size: 36px; font-weight: 700; line-height: 1.1; }
.kachel-text { font-size: 14px; }
.kachel-weiter { margin-top: 8px; font-size: 13px; color: var(--orange); font-weight: 600; }
.kachel-hervor .kachel-zahl { color: var(--orange); }

/* ------------------------------------------------------------ Formulare */

.formular { display: grid; gap: 18px; }
.formular-raster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; }
.formular-raster .voll { grid-column: 1 / -1; }
.feld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.feld > label, .feld-titel { font-size: 14px; font-weight: 600; color: var(--text); }
.feld .pflicht { color: var(--orange); }
.feld-hinweis { font-size: 13px; margin: 0; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"], input[type="date"], input[type="file"], select, textarea {
  width: 100%; min-height: 44px;
  padding: 10px 12px;
  font: inherit; font-size: 15px; color: var(--text);
  background: var(--weiss);
  border: 1px solid var(--linie-stark); border-radius: var(--rund-s);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgb(224 108 0 / .18); }
input[readonly] { background: var(--grau); }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--fehler); }
.feld-fehler { color: var(--fehler); font-size: 13px; margin: 0; }
.formular-aktionen { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 6px; }
fieldset { border: 0; padding: 0; margin: 0; }
.auswahl-reihe { display: flex; gap: 8px; flex-wrap: wrap; }
.auswahl-reihe label { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--linie-stark); border-radius: var(--rund-s); cursor: pointer; font-size: 14px; background: var(--weiss); }
.auswahl-reihe input { accent-color: var(--orange); }
.auswahl-reihe label:has(input:checked) { border-color: var(--orange); background: var(--orange-tint); color: var(--orange); font-weight: 600; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 15px; }
.checkbox input { width: 18px; height: 18px; accent-color: var(--orange); }

/* Schalter */
.schalter { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.schalter input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.schalter-spur { width: 40px; height: 22px; border-radius: 11px; background: var(--linie-stark); position: relative; transition: background .15s; flex: none; }
.schalter-spur::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgb(0 0 0 / .2); }
.schalter input:checked + .schalter-spur { background: var(--orange); }
.schalter input:checked + .schalter-spur::after { transform: translateX(18px); }
.schalter input:focus-visible + .schalter-spur { outline: 3px solid rgb(224 108 0 / .45); outline-offset: 2px; }

/* ------------------------------------------------------------ Filterleiste */

.filterleiste { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.filterleiste .feld { flex: 1 1 200px; max-width: 340px; }
.filterleiste .suche { flex: 2 1 280px; max-width: 460px; }
.suchfeld { position: relative; }
.suchfeld .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.suchfeld input { padding-left: 40px; }
.filterleiste .schalter { min-height: 44px; }
.filterleiste .feld-datum { flex: 0 1 170px; }
.tabelle tfoot td { background: var(--grau); border-top: 2px solid var(--linie-stark); border-bottom: 0; font-weight: 700; }
.ergebnis-info { font-size: 14px; margin: 0 0 10px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.ergebnis-info .laden { display: none; }
.ladend .ergebnis-info .laden { display: inline-flex; }

/* ------------------------------------------------------------ Tabellen */

/* Nur die Seite scrollt senkrecht; der Rahmen scrollt hoechstens seitlich (schmale Bildschirme) */
.tabelle-rahmen { position: relative; overflow-x: auto; border: 1px solid var(--linie); border-radius: var(--rund-m); background: var(--weiss); }
/* Passt die Tabelle in die Breite (app.js setzt .passt), scrollt nur die Seite und die
   Kopfzeile klebt unter der Kopfleiste (--kopf-hoehe setzt app.js). */
.tabelle-rahmen.passt { overflow: visible; }
.tabelle-rahmen.passt .tabelle thead th { top: var(--kopf-hoehe, 66px); }
.tabelle-rahmen.passt .tabelle thead th:first-child { border-top-left-radius: var(--rund-m); }
.tabelle-rahmen.passt .tabelle thead th:last-child { border-top-right-radius: var(--rund-m); }
table.tabelle { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.tabelle th, .tabelle td { padding: 8px 10px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--linie); }
.tabelle thead th.umbruch { white-space: normal; line-height: 1.3; hyphens: auto; -webkit-hyphens: auto; min-width: 84px; }
.tabelle thead th.umbruch a { display: inline; }
.tabelle thead th.umbruch .icon { vertical-align: middle; }
.tabelle thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--grau); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
}
.tabelle thead th a { color: var(--text); display: inline-flex; align-items: center; gap: 4px; }
.tabelle thead th a:hover { color: var(--orange); text-decoration: none; }
.tabelle thead th[aria-sort] a { color: var(--orange); }
.tabelle tbody tr:hover td { background: #FCFCFC; }
.tabelle tbody tr:last-child td { border-bottom: 0; }
.tabelle .zahl { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabelle .nowrap { white-space: nowrap; }
.tabelle .aktionen { white-space: nowrap; text-align: right; }
.tabelle .btn-gruppe { flex-wrap: nowrap; gap: 4px; justify-content: flex-end; }
.tabelle .btn-text.btn-klein { min-height: 32px; padding: 4px 8px; }
.tabelle td .badge { margin-top: 2px; }
.tabelle .leer { text-align: center; padding: 40px 12px; }
.tabelle tr.inaktiv td { color: #9A9A9A; background: #FAFAFA; }
.tabelle tr.inaktiv .artikel-text { text-decoration: line-through; }
.tabelle td.eingabe { padding: 4px 6px; }
.tabelle td.eingabe input { min-height: 34px; padding: 5px 8px; font-size: 14px; }
.tabelle td.eingabe input.zahl { text-align: right; width: 68px; }
.karte-liste { padding: 20px; }
.pe { display: block; font-size: 12px; }
.tabelle td.eingabe input.kurz { width: 72px; }
.tabelle td.mail, .tabelle td.umbrechbar { overflow-wrap: anywhere; }
.tabelle td.breit { min-width: 150px; }
/* .fuellen: alle Spalten so schmal wie ihr Inhalt, die Beschreibung (.breit/.artikel-text) erhaelt den Rest */
.tabelle.fuellen th, .tabelle.fuellen td { width: 1%; }
.tabelle.fuellen th, .tabelle.fuellen td { padding-left: 7px; padding-right: 7px; }
.tabelle.fuellen th.breit, .tabelle.fuellen td.breit, .tabelle.fuellen td.artikel-text { width: auto; min-width: 150px; }
.tabelle .gespeichert input { border-color: #9CCC9F; background: #F6FBF6; }
.tabelle .fehlerhaft input { border-color: var(--fehler); background: var(--fehler-tint); }
.tabelle .speichert input { border-color: var(--orange); }
.zulauf { display: block; font-size: 12px; color: var(--orange); white-space: nowrap; }
.negativ { color: var(--fehler); }
.positiv { color: var(--ok); }
details { border: 1px solid var(--linie); border-radius: var(--rund-m); padding: 10px 14px; background: var(--weiss); }
details + details { margin-top: 10px; }
summary { cursor: pointer; font-weight: 600; margin: -2px 0; }
details[open] summary { margin-bottom: 10px; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .03em; white-space: nowrap; }
.badge-aktiv { background: var(--orange-tint); color: var(--orange); }
.badge-inaktiv { background: var(--grau); color: #8A8A8A; border: 1px solid var(--linie); }
.badge-typ { background: var(--grau); color: var(--text); border: 1px solid var(--linie); }
.badge-warnung { background: var(--fehler-tint); color: var(--fehler); }

/* Seiten */
.seitennav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 16px; font-size: 14px; }
.seitennav a, .seitennav span { min-width: 36px; height: 36px; padding: 0 10px; display: inline-grid; place-items: center; border-radius: var(--rund-s); border: 1px solid var(--linie); background: var(--weiss); color: var(--text); }
.seitennav a:hover { border-color: var(--orange); color: var(--orange); text-decoration: none; }
.seitennav [aria-current="page"] { background: var(--orange); border-color: var(--orange); color: #fff; font-weight: 600; }
.seitennav .luecke { border: 0; background: none; }

/* Speicherstatus-Leiste */
.speicherleiste { position: fixed; right: 24px; bottom: 24px; z-index: 60; display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: var(--rund-m); background: var(--weiss); box-shadow: 0 8px 32px rgb(0 0 0 / .16); font-size: 14px; border-left: 4px solid var(--orange); }

/* ------------------------------------------------------------ Meldungen */

.meldungen { position: fixed; top: 76px; right: 24px; z-index: 70; display: grid; gap: 10px; width: min(420px, calc(100vw - 32px)); }
.meldung { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--rund-m); background: var(--weiss); box-shadow: 0 8px 32px rgb(0 0 0 / .14); font-size: 15px; border-left: 4px solid var(--orange); animation: einblenden .35s ease; }
.meldung-fehler { border-left-color: var(--fehler); }
.meldung-fehler .icon { stroke: var(--fehler); }
.meldung-erfolg .icon, .meldung-hinweis .icon { stroke: var(--orange); }
.meldung p { margin: 0; flex: 1; }
.meldung button { background: none; border: 0; cursor: pointer; color: var(--text); padding: 0; }
.hinweisbox { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: var(--rund-m); background: var(--orange-tint); border: 1px solid #F4D2B3; margin-bottom: 20px; font-size: 15px; }
.hinweisbox .icon { stroke: var(--orange); margin-top: 2px; }
.hinweisbox p { margin: 0; flex: 1; }
.hinweisbox form { margin: 0; }
.hinweisbox-fehler { background: var(--fehler-tint); border-color: #F1C4C0; }
.hinweisbox-fehler .icon { stroke: var(--fehler); }

/* ------------------------------------------------------------ Dialoge */

dialog { border: 0; padding: 0; border-radius: var(--rund-l); box-shadow: 0 24px 64px rgb(0 0 0 / .22); width: min(640px, calc(100vw - 32px)); color: var(--text); }
dialog::backdrop { background: rgb(51 51 51 / .45); }
.dialog-kopf { display: flex; align-items: center; gap: 12px; padding: 22px 28px 0; }
.dialog-kopf h2 { font-size: 20px; }
.dialog-kopf button { margin-left: auto; background: none; border: 0; cursor: pointer; color: var(--text); padding: 6px; border-radius: var(--rund-s); }
.dialog-kopf button:hover { background: var(--grau); }
.dialog-inhalt { padding: 18px 28px; }
.dialog-fuss { display: flex; justify-content: flex-end; gap: 10px; padding: 0 28px 24px; flex-wrap: wrap; }

/* Auswahlliste mit Suche */
.suchauswahl { position: relative; }
.suchauswahl-liste { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 50; max-height: 320px; overflow-y: auto; margin: 0; padding: 6px; list-style: none; background: var(--weiss); border: 1px solid var(--linie-stark); border-radius: var(--rund-m); box-shadow: var(--schatten); }
.suchauswahl-liste li { padding: 8px 10px; border-radius: var(--rund-s); cursor: pointer; font-size: 14px; display: flex; flex-direction: column; }
.suchauswahl-liste li small { font-size: 12px; }
.suchauswahl-liste li[aria-selected="true"], .suchauswahl-liste li:hover { background: var(--orange-tint); }
.suchauswahl-liste .leer { cursor: default; color: #8A8A8A; }
.suchauswahl-liste .leer:hover { background: none; }
.auswahl-anzeige { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--orange); background: var(--orange-tint); border-radius: var(--rund-s); font-size: 14px; }
.auswahl-anzeige span { flex: 1; min-width: 0; }

/* Schritte (Assistent) */
.schritte { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 24px; flex-wrap: wrap; counter-reset: schritt; }
.schritte li { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--weiss); border: 1px solid var(--linie); counter-increment: schritt; }
.schritte li::before { content: counter(schritt); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--grau); font-weight: 700; font-size: 13px; }
.schritte li[aria-current="step"] { border-color: var(--orange); color: var(--orange); font-weight: 600; }
.schritte li[aria-current="step"]::before { background: var(--orange); color: #fff; }
.schritte li.erledigt::before { background: var(--orange-tint); color: var(--orange); }

/* Upload */
.ablage { display: grid; place-items: center; gap: 8px; padding: 32px; border: 2px dashed var(--linie-stark); border-radius: var(--rund-l); background: var(--grau); text-align: center; cursor: pointer; }
.ablage.ueber { border-color: var(--orange); background: var(--orange-tint); }
.ablage .icon { width: 36px; height: 36px; stroke: var(--orange); }
.ablage input[type="file"] { max-width: 360px; }

/* Positionszeilen (mehrere Artikel in einem Formular) */
.karte-mittel { max-width: 1000px; }
.positionen { display: grid; gap: 0; }
.positionen-kopf, .position { display: grid; grid-template-columns: 28px minmax(0, 1fr) 190px 40px; gap: 12px; align-items: start; }
.positionen-kopf { padding: 0 0 8px; border-bottom: 1px solid var(--linie); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.position { padding: 10px 0; border-bottom: 1px solid var(--linie); }
.position-nr { padding-top: 11px; text-align: right; font-weight: 700; color: var(--orange); font-variant-numeric: tabular-nums; }
.menge-einheit { display: flex; align-items: center; gap: 8px; }
.menge-einheit input { text-align: right; }
.menge-einheit span { min-width: 36px; font-size: 14px; }
.position-weg { margin-top: 5px; color: var(--text); }
.position-weg:hover { color: var(--fehler); background: var(--fehler-tint); }
.positionen-fuss { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 10px; }
/* ⓘ mit Erklaerkasten (Hover, Fokus, Antippen) */
.info { position: relative; display: inline-flex; vertical-align: middle; }
.info-knopf { display: inline-grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: var(--orange-tint); color: var(--orange); cursor: help; }
.info-knopf .icon { stroke: var(--orange); }
.info-knopf:hover, .info.offen .info-knopf { background: var(--orange); }
.info-knopf:hover .icon, .info.offen .info-knopf .icon { stroke: #fff; }
.info-tipp {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 20;
  display: none; flex-direction: column; gap: 10px;
  width: min(340px, 86vw); padding: 16px 18px;
  background: var(--weiss); color: var(--text); border-radius: var(--rund-m); border-top: 3px solid var(--orange);
  box-shadow: 0 12px 40px rgb(0 0 0 / .18);
  font-size: 14px; font-weight: 400; line-height: 1.5; letter-spacing: 0; text-transform: none; text-align: left; white-space: normal;
}
.info:hover .info-tipp, .info:focus-within .info-tipp, .info.offen .info-tipp { display: flex; }
.info-titel { font-size: 15px; font-weight: 700; color: var(--text); }
.info-beispiel { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; background: var(--grau); border-radius: var(--rund-s); }
.info-label { font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--orange); }
.info-liste { display: flex; flex-direction: column; gap: 6px; }
.info-liste span { position: relative; padding-left: 16px; }
.info-liste span::before { content: ""; position: absolute; left: 2px; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
.info-liste b { color: var(--orange); }
.info-fuss { font-size: 13px; padding-top: 8px; border-top: 1px solid var(--linie); }
.tabelle thead th.mit-info { z-index: 5; }
.feld-titel-zeile { display: flex; align-items: center; gap: 8px; }

/* Kundenartikelnummer / Lagerplatz */
.artikel-zusatz { display: block; font-size: 12px; color: var(--text); white-space: nowrap; }
.artikel-zelle { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.tabelle td.eingabe input.lagerplatz { width: 64px; }
.tabelle .artikel-zelle input.kdnr { width: 100px; min-height: 28px; padding: 3px 6px; font-size: 12px; }
.tabelle td.gespeichert .artikel-zelle input { border-color: #9CCC9F; background: #F6FBF6; }

.position-neu-markiert { animation: einblenden .4s ease; }

hr.trenner { border: 0; border-top: 1px solid var(--linie); margin: 20px 0; }

/* Protokoll / Listen */
.liste-einfach { list-style: none; margin: 0; padding: 0; }
.liste-einfach li { display: flex; gap: 12px; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--linie); font-size: 14px; }
.liste-einfach li:last-child { border-bottom: 0; }
.code { font-family: Consolas, "Courier New", monospace; font-size: 13px; background: var(--grau); padding: 2px 6px; border-radius: 4px; word-break: break-all; }
.notfallcodes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; list-style: none; padding: 0; }
.qr-bild { display: inline-block; padding: 8px; background: #fff; border: 1px solid var(--linie); border-radius: var(--rund-m); margin-bottom: 12px; }
.qr-bild svg { display: block; width: 220px; height: 220px; }
.qr-geheimnis { font-family: Consolas, monospace; font-size: 18px; letter-spacing: .1em; padding: 12px 16px; background: var(--grau); border-radius: var(--rund-m); display: inline-block; word-break: break-all; }

/* ------------------------------------------------------------ Anmeldeseite */

.anmeldung { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 520px) 1fr; background: var(--weiss); }
.anmeldung-formular { display: flex; flex-direction: column; justify-content: center; padding: 48px clamp(24px, 5vw, 64px); position: relative; z-index: 1; background: var(--weiss); }
.anmeldung-formular .logo { width: 260px; max-width: 100%; height: auto; margin-bottom: 36px; }
.anmeldung-formular h1 { font-size: clamp(30px, 4vw, 42px); text-transform: uppercase; letter-spacing: -.01em; line-height: 1.02; }
.anmeldung-formular h1 .akzent { color: var(--orange); font-weight: 300; }
.anmeldung-formular h1 { margin-bottom: 28px; }
.anmeldung-formular .formular { max-width: 400px; }
.anmeldung-bild { position: relative; background: var(--weiss); overflow: hidden; }
.anmeldung-bild::before { content: ""; position: absolute; left: 50%; top: 50%; width: min(600px, 85%); aspect-ratio: 4 / 3; transform: translate(-50%, -50%); background: url("../img/easyscan_cabrill.jpg") center / cover no-repeat; --weich: radial-gradient(ellipse closest-side, #000 40%, rgb(0 0 0 / .7) 60%, rgb(0 0 0 / .3) 80%, transparent 100%); -webkit-mask-image: var(--weich); mask-image: var(--weich); }
.anmeldung-bild::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--orange); }
.anmeldung-fuss { margin-top: 32px; font-size: 13px; display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.passwort-feld { position: relative; }
.passwort-feld input { padding-right: 48px; }
.passwort-feld button { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: 8px; cursor: pointer; color: var(--text); border-radius: var(--rund-s); }
.passwort-feld button:hover { color: var(--orange); }

.schlicht { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--grau); }
.schlicht .karte { width: min(560px, 100%); border-bottom: 6px solid var(--orange); }

/* ------------------------------------------------------------ Bewegung */

@keyframes einblenden { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.einblenden { animation: einblenden .9s ease both; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ------------------------------------------------------------ Responsiv */

@media (max-width: 1279px) {
  .kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .menue { position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); transform: translateX(-100%); transition: transform .25s ease; box-shadow: none; }
  .menue-offen .menue { transform: none; box-shadow: 0 0 64px rgb(0 0 0 / .25); }
  .menue-offen::after { content: ""; position: fixed; inset: 0; background: rgb(51 51 51 / .4); z-index: 35; }
  .menue-knopf { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: var(--rund-s); border: 1px solid var(--linie-stark); background: var(--weiss); color: var(--text); cursor: pointer; }
  .kopfleiste, .als-kunde-leiste, .fusszeile { padding-inline: 16px; }
  .inhalt { padding: 20px 16px 40px; }
  .raster-2, .formular-raster { grid-template-columns: minmax(0, 1fr); }
  .anmeldung { grid-template-columns: 1fr; }
  .anmeldung-bild { display: none; }
  .anmeldung-formular { border-bottom: 6px solid var(--orange); min-height: 100vh; }
  .karte { padding: 20px; }
}
@media (max-width: 767px) {
  .kacheln { grid-template-columns: 1fr 1fr; gap: 12px; }
  .kachel { padding: 16px; }
  .kachel-zahl { font-size: 28px; }
  .kopf-benutzer > span:not(.avatar), .kopfleiste .sprachwahl { display: none; }
  .seitenkopf-aktionen { margin-left: 0; width: 100%; }
  .filterleiste .feld, .filterleiste .suche { max-width: none; }
  .meldungen { top: 72px; right: 16px; }
  .notfallcodes { grid-template-columns: 1fr; }
  .positionen-kopf { display: none; }
  .position { grid-template-columns: minmax(0, 1fr) 40px; gap: 8px; }
  .position-nr { display: none; }
  .position .feld-artikel { grid-column: 1; grid-row: 1; }
  .position .feld-menge { grid-column: 1; grid-row: 2; }
  .position .position-weg { grid-column: 2; grid-row: 1; }
}

@media print {
  .menue, .kopfleiste, .fusszeile, .filterleiste, .seitenkopf-aktionen, .seitennav, .meldungen { display: none !important; }
  .app { display: block; }
  body { background: #fff; }
  .karte { box-shadow: none; padding: 0; }
  .tabelle-rahmen { overflow: visible; border: 0; }
}
