/* Ansicht nach der Vorschau (22.11.2026): heller, warmer Grund, weiße Flächen mit feiner Linie und runden Ecken, ruhige
   dunkle Schrift, leise Nebenzeilen. Die Akzentfarbe der Einstellung trägt den einen wichtigen Knopf je Seite, die
   aktive Auswahl und Hervorhebungen, immer als Fläche mit akzent_text (nie als Schrift). Alle Farben kommen aus
   /stil/farben.css: aus der Einstellung haupt, akzent, haupt_text, akzent_text; aus app/toene.py die neutralen Töne
   (grund, flaeche, fein, linie, rahmen, schrift, leise, Statusfarben je mit heller Fläche) für Hell und Dunkel; die
   dunklen folgen dem Gerät. Keine feste Farbe hier (Prüfung V7), keine fremden Schriften (R13): Systemschrift. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem; line-height: 1.5; color: var(--schrift); background: var(--grund);
  overflow-wrap: anywhere;
}
a { color: var(--schrift); text-underline-offset: .15em; }
h1 { font-size: 1.6rem; line-height: 1.25; margin: .25rem 0 .35rem; font-weight: 700; }
h2 { font-size: 1.15rem; margin: 1.25rem 0 .5rem; }
.karte h2:first-child { margin-top: 0; }
.lead { color: var(--leise); margin: 0 0 1rem; }
code { font-size: .95em; background: var(--fein); border: 1px solid var(--linie); border-radius: .3rem; padding: 0 .3rem; }

/* ---- Rahmen: Seitenleiste am Rechner, Kopfzeile am Handy ---- */
.rahmen { min-height: 100vh; display: flex; flex-direction: column; }
.kopf {
  display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem;
  padding: .6rem 1rem; background: var(--flaeche); color: var(--schrift); border-bottom: 1px solid var(--linie);
}
.marke { display: flex; align-items: center; gap: .6rem; color: var(--schrift); text-decoration: none; font-weight: 700;
  min-width: 0; flex: 0 1 auto; }
/* Breite und quadratische Logos: feste Höhe, Breite nach dem Seitenverhältnis, nie breiter als der Platz (contain
   statt Stauchen). Im Dunkeln liegt das Logo auf einer hellen Fläche (wie in der Vorschau). */
.logo { height: 2.4rem; width: auto; max-width: min(60vw, 15rem); object-fit: contain; object-position: left center;
  display: block; flex: 0 1 auto; min-width: 0; background: var(--logo-grund); border-radius: .4rem; }
.navi { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; min-width: 0; }
.navi a { color: var(--schrift); text-decoration: none; padding: .4rem .7rem; border-radius: .55rem; }
.navi a:hover { background: var(--fein); }
.navi a[aria-current="page"] { background: var(--akzent); color: var(--akzent_text); font-weight: 600; }
.kopf-unten { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; font-size: .85rem; color: var(--leise);
  margin-left: auto; min-width: 0; }
.wer { display: flex; align-items: center; gap: .45rem; min-width: 0; }
.wer-zeichen { flex: none; width: 1.8rem; height: 1.8rem; border-radius: 50%; display: inline-flex; align-items: center;
  justify-content: center; font-weight: 700; font-size: .8rem; background: var(--haupt); color: var(--haupt_text); }
.abmelden { margin: 0; }
.abmelden button { padding: .3rem .7rem; font-size: .85rem; }

@media (min-width: 900px) {
  .mit-navi .rahmen { flex-direction: row; }
  .mit-navi .kopf {
    flex: none; width: 15rem; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: .2rem;
    border-bottom: 0; border-right: 1px solid var(--linie); padding: 1.1rem .75rem 1rem;
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
  }
  .mit-navi .marke { margin: 0 .35rem 1.1rem; }
  .mit-navi .logo { height: auto; max-height: 4.5rem; width: auto; max-width: 100%; }
  .mit-navi .navi { flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: .15rem; }
  .mit-navi .navi a { padding: .55rem .75rem; }
  .mit-navi .kopf-unten { margin: auto 0 0; flex-direction: column; align-items: flex-start; padding: .75rem .4rem 0;
    border-top: 1px solid var(--linie); }
}

