/* Küchen-Terminal „Küchenpass“: neutrale Vorlage für jedes Restaurant, wird nicht pro Kunde angepasst.
   Graphit statt Hausfarbe; Farbe nur mit Bedeutung: Bernstein = neu / jetzt handeln, Grün = läuft, Rot = zu spät.
   Große Ziele für Finger mit Mehl dran. Schrift Inter (lokal): auf Lesbarkeit aus der Entfernung gebaut,
   eindeutige Ziffern (1/l/I, 0/O) und gleich breite Zahlen für Uhrzeiten und Bon-Nummern. */
@font-face { font-family: "Inter"; src: url("/fonts/inter-regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-semibold.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-bold.woff") format("woff"); font-weight: 700 800; font-style: normal; font-display: swap; }
:root {
  --grund: #141619; --flaeche: #1e2125; --flaeche-2: #2a2e33; --text: #f3f4f6; --text-2: #b9bec6;
  --linie: #3d4249; --gelb: #f2b33d; --rot: #e5484d; --rot-tief: #6e1d22; --gruen: #34c26e; --neutral: #4a515b;
  --f: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  --f-titel: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  /* Bernstein als Schrift/Rand auf Flächen, getönte Hinweise, Schleier: im Hellmodus eigene Werte */
  --akzent: #f2b33d; --gruen-text: #34c26e; --text-stark: #fff;
  --ok-grund: #173d25; --ok-text: #c8f5d7; --warn-grund: #5a3d0b; --warn-text: #ffe2a8;
  --fehler-text: #ffb4ae; --rot-text: #ffd3d4; --schleier: rgba(10, 9, 8, .97); --schleier-2: rgba(10, 9, 8, .88);
  color-scheme: dark;
}
/* Hellmodus (Knopf „Hellmodus“ oben, gespeichert auf dem Gerät): für helle Küchen und Sonnenlicht.
   Gleiche Bedeutung der Farben; Bernstein als Schrift dunkler, damit er auf Weiß lesbar bleibt (AA). */
