/* ============================================================== Grundlagen */
:root {
  --orange: #e8712a;
  --orange-hell: #f08b4d;
  --orange-dunkel: #c95c1d;
  --grau-900: #202124;
  --grau-800: #303134;
  --grau-700: #45464a;
  --grau-500: #8b8d91;
  --grau-300: #d4d6da;
  --grau-200: #e6e8eb;
  --grau-100: #f2f3f5;
  --flaeche: #fafafa;
  --rand: #d9dbdf;
  --gut: #1c8c4a;
  --warn: #c2410c;
  --schatten: 0 1px 3px rgba(0, 0, 0, .18), 0 6px 18px rgba(0, 0, 0, .10);
  --kopf-hoehe: 46px;
  --beleg-breite: 33%;
  --radius: 6px;
}

* { box-sizing: border-box; }

/* Das hidden-Attribut muss IMMER gewinnen, auch gegen eigene display-Regeln
   wie .modal/.login (sonst bleiben Dialoge/Login-Bildschirm sichtbar hängen). */
[hidden] { display: none !important; }

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  font: 14px/1.4 "Segoe UI", Roboto, system-ui, sans-serif;
  color: var(--grau-900);
  background: var(--grau-800);
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

.ansicht { display: none; height: 100%; flex-direction: column; }
.ansicht--aktiv { display: flex; }

/* Bon-Druckziel (80mm) - nur beim Drucken sichtbar, siehe bon.css */
#bon-blatt { display: none; }

.num { text-align: right; font-variant-numeric: tabular-nums; }

/* =================================================================== Kopf */
.kopf {
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--kopf-hoehe);
  flex: 0 0 var(--kopf-hoehe);
  padding: 0 8px;
  background: var(--grau-200);
  border-bottom: 1px solid var(--rand);
}

.kopf__links { display: flex; gap: 6px; }
.kopf__mitte { flex: 1; text-align: center; font-weight: 600; letter-spacing: .01em; }
.kopf__rechts { display: flex; align-items: center; gap: 6px; }

.kopf-tab {
  background: var(--grau-100);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 6px 12px;
  color: var(--grau-700);
}
.kopf-tab:hover { background: var(--karte); }
.kopf-tab--aktiv { background: var(--karte); color: var(--grau-900); font-weight: 600; }

.kopf-uhr {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.15;
  font-size: 12px;
  color: var(--grau-700);
  font-variant-numeric: tabular-nums;
}

.kopf-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--grau-700);
}
.kopf-icon:hover { background: var(--grau-100); color: var(--grau-900); }

.kopf-zurueck {
  background: var(--grau-100);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 6px 14px;
  color: var(--grau-700);
}
.kopf-zurueck:hover { background: var(--karte); }
.kopf--schlicht { background: var(--grau-100); }

/* ================================================================== Kasse */
.kasse {
  flex: 1;
  display: flex;
  min-height: 0;
  background: var(--grau-800);
}

/* -------------------------------------------------------------- Belegteil */
.beleg {
  position: relative;
  flex: 0 0 var(--beleg-breite);
  min-width: 0; /* sonst zwingt Inhalt (z. B. Kundenzeile) die Breite über die Vorgabe hinaus (Safari-Flexbug) */
  max-width: 420px; /* verhindert, dass 1/3 auf sehr breiten Bildschirmen ausufert */
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--karte);
  border-right: 1px solid var(--rand);
  font-size: var(--beleg-schrift, 14px);
}

.beleg__marke {
  padding: 6px 14px;
  border-bottom: 1px solid var(--grau-200);
  text-align: center;
  transition: background .15s ease;
}
.beleg--aktiv .beleg__marke {
  background: var(--karte-hervor);
  border-bottom-color: var(--orange);
}
.beleg--aktiv .beleg__nr { color: var(--orange); font-weight: 700; }
.beleg__nr { font-size: 12px; }