.inhalt { flex: 1; width: 100%; max-width: 72rem; margin: 0 auto; padding: 1.25rem 1rem 2rem; min-width: 0; }
.handy .inhalt { max-width: 42rem; }
.schmal .inhalt { max-width: 26rem; }
.schmal .kopf { justify-content: center; }
@media (min-width: 900px) { .mit-navi .inhalt { padding: 1.5rem 2rem 2.5rem; margin: 0; } .mit-navi.handy .inhalt { margin: 0 auto; } }

.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: .875rem; padding: 1rem; margin-bottom: 1rem;
  min-width: 0; }
.spalten { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
.spalten > .karte { margin-bottom: 0; }
@media (min-width: 900px) { .spalten { grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); } }

/* ---- Knöpfe: einer in der Akzentfarbe je Seite, sonst weiß mit feiner Linie ---- */
button { font: inherit; cursor: pointer; border-radius: .65rem; border: 1px solid transparent; padding: .65rem 1.1rem; }
button[disabled] { cursor: not-allowed; opacity: .45; }
.haupt { background: var(--akzent); color: var(--akzent_text); font-weight: 600; border-color: transparent; }
.zweit, .leise { background: var(--flaeche); color: var(--schrift); border: 1px solid var(--rahmen); font-weight: 500; }
.leise { padding: .4rem .8rem; }
.gross { width: 100%; padding: 1rem; font-size: 1.1rem; border-radius: .875rem; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
label.knopf:focus-within { outline: 3px solid var(--akzent); outline-offset: 2px; }

/* minmax(0, …) und min-width: 0, damit Eingaben bei großer Schrift schmaler werden statt aus der Karte zu ragen
   (B4b VB5). */
.formular { display: grid; gap: .9rem; grid-template-columns: minmax(0, 1fr); }
.formular label { display: grid; gap: .3rem; font-weight: 600; grid-template-columns: minmax(0, 1fr); min-width: 0; }
input, select, textarea { font: inherit; padding: .6rem .7rem; border: 1px solid var(--rahmen); border-radius: .55rem;
  width: 100%; min-width: 0; max-width: 100%; background: var(--flaeche); color: var(--schrift); }
textarea { resize: vertical; }

/* Meldungen: Text in der Schrift auf heller Fläche, Art an Fläche und Rand (Rot, Grün). */
.meldung, .erfolg { background: var(--rot-hell); color: var(--schrift); padding: .7rem .9rem; border-radius: .65rem;
  border: 1px solid var(--linie); border-left: .35rem solid var(--rot); }
.erfolg { background: var(--gruen-hell); border-left-color: var(--gruen); }
.hinweis { color: var(--leise); font-size: .95rem; }
.leer { color: var(--leise); padding: 1.25rem 0; text-align: center; }
/* Hinweisband („1 Fahrzeug wartet auf Ihre Freigabe.“): helle Fläche aus der Akzentfarbe, Schrift dunkel */
.band { background: var(--akzent-hell); color: var(--schrift); border-radius: .65rem; padding: .6rem .9rem; margin: 0 0 1rem;
  border-left: .3rem solid var(--akzent); }

.liste { list-style: none; margin: 0; padding: 0; }
.liste li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 1rem; padding: .7rem 0;
  border-bottom: 1px solid var(--linie); }
.marke-klein { font-size: .85rem; padding: .1rem .55rem; border-radius: 1rem; background: var(--grau-hell); color: var(--schrift); }

/* ---- Bestand am Rechner ---- */
.seitenkopf { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-bottom: 1rem; }
.seitenkopf h1 { margin: 0 auto 0 0; }
.pillen { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.pillen a { display: inline-flex; align-items: center; gap: .35rem; text-decoration: none; border: 1px solid var(--linie);
  background: var(--flaeche); color: var(--schrift); border-radius: 999px; padding: .35rem .85rem; font-size: .9rem; }
.pillen a[aria-current="true"] { background: var(--akzent); color: var(--akzent_text); border-color: transparent; font-weight: 600; }
.pillen .zahl { font-variant-numeric: tabular-nums; }

.tabelle { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: .75rem; overflow: hidden; }
.tabelle th, .tabelle td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--linie); vertical-align: middle; }
.tabelle tr:last-child td { border-bottom: 0; }
.tabelle th { font-size: .8rem; color: var(--leise); font-weight: 600; background: var(--fein); }
.tabelle small, .zeile small { display: block; color: var(--leise); font-size: .85rem; }
.knoepfe { display: flex; flex-wrap: wrap; gap: .4rem; }
.knoepfe form { margin: 0; }
.werte { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .4rem 1rem; margin: 0; }
.werte dt { color: var(--leise); }
.werte dd { margin: 0; min-width: 0; }