:root[data-thema="hell"] {
  --grund: #e9ecef; --flaeche: #ffffff; --flaeche-2: #dfe3e8; --text: #121417; --text-2: #474e57;
  --linie: #bcc3cb; --rot-tief: #fbd5d7; --neutral: #d3d8de;
  --akzent: #8a5300; --gruen-text: #146c37; --text-stark: #000;
  --ok-grund: #d5f0de; --ok-text: #0d4723; --warn-grund: #fbe7bf; --warn-text: #5a3a00;
  --fehler-text: #b3261e; --rot-text: #b3261e; --schleier: rgba(233, 236, 239, .97); --schleier-2: rgba(20, 22, 25, .55);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--grund); color: var(--text); font: 400 18px/1.45 var(--f); }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--akzent); outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2 { margin: 0 0 .5rem; line-height: 1.1; font-family: var(--f-titel); font-weight: 700; letter-spacing: -.015em; }

.leiste { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; padding: .6rem 1rem; background: var(--flaeche); border-bottom: 3px solid var(--linie); position: sticky; top: 0; z-index: 5; }
.leiste p { margin: 0; }
.titel { font: 700 1.35rem/1 var(--f-titel); letter-spacing: -.01em; }
.titel strong { color: var(--text-stark); }
.uhr { font: 700 1.9rem/1 var(--f-titel); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.verbindung { padding: .3rem .7rem; border-radius: 1rem; background: var(--flaeche-2); }
.verbindung.ok { background: var(--ok-grund); color: var(--ok-text); }
.verbindung.weg { background: var(--rot); color: #fff; font-weight: 700; }
.leiste-aktionen { margin-left: auto; display: flex; gap: .6rem; flex-wrap: wrap; }
.schalter, .knopf-klein { min-height: 48px; padding: .5rem 1rem; border-radius: 8px; border: 2px solid var(--linie); background: var(--flaeche-2); }
a.knopf-klein { display: inline-flex; align-items: center; color: inherit; text-decoration: none; }
.schalter[aria-pressed="true"] { background: var(--rot); border-color: var(--rot); color: #fff; font-weight: 700; }
/* Lieferung an (grün) / aus (rot): gut sichtbar, Farbe trägt die Bedeutung, Text sagt es zusätzlich */
.lieferung-schalter { font-weight: 700; }
.lieferung-schalter[aria-pressed="true"] { background: var(--gruen); border-color: var(--gruen); color: #04220f; }
.lieferung-schalter[aria-pressed="false"] { background: var(--rot); border-color: var(--rot); color: #fff; }
.schicht-box.zwei-starts .knopf-riesig { font-size: 1.5rem; min-height: 84px; }
.schicht-box .knopf-riesig.nur-abholung { margin-top: 0; background: var(--flaeche-2); color: var(--text, #fff); border: 3px solid var(--gruen); }
.demo-hinweis { margin: 0; padding: .5rem 1rem; background: var(--ok-grund); color: var(--ok-text); }

.spalten { display: grid; grid-template-columns: 1fr; gap: 1rem; padding: 1rem; align-items: start; }
/* Laufende Bestellungen bekommen den meisten Platz; ab Tablet quer rechts eine schmale Werkzeug-Spalte */
@media (min-width: 64rem) { .spalten { grid-template-columns: 2.2fr 1fr; } }
@media (min-width: 75rem) { .spalte-arbeit .karten:not(.klein) { grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); align-items: start; } }
.neu-block { margin-bottom: 1.25rem; }
.werkzeuge > details:first-child { margin-top: 0; }
.meldung { margin: .75rem 1rem 0; padding: .8rem 1rem; border-radius: 10px; background: var(--ok-grund); border: 1px solid var(--gruen); font-weight: 600; }
.meldung.fehler { background: var(--rot-tief); border-color: var(--rot); }
.suche-form { display: grid; gap: .5rem; }
.suche-liste { list-style: none; padding: 0; margin: .75rem 0 0; display: grid; gap: .6rem; }
.suche-liste > li { padding: .75rem .85rem; border: 1px solid var(--linie); border-radius: 10px; display: grid; gap: .35rem; }
.suche-kopf { display: flex; flex-wrap: wrap; gap: .4rem .75rem; align-items: baseline; }
.suche-kopf strong { font-size: 1.15rem; }
.suche-pos { font-size: .95rem; opacity: .9; }
.suche-erstattet { color: var(--akzent); font-weight: 600; }
.suche-hinweis { font-size: .9rem; opacity: .85; }
.erstatten-knoepfe { display: flex; flex-wrap: wrap; gap: .5rem; }
.erstatten-teil { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.erstatten-teil .knopf-gross { grid-column: 1 / -1; }
.karte-aktionen .storno-klein { margin-left: auto; }
.spalte h2 { font-size: 1.75rem; display: flex; gap: .6rem; align-items: center; }
.anzahl { display: inline-grid; place-items: center; min-width: 2rem; height: 2rem; border-radius: 1rem; background: var(--flaeche-2); font-size: 1rem; }
.karten { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.karte { background: var(--flaeche); border: 2px solid var(--linie); border-radius: 10px; padding: .9rem 1rem; }
.karte.neu { border-color: var(--akzent); }
.karte.storniert { opacity: .7; }
.karte-kopf { display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; flex-wrap: wrap; }
.bon { font: 800 1.95rem/1 var(--f-titel); letter-spacing: -.025em; }
.badge { padding: .2rem .6rem; border-radius: 6px; font-weight: 700; font-size: .95rem; background: var(--flaeche-2); }
.badge.lieferung { background: var(--neutral); }
.badge.abholung { background: var(--warn-grund); }
.badge.zeit { background: var(--gelb); color: #000; }
.karte ul { margin: .5rem 0; padding-left: 1.2rem; }
.karte .extras { color: var(--text-2); font-size: .95rem; }
.karte .wunsch, .alarm-positionen .wunsch { display: block; color: var(--akzent); font-size: 1rem; }
.karte .extras { display: block; }
.karte .notiz { border-left: 4px solid var(--akzent); padding-left: .6rem; margin: .5rem 0; }
.karte .meta { color: var(--text-2); margin: .3rem 0; font-size: .95rem; }
.karte-aktionen { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.karte-aktionen button { min-height: 52px; padding: .5rem 1.1rem; border-radius: 8px; border: 2px solid var(--linie); background: var(--flaeche-2); font: 700 1.1rem/1 var(--f-titel); letter-spacing: -.005em; }
.karte-aktionen .fertig { background: var(--gruen); border-color: var(--gruen); color: #04220f; }
.karten.klein .karte { padding: .6rem .8rem; font-size: .95rem; }
.leer { color: var(--text-2); padding: 1rem; border: 2px dashed var(--linie); border-radius: 10px; }

.hilfe { color: var(--text-2); margin: 0 0 .5rem; font-size: .95rem; }
.hilfe.werbung-warnung { color: var(--text); }
.gerichte { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .4rem; }
.gerichte button { width: 100%; min-height: 52px; display: flex; justify-content: space-between; gap: .5rem; align-items: center; text-align: left; padding: .5rem .8rem; border-radius: 8px; border: 2px solid var(--linie); background: var(--flaeche); }
.gerichte button[aria-pressed="true"] { background: var(--rot-tief); border-color: var(--rot); }
.gerichte .zustand { font-weight: 700; font-size: .9rem; white-space: nowrap; }
.gerichte-box .gesperrt-anzahl { margin-left: auto; padding: .15rem .55rem; border-radius: 6px; background: var(--rot); color: #fff; font-size: .9rem; }
.gerichte-box > .hilfe { margin-top: .25rem; }
details { margin-top: 1rem; background: var(--flaeche); border-radius: 10px; padding: .5rem .8rem; }
summary { min-height: 44px; display: flex; align-items: center; gap: .6rem; cursor: pointer; font-weight: 700; }
summary .anzahl { font-weight: 400; }
.protokoll ol { margin: 0; padding-left: 1.2rem; font-size: .9rem; color: var(--text-2); max-height: 20rem; overflow: auto; }

/* Zeitanzeige: Wunschzeit bzw. Wartezeit */
.zeitstatus { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; width: fit-content; margin: .5rem 0; padding: .5rem .9rem .55rem; border-radius: 10px; font-size: 1rem; line-height: 1.2; }
.zeitstatus strong { font-size: 1.55rem; letter-spacing: -.015em; }
.zeitstatus span { opacity: .9; }
.zeit-ok { background: #17703a; color: #fff; }
.zeit-ueber { background: var(--rot); color: #fff; }
.zeit-neu { background: var(--gelb); color: #000; }
.alarm-box .zeitstatus strong { font-size: 1.9rem; }

/* Export */
.export-inhalt { display: grid; gap: .7rem; padding: .5rem 0 .25rem; }
.export-inhalt label { display: grid; gap: .25rem; font-size: .95rem; color: var(--text-2); }
.export-inhalt textarea { min-height: 5rem; padding: .5rem .7rem; border-radius: 8px; border: 2px solid var(--linie); background: var(--grund); color: var(--text); font: inherit; resize: vertical; }
.vorlagen { grid-template-columns: repeat(2, 1fr) !important; }
.export-inhalt input[type="date"], .export-inhalt input[type="email"] { min-height: 48px; padding: .5rem .7rem; border-radius: 8px; border: 2px solid var(--linie); background: var(--grund); color: var(--text); font: inherit; }
.export-felder, .export-schnell { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.knopf-gross { display: flex; align-items: center; justify-content: center; min-height: 52px; border-radius: 8px; border: 2px solid var(--akzent); background: transparent; color: var(--akzent); font-weight: 700; text-decoration: none; }
.export-auto { display: flex !important; grid-template-columns: none; align-items: flex-start; gap: .6rem !important; color: var(--text) !important; }
.export-auto input { width: 1.4rem; height: 1.4rem; margin-top: .1rem; accent-color: var(--akzent); flex: none; }
.export-status { margin: 0; font-weight: 700; }
.export-inhalt input:not([type]), .export-inhalt input[inputmode], .export-inhalt select { min-height: 48px; padding: .5rem .7rem; border-radius: 8px; border: 2px solid var(--linie); background: var(--grund); color: var(--text); font: inherit; }
.gutschein-form { display: grid; gap: .7rem; }
.gutschein-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.gutschein-liste li { display: grid; grid-template-columns: 1fr auto; gap: .25rem .75rem; padding: .7rem .8rem; border: 1px solid var(--linie); border-radius: 8px; }
.gutschein-liste li.aus { opacity: .6; }
.gutschein-liste strong { font-size: 1.15rem; letter-spacing: .04em; }
.gutschein-liste .knopfe { grid-row: span 2; display: flex; gap: .4rem; align-items: center; }
.gutschein-liste small { color: var(--text-2); }

/* Schicht-Start */
.schicht { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; background: var(--schleier); padding: 1rem; }
.schicht-box { max-width: 34rem; width: 100%; margin: auto; padding: 1rem 0; text-align: center; }
.schicht-box .schicht-admin { width: 100%; margin-top: .75rem; }
@media (max-width: 640px) { .schicht-box h1 { font-size: 2.2rem; } .schicht-box p { font-size: 1rem; } }
.schicht-box p { color: var(--text-2); }
.knopf-riesig { min-height: 96px; width: 100%; margin: 1.5rem 0 .5rem; border: 0; border-radius: 14px; background: var(--gruen); color: #04220f; font-size: 2rem; font-weight: 700; }
.klein { font-size: .9rem; }

/* Alarm-Overlay */
.alarm { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 1rem; background: var(--rot); animation: puls 1s steps(2, jump-none) infinite; overflow: auto; }
@keyframes puls { 0% { background: var(--rot); } 100% { background: var(--rot-tief); } }
.alarm-box { width: min(56rem, 100%); background: var(--grund); border: 4px solid var(--akzent); border-radius: 16px; padding: 1.25rem 1.5rem; }
.alarm-box p { margin: 0 0 .5rem; }
.alarm-kopf { font-size: clamp(1.6rem, 4vw, 2.6rem); font-weight: 700; color: var(--akzent); }
.alarm-art { font-size: 1.6rem; font-weight: 700; }
.alarm-meta { color: var(--text-2); }
.alarm-positionen { font-size: 1.35rem; margin: .5rem 0 1rem; padding-left: 1.4rem; }
.alarm-positionen .extras { display: block; font-size: 1.05rem; color: var(--text-2); }
.alarm-notiz { border-left: 6px solid var(--akzent); padding-left: .8rem; font-size: 1.2rem; }
.alarm-frage { font-size: 1.3rem; font-weight: 700; margin-top: 1rem !important; }
.zeiten-knoepfe { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin: .5rem 0 1rem; }
@media (min-width: 40rem) { .zeiten-knoepfe { grid-template-columns: repeat(4, 1fr); } .zeiten-knoepfe.fuenf { grid-template-columns: repeat(5, 1fr); } }
.zeiten-knoepfe button { min-height: 96px; border: 0; border-radius: 14px; background: var(--gelb); color: #000; font-size: 2rem; font-weight: 700; }
.zeiten-knoepfe button:disabled { opacity: .5; cursor: wait; }
.vorbestellung { margin: .75rem 0 1rem; }
.vorbestellung-hinweis { font-size: 1.1rem; margin-bottom: .6rem !important; }
.vorbestellung button { width: 100%; min-height: 96px; border: 0; border-radius: 14px; background: var(--gelb); color: #000; font-size: 2rem; font-weight: 700; }
.vorbestellung button:disabled { opacity: .5; cursor: wait; }
.zeitstatus.zeit-geplant strong { font-size: 1.75rem; }
.alarm-box .zeitstatus.zeit-geplant strong { font-size: 2.2rem; }
.wunschzeit-bon { border: 2px solid #000; padding: 2px 4px; }
.storno { border-color: var(--rot); }
.storno.bestaetigen { background: var(--rot); color: #fff; font-weight: 700; }
.alarm-weitere { font-weight: 700; color: var(--akzent); }
.alarm-fehler { color: var(--fehler-text); font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .alarm { animation: none; } }

/* Druck: zwei Bons übereinander auf 80-mm-Papier (druckbare Breite ca. 72 mm) */
#druck { display: none; }
@media print {
  @page { margin: 0; }
  html, body { background: #fff !important; color: #000 !important; height: auto; }
  body > *:not(#druck) { display: none !important; }
  #druck { display: block !important; width: 72mm; margin: 0 auto; padding: 2mm 0 6mm; font: 11pt/1.25 "Courier New", Courier, monospace; color: #000; }
  .druck-bon { padding: 1mm 0; }
  .route-qr { text-align: center; margin: 3mm 0 1mm; }
  .route-qr svg { width: 34mm; height: 34mm; }
  .route-qr p { margin: 1mm 0 0; font: 9pt/1.2 Arial, sans-serif; }
  .druck-bon h1 { font: 700 13pt/1.2 Arial, sans-serif; text-align: center; margin: 0 0 1mm; border: 2px solid #000; padding: 1mm; }
  .druck-bon .nr { font: 700 26pt/1 Arial, sans-serif; text-align: center; margin: 2mm 0; }
  .druck-bon .gross { font: 700 15pt/1.25 Arial, sans-serif; }
  .druck-bon .beleg-logo img { display: block; margin: 0 auto 2mm; height: 18mm; max-width: 60mm; object-fit: contain; filter: grayscale(1); }
  .druck-bon .zeile { display: flex; justify-content: space-between; gap: 2mm; }
  .druck-bon .zeile > span:last-child { white-space: nowrap; flex: none; }
  .druck-bon ul { list-style: none; margin: 2mm 0; padding: 0; }
  .druck-bon li { margin: 0 0 2mm; }
  /* Positionen mit hängendem Einzug: Menge links, Name läuft beim Umbruch unter seinem ersten Buchstaben weiter, Preis rechts */
  .druck-bon li.pos { display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content; column-gap: 2mm; align-items: start; }
  .druck-bon li.pos .n { overflow-wrap: anywhere; }
  .druck-bon li.pos .p { white-space: nowrap; text-align: right; }
  .druck-bon .extra { display: block; font: 700 12pt/1.25 Arial, sans-serif; }
  .druck-bon .notiz { border: 2px solid #000; padding: 1.5mm; margin: 2mm 0; font: 700 13pt/1.3 Arial, sans-serif; }
  .druck-bon .trenn { border-top: 1px dashed #000; margin: 2mm 0; }
  .druck-bon .zahlung { border: 3px solid #000; padding: 2mm; text-align: center; font: 700 15pt/1.2 Arial, sans-serif; margin: 2mm 0; }
  /* Abreißlinie mit viel Leerraum davor und danach, damit man sauber mittig reißen kann */
  .abriss { margin: 14mm 0; border-top: 2px dashed #000; text-align: center; font: 9pt Arial, sans-serif; padding-top: 1mm; }
  #druck.getrennt .abriss { display: none; }
  #druck.getrennt .abriss + .druck-bon { break-before: page; page-break-before: always; }
  .gast-beleg { font: 10pt/1.3 "Courier New", Courier, monospace; }
  .gast-beleg .mitte { text-align: center; }
  .gast-beleg .klein { font-size: 9pt; margin: .5mm 0; }
  .gast-beleg .linie { border-bottom: 1px solid #000; height: 6mm; margin: 0 0 1mm; }
  .gast-beleg .label { margin-top: 2mm; }
  .druck-bon .label { font: 700 10pt/1.2 Arial, sans-serif; margin: 2mm 0 .5mm; text-transform: none; }
  .druck-bon .label + .notiz { margin-top: 0; }
  .druck-bon .klein-adresse { font: 10pt/1.25 Arial, sans-serif; margin: 1mm 0; }
  /* 58-mm-Papier (druckbare Breite ca. 48 mm): schmaler, Schriften etwas kleiner */
  #druck.papier-58 { width: 48mm; font-size: 9pt; }
  #druck.papier-58 .druck-bon h1 { font-size: 11pt; }
  #druck.papier-58 .druck-bon .nr { font-size: 20pt; }
  #druck.papier-58 .druck-bon .gross, #druck.papier-58 .druck-bon .zahlung { font-size: 12pt; }
  #druck.papier-58 .druck-bon .extra, #druck.papier-58 .druck-bon .wunsch-bon, #druck.papier-58 .druck-bon .notiz { font-size: 10pt; }
  #druck.papier-58 .route-qr svg { width: 30mm; height: 30mm; }
  .druck-bon .wunsch-bon { display: block; padding-left: 2mm; font: 700 12pt/1.25 Arial, sans-serif; border-left: 2mm solid #000; margin-top: 1mm; }
}

/* Kassen-Hinweis: immer sichtbar im echten Betrieb */
.kassen-hinweis { margin: 0; padding: .7rem 1rem; font-weight: 700; display: flex; align-items: center; gap: .6rem; }
.kassen-hinweis::before { content: ""; width: .8rem; height: .8rem; border-radius: 50%; background: currentColor; flex: none; }
.kassen-hinweis.offen { background: var(--ok-grund); color: var(--ok-text); }
.kassen-hinweis.zu { background: var(--warn-grund); color: var(--warn-text); }
.schicht-box h1 { font-size: 3rem; }
.schicht-box strong { color: var(--akzent); }
.knopf-riesig { font-family: var(--f-titel); letter-spacing: -.01em; }


/* Gleich breite Ziffern nur dort, wo Zahlen sich ändern (Uhr, Bon, Wartezeit, Zähler) */
.uhr, .bon, .zeitstatus, .anzahl, .badge.zeit { font-variant-numeric: tabular-nums; }

.kassen-hinweis.offen.ausserhalb { background: var(--warn-grund); border-color: var(--akzent); color: var(--text); }
.schicht-ende.frage { background: var(--rot); border-color: var(--rot); color: #fff; font-weight: 700; }

/* ---------- Admin-Bereich, große Rückfrage, Storno-Anfrage ---------- */
.admin-knopf.hinweis { background: var(--gelb); border-color: var(--akzent); color: #1b1300; font-weight: 700; }
.admin { position: fixed; inset: 0; z-index: 25; overflow: auto; background: var(--grund); padding: 1rem; overscroll-behavior: contain; }
.admin-box { width: min(60rem, 100%); margin: 0 auto; }
.admin-kopf { position: sticky; top: -1rem; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0; background: var(--grund); border-bottom: 1px solid var(--linie); }
.admin-kopf h1 { margin: 0; font-size: clamp(1.3rem, 4vw, 1.6rem); }
.admin .suche-pos, .admin .suche-hinweis { margin: .3rem 0; }
.admin .suche-kopf { gap: .25rem .9rem; }
.admin-kopf .knopf-gross { padding: 0 1.2rem; white-space: nowrap; }
.admin-pin { width: min(24rem, 100%); margin: 2rem auto; display: grid; gap: .75rem; text-align: center; }
.admin-pin label { font-size: 1.2rem; font-weight: 700; overflow-wrap: anywhere; }
.admin-pin input { font: inherit; font-size: 2.6rem; letter-spacing: .6em; text-align: center; padding: .4rem 0 .4rem .6em; width: 100%; min-width: 0; box-sizing: border-box; border-radius: 12px; border: 2px solid var(--linie); background: var(--flaeche); color: var(--text); }
.admin-pin input:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; }
.admin-pin .knopf-riesig { margin: .5rem 0 0; min-height: 72px; font-size: 1.5rem; }
.admin-fehler { color: var(--fehler-text); font-weight: 700; min-height: 1.5em; margin: 0; }
.admin-demo { color: var(--akzent); margin: 0; }
.admin-vergessen { color: var(--text-2); margin: 1rem 0 0; }
.admin-vergessen a { color: var(--text); font-weight: 700; white-space: nowrap; }
.admin-inhalt { display: grid; gap: 1rem; padding: 1rem 0 3rem; }
.admin-inhalt > .hilfe { margin: 0; }
.admin-teil h2 { font-size: 1.25rem; margin: .5rem 0; display: flex; align-items: center; gap: .5rem; }
.admin-teil .suche-liste > li, .anfrage-eintrag { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; padding: .75rem .9rem; margin-bottom: .6rem; list-style: none; }
.admin-teil .suche-liste { padding: 0; margin: 0; }
.anfrage-eintrag.offen { border-color: var(--akzent); }
.anfrage-eintrag.abgelehnt, .anfrage-eintrag.freigegeben { opacity: .75; }
.anfrage-eintrag.ziel { outline: 3px solid var(--akzent); outline-offset: 2px; }
.anfrage-eintrag .erstatten-knoepfe { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: .6rem; }
.anfrage-eintrag .erstatten-knoepfe:empty { display: none; }
.knopf-gross.gefahr, .knopf-klein.gefahr { border-color: var(--rot); color: var(--rot-text); }
.anfrage-badge { margin: .35rem 0 0; padding: .25rem .5rem; border-radius: 6px; font-weight: 700; font-size: .95rem; display: inline-block; }
.anfrage-badge.offen { background: var(--gelb); color: #1b1300; }
.anfrage-badge.abgelehnt { background: var(--neutral); color: var(--text); }
.anfrage-badge.freigegeben { background: var(--flaeche-2); color: var(--text-2); }
.frage { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-start; justify-content: center; padding: 1rem; background: var(--schleier-2); overflow: auto; overscroll-behavior: contain; }
.frage-box { margin: auto; width: min(34rem, 100%); background: var(--grund); border: 4px solid var(--rot); border-radius: 16px; padding: 1.5rem; text-align: center; }
.frage-titel { font-size: clamp(1.8rem, 5vw, 2.4rem); font-weight: 700; margin: 0 0 .5rem; }
.frage-text { font-size: 1.25rem; color: var(--text); margin: 0 0 1.25rem; }
.frage-knoepfe { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.frage-knoepfe .knopf-riesig { margin: 0; min-height: 76px; font-size: 1.35rem; }
.knopf-riesig.gefahr { background: var(--rot); color: #fff; }
.knopf-riesig.neutral { background: var(--flaeche-2); color: var(--text); }
.anfrage-box { border-color: var(--akzent); text-align: left; display: grid; gap: .6rem; width: min(44rem, 100%); padding: 1.1rem 1.25rem; }
.anfrage-box .frage-titel { font-size: clamp(1.5rem, 4vw, 2rem); }
@media (min-width: 40rem) { .anfrage-gruende { grid-template-columns: 1fr 1fr; } .anfrage-gruende legend { grid-column: 1 / -1; } }
.anfrage-box .frage-text { font-size: 1.05rem; color: var(--text-2); margin: 0; }
.anfrage-box fieldset { border: 1px solid var(--linie); border-radius: 10px; margin: 0; padding: .5rem .8rem .7rem; display: grid; gap: .2rem; }
.anfrage-box legend { font-weight: 700; padding: 0 .3rem; }
.anfrage-box fieldset label { display: flex; align-items: center; gap: .6rem; min-height: 44px; font-size: 1.05rem; }
.anfrage-box input[type="radio"] { width: 1.3rem; height: 1.3rem; accent-color: var(--akzent); }
.anfrage-box > label, .anfrage-betrag, .anfrage-betrag label { display: grid; gap: .3rem; font-weight: 700; }
.anfrage-box input:not([type="radio"]) { font: inherit; font-size: 1.1rem; padding: .6rem .7rem; border-radius: 8px; border: 1px solid var(--linie); background: var(--flaeche); color: var(--text); }
@media (max-width: 30rem) { .frage-knoepfe, .anfrage-eintrag .erstatten-knoepfe { grid-template-columns: 1fr; } }

/* Gerät freischalten (Kopplung) und Geräteliste */
.kopplung { position: fixed; inset: 0; z-index: 35; display: grid; place-items: start center; overflow: auto; padding: 1rem; background: var(--grund); }
.kopplung-box { max-width: 30rem; width: 100%; margin: auto; padding: 1.5rem 0; text-align: center; }
.kopplung-box p { color: var(--text-2); }
.kopplung-box strong { color: var(--akzent); }
.kopplung-box h1 { font-size: 2.2rem; }
.kopplung-teil { margin: 1.25rem 0 0; padding: 1rem; border: 1px solid var(--linie); border-radius: 12px; background: var(--flaeche); text-align: center; }
.kopplung-teil h2 { font-size: 1.15rem; }
.kopplung-teil summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; justify-content: center; }
.kopplung-box .kopplung-code { font: 700 clamp(2.4rem, 11vw, 3.6rem)/1.1 var(--f); letter-spacing: .05em; color: var(--akzent); margin: .25rem 0 .75rem; font-variant-numeric: tabular-nums; }
.kopplung-qr { display: grid; place-items: center; margin: 0 auto .75rem; }
.kopplung-qr svg { width: 180px; height: 180px; background: #fff; padding: 10px; border-radius: 10px; }
.kopplung-mail, .kopplung-einrichten { display: grid; gap: .6rem; text-align: left; }
.kopplung-mail input, .kopplung-einrichten input, .geraet-form input { font: inherit; font-size: 1.1rem; padding: .6rem .75rem; border-radius: 10px; border: 2px solid var(--linie); background: var(--grund); color: var(--text); min-height: 48px; width: 100%; }
.kopplung-einrichten input { font-size: 2rem; letter-spacing: .5em; text-align: center; }
.kopplung .knopf-gross, .kopplung .knopf-riesig { width: 100%; }
.geraet-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: .6rem; align-items: end; margin: .5rem 0; }
.geraet-form label { display: grid; gap: .25rem; font-size: .95rem; color: var(--text-2); }
#geraet-code { text-transform: uppercase; letter-spacing: .08em; }
.geraete-liste { padding: 0; margin: .5rem 0 0; }
.geraete-liste li { list-style: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; padding: .6rem .9rem; margin-bottom: .5rem; }
.geraete-liste .geraet-info { display: grid; gap: .1rem; }
.geraete-liste .geraet-meta { color: var(--text-2); font-size: .9rem; }
.geraete-liste .dieses { color: var(--gruen-text); font-weight: 700; }
@media (max-width: 640px) { .geraet-form { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .admin { padding: .75rem; }
  .admin-kopf { top: -.75rem; }
  .admin-kopf .knopf-gross { padding: 0 .9rem; font-size: 1rem; }
  .admin-pin { margin: 1.25rem auto; }
  .admin-pin label { font-size: 1.05rem; }
  .admin-pin input { font-size: 2.2rem; }
  .admin-pin .knopf-riesig { min-height: 60px; font-size: 1.3rem; }
}

/* Ziffernfeld (statt Tastatur): Admin-Code, Beträge, auf Küchengeräten auch die Bestellsuche */
.ziffern { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; width: min(20rem, 100%); margin: .25rem auto; grid-column: 1 / -1; }
.ziffer { font: inherit; font-size: 1.8rem; font-weight: 700; font-variant-numeric: tabular-nums; min-height: 64px; border-radius: 12px; border: 2px solid var(--linie); background: var(--flaeche-2); color: var(--text); cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.ziffer:active { background: var(--gelb); border-color: var(--gelb); color: #000; }
.ziffer:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; }
.ziffer.loeschen { font-size: 1.5rem; color: var(--text-2); }
input[readonly][data-ziffernfeld] { caret-color: transparent; cursor: default; }
.erstatten-teil .ziffern, .suche-form .ziffern { margin-left: 0; }
.anfrage-betrag .ziffern { margin: .4rem 0 0; }
button, a, summary { touch-action: manipulation; }
/* Touch-Monitor und Handy (Skill mobile-native): kein Tap-Flash, Knöpfe geben beim Antippen sofort nach, Knopftext
   wird beim langen Drücken nicht markiert. Hover-Regeln gibt es im Terminal bewusst keine (bleiben auf Touch hängen). */
html { -webkit-tap-highlight-color: transparent; }
button { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; transition: transform .1s cubic-bezier(0.23, 1, 0.32, 1), filter .1s; }
button:active:not(:disabled) { transform: scale(.97); filter: brightness(.88); }
@media (prefers-reduced-motion: reduce) { button:active:not(:disabled) { transform: none; } }
/* Safe Area (viewport-fit=cover): Notch und Home-Balken, z. B. Handy des Chefs quer */
.leiste { padding-top: max(.6rem, env(safe-area-inset-top, 0px)); padding-left: max(1rem, env(safe-area-inset-left, 0px)); padding-right: max(1rem, env(safe-area-inset-right, 0px)); }
.spalten { padding-left: max(1rem, env(safe-area-inset-left, 0px)); padding-right: max(1rem, env(safe-area-inset-right, 0px)); padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px)); }
.schicht, .alarm, .admin, .frage, .kopplung { padding: max(1rem, env(safe-area-inset-top, 0px)) max(1rem, env(safe-area-inset-right, 0px)) max(1rem, env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px)); }

/* Küchengerät: Texteingaben gehören aufs Handy */
.ziffern[data-nur-kueche], .handy-hinweis { display: none; }
body.kueche .ziffern[data-nur-kueche] { display: grid; }
body.kueche:not(.tastatur) .handy-hinweis { display: block; color: var(--text); }
.handy-hinweis [data-tastatur-an] { margin-left: .5rem; vertical-align: middle; }
body.kueche:not(.tastatur) .nur-handy { display: none !important; }
.tastatur-schalter { display: none; }
body.kueche .tastatur-schalter { display: flex; gap: .6rem; align-items: center; margin: .4rem 0 1rem; font-weight: 600; cursor: pointer; }
.tastatur-schalter input { width: 1.4rem; height: 1.4rem; flex: none; }
body.kueche { -webkit-user-select: none; user-select: none; }
body.kueche input, body.kueche textarea { -webkit-user-select: text; user-select: text; }

@media (max-width: 640px) {
  .ziffer { min-height: 58px; font-size: 1.6rem; }
}

/* Teilbetrag erstatten (Admin): Betrag groß, damit man ihn beim Tippen auf dem Ziffernfeld gut sieht */
.erstatten-teil label { display: grid; gap: .25rem; font-size: .95rem; color: var(--text-2); }
.erstatten-teil input { min-height: 52px; padding: .4rem .7rem; border-radius: 8px; border: 2px solid var(--linie); background: var(--grund); color: var(--text); font: inherit; font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.erstatten-teil label:has([name="betrag"]) { max-width: 20rem; }

/* Statistik im Admin-Bereich */
.statistik-rahmen { overflow-x: auto; margin: 0 0 .5rem; }
.statistik { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.statistik th, .statistik td { padding: .55rem .4rem; border-bottom: 1px solid var(--linie); text-align: right; vertical-align: top; white-space: nowrap; }
.statistik th:first-child { text-align: left; white-space: normal; }
.statistik thead th { color: var(--text-2); font-weight: 600; font-size: .85rem; white-space: normal; vertical-align: bottom; }
.statistik th:first-child, .statistik td:first-child { padding-left: 0; }
.statistik th:last-child, .statistik td:last-child { padding-right: 0; }
.statistik tbody tr:first-child { font-weight: 700; color: var(--text-stark); }
.statistik small { display: block; font-size: .8rem; font-weight: 600; color: var(--text-2); }
.statistik small.plus { color: var(--gruen-text); }
.statistik small.minus { color: var(--fehler-text); }
