:root {
  --orange: #F07B00;
  --orange-dunkel: #C96600;
  --tinte: #1E1E1E;
  --grau: #5B5B5B;
  --linie: #DDDAD5;
  --flaeche: #F6F4F1;
  --karte: #FFFFFF;
  --fehler: #B3261E;
  --ok: #2E7D32;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--flaeche); color: var(--tinte);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.kopf { background: var(--tinte); color: #fff; border-bottom: 4px solid var(--orange); }
.kopf-innen { max-width: 760px; margin: 0 auto; padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
#logo { height: 32px; }
.marke { font-weight: 700; letter-spacing: .02em; }
.trenner { width: 1px; height: 20px; background: #555; }
.unterzeile { color: #CFCFCF; font-size: 14px; }
.seite { max-width: 760px; margin: 0 auto; padding: 20px 16px 64px; }
h1 { font-size: 26px; line-height: 1.2; margin: 8px 0 8px; }
.einleitung p { color: var(--grau); margin: 0 0 16px; }
.hinweis { border-left: 4px solid var(--fehler); background: #FDECEA; padding: 12px 14px; border-radius: 6px; margin: 0 0 16px; }
.hinweis.ok { border-color: var(--ok); background: #EAF4EA; }

.abschnitt { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); padding: 18px 16px 6px; margin: 0 0 16px; }
.abschnitt h2 { font-size: 18px; margin: 0 0 14px; display: flex; gap: 10px; align-items: baseline; }
.abschnitt h2 .nr { color: var(--orange); font-variant-numeric: tabular-nums; }
.feld { margin: 0 0 16px; }
.feld > label, .feld > .bez { display: block; font-weight: 600; font-size: 15px; margin: 0 0 6px; }
.pflicht::after { content: " *"; color: var(--orange-dunkel); }
.raster { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .raster { grid-template-columns: 1fr 1fr; } .feld.breit { grid-column: 1 / -1; } }

input[type=text], input[type=email], input[type=tel], input[type=date], input[type=number], select, textarea {
  width: 100%; font: inherit; color: inherit; padding: 11px 12px; border: 1px solid #BDB8B0; border-radius: 8px; background: #fff;
}
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(240,123,0,.25); border-color: var(--orange); }
input:disabled, select:disabled { background: #EFEDEA; color: #888; }

.wahl { display: flex; flex-wrap: wrap; gap: 8px; }
.wahl label { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid #BDB8B0; border-radius: 999px; background: #fff; cursor: pointer; font-weight: 400; }
.wahl input { accent-color: var(--orange); margin: 0; }
.wahl label:has(input:checked) { border-color: var(--orange); background: #FFF3E6; }

.haken { display: flex; gap: 10px; align-items: flex-start; font-weight: 400 !important; }
.haken input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--orange); flex: none; }

.datei { border: 1.5px dashed #BDB8B0; border-radius: 8px; padding: 12px; background: #FCFBFA; }
.datei-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.datei-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; }
.knopf-zweit { display: inline-flex; align-items: center; justify-content: center; width: auto; padding: 10px 16px; border-radius: 8px;
  background: #fff; border: 1.5px solid #BDB8B0; color: var(--tinte); font-weight: 600; font-size: 15px; cursor: pointer; }
.knopf-zweit:hover { background: #F3F1EE; }
.knopf-zweit.haupt { border-color: var(--orange); color: var(--orange-dunkel); }
.knopf-zweit.haupt:hover { background: #FFF3E6; }
.datei-input:focus-visible + .datei-knoepfe label { outline: 3px solid rgba(240,123,0,.25); }
.datei-liste { list-style: none; margin: 0; padding: 0; }
.datei-eintrag { background: #fff; border: 1px solid var(--linie); border-left: 4px solid #BDB8B0; border-radius: 8px; padding: 8px 10px; margin-top: 8px; }
.datei-eintrag.ok, .datei-eintrag.ungeprueft, .datei-eintrag.nicht_geprueft { border-left-color: var(--ok); }
.datei-eintrag.warnung, .datei-eintrag.trotzdem { border-left-color: #D99100; background: #FFF9EC; }
.datei-eintrag.abgelehnt { border-left-color: var(--fehler); background: #FDECEA; }
.eintrag-kopf { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; color: var(--grau); }
.eintrag-weg { width: auto; background: none; color: var(--grau); padding: 2px 6px; font-weight: 400; }
.eintrag-weg:hover { background: #EFEDEA; }
.eintrag-text { font-size: 14px; margin-top: 2px; }
.datei-eintrag.ok .eintrag-text { color: var(--ok); font-weight: 600; }
.datei-eintrag.pruefe .eintrag-text { color: var(--grau); }
.datei-eintrag.pruefe .eintrag-text::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px;
  border: 2px solid #CCC; border-top-color: var(--orange); border-radius: 50%; animation: dreh 0.8s linear infinite; }
@keyframes dreh { to { transform: rotate(360deg); } }
.eintrag-aktionen { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

/* Scanner (Vollbild) */
.scan [hidden] { display: none !important; }
html.scan-offen, html.scan-offen body { overflow: hidden; }
.scan { position: fixed; inset: 0; z-index: 1000; background: #000; color: #fff; overflow: hidden; }
.scan video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-rahmen { position: absolute; border: 3px solid rgba(255,255,255,.9); border-radius: 14px; box-shadow: 0 0 0 9999px rgba(0,0,0,.55); transition: border-color .2s; }
.scan-rahmen.gut { border-color: #4CAF50; }
.scan-oben { position: absolute; top: 0; left: 0; right: 0; padding: max(14px, env(safe-area-inset-top)) 16px 12px; text-align: center; display: grid; gap: 4px; }
.scan-oben b { font-size: 18px; }
.scan-oben span { font-size: 14px; color: #DDD; max-width: 520px; margin: 0 auto; }
.scan-status { position: absolute; left: 16px; right: 16px; bottom: 120px; text-align: center; font-weight: 600; font-size: 16px; }
.scan-status span, .scan-status { text-shadow: 0 1px 3px rgba(0,0,0,.8); }
.scan-status.warn { color: #FFD27A; } .scan-status.ok { color: #8BE08F; } .scan-status.hart { color: #FF9A8F; }
.scan-leiste { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 16px max(20px, env(safe-area-inset-bottom));
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.scan-text { width: auto; background: none; color: #fff; font-weight: 600; padding: 10px; justify-self: start; }
.scan-leiste .scan-text:last-child { justify-self: end; }
.scan-text:hover { background: rgba(255,255,255,.12); }
.scan-ausloeser { width: 72px; height: 72px; padding: 0; border-radius: 50%; background: #fff; border: 5px solid rgba(255,255,255,.45); background-clip: padding-box; }
.scan-ausloeser:hover { background: #EEE; }
.scan-ausloeser:disabled { opacity: .4; }
.scan-vorschau { position: absolute; inset: 0; background: #111; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px 16px 110px; }
.scan-vorschau img { max-width: 100%; max-height: 70vh; border-radius: 10px; }
.scan-vtext { margin-top: 12px; text-align: center; font-size: 15px; max-width: 520px; }
.scan-vtext.warn { color: #FFD27A; } .scan-vtext.hart { color: #FF9A8F; }
.scan-verwenden { width: auto; justify-self: end; grid-column: 3; }

.nachreichen { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; color: var(--grau); margin-top: 6px; font-weight: 400 !important; }
.nachreichen input { accent-color: var(--orange); }
.fehlertext { color: var(--fehler); font-size: 14px; margin-top: 4px; }
.feld.hat-fehler input, .feld.hat-fehler select, .feld.hat-fehler textarea, .feld.hat-fehler .datei { border-color: var(--fehler); }
.hilfe { font-size: 13px; color: var(--grau); margin-top: 4px; }

.absenden { margin-top: 8px; }
.klein { font-size: 13px; color: var(--grau); }
.klein a { color: var(--grau); }
button { font: inherit; font-weight: 700; color: #fff; background: var(--orange); border: 0; border-radius: 8px; padding: 14px 22px; width: 100%; cursor: pointer; }
button:hover { background: var(--orange-dunkel); }
button:disabled { background: #C9C4BC; cursor: progress; }
@media (min-width: 620px) { button { width: auto; } }

.falle { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.fertig { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); padding: 22px 18px; }
.fertig h1 { color: var(--ok); }

.auslesen { background: #FFF6EC; border: 1px solid #F3C99A; border-radius: var(--radius); padding: 16px; margin: 0 0 16px; }
.auslesen h2 { font-size: 18px; margin: 0 0 6px; }
.auslesen p { margin: 0 0 12px; color: var(--grau); font-size: 15px; }
.auslesen-knopf { display: inline-flex; align-items: center; justify-content: center; width: 100%; padding: 12px 18px; border-radius: 8px;
  background: #fff; border: 1.5px solid var(--orange); color: var(--orange-dunkel); font-weight: 700; cursor: pointer; }
.auslesen-knopf input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.auslesen-knopf:focus-within { outline: 3px solid rgba(240,123,0,.25); }
.auslesen.laeuft .auslesen-knopf { opacity: .6; cursor: progress; }
@media (min-width: 620px) { .auslesen-knopf { width: auto; } }
.auslesen-status { font-size: 14px; margin-top: 10px; }
.auslesen-status:empty { display: none; }
.auslesen-status.ok { color: var(--ok); font-weight: 600; }
.feld.vorbelegt input:not([type=checkbox]), .feld.vorbelegt select { border-color: var(--orange); background: #FFF6EC; }
.feld.vorbelegt .wahl { outline: 2px solid var(--orange); outline-offset: 4px; border-radius: 6px; }

.abschnitt-hinweis { margin: -4px 0 14px; color: var(--grau); font-size: 15px; }
.auslesen.im-abschnitt { margin: 4px 0 0; }
.auslesen.im-abschnitt h2 { font-size: 16px; }