/* Vorschaubild in Liste und Zeile (Foto oder Platzhalter) */
.daum { width: 4.25rem; aspect-ratio: 4 / 3; height: auto; object-fit: cover; border-radius: .4rem; display: block;
  background: var(--grau-hell); flex: none; }
.daum-leer { display: flex; align-items: center; justify-content: center; color: var(--leise); font-size: .75rem; }

/* Stand als farbige Marke */
.st { display: inline-block; border-radius: 999px; padding: .1rem .6rem; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.st-aufnahme, .st-in_arbeit, .st-archiviert { background: var(--grau-hell); color: var(--grau); }
.st-erfasst { background: var(--blau-hell); color: var(--blau); }
.st-zu_pruefen { background: var(--gelb-hell); color: var(--gelb); }
.st-bereit, .st-online { background: var(--gruen-hell); color: var(--gruen); }
.st-verkauft { background: var(--blau-hell); color: var(--blau); }

/* Schmale Bildschirme: Tabellen werden zu Karten statt seitlich zu laufen. */
@media (max-width: 640px) {
  .tabelle thead { display: none; }
  .tabelle, .tabelle tbody, .tabelle tr, .tabelle td { display: block; width: 100%; }
  .tabelle tr { padding: .5rem .75rem; border-bottom: 1px solid var(--linie); }
  .tabelle tr:last-child { border-bottom: 0; }
  .tabelle td { border: 0; padding: .15rem 0; }
}

/* ---- Handy: Start ---- */
.abschnitt { font-size: .85rem; font-weight: 600; color: var(--leise); text-transform: uppercase; letter-spacing: .03em;
  margin: 1.5rem 0 .25rem; }
.neu { margin: 1rem 0 .5rem; }
.zeilen { list-style: none; margin: 0; padding: 0; }
.zeile { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; padding: .65rem 0; border-bottom: 1px solid var(--linie); }
.zeile-text { flex: 1 1 9rem; min-width: 0; line-height: 1.35; }
.zeile-text strong { display: block; font-weight: 700; }
.stand-zeile { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .3rem; }
.knopf-klein { display: inline-flex; align-items: center; text-decoration: none; border: 1px solid var(--rahmen);
  background: var(--flaeche); color: var(--schrift); border-radius: 999px; padding: .3rem .9rem; font-size: .9rem; flex: none; }
.auto-link { color: inherit; text-decoration: none; }

/* ---- Handy: Schritte der Aufnahme ---- */
.zurueck { display: inline-block; color: var(--schrift); text-decoration: none; font-weight: 600; padding: .25rem 0; margin-bottom: .25rem; }
.zurueck:hover { text-decoration: underline; }
.schritte { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 4.5rem), 1fr)); gap: .3rem; margin: 0 0 1rem; }
.schritte a { text-align: center; padding: .45rem .25rem; border-radius: 999px; border: 1px solid var(--linie);
  color: var(--schrift); text-decoration: none; font-size: .9rem; background: var(--flaeche); }
.schritte a[aria-current="page"] { background: var(--akzent); color: var(--akzent_text); border-color: transparent; font-weight: 600; }
.wahl { border: 1px solid var(--linie); border-radius: .65rem; padding: .5rem .8rem; margin: 0 0 .8rem; display: flex;
  flex-wrap: wrap; gap: .4rem 1.2rem; min-width: 0; min-inline-size: 0; }
.wahl legend { font-weight: 600; padding: 0 .3rem; }
/* .formular label.wahl-knopf: sonst überstimmt .formular label (Raster) den Knopf, und „ja“ steht unter dem Punkt
   statt daneben (B4b VB7 c). */
