/* Fahrschul-Terminplaner
   Gestaltung nach deutscher Verkehrsbeschilderung:
   Verkehrsblau (Autobahn), Verkehrsgelb (Bundesstraße), Verkehrsschwarz, weiße Schildränder. */

@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("schrift/barlow-semi-condensed-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("schrift/barlow-semi-condensed-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("schrift/barlow-semi-condensed-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --blau: #0E518D;          /* Verkehrsblau RAL 5017 */
  --blau-dunkel: #0A3F6E;
  --blau-hell: #E5EDF6;
  --schwarz: #1E1E1E;       /* Verkehrsschwarz RAL 9017 */
  --asphalt: #EDEFF2;
  --flaeche: #FFFFFF;
  --flaeche-2: #F6F8FA;
  --linie: #D7DCE2;
  --linie-stark: #B5BEC9;
  --text: #1E1E1E;
  --text-2: #55606C;
  --gelb: #F5C400;          /* Verkehrsgelb RAL 1023 */
  --gelb-rand: #CFA500;
  --gelb-hell: #FFF5CC;
  --gruen: #00875A;         /* Verkehrsgrün RAL 6024 */
  --gruen-text: #006644;
  --gruen-hell: #E1F2EA;
  --rot: #C1121C;           /* Verkehrsrot RAL 3020 */
  --rot-hell: #FCE7E8;
  --fokus: #4C8DDB;
  --schrift-schild: "Barlow Semi Condensed", "Bahnschrift", "DIN Alternate", "Arial Narrow", sans-serif;
  --schrift: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r: 10px;
  --navhoehe: 62px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--schrift);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--asphalt);
  -webkit-font-smoothing: antialiased;
}
img, svg { vertical-align: middle; }
a { color: var(--blau); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--blau-dunkel); }
p { margin: 0 0 .75em; }
h1, h2, h3 {
  font-family: var(--schrift-schild);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 .5em;
}
h1 { font-size: 2rem; font-weight: 700; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }
small { font-size: .85rem; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9em;
  background: #EEF1F4;
  padding: 1px 5px;
  border-radius: 4px;
}
:focus-visible { outline: 3px solid var(--fokus); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sprung { position: absolute; left: -9999px; top: 8px; z-index: 100; background: #fff; padding: 8px 12px; border-radius: 6px; }
.sprung:focus { left: 8px; }
.leise { color: var(--text-2); }
.warn-text { color: var(--rot); font-weight: 600; }
.zahl { font-family: var(--schrift-schild); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ Kopf */

.kopf {
  background: var(--blau);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 40;
}
.kopf-innen {
  max-width: 1100px;
  margin: 0 auto;
  padding: 9px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
}
.kopf-innen.breit, .nav-innen.breit, .inhalt.breit { max-width: 1480px; }
.marke {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  min-width: 0;
}
.marke:hover { color: #fff; }
.marke .logo { flex: none; }
.marke-text {
  display: flex;
  flex-direction: column;
  font-family: var(--schrift-schild);
  line-height: 1;
  min-width: 0;
}
.marke-klein { font-size: .82rem; font-weight: 500; opacity: .85; }
.marke-gross {
  font-size: 1.4rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Bereichsname als Zusatzzeichen: weißes Schild mit schwarzem Rand */
.kopf-bereich {
  flex: none;
  background: #fff;
  color: var(--schwarz);
  border: 2px solid var(--schwarz);
  box-shadow: 0 0 0 2px #fff;
  border-radius: 4px;
  padding: 1px 9px;
  font-family: var(--schrift-schild);
  font-weight: 600;
  font-size: .92rem;
  line-height: 1.35;
}
.menue { margin-left: auto; position: relative; }
.menue summary { list-style: none; cursor: pointer; border-radius: 50%; }
.menue summary::-webkit-details-marker { display: none; }
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .75);
  display: grid;
  place-items: center;
  font-family: var(--schrift-schild);
  font-weight: 600;
  font-size: 1rem;
}
.menue[open] .avatar { background: #fff; color: var(--blau); }
.menue-inhalt {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: #fff;
  color: var(--text);
  border-radius: var(--r);
  box-shadow: 0 10px 30px rgba(10, 30, 60, .2);
  min-width: 230px;
  padding: 6px;
  z-index: 50;
}
.menue-inhalt form { margin: 0; }
.menue-inhalt a, .menue-inhalt button {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.menue-inhalt a:hover, .menue-inhalt button:hover { background: var(--asphalt); color: var(--text); }
.menue-name {
  padding: 8px 12px 10px;
  margin: 0 0 4px;
  border-bottom: 1px solid var(--linie);
  font-weight: 600;
}
.menue-name small { display: block; font-weight: 400; color: var(--text-2); }

/* ------------------------------------------------------------------ Navigation */

.nav { background: var(--flaeche); border-bottom: 1px solid var(--linie); }
.nav-innen {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 8px;
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-innen::-webkit-scrollbar { display: none; }
.nav a {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 11px 10px;
  color: var(--text-2);
  text-decoration: none;
  font-family: var(--schrift-schild);
  font-weight: 600;
  font-size: 1.02rem;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.nav a:hover { color: var(--text); }
.nav a.aktiv { color: var(--blau); border-bottom-color: var(--blau); }

@media (max-width: 759px) {
  .bereich-chef .nav { position: sticky; top: 58px; z-index: 30; }
  .bereich-chef .nav a .ic { display: none; }

  .bereich-fahrlehrer.mit-nav .nav, .bereich-schueler.mit-nav .nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    border-top: 1px solid var(--linie);
    border-bottom: 0;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -4px 16px rgba(10, 30, 60, .07);
  }
  .bereich-fahrlehrer .nav-innen, .bereich-schueler .nav-innen { padding: 0; overflow: visible; gap: 0; }
  .bereich-fahrlehrer .nav a, .bereich-schueler .nav a {
    flex: 1 1 0;
    min-width: 0;
    flex-direction: column;
    gap: 1px;
    padding: 7px 2px 6px;
    font-size: .78rem;
    border-bottom: 0;
    border-top: 3px solid transparent;
  }
  .bereich-fahrlehrer .nav a span, .bereich-schueler .nav a span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .bereich-fahrlehrer .nav a.aktiv, .bereich-schueler .nav a.aktiv { border-top-color: var(--blau); }
  body.bereich-fahrlehrer.mit-nav, body.bereich-schueler.mit-nav {
    padding-bottom: calc(var(--navhoehe) + env(safe-area-inset-bottom));
  }
  .kopf-bereich { display: none; }
  /* sechs Punkte (mit Konto und Dokumenten): etwas kleinere Schrift, damit „Meine Zeiten“ passt */
  .bereich-schueler .nav-innen:has(> a:nth-child(6)) a { font-size: .7rem; letter-spacing: -.02em; padding-left: 1px; padding-right: 1px; }
}

/* ------------------------------------------------------------------ Inhalt */

.inhalt { max-width: 1100px; margin: 0 auto; padding: 22px 16px 48px; }
.schmal { max-width: 640px; margin-left: auto; margin-right: auto; }
.fuss {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px 28px;
  color: var(--text-2);
  font-size: .85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}
.fuss a { color: var(--text-2); }
.kopfzeile {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 18px;
}
.kopfzeile h1 { margin: 0; }
.untertitel { margin: 4px 0 0; color: var(--text-2); }
.einleitung { color: var(--text-2); max-width: 62ch; }
.zurueck { margin: 0 0 6px; }
.zurueck a { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; font-weight: 600; }
.abschnitt { margin-top: 30px; }
.abschnitt > h2 { margin-bottom: 10px; }
.abschnitt-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.abschnitt-kopf h2 { margin: 0; }

.karte {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--r);
  padding: 18px;
}
.karte > h2:first-child, .karte > h3:first-child { margin-top: 0; }
.raster-2 { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.raster-3 { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 860px) {
  .raster-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .raster-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.leer {
  color: var(--text-2);
  padding: 16px;
  background: var(--flaeche);
  border: 1px dashed var(--linie-stark);
  border-radius: var(--r);
  margin: 0;
}
.leer .knopf { margin-top: 10px; }
.notiz { margin: 4px 0 0; color: var(--text-2); font-size: .92rem; }

body:has(.inhalt.breit) .fuss { max-width: 1480px; }

/* ------------------------------------------------------------------ Schild (Autobahn-Wegweiser) */

.schild {
  background: var(--blau);
  color: #fff;
  border-radius: 14px;
  padding: 5px;
}
.schild-innen {
  border: 2px solid #fff;
  border-radius: 10px;
  padding: 16px 18px;
}
.schild a { color: #fff; }
.schild .leise { color: rgba(255, 255, 255, .82); }
.schild-titel {
  font-family: var(--schrift-schild);
  font-weight: 600;
  font-size: 1.05rem;
  margin: 0 0 2px;
  opacity: .9;
}
.schild-tag {
  font-family: var(--schrift-schild);
  font-weight: 600;
  font-size: 1.4rem;
  margin: 0;
}
.schild-zeit {
  font-family: var(--schrift-schild);
  font-weight: 700;
  font-size: 3.2rem;
  line-height: 1;
  margin: 2px 0 10px;
  font-variant-numeric: tabular-nums;
}
.schild .route { padding-top: 10px; border-top: 1.5px solid rgba(255, 255, 255, .55); font-size: 1.02rem; }
.schild .route dt { color: rgba(255, 255, 255, .8); }
.schild .knopfreihe { margin-top: 12px; }
.schild .knopf { background: #fff; border-color: #fff; color: var(--blau); }
.schild .knopf:hover { background: var(--blau-hell); color: var(--blau-dunkel); }
.schild .knopf-umriss { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .8); }
.schild .knopf-umriss:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.schild-leer .schild-innen { padding: 18px; }
.schild-leer p { margin: 0 0 10px; font-size: 1.05rem; }

/* Gelbes Baustellenschild für den Testbetrieb */
.baustelle {
  background: var(--gelb);
  color: var(--schwarz);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 18px;
}
.baustelle > div {
  border: 2px solid var(--schwarz);
  border-radius: 7px;
  padding: 10px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: space-between;
}
.baustelle p { margin: 0; }
.baustelle a { color: var(--schwarz); font-weight: 700; }

/* ------------------------------------------------------------------ Knöpfe */

.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1.5px solid var(--linie-stark);
  background: var(--flaeche);
  color: var(--text);
  font-family: var(--schrift-schild);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.knopf:hover { border-color: var(--text-2); color: var(--text); }
.knopf-haupt { background: var(--blau); border-color: var(--blau); color: #fff; }
.knopf-haupt:hover { background: var(--blau-dunkel); border-color: var(--blau-dunkel); color: #fff; }
.knopf-gruen { background: var(--gruen); border-color: var(--gruen); color: #fff; }
.knopf-gruen:hover { background: #006f4a; border-color: #006f4a; color: #fff; }
.knopf-rot { border-color: var(--rot); color: var(--rot); }
.knopf-rot:hover { background: var(--rot-hell); border-color: var(--rot); color: var(--rot); }
.knopf-klein { min-height: 36px; padding: 0 12px; font-size: .97rem; }
.knopf-icon { width: 44px; padding: 0; }
.knopf-breit { width: 100%; }
.knopf-text-rot {
  border: 0;
  background: none;
  color: var(--rot);
  padding: 4px 0;
  min-height: 0;
  font-family: var(--schrift);
  font-weight: 500;
  font-size: .95rem;
  text-decoration: underline;
}
.knopf-text-rot:hover { color: #8f0d15; }
.knopf[disabled] { opacity: .5; cursor: not-allowed; }
.knopfreihe { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.knopfreihe form { margin: 0; }
.loeschen-form { margin-top: 18px; text-align: right; }

/* ------------------------------------------------------------------ Formulare */

.formular { display: grid; gap: 16px; }
.formular h2 { margin: 6px 0 -4px; font-size: 1.2rem; }
.feld { display: grid; gap: 6px; margin: 0; border: 0; padding: 0; min-width: 0; }
.feld > span:first-child, .feld > legend { font-weight: 600; font-size: .95rem; padding: 0; }
.feld > legend { margin-bottom: 6px; }
.feld small { color: var(--text-2); }
.feld-wert { margin: 0; padding: 4px 0; font-weight: 600; font-size: 1.05rem; }
input[type=text], input[type=password], input[type=email], input[type=tel], input[type=url], input[type=date],
input[type=time], input[type=number], input[type=search], select, textarea {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1.5px solid var(--linie-stark);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
}
input[type=date], input[type=time] { min-width: 0; -webkit-appearance: none; appearance: none; text-align: left; }
input::-webkit-date-and-time-value { text-align: left; }
input[type=color] { width: 64px; height: 44px; padding: 3px; border: 1.5px solid var(--linie-stark); border-radius: 8px; background: #fff; }
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blau); box-shadow: 0 0 0 3px rgba(14, 81, 141, .2); }
input[readonly] { background: var(--flaeche-2); }
.feldreihe { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.feldreihe > .feld { min-width: 0; }
.haken { display: flex; gap: 10px; align-items: center; cursor: pointer; }
.haken input { width: 20px; height: 20px; accent-color: var(--blau); flex: none; margin: 0; }
/* Aufklappbarer Abschnitt im Formular, z. B. „Eigene Preise“ beim Schüler */
.klappe { margin: 16px 0 4px; border: 1px solid var(--linie); border-radius: var(--r); background: var(--flaeche-2); }
.klappe > summary { cursor: pointer; padding: 12px 14px; font-weight: 600; }
.klappe > summary .leise { font-weight: 400; }
.klappe[open] > summary { border-bottom: 1px solid var(--linie); }
.klappe > p, .klappe > .tabelle-rahmen { margin: 12px 14px; }
.eingabe-preis { width: 110px; max-width: 100%; text-align: right; }

.wahl { display: flex; flex-wrap: wrap; gap: 8px; }
.wahl-chip { position: relative; display: inline-flex; }
.wahl-chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.wahl-chip span {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 7px;
  border: 1.5px solid var(--linie-stark);
  background: #fff;
  font-family: var(--schrift-schild);
  font-weight: 600;
  font-size: 1.02rem;
}
.wahl-chip input:focus-visible + span { outline: 3px solid var(--fokus); outline-offset: 2px; }
.wahl-chip input:checked + span { border-color: var(--schwarz); box-shadow: inset 0 0 0 1px var(--schwarz); }
.wahl-chip.art-ueberland input:checked + span { background: var(--gelb); border-color: var(--gelb-rand); box-shadow: none; }
.wahl-chip.art-autobahn input:checked + span { background: var(--blau); border-color: var(--blau); color: #fff; box-shadow: none; }
.wahl-chip.art-nacht input:checked + span { background: var(--schwarz); border-color: var(--schwarz); color: #fff; box-shadow: none; }
.wahl-chip.ort input:checked + span { background: var(--blau-hell); border-color: var(--blau); color: var(--blau-dunkel); box-shadow: none; }

.schnellwahl { display: flex; flex-wrap: wrap; gap: 6px; }
.schnellwahl:empty { display: none; }
.schnellwahl button {
  font: inherit;
  font-size: .85rem;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--linie-stark);
  background: #fff;
  color: var(--text);
  cursor: pointer;
}
.schnellwahl button:hover { border-color: var(--blau); color: var(--blau); }
.adress-vorschau { font-size: .88rem; color: var(--text-2); margin: 0; }
.adress-vorschau.fehlt { color: var(--rot); }
.versteckt { display: none !important; }

/* ------------------------------------------------------------------ Meldungen */

.meldung {
  padding: 12px 14px;
  border-radius: 8px;
  border-left: 5px solid var(--linie-stark);
  margin: 0 0 16px;
  background: #fff;
}
.meldung-ok { border-color: var(--gruen); background: var(--gruen-hell); }
.meldung-fehler { border-color: var(--rot); background: var(--rot-hell); }
.meldung-hinweis { border-color: var(--gelb-rand); background: var(--gelb-hell); }
.meldung-info { border-color: var(--blau); background: var(--blau-hell); }
.meldung ul { margin: 6px 0 0; padding-left: 20px; }
.meldung .route { margin-top: 8px; }
.meldung .knopf { margin-top: 8px; }
.zugang {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 4px 14px;
  margin: 10px 0;
  padding: 12px 14px;
  background: #fff;
  border: 1px dashed var(--linie-stark);
  border-radius: 8px;
}
.zugang span { color: var(--text-2); }
.zugang code { font-size: 1rem; font-weight: 600; word-break: break-all; background: none; padding: 0; }

/* ------------------------------------------------------------------ Marken (Art, Status) */

.marke-art {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 4px;
  border: 1.5px solid transparent;
  font-family: var(--schrift-schild);
  font-weight: 600;
  font-size: .88rem;
  line-height: 1.35;
  white-space: nowrap;
  color: var(--schwarz);
  vertical-align: 1px;
}
.marke-art.art-uebung { background: #fff; border-color: var(--schwarz); }
.marke-art.art-ueberland { background: var(--gelb); border-color: var(--gelb-rand); }
.marke-art.art-autobahn { background: var(--blau); border-color: var(--blau); color: #fff; }
.marke-art.art-nacht { background: var(--schwarz); border-color: var(--schwarz); color: #fff; }
.marke-art.ev-pruefung { background: #fff; border-color: var(--rot); color: var(--rot); }

.marke-status {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  white-space: nowrap;
  background: var(--asphalt);
  color: var(--text-2);
}
.st-geplant { background: var(--blau-hell); color: var(--blau); }
.st-durchgefuehrt, .erg-bestanden, .st-aktiv { background: var(--gruen-hell); color: var(--gruen-text); }
.st-abgesagt { text-decoration: line-through; }
.st-nicht_erschienen, .erg-nicht_bestanden { background: var(--rot-hell); color: var(--rot); }
.erg-offen, .st-pausiert, .st-offen { background: var(--gelb-hell); color: #6e5400; }
.betrag-offen { color: var(--rot); }
.betrag-ok { color: var(--gruen-text); }
.farbpunkt { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--farbe, var(--blau)); margin-right: 6px; flex: none; }

/* ------------------------------------------------------------------ Listen */

.liste {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--r);
  overflow: hidden;
}
.liste > li + li { border-top: 1px solid var(--linie); }
.liste-zeile {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 4px 14px;
  align-items: center;
  padding: 12px 14px;
  color: inherit;
  text-decoration: none;
}
a.liste-zeile:hover { background: var(--flaeche-2); color: inherit; }
.liste-zeit { display: flex; flex-direction: column; font-family: var(--schrift-schild); line-height: 1.2; }
.liste-zeit strong { font-size: 1.05rem; }
.liste-zeit span { color: var(--text-2); font-weight: 500; font-variant-numeric: tabular-nums; }
.liste-haupt { min-width: 0; }
.liste-aktion { justify-self: end; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.liste-aktion form { margin: 0; }
.liste-gruppe { font-family: var(--schrift-schild); font-weight: 600; font-size: 1.1rem; margin: 22px 0 8px; }
.liste-gruppe:first-child { margin-top: 0; }
@media (max-width: 560px) {
  .liste-zeile { grid-template-columns: 74px minmax(0, 1fr); }
  .liste-aktion { grid-column: 2; justify-self: start; justify-content: flex-start; margin-top: 4px; }
}

.route {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 2px 12px;
  margin: 6px 0 2px;
  line-height: 1.35;
}
.route dt { font-size: .8rem; font-weight: 600; color: var(--text-2); padding-top: 2px; }
.route dd { margin: 0; min-width: 0; word-break: break-word; }

.daten { margin: 0; display: grid; gap: 10px; }
.daten > div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 10px; }
.daten dt { color: var(--text-2); }
.daten dd { margin: 0; word-break: break-word; }
@media (max-width: 480px) { .daten > div { grid-template-columns: minmax(0, 1fr); gap: 0; } }

/* Strich-Anzeige der Sonderfahrten: jeder Strich = 45 Minuten */
.sonder { margin: 0 0 12px; display: grid; gap: 9px; }
.sonder-zeile { display: grid; grid-template-columns: 82px minmax(0, 1fr); align-items: center; gap: 10px; }
.sonder dt { font-family: var(--schrift-schild); font-weight: 600; font-size: 1.05rem; }
.sonder dd { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sonder-zeile.erledigt dt { color: var(--gruen-text); }
.striche { display: inline-flex; gap: 4px; }
.striche i { display: block; width: 20px; height: 9px; border-radius: 2px; background: #DCE1E7; }
.striche.art-ueberland i.voll { background: var(--gelb); box-shadow: inset 0 0 0 1px var(--gelb-rand); }
.striche.art-autobahn i.voll { background: var(--blau); }
.striche.art-nacht i.voll { background: var(--schwarz); }
.pruef-stand { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--linie); }
.pruef-stand > div { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.konto-kurz { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--linie); }

/* ------------------------------------------------------------------ Tabellen */

.tabelle-rahmen { overflow-x: auto; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r); }
table.tabelle { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tabelle th {
  text-align: left;
  font-weight: 600;
  color: var(--text-2);
  font-size: .85rem;
  padding: 10px 12px;
  border-bottom: 1px solid var(--linie);
  background: var(--flaeche-2);
  white-space: nowrap;
}
.tabelle td { padding: 10px 12px; border-bottom: 1px solid var(--linie); vertical-align: middle; }
.tabelle tbody tr:last-child td { border-bottom: 0; }
.tabelle .rechts { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabelle tfoot td { font-weight: 700; background: var(--flaeche-2); border-top: 1px solid var(--linie); border-bottom: 0; }
.tabelle a.zeilenlink { font-weight: 600; text-decoration: none; }
.tabelle a.zeilenlink:hover { text-decoration: underline; }
.tabelle input, .tabelle select { min-height: 38px; padding: 6px 8px; }
.tabelle .eng { width: 1%; white-space: nowrap; }
.tabelle tr.inaktiv td { color: var(--text-2); }

/* ------------------------------------------------------------------ Filter, Reiter, Datumsnavigation */

.filterleiste { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 16px; }
.filterleiste .feld { min-width: 170px; flex: 0 1 auto; }
.filterleiste .feld-suche { flex: 1 1 220px; }
.reiter { display: inline-flex; border: 1.5px solid var(--linie-stark); border-radius: 8px; overflow: hidden; background: #fff; }
.reiter a {
  padding: 0 16px;
  min-height: 41px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  font-family: var(--schrift-schild);
  font-weight: 600;
  font-size: 1.02rem;
}
.reiter a + a { border-left: 1.5px solid var(--linie-stark); }
.reiter a.aktiv { background: var(--blau); color: #fff; }
.datumnav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.datumnav-label { font-family: var(--schrift-schild); font-weight: 600; font-size: 1.3rem; margin-left: 6px; }
.legende { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 0; padding: 0; list-style: none; font-size: .9rem; color: var(--text-2); }
.legende li { display: inline-flex; align-items: center; gap: 6px; }

/* ------------------------------------------------------------------ Kalender */

.kal-scroll {
  overflow-x: auto;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--r);
}
.kal { min-width: calc(3.5rem + var(--spalten) * 8.5rem); }
.kal-kopf, .kal-koerper {
  display: grid;
  grid-template-columns: 3.5rem repeat(var(--spalten), minmax(8.5rem, 1fr));
}
.kal-kopf { border-bottom: 1px solid var(--linie); }
.kal-spaltenkopf { padding: 8px 9px; border-left: 1px solid var(--linie); font-family: var(--schrift-schild); min-width: 0; }
.kal-spaltenkopf a { color: inherit; text-decoration: none; display: block; }
.kal-kopf-titel { display: block; font-weight: 700; font-size: 1.08rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kal-kopf-unter { display: block; color: var(--text-2); font-size: .9rem; }
.kal-spaltenkopf.heute { background: var(--blau); color: #fff; }
.kal-spaltenkopf.heute .kal-kopf-unter { color: rgba(255, 255, 255, .85); }
.kal-spaltenkopf.mit-farbe { box-shadow: inset 0 4px 0 var(--farbe); }
.kal-koerper { position: relative; }
.kal-zeiten { position: relative; }
.kal-zeiten span {
  position: absolute;
  right: 7px;
  margin-top: 2px;
  font-family: var(--schrift-schild);
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.kal-spalte {
  position: relative;
  border-left: 1px solid var(--linie);
  background-image: repeating-linear-gradient(to bottom, var(--linie) 0, var(--linie) 1px, transparent 1px, transparent var(--stunde));
}
.kal-spalte.heute { background-color: #F3F7FC; }
.kal-ev {
  position: absolute;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 6px;
  padding: 3px 6px;
  font-size: .8rem;
  line-height: 1.25;
  text-decoration: none;
  color: var(--text);
  background: #fff;
  border: 1.5px solid var(--schwarz);
}
.kal-ev:hover { z-index: 3; box-shadow: 0 4px 14px rgba(10, 30, 60, .2); color: inherit; }
.kal-ev-zeit { font-family: var(--schrift-schild); font-weight: 600; font-size: .85rem; }
.kal-ev-titel { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kal-ev-zeile { opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kal-ev.kurz { padding-top: 2px; padding-bottom: 2px; line-height: 1.2; }
.kal-ev.kurz .kal-ev-zeile { display: none; }
.kal-ev.art-ueberland { background: var(--gelb); border-color: var(--gelb-rand); }
.kal-ev.art-autobahn { background: var(--blau); border-color: var(--blau); color: #fff; }
.kal-ev.art-nacht { background: var(--schwarz); border-color: var(--schwarz); color: #fff; }
.kal-ev.ev-pruefung { background: #fff; border: 2px solid var(--rot); color: var(--rot); }
.kal-ev.mit-farbe {
  background: #fff;
  background: color-mix(in srgb, var(--farbe) 13%, #fff);
  border-color: var(--farbe);
  border-left-width: 5px;
  color: var(--text);
}
.kal-ev.st-abgesagt { opacity: .45; }
.kal-ev.st-abgesagt .kal-ev-titel { text-decoration: line-through; }
.kal-ev.st-nicht_erschienen { outline: 2px dashed var(--rot); outline-offset: -2px; }
.kal-ev.st-durchgefuehrt::after {
  content: "✓";
  position: absolute;
  right: 5px;
  top: 2px;
  font-weight: 700;
}

.kal-liste { display: none; }
@media (max-width: 759px) {
  .kal-scroll { display: none; }
  .kal-liste { display: block; }
}
.kal-liste .tag { margin-bottom: 16px; }
.kal-liste h3 { margin: 0 0 6px; font-size: 1.1rem; }
.kal-liste h3 span { color: var(--text-2); font-weight: 500; }
.kal-liste .tag.heute h3 { color: var(--blau); }
.kal-liste .tag.mit-farbe h3 { display: flex; align-items: center; gap: 8px; }
.kal-liste .tag.mit-farbe h3::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--farbe); }
.kal-liste ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.li-ev {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--linie);
  border-left: 6px solid var(--schwarz);
  color: inherit;
  text-decoration: none;
}
a.li-ev:hover { color: inherit; background: var(--flaeche-2); }
.li-ev.art-ueberland { border-left-color: var(--gelb); }
.li-ev.art-autobahn { border-left-color: var(--blau); }
.li-ev.art-nacht { border-left-color: var(--schwarz); }
.li-ev.ev-pruefung { border-left-color: var(--rot); }
.li-ev.mit-farbe { border-left-color: var(--farbe); }
.li-ev.st-abgesagt { opacity: .55; }
.li-ev.st-abgesagt strong { text-decoration: line-through; }
.li-zeit { font-family: var(--schrift-schild); font-weight: 600; font-variant-numeric: tabular-nums; }
.li-text { min-width: 0; }
.li-text small { display: block; color: var(--text-2); }
.tag-leer { margin: 0; font-size: .92rem; }

/* ------------------------------------------------------------------ Fahrlehrer: Heute */

.fahrten { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.fahrt {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-left: 6px solid var(--schwarz);
  border-radius: var(--r);
  padding: 14px 16px;
}
.fahrt.art-ueberland { border-left-color: var(--gelb); }
.fahrt.art-autobahn { border-left-color: var(--blau); }
.fahrt.art-nacht { border-left-color: var(--schwarz); }
.fahrt.ev-pruefung { border-left-color: var(--rot); }
.fahrt.st-abgesagt { opacity: .6; }
.fahrt-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.fahrt-zeit { font-family: var(--schrift-schild); font-weight: 700; font-size: 1.55rem; line-height: 1.05; font-variant-numeric: tabular-nums; }
.fahrt-name { font-weight: 600; font-size: 1.08rem; margin: 2px 0 6px; }
.fahrt-name a { color: inherit; }
.fahrt-info { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; color: var(--text-2); font-size: .92rem; margin-bottom: 6px; }
.fahrt-aktionen { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.fahrt-aktionen form { margin: 0; }

/* ------------------------------------------------------------------ Übersichten */

.zusammenfassung {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}
.zusammenfassung li > a, .zusammenfassung li > span {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 12px;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
}
.zusammenfassung li > a:hover { border-color: var(--blau); }
.zusammenfassung .zahl { font-size: 1.25rem; }
.zusammenfassung .warn .zahl { color: var(--rot); }

.begruessung { margin-bottom: 16px; }
.begruessung h1 { margin: 0; }
.begruessung p { margin: 4px 0 0; color: var(--text-2); }
.grosser-knopf { margin: 16px 0 0; }
.kontaktzeile { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* ------------------------------------------------------------------ Login und Startseite */

.seite-login .kopf { display: none; }
.seite-login .fuss, .seite-start .fuss { text-align: center; }
.seite-login .fuss > span, .seite-start .fuss > span { display: none; }
.login { max-width: 420px; margin: 7vh auto 0; }
.login-schild .schild-innen { text-align: center; padding: 22px 18px 18px; }
.login-schild .logo { display: block; margin: 0 auto 10px; }
.login-schule { margin: 0; font-family: var(--schrift-schild); font-weight: 600; font-size: 1.1rem; opacity: .9; }
.login-titel { margin: 2px 0 0; font-size: 2.3rem; font-weight: 700; }
.login-form { margin-top: 14px; display: grid; gap: 14px; }
.login-text { margin: 0; color: var(--text-2); }
.login-hilfe { margin: 0; font-size: .85rem; color: var(--text-2); }
.login-hilfe a { display: inline-block; margin-top: 4px; }
.login-zurueck { text-align: center; margin-top: 14px; }
.notfall-titel { margin: 0; font-size: 1.25rem; }
.notfall-schritte { margin: 0; padding-left: 1.3em; display: grid; gap: 8px; color: var(--text-2); }
.notfall-datei { display: block; margin-top: 6px; padding: 8px 10px; font-size: 1rem; font-weight: 600; color: var(--text); word-break: break-all; user-select: all; }

.seite-start .kopf { display: none; }
.start { max-width: 560px; margin: 8vh auto 0; }
.start-marke { display: flex; align-items: center; gap: 18px; margin-bottom: 26px; }
.start-marke h1 { margin: 0; font-size: 2.6rem; line-height: .95; }
.start-marke h1 span { display: block; font-size: 1.3rem; font-weight: 500; color: var(--text-2); margin-bottom: 4px; }
.wegweiser .schild-innen { padding: 0; }
.wegweiser a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  color: #fff;
  text-decoration: none;
  font-family: var(--schrift-schild);
  font-weight: 600;
  font-size: 1.85rem;
  line-height: 1.1;
}
.wegweiser a small { display: block; font-family: var(--schrift); font-weight: 400; font-size: .9rem; opacity: .85; margin-top: 3px; }
.wegweiser a + a { border-top: 2px solid #fff; }
.wegweiser a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.wegweiser a:first-child { border-radius: 8px 8px 0 0; }
.wegweiser a:last-child { border-radius: 0 0 8px 8px; }
.wegweiser .ic { flex: none; transform: rotate(-45deg); }
.start-fuss { margin-top: 22px; color: var(--text-2); font-size: .9rem; }

/* ------------------------------------------------------------------ Demo */

/* Gelbes Zusatzzeichen "Demo" auf der Startseite */
.demo-zeichen {
  display: inline-block;
  margin-top: 10px;
  padding: 0 9px;
  background: var(--gelb);
  color: var(--schwarz);
  border: 2px solid var(--schwarz);
  box-shadow: 0 0 0 2px var(--gelb);
  border-radius: 4px;
  font-family: var(--schrift-schild);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.4;
}
.demo-einleitung { margin: 0 0 18px; font-size: 1.1rem; color: var(--text-2); }
.demo-form { display: grid; gap: 14px; }
.demo-hinweis { margin: 16px 0 0; font-size: .88rem; color: var(--text-2); }

/* Leiste unter dem Kopf: gelbes Schild mit Umschalter zwischen den drei Bereichen */
.demo-leiste {
  background: var(--gelb);
  color: var(--schwarz);
  border-bottom: 2px solid var(--schwarz);
}
.demo-leiste-innen {
  max-width: 1100px;
  margin: 0 auto;
  padding: 7px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}
.demo-leiste-innen.breit { max-width: 1480px; }
.demo-marke {
  font-family: var(--schrift-schild);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.4;
}
.demo-wechsel {
  display: flex;
  border: 2px solid var(--schwarz);
  border-radius: 6px;
  overflow: hidden;
}
.demo-wechsel a {
  padding: 2px 12px;
  color: var(--schwarz);
  text-decoration: none;
  font-family: var(--schrift-schild);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.5;
  white-space: nowrap;
}
.demo-wechsel a + a { border-left: 2px solid var(--schwarz); }
.demo-wechsel a:hover { background: rgba(30, 30, 30, .12); color: var(--schwarz); }
.demo-wechsel a.aktiv { background: var(--schwarz); color: var(--gelb); }
.demo-wechsel a:focus-visible { outline-offset: -5px; }
.demo-info { margin: 0 0 0 auto; font-size: .88rem; }
@media (max-width: 759px) {
  .demo-info { display: none; }
  .demo-wechsel { flex: 1 1 auto; }
  .demo-wechsel a { flex: 1 1 0; text-align: center; padding: 2px 6px; }
}
@media print { .demo-leiste { display: none; } }

.seite-fehler .karte { margin-top: 10vh; }
.seite-fehler .logo { margin-bottom: 12px; }

/* ------------------------------------------------------------------ Druck */

.druck-seite { background: #fff; }
.druck-seite .inhalt { max-width: 800px; }
.druck-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 26px; }
.druck-kopf h1 { margin: 0 0 4px; }
.druck-absender { text-align: right; font-size: .9rem; color: var(--text-2); }
@media print {
  .kopf, .nav, .fuss, .nicht-drucken, .knopf { display: none !important; }
  body { background: #fff; padding: 0 !important; }
  .inhalt { padding: 0; max-width: none; }
  .tabelle-rahmen { border: 0; overflow: visible; }
  a { color: inherit; text-decoration: none; }
}

@media (max-width: 480px) {
  h1 { font-size: 1.75rem; }
  .schild-zeit { font-size: 2.7rem; }
  .karte { padding: 15px; }
  .inhalt { padding-top: 18px; }
  .wegweiser a { font-size: 1.55rem; padding: 14px 16px; }
  .start-marke h1 { font-size: 2.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Meldungen (Absage / Änderung) */
.meldungen{margin:0 0 18px}
.meldung-neu{display:flex;gap:14px;align-items:flex-start;justify-content:space-between}
.meldung-neu p{margin:6px 0 0}
.meldung-neu small{opacity:.75;margin-left:6px}
.meldung-neu form{flex:none}
.meldungen-alle{text-align:right;margin-top:-6px}

/* Fusszeile: Programmname */
.fuss-app { opacity: .75; }
.fuss-app a { color: inherit; }

/* Dokumentenmappe */
.dokumente{list-style:none;margin:0;padding:0;display:grid;gap:12px}
.dokument{display:flex;gap:14px;align-items:flex-start;background:#fff;border:1px solid var(--rand,#dde3ea);border-radius:12px;padding:12px}
.dokument-neu{border-color:var(--blau,#0E518D);box-shadow:0 0 0 2px rgba(14,81,141,.12)}
.dokument-vorschau{flex:0 0 84px;width:84px;height:84px;border-radius:8px;overflow:hidden;background:#eef2f6;display:flex;align-items:center;justify-content:center;text-decoration:none}
.dokument-vorschau img{width:100%;height:100%;object-fit:cover;display:block}
.dokument-typ{font-weight:700;font-size:.9rem;color:var(--blau,#0E518D);letter-spacing:.04em}
.dokument-text{flex:1;min-width:0}
.dokument-text strong{display:block;margin-bottom:2px;overflow-wrap:anywhere}
.dokument-text .leise{display:block;font-size:.85rem}
.dokument-notiz{margin:6px 0 0;font-size:.92rem;background:#f6f8fa;border-radius:8px;padding:6px 10px}
.dokument-text .knopfreihe{margin-top:8px;display:flex;gap:8px;flex-wrap:wrap}
.dokument-text .knopfreihe form{margin:0}
.st-neu{background:var(--blau,#0E518D);color:#fff}
.meldung-neu p a{margin-left:6px;font-weight:600}

/* ------------------------------------------------------------------ Portal der Online-Version (fahrschul-terminplaner.de) */

body.portal { background: var(--asphalt); min-height: 100vh; display: flex; flex-direction: column; }
body.portal > main { flex: 1 0 auto; width: 100%; }
body.portal > .portal-fuss { flex-shrink: 0; }
.portal-nav { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.portal-nav a { color: #fff; text-decoration: none; font-weight: 600; }
.portal-nav a:hover { color: #fff; text-decoration: underline; }
.portal-nav .portal-start-knopf { background: var(--gelb); border-color: var(--gelb-rand); color: var(--schwarz); text-decoration: none; }
.portal-nav .portal-start-knopf:hover { background: #ffd21a; color: var(--schwarz); text-decoration: none; }
@media (max-width: 560px) { .portal-nav a:not(.knopf) { display: none; } }
.portal-start { max-width: 1100px; margin: 0 auto; padding: 28px 16px 8px; }
.portal-inhalt { max-width: 1100px; }
.portal-schmal { max-width: 640px; margin: 0 auto; }
.portal-karte { max-width: 640px; margin: 10px auto; }

/* Startseite: großer Wegweiser mit drei Zielen */
.portal-held { display: grid; gap: 22px; align-items: center; }
@media (min-width: 900px) { .portal-held { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.wegweiser .schild-innen { padding: 22px 24px 8px; }
.wegweiser-titel { font-size: clamp(2.1rem, 5.4vw, 3.5rem); line-height: .98; color: #fff; margin: 0; }
.wegweiser-unter { font-size: 1.1rem; margin: 8px 0 16px; color: rgba(255, 255, 255, .88); }
.wegweiser-ziele { list-style: none; margin: 0; padding: 0; }
.wegweiser-ziele li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "wer pfeil" "was pfeil";
  column-gap: 14px;
  padding: 12px 0;
  border-top: 2px solid rgba(255, 255, 255, .9);
}
.ziel-wer { grid-area: wer; font-family: var(--schrift-schild); font-weight: 700; font-size: 1.5rem; line-height: 1.1; }
.ziel-was { grid-area: was; color: rgba(255, 255, 255, .88); }
.ziel-pfeil { grid-area: pfeil; align-self: center; font-family: var(--schrift-schild); font-weight: 700; font-size: 2.3rem; line-height: 1; }
.portal-held-aktion { display: flex; flex-wrap: wrap; gap: 10px; align-content: center; }
.portal-held-aktion p { flex-basis: 100%; margin: 4px 0 0; }
.knopf-gross { min-height: 52px; padding: 0 22px; font-size: 1.08rem; }

.portal-abschnitt { margin-top: 46px; }
.portal-schritte { list-style: none; counter-reset: schritt; padding: 0; margin: 0; display: grid; gap: 14px; }
@media (min-width: 860px) { .portal-schritte { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.portal-schritte li { counter-increment: schritt; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r); padding: 16px 18px; }
.portal-schritte li::before {
  content: counter(schritt);
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; margin-bottom: 8px;
  border-radius: 50%; background: var(--blau); color: #fff;
  font-family: var(--schrift-schild); font-weight: 700;
}
.portal-schritte h3 { margin-bottom: 4px; }
.portal-schritte p { margin: 0; color: var(--text-2); }
.portal-liste { columns: 2 280px; column-gap: 32px; padding-left: 1.2em; margin: 0; }
.portal-liste li { break-inside: avoid; margin-bottom: 8px; }
.portal-daten p { max-width: 70ch; }

/* Preise als Zusatzzeichen: weiße bzw. gelbe Tafel mit schwarzem Rand */
.tafeln { display: grid; gap: 16px; margin-bottom: 12px; }
@media (min-width: 760px) { .tafeln { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tafel { background: #fff; border: 3px solid var(--schwarz); border-radius: 8px; padding: 18px 20px; }
.tafel-gelb { background: var(--gelb); }
.tafel h3 { font-size: 1.5rem; margin-bottom: 0; }
.tafel-preis { font-family: var(--schrift-schild); font-weight: 700; font-size: 2.6rem; line-height: 1; margin: 6px 0 12px; }
.tafel-preis small { font-size: 1.05rem; font-weight: 600; }
.tafel ul { padding-left: 1.1em; margin: 0 0 14px; }
.tafel-hinweis { margin: 0; font-weight: 600; }

/* Adresse der Fahrschule: fester Teil vorne, Name zum Eintippen */
.adress-form { display: grid; gap: 12px; max-width: 580px; }
.adress-eingabe { display: flex; align-items: stretch; border: 1.5px solid var(--linie-stark); border-radius: 8px; background: #fff; overflow: hidden; }
.adress-eingabe:focus-within { border-color: var(--blau); box-shadow: 0 0 0 3px rgba(14, 81, 141, .2); }
.adress-vorne { display: flex; align-items: center; padding: 0 2px 0 12px; color: var(--text-2); background: var(--flaeche-2); white-space: nowrap; font-size: .95rem; }
.adress-eingabe input[type=text] { border: 0; border-radius: 0; flex: 1; min-width: 0; padding-left: 4px; }
.adress-eingabe input[type=text]:focus { box-shadow: none; }
@media (max-width: 420px) { .adress-vorne { font-size: .8rem; padding-left: 8px; } }
.adresse-gross { font-family: var(--schrift-schild); font-size: 1.6rem; font-weight: 700; margin: 4px 0 12px; overflow-wrap: anywhere; }
.portal-erste { padding-left: 1.2em; }
.haken-oben { align-items: flex-start; }
.haken-oben input { margin-top: 2px; }
.honig { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.portal-fuss { background: var(--schwarz); color: #D6DBE1; margin-top: 56px; }
.portal-fuss-innen { max-width: 1100px; margin: 0 auto; padding: 22px 16px 30px; display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: space-between; align-items: center; }
.portal-fuss p { margin: 0; }
.portal-fuss nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.portal-fuss a { color: #fff; }

/* Rechtstexte */
.rechtstext { max-width: 780px; margin: 0 auto; padding: 26px 30px 22px; }
.rechtstext h1 { margin-bottom: 4px; }
.rechtstext h2 { margin-top: 32px; font-size: 1.3rem; scroll-margin-top: 16px; }
.rechtstext h3 { margin-top: 18px; font-size: 1.05rem; }
.rechtstext p, .rechtstext li { line-height: 1.6; }
.rechtstext li + li { margin-top: 6px; }
.rechtstext .stand { color: var(--text-2); margin-top: 28px; padding-top: 12px; border-top: 1px solid var(--linie); }
/* Absätze (1), (2) … */
.rechtstext ol.abs { list-style: none; counter-reset: abs; padding-left: 0; }
.rechtstext ol.abs > li { counter-increment: abs; position: relative; padding-left: 2.3em; }
.rechtstext ol.abs > li::before { content: "(" counter(abs) ")"; position: absolute; left: 0; color: var(--text-2); }
.rechtstext ol.abs ul { margin: 6px 0 0; padding-left: 1.2em; }
.rechtstext-inhalt { background: var(--flaeche-2); border: 1px solid var(--linie); border-radius: var(--r); padding: 10px 16px; margin: 18px 0 8px; }
.rechtstext-inhalt ol { list-style: none; margin: 0; padding: 0; columns: 2 250px; column-gap: 26px; }
.rechtstext-inhalt li, .rechtstext-inhalt li + li { margin: 0; padding: 3px 0; break-inside: avoid; line-height: 1.35; }
@media (max-width: 480px) { .rechtstext { padding: 18px 16px; } }
@media print {
  .portal .kopf, .portal-fuss, .rechtstext-inhalt { display: none !important; }
  body.portal { background: #fff; }
  .rechtstext { border: 0; box-shadow: none; padding: 0; max-width: none; }
}

/* Admin */
.admin-abmelden { margin: 0 0 0 auto; }
