/* Belege mit dem Handy scannen: Seite /scan und /buchhaltung/scannen (Bauplan 2026-11-17-web-app-handy-scan, HS3–HS5).
   Vorsatz hs-, Farben nur aus den Marken von oo.css (hell und dunkel). Mobil zuerst: Knöpfe mindestens 44 px, der Hauptknopf groß.
   ☠️ Keine Klasse des Blatts am PC (oo.handyscan.css: hs-liste, hs-eintrag, hs-stand …): beide Dateien liegen in der App, sie würden
   sich gegenseitig umgestalten (Wächter ScanOberflaecheSkriptTests). */

.hs-seite { margin: 0; min-height: 100dvh; background: var(--grund); color: var(--tinte-1); }
.hs-ohne-skript { margin: 24px 16px; }

/* Auf /scan rollt die Seite als Dokument. In der App rollt die Wurzel selbst: die Seite dahinter rollt nie als Dokument. */
.hs { display: block; max-width: 560px; margin: 0 auto; padding: 16px 16px calc(24px + env(safe-area-inset-bottom, 0px)); }
.hs-in-app { position: relative; flex: 1 1 auto; min-height: 0; overflow-y: auto; max-width: none; margin: 0; }
.hs-in-app .hs-flaeche { max-width: 560px; margin: 0 auto; }

.hs-flaeche { display: flex; flex-direction: column; gap: 14px; }
.hs .kn { min-height: 44px; padding: 0 14px; font-size: 15px; }
.hs .kn.hs-gross { width: 100%; min-height: 56px; font-size: 16px; font-weight: 600; }
.hs .kn.an { background: var(--auswahl); border-color: var(--tinte-5); color: var(--tinte-1); }
.hs-reihe { display: flex; gap: 10px; }
.hs-reihe > .kn { flex: 1 1 0; min-width: 0; }

.hs-oben { display: flex; flex-direction: column; gap: 2px; }
.hs-ueberschrift { font-size: 20px; font-weight: 600; color: var(--tinte-1); }
.hs-firma { color: var(--tinte-4); font-size: 14px; }

.hs-meldung { padding: 10px 12px; border: 1px solid var(--linie); border-radius: 3px; background: var(--flaeche); color: var(--tinte-2); font-size: 14px; }
.hs-meldung-warn { border-color: var(--warn); background: var(--warn-grund); }
.hs-meldung-alarm { border-color: var(--alarm); background: var(--alarm-grund); color: var(--alarm); }
.hs-meldung[hidden], .hs-aufnahme[hidden], .hs-vorschau[hidden], .hs-reste[hidden], .hs-lupe[hidden] { display: none; }

.hs-aufnahme, .hs-vorschau { display: flex; flex-direction: column; gap: 10px; }
.hs-in-arbeit { color: var(--tinte-3); font-size: 14px; }
.hs-merke { color: var(--tinte-5); font-size: 13px; }
.hs-arbeitet { padding: 48px 0; border: 1px dashed var(--linie-stark); border-radius: 3px; color: var(--tinte-4); text-align: center; }

/* Vorschau und Ecken: das Bild passt in die Breite und höchstens 60 % der Höhe. */
.hs-bildflaeche { position: relative; display: flex; justify-content: center; align-self: center; max-width: 100%;
  border: 1px solid var(--linie); border-radius: 3px; background: var(--flaeche-2); overflow: hidden; }
.hs-bild { display: block; max-width: 100%; max-height: 60vh; width: auto; height: auto; }
.hs-editor { overflow: visible; touch-action: none; }
.hs-griff { position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; padding: 0; border: 0; background: transparent;
  touch-action: none; cursor: grab; }
.hs-griff::after { content: ""; position: absolute; inset: 12px; border: 3px solid var(--akzent); border-radius: 50%; background: rgba(255, 255, 255, .85); }
.hs-griff:focus-visible { outline: none; }
.hs-griff:focus-visible::after { outline: 2px solid var(--akzent); outline-offset: 2px; }
.hs-lupe { position: absolute; top: 8px; left: 8px; width: 96px; height: 96px; border: 2px solid var(--flaeche); border-radius: 50%;
  box-shadow: var(--schatten); pointer-events: none; }
.hs-lupe.rechts { left: auto; right: 8px; }
.hs-wahl { display: flex; gap: 10px; }
.hs-wahl > .kn { flex: 1 1 0; min-width: 0; }

/* Reste und Rückfragen */
.hs-reste { display: flex; flex-direction: column; gap: 8px; }
.hs-rest { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 8px 8px 12px; border: 1px solid var(--linie);
  border-radius: 3px; background: var(--flaeche); color: var(--tinte-2); font-size: 14px; }
.hs-rest > span { min-width: 0; }
.hs-bestaetigen { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border: 1px solid var(--alarm); border-radius: 3px;
  background: var(--alarm-grund); color: var(--tinte-1); font-size: 14px; }

/* Liste der Belege dieser Sitzung; die Farbe trägt den Stand, Blau heißt „läuft“. */
.hs-belege { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--linie-fein); }
.hs-beleg { display: flex; flex-direction: column; gap: 4px; padding: 10px 2px; border-bottom: 1px solid var(--linie-fein); }
.hs-beleg-kopf { display: flex; align-items: baseline; gap: 8px; min-width: 0; font-size: 14px; }
.hs-beleg-stand { flex: 0 0 auto; padding: 2px 7px; border-radius: 3px; background: var(--flaeche-2); color: var(--tinte-3); font-size: 12.5px; }
.hs-beleg-wer { flex: 1 1 auto; min-width: 0; overflow: hidden; color: var(--tinte-1); text-overflow: ellipsis; white-space: nowrap; }
.hs-beleg-betrag { flex: 0 0 auto; margin-left: auto; color: var(--tinte-2); font-variant-numeric: tabular-nums; }
.hs-beleg-satz { color: var(--tinte-4); font-size: 13px; }
.hs-beleg-verwerfen { align-self: flex-start; }
.hs-st-gespeichert .hs-beleg-stand { background: var(--ok-grund); color: var(--ok); }
.hs-st-zu_pruefen .hs-beleg-stand, .hs-st-als_foto .hs-beleg-stand { background: var(--warn-grund); color: var(--warn); }
.hs-st-vorhanden .hs-beleg-stand { background: var(--violett-grund); color: var(--violett); }
.hs-st-fehler .hs-beleg-stand, .hs-st-abgelehnt .hs-beleg-stand { background: var(--alarm-grund); color: var(--alarm); }
.hs-st-liest .hs-beleg-stand, .hs-st-sendet .hs-beleg-stand { color: var(--akzent); }
.hs-leer-zeile { padding: 14px 2px; color: var(--tinte-5); font-size: 14px; }

/* Die Dateifelder sind unsichtbar, aber nie display: none (Safari öffnet die Auswahl sonst nicht). */
.hs-unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