.wahl-knopf, .formular label.wahl-knopf { display: inline-flex; align-items: center; gap: .45rem; font-weight: 400; padding: .3rem 0; }
.wahl-knopf input { width: auto; flex: 0 0 auto; min-width: 13px; min-height: 13px; accent-color: var(--akzent); }
.knopf { position: relative; display: inline-flex; align-items: center; justify-content: center; text-align: center;
  border-radius: .65rem; padding: .65rem 1.1rem; cursor: pointer; font-weight: 600; }
.knopf.gross { display: flex; }
.knopf input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; padding: 0; border: 0; }
.knopf-link { text-decoration: none; display: inline-block; }
/* Auswahl als Pillen (Marke, Modell, Linie, Extras) */
.wahl-taste { border-radius: 999px; padding: .45rem .95rem; }
a.leise { color: var(--schrift); border-radius: 999px; }
.plaetze { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .8rem; }
/* Bild und Text nebeneinander, bei großer Schrift untereinander (umbrechen statt quer laufen; B4b VB5). */
.platz { display: flex; flex-wrap: wrap; gap: .8rem; align-items: flex-start; margin: 0; }
.platz .bild { flex: 1 1 7.5rem; max-width: 9rem; min-width: 0; }
.platz-text { flex: 999 1 9rem; min-width: 0; display: grid; gap: .35rem; }
.platz .bild img, .vorschauen img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: .45rem; display: block;
  background: var(--grau-hell); }
.stand { font-size: .85rem; padding: .1rem .55rem; border-radius: 1rem; border: 1px solid var(--linie); justify-self: start; }
[data-stand="oben"] .stand, .eintrag[data-stand="oben"] .stand { border-color: var(--gruen); color: var(--gruen); background: var(--gruen-hell); }
[data-stand="fehler"] .stand { border-color: var(--rot); color: var(--rot); background: var(--rot-hell); }
[data-stand="doppelt"] .stand { border-style: dotted; border-color: currentColor; }
[data-stand="laedt"] .stand { border-style: dashed; }
.stapel, .vorschauen { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .4rem; }
.vorschauen { grid-template-columns: repeat(auto-fill, minmax(6rem, 1fr)); }
.eintrag { display: grid; gap: .25rem; }
.stapel .eintrag { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: .5rem 0; border-top: 1px solid var(--linie); }
/* Vorschau eines Papierfotos nie breiter als die Spalte (sonst lief die Seite bei 360 Pixel quer; B4b) */
.stapel .eintrag img { display: block; width: 100%; max-width: 12rem; height: auto; border-radius: .45rem; }
/* „Weiter zu …“ ist der nächste Schritt: ein Knopf mit eigener Fläche und Linie, kein Textlink (B4b VB7 d). */
.weiter { display: flex; align-items: center; justify-content: center; gap: .5rem; text-align: center; padding: .9rem 1rem;
  margin: .75rem 0 1rem; font-weight: 600; text-decoration: none; border-radius: .875rem; background: var(--flaeche);
  color: var(--schrift); border: 1px solid var(--rahmen); min-height: 3rem; }
.weiter.haupt { background: var(--akzent); color: var(--akzent_text); border-color: transparent; }
.verwerfen { margin: 1.5rem 0; }
.verwerfen summary { cursor: pointer; padding: .5rem 0; color: var(--leise); }

/* Punkt 9: Hinweis über dem Auslöser (nicht wegklickbar, ohne Skript sichtbar) und Prüfung des Ausschnitts */
.vorsicht { display: grid; gap: .2rem; background: var(--gelb-hell); color: var(--schrift); border-radius: .65rem;
  padding: .7rem .9rem; margin: .25rem 0 .75rem; border-left: .35rem solid var(--gelb); }
.vorsicht strong { font-size: 1.05rem; line-height: 1.35; }
.vorsicht span { color: var(--leise); font-size: .95rem; }
.pruefen { border-left: .35rem solid var(--akzent); }
.ausschnitt { display: block; margin: .25rem 0 .75rem; }
.ausschnitt img { display: block; width: 100%; height: auto; border-radius: .55rem; border: 1px solid var(--linie);
  background: var(--fein); }
.frage { font-weight: 700; font-size: 1.1rem; line-height: 1.35; margin: 0 0 .75rem; }
.entscheidung { display: grid; gap: .6rem; grid-template-columns: minmax(0, 1fr); }
.entscheidung form { margin: 0; }