.beleg__kunde {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 14px;
  border: 0;
  border-bottom: 1px solid var(--grau-200);
  background: var(--grau-100);
}
.beleg__kunde:hover { background: var(--grau-200); }
.beleg__kunde-label { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--grau-500); }
.beleg__kunde-name { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.beleg__positionen { flex: 1; overflow-y: auto; min-height: 0; }
.beleg__leer { margin: 28px 16px; text-align: center; color: var(--grau-500); font-size: 13px; }

.position {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 2px 8px;
  min-height: var(--beleg-zeile-hoehe, 0px);
  padding: 7px 12px 7px 8px;
  border-bottom: 1px solid var(--grau-100);
  cursor: pointer;
}
.position:hover { background: var(--grau-100); }
.position--markiert { background: #fdf0e6; }
.position__menge { grid-row: span 2; align-self: center; text-align: center; font-weight: 700; color: var(--orange-dunkel); }
.position__name { font-weight: 500; }
.position__summe { font-weight: 600; font-variant-numeric: tabular-nums; }
.position__detail { grid-column: 2 / -1; font-size: 11px; color: var(--grau-500); font-variant-numeric: tabular-nums; }
.position__notiz { grid-column: 2 / -1; font-size: 11px; color: var(--warn); font-style: italic; }
.position__extra { grid-column: 2 / -1; font-size: 11.5px; font-weight: 700; color: #3f9f6b; }

.beleg__summen { border-top: 1px solid var(--grau-200); padding: 8px 14px; background: var(--grau-100); }
.beleg__summe-zeile { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; }
.beleg__summe-zeile--klein { font-size: 12px; color: var(--grau-700); }
.beleg__summe-zeile--gross { font-size: 22px; font-weight: 700; margin-top: 4px; padding-top: 6px; border-top: 1px solid var(--grau-300); }
#beleg-steuer-zeilen { display: block; }
#beleg-steuer-zeilen > div { display: flex; justify-content: space-between; }

.beleg__aktionen { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; }

.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  padding: 13px 10px;
  background: var(--grau-200);
  color: var(--grau-900);
  font-weight: 600;
}
.knopf:hover { filter: brightness(.96); }
.knopf:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.knopf__ikon { font-size: 16px; line-height: 1; }
.knopf--orange { background: var(--orange); color: #fff; }
.knopf--orange-hell { background: var(--orange-hell); color: #fff; }
.knopf--menue { width: 100%; background: var(--orange-dunkel); color: #fff; border-top: 1px solid rgba(255, 255, 255, .2); }
.knopf--klein { padding: 7px 14px; border-radius: var(--radius); font-size: 13px; background: var(--karte); border: 1px solid var(--rand); }
.knopf--klein.knopf--orange { border-color: var(--orange); color: var(--orange-dunkel); }
.knopf--still { background: transparent; border: 1px solid var(--rand); font-weight: 500; }
.knopf--gefahr { background: #b3261e; color: #fff; }

/* --------------------------------------------------------- Beleg-Auswahl */
.beleg__belegliste {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  background: var(--karte);
}
.beleg__belegliste-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 8px 10px 14px;
  border-bottom: 1px solid var(--grau-200);
  font-weight: 600;
}
.belegliste__zeitfilter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--grau-200);
}
.zeitfilter__knopf {
  border: 1px solid var(--rand);
  background: var(--karte);
  color: var(--grau-700);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 600;
}
.zeitfilter__knopf:hover { background: var(--grau-100); }
.zeitfilter__knopf--aktiv { background: var(--orange); border-color: var(--orange); color: #fff; }

.belegliste__zeitraumsumme {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 14px;
  background: var(--karte-hervor);
  border-bottom: 1px solid var(--grau-200);
  font-size: 12px;
  font-weight: 700;
  color: var(--grau-900);
}

#belegliste-inhalt { flex: 1; overflow-y: auto; }

.belegliste__tagkopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 14px;
  background: var(--grau-100);
  border-bottom: 1px solid var(--grau-200);
  font-size: 12px;
  font-weight: 700;
  color: var(--grau-700);
  position: sticky;
  top: 0;
}

.belegzeile {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1px 8px;
  width: 100%;
  text-align: left;
  padding: 9px 14px;
  border: 0;
  border-bottom: 1px solid var(--grau-100);
  background: var(--karte);
}
.belegzeile:hover { background: var(--grau-100); }
.belegzeile--storniert { opacity: 0.55; text-decoration: line-through; }
.belegzeile__nr { font-weight: 600; }
.belegzeile__betrag { font-weight: 600; font-variant-numeric: tabular-nums; }
.belegzeile__meta { grid-column: 1 / -1; font-size: 11px; color: var(--grau-500); }

.ikon-knopf {
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  color: var(--grau-700);
}
.ikon-knopf:hover { background: var(--grau-100); }

/* ---------------------------------------------------- Ansicht anpassen */
.ansicht-popover {
  position: fixed; z-index: 60; min-width: 220px;
  background: var(--karte); border-radius: var(--radius); box-shadow: var(--schatten);
  padding: 6px; display: flex; flex-direction: column; gap: 2px;
}
.ansicht-popover__eintrag {
  display: flex; align-items: center; gap: 10px;
  border: 0; background: transparent; text-align: left;
  padding: 10px 12px; border-radius: var(--radius); font-size: 14px; color: var(--grau-900);
}
.ansicht-popover__eintrag:hover { background: var(--grau-100); }

.regler {
  position: fixed; z-index: 60;
  background: var(--karte); border-radius: var(--radius); box-shadow: var(--schatten);
  padding: 10px; display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.regler__anzeige { font-size: 12px; color: var(--grau-700); font-variant-numeric: tabular-nums; margin-bottom: 2px; }
.regler__reihe { display: flex; align-items: center; gap: 6px; }
.regler__knopf {
  min-width: 40px; min-height: 40px; border: 1px solid var(--rand); background: var(--grau-100);
  border-radius: var(--radius); font-size: 16px; color: var(--grau-900);
}
.regler__knopf:hover { background: var(--grau-200); }
.regler__knopf--schrift { min-width: 34px; font-size: 12px; font-weight: 700; }
.regler__schliessen { margin-top: 4px; width: 100%; justify-content: center; }

/* ------------------------------------------------------------ Artikelteil */
.artikelflaeche {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: linear-gradient(180deg, #3b3c40, #26272a);
}

.artikelflaeche__kopf {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 5px 10px;
  background: var(--grau-100);
  border-bottom: 1px solid var(--rand);
  font-weight: 600;
  font-size: 13px;
}
.artikelflaeche__suche { margin-left: auto; }
.artikelflaeche__suche input {
  width: 210px;
  padding: 5px 10px;
  border: 1px solid var(--rand);
  border-radius: 20px;
  background: var(--karte);
}

.kachelgitter {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--kachel-breite, 112px), 1fr));
  gap: 4px;
  padding: 5px;
  align-content: start;
}

.kachel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: var(--kachel-hoehe, 62px);
  padding: 5px 6px;
  border: 0;
  border-radius: 5px;
  text-align: left;
  line-height: 1.15;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .35);
  transition: transform .06s;
}
.kachel:hover { filter: brightness(1.08); }
.kachel:active { transform: scale(.96); }
.kachel__name { font-size: var(--kachel-schrift, 12.5px); font-weight: 600; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.kachel__preis { font-size: var(--kachel-schrift-preis, 10.5px); opacity: .85; font-variant-numeric: tabular-nums; margin-top: 3px; }
.kachel--leer { grid-column: 1 / -1; color: var(--grau-300); text-align: center; padding: 30px; box-shadow: none; background: none; }

/* Überschrift je Untergruppe bei „Alle“ (antippen = nur diese Gruppe) */
.kachelkopf {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 4px;
  padding: 6px 2px 3px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .18);
  background: none;
  color: #f3f4f6;
  font-weight: 700;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.kachelkopf:first-child { margin-top: 0; }
.kachelkopf i { width: 10px; height: 10px; border-radius: 50%; background: var(--gf); align-self: center; box-shadow: 0 0 0 1px rgba(255, 255, 255, .35); }
.kachelkopf small { color: #a9adb5; font-weight: 500; }

/* Bereichs-Schalter oben (Abholung | Lieferung) */
.bereichschalter { display: inline-flex; border-radius: 7px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--rand); background: var(--karte); }
.bereichknopf { border: 0; background: transparent; padding: 6px 16px; font-weight: 700; font-size: 13px; color: var(--grau-700, #3a3d44); cursor: pointer; }
.bereichknopf + .bereichknopf { border-left: 1px solid var(--rand); }
.bereichknopf--aktiv { box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25); }

/* Gruppen oben wie in Bestell: umbrechen statt seitlich scrollen */
.gruppenleiste {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 5px;
  max-height: 34vh;
  overflow-y: auto;
  flex: none;
  background: rgba(0, 0, 0, .28);
}
.gruppenleiste[hidden] { display: none; }
.gruppenleiste--unter { padding-top: 0; background: rgba(0, 0, 0, .18); max-height: 24vh; }
.gruppenleiste--unter .gruppenknopf { padding: 6px 14px; font-size: 12.5px; }
.gruppenknopf--alle { background: #f3f4f6; color: #1d2230; }
.gruppenknopf {
  flex: 0 0 auto;
  border: 0;
  border-radius: 5px;
  padding: 8px 18px;
  font-weight: 600;
  font-size: 13px;
  opacity: .72;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}
.gruppenknopf--aktiv { opacity: 1; outline: 2px solid #fff; outline-offset: -2px; box-shadow: 0 0 0 2px var(--t-akzent); }

/* =========================================================== Kassenbericht */
.kb-datumnav { gap: 8px; }
.kb-datumnav input[type="date"] {
  padding: 5px 8px;
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  background: var(--karte);
}
.position--kb { grid-template-columns: 1fr auto; }
.position--kb .position__summe { text-align: right; white-space: nowrap; }

/* ========================================================== Rechnungsliste */
.uebersicht { flex: 1; display: flex; flex-direction: column; min-height: 0; background: var(--grau-100); }

.filterleiste {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  padding: 10px 14px;
  background: var(--karte);
  border-bottom: 1px solid var(--rand);
}
.filterleiste label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--grau-500); text-transform: uppercase; letter-spacing: .04em; }
.filterleiste input, .filterleiste select {
  padding: 6px 9px;
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  background: var(--karte);
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--grau-900);
}
.filterleiste__suche { flex: 1; min-width: 180px; }
.filterleiste__suche input { width: 100%; }

.kennzahlen { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px 14px; }
.kennzahl {
  flex: 1 1 150px;
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: 8px;
  padding: 10px 14px;
}
.kennzahl__wert { font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kennzahl__bez { font-size: 11px; color: var(--grau-500); text-transform: uppercase; letter-spacing: .05em; }

.tabellenrahmen { flex: 1; min-height: 0; overflow: auto; margin: 0 14px 14px; background: var(--karte); border: 1px solid var(--rand); border-radius: 8px; }
.tabelle { width: 100%; border-collapse: collapse; font-size: 13px; }
.tabelle th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--grau-100);
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--rand);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--grau-500);
  white-space: nowrap;
}
.tabelle th.sortierbar { cursor: pointer; user-select: none; }
.tabelle th.sortierbar:hover { color: var(--grau-900); }
.tabelle td { padding: 8px 10px; border-bottom: 1px solid var(--grau-100); }
.tabelle tbody tr:hover { background: #fcfcfd; }
.tabelle td.num, .tabelle th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tabelle__leer { text-align: center; color: var(--grau-500); padding: 34px; }
.aktionen-spalte { text-align: right; }
.tabelle .zeilen-aktionen { display: flex; gap: 5px; justify-content: flex-end; }
.tabelle .zeilen-aktionen .knopf--klein { padding: 4px 9px; font-size: 12px; }

.statistik__gesamt td { font-weight: 700; border-top: 2px solid var(--grau-300); }
/* Zwei Kopfzeilen (Gruppe + Kategorie) - sticky würde sich sonst überlappen. */
.tabelle--statistik th { position: static; }
.tabelle--statistik th.statistik-gruppe { text-align: center; }

/* Einnahme (gruen) vs. Ausgabe (orange) farblich trennen, Bar (das eigentliche
   Kassenergebnis) gelb hervorgehoben, plus dicke Trennlinie zwischen den
   Blöcken Datum | Bar | Einnahme | Ausgabe - sonst verschwimmen bei vielen
   Kategoriespalten die Grenzen. */
.statistik-col-einnahme { background: color-mix(in srgb, var(--t-gruen) 12%, var(--t-karte)); }
.statistik-col-ausgabe { background: color-mix(in srgb, var(--t-akzent) 12%, var(--t-karte)); }
.statistik-col-bar { background: color-mix(in srgb, #d4a017 14%, var(--t-karte)); font-weight: 700; }
.tabelle--statistik thead .statistik-col-einnahme { background: color-mix(in srgb, var(--t-gruen) 26%, var(--t-karte)); color: var(--t-text); }
.tabelle--statistik thead .statistik-col-ausgabe { background: color-mix(in srgb, var(--t-akzent) 26%, var(--t-karte)); color: var(--t-text); }
.tabelle--statistik thead .statistik-col-bar { background: color-mix(in srgb, #d4a017 28%, var(--t-karte)); color: var(--t-text); }
.tabelle--statistik tbody tr:hover .statistik-col-einnahme { background: color-mix(in srgb, var(--t-gruen) 20%, var(--t-karte)); }
.tabelle--statistik tbody tr:hover .statistik-col-ausgabe { background: color-mix(in srgb, var(--t-akzent) 20%, var(--t-karte)); }
.tabelle--statistik tbody tr:hover .statistik-col-bar { background: color-mix(in srgb, #d4a017 22%, var(--t-karte)); }
/* Duenne Linie zwischen den einzelnen Kategoriespalten, dicke Linie an den
   Blockgrenzen (Datum | Bar | Einnahme | Ausgabe) - und Werte mittig statt
   rechtsbuendig, damit die schmalen Kategoriespalten nicht schief wirken. */
.tabelle--statistik th, .tabelle--statistik td { border-left: 1px solid var(--grau-200); }
.tabelle--statistik th:first-child, .tabelle--statistik td:first-child { border-left: 0; }
.tabelle--statistik th.statistik-grenze, .tabelle--statistik td.statistik-grenze { border-left: 2px solid var(--grau-300); }
.tabelle--statistik td.num, .tabelle--statistik th.num { text-align: center; }

.merker { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.merker--bezahlt { background: #e3f4ea; color: var(--gut); }
.merker--offen { background: #fdeee4; color: var(--warn); }
.merker--storniert { background: #f1f2f4; color: #6b7280; }

.zeile--storniert { opacity: 0.6; text-decoration: line-through; }
.zeile--storniert .merker { text-decoration: none; }

/* ============================================================ Verwaltungen */
.verwaltung { flex: 1; display: flex; min-height: 0; background: var(--grau-100); }
.verwaltung__liste {
  flex: 0 0 330px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--karte);
  border-right: 1px solid var(--rand);
}
.verwaltung__filter { display: flex; gap: 6px; padding: 9px 10px; border-bottom: 1px solid var(--grau-200); }
.verwaltung__filter select, .verwaltung__filter input {
  flex: 1;
  min-width: 0;
  padding: 6px 9px;
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  background: var(--karte);
}
.verwaltung__liste > div:last-child { flex: 1; overflow-y: auto; min-height: 0; }
.verwaltung__form { flex: 1; overflow-y: auto; padding: 18px 22px; min-width: 0; }

.eintrag {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid var(--grau-100);
  background: var(--karte);
}
.eintrag:hover { background: var(--grau-100); }
.eintrag--aktiv { background: #fdf0e6; box-shadow: inset 3px 0 0 var(--orange); }
.eintrag__farbe { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 4px; border: 1px solid rgba(0, 0, 0, .15); }
.eintrag__text { flex: 1; min-width: 0; }
.eintrag__name { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eintrag__meta { display: block; font-size: 11px; color: var(--grau-500); }
.eintrag__preis { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px; }
.eintrag--inaktiv .eintrag__name { text-decoration: line-through; color: var(--grau-500); }

.formzeile { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 14px; }
.feld { display: flex; flex-direction: column; gap: 4px; flex: 1 1 200px; min-width: 0; }
.feld--schmal { flex: 0 1 130px; }
.feld--breit { flex: 1 1 100%; }
.feld > span { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--grau-500); }
.feld input, .feld select, .feld textarea {
  padding: 8px 10px;
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  background: var(--karte);
  width: 100%;
}
.feld input[type="color"] { padding: 2px; height: 36px; }
.feld textarea { resize: vertical; min-height: 64px; }
.feld--check { flex-direction: row; align-items: center; gap: 8px; flex: 1 1 100%; }
.feld--check input { width: auto; }
.feld--check span { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--grau-900); }

.formkopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.formkopf h2 { margin: 0; font-size: 18px; }
.formaktionen { display: flex; gap: 8px; flex-wrap: wrap; }
.formhinweis { color: var(--grau-500); font-size: 12px; margin: 4px 0 16px; }
.platzhalter { display: grid; place-items: center; height: 100%; color: var(--grau-500); text-align: center; }

.abschnitt { background: var(--karte); border: 1px solid var(--rand); border-radius: 8px; padding: 16px 18px; margin-bottom: 14px; }
.abschnitt > h3 { margin: 0 0 14px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--grau-500); }

.einstellungen { flex: 1; overflow-y: auto; padding: 16px; background: var(--grau-100); }
.einstellungen > div { max-width: 900px; margin: 0 auto; }

/* ================================================================ Dialoge */
.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 40; }

.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; pointer-events: none; }
.modal__box {
  pointer-events: auto;
  width: min(520px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--karte);
  border-radius: 10px;
  box-shadow: var(--schatten);
  padding: 18px 20px;
}
.modal__box--menue { width: min(430px, 100%); padding: 16px; }
.modal__box--liste { width: min(560px, 100%); display: flex; flex-direction: column; padding-bottom: 12px; }
.modal__kopf { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; color: var(--grau-700); }
.modal__kopf h2 { margin: 0; font-size: 20px; font-weight: 400; flex: 1; }
.modal__marke { font-weight: 800; color: var(--orange); }
.modal__titel { margin: 0 0 14px; font-size: 18px; }
.modal__fuss { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.modal__fuss .knopf { padding: 9px 18px; border-radius: var(--radius); }
.modal__schliessen { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 14px; padding: 10px; border: 0; background: transparent; color: var(--grau-700); font-size: 15px; }
.modal__schliessen:hover { background: var(--grau-100); border-radius: var(--radius); }

.menuegitter { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.menuekachel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 10px;
  border: 0;
  border-radius: var(--radius);
  background: var(--grau-200);
  color: var(--grau-700);
  font-size: 13px;
  text-align: center;
}
.menuekachel:hover { background: var(--grau-300); }
.menuekachel--breit { grid-column: 1 / -1; flex-direction: row; justify-content: center; padding: 14px; }
.menuekachel__ikon { font-size: 22px; line-height: 1; }

#liste-suche { width: 100%; padding: 8px 12px; border: 1px solid var(--rand); border-radius: var(--radius); margin-bottom: 8px; }
.auswahlliste { flex: 1; min-height: 120px; max-height: 46vh; overflow-y: auto; border: 1px solid var(--grau-200); border-radius: var(--radius); }
.auswahlzeile { display: block; width: 100%; text-align: left; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--grau-100); background: var(--karte); }
.auswahlzeile:hover { background: var(--grau-100); }
.auswahlzeile strong { display: block; font-weight: 600; }
.auswahlzeile span { font-size: 12px; color: var(--grau-500); }

.hinweis {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 90;
  padding: 11px 20px;
  border-radius: 24px;
  background: var(--grau-900);
  color: #fff;
  box-shadow: var(--schatten);
  max-width: 76vw;
}
.hinweis--fehler { background: #b3261e; }

/* ============================================================== Druckbühne */
.druckbuehne { flex: 1; overflow: auto; padding: 22px; background: var(--grau-700); display: flex; justify-content: center; align-items: flex-start; }
.blatt {
  width: 210mm;
  min-height: 297mm;
  padding: 16mm 18mm 14mm;
  background: var(--papier);
  box-shadow: var(--schatten);
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
}

/* --------------------------------------------------- Rechnungsblatt-Inhalt */
/* Als <table> aufgebaut, damit thead/tfoot (Kopf-/Fusszeile) beim Drucken
   automatisch auf jeder Seite wiederholt werden. */
.rg { font-family: Arial, Helvetica, sans-serif; font-size: 10.5pt; color: #33383f; width: 100%; border-collapse: collapse; flex: 1; }
.rg > thead > tr > td, .rg > tfoot > tr > td, .rg > tbody > tr > td { padding: 0; }

.rg__kopf { display: flex; align-items: flex-end; gap: 6mm; padding-bottom: 4mm; border-bottom: 0.5pt solid #e2e5e9; }
.rg__absender-kurz { font-size: 9.5pt; line-height: 1.55; color: #5b6068; }
.rg__absender-kurz b { color: #2b2f36; font-size: 10.5pt; }

.rg__fussinfo { margin-top: 8mm; padding-top: 3mm; border-top: 0.5pt solid #e2e5e9; font-size: 8.5pt; line-height: 1.6; color: #5b6068; display: flex; gap: 5mm; }
.rg__fussinfo-spalte { flex: 1; min-width: 0; }

.rg__empfaenger { margin-top: 10mm; line-height: 1.55; }
.rg__empfaenger-eyebrow { font-size: 7.5pt; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #9aa0a8; margin-bottom: 1mm; }
.rg__empfaenger-name { font-size: 12.5pt; font-weight: 700; color: #2b2f36; }

.rg__titel {
  margin: 9mm 0 5mm; font-size: 19pt; font-weight: 700; letter-spacing: .03em;
  color: #a82929; text-transform: uppercase; padding-bottom: 2.5mm; border-bottom: 1.2pt solid #a82929;
}
.rg__meta { font-size: 10pt; line-height: 1.8; }
.rg__storno-banner { font-size: 13pt; color: #fff; background: #a82929; padding: 1mm 3mm; border-radius: 2mm; vertical-align: middle; }
.rg__meta div { display: flex; gap: 8px; }
.rg__meta span:first-child { min-width: 40mm; font-weight: 700; color: #2b2f36; }
.rg__meta span:last-child { color: #444; }

.rg__tabelle { width: 100%; border-collapse: collapse; font-size: 10pt; margin-top: 9mm; }
.rg__tabelle th {
  text-align: left; font-weight: 700; font-size: 9pt; letter-spacing: .03em; text-transform: uppercase;
  color: #fff; padding: 3.2mm 3mm; background: #2b2f36;
}
.rg__tabelle td { padding: 2.8mm 3mm; vertical-align: top; }
.rg__tabelle tbody tr.rg__zeile-alt { background: #f3f4f6; }
.rg__tabelle .r { text-align: right; }
.rg__tabelle .c { text-align: center; }
.rg__posnotiz { font-size: 8.5pt; color: #777; }
.rg__tabelle tr.rg__extra td { padding-top: 0; font-size: 9pt; color: #444; }
.rg__tabelle tr.rg__extra td:first-child { padding-left: 7mm; }

.rg__summen { margin-top: 5mm; margin-left: auto; width: 88mm; font-size: 10.5pt; }
.rg__summen div { display: flex; justify-content: space-between; padding: 1.4mm 3mm; color: #555; }
.rg__summen .rg__gesamt {
  font-weight: 800; font-size: 12.5pt; color: #a82929;
  border-top: 1.2pt solid #a82929; margin-top: 1mm; padding-top: 2.5mm;
}

.rg__hinweis { margin-top: 10mm; line-height: 1.6; font-size: 9.5pt; color: #5b6068; }

/* ================================================================ Schmale Fenster */
@media (max-width: 900px) {
  .kachelgitter { grid-template-columns: repeat(auto-fill, minmax(var(--kachel-breite, 96px), 1fr)); }
  .verwaltung { flex-direction: column; }
  .verwaltung__liste { flex: 0 0 42%; border-right: 0; border-bottom: 1px solid var(--rand); }
}

/* ============================================================== Handy (Kasse) */
@media (max-width: 640px) {
  /* Der Kopf ist auf dem Handy zu schmal für alles - Titel weg, Tabs/Uhr enger,
     damit kein Knopf rechts über den Bildschirmrand hinausgeschoben wird. */
  .kopf { gap: 4px; padding: 0 4px; }
  .kopf__mitte { display: none; }
  .kopf-tab { padding: 6px 8px; font-size: 12px; }
  .kopf__rechts { gap: 2px; margin-left: auto; }
  .kopf-benutzer { font-size: 11px; max-width: 60px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .kopf-uhr { font-size: 10.5px; }

  /* Beleg und Artikel bleiben nebeneinander sichtbar - der Beleg zeigt kompakt an. */
  .knopf--menue { display: none; } /* gleiche Funktion wie das Zahnrad oben rechts - spart hier Platz */

  .beleg__kunde { padding: 7px 8px; }
  .beleg__kunde-label { font-size: 8.5px; }
  .beleg__kunde-name { font-size: 11.5px; }

  .position { grid-template-columns: 20px 1fr; padding: 6px 8px; column-gap: 4px; }
  .position__menge { font-size: 11px; }
  .position__name { font-size: 11.5px; line-height: 1.25; }
  .position__summe { grid-column: 2; font-size: 11px; }
  .position__detail { display: none; }

  .beleg__summen { padding: 6px 8px; }
  .beleg__summe-zeile--klein { font-size: 10px; }
  .beleg__summe-zeile--gross { font-size: 15px; }

  .beleg__aktionen { grid-template-columns: 1fr; }
  .beleg__aktionen .knopf { padding: 9px 6px; font-size: 11.5px; }

  .artikelflaeche__kopf { padding: 5px 8px; gap: 6px; }
  .artikelflaeche__suche input { width: 100%; min-width: 0; }

  .kachelgitter { grid-template-columns: repeat(auto-fill, minmax(var(--kachel-breite, 96px), 1fr)); gap: 5px; padding: 6px; }
  .kachel { min-height: var(--kachel-hoehe, 58px); padding: 7px 6px; }
  .kachel__name { font-size: var(--kachel-schrift, 11.5px); }
  .kachel__preis { font-size: var(--kachel-schrift-preis, 10px); }

  /* Touch-Ziele großzügiger: Apple empfiehlt mindestens 44×44pt. */
  .gruppenknopf { padding: 11px 14px; font-size: 13.5px; }
  .knopf { padding: 13px 16px; font-size: 15px; }
  .knopf--klein { padding: 11px 16px; font-size: 14px; }
  .kopf-icon { width: 42px; height: 42px; }
  .ikon-knopf { width: 38px; height: 38px; font-size: 19px; }
  .eintrag, .auswahlzeile, .belegzeile { min-height: 46px; }
}

/* ==================================================================== Login */
.kopf-benutzer { font-size: 12px; color: var(--grau-700); white-space: nowrap; }

.login {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: var(--grau-800); padding: 20px;
}
.login__box {
  width: min(360px, 100%); background: var(--karte); border-radius: 10px; box-shadow: var(--schatten);
  padding: 24px 22px; text-align: center;
}
.login__marke { font-size: 22px; font-weight: 800; color: var(--orange); margin-bottom: 18px; }
.login__marke span { font-weight: 400; color: var(--grau-900); }

.login__tabs { display: flex; border: 1px solid var(--rand); border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; }
.login__tab { flex: 1; padding: 9px 0; border: 0; background: var(--grau-100); color: var(--grau-700); font-weight: 600; }
.login__tab--aktiv { background: var(--orange); color: #fff; }

.login__mitarbeiter-liste { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 14px; }
.login__mitarbeiter-knopf {
  padding: 9px 16px; border: 1px solid var(--rand); border-radius: 20px;
  background: var(--grau-100); color: var(--grau-900); font-weight: 600; font-size: 14px;
}
.login__mitarbeiter-knopf--aktiv { background: var(--orange); border-color: var(--orange); color: #fff; }
.login__mitarbeiter-leer { color: var(--grau-500); font-size: 13px; margin-bottom: 10px; }

.login__hinweis { margin: 0 0 10px; color: var(--grau-500); font-size: 13px; }
.login__pin-anzeige {
  font-size: 26px; letter-spacing: 8px; height: 34px; margin-bottom: 14px; color: var(--grau-900);
}
.login__pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.login__pinpad button {
  padding: 14px 0; border: 1px solid var(--rand); border-radius: var(--radius); background: var(--grau-100);
  font-size: 17px; font-weight: 600;
}
.login__pinpad button:active { background: var(--grau-200); }
.login__pinpad-orange { background: var(--orange) !important; color: #fff; border-color: var(--orange) !important; }
.login__pinpad-still { color: var(--grau-500); }

.login__panel .feld { text-align: left; margin-bottom: 12px; }
.login__panel input { width: 100%; padding: 9px 10px; border: 1px solid var(--rand); border-radius: var(--radius); }
#login-admin-ok { width: 100%; margin-top: 4px; }

.login__passwort-zeile { position: relative; display: block; }
.login__passwort-zeile input { padding-right: 38px; }
.login__augen-knopf {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; display: grid; place-items: center;
  border: 0; background: transparent; color: var(--grau-500); border-radius: var(--radius);
}
.login__augen-knopf:hover { background: var(--grau-100); color: var(--grau-900); }
.login__augen-knopf--aktiv { color: var(--orange); }

.login__fehler { color: #b3261e; font-size: 13px; margin: 14px 0 0; }

/* ============================================================ Benutzerrechte */
.rechte-gitter { display: flex; flex-direction: column; gap: 10px; }
.rechte-zeile { align-items: flex-start !important; }
.rechte-zeile strong { display: block; font-weight: 600; }
.rechte-zeile small { display: block; margin-top: 1px; }
.feld-hinweis { margin: -4px 0 10px; font-size: 12.5px; color: var(--grau-500, #6b7280); max-width: 70ch; }

/* ===================== Artikelgruppen + Artikel wie in Bestell (Dong 20.11.2026) */
.sk { flex: 1; min-height: 0; display: grid; gap: 14px; padding: 12px 14px; background: var(--grau-100); }
.sk--gruppen { grid-template-columns: minmax(240px, 340px) minmax(0, 1fr); }
.sk--artikel { grid-template-columns: minmax(200px, 260px) minmax(300px, 1fr) minmax(380px, 1.15fr); }
.sk-spalte { display: flex; flex-direction: column; gap: 5px; overflow-y: auto; min-height: 0; min-width: 0; }
.sk-spalte > * { flex: none; }
.sk-spalte--artikel { overflow: hidden; }
.sk-liste { flex: 1 1 auto; overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 5px; }
.sk-liste > * { flex: none; }
.sk-editor { overflow-y: auto; min-height: 0; min-width: 0; }
.sk-kopf { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 2px; }
.sk-kopf h2 { margin: 0; font-size: 16px; }
.sk-platz { flex: 1; }
.sk-chip { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 10px; background: var(--karte); border: 1px solid var(--rand); color: var(--grau-700); }
.sk-mu { margin: 4px 2px; color: var(--grau-500); font-size: 13px; }
.sk-klein { font-size: 12px; }
.sk-suche { width: 100%; padding: 8px 12px; border: 1px solid var(--rand); border-radius: 20px; background: var(--karte); font: inherit; }

.sk-eintrag {
  display: flex; align-items: center; gap: 9px; width: 100%; min-height: 44px;
  padding: 0 12px; border: 0; border-radius: 10px; background: var(--karte);
  color: var(--grau-900); font: inherit; font-weight: 600; text-align: left; cursor: pointer;
}
.sk-eintrag.unter { font-weight: 500; }
.sk-eintrag.an { box-shadow: inset 3px 0 0 var(--orange), 0 0 0 1px rgba(0, 0, 0, .12); }
.sk-eintrag:focus-visible { outline: 2px solid var(--orange); outline-offset: 1px; }
.sk-gruppe[data-sort], .sk-art[data-sort] { user-select: none; -webkit-user-select: none; cursor: grab; }
.sk-griff { color: rgba(0, 0, 0, .35); font-size: 13px; letter-spacing: -2px; }
.sk-farbe { width: 14px; height: 14px; border-radius: 4px; flex: none; display: inline-block; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); }
.sk-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sk-zahl { font-size: 12px; color: var(--t-text2); font-weight: 700; font-variant-numeric: tabular-nums; }
.sk-art { min-height: 54px; padding: 6px 10px; }
.sk-art.aus { opacity: .5; }
.sk-plu { min-width: 42px; text-align: center; font-size: 12.5px; font-weight: 800; padding: 4px 6px; border-radius: 6px; flex: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); }
.sk-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sk-name b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sk-name small { font-size: 11.5px; color: var(--grau-500); font-weight: 500; }
.sk-betrag { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 13.5px; }
.wird-gezogen { opacity: .45; }
.sk-eintrag.vor { box-shadow: inset 0 3px 0 var(--orange); }
.sk-eintrag.nach { box-shadow: inset 0 -3px 0 var(--orange); }

.sk-karte > h2 { margin: 0 0 12px; font-size: 18px; }
.sk-info { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: -4px 0 14px; color: var(--grau-500); font-size: 13px; }
.sk-farbwahl { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sk-farbknopf { width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer; box-shadow: 0 0 0 1px rgba(0, 0, 0, .18); }
.sk-farbknopf.an { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--orange); }
.sk-farbeigen { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 2px; border-radius: 20px; background: var(--karte); border: 1px solid var(--rand); font-size: 12.5px; cursor: pointer; }
.sk-farbeigen.an { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange); }
.sk-farbeigen input[type="color"] { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.sk-vorschau { display: inline-block; align-self: flex-start; opacity: 1; }
.sk-kachelvorschau { width: 130px; }
.sk-knoepfe { display: flex; gap: 8px; align-items: center; margin-top: 6px; }

@media (max-width: 1100px) {
  .sk--artikel { grid-template-columns: minmax(180px, 230px) minmax(0, 1fr); overflow-y: auto; }
  .sk--artikel .sk-editor { grid-column: 1 / -1; overflow: visible; }
  .sk--artikel .sk-spalte { max-height: 60vh; }
}
@media (max-width: 700px) {
  .sk--gruppen, .sk--artikel { grid-template-columns: minmax(0, 1fr); overflow-y: auto; }
  .sk-spalte { max-height: 45vh; }
  .sk-editor { overflow: visible; }
}

/* ======================= Kasse: Artikel + Gruppen genau wie Bestell (Dong 20.11.2026) */
.artikelflaeche { background: #2d3748; }
.gruppenleiste { gap: 8px; padding: 10px 12px 6px; background: transparent; max-height: 34vh; }
.gruppenleiste--unter { padding-top: 0; background: transparent; max-height: 24vh; }
.gruppenknopf {
  flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 6px 14px; border: 0; border-radius: 10px;
  background: #3b475c; color: #f7fafc; font-weight: 700; font-size: 15px;
  white-space: nowrap; opacity: 1; box-shadow: none; outline: 0; cursor: pointer;
}
.gruppenknopf i { width: 9px; height: 9px; border-radius: 50%; background: var(--gf); flex: none; }
.gruppenknopf--aktiv { background: #25734a; color: #fff; outline: 0; box-shadow: none; }
.gruppenknopf--unter { min-height: 40px; font-size: 14px; font-weight: 600; background: #2d3748; box-shadow: inset 0 0 0 1px #3b475c; }
.gruppenknopf--unter.gruppenknopf--aktiv { background: #25734a; box-shadow: none; }
.gruppenknopf:focus-visible { outline: 2px solid #68d391; outline-offset: 2px; }

.kachelgitter {
  grid-template-columns: repeat(auto-fill, minmax(var(--kachel-breite, 150px), 1fr));
  gap: 10px; padding: 6px 12px 14px;
}
.kachel {
  justify-content: flex-start; gap: 4px;
  min-height: var(--kachel-hoehe, 108px); padding: 12px 12px 10px;
  border: 1px solid #3b475c; border-top: 5px solid var(--gf, #718096); border-radius: 12px;
  background: #2d3748; color: #f7fafc; box-shadow: none; line-height: 1.2; cursor: pointer;
}
.kachel:hover { filter: none; background: #334056; }
.kachel:active { transform: translateY(1px); background: #1c3d2c; }
.kachel__nr { font-size: 12px; font-weight: 700; color: var(--t-text2); }
.kachel__name { font-size: var(--kachel-schrift, 15px); font-weight: 700; -webkit-line-clamp: 3; }
.kachel__preis { margin-top: auto; font-size: calc(var(--kachel-schrift, 15px) + 1px); font-weight: 700; opacity: 1; }
.kachel--leer { border: 0; background: none; color: var(--t-text2); }
.kachelkopf {
  margin-top: 6px; padding: 8px 2px 4px; border-bottom: 1px solid #3b475c;
  color: #68d391; font-size: 16px; cursor: default;
}
.kachelkopf[title] { cursor: pointer; }
.kachelkopf small { color: var(--t-text2); font-size: 14px; }
.sk-kachelvorschau { width: 160px; }

@media (max-width: 760px) {
  .gruppenknopf { min-height: 40px; font-size: 13.5px; padding: 6px 10px; }
  .kachelgitter { grid-template-columns: repeat(auto-fill, minmax(var(--kachel-breite, 120px), 1fr)); gap: 8px; padding: 6px 8px 12px; }
  .kachel { min-height: var(--kachel-hoehe, 92px); padding: 10px 10px 8px; }
  .kachel__name { font-size: var(--kachel-schrift, 13.5px); }
}

/* ============ Kasse Variante A „dunkel, ruhig“ (Dong 20.11.2026) ============
   Nach Material Dark Theme: dunkelgraue Fläche statt Schwarz, Text nicht reinweiß,
   entsättigte Gruppenfarben (Okabe-Ito). Jede Hauptgruppe eine Farbe, Untergruppen
   und Artikel erben sie. */
.artikelflaeche { background: var(--t-grund); }
.artikelflaeche__kopf { background: #1d2128; border-bottom: 1px solid var(--t-flaeche2); color: var(--t-text); }
.artikelflaeche__suche input { background: var(--t-grund); border-color: var(--t-rand); color: var(--t-text); }
.artikelflaeche__suche input::placeholder { color: var(--t-leise); }
.artikelflaeche__kopf .ikon-knopf { color: var(--t-text2); }
.bereichschalter { background: transparent; box-shadow: inset 0 0 0 1px var(--t-rand); }
.bereichknopf { color: var(--t-text2); padding: 7px 18px; }
.bereichknopf + .bereichknopf { border-left: 1px solid var(--t-rand); }
.bereichknopf--aktiv { background: var(--t-text); color: var(--t-grund); box-shadow: none; }
.bereichknopf--aktiv:last-child { background: #e69f00; color: var(--t-grund); }   /* Lieferung gut sichtbar */

.gruppenknopf { background: var(--t-feld); color: var(--t-text); }
.gruppenknopf--aktiv { background: var(--gf); color: #111; }
.gruppenknopf--aktiv i { background: #111; }
.gruppenknopf--unter { background: transparent; color: var(--t-text2); box-shadow: inset 0 0 0 1px var(--t-rand); }
.gruppenknopf--unter.gruppenknopf--aktiv { background: var(--t-text); color: var(--t-grund); box-shadow: none; }
.gruppenknopf:focus-visible { outline-color: #56b4e9; }

.kachelkopf { color: color-mix(in srgb, var(--hf, #56b4e9) var(--t-gf-anteil), var(--t-text)); border-bottom-color: var(--t-flaeche2); }
.kachelkopf small { color: var(--t-leise); }
.kachel {
  border: 0; border-radius: 10px;
  background: var(--t-kachel);
  background: color-mix(in srgb, var(--gf, var(--t-leise)) 13%, var(--t-kachel));
  box-shadow: inset 4px 0 0 var(--gf, var(--t-leise));
  color: var(--t-text); padding: 11px 11px 10px 15px;
}
.kachel:hover { background: color-mix(in srgb, var(--gf, var(--t-leise)) 20%, var(--t-kachel)); }
.kachel:active { background: color-mix(in srgb, var(--gf, var(--t-leise)) 30%, var(--t-kachel)); }
.kachel__nr { color: var(--gf, var(--t-leise)); font-weight: 800; letter-spacing: .02em; }
.kachel__preis { font-weight: 800; }
.kachel--leer { box-shadow: none; background: none; color: var(--t-leise); }

/* Verwaltung: Knopf „wie Gruppe“ in der Farbwahl */
.sk-farberbe { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px 3px 3px; border-radius: 20px; border: 1px solid var(--rand); background: var(--karte); font: inherit; font-size: 12.5px; cursor: pointer; }
.sk-farberbe i { width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6); }
.sk-farberbe.an { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange); }
.sk-kachelvorschau { background: var(--t-kachel); background: color-mix(in srgb, var(--gf, var(--t-leise)) 13%, var(--t-kachel)); }
/* Name nicht zusammenquetschen - die Kachel wächst stattdessen mit */
.kachel > * { flex: none; }

/* =====================================================================
   Entwurf C (Dong 20.11.2026): Tablet 10" quer + iPhone
   - keine Kopfzeile in der Kasse, Menü über Name/Uhr oben rechts
   - Beleg-Spalte dunkel wie die Artikel, Zustand deutlich (BEREIT / AKTIV)
   - iPhone: Reiter unten, Beleg als Leiste unten zum Aufklappen
   ===================================================================== */
.kasse { background: var(--t-grund); }
.beleg {
  background: var(--t-karte); color: var(--t-text); border-right: 1px solid var(--t-linie2);
  transition: box-shadow .2s;
}
.beleg--aktiv { box-shadow: inset 0 0 0 3px var(--t-gruen); }

.beleg__status { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--t-linie2); min-height: 60px; }
.beleg__punkt { width: 12px; height: 12px; border-radius: 50%; background: #5b6370; flex: none; }
.beleg__titel { flex: 1; min-width: 0; display: grid; }
.beleg__titel .beleg__nr { font-size: 16px; font-weight: 800; color: var(--t-text); }
.beleg__titel small { font-size: 11.5px; color: var(--t-leise); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.beleg__schild { font-size: 11px; font-weight: 800; letter-spacing: .06em; padding: 4px 9px; border-radius: 10px; background: var(--t-knopf); color: var(--t-text2); flex: none; }
.beleg--aktiv .beleg__status { background: linear-gradient(90deg, rgba(47, 158, 99, .28), rgba(47, 158, 99, .08)); }
.beleg--aktiv .beleg__punkt { background: #4ade80; animation: beleg-puls 1.6s infinite; }
.beleg--aktiv .beleg__schild { background: var(--t-gruen); color: #fff; }
@keyframes beleg-puls { 0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, .55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(74, 222, 128, 0); } }
.beleg__handy-knopf { display: none; }

.beleg__offene { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-bottom: 1px solid var(--t-linie2); font-size: 12px; color: var(--t-leise); }
.beleg__offene-knopf { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 0; border-radius: 18px; background: var(--t-feld); color: var(--t-text); font-weight: 700; }
.beleg__offene-knopf b { background: var(--t-akzent-voll); color: #fff; border-radius: 9px; padding: 0 6px; font-size: 11px; }
.beleg__offene-knopf--hupf { animation: beleg-hupf .6s 2; }
@keyframes beleg-hupf { 40% { transform: scale(1.15); } }

.beleg__kunde { background: transparent; color: var(--t-text); border-bottom: 1px solid var(--t-linie2); min-height: 48px; }
.beleg__kunde:hover { background: var(--t-feld); }
.beleg__kunde-label { color: var(--t-leise); }
.beleg__leer { color: var(--t-leise); }
.beleg__leerbox { margin: 14px; padding: 22px 16px; border: 2px dashed var(--t-linie); border-radius: 14px; display: grid; gap: 12px; justify-items: center; text-align: center; color: var(--t-leise); }
.beleg__leerbox strong { color: var(--t-text); font-size: 16px; }
.beleg__start { min-height: 56px; padding: 0 26px; border: 0; border-radius: 12px; background: var(--t-gruen); color: #fff; font-weight: 800; font-size: 16px; }
.beleg__start:hover { filter: brightness(1.08); }

.position { border-bottom: 1px solid var(--t-flaeche2); }
.position:hover { background: var(--t-feld); }
.position--markiert { background: var(--t-flaeche2); box-shadow: inset 3px 0 0 var(--t-akzent); }
.position__menge { color: var(--t-akzent-text); }
.position__detail { color: var(--t-leise); }
.position--neu { animation: position-neu .9s ease-out; }
@keyframes position-neu { from { background: rgba(47, 158, 99, .45); } }

.beleg__summen { background: var(--t-karte); border-top: 1px solid var(--t-linie2); }
.beleg__summe-zeile--klein { color: var(--t-leise); }
.beleg__summe-zeile--gross { border-top-color: var(--t-linie2); }
.beleg__aktionen { grid-template-columns: 1fr 1.5fr; gap: 8px; padding: 10px; }
.beleg__aktionen .knopf { min-height: 56px; border-radius: 12px; font-size: 15px; font-weight: 800; }
#btn-neuer-beleg { background: var(--t-knopf); color: var(--t-text); }
#btn-kassieren { background: var(--t-akzent-voll); color: #fff; }
.beleg__toast { position: absolute; left: 12px; right: 12px; bottom: 92px; z-index: 6; padding: 11px 14px; border-radius: 12px; background: var(--t-text); color: var(--t-grund); font-weight: 700; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); }

/* Liste Offene / Alle Belege in der Beleg-Spalte */
.beleg__belegliste { background: var(--t-karte); color: var(--t-text); }
.beleg__belegliste-kopf { border-bottom-color: var(--t-linie2); }
.belegliste__reiter { display: flex; gap: 6px; }
.belegliste__reiter .kopf-tab { background: var(--t-feld); border-color: var(--t-rand); color: var(--t-text2); min-height: 38px; }
.belegliste__reiter .kopf-tab--aktiv { background: var(--t-text); color: var(--t-grund); }
.beleg__belegliste .ikon-knopf { color: var(--t-text2); }
.belegliste__zeitfilter { border-bottom-color: var(--t-linie2); }

/* Artikel gesperrt, solange kein Beleg offen ist */
.artikelflaeche { position: relative; }
.artikelflaeche--gesperrt .kachelgitter { opacity: .38; filter: saturate(.4); }
.sperr-hinweis {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 7;
  max-width: 80%; padding: 14px 20px; border-radius: 14px; background: var(--t-text); color: var(--t-grund);
  font-weight: 800; font-size: 15px; text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}
.sperr-hinweis--wackel { animation: sperr-wackel .4s; }
@keyframes sperr-wackel { 25% { transform: translate(calc(-50% - 7px), -50%); } 75% { transform: translate(calc(-50% + 7px), -50%); } }
@media (prefers-reduced-motion: reduce) {
  .beleg--aktiv .beleg__punkt, .beleg__offene-knopf--hupf, .position--neu, .sperr-hinweis--wackel { animation: none; }
}

/* Name/Uhr oben rechts = Menü */
.artikelflaeche__kopf { min-height: 60px; padding: 8px 12px; gap: 10px; }
.artikelflaeche__suche { flex: 1; min-width: 0; margin-left: 0; }
.artikelflaeche__suche input { width: 100%; min-height: 44px; border-radius: 22px; }
.bereichknopf { min-height: 44px; }
.ich-knopf { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 4px 4px 12px; border: 0; border-radius: 22px; background: var(--t-feld); color: var(--t-text); }
.ich-knopf:hover { background: var(--t-knopf); }
.ich-knopf__uhr { font-weight: 800; font-variant-numeric: tabular-nums; }
.ich-knopf__name { font-size: 12.5px; color: var(--t-text2); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ich-knopf__bild { width: 36px; height: 36px; border-radius: 50%; background: #3a4a5e; color: #dfe6ee; display: grid; place-items: center; font-weight: 800; }
.gruppenknopf { min-height: 48px; }

/* Menü mit Abschnitten */
.menue-titel { grid-column: 1 / -1; margin: 6px 2px -2px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--grau-500); }
.menuekachel--ab { color: #b42318; }

/* Heute */
.heute { flex: 1; overflow-y: auto; padding: 16px; display: grid; gap: 12px; align-content: start; background: var(--grau-100); }
.heute__datum { color: var(--grau-500); font-size: 13px; }
.heute__kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.heute__kpi { background: var(--karte); border: 1px solid var(--rand); border-radius: 14px; padding: 12px 14px; display: grid; gap: 2px; }
.heute__kpi small { color: var(--grau-500); font-size: 12px; font-weight: 600; }
.heute__kpi b { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.heute__kpi--gross { grid-column: 1 / -1; background: #1f6f45; border-color: #1f6f45; color: #fff; }
.heute__kpi--gross small { color: rgba(255, 255, 255, .8); }
.heute__kpi--gross b { font-size: 34px; }
.heute__titel { margin: 8px 2px 0; font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--grau-500); }
.heute__balken { height: 12px; border-radius: 6px; background: #e69f00; overflow: hidden; display: flex; }
.heute__balken span { background: #56b4e9; display: block; }
.heute__legende { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.heute__ab::before, .heute__li::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.heute__ab::before { background: #56b4e9; }
.heute__li::before { background: #e69f00; }
.heute__zeilen { display: grid; gap: 6px; }
.heute__zeile { background: var(--karte); border: 1px solid var(--rand); border-radius: 12px; padding: 10px 14px; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; text-align: left; min-height: 48px; align-items: center; }
.heute__zeile b { font-variant-numeric: tabular-nums; }
.heute__zeile small { grid-column: 1 / -1; color: var(--grau-500); font-size: 12px; }
.heute__zeile--knopf { width: 100%; cursor: pointer; }
.heute__zeile--knopf:hover { background: var(--grau-100); }
.heute__leer { margin: 4px 2px; color: var(--grau-500); }

/* Handy-Reiter: nur auf dem Handy */
.handy-nav { display: none; }

@media (max-width: 700px) {
  :root { --handy-nav: calc(62px + env(safe-area-inset-bottom, 0px)); }
  .ansicht { height: calc(100% - var(--handy-nav)); }
  .handy-nav {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: var(--handy-nav);
    padding: 4px 4px env(safe-area-inset-bottom, 0px); background: var(--t-karte); border-top: 1px solid var(--t-linie2);
  }
  .handy-nav button { display: grid; justify-items: center; align-content: center; gap: 2px; border: 0; background: none; color: var(--t-leise); font-size: 10.5px; font-weight: 700; min-height: 48px; }
  .handy-nav button svg { width: 23px; height: 23px; }
  .handy-nav button.an { color: #f0a35e; }

  /* Kasse: Artikel füllen den Bildschirm, der Beleg ist eine Leiste unten */
  #ansicht-kasse .kasse { flex-direction: column; }
  #ansicht-kasse .artikelflaeche { flex: 1; }
  #ansicht-kasse .artikelflaeche__kopf { padding: 8px 10px; gap: 8px; min-height: 0; }
  #ansicht-kasse .ich-knopf { padding-left: 4px; }
  #ansicht-kasse .ich-knopf__name, #ansicht-kasse .ich-knopf__uhr { display: none; }
  #ansicht-kasse .bereichknopf { padding: 0 10px; font-size: 12.5px; }
  #ansicht-kasse .gruppenleiste { flex-wrap: nowrap; overflow-x: auto; max-height: none; scrollbar-width: none; }
  #ansicht-kasse .gruppenleiste::-webkit-scrollbar { display: none; }
  #ansicht-kasse .gruppenknopf { flex: none; min-height: 42px; padding: 0 14px; font-size: 13.5px; }
  #ansicht-kasse .gruppenleiste--unter .gruppenknopf { min-height: 36px; }
  /* Werte aus „Ansicht anpassen“ gelten auch am Handy (Dong 23.11.2026); ohne Einstellung 2 Spalten */
  #ansicht-kasse .kachelgitter { grid-template-columns: repeat(auto-fill, minmax(min(var(--kachel-breite, 150px), 100%), 1fr)); gap: 8px; padding: 8px 10px 96px; }
  #ansicht-kasse .kachel { min-height: var(--kachel-hoehe, 88px); padding: 10px 10px 9px 14px; }
  #ansicht-kasse .kachel__name { font-size: var(--kachel-schrift, 13.5px); }
  #ansicht-kasse .kachel__preis { font-size: calc(var(--kachel-schrift, 13.5px) + 1.5px); }

  #ansicht-kasse .beleg {
    position: fixed; left: 8px; right: 8px; bottom: calc(var(--handy-nav) + 8px); z-index: 20;
    flex: none; width: auto; max-width: none; max-height: 66px; overflow: hidden;
    border: 0; border-radius: 16px; box-shadow: 0 8px 26px rgba(0, 0, 0, .55);
    transition: max-height .25s ease;
  }
  #ansicht-kasse .beleg--aktiv { box-shadow: 0 0 0 2px var(--t-gruen), 0 8px 26px rgba(0, 0, 0, .55); }
  #ansicht-kasse .beleg--offen { max-height: calc(100% - var(--handy-nav) - 70px); overflow-y: auto; }
  #ansicht-kasse .beleg__status { min-height: 66px; padding: 10px 10px 10px 14px; cursor: pointer; }
  #ansicht-kasse .beleg__schild { display: none; }
  #ansicht-kasse .beleg__handy-knopf { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--t-akzent-voll); color: #fff; font-weight: 800; flex: none; }
  #ansicht-kasse .beleg:not(.beleg--aktiv) .beleg__handy-knopf { background: var(--t-gruen); }
  #ansicht-kasse .beleg__leerbox { display: none; }
  #ansicht-kasse .beleg__toast { position: fixed; bottom: auto; top: 12px; }
  #ansicht-kasse .sperr-hinweis { top: 40%; }

  /* in der aufgeklappten Leiste normale Größen (ältere Handy-Regeln aufheben) */
  #ansicht-kasse .position { grid-template-columns: 34px 1fr auto; padding: 9px 12px 9px 8px; }
  #ansicht-kasse .position__menge { font-size: var(--beleg-schrift, 14px); }
  #ansicht-kasse .position__name { font-size: var(--beleg-schrift, 14px); }
  #ansicht-kasse .position__summe { grid-column: auto; font-size: var(--beleg-schrift, 14px); }
  #ansicht-kasse .position__detail { display: block; }
  #ansicht-kasse .beleg__summe-zeile--gross { font-size: 20px; }
  #ansicht-kasse .beleg__aktionen { grid-template-columns: 1fr 1.5fr; }
  #ansicht-kasse .beleg__kunde-label { font-size: 10px; }
  #ansicht-kasse .beleg__kunde-name { font-size: 14px; }

  .heute { padding: 12px 12px 20px; }
}

/* =================== Abschluss-Fenster Entwurf A (Dong 20.11.2026): Zeit wählen + Bon drucken */
.abschluss { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, .58); }
.abschluss__box {
  width: min(640px, 100%); max-height: 100%; overflow-y: auto;
  display: grid; gap: 14px; padding: 18px 20px 20px; border-radius: 18px;
  background: var(--t-karte); color: var(--t-text); box-shadow: 0 20px 50px rgba(0, 0, 0, .55);
}
.abschluss__kopf { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.abschluss__kopf h2 { margin: 0; font-size: 21px; font-weight: 800; }
.abschluss__art { font-size: 12px; font-weight: 800; padding: 5px 11px; border-radius: 12px; background: var(--t-text); color: var(--t-grund); }
.abschluss__art--lief { background: #e69f00; }
.abschluss__betrag { margin-left: auto; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.abschluss__lab { font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--t-leise); }
.abschluss__zeiten { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.abschluss__zeit {
  min-height: 70px; border: 0; border-radius: 12px; background: var(--t-feld); color: var(--t-text);
  box-shadow: inset 0 0 0 1px var(--t-rand); display: grid; align-content: center; justify-items: center; gap: 1px;
}
.abschluss__zeit b { font-size: 19px; font-weight: 800; }
.abschluss__zeit small { font-size: 12px; font-weight: 700; color: var(--t-leise); }
.abschluss__zeit--an { background: var(--t-gruen); box-shadow: none; color: #fff; }
.abschluss__zeit--an small { color: #d7f5e5; }
.abschluss__fest { display: flex; flex-wrap: wrap; gap: 6px; }
.abschluss__fest button { min-height: 44px; padding: 0 14px; border: 0; border-radius: 22px; background: transparent; color: var(--t-text2); box-shadow: inset 0 0 0 1px var(--t-rand); font-weight: 700; font-variant-numeric: tabular-nums; }
.abschluss__fest button.abschluss__fest--an { background: var(--t-text); color: var(--t-grund); box-shadow: none; }
.abschluss__mehr { justify-self: start; padding: 6px 0; border: 0; background: none; color: var(--t-leise); font-size: 13px; text-decoration: underline; }
.abschluss__mehrbox { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px; border-radius: 12px; background: var(--t-grund); }
.abschluss__mehrbox label { display: grid; gap: 4px; font-size: 12px; color: var(--t-leise); }
.abschluss__mehrbox input[type="date"], .abschluss__mehrbox input[type="text"] { min-height: 42px; padding: 0 10px; border: 1px solid var(--t-rand); border-radius: 10px; background: var(--t-karte); color: var(--t-text); color-scheme: var(--t-schema); }
.abschluss__check { display: flex !important; align-items: center; gap: 8px; font-size: 14px !important; color: var(--t-text) !important; }
.abschluss__breit { grid-column: 1 / -1; }
.abschluss__fuss { display: flex; gap: 10px; }
.abschluss__abbrechen { min-height: 60px; padding: 0 22px; border: 0; border-radius: 12px; background: var(--t-knopf); color: var(--t-text); font-weight: 800; }
.abschluss__los {
  flex: 1; min-height: 64px; border: 0; border-radius: 14px; background: var(--t-akzent-voll); color: #fff;
  font-size: 18px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 10px;
}
.abschluss__los small { font-size: 13.5px; font-weight: 700; }
.abschluss__los:hover { filter: brightness(1.06); }
.abschluss button:focus-visible { outline: 2px solid #56b4e9; outline-offset: 2px; }
/* Kunde im Abschluss (Entwurf A + C, Dong 20.11.2026): Name bei Abholung, Name + Adresse bei Lieferung */
.abschluss__box--lief { width: min(940px, 100%); }
.abschluss__spalten { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.abschluss__zeitspalte { display: grid; gap: 14px; align-content: start; }
.abschluss__zeiten--3 { grid-template-columns: repeat(3, 1fr); }
.abschluss__kunde { display: grid; gap: 8px; align-content: start; }
.abschluss__kunde .abschluss__lab + .vorschlag-wrap, .abschluss__kunde .abschluss__lab:not(:first-child) { margin-top: 4px; }
.abschluss__eingabe {
  width: 100%; min-height: 48px; padding: 0 12px; border: 1px solid var(--t-rand); border-radius: 10px;
  background: var(--t-feld); color: var(--t-text); font: inherit; font-size: 17px; font-weight: 700; color-scheme: var(--t-schema);
}
.abschluss__eingabe::placeholder { color: var(--t-platz); font-weight: 600; font-size: 15px; }
.abschluss__eingabe:focus { outline: none; border-color: var(--t-gruen); box-shadow: 0 0 0 3px rgba(47, 158, 99, .25); }
.abschluss__plzort { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 8px; }
.abschluss__speichern { margin-top: 2px; }
.abschluss__speichern input { width: 20px; height: 20px; }
.vorschlag-wrap { position: relative; }
.vorschlaege {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 5; overflow: hidden;
  background: #262c36; border: 1px solid var(--t-rand); border-radius: 10px; box-shadow: 0 14px 30px rgba(0, 0, 0, .55);
}
.vorschlag {
  display: flex; align-items: baseline; gap: 8px; width: 100%; min-height: 44px; padding: 8px 12px;
  border: 0; border-bottom: 1px solid #2f3540; background: none; color: var(--t-text); text-align: left; font-size: 16px; font-weight: 700;
}
.vorschlag small { color: var(--t-leise); font-size: 12.5px; font-weight: 600; }
.vorschlag:hover, .vorschlag--an { background: rgba(47, 158, 99, .18); }
.vorschlaege__quelle { display: block; padding: 5px 12px; font-size: 11px; color: var(--t-platz); }
@media (max-width: 700px) {
  .abschluss { align-items: flex-end; padding: 0; }
  .abschluss__box { border-radius: 18px 18px 0 0; padding: 16px 14px calc(16px + env(safe-area-inset-bottom, 0px)); }
  .abschluss__zeiten { grid-template-columns: repeat(3, 1fr); }
  .abschluss__mehrbox { grid-template-columns: 1fr; }
  .abschluss__los { font-size: 16px; }
  .abschluss__spalten { grid-template-columns: 1fr; gap: 14px; }
}

/* Abholung | Lieferung groesser, Suche schmaler (Dong 20.11.2026) */
.bereichschalter { border-radius: 12px; }
.bereichknopf { min-height: 54px; padding: 0 28px; font-size: 17px; font-weight: 800; }
.artikelflaeche__suche { flex: 0 1 240px; margin-left: auto; }
@media (max-width: 700px) {
  #ansicht-kasse .bereichknopf { min-height: 46px; padding: 0 14px; font-size: 14.5px; }
  #ansicht-kasse .artikelflaeche__suche { flex: 1 1 90px; }
}

/* Schalter als Rinne mit eingesetzten Knoepfen - kein Rand, der vom gewaehlten Knopf ueberdeckt wird (Dong 20.11.2026) */
.bereichschalter { gap: 4px; padding: 4px; border-radius: 14px; background: var(--t-feld); box-shadow: none; overflow: visible; }
.bereichknopf { border-radius: 10px; min-height: 48px; }
.bereichknopf + .bereichknopf { border-left: 0; }
.bereichknopf:not(.bereichknopf--aktiv):hover { background: var(--t-knopf); }
.bereichknopf:focus-visible { outline: 2px solid #56b4e9; outline-offset: 1px; }
@media (max-width: 700px) { #ansicht-kasse .bereichknopf { min-height: 40px; } }

/* Menü-Knopf: Zahnrad statt Anfangsbuchstabe (Dong 20.11.2026) */
.ich-knopf__bild { background: #2f3742; color: var(--t-text); }
.ich-knopf:hover .ich-knopf__bild { background: #3a4452; }

/* Artikelnummer als Schild in der Gruppenfarbe - auch bei sehr dunklen Farben lesbar (Dong 20.11.2026) */
.kachel__nr { justify-self: start; align-self: flex-start; padding: 1px 7px; border-radius: 6px; background: var(--nr-bg, var(--gf)); color: var(--nr-tx, var(--t-grund)); font-size: 12px; font-weight: 800; letter-spacing: .02em; line-height: 1.5; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); }

/* =====================================================================
   Ganze App dunkel in einer Linie (Dong 20.11.2026, „Làm như bản vẽ“)
   Die Grau-Stufen werden für die ganze App umgedreht; das Papier der
   A4-Rechnung (--papier) und der Bon bleiben weiß.
   ===================================================================== */
:root {
  --grau-900: var(--t-text);   /* Text */
  --grau-800: var(--t-grund);   /* Grundfläche */
  --grau-700: var(--t-text2);   /* Text leiser */
  --grau-500: var(--t-leise);   /* Hinweise */
  --grau-300: var(--t-linie);   /* kräftige Linien */
  --grau-200: var(--t-knopf);   /* feine Linien / Knopf-Fläche */
  --grau-100: var(--t-karte);   /* Flächen (Listen, Kopf) */
  --flaeche: var(--t-grund);
  --rand: var(--t-rand);
  --karte: var(--t-karte);
  --karte-hervor: #22342a;
  --feld: var(--t-grund);
  --papier: #ffffff;
  --schatten: 0 1px 3px rgba(0, 0, 0, .4), 0 8px 22px rgba(0, 0, 0, .35);
  --radius: 10px;
  color-scheme: var(--t-schema);
}
body { background: var(--t-grund); color: var(--t-text); }

/* Eingabefelder überall */
input, select, textarea { background: var(--feld); color: var(--t-text); border-color: var(--rand); color-scheme: var(--t-schema); }
input::placeholder, textarea::placeholder { color: var(--t-platz); }
.feld input, .feld select, .feld textarea { min-height: 46px; border-radius: 12px; border: 1px solid var(--rand); background: var(--feld); padding: 0 14px; }
.feld textarea { padding: 10px 14px; }
.feld input[type="color"] { padding: 3px; }
.feld > span { font-weight: 700; }
input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--t-gruen); }

/* Kopfzeile aller Seiten */
.kopf, .kopf--schlicht { height: 60px; flex-basis: 60px; padding: 0 12px; gap: 10px; background: var(--t-karte); border-bottom: 1px solid var(--t-linie2); }
.kopf__mitte { font-size: 17px; font-weight: 800; }
.kopf-zurueck, .kopf-tab { min-height: 44px; padding: 0 16px; border: 0; border-radius: 12px; background: var(--t-feld); color: var(--t-text); font-weight: 700; }
.kopf-zurueck:hover, .kopf-tab:hover { background: var(--t-knopf); }
.kopf-tab--aktiv { background: var(--t-text); color: var(--t-grund); }

/* Knöpfe */
.knopf { border-radius: 12px; }
.knopf--klein { min-height: 44px; padding: 0 16px; border-radius: 12px; border: 0; background: var(--t-feld); color: var(--t-text); font-weight: 700; font-size: 14px; }
.knopf--klein:hover { background: var(--t-knopf); filter: none; }
.knopf--orange, .knopf--klein.knopf--orange { background: var(--t-akzent-voll); color: #fff; border: 0; }
.knopf--orange-hell { background: var(--t-gruen); color: #fff; }
.knopf--still { background: var(--t-feld); color: var(--t-text); border: 0; }
.knopf--gefahr, .knopf--klein.knopf--gefahr { background: transparent; color: var(--t-rot-text); box-shadow: inset 0 0 0 1px var(--t-rot-rand); }
.knopf--gefahr:hover { background: var(--t-rot-flaeche); }
.ikon-knopf { width: 44px; height: 44px; border-radius: 12px; color: var(--t-text2); }
.ikon-knopf:hover { background: var(--t-knopf); }

/* Zeitfilter als Knöpfe */
.zeitfilter__knopf { min-height: 40px; padding: 0 14px; border-radius: 20px; border: 0; background: transparent; color: var(--t-text2); box-shadow: inset 0 0 0 1px var(--t-rand); font-weight: 700; }
.zeitfilter__knopf:hover { background: var(--t-feld); }
.zeitfilter__knopf--aktiv { background: var(--t-text); color: var(--t-grund); box-shadow: none; }

/* Fenster (Formular, Liste, Menü) */
.overlay { background: rgba(0, 0, 0, .58); }
.modal__box { background: var(--t-karte); color: var(--t-text); border-radius: 18px; box-shadow: 0 20px 50px rgba(0, 0, 0, .55); }
.modal__kopf { color: var(--t-text); }
.modal__kopf h2, .modal__titel { font-weight: 800; }
.modal__fuss .knopf { min-height: 52px; padding: 0 22px; border-radius: 12px; font-weight: 800; }
.modal__schliessen { color: var(--t-text2); min-height: 48px; }
.modal__schliessen:hover { background: var(--t-feld); }
.auswahlliste { border: 0; display: grid; gap: 6px; align-content: start; }
.auswahlzeile { min-height: 58px; padding: 10px 14px; border: 1px solid var(--t-linie2); border-radius: 12px; background: var(--t-grund); color: var(--t-text); }
.auswahlzeile:hover { background: var(--t-feld); }
.auswahlzeile:first-child { box-shadow: inset 3px 0 0 var(--t-akzent); }

/* Menü als Blatt von rechts */
#modal-menue { place-items: stretch end; padding: 0; }
#modal-menue .modal__box--menue { width: min(400px, 92vw); height: 100%; max-height: none; border-radius: 0; overflow-y: auto; display: flex; flex-direction: column; padding: 16px; }
#modal-menue .modal__kopf svg { display: none; }
.menuegitter { grid-template-columns: 1fr; gap: 2px; }
.menuekachel { min-height: 50px; padding: 0 12px; border: 0; border-radius: 12px; background: transparent; color: var(--t-text); font-weight: 600; flex-direction: row; justify-content: flex-start; gap: 12px; text-align: left; }
.menuekachel:hover { background: var(--t-feld); }
.menuekachel--breit { justify-content: flex-start; padding: 0 12px; }
.menuekachel__ikon { width: 26px; text-align: center; font-size: 19px; }
.menuekachel--ab { color: var(--t-rot-text); margin-top: 10px; }
.menue-titel { margin: 12px 6px 2px; }

/* Listen/Verwaltung */
.verwaltung { background: var(--t-grund); }
.verwaltung__liste { background: var(--t-karte); border-right: 1px solid var(--t-linie2); }
.verwaltung__form { background: var(--t-grund); }
.eintrag { min-height: 56px; border-bottom: 1px solid var(--t-flaeche2); background: transparent; color: var(--t-text); }
.eintrag:hover { background: var(--t-feld); }
.eintrag--aktiv { background: var(--t-feld); box-shadow: inset 3px 0 0 var(--t-akzent); }
.abschnitt { border-radius: 14px; border-color: var(--t-linie2); }
.belegzeile { background: transparent; border-color: var(--t-flaeche2); min-height: 56px; }
.belegzeile:hover { background: var(--t-feld); }

/* Rechnungsübersicht / Statistik */
.uebersicht { background: var(--t-grund); }
.filterleiste { background: transparent; border-color: var(--t-linie2); }
.filterleiste input, .filterleiste select { min-height: 44px; border-radius: 12px; }
.kennzahl { border-radius: 14px; border-color: var(--t-linie2); }
.tabellenrahmen { border-color: var(--t-linie2); border-radius: 14px; }
.tabelle th { background: var(--t-karte); color: var(--t-leise); border-bottom-color: var(--t-linie2); }
.tabelle td { border-bottom-color: var(--t-flaeche2); }
.tabelle tbody tr:hover { background: #20252d; }

/* Druckansicht: dunkle Bühne, Papier weiß */
.druckbuehne { background: #0f1115; gap: 24px; }

/* Anmelden */
.login { background: var(--t-grund); }
.login__box { background: var(--t-karte); color: var(--t-text); border-radius: 20px; padding: 26px; box-shadow: 0 20px 50px rgba(0, 0, 0, .5); }
.login__marke span { color: var(--t-text); }
.login__tabs { border-color: var(--t-rand); border-radius: 12px; }
.login__tab { min-height: 44px; background: var(--t-feld); color: var(--t-text2); }
.login__tab--aktiv { background: var(--t-akzent-voll); color: #fff; }
.login__mitarbeiter-knopf { min-height: 58px; min-width: 104px; border-radius: 14px; background: var(--t-feld); border-color: var(--t-rand); color: var(--t-text); font-weight: 800; }
.login__pin-anzeige { color: var(--t-text); }
.login__pinpad button { min-height: 60px; border-radius: 14px; background: var(--t-feld); border-color: var(--t-rand); color: var(--t-text); font-size: 22px; font-weight: 800; }
.login__pinpad button:active { background: var(--t-knopf); }
.login__pinpad-orange { background: var(--t-gruen) !important; border-color: var(--t-gruen) !important; }
.login__panel input { min-height: 46px; border-radius: 12px; }
.login__augen-knopf:hover { background: var(--t-knopf); color: var(--t-text); }

/* Verwaltung im Bestell-Stil (Artikel/Gruppen) dunkel */
.sk { background: var(--t-grund); }
.sk-eintrag { background: var(--t-karte); color: var(--t-text); }
.sk-eintrag.an { box-shadow: inset 3px 0 0 var(--t-akzent), 0 0 0 1px color-mix(in srgb, var(--t-text) 8%, transparent); }
.sk-griff { color: color-mix(in srgb, var(--t-text) 60%, transparent); }
.sk-chip { color: var(--t-text2); }
.sk-suche { color: var(--t-text); min-height: 44px; border-radius: 22px; }
.sk-farbknopf.an { box-shadow: 0 0 0 3px var(--t-grund), 0 0 0 5px var(--t-akzent); }

/* Hinweis-Meldung unten */
.hinweis { border-radius: 12px; }
.hinweis { background: var(--t-text); color: var(--t-grund); font-weight: 700; }
.hinweis--fehler { background: #b3261e; color: #fff; }

/* Position ändern (Dong 20.11.2026) */
.pos-fenster__menge { display: flex; align-items: center; gap: 12px; }
.pos-fenster__menge button { width: 64px; height: 64px; border: 0; border-radius: 16px; background: var(--t-feld); color: var(--t-text); font-size: 30px; font-weight: 800; }
.pos-fenster__menge button:active { background: var(--t-knopf); }
.pos-fenster__menge output { min-width: 64px; text-align: center; font-size: 32px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pos-fenster__je { margin-left: auto; color: var(--t-leise); font-size: 13px; }
.pos-fenster__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pos-fenster__chip { min-height: 44px; padding: 0 16px; border: 0; border-radius: 22px; background: transparent; color: var(--t-text2); box-shadow: inset 0 0 0 1px var(--t-rand); font-weight: 700; }
.pos-fenster__chip--an { background: var(--t-text); color: var(--t-grund); box-shadow: none; }
/* Extras mit Aufpreis (wie Bestell, Entwurf A) */
.pos-fenster__extras { display: grid; gap: 8px; }
.pos-fenster__extra { display: inline-flex; align-items: center; gap: 7px; }
.pos-fenster__extra i { font-style: normal; font-size: 12.5px; font-weight: 800; color: var(--t-leise); font-variant-numeric: tabular-nums; }
.pos-fenster__extra--an { background: var(--t-gruen); color: #fff; box-shadow: none; }
.pos-fenster__extra--an i { color: #d7f5e5; }
.pos-fenster__extra:disabled { opacity: .4; }
.pos-fenster__feld input { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--t-rand); border-radius: 12px; background: var(--t-grund); color: var(--t-text); }
.pos-fenster__weg { min-height: 60px; padding: 0 18px; border: 0; border-radius: 12px; background: transparent; color: var(--t-rot-text); box-shadow: inset 0 0 0 1px var(--t-rot-rand); font-weight: 800; }
.pos-fenster__weg:hover { background: var(--t-rot-flaeche); }
.pos-fenster__fertig { flex: 0 1 220px; }
.abschluss__mehrbox .pos-fenster__chips { margin-top: 6px; }
@media (max-width: 700px) {
  .pos-fenster__menge button { width: 56px; height: 56px; }
  .pos-fenster__je { width: 100%; margin-left: 0; }
  .pos-fenster__menge { flex-wrap: wrap; }
  .abschluss__fuss { flex-wrap: wrap; }
  .pos-fenster__fertig { flex: 1 1 100%; order: -1; }
}

/* Rechnungen: Liste links, gewählte Rechnung rechts (Dong 20.11.2026) */
.rl { flex: 1; min-height: 0; display: flex; }
.rl__liste { width: 400px; flex: none; display: flex; flex-direction: column; gap: 10px; padding: 12px; border-right: 1px solid var(--t-linie2); min-height: 0; }
.rl__zeit { padding: 0; border: 0; gap: 6px; flex-wrap: wrap; }
.rl__suche { display: flex; gap: 8px; }
.rl__suche input { flex: 1; min-width: 0; min-height: 46px; padding: 0 14px; border: 1px solid var(--t-rand); border-radius: 23px; background: var(--t-grund); color: var(--t-text); }
.rl__filter { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px; border: 1px solid var(--t-linie2); border-radius: 12px; }
.rl__zeilen { flex: 1; overflow-y: auto; display: grid; gap: 6px; align-content: start; min-height: 0; }
.rl__zeile { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 12px; align-items: center; width: 100%; min-height: 60px; padding: 9px 14px; border: 1px solid var(--t-linie2); border-radius: 12px; background: var(--t-karte); color: var(--t-text); text-align: left; }
.rl__zeile:hover { background: #20252d; }
.rl__zeile--an { background: var(--t-feld); box-shadow: inset 3px 0 0 var(--t-akzent); }
.rl__zeile--storniert .rl__nr, .rl__zeile--storniert .rl__betrag { text-decoration: line-through; opacity: .6; }
.rl__zeile small { grid-column: 2 / 3; color: var(--t-leise); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl__nr { font-size: 15px; font-weight: 800; }
.rl__betrag { grid-row: 1 / 3; grid-column: 3; font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rl__status { grid-row: 1 / 3; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; padding: 3px 8px; border-radius: 9px; }
.rl__status--ok { background: #24402f; color: #8fe0b5; }
.rl__status--of { background: #4a3517; color: #f0b85a; }
.rl__status--sto { background: var(--t-rot-flaeche); color: var(--t-rot-text); }
.rl__leer { margin: 16px 4px; color: var(--t-leise); }
.rl__detail { flex: 1; min-width: 0; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.rl__detail .kennzahlen { padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.rl__karte { background: var(--t-karte); border: 1px solid var(--t-linie2); border-radius: 16px; padding: 16px 18px; display: grid; gap: 12px; }
.rl__kopf { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rl__kopf h2 { margin: 0; font-size: 22px; font-weight: 800; }
.rl__kopf .rl__status { grid-row: auto; }
.rl__summe { margin-left: auto; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rl__info { color: var(--t-leise); line-height: 1.6; }
.rl__grund { color: var(--t-rot-text); margin-top: 4px; }
.rl__pos { display: grid; border-top: 1px solid var(--t-linie2); }
.rl__posz { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--t-flaeche2); font-variant-numeric: tabular-nums; }
.rl__knoepfe { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rl__gross { min-height: 54px; padding: 0 18px; font-size: 15px; font-weight: 800; }
.rl__platz { flex: 1; }
@media (max-width: 900px) {
  .rl { flex-direction: column; overflow-y: auto; }
  .rl__liste { width: auto; border-right: 0; border-bottom: 1px solid var(--t-linie2); max-height: 55vh; }
  .rl__detail { overflow: visible; }
}

/* Rechnung ansehen: Bon-Vorschau neben dem Blatt (nur Bildschirm) */
.bon-vorschau { flex: 0 0 auto; width: 300px; padding: 16px 14px 18px; background: #fff; color: #111; border-radius: 6px; box-shadow: var(--schatten); font: 13px/1.4 ui-monospace, Menlo, Consolas, monospace; align-self: flex-start; }
.bon-vorschau__titel { margin: -4px 0 10px; font: 700 11px/1 Inter, system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #8b8d91; }
#ansicht-druck .kopf .knopf--klein { min-height: 44px; }
@media (max-width: 900px) { .druckbuehne { flex-direction: column; align-items: center; } }

/* Kassenbericht: Status als Schild, Kacheln wie die Kasse */
.kb-status { display: inline-block; margin-top: 6px; padding: 4px 10px; border-radius: 10px; font-size: 12px; font-weight: 800; }
.kb-status--offen { background: #24402f; color: #8fe0b5; }
.kb-status--zu { background: var(--t-knopf); color: var(--t-text2); }
.kb-status--leer { background: #4a3517; color: #f0b85a; }
#ansicht-kassenbericht .beleg__marke { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--t-linie2); }
#ansicht-kassenbericht .beleg__nr { font-size: 16px; font-weight: 800; color: var(--t-text); }
#ansicht-kassenbericht .artikelflaeche__kopf { min-height: 0; padding: 12px 12px 4px; background: transparent; border: 0; font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--t-leise); }
#ansicht-kassenbericht .kachelgitter { flex: none; }
#ansicht-kassenbericht .knopf--menue { display: none; }
#ansicht-kassenbericht .beleg__aktionen { grid-template-columns: 1fr; }
#btn-kb-abschliessen { background: var(--t-gruen); color: #fff; }
#btn-kb-neu { background: var(--t-akzent-voll); color: #fff; }
.kb-datumnav input[type="date"] { min-height: 44px; padding: 0 12px; border: 1px solid var(--t-rand); border-radius: 12px; font-weight: 700; }

/* Einstellungen wie Bestell: Bereiche links, Karte rechts (Dong 20.11.2026) */
.einst { flex: 1; min-height: 0; display: flex; background: var(--t-grund); }
.einst__nav { width: 230px; flex: none; display: flex; flex-direction: column; gap: 4px; padding: 10px; background: var(--t-karte); border-right: 1px solid var(--t-linie2); overflow-y: auto; }
.einst__navknopf { min-height: 50px; padding: 0 14px; border: 0; border-radius: 12px; background: transparent; color: var(--t-text); font-weight: 700; text-align: left; }
.einst__navknopf:hover { background: var(--t-feld); }
.einst__navknopf--an { background: var(--t-feld); box-shadow: inset 3px 0 0 var(--t-akzent); }
.einst__inhalt { flex: 1; min-width: 0; overflow-y: auto; padding: 16px; display: grid; gap: 14px; align-content: start; }
.einst__karte { background: var(--t-karte); border: 1px solid var(--t-linie2); border-radius: 16px; padding: 16px 18px; display: grid; gap: 14px; max-width: 980px; }
.einst__karte h3 { margin: 0; font-size: 16px; font-weight: 800; }
.einst__karte--gefahr { border-color: var(--t-rot-rand); }
.einst__karte--gefahr h3 { color: var(--t-rot-text); }
.einst__felder { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.einst__felder .feld { min-width: 0; }
.einst__breit { grid-column: 1 / -1; }
.einst__knoepfe { display: flex; flex-wrap: wrap; gap: 6px; }
.einst__wahl { min-height: 44px; padding: 0 16px; border: 0; border-radius: 22px; background: transparent; color: var(--t-text2); box-shadow: inset 0 0 0 1px var(--t-rand); font-weight: 700; }
.einst__wahl--an { background: var(--t-text); color: var(--t-grund); box-shadow: none; }
.einst__beispiel { color: #8fe0b5; font-weight: 700; }
.einst__reihe { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.einst__gross { min-height: 54px; padding: 0 18px; font-weight: 800; }
.einst__bon { width: 300px; max-width: 100%; }
@media (max-width: 760px) {
  .einst { flex-direction: column; }
  .einst__nav { width: auto; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--t-linie2); }
  .einst__navknopf { flex: none; min-height: 44px; }
}

/* Bon-Vorschau wie Bestell (bon-zeilen.js): gleiche Zeichen je Zeile wie der Drucker */
.bon-vorschau .bonz { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: calc(272px / (var(--bon-zeichen, 42) * 0.6)); line-height: 1.25; color: #111; }
.bon-vorschau .bonz__z { white-space: pre; overflow: hidden; }
.bon-vorschau .bonz__mitte { text-align: center; white-space: pre-wrap; }
.bon-vorschau .bonz__fett { font-weight: 700; }
.bon-vorschau .bonz__gross { font-size: 2em; line-height: 1.15; white-space: pre-wrap; }
.bon-vorschau .bonz__hoch { transform: scaleY(2); transform-origin: top; margin-bottom: 1.25em; }
.bon-vorschau .bonz__strich { border-top: 1.5px solid #111; margin: .45em 0; }
.bon-vorschau .bonz__strich--dick { border-top-width: 3px; }
.bon-vorschau .bonz__strich--gestrichelt { border-top-style: dashed; }
.bon-vorschau .bonz__strich--punkte { border-top-style: dotted; border-top-width: 2px; }
.bon-vorschau .bonz__strich--doppelt { border-top: 3px double #111; }

/* Einstellungen -> Bon: Stationen wie Bestell (Dong 20.11.2026) */
.stationen { display: grid; gap: 8px; justify-items: start; }
.stationen__zeile { display: grid; grid-template-columns: 28px minmax(0, 260px) 48px 48px 48px; gap: 6px; align-items: center; max-width: 100%; }
.stationen__zeile .knopf { min-width: 0; padding: 0; }
.stationen__nr { font-weight: 800; color: var(--text-leise, var(--t-leise)); text-align: center; }
.stationen__name { min-height: 40px; }
/* Artikelgruppen: Station klein neben dem Namen */
.sk-station { margin-left: auto; padding: 1px 7px; border-radius: 8px; background: color-mix(in srgb, var(--t-text) 12%, transparent); font-size: 11px; font-weight: 700; white-space: nowrap; }
.sk-station + .sk-zahl { margin-left: 6px; }

/* Extras pflegen (Menü → Extras) und Auswahl am Artikel (Dong 20.11.2026, wie Bestell) */
.extras-preis { text-align: right; font-variant-numeric: tabular-nums; }
/* Einstellungen -> Bon: Zwischentitel und − / + für Leerzeilen */
.einst__zwischentitel { margin-top: 10px; }
.einst__stufen { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.einst__stufen .einst__wahl { width: 48px; padding: 0; font-size: 20px; }
.einst__stufen output { min-width: 28px; text-align: center; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.einst__stufen .einst__wahl:disabled { opacity: .35; }

/* Speisekarte wie Bestell (Dong 20.11.2026): Formular in zwei Spalten, Häkchen, Extras als Karten */
.sk-formular { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 14px; margin-bottom: 12px; }
.sk-formular .voll { grid-column: 1 / -1; }
.sk-formular .feld { flex: none; }
.sk-formular .feld small { font-size: 12px; color: var(--grau-500); }
.sk-wahl { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.sk-haken { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 14px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--rand); font-weight: 700; font-size: 14px; cursor: pointer; }
.sk-haken input { width: 20px; height: 20px; margin: 0; accent-color: var(--t-gruen); }
.sk-haken.geerbt { opacity: .75; cursor: default; }
.sk-haken i { font-style: normal; font-size: 12px; color: var(--grau-500); font-weight: 700; }
.sk-editor > .abschnitt + .abschnitt { margin-top: 0; }
.sk--extras { display: block; overflow-y: auto; }
.ex-raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 14px; align-items: start; }
.ex-karte { display: grid; gap: 12px; margin-bottom: 0; }
.ex-karte > * { margin: 0; }
.ex-kopf { display: flex; align-items: center; gap: 10px; }
.ex-kopf h2 { margin: 0; font-size: 18px; }
.ex-zeilen { display: grid; gap: 6px; }
.ex-zeile { display: grid; grid-template-columns: minmax(0, 1fr) auto 88px 42px 42px 42px; gap: 6px; align-items: center; }
.ex-zeile--neu { grid-template-columns: minmax(0, 1fr) auto 88px auto; }
.ex-zeile input { min-height: 42px; width: 100%; min-width: 0; border-radius: 12px; border: 1px solid var(--rand); background: var(--feld); color: inherit; padding: 0 12px; font: inherit; }
.ex-zeile .knopf { min-width: 0; padding: 0 10px; }
.ex-plus { color: var(--grau-500); font-weight: 800; }
.ex-gilt { margin: 0; }
@media (max-width: 700px) { .sk-formular { grid-template-columns: 1fr; } }
.sk-kachelzeile { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.sk-kachelzeile .sk-farbwahl { flex: 1 1 260px; }


/* =====================================================================
   Farbtöne (Dong 21.11.2026): 5 Töne, wählbar im Menü (je Gerät).
   Alle Bildschirmfarben kommen aus diesen Variablen; Rechnung (Papier) und Bon bleiben weiß.
   Kontrast geprüft: Text mind. 4,5 : 1, auch Hinweis-Text (--t-leise) und Knöpfe mit weißer Schrift.
   ===================================================================== */
:root {
  --t-schema: dark;
  --t-grund: #15181d; --t-karte: #1b1f26; --t-kachel: #1f242c; --t-feld: #232831; --t-flaeche2: #2a3039;
  --t-knopf: #2b313b; --t-linie2: #2f353f; --t-rand: #343a44; --t-linie: #3a414c;
  --t-text: #e4e6ea; --t-text2: #c9cdd4; --t-leise: #9aa3b0; --t-platz: #7b8490;
  --t-akzent: #e8712a; --t-akzent-voll: #c2540f; --t-akzent-text: #f39a5f;
  --t-gruen: #23824f;
  --t-rot-text: #f4a3a3; --t-rot-rand: #5a2f30; --t-rot-flaeche: #3a2222;
  --t-gf-anteil: 100%;
}
:root[data-thema="graphit"] {
  --t-schema: dark;
  --t-grund: #2a2f38; --t-karte: #333943; --t-kachel: #39404b; --t-feld: #3d4450; --t-flaeche2: #434a57;
  --t-knopf: #4a5260; --t-linie2: #4e5664; --t-rand: #566070; --t-linie: #5e6878;
  --t-text: #f1f3f6; --t-text2: #d6dbe2; --t-leise: #b5bdc9; --t-platz: #95a0ae;
  --t-akzent: #f0843f; --t-akzent-voll: #c2540f; --t-akzent-text: #f6a874;
  --t-gruen: #23824f;
}
:root[data-thema="hell"] {
  --t-schema: light;
  --t-rot-text: #b42318; --t-rot-rand: #efb4b0; --t-rot-flaeche: #fdecea;
  --t-gf-anteil: 45%;
  --t-grund: #eef0f3; --t-karte: #ffffff; --t-kachel: #ffffff; --t-feld: #f6f7f9; --t-flaeche2: #e8ebef;
  --t-knopf: #e3e6eb; --t-linie2: #dde1e6; --t-rand: #cfd4db; --t-linie: #c3c9d1;
  --t-text: #1b1f26; --t-text2: #3a414c; --t-leise: #555e6b; --t-platz: #8a929e;
  --t-akzent: #e8712a; --t-akzent-voll: #c2540f; --t-akzent-text: #a3430a;
  --t-gruen: #1f7a49;
}
:root[data-thema="creme"] {
  --t-schema: light;
  --t-rot-text: #b42318; --t-rot-rand: #efb4b0; --t-rot-flaeche: #fdecea;
  --t-gf-anteil: 45%;
  --t-grund: #f3efe8; --t-karte: #fffdf9; --t-kachel: #fffaf2; --t-feld: #faf6ef; --t-flaeche2: #ece5d9;
  --t-knopf: #e7dfd1; --t-linie2: #e1d8c8; --t-rand: #d4c9b6; --t-linie: #c8bba5;
  --t-text: #2a2420; --t-text2: #4a4038; --t-leise: #62574c; --t-platz: #968a7d;
  --t-akzent: #d9662a; --t-akzent-voll: #b84d0c; --t-akzent-text: #973d08;
  --t-gruen: #1f7a49;
}
:root[data-thema="blau"] {
  --t-schema: light;
  --t-rot-text: #b42318; --t-rot-rand: #efb4b0; --t-rot-flaeche: #fdecea;
  --t-gf-anteil: 45%;
  --t-grund: #e8eef6; --t-karte: #ffffff; --t-kachel: #f7faff; --t-feld: #f3f7fc; --t-flaeche2: #dfe7f2;
  --t-knopf: #d9e2ee; --t-linie2: #d3dceb; --t-rand: #c2cee0; --t-linie: #b4c2d8;
  --t-text: #14213a; --t-text2: #2f3f5c; --t-leise: #4b5a75; --t-platz: #8391a8;
  --t-akzent: #e8712a; --t-akzent-voll: #c2540f; --t-akzent-text: #a3430a;
  --t-gruen: #1f7a49;
}
:root { --orange: var(--t-akzent-voll); --orange-hell: var(--t-gruen); --orange-dunkel: var(--t-akzent-text); --gut: var(--t-gruen); }
/* Menü: Farbton wählen (je Gerät) */
.menue-farben { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 4px 0 6px; }
.menue-farbe { display: grid; justify-items: center; gap: 6px; padding: 8px 4px; border: 0; border-radius: 12px; background: transparent; color: var(--t-text); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.menue-farbe:hover { background: var(--t-feld); }
.menue-farbe__muster { width: 44px; height: 44px; border-radius: 12px; box-shadow: none; outline: 1px solid var(--t-rand); }
.menue-farbe--an { background: var(--t-feld); }
.menue-farbe--an .menue-farbe__muster { outline: 3px solid var(--t-akzent); outline-offset: 2px; }
@media (max-width: 420px) { .menue-farben { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sk-station-anlegen { justify-self: start; margin-top: 4px; }

/* Kassenkopf kompakt, Variante A (Dong 21.11.2026): gleicher Aufbau, Knöpfe nur so breit wie ihr Text
   (keine über die ganze Breite gezogenen Knöpfe). Höhe ca. 200 px statt 290 px. Handy bleibt wie es ist. */
@media (min-width: 701px) {
  #ansicht-kasse .artikelflaeche__kopf { min-height: 0; padding: 9px 10px 7px; gap: 8px; }
  #ansicht-kasse .artikelflaeche__suche input { min-height: 48px; }
  #ansicht-kasse .bereichschalter { padding: 4px; gap: 4px; }
  #ansicht-kasse .bereichknopf { min-height: 42px; padding: 0 20px; font-size: 16px; }
  #ansicht-kasse .ich-knopf { min-height: 48px; padding: 3px 4px 3px 12px; }
  #ansicht-kasse .ich-knopf__bild { width: 36px; height: 36px; }
  #ansicht-kasse .gruppenleiste { gap: 5px; padding: 8px 8px; }
  #ansicht-kasse .gruppenknopf { flex: 0 0 auto; min-height: 52px; padding: 0 10px; font-size: 14px; gap: 6px; }
  #ansicht-kasse .gruppenleiste--unter { padding-top: 2px; padding-bottom: 10px; }
  #ansicht-kasse .gruppenleiste--unter .gruppenknopf { min-height: 46px; padding: 0 11px; font-size: 13.5px; font-weight: 600; }
}

/* Größe der ganzen Oberfläche 70–180 % (Dong 21.11.2026). body wird gezoomt (height: 100 %
   rechnet der Browser selbst um, die App füllt weiter genau den Bildschirm). */
body { zoom: var(--ui-zoom, 1); }
body.ohne-zoom { zoom: 1; }
.menue-groesse { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 12px; margin: 0 0 6px; border-radius: 12px; background: var(--t-feld); }
.menue-groesse__titel { flex: 1 0 100%; font-weight: 700; color: var(--t-text2); font-size: 13px; }
.menue-groesse__knopf { width: 44px; height: 44px; border: 0; border-radius: 10px; background: var(--t-knopf); color: var(--t-text); font-size: 22px; font-weight: 800; line-height: 1; }
.menue-groesse__knopf:disabled { opacity: .4; cursor: default; }
.menue-groesse__regler { flex: 1; min-width: 120px; accent-color: var(--t-akzent); height: 32px; }
.menue-groesse__wert { min-width: 56px; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.menue-groesse__zurueck { min-height: 44px; }
.menue-groesse__auto { flex: 1 0 100%; min-height: 44px; }
.menue-groesse__hinweis { flex: 1 0 100%; color: var(--t-leise); font-size: 12.5px; }
.menue-zeit__knoepfe { flex: 1 0 100%; }
/* Gruppenknöpfe füllen die Zeile bis rechts aus (Dong 21.11.2026) – Tablet und Handy.
   Am Handy bleibt die Wischzeile: passen nicht alle hinein, wird seitlich gewischt. */
#ansicht-kasse .gruppenleiste .gruppenknopf { flex: 1 0 auto; }

/* ============ iPhone-Korrekturen (Dong 23.11.2026) ============ */
/* Doppeltippen zoomt nicht mehr (Antippen bleibt sofort), Schrift wird nicht von Safari vergrößert */
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* Listen ohne eigenen Scroll-Bereich: Kassenbericht-Kategorien, Benutzer */
#kbk-liste, #benutzer-liste { overflow-y: auto; -webkit-overflow-scrolling: touch; }
/* Kassenbericht: Einnahme- und Ausgabe-Kacheln scrollen */
#ansicht-kassenbericht .artikelflaeche { overflow-y: auto; -webkit-overflow-scrolling: touch; }

@media (max-width: 700px) {
  /* Eingabefelder mind. 16 px – sonst zoomt das iPhone beim Antippen hinein und Knöpfe rutschen aus dem Bild */
  input, select, textarea { font-size: max(16px, 1em); }
  /* „Zurück“ überflüssig, wo unten die Handy-Leiste ist – Platz für die Knöpfe rechts */
  #ansicht-heute .kopf-zurueck, #ansicht-uebersicht .kopf-zurueck, #ansicht-kassenbericht .kopf-zurueck { display: none; }
  .kopf, .kopf--schlicht { padding: 0 8px; gap: 6px; }
  .kopf__rechts { margin-left: auto; min-width: 0; }
  .kopf-tab { padding: 0 10px; }
  .kb-datumnav { gap: 4px; }
  .kb-datumnav input[type="date"] { width: 9.5em; padding: 0 6px; }
}

/* ===== iPhone, Entwurf A (Dong 23.11.2026): Kassenbericht wie die Kasse – Kategorien über die ganze
   Breite, Bericht als Leiste unten, „Bericht ▴“ klappt Buchungen, Summen und Knöpfe auf ===== */
.kb-leiste { display: none; }
@media (max-width: 700px) {
  #ansicht-kassenbericht .kasse { flex-direction: column; }
  #ansicht-kassenbericht .artikelflaeche { flex: 1; padding-bottom: 92px; }
  #ansicht-kassenbericht .kachelgitter { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 4px 10px 8px; }
  #ansicht-kassenbericht .kachel { min-height: 64px; }
  #ansicht-kassenbericht .beleg {
    position: fixed; left: 8px; right: 8px; bottom: calc(var(--handy-nav) + 8px); z-index: 20;
    flex: none; width: auto; max-width: none; max-height: 66px; overflow: hidden;
    border: 0; border-radius: 16px; box-shadow: 0 8px 26px rgba(0, 0, 0, .55); transition: max-height .25s ease;
  }
  #ansicht-kassenbericht .beleg--aktiv { box-shadow: 0 0 0 2px var(--t-gruen), 0 8px 26px rgba(0, 0, 0, .55); }
  #ansicht-kassenbericht .beleg--offen { max-height: calc(100% - var(--handy-nav) - 70px); overflow-y: auto; }
  .kb-leiste { display: flex; align-items: center; gap: 10px; min-height: 66px; padding: 10px 10px 10px 14px; flex: none; }
  .kb-leiste__text { flex: 1; min-width: 0; display: grid; }
  .kb-leiste__text strong { font-size: 16px; font-variant-numeric: tabular-nums; }
  .kb-leiste__text small { color: var(--t-leise); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .kb-leiste__knopf { flex: none; min-height: 44px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--t-gruen); color: #fff; font-weight: 800; }
  .kb-leiste__knopf--neu { background: var(--t-akzent-voll); }
  #ansicht-kassenbericht .beleg__positionen { flex: none; overflow: visible; }
  #ansicht-kassenbericht .position { grid-template-columns: 1fr auto; padding: 9px 12px; }
  #ansicht-kassenbericht .position__name, #ansicht-kassenbericht .position__summe { font-size: 14px; }
  #ansicht-kassenbericht .beleg__summe-zeile--klein { font-size: 12.5px; }
  #ansicht-kassenbericht .beleg__summe-zeile--gross { font-size: 20px; }
  #ansicht-kassenbericht .beleg__aktionen .knopf { min-height: 48px; font-size: 14px; }
}

/* ===== iPhone, Entwurf C (Dong 23.11.2026): Kunden, Benutzer, Kategorien – erst Liste über den
   ganzen Bildschirm, Antippen öffnet das Formular als eigene Seite („← Liste“ zurück) ===== */
.verwaltung__zurueck { display: none; }
@media (max-width: 700px) {
  .verwaltung .verwaltung__liste { flex: 1 1 auto; border-bottom: 0; }
  .verwaltung .verwaltung__form { display: none; padding: 12px 14px 24px; }
  .verwaltung--detail .verwaltung__liste { display: none; }
  .verwaltung--detail .verwaltung__form { display: block; flex: 1; }
  .verwaltung--detail .verwaltung__zurueck {
    display: flex; align-items: center; flex: none; min-height: 48px; margin: 0; padding: 0 14px;
    border: 0; border-bottom: 1px solid var(--t-linie2); background: var(--t-karte); color: var(--t-text); font-weight: 800; font-size: 15px; text-align: left;
  }
  .verwaltung .eintrag { min-height: 56px; }
}

/* Artikel-Kachel: PLU links und Preis rechts in einer Zeile, Name darunter (Dong 23.11.2026) */
.kachel { justify-content: flex-start; }
.kachel__kopf { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.kachel__kopf .kachel__preis { margin: 0 0 0 auto; white-space: nowrap; }
.kachel__kopf .kachel__nr { flex: none; }
/* Preis in Gruppenfarbe, etwas größer (Dong 23.11.2026, Entwurf A).
   Schrift = Gruppenfarbe gemischt mit der Textfarbe: auf dunklem Thema hell, auf hellem Thema dunkel. */
.kachel__kopf .kachel__preis {
  font-weight: 800; font-size: calc(var(--kachel-schrift, 15px) + 2.5px);
  color: color-mix(in srgb, var(--gf, var(--t-leise)) 75%, var(--t-text));
}
@media (max-width: 700px) {
  #ansicht-kasse .kachel__kopf .kachel__preis { font-size: calc(var(--kachel-schrift, 13.5px) + 3px); }
}
:root[data-thema="hell"] .kachel__kopf .kachel__preis,
:root[data-thema="creme"] .kachel__kopf .kachel__preis,
:root[data-thema="blau"] .kachel__kopf .kachel__preis { color: color-mix(in srgb, var(--gf, var(--t-leise)) 50%, var(--t-text)); }
