:root {
  --blau: #0b5394; --hell: #eef3f9; --rand: #d5dde8; --text: #1b2733; --grau: #6b7785;
  --gruen: #1e8a4c; --rot: #c0392b; --gelb: #b7791f; --weiss: #fff;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--hell); color: var(--text);
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 17px; -webkit-text-size-adjust: 100%; }
#kopf { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; background: var(--blau); color: #fff;
  padding: calc(10px + env(safe-area-inset-top)) 12px 10px; min-height: 52px; }
#titel { flex: 1; font-weight: 600; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kopfknopf { background: transparent; color: #fff; border: 0; font-size: 17px; padding: 6px 4px; }
#netz { font-size: 14px; color: #7fd18b; }
#netz.aus { color: #f5b7b1; }
main { padding: 12px 12px calc(24px + env(safe-area-inset-bottom)); max-width: 720px; margin: 0 auto; }
h2 { font-size: 16px; color: var(--grau); margin: 18px 0 8px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.karte { background: var(--weiss); border: 1px solid var(--rand); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.karte.klick { cursor: pointer; }
.karte.klick:active { background: #f4f7fb; }
.zeile { display: flex; align-items: center; gap: 10px; }
.zeile .wachsen { flex: 1; min-width: 0; }
.klein { font-size: 14px; color: var(--grau); }
.fett { font-weight: 600; }
.chip { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 13px; font-weight: 600; background: #e3e8ef; color: var(--grau); white-space: nowrap; }
.chip.erfasst { background: #dff3e6; color: var(--gruen); }
.chip.storno { background: #fbe3e0; color: var(--rot); }
.chip.teil { background: #fdf1d8; color: var(--gelb); }
.chip.ersatz { background: #e0ecfb; color: var(--blau); }
.knopf { display: block; width: 100%; padding: 14px; font-size: 17px; font-weight: 600; border-radius: 12px; border: 1px solid var(--blau);
  background: var(--blau); color: #fff; margin: 8px 0; text-align: center; }
.knopf.zweit { background: #fff; color: var(--blau); }
.knopf.rot { background: #fff; color: var(--rot); border-color: var(--rot); }
.knopf.klein { width: auto; display: inline-block; padding: 8px 14px; font-size: 15px; margin: 4px 6px 4px 0; }
.knopf:disabled { opacity: .5; }
label.feld { display: block; margin: 10px 0 4px; font-size: 14px; color: var(--grau); }
input[type=text], input[type=time], input[type=date], input[type=password], select, textarea {
  width: 100%; font-size: 18px; padding: 11px 12px; border: 1px solid var(--rand); border-radius: 10px; background: #fff; color: var(--text); }
textarea { min-height: 70px; }
.eingabe { display: flex; gap: 8px; align-items: stretch; }
.eingabe input { flex: 1; }
.eingabe button { flex: 0 0 auto; }
.kontakt a { color: var(--blau); text-decoration: none; font-weight: 600; }
.fotos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.fotos img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid var(--rand); }
.fotos .foto { position: relative; }
.fotos .foto button { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--rot); color: #fff; font-size: 14px; line-height: 24px; padding: 0; }
.hinweis { background: #fff8e6; border: 1px solid #f1d58c; border-radius: 10px; padding: 10px 12px; font-size: 15px; margin: 8px 0; }
.fehler { background: #fdecea; border: 1px solid #f2b8b2; border-radius: 10px; padding: 10px 12px; font-size: 15px; margin: 8px 0; }
.leer { color: var(--grau); text-align: center; padding: 30px 10px; }
#meldung { position: fixed; left: 12px; right: 12px; bottom: calc(16px + env(safe-area-inset-bottom)); background: #1b2733; color: #fff;
  padding: 12px 14px; border-radius: 10px; font-size: 15px; z-index: 20; box-shadow: 0 4px 16px rgba(0,0,0,.25); }
#scanner { position: fixed; inset: 0; background: #000; z-index: 30; display: flex; flex-direction: column; }
#video { flex: 1; width: 100%; object-fit: cover; }
.scanhinweis { color: #fff; text-align: center; padding: 8px; font-size: 15px; }
#scanner .knopf { margin: 8px 12px calc(12px + env(safe-area-inset-bottom)); width: auto; }
.suche { margin-bottom: 8px; }
.pruefliste li { margin: 4px 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; margin: 12px 0; }
.check input { width: 24px; height: 24px; margin-top: 2px; flex: 0 0 auto; }
.status-leiste { font-size: 14px; color: var(--grau); margin: 4px 0 10px; }
.trenner { height: 1px; background: var(--rand); margin: 12px 0; }
.wert { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
/* Datums- und Zeitfelder: iOS gibt ihnen sonst eine eigene Mindestbreite und laesst sie ueberlaufen */
input[type=date], input[type=time] { -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; min-height: 46px; }
.eingabe input[type=time] { min-width: 0; }
.karte.termin .zeile { align-items: flex-end; flex-wrap: wrap; }
.karte.termin .zeile > div:last-child { flex: 0 1 190px; min-width: 150px; }
.chip.zeit { background: var(--blau); color: #fff; }
.storno-gruppe { margin: 14px 0 4px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.storno-gruppe.NA { color: var(--rot); } .storno-gruppe.KS { color: var(--gruen); } .storno-gruppe.PNV { color: var(--gelb); }
.knopf.wahl { margin: 4px 0; text-align: left; }
.knopf.wahl.aktiv { background: var(--blau); color: #fff; }
textarea.pflicht { border-color: var(--rot); background: #fff8f7; }
.zeile > .knopf { margin: 8px 0; }