/* B4b: Stand der Papiere (wird geprüft, angenommen, bitte neu fotografieren) und Herkunft gelesener Werte. Die Farbe
   sitzt am Rand, der Text bleibt in der Schrift (Kontrast geprüft). */
.pruefung { display: block; grid-column: 1 / -1; font-size: .9rem; padding: .15rem 0 .15rem .6rem; border-left: 3px solid var(--linie);
  overflow-wrap: anywhere; }
[data-pruefung="angenommen"] > .pruefung, .pruefung[data-pruefung="angenommen"] { border-left-color: var(--gruen); }
[data-pruefung="abgelehnt"] > .pruefung, .pruefung[data-pruefung="abgelehnt"],
[data-pruefung="liegen_geblieben"] > .pruefung, .pruefung[data-pruefung="liegen_geblieben"] { border-left-color: var(--rot); font-weight: 600; }
[data-pruefung="nicht_gelesen"] > .pruefung, .pruefung[data-pruefung="nicht_gelesen"] { border-left-color: var(--gelb); }
[data-pruefung="zu_bestaetigen"] > .pruefung, .pruefung[data-pruefung="zu_bestaetigen"] { border-left-color: var(--akzent); font-weight: 600; }
.herkunft { font-size: .85rem; font-weight: normal; color: var(--leise); }
.luecke { border-color: var(--rot); font-weight: 600; }
/* Lücke als Hinweis erkennbar, nicht wie „erfasst“ daneben (Nacharbeit B4b 8 c) */
.marke-klein.luecke { background: var(--rot-hell); border: 1px solid var(--linie); border-left: .35rem solid var(--rot); border-radius: .3rem; }
.tabelle .marke-klein.luecke { display: inline-block; margin: .2rem 0 0 .3rem; }
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.leer-karte { padding: 2rem 1rem; }
/* B5: Fahrzeug im Bestand (Bereich „Ausstattung (DAT)“) und Prüfseite der Katalogwerkstatt */
.dat-felder { list-style: none; padding: 0; margin: .25rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.dat-felder li { background: var(--gelb-hell); border-left: .25rem solid var(--gelb); border-radius: .5rem; padding: .3rem .6rem; min-width: 0; overflow-wrap: anywhere; }
.dat-felder li[data-bestaetigt] { background: var(--flaeche); border-left-color: var(--gruen); }
.marke-klein.gelb { background: var(--gelb-hell); color: var(--gelb); }
.dat-hochladen input[type=file], .dat-sammeln input[type=file], .werkstatt-hochladen input[type=file] { max-width: 100%; }
/* Prüfseite (Nacharbeit B5 Ziel 6): je Zelle oben der Ausschnitt in Originalgröße (nie verkleinert; breiter als die
   Karte: im eigenen Rahmen seitlich schiebbar, die Seite selbst läuft nicht quer), darunter Merkmal und Wert nebeneinander,
   das Auswahlfeld in ganzer Breite seines Texts */
.pruefzellen { display: grid; grid-template-columns: minmax(0, 1fr); gap: .5rem; margin: .5rem 0 1rem; }
.pruefzelle { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "bild bild" "merkmal wert";
  gap: .35rem .75rem; align-items: center; padding: .6rem .75rem; background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: .6rem; min-width: 0; }
.pruefzelle.unsicher { background: var(--gelb-hell); }
.zellbild-rahmen { grid-area: bild; overflow-x: auto; max-width: 100%; min-width: 0; }
.zellmerkmal { grid-area: merkmal; min-width: 0; overflow-wrap: anywhere; }
.zellmerkmal small { display: block; color: var(--leise); font-size: .85rem; }
.zellwert { grid-area: wert; justify-self: end; min-width: 0; max-width: 100%; }
.zellwert select { width: auto; min-width: 0; max-width: 100%; }
.zellwert-fest { font-weight: 700; font-size: 1.1rem; }
.zellbild { display: block; max-width: none; width: auto; height: auto; border: 1px solid var(--linie); border-radius: .3rem;
  background: var(--flaeche); }
@media (max-width: 400px) {
  .pruefzelle { grid-template-columns: minmax(0, 1fr); grid-template-areas: "bild" "merkmal" "wert"; }
  .zellwert { justify-self: start; }
}
.werkstatt-linie .formular > select { max-width: 100%; }
