/* Vereinskasse – ein Stylesheet für Verwaltung und Geräte. */
:root {
  --bg: #f3f4f5;
  --flaeche: #ffffff;
  --flaeche-2: #eceef0;
  --text: #1f2226;
  --leise: #646a71;
  --linie: #d8dbdf;
  --primaer: #4b5056;
  --primaer-text: #ffffff;
  --primaer-hell: #e4e6e9;
  --gefahr: #b3261e;
  --gefahr-hell: #fbe9e7;
  --warn-hell: #fff4d6;
  --ok: #1f7a3d;
  --radius: 10px;
  --schatten: 0 1px 2px rgba(0, 0, 0, .06), 0 2px 8px rgba(0, 0, 0, .04);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151719;
    --flaeche: #1e2124;
    --flaeche-2: #272a2e;
    --text: #e8eaec;
    --leise: #9ea3a9;
    --linie: #363a3f;
    --primaer: #b9bec4;
    --primaer-text: #16181a;
    --primaer-hell: #33373c;
    --gefahr: #f2867d;
    --gefahr-hell: #3a1f1d;
    --warn-hell: #3a3220;
    --ok: #6fcf8f;
    --schatten: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--primaer); }
h1 { font-size: 1.6rem; margin: 0 0 1rem; }
h2 { font-size: 1.15rem; margin: 0 0 .75rem; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .95em; }
.leise { color: var(--leise); }
.klein { font-size: .85rem; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------- Bausteine */
.karte {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  margin-bottom: 1rem;
  box-shadow: var(--schatten);
}
.karte.schmal { max-width: 420px; margin: 8vh auto; }
.karte-kopf { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
.karte-kopf h2 { margin: 0; }

.knopf {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: .45rem .95rem;
  border: 1px solid var(--linie); border-radius: 8px;
  background: var(--flaeche-2); color: var(--text);
  font: inherit; font-weight: 500; text-decoration: none; cursor: pointer;
  white-space: nowrap;
}
.knopf:hover { filter: brightness(.97); }
.knopf.primaer { background: var(--primaer); border-color: var(--primaer); color: var(--primaer-text); }
.knopf.gefahr { color: var(--gefahr); border-color: var(--gefahr); background: transparent; }
.knopf.klein { min-height: 32px; padding: .25rem .6rem; font-size: .88rem; }
.knopf.gross { min-height: 56px; font-size: 1.1rem; }
.knopf.breit { width: 100%; }
.knopf:disabled { opacity: .45; cursor: default; }
.link-knopf { background: none; border: 0; padding: .3rem 0; color: var(--primaer); font: inherit; cursor: pointer; text-decoration: underline; }

.meldung { padding: .7rem 1rem; border-radius: 8px; margin-bottom: 1rem; border: 1px solid transparent; }
.meldung-ok { background: var(--primaer-hell); border-color: var(--primaer); }
.meldung-fehler { background: var(--gefahr-hell); border-color: var(--gefahr); }
.meldung-info { background: var(--warn-hell); border-color: #d8b54a; }

.status { display: inline-block; padding: .1rem .55rem; border-radius: 99px; font-size: .8rem; font-weight: 600; vertical-align: middle; }
.status-aktiv { background: var(--primaer-hell); color: var(--primaer); }
.status-vorbereitung { background: var(--warn-hell); color: #8a6a00; }
.status-abgeschlossen { background: var(--flaeche-2); color: var(--leise); }
@media (prefers-color-scheme: dark) { .status-vorbereitung { color: #e6c35c; } }

/* ---------------------------------------------------------- Formulare */
.formular { display: grid; gap: .8rem; }
.formular > .knopf { justify-self: start; }
.tabelle code { white-space: nowrap; }
.formular.reihe { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .8rem; }
.formular label { display: grid; gap: .25rem; font-weight: 500; font-size: .92rem; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--flaeche);
  border: 1px solid var(--linie); border-radius: 8px;
  padding: .5rem .65rem; min-height: 40px; width: 100%;
}
.formular.reihe label { flex: 1 1 180px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primaer); outline-offset: 0; border-color: var(--primaer); }
input.kurz { width: 7rem; }
.code-eingabe { font-family: ui-monospace, Menlo, monospace; font-size: 1.3rem; letter-spacing: .12em; text-transform: uppercase; text-align: center; }
fieldset.auswahl { border: 1px solid var(--linie); border-radius: 8px; padding: .6rem .9rem; display: grid; gap: .35rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
fieldset.auswahl legend { font-weight: 600; padding: 0 .3rem; }
label.haken { display: flex !important; align-items: center; gap: .5rem; font-weight: 400 !important; }
label.haken input { width: auto; min-height: 0; }

/* ---------------------------------------------------------- Tabellen */
.tabelle-rahmen { overflow-x: auto; margin: 0 -.2rem; }
.tabelle { width: 100%; border-collapse: collapse; }
.tabelle th, .tabelle td { text-align: left; padding: .5rem .55rem; border-bottom: 1px solid var(--linie); vertical-align: middle; }
.tabelle th { font-size: .82rem; color: var(--leise); font-weight: 600; }
.tabelle tfoot th { color: var(--text); font-size: .95rem; border-bottom: 0; }
.tabelle .zahl { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabelle td input, .tabelle td select { min-height: 34px; padding: .3rem .5rem; }
.tabelle tr.gesperrt td { opacity: .55; }
.aktionen { white-space: nowrap; text-align: right; }
.aktionen form { display: inline; }
.aktionen > * { margin-left: .25rem; }

/* ---------------------------------------------------------- Admin-Rahmen (Seitenleiste) */
:root {
  --sl-bg: #2e3134;
  --sl-text: #d9dcdf;
  --sl-leise: #9a9fa5;
  --sl-linie: #43474c;
  --sl-hover: #393d41;
  --sl-akzent: #5b6168;
  --sl-aktiv: #4b5056;
  --sl-breite: 264px;
}
.rahmen { min-height: 100vh; min-height: 100dvh; }
.seitenleiste {
  position: fixed; inset: 0 auto 0 0; z-index: 40; width: var(--sl-breite);
  display: flex; flex-direction: column; gap: .9rem;
  padding: 1.1rem .9rem calc(.9rem + env(safe-area-inset-bottom));
  background: var(--sl-bg); color: var(--sl-text);
  border-right: 3px solid var(--sl-akzent);
  overflow-y: auto; overscroll-behavior: contain;
}
.seitenleiste .icon { width: 22px; height: 22px; flex: 0 0 auto; }
.sl-marke-zeile { display: flex; align-items: center; gap: .5rem; padding: 0 .3rem 1rem; border-bottom: 1px solid var(--sl-linie); }
.sl-marke { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: #fff; min-width: 0; flex: 1; }
.sl-marke img { border-radius: 6px; flex: 0 0 auto; }
.sl-marke span { display: grid; line-height: 1.15; }
.sl-marke strong { font-size: 1.2rem; font-weight: 700; }
.sl-marke small { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--sl-leise); }
.sl-zu { display: none; background: none; border: 0; color: var(--sl-text); padding: .3rem; cursor: pointer; border-radius: 6px; }

.seitenleiste .veranstaltung-wahl { display: grid; gap: .35rem; padding: 0 .3rem; }
.seitenleiste .veranstaltung-wahl label { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--sl-leise); display: flex; align-items: center; gap: .4rem; }
.seitenleiste .veranstaltung-wahl label .status { letter-spacing: 0; text-transform: none; font-size: .7rem; }
.seitenleiste .veranstaltung-wahl select { min-height: 38px; padding: .3rem .5rem; background: var(--sl-hover); color: #fff; border-color: var(--sl-linie); font-size: .9rem; }

.sl-nav { display: grid; gap: .25rem; }
.sl-nav a {
  display: flex; align-items: center; gap: .85rem;
  padding: .75rem .9rem; border-radius: 10px;
  color: var(--sl-text); text-decoration: none; font-weight: 600; font-size: .98rem;
  transition: background .12s, color .12s;
}
.sl-nav a .icon { color: var(--sl-leise); transition: color .12s; }
.sl-nav a:hover { background: var(--sl-hover); color: #fff; }
.sl-nav a:hover .icon { color: #fff; }
.sl-nav a.aktiv { background: var(--sl-aktiv); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.sl-nav a.aktiv .icon { color: #fff; }
.sl-nav a:focus-visible, .sl-installieren:focus-visible, .sl-abmelden:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.sl-abschnitt { margin: 1.1rem .9rem .35rem; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--sl-leise); }

.sl-installieren {
  display: flex; align-items: center; gap: .75rem; width: 100%;
  margin-top: .4rem; padding: .85rem .9rem; border-radius: 10px;
  background: var(--sl-hover); border: 1px solid var(--sl-linie); color: #fff;
  font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer; text-align: left;
}
.sl-installieren .icon { color: var(--sl-text); }
.sl-installieren:hover { background: var(--sl-aktiv); border-color: var(--sl-akzent); }

.sl-benutzer { margin-top: auto; display: flex; align-items: center; gap: .7rem; padding: 1rem .3rem 0; border-top: 1px solid var(--sl-linie); }
.avatar { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--sl-aktiv); color: #fff; font-weight: 700; font-size: .9rem; }
.sl-benutzer-text { display: grid; min-width: 0; flex: 1; line-height: 1.25; }
.sl-benutzer-text strong { color: #fff; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sl-benutzer-text small { color: var(--sl-leise); font-size: .8rem; }
.sl-abmelden { color: #fff; padding: .4rem; border-radius: 8px; display: flex; }
.sl-abmelden:hover { background: var(--sl-hover); }

.hauptbereich { margin-left: var(--sl-breite); min-width: 0; }
.mobil-kopf { display: none; }
.sl-schleier { display: none; }
.inhalt { max-width: 1600px; margin: 0 auto; padding: 1.6rem clamp(1rem, 2.5vw, 2.5rem) 3rem; }
.fuss { text-align: center; color: var(--leise); font-size: .82rem; padding: 1rem; }

/* Schmale Schirme: Seitenleiste als ausklappbares Menü */
@media (max-width: 960px) {
  .hauptbereich { margin-left: 0; }
  .seitenleiste { transform: translateX(-105%); transition: transform .22s ease; width: min(var(--sl-breite), 86vw); box-shadow: 8px 0 30px rgba(0, 0, 0, .35); }
  body.menue-offen .seitenleiste { transform: none; }
  body.menue-offen { overflow: hidden; }
  .sl-zu { display: flex; }
  .sl-schleier { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0, 0, 0, .45); opacity: 0; pointer-events: none; transition: opacity .2s; }
  body.menue-offen .sl-schleier { opacity: 1; pointer-events: auto; }
  .mobil-kopf {
    position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: .6rem;
    padding: .5rem 1rem; padding-top: max(.5rem, env(safe-area-inset-top));
    background: var(--sl-bg); border-bottom: 3px solid var(--sl-akzent);
  }
  .mobil-kopf .sl-marke strong { font-size: 1.05rem; }
  .mobil-menue { display: flex; background: none; border: 0; color: #fff; padding: .35rem; margin-left: -.35rem; cursor: pointer; border-radius: 8px; }
  .mobil-menue .icon { width: 26px; height: 26px; }
}
@media (prefers-reduced-motion: reduce) { .seitenleiste, .sl-schleier { transition: none; } }

.kennzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.kennzahl { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 1rem 1.2rem; display: grid; gap: .1rem; box-shadow: var(--schatten); }
.kennzahl span { color: var(--leise); font-size: .88rem; }
.kennzahl strong { font-size: 1.7rem; font-variant-numeric: tabular-nums; }
.kennzahl small { color: var(--leise); }
.spalten { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; align-items: start; }
.liste { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.liste li { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.punkt { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.punkt.gruen { background: var(--ok); } .punkt.grau { background: var(--linie); } .punkt.rot { background: var(--gefahr); }
.schritte { margin: 0; padding-left: 1.3rem; display: grid; gap: .3rem; }
.schritte li.erledigt a { color: var(--leise); text-decoration: line-through; }

/* ---------------------------------------------------------- QR-Druck */
.qr-seite { background: #fff; color: #000; }
.qr-werkzeug { max-width: 1000px; margin: 1rem auto; padding: 0 1rem; display: flex; gap: .6rem; flex-wrap: wrap; }
.qr-werkzeug .meldung { flex-basis: 100%; color: #000; }
.qr-raster { max-width: 1000px; margin: 0 auto; padding: 0 1rem 2rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.qr-karte { border: 2px dashed #999; border-radius: 12px; padding: 1rem; text-align: center; break-inside: avoid; page-break-inside: avoid; }
.qr-karte h2 { margin: 0 0 .2rem; font-size: 1.3rem; }
.qr-karte p { margin: .2rem 0; }
.qr { width: 220px; height: 220px; margin: .6rem auto; }
.qr svg { width: 100%; height: 100%; display: block; }
.qr-code { font-family: ui-monospace, Menlo, monospace; font-size: 1.4rem; letter-spacing: .1em; font-weight: 700; }
.qr-link { word-break: break-all; }
@media print {
  .nicht-drucken { display: none !important; }
  .qr-raster { grid-template-columns: repeat(2, 1fr); padding: 0; }
  body { background: #fff; }
}

/* ---------------------------------------------------------- Geräte */
body.geraet { min-height: 100vh; min-height: 100dvh; }
.geraet-kopf {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: .6rem;
  padding: .55rem 1rem; padding-top: max(.55rem, env(safe-area-inset-top));
  background: var(--primaer); color: var(--primaer-text);
}
.geraet-titel { display: grid; line-height: 1.2; flex: 1; min-width: 0; }
.geraet-titel strong { font-size: 1.1rem; }
.geraet-titel span { font-size: .8rem; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.geraet-kopf .zurueck { color: inherit; text-decoration: none; font-size: 2rem; line-height: 1; padding: 0 .3rem; }
.geraet-kopf .version { font-size: .75rem; opacity: .75; }
.geraet-inhalt { padding: 1rem; max-width: 900px; margin: 0 auto; }
.start-wahl { display: grid; gap: 1rem; padding-top: 2rem; }
.gross-knopf {
  display: flex; align-items: center; justify-content: center; min-height: 90px; padding: 1rem;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: 14px;
  color: var(--text); font: inherit; font-size: 1.3rem; font-weight: 600; text-decoration: none; cursor: pointer;
  box-shadow: var(--schatten);
}
.leer { text-align: center; color: var(--leise); padding: 3rem 1rem; }

.artikel-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; }
.artikel-knopf {
  position: relative; min-height: 84px; padding: .6rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem;
  background: var(--flaeche); color: var(--text);
  border: 1px solid var(--linie); border-radius: 12px; box-shadow: var(--schatten);
  font: inherit; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none;
  transition: transform .06s;
}
.artikel-knopf:active { transform: scale(.97); }
.artikel-knopf.im-bon { border-color: var(--primaer); background: var(--primaer-hell); }
.artikel-knopf.aus { opacity: .45; }
.artikel-name { font-weight: 600; text-align: center; line-height: 1.2; }
.artikel-preis { color: var(--leise); font-size: .9rem; font-variant-numeric: tabular-nums; }
.artikel-menge {
  position: absolute; top: -8px; right: -6px; min-width: 26px; height: 26px; padding: 0 6px;
  border-radius: 13px; background: var(--primaer); color: var(--primaer-text);
  font-weight: 700; font-size: .9rem; display: flex; align-items: center; justify-content: center;
}
.artikel-knopf.blitz { animation: blitz .35s; }
@keyframes blitz { 0% { background: var(--primaer); } 100% { background: var(--flaeche); } }

.toast {
  position: fixed; left: 50%; bottom: calc(1rem + env(safe-area-inset-bottom)); transform: translate(-50%, 150%);
  max-width: calc(100% - 2rem); padding: .75rem 1.1rem; border-radius: 10px;
  background: var(--text); color: var(--bg); font-weight: 500; z-index: 50;
  transition: transform .2s; pointer-events: none;
}
.toast.sichtbar { transform: translate(-50%, 0); }
.toast.ok { background: var(--ok); color: #fff; }
.toast.fehler { background: var(--gefahr); color: #fff; }

/* Kasse: Handy = Artikel oben, Bon als Leiste unten zum Aufklappen. Tablet = zwei Spalten. */
.kasse { display: block; }
.kasse-artikel { padding: 1rem 1rem 7rem; }
.gruppe-titel { font-size: .9rem; text-transform: uppercase; letter-spacing: .05em; color: var(--leise); margin: 1.1rem 0 .5rem; }
.gruppe-titel:first-child { margin-top: 0; }
.kasse-umsatz { margin-top: 1.5rem; font-size: .88rem; color: var(--leise); line-height: 1.7; }
.kasse-umsatz strong { color: var(--text); }
.kasse-umsatz .link-knopf { display: block; font-size: .88rem; }

.kasse-bon {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--flaeche); border-top: 1px solid var(--linie);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, .12);
  padding-bottom: env(safe-area-inset-bottom);
  max-height: 88vh; max-height: 88dvh; display: flex; flex-direction: column;
}
.bon-griff {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  width: 100%; padding: 1rem 1.1rem; border: 0; background: none; color: var(--text);
  font: inherit; font-size: 1.05rem; cursor: pointer;
}
.bon-griff strong { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.kasse.hat-bon .bon-griff { background: var(--primaer); color: var(--primaer-text); }
.bon-hinweis { opacity: .8; margin-left: .4rem; font-size: .82rem; }
.kasse:not(.hat-bon) .bon-hinweis { display: none; }
.bon-inhalt { display: none; overflow-y: auto; padding: 0 1.1rem 1rem; }
.kasse.bon-offen .bon-inhalt { display: block; }
.bon-zeilen { list-style: none; margin: .5rem 0; padding: 0; }
.bon-zeilen li { display: grid; grid-template-columns: 40px 2.6rem 40px 1fr auto; align-items: center; gap: .3rem; padding: .3rem 0; border-bottom: 1px solid var(--linie); }
.menge-knopf { width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--linie); background: var(--flaeche-2); color: var(--text); font-size: 1.3rem; cursor: pointer; touch-action: manipulation; }
.bon-menge { text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.bon-name { padding-left: .3rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bon-preis { font-variant-numeric: tabular-nums; text-align: right; }
.bon-summe, .rueckgeld { display: flex; justify-content: space-between; align-items: baseline; padding: .5rem 0; }
.bon-summe strong { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.bezahlen { border-top: 1px solid var(--linie); padding-top: .6rem; }
.bezahlen label { font-weight: 600; font-size: .9rem; }
.bezahlen label { display: block; }
/* Gegeben: Geldscheine, Passend und Freifeld */
.gegeben-kopf { display: flex; align-items: center; gap: .6rem; margin: .2rem 0 .5rem; }
.gegeben-kopf > span { font-weight: 600; font-size: .9rem; }
.gegeben-kopf strong { margin-left: auto; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.gegeben-zurueck { order: 3; border: 1px solid var(--linie); background: var(--flaeche-2); color: var(--text); border-radius: 99px; padding: .2rem .7rem; font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; }
.gegeben-kopf strong { order: 2; }
.stueck-zahl {
  position: absolute; top: -7px; right: -6px; z-index: 2; min-width: 26px; height: 24px; padding: 0 6px;
  border-radius: 12px; background: var(--text); color: var(--flaeche);
  font-size: .8rem; font-weight: 800; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px var(--flaeche);
}
.schein img { border-radius: 6px; }

/* Münzen: rund, Kupfer (1–5 ct), Nordisches Gold (10–50 ct), Bimetall (1 €, 2 €) */
.muenzen { display: grid; grid-template-columns: repeat(4, 1fr); gap: .45rem .6rem; margin-top: .6rem; justify-items: center; }
.muenze {
  --rand: #b7793f; --mitte: #b7793f; --hell: #e9b27a; --schrift: #4a2a0e;
  position: relative; width: 100%; max-width: 64px; aspect-ratio: 1; border-radius: 50%; padding: 0; cursor: pointer;
  border: 0; font: inherit; touch-action: manipulation; transition: transform .06s;
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
  color: var(--schrift);
  background:
    radial-gradient(circle at 50% 50%, var(--hell) 0 3%, var(--mitte) 58%, transparent 59%),
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .55), transparent 55%),
    radial-gradient(circle, var(--rand) 0 64%, var(--hell) 66%, var(--rand) 70%, var(--rand) 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .35), inset 0 -2px 3px rgba(0, 0, 0, .25), inset 0 2px 3px rgba(255, 255, 255, .4);
}
.muenze:active { transform: scale(.94); }
.muenze-wert { font-size: 1.15rem; font-weight: 800; text-shadow: 0 1px 0 rgba(255, 255, 255, .35); }
.muenze-einheit { font-size: .52rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.muenze-kupfer { --rand: #b46a3c; --mitte: #c47a48; --hell: #f0b48a; --schrift: #4b2310; }
.muenze-gold   { --rand: #c9a43a; --mitte: #d6b44c; --hell: #f6e39a; --schrift: #4d3b07; }
.muenze-euro1  { --rand: #d2b04a; --mitte: #c3c6c9; --hell: #f1f2f3; --schrift: #2c2f33; }
.muenze-euro2  { --rand: #c3c6c9; --mitte: #d2b04a; --hell: #f3e2a0; --schrift: #3b2e07; }
/* Kleinere Cent-Münzen etwas kleiner zeichnen, wie in echt */
.muenze[data-betrag="1"]  { max-width: 50px; }
.muenze[data-betrag="2"]  { max-width: 54px; }
.muenze[data-betrag="10"] { max-width: 56px; }
.muenze[data-betrag="5"]  { max-width: 58px; }
.muenze.gewaehlt { box-shadow: 0 0 0 3px var(--flaeche), 0 0 0 5px var(--text); }
.muenze:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }
.schnell { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; }
.schein, .passend-knopf {
  position: relative; border-radius: 6px; cursor: pointer; touch-action: manipulation;
  font: inherit; transition: transform .06s, box-shadow .12s;
}
.schein:active, .passend-knopf:active { transform: scale(.96); }
.schein {
  padding: 0; border: 0; background: #d9d4c4; aspect-ratio: 1.94;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 0 0 1px rgba(0, 0, 0, .12);
}
.schein img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; user-select: none; -webkit-user-select: none; }
.passend-knopf {
  min-height: 0; aspect-ratio: 1.94;
  border: 2px dashed var(--linie); background: var(--flaeche-2); color: var(--text); font-weight: 700;
}
.schein.gewaehlt, .passend-knopf.gewaehlt { box-shadow: 0 0 0 3px var(--flaeche), 0 0 0 6px var(--text); }
.passend-knopf.gewaehlt { border-style: solid; border-color: var(--text); }
.schein:focus-visible, .passend-knopf:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }
.freifeld { display: grid !important; gap: .25rem; margin-top: .55rem; font-weight: 600; font-size: .9rem; }
.freifeld-eingabe { position: relative; display: block; }
.freifeld-eingabe input { font-size: 1.25rem; text-align: right; min-height: 50px; padding-right: 2rem; font-weight: 600; }
.freifeld-eingabe span { position: absolute; right: .75rem; top: 50%; transform: translateY(-50%); color: var(--leise); font-weight: 600; pointer-events: none; }
.rueckgeld strong { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.rueckgeld.ok strong { color: var(--ok); }
.rueckgeld.zu-wenig strong { color: var(--gefahr); }
.bon-aktionen { display: grid; grid-template-columns: 1fr 2fr; gap: .6rem; margin-top: .6rem; }
.bon-aktionen .knopf { min-height: 56px; }

@media (min-width: 820px) {
  /* Zwei Spalten: Artikel links, Bon rechts. Bon-Breite passt sich an. */
  .kasse { display: grid; grid-template-columns: 1fr clamp(300px, 34%, 420px); align-items: start; }
  .kasse-artikel { padding-bottom: 2rem; }
  .kasse-bon { position: sticky; top: 56px; align-self: start; height: auto; max-height: calc(100dvh - 56px);
               border-top: 0; border-left: 1px solid var(--linie); box-shadow: none; }
  /* In der Verwaltung ist die Kopfzeile höher und scrollt mit: Bon etwas unterhalb des oberen Rands. */
  body.admin .kasse-bon { top: .75rem; max-height: calc(100dvh - 1.5rem); border: 1px solid var(--linie); border-radius: 12px; }
  .bon-griff { cursor: default; pointer-events: none; }
  .bon-hinweis { display: none; }
  .bon-inhalt { display: block; flex: 1 1 auto; min-height: 0; }
}

/* Sehr schmale Handys: kleinere Artikelkacheln, damit zwei nebeneinander passen. */
@media (max-width: 360px) {
  .artikel-raster { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .45rem; }
  .artikel-knopf { min-height: 74px; }
}

/* Große Bildschirme: mehr Artikelkacheln je Reihe. */
@media (min-width: 1200px) {
  .kasse-artikel .artikel-raster { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* Personalrabatt-Schalter im Bon über „Bar bezahlt“ */
.bon-inhalt .rabatt-knopf { margin: 0 0 .6rem; }

/* Strichliste */
.strich h2 { margin: 0; }
.leiste { display: flex; align-items: center; gap: 1rem; margin-bottom: .8rem; flex-wrap: wrap; }
.knopf-liste { display: grid; gap: .8rem; margin-top: 1rem; }
#suche { margin-bottom: .8rem; min-height: 46px; }
.namen-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.name-knopf {
  min-height: 72px; padding: .6rem; display: grid; gap: .15rem; align-content: center; text-align: center;
  background: var(--flaeche); color: var(--text); border: 1px solid var(--linie); border-radius: 12px;
  font: inherit; cursor: pointer; box-shadow: var(--schatten); touch-action: manipulation;
}
.name-knopf .name { font-weight: 600; font-size: 1.05rem; }
.name-knopf .info { font-size: .82rem; color: var(--leise); }
.name-neu { display: flex; gap: .5rem; margin-top: 1.2rem; }
.name-summe { font-size: 1.1rem; margin-bottom: .8rem; }
.name-summe strong { font-size: 1.5rem; margin-left: .4rem; }
#rueckgaengig { margin-top: 1.2rem; min-height: 52px; }

/* Anmeldung */
body.anmeldung { padding: 0 1rem; }

/* Art der Strichliste */
.modus-wahl { border: 1px solid var(--linie); border-radius: 8px; padding: .6rem .9rem; display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.modus-wahl legend { font-weight: 600; padding: 0 .3rem; }
.modus-wahl p { grid-column: 1 / -1; margin: 0; }
.modus-option { display: flex !important; gap: .6rem; align-items: flex-start; padding: .6rem .7rem; border: 1px solid var(--linie); border-radius: 8px; cursor: pointer; font-weight: 400 !important; }
.modus-option:has(input:checked) { border-color: var(--primaer); background: var(--primaer-hell); }
.modus-option input { width: auto; min-height: 0; margin-top: .2rem; }
.modus-option span { display: grid; gap: .15rem; }
.modus-option small { color: var(--leise); font-size: .85rem; line-height: 1.35; }

/* Aufgeklapptes Bearbeiten in der Benutzerliste */
.unterform { display: grid; gap: 1rem; padding: .3rem 0 .6rem; }
.unterform-reihe { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; }
.unterform-reihe form { display: flex; gap: .6rem; align-items: flex-end; }

/* Gesamt-Kachel bei Strichlisten "Nur Striche" (unten) */
.gesamt-kachel { display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  margin-top: 1.2rem; padding: 1rem 1.2rem; border-radius: 12px;
  background: var(--primaer-hell); border: 1px solid var(--primaer); }
.gesamt-kachel span { font-weight: 600; color: var(--primaer); }
.gesamt-kachel strong { font-size: 1.4rem; font-variant-numeric: tabular-nums; }
@media (prefers-color-scheme: dark) { .gesamt-kachel span { color: var(--text); } }

/* Personalrabatt-Button an der Kasse */
.rabatt-knopf { width: 100%; min-height: 48px; margin-bottom: .6rem; font-weight: 600; }
.rabatt-knopf.an { background: var(--primaer); border-color: var(--primaer); color: var(--primaer-text); }
.artikel-preis.rabattiert { color: var(--primaer); font-weight: 700; }
.kasse.rabatt-an .bon-griff { outline: 2px solid var(--primaer); outline-offset: -2px; }

/* Personalrabatt in der Artikel- und Umsatzübersicht */
.rabatt-spalte { color: var(--primaer); font-variant-numeric: tabular-nums; }

/* ---------- Bildschirmanpassung (alle Bereiche) ---------- */
/* Geräteoberfläche auf großen Schirmen breiter, mehr Kacheln je Reihe. */
@media (min-width: 1000px) {
  .geraet-inhalt { max-width: 1100px; }
  .namen-raster { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
}
/* Sehr schmale Handys: kleinere Namens- und Listenkacheln. */
@media (max-width: 360px) {
  .namen-raster { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .45rem; }
  .name-knopf { min-height: 64px; }
  .inhalt { padding-left: .8rem; padding-right: .8rem; }
}
/* Verwaltung: Kennzahlen und Spalten passen sich schon an; auf schmalen
   Schirmen Buttons in Aktionsspalten umbrechen lassen statt überlaufen. */
@media (max-width: 560px) {
  .aktionen { white-space: normal; }
  .aktionen > * { display: inline-block; margin: .15rem .15rem 0 0; }
  .karte { padding: .9rem 1rem; }
}

/* Sammelspeichern-Leiste (Artikel) – bleibt beim Scrollen unten sichtbar */
.speicherleiste { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: space-between;
  align-items: center; gap: 1rem; flex-wrap: wrap; background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: var(--radius); padding: .8rem 1.1rem; margin-bottom: 1rem; box-shadow: 0 -2px 12px rgba(0,0,0,.1); }
.speicherleiste .knopf { flex: 0 0 auto; }

/* Getränke-Vorauswahl beim Anlegen von Artikeln */
.getraenk-wahl { background: var(--flaeche-2); border: 1px solid var(--linie); border-radius: 8px; padding: .7rem .9rem .8rem; margin-bottom: .9rem; display: grid; gap: .5rem; }
.getraenk-wahl-kopf { display: flex; flex-wrap: wrap; gap: .2rem .6rem; align-items: baseline; }
.getraenk-wahl select:disabled { opacity: .55; }

/* Vorschläge beim Tippen des Artikelnamens */
.name-feld { flex: 2 1 260px !important; }
.vorschlag-rahmen { position: relative; display: block; }
.vorschlaege {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px);
  list-style: none; margin: 0; padding: .3rem; max-height: 320px; overflow-y: auto;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .14);
}
.vorschlaege li { display: flex; align-items: center; gap: .6rem; padding: .45rem .6rem; border-radius: 6px; cursor: pointer; font-weight: 400; }
.vs-bild { display: flex; align-items: center; justify-content: center; flex: 0 0 50px; min-height: 22px; }
.vs-bild img { max-height: 22px; max-width: 46px; object-fit: contain; }
.vs-text { display: grid; gap: .05rem; min-width: 0; }
.vorschlaege li strong { font-weight: 600; }
.vorschlaege li small { color: var(--leise); font-size: .78rem; }
.vorschlaege li:hover, .vorschlaege li.aktiv { background: var(--flaeche-2); }

/* Herstellerlogo auf den Artikelkacheln */
.artikel-bild { display: flex; align-items: center; justify-content: center; gap: .4rem; height: 30px; margin-bottom: .1rem; }
.artikel-logo { max-height: 28px; max-width: 64px; width: auto; object-fit: contain; border-radius: 3px; }
.artikel-logo.dunkel, .vs-bild img.dunkel { background: #2e3134; padding: 2px 4px; border-radius: 4px; }
@media (prefers-color-scheme: dark) { .artikel-logo:not(.dunkel), .vs-bild img:not(.dunkel) { background: #fff; padding: 2px; border-radius: 3px; } }

/* Logo-Schalter und Löschen in der Artikelverwaltung */
.logo-schalter { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: .7rem 1rem; margin-bottom: 1rem; }
.auswahl-spalte { width: 2.2rem; }
.auswahl-spalte input { width: 18px; height: 18px; min-height: 0; }
.getraenk-wahl-kopf #gw-leeren { margin-left: auto; }
