/* VGT – Designsystem: hell, sachlich, VGT-Grün als Akzent. Anordnung der Masken folgt dem Access-Original. */
:root {
  --grund: #f3f5f4; --flaeche: #fff; --flaeche-2: #f8faf9; --rand: #d9dfdc; --rand-stark: #b9c3be;
  --text: #1c2622; --text-2: #5b6862; --akzent: #2f6f3e; --akzent-hell: #e7f1ea; --akzent-dunkel: #245831;
  --gefahr: #a33a2c; --gefahr-hell: #fbeceA; --warnung: #8a5a00; --warnung-hell: #fff4dc; --info-hell: #e9f0fb;
  --radius: 8px; --radius-klein: 6px; --schatten: 0 1px 2px rgba(20, 40, 30, .06), 0 1px 1px rgba(20, 40, 30, .04);
  --feld-h: 2.15rem; --abstand: 1rem; --kopf-h: 3.1rem;
  --linie: #edf0ee; --neutral: #eceeed; --hover: #f7faf8; --text-3: #a5b0aa; --leiste: rgba(243, 245, 244, .94);
  --meldung-rand: #bfd9c6; --fehler-rand: #efc4bd; --fehler-text: #6e2117; --info-rand: #c8d7f0;
  --angebot-grund: #fff1d6; --angebot-text: #7a4b00; --gelb-grund: #fff3cf; --gelb-rand: #e0b84a; --blau-flaeche: #dcebfb;
  --schatten-gross: 0 10px 28px rgba(20, 40, 30, .16); --akzent-text: #245831;
  font-size: 15px;
}
* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--kopf-h) + 4rem); }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text);
  background: var(--grund); line-height: 1.4; -webkit-font-smoothing: antialiased; }
a { color: var(--akzent); text-underline-offset: 2px; }
h1 { font-size: 1.45rem; margin: 0 0 .9rem; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; margin: 1.4rem 0 .6rem; }
small, .leise { color: var(--text-2); }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }

/* ---------- Kopf und Navigation ---------- */
.kopf { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 1.2rem; padding: 0 1rem;
  height: var(--kopf-h); background: var(--akzent-dunkel); color: #fff; }
.kopf .marke { color: #fff; font-weight: 800; text-decoration: none; letter-spacing: .04em; font-size: 1.05rem; }
.hauptnav { display: flex; gap: .15rem; overflow-x: auto; scrollbar-width: none; flex: 1; }
.hauptnav a { color: #dcebe1; text-decoration: none; padding: .45rem .7rem; border-radius: var(--radius-klein);
  white-space: nowrap; font-size: .93rem; }
.hauptnav a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.hauptnav a.aktiv { background: rgba(255, 255, 255, .16); color: #fff; font-weight: 600; }
.kopf-nav { display: flex; gap: .8rem; align-items: center; font-size: .88rem; }
.kopf-nav a { color: #dcebe1; text-decoration: none; }
.kopf-nav a:hover { color: #fff; }
.kopf-nav button { background: transparent; color: #dcebe1; border: 1px solid rgba(255, 255, 255, .35);
  border-radius: var(--radius-klein); padding: .25rem .6rem; cursor: pointer; font: inherit; }
.inhalt { max-width: 1280px; margin: 0 auto; padding: 1rem 1.25rem 3rem; }
.pfad { font-size: .85rem; color: var(--text-2); margin: 0 0 .5rem; }
.pfad a { color: var(--text-2); text-decoration: none; }
.pfad a:hover { color: var(--akzent); text-decoration: underline; }
.pfad span + span::before, .pfad a + span::before, .pfad a + a::before { content: "›"; margin: 0 .4rem; color: var(--rand-stark); }

/* ---------- Meldungen (blenden sich aus) ---------- */
.meldungen { position: fixed; top: calc(var(--kopf-h) + .5rem); right: 1rem; z-index: 40; display: grid; gap: .5rem; max-width: min(28rem, 92vw); }
.meldung { padding: .6rem .9rem; border-radius: var(--radius); background: var(--akzent-hell); border: 1px solid var(--meldung-rand);
  box-shadow: var(--schatten-gross); transition: opacity .4s, transform .4s; }
.meldung-error { background: var(--gefahr-hell); border-color: var(--fehler-rand); color: var(--fehler-text); }
.meldung-info { background: var(--info-hell); border-color: var(--info-rand); }
.meldung.weg { opacity: 0; transform: translateY(-6px); }
.inhalt > .meldung, form > .meldung { position: static; box-shadow: none; margin-bottom: .8rem; }

/* ---------- Knöpfe ---------- */
.knopf, button.knopf { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: var(--feld-h);
  padding: .3rem .85rem; border: 1px solid var(--rand-stark); border-radius: var(--radius-klein); background: var(--flaeche);
  color: var(--text); text-decoration: none; cursor: pointer; font: inherit; font-size: .93rem; white-space: nowrap;
  transition: background .12s, border-color .12s; }
.knopf:hover { background: var(--flaeche-2); border-color: var(--akzent); }
.knopf-haupt, button.knopf-haupt { background: var(--akzent); color: #fff; border-color: var(--akzent); font-weight: 600; }
.knopf-haupt:hover { background: var(--akzent-dunkel); }
.knopf-gefahr { color: var(--gefahr); }
.knopf-gefahr:hover { border-color: var(--gefahr); background: var(--gefahr-hell); }
.knopf-symbol { padding: .3rem .55rem; min-width: var(--feld-h); }
.knopf-folgt, .kachel-folgt { opacity: .5; cursor: not-allowed; }
.knopf-klein { min-height: 1.75rem; padding: .1rem .5rem; font-size: .85rem; }
button:not(.knopf) { font: inherit; }

/* ---------- Werkzeugleiste (bleibt beim Scrollen sichtbar) ---------- */
.werkzeugleiste { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0 0 1rem; }
.werkzeugleiste.fest { position: sticky; top: var(--kopf-h); z-index: 20; margin: -1rem -1.25rem 1rem; padding: .6rem 1.25rem;
  background: var(--leiste); backdrop-filter: blur(6px); border-bottom: 1px solid var(--rand); }
.werkzeugleiste .gruppe { display: inline-flex; gap: .25rem; }
.werkzeugleiste .rechts { margin-left: auto; display: inline-flex; gap: .4rem; align-items: center; }
.ungespeichert { display: none; font-size: .82rem; color: var(--warnung); background: var(--warnung-hell);
  border-radius: 999px; padding: .15rem .6rem; }
form.geaendert .ungespeichert, body.geaendert .ungespeichert { display: inline-block; }
.titelzeile { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .8rem; }
.titelzeile h1 { margin: 0; }
.maskenkopf { display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; margin-bottom: .9rem; }
.maskenkopf h1 { margin: 0; }
.maskenkopf .nr { font-size: 1.45rem; font-weight: 700; color: var(--akzent); }

/* ---------- Karten und Raster ---------- */
.karte { background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius); box-shadow: var(--schatten);
  padding: .9rem 1rem; }
.karte + .karte { margin-top: 1rem; }
.karte-titel { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2);
  margin: 0 0 .6rem; }
.spalten { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(16rem, 1fr); gap: 1rem; align-items: start; }
.spalten-gleich { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.zeile { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: .3rem 1.2rem; }
.zeile-3 { --n: 3; } .zeile-1 { --n: 1; }

/* Feld: Beschriftung links wie im Original, auf dem Handy darüber */
.feld { display: grid; grid-template-columns: var(--lw, 8.5rem) minmax(0, 1fr); gap: .5rem; align-items: center; margin: .28rem 0; }
.feld > label, .feld > .label { font-size: .88rem; color: var(--text-2); }
.feld-schmal { --lw: 6rem; }
.feld input:not([type=checkbox]):not([type=radio]), .feld select, .feld textarea, .eingabe {
  width: 100%; min-height: var(--feld-h); padding: .3rem .55rem; border: 1px solid var(--rand-stark); border-radius: var(--radius-klein);
  background: var(--flaeche); color: var(--text); font: inherit; font-size: .95rem; }
.feld textarea { min-height: 5rem; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--akzent) !important; box-shadow: 0 0 0 3px rgba(47, 111, 62, .15); }
.feld .anzeige, .anzeige { font-weight: 600; }
.feld small { grid-column: 2; }
.paar { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: .4rem; }
.paar-knopf { display: flex; gap: .4rem; }
.paar-knopf input { flex: 1; min-width: 0; }
.errorlist { list-style: none; margin: .2rem 0 0; padding: 0; color: var(--gefahr); font-size: .85rem; grid-column: 2; }
.optionen ul, .optionen > div { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; }
.optionen { border: 1px solid var(--rand); border-radius: var(--radius); padding: .5rem .8rem; margin: 0; }
.optionen legend { font-size: .88rem; color: var(--text-2); padding: 0 .3rem; }
.hinweis-inaktiv { font-size: .72rem; padding: .1rem .45rem; border-radius: 999px; background: var(--neutral); color: var(--text-2);
  vertical-align: middle; font-weight: 600; }

/* Häkchen als Schalter-Chips (Kontrollkästchen-Block im Auftrag) */
.haken { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; border: 0; padding: 0; margin: 0 0 .6rem; }
.haken label { display: flex; gap: .45rem; align-items: center; padding: .35rem .55rem; border: 1px solid var(--rand);
  border-radius: var(--radius-klein); font-size: .88rem; cursor: pointer; background: var(--flaeche); user-select: none; }
.haken label:has(input:checked) { background: var(--akzent-hell); border-color: var(--meldung-rand); color: var(--akzent-text); font-weight: 600; }
.haken input { accent-color: var(--akzent); width: 1rem; height: 1rem; margin: 0; }
.belegknoepfe { display: grid; gap: .4rem; }
.belegknoepfe .knopf { justify-content: flex-start; width: 100%; }
.belegknoepfe hr { border: 0; border-top: 1px solid var(--rand); margin: .3rem 0; width: 100%; }

/* ---------- Menüs (Kacheln, zweispaltig wie im Original) ---------- */
.menue { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .8rem; }
.menue-spalten { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: .6rem 1rem; max-width: 60rem; }
.menue-spalte { display: grid; gap: .6rem; align-content: start; }
.menue-spalte h2 { margin: 0 0 .1rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); }
.kachel { display: flex; align-items: center; gap: .7rem; min-height: 3.3rem; padding: .7rem .95rem; background: var(--flaeche);
  border: 1px solid var(--rand); border-radius: var(--radius); box-shadow: var(--schatten); text-decoration: none;
  color: var(--text); font-weight: 600; transition: border-color .12s, transform .12s; }
.kachel:hover { border-color: var(--akzent); transform: translateY(-1px); }
.kachel small { font-weight: 400; margin-left: auto; font-size: .78rem; }
.kachel .zusatz { margin-left: auto; display: flex; gap: .3rem; }
.kachel-gross { min-height: 4.4rem; font-size: 1.05rem; }
.symbol { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: var(--radius-klein);
  background: var(--akzent-hell); color: var(--akzent); font-size: 1rem; flex: none; }

/* ---------- Tabellen ---------- */
.tabelle-scroll { overflow-x: auto; background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius);
  box-shadow: var(--schatten); }
.liste { width: 100%; border-collapse: collapse; background: var(--flaeche); font-size: .93rem; }
.liste th { position: sticky; top: 0; background: var(--flaeche-2); font-weight: 600; font-size: .82rem; color: var(--text-2);
  text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--rand); white-space: nowrap; }
.liste td { padding: .42rem .6rem; border-bottom: 1px solid var(--linie); text-align: left; vertical-align: top; }
.liste tbody tr:last-child td { border-bottom: 0; }
.liste .zahl { text-align: right; font-variant-numeric: tabular-nums; }
.liste tbody tr:hover td { background: var(--hover); }
.liste tr[data-href] { cursor: pointer; }
.liste tr.ungenutzt td { color: var(--gefahr); }
.liste .haken-zeichen { color: var(--akzent); font-weight: 700; }
.listenkopf { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-bottom: .8rem; }
.suche { flex: 1 1 18rem; min-height: 2.5rem; padding: .45rem .8rem; border: 1px solid var(--rand-stark); border-radius: var(--radius);
  font: inherit; background: var(--flaeche); width: 100%; }
.schalter { display: inline-flex; gap: .4rem; align-items: center; font-size: .9rem; color: var(--text-2); }
.seiten { margin: .8rem 0; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; font-size: .9rem; color: var(--text-2); }
.anzahl { font-size: .85rem; color: var(--text-2); margin: 0 0 .5rem; }

/* Datenblatt (Positionen, kleine Stammdatenlisten) */
.datenblatt td { padding: .25rem .3rem; vertical-align: top; }
.datenblatt input, .datenblatt select, .datenblatt textarea { width: 100%; min-height: 1.95rem; padding: .2rem .4rem;
  border: 1px solid transparent; border-radius: 4px; background: transparent; font: inherit; font-size: .92rem; color: var(--text); }
.datenblatt tr:hover input, .datenblatt tr:hover select, .datenblatt tr:hover textarea,
.datenblatt input:focus, .datenblatt select:focus, .datenblatt textarea:focus { border-color: var(--rand-stark); background: var(--flaeche); }
.datenblatt input[type=checkbox] { width: auto; min-height: 0; }
.datenblatt tr.neu td { background: var(--hover); }
.datenblatt tr.neu input::placeholder { color: var(--text-3); }
.positionen input { min-width: 4.5rem; }
.positionen td:nth-child(1) input { width: 3.6rem; min-width: 3.6rem; }
.positionen td:nth-child(2) input { width: 4.8rem; min-width: 4.8rem; }
.positionen td:nth-child(3) input { width: 5.2rem; }
.positionen td:nth-child(4) input { min-width: 9rem; }
.positionen textarea { min-width: 14rem; resize: vertical; }
.positionen td:nth-child(6) input, .positionen td:nth-child(7) input { min-width: 6.5rem; text-align: right; }
.positionen select { min-width: 5.5rem; }
.positionen .aktionen { white-space: nowrap; text-align: right; }
.fehler { color: var(--gefahr); }

/* Artikel-Auswahl */
.artikelauswahl { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .2rem 0 .8rem; }
.artikelauswahl label { font-size: .88rem; color: var(--text-2); }
.artikelauswahl select { flex: 1 1 22rem; min-width: 0; }
.artikelauswahl input { width: 6.5rem; }

/* Summenblock */
.summen { margin: 1rem 0 0 auto; max-width: 25rem; background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius);
  box-shadow: var(--schatten); padding: .7rem 1rem; }
.summen p { display: grid; grid-template-columns: 1fr auto; gap: .5rem; align-items: center; margin: .3rem 0; font-variant-numeric: tabular-nums; }
.summen p.mit-eingabe { grid-template-columns: 1fr 5rem auto; }
.summen p b { text-align: right; }
.summen input { width: 5rem; min-height: 1.9rem; padding: .2rem .4rem; border: 1px solid var(--rand-stark); border-radius: 4px; text-align: right; }
.summen .gesamt { border-top: 1px solid var(--rand); padding-top: .5rem; margin-top: .5rem; font-size: 1.12rem; }
.summen .gesamt b { color: var(--akzent-text); }

/* Kunde im Auftrag */
.kundenwahl { position: relative; }
.treffer { position: absolute; left: 0; right: 0; top: 100%; z-index: 15; list-style: none; padding: 0; margin: .2rem 0 0;
  max-height: 18rem; overflow-y: auto; border: 1px solid var(--rand-stark); border-radius: var(--radius); background: var(--flaeche);
  box-shadow: var(--schatten-gross); }
.treffer:empty { display: none; }
.treffer button { width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--linie); background: none;
  padding: .5rem .7rem; cursor: pointer; font: inherit; }
.treffer button:hover, .treffer button:focus { background: var(--akzent-hell); outline: none; }
.treffer small { display: block; }
.kundenkarte { display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem; padding: .55rem .7rem; border-radius: var(--radius-klein);
  background: var(--flaeche-2); border: 1px solid var(--rand); margin: .3rem 0 .4rem; }
.kundenkarte .name { font-weight: 700; }
.kundendaten { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .1rem 1rem; font-size: .88rem; color: var(--text-2);
  grid-column: 1 / -1; margin: 0; }
.kundendaten div span { color: var(--text); }

/* Such-/Nummernmasken */
.suchmaske { max-width: 34rem; }
.nummernfeld { font-size: 1.3rem !important; min-height: 2.8rem !important; letter-spacing: .03em; }
.hinweis { color: var(--text-2); font-size: .9rem; }

/* Berichte */
.berichtsfilter { display: flex; flex-wrap: wrap; gap: .7rem; align-items: flex-end; margin-bottom: .8rem; }
.berichtsfilter label { display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; color: var(--text-2); }
.berichtsfilter input { min-height: var(--feld-h); padding: .3rem .55rem; border: 1px solid var(--rand-stark); border-radius: var(--radius-klein); font: inherit; }
.bericht tr.gruppe td { background: var(--akzent-hell); font-weight: 600; color: var(--akzent-text); }

/* Anmeldung */
.anmeldung { max-width: 24rem; margin: 8vh auto 0; }
.anmeldung .feld { --lw: 1fr; grid-template-columns: 1fr; gap: .2rem; }

.versteckt { display: none; }
.loeschen { margin-top: 1.2rem; }

/* ---------- Handy / Tablet ---------- */
@media (max-width: 900px) {
  .spalten, .spalten-gleich { grid-template-columns: 1fr; }
  .menue-spalten { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  :root { font-size: 15px; }
  .inhalt { padding: .8rem .8rem 3rem; }
  .werkzeugleiste.fest { margin: -.8rem -.8rem 1rem; padding: .5rem .8rem; }
  .zeile { grid-template-columns: 1fr; }
  .feld { grid-template-columns: 1fr; gap: .15rem; }
  .feld small, .errorlist { grid-column: 1; }
  .kopf-nav a { display: none; }
  .kundendaten { grid-template-columns: 1fr 1fr; }
  .haken { grid-template-columns: 1fr 1fr; }
}

/* ---------- Druck ---------- */
@media print {
  .kopf, .nicht-drucken, .meldungen, .werkzeugleiste, .pfad { display: none !important; }
  body { background: var(--flaeche); }
  .inhalt { max-width: none; padding: 0; }
  .tabelle-scroll, .karte, .summen { box-shadow: none; border: 0; }
  .liste th, .liste td { padding: .15rem .3rem; font-size: 8.5pt; }
  .liste th { position: static; }
  .tabelle-scroll { overflow: visible; }
  a { color: inherit; text-decoration: none; }
}
/* Kachel mit Zusatzknöpfen: ganze Fläche klickbar, Zusatzknöpfe liegen darüber */
.kachel { position: relative; }
.kachel a.ziel { color: inherit; text-decoration: none; flex: 1; }
.kachel a.ziel::after { content: ""; position: absolute; inset: 0; }
.kachel .zusatz { position: relative; z-index: 1; }
/* Kopfzeile der Auftragsmaske (Nr, Datum, Gültig bis, Mitarbeiter, Status) */
.kopfleiste { display: grid; grid-template-columns: 8rem repeat(4, minmax(0, 1fr)); gap: .8rem; align-items: end; }
.kopfleiste > div { display: grid; gap: .2rem; }
.kopfleiste label, .kopfleiste .label { font-size: .82rem; color: var(--text-2); }
.kopfleiste input, .kopfleiste select { width: 100%; min-height: var(--feld-h); padding: .3rem .55rem; border: 1px solid var(--rand-stark);
  border-radius: var(--radius-klein); background: var(--flaeche); font: inherit; }
.kopfleiste .nr { font-size: 1.5rem; font-weight: 700; color: var(--akzent); line-height: var(--feld-h); }
@media (max-width: 900px) { .kopfleiste { grid-template-columns: 1fr 1fr; } }
.spalten > .karte + .karte, .spalten-gleich > .karte + .karte { margin-top: 0; }
.maskenkopf .nr { font-size: 1.3rem; }
.feld input[type=checkbox] { width: 1.1rem; height: 1.1rem; accent-color: var(--akzent); }
input[type=radio], input[type=checkbox] { accent-color: var(--akzent); }
.startmenue { max-width: 76rem; }
.startmenue .kachel { flex-wrap: wrap; }
.startmenue .kachel .zusatz { flex-basis: 100%; margin: .2rem 0 0 2.7rem; }
.kachel-folgt small { white-space: nowrap; }
.kundenzeile { margin: .15rem 0 .35rem; }
.kundendaten-block .feld span { color: var(--text); }
.kundendaten-block:empty { display: none; }
.bankzeile { border: 1px solid var(--rand); border-radius: var(--radius-klein); padding: .3rem .6rem .4rem; margin-bottom: .5rem; }
.bankzeile.neu { border-style: dashed; }

/* ===================== Thema „Klassisch“ (V1): Farben angelehnt an das Access-Original ===================== */
.thema-klassisch {
  --grund: #eef3f1; --akzent: #1f7a3c; --akzent-dunkel: #155c2c; --akzent-hell: #e3f2e6;
  --petrol: #0e7470; --petrol-hell: #e4f1f0; --hellgruen: #9ccc2a; --beige: #fbf7ee; --beige-rand: #e6dcc6;
  --beschriftung: #8c3a12; --verweis: #1d4fb8; --menue-knopf: #1f7a3c; --akzent-text: #155c2c;
}
.thema-klassisch .kopf { background: linear-gradient(90deg, var(--akzent-dunkel), var(--akzent)); }
.thema-klassisch .hauptnav a.aktiv { background: var(--hellgruen); color: #10300f; }

/* Menüs: grüne Knöpfe auf Petrol-Fläche wie F_Startmenü / F_Menü_Rechnungen */
.thema-klassisch .menueflaeche { background: var(--petrol); border-radius: var(--radius); padding: 1.1rem; box-shadow: var(--schatten); }
.thema-klassisch .menueflaeche .menue-spalte h2 { color: #d9f1ee; }
.thema-klassisch .menueflaeche .kachel { background: var(--menue-knopf); color: #fff; border: 0; border-radius: 6px;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .28); font-weight: 700; }
.thema-klassisch .menueflaeche .kachel:hover, .thema-klassisch .menueflaeche .kachel:focus-within { background: var(--hellgruen); color: #10300f; }
.thema-klassisch .menueflaeche .kachel .symbol { background: rgba(255, 255, 255, .16); color: #fff; }
.thema-klassisch .menueflaeche .kachel-folgt { background: rgba(255, 255, 255, .14); color: #cfe7e4; box-shadow: none; opacity: 1; }
.thema-klassisch .menueflaeche .kachel-folgt small { color: #b5d8d4; }
.thema-klassisch .menueflaeche .knopf-klein { background: rgba(255, 255, 255, .92); color: #155c2c; border-color: transparent; }
.thema-klassisch .menueflaeche .kachel-warnung { background: #e8641b; }
.thema-klassisch .firmenband { display: flex; align-items: center; gap: 1rem; background: var(--menue-knopf); color: #fff;
  border-radius: var(--radius) var(--radius) 0 0; padding: .7rem 1.1rem; margin-bottom: 0; }
.thema-klassisch .firmenband + .menueflaeche { border-radius: 0 0 var(--radius) var(--radius); }
.thema-klassisch .firmenband .logo { font-weight: 900; font-size: 1.15rem; background: #fff; color: #1f7a3c;
  border-radius: 6px; padding: .3rem .55rem; letter-spacing: .05em; }
.thema-klassisch .firmenband .firmenname { font-size: 1.35rem; font-weight: 800; font-style: italic; letter-spacing: .04em;
  text-transform: uppercase; color: #d8f59b; }

/* Datenmasken: warme Flächen, Beschriftungen in Braunrot, klickbare Beschriftungen blau (wie F_Auftrag, F_Kunden) */
.thema-klassisch .maske .karte, .thema-klassisch .maske .kopfleiste { background: var(--beige); border-color: var(--beige-rand); }
.thema-klassisch .maske .feld > label, .thema-klassisch .maske .kopfleiste label, .thema-klassisch .maske .kopfleiste .label,
.thema-klassisch .maske .optionen legend, .thema-klassisch .maske .karte-titel { color: var(--beschriftung); font-weight: 600; }
.thema-klassisch .maske .feld > label a, .thema-klassisch .artikelauswahl label a { color: var(--verweis); font-weight: 700; }
.thema-klassisch .maskenkopf h1 { color: var(--beschriftung); }
.thema-klassisch .artikelauswahl select { background: var(--gelb-grund); border-color: var(--gelb-rand); }
.thema-klassisch .belegknoepfe { background: var(--blau-flaeche); border-radius: var(--radius-klein); padding: .6rem; }
.thema-klassisch .belegknoepfe .knopf { font-weight: 600; color: var(--beschriftung); }
.thema-klassisch .summen p span, .thema-klassisch .summen p label { color: var(--beschriftung); font-weight: 600; }

/* Navigations-/Knopfleiste unten wie im Original (Datensatz-Knöpfe am unteren Formularrand) */
.thema-klassisch .werkzeugleiste.fest { position: fixed; top: auto; bottom: 0; left: 0; right: 0; z-index: 25; margin: 0;
  padding: .55rem max(1.25rem, calc((100vw - 1280px) / 2 + 1.25rem)); background: var(--leiste);
  border-top: 1px solid var(--rand); border-bottom: 0; box-shadow: 0 -2px 10px rgba(20, 40, 30, .08); }
.thema-klassisch:has(.werkzeugleiste.fest) .inhalt { padding-bottom: 5.5rem; }
.thema-klassisch .meldungen { top: calc(var(--kopf-h) + .5rem); }
.mail-knopf { font-size: .78rem; padding: .1rem .45rem; min-height: 1.6rem; }
.belegzeile { display: grid; grid-template-columns: 1fr auto; gap: .35rem; align-items: center; }

/* Startmenü: Verbindungslinien wie im Original (Angebot → Auftrag → Lieferschein → Rechnung, Kalkulation → Zeiterfassung) */
.thema-klassisch .startmenue .menue-spalte { gap: 1.4rem; }
.thema-klassisch .startmenue .kachel.verbunden::before { content: ""; position: absolute; left: 2.1rem; top: -1.45rem;
  height: 1.4rem; border-left: 3px solid #0a3d2a; }
.umschalter button { background: rgba(255, 255, 255, .12) !important; }
.nav-bald { color: rgba(255, 255, 255, .45); padding: .45rem .7rem; font-size: .93rem; white-space: nowrap; cursor: default; }

/* ===================== Version 2 „Neu“ ===================== */
.globalsuche { position: relative; flex: 0 1 16rem; min-width: 10rem; }
.globalsuche input { width: 100%; padding: .4rem .7rem; border-radius: var(--radius-klein); border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .14); color: #fff; font: inherit; font-size: .9rem; }
.globalsuche input::placeholder { color: rgba(255, 255, 255, .7); }
.globalsuche input:focus { background: var(--flaeche); color: var(--text); }
.globalsuche-treffer { position: absolute; right: 0; left: 0; top: calc(100% + .3rem); z-index: 50; background: var(--flaeche); color: var(--text);
  border-radius: var(--radius); box-shadow: var(--schatten-gross); max-height: 70vh; overflow-y: auto; min-width: 22rem; }
.globalsuche-treffer:empty { display: none; }
.treffergruppe-titel { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); padding: .55rem .8rem .2rem; }
.treffer-eintrag { display: block; padding: .45rem .8rem; color: var(--text); text-decoration: none; }
.treffer-eintrag small { display: block; color: var(--text-2); }
.treffer-eintrag:hover, .treffer-eintrag:focus, .treffer-alle:focus { background: var(--akzent-hell); outline: none; }
.treffer-alle { display: block; padding: .5rem .8rem; border-top: 1px solid var(--rand); font-size: .85rem; }
.treffer-leer { padding: .6rem .8rem; color: var(--text-2); }
.suchseite .globalsuche-treffer, .suchseite { position: static; box-shadow: none; }
.suchseite .treffergruppe { background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius); margin-bottom: .8rem; }

.start-suche { text-align: center; padding: 1.5rem 0 1rem; }
.start-suche h1 { font-size: 1.6rem; }
.start-suchfeld { position: relative; max-width: 44rem; margin: 0 auto; }
.start-suchfeld .suche { font-size: 1.1rem; min-height: 3rem; box-shadow: var(--schatten); }
.start-suchfeld .globalsuche-treffer { text-align: left; }
.schnellaktionen { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: 1rem; }
.kennzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .8rem; margin-top: 1.4rem; }
.kennzahl { display: grid; gap: .1rem; padding: .9rem 1rem; background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius);
  box-shadow: var(--schatten); text-decoration: none; color: var(--text); }
.kennzahl:hover { border-color: var(--akzent); }
.kennzahl .wert { font-size: 1.8rem; font-weight: 700; color: var(--akzent); }
.kennzahl .titel { color: var(--text-2); font-size: .9rem; }
.kennzahl .summe { font-weight: 600; font-variant-numeric: tabular-nums; }
.zuletzt { display: inline-block; margin: .2rem .4rem .2rem 0; padding: .3rem .7rem; background: var(--flaeche-2); border: 1px solid var(--rand);
  border-radius: 999px; text-decoration: none; color: var(--text); font-size: .9rem; }
.zuletzt:hover { border-color: var(--akzent); }

.ansichten { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .7rem; }
.chip { padding: .3rem .7rem; border: 1px solid var(--rand-stark); border-radius: 999px; text-decoration: none; color: var(--text);
  font-size: .85rem; background: var(--flaeche); }
.chip:hover { border-color: var(--akzent); }
.chip.aktiv { background: var(--akzent); border-color: var(--akzent); color: #fff; }
.filterleiste { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; margin-bottom: .8rem; }
.filterleiste label { display: grid; gap: .2rem; font-size: .8rem; color: var(--text-2); }
.filterleiste .suche { flex: 1 1 16rem; margin: 0; }
.marke-art { font-size: .75rem; padding: .1rem .5rem; border-radius: 999px; background: var(--neutral); color: var(--text-2); font-weight: 600; }
.marke-art.angebot { background: var(--angebot-grund); color: var(--angebot-text); }
.marke-art.auftrag { background: var(--akzent-hell); color: var(--akzent-text); }
.stand { white-space: nowrap; }
.punkt { display: inline-block; min-width: 1.6rem; text-align: center; font-size: .7rem; font-weight: 700; padding: .05rem .2rem;
  border-radius: 4px; background: var(--neutral); color: var(--text-3); margin-right: .1rem; }
.punkt.an { background: var(--akzent-hell); color: var(--akzent-text); }

.vorgangskopf { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin: .3rem 0 .6rem; }
.vorgangskopf h1 { margin: 0; }
.vorgangskopf .nr { color: var(--akzent); }
.vorgangskopf p { margin: .2rem 0 0; }
.knopf-gross { min-height: 2.6rem; padding: .4rem 1.2rem; font-size: 1rem; }
.fortschritt { display: flex; list-style: none; padding: 0; margin: 0 0 1rem; counter-reset: schritt; }
.fortschritt li { flex: 1; position: relative; text-align: center; font-size: .85rem; color: var(--text-2); padding-top: 1.9rem; }
.fortschritt li::before { counter-increment: schritt; content: counter(schritt); position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 1.6rem; height: 1.6rem; line-height: 1.6rem; border-radius: 50%; background: var(--neutral); color: var(--text-2); font-weight: 700; z-index: 1; }
.fortschritt li + li::after { content: ""; position: absolute; top: .8rem; right: 50%; width: 100%; height: 3px; background: var(--neutral); }
.fortschritt li.fertig { color: var(--akzent-text); font-weight: 600; }
.fortschritt li.fertig::before { content: "✓"; background: var(--akzent); color: #fff; }
.fortschritt li.fertig + li.fertig::after { background: var(--akzent); }
.gedruckt { margin-left: auto; font-size: .75rem; color: var(--akzent); font-weight: 600; }
.rechnungszeile { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .4rem 0; border-bottom: 1px solid var(--linie); }
.rechnungszeile .zahl { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 600; }
.weitere { margin-top: 1rem; }
.weitere summary { cursor: pointer; margin: 0; }
.weitere[open] summary { margin-bottom: .6rem; }
.mehr { position: relative; }
.mehr summary { list-style: none; }
.mehr summary::-webkit-details-marker { display: none; }
.mehr-menue { position: absolute; right: 0; top: calc(100% + .3rem); z-index: 30; background: var(--flaeche); border: 1px solid var(--rand);
  border-radius: var(--radius); box-shadow: var(--schatten-gross); min-width: 16rem; padding: .3rem; display: grid; }
.mehr-menue button, .mehr-menue a { text-align: left; padding: .5rem .7rem; border: 0; background: none; border-radius: var(--radius-klein);
  color: var(--text); text-decoration: none; cursor: pointer; font: inherit; }
.mehr-menue button:hover, .mehr-menue a:hover { background: var(--akzent-hell); }
.artikelzelle { position: relative; min-width: 14rem; }
.artikelzelle .treffer { top: 100%; min-width: 24rem; }
.artikelzelle .treffer button small { display: block; color: var(--text-2); }
.vorgang .spalten > div > .karte + .karte, .vorgang .spalten > div > .karte + details { margin-top: 1rem; }
@media (max-width: 700px) {
  .globalsuche { display: none; }
  .fortschritt li { font-size: .7rem; }
}


/* ===================== Dunkles Farbschema (beide Versionen) =====================
   data-farbschema="dunkel" erzwingt dunkel, "system" folgt der Einstellung des Betriebssystems. */
:root[data-farbschema="dunkel"], :root[data-farbschema="dunkel"] body {
  color-scheme: dark;
  --grund: #0f1513; --flaeche: #172019; --flaeche-2: #1c2722; --rand: #2b3833; --rand-stark: #41524a;
  --text: #e3ebe7; --text-2: #9fb2a9; --text-3: #6d7f77;
  --akzent: #4fb06d; --akzent-dunkel: #1a4f2c; --akzent-hell: #1b3424;
  --gefahr: #ff8f7f; --gefahr-hell: #3a1d19; --warnung: #f2c05f; --warnung-hell: #362c14; --info-hell: #19263b;
  --linie: #222e29; --neutral: #25312c; --hover: #1d2823; --leiste: rgba(15, 21, 19, .94);
  --meldung-rand: #2f5a3c; --fehler-rand: #6b2d25; --fehler-text: #ffc2b8; --info-rand: #2f4669;
  --angebot-grund: #3a2d12; --angebot-text: #f2c879; --gelb-grund: #33301a; --gelb-rand: #8c7a33; --blau-flaeche: #172536;
  --schatten: 0 1px 2px rgba(0, 0, 0, .4); --schatten-gross: 0 12px 30px rgba(0, 0, 0, .55); --akzent-text: #8fdca7;
}
:root[data-farbschema="dunkel"] .thema-klassisch {
  color-scheme: dark;
  --grund: #0f1513; --flaeche: #172019; --flaeche-2: #1c2722; --rand: #2b3833; --rand-stark: #41524a;
  --text: #e3ebe7; --text-2: #9fb2a9; --text-3: #6d7f77;
  --akzent: #4fb06d; --akzent-dunkel: #1a4f2c; --akzent-hell: #1b3424;
  --gefahr: #ff8f7f; --gefahr-hell: #3a1d19; --warnung: #f2c05f; --warnung-hell: #362c14; --info-hell: #19263b;
  --linie: #222e29; --neutral: #25312c; --hover: #1d2823; --leiste: rgba(15, 21, 19, .94);
  --meldung-rand: #2f5a3c; --fehler-rand: #6b2d25; --fehler-text: #ffc2b8; --info-rand: #2f4669;
  --angebot-grund: #3a2d12; --angebot-text: #f2c879; --gelb-grund: #33301a; --gelb-rand: #8c7a33; --blau-flaeche: #172536;
  --schatten: 0 1px 2px rgba(0, 0, 0, .4); --schatten-gross: 0 12px 30px rgba(0, 0, 0, .55); --akzent-text: #8fdca7;
  --akzent: #3fa462; --akzent-dunkel: #134226; --akzent-hell: #18331f; --petrol: #0b4a47; --petrol-hell: #12302e;
  --hellgruen: #a6d64a; --beige: #1d1a14; --beige-rand: #3a3226; --beschriftung: #eaa77c; --verweis: #8db7ff;
  --menue-knopf: #23683b;
}
@media (prefers-color-scheme: dark) {
  :root[data-farbschema="system"], :root[data-farbschema="system"] body {
  color-scheme: dark;
  --grund: #0f1513; --flaeche: #172019; --flaeche-2: #1c2722; --rand: #2b3833; --rand-stark: #41524a;
  --text: #e3ebe7; --text-2: #9fb2a9; --text-3: #6d7f77;
  --akzent: #4fb06d; --akzent-dunkel: #1a4f2c; --akzent-hell: #1b3424;
  --gefahr: #ff8f7f; --gefahr-hell: #3a1d19; --warnung: #f2c05f; --warnung-hell: #362c14; --info-hell: #19263b;
  --linie: #222e29; --neutral: #25312c; --hover: #1d2823; --leiste: rgba(15, 21, 19, .94);
  --meldung-rand: #2f5a3c; --fehler-rand: #6b2d25; --fehler-text: #ffc2b8; --info-rand: #2f4669;
  --angebot-grund: #3a2d12; --angebot-text: #f2c879; --gelb-grund: #33301a; --gelb-rand: #8c7a33; --blau-flaeche: #172536;
  --schatten: 0 1px 2px rgba(0, 0, 0, .4); --schatten-gross: 0 12px 30px rgba(0, 0, 0, .55); --akzent-text: #8fdca7;
  }
  :root[data-farbschema="system"] .thema-klassisch {
  color-scheme: dark;
  --grund: #0f1513; --flaeche: #172019; --flaeche-2: #1c2722; --rand: #2b3833; --rand-stark: #41524a;
  --text: #e3ebe7; --text-2: #9fb2a9; --text-3: #6d7f77;
  --akzent: #4fb06d; --akzent-dunkel: #1a4f2c; --akzent-hell: #1b3424;
  --gefahr: #ff8f7f; --gefahr-hell: #3a1d19; --warnung: #f2c05f; --warnung-hell: #362c14; --info-hell: #19263b;
  --linie: #222e29; --neutral: #25312c; --hover: #1d2823; --leiste: rgba(15, 21, 19, .94);
  --meldung-rand: #2f5a3c; --fehler-rand: #6b2d25; --fehler-text: #ffc2b8; --info-rand: #2f4669;
  --angebot-grund: #3a2d12; --angebot-text: #f2c879; --gelb-grund: #33301a; --gelb-rand: #8c7a33; --blau-flaeche: #172536;
  --schatten: 0 1px 2px rgba(0, 0, 0, .4); --schatten-gross: 0 12px 30px rgba(0, 0, 0, .55); --akzent-text: #8fdca7;
  --akzent: #3fa462; --akzent-dunkel: #134226; --akzent-hell: #18331f; --petrol: #0b4a47; --petrol-hell: #12302e;
  --hellgruen: #a6d64a; --beige: #1d1a14; --beige-rand: #3a3226; --beschriftung: #eaa77c; --verweis: #8db7ff;
  --menue-knopf: #23683b;
  }
}
/* Details, die im Dunkeln eigene Werte brauchen */
:root[data-farbschema="dunkel"] .globalsuche input:focus { background: var(--flaeche-2); color: var(--text); }
:root[data-farbschema="dunkel"] .fortschritt li.fertig::before { color: #0f1513; }
:root[data-farbschema="dunkel"] .knopf-haupt { color: #0d1a12; }
@media (prefers-color-scheme: dark) {
  :root[data-farbschema="system"] .globalsuche input:focus { background: var(--flaeche-2); color: var(--text); }
  :root[data-farbschema="system"] .fortschritt li.fertig::before { color: #0f1513; }
  :root[data-farbschema="system"] .knopf-haupt { color: #0d1a12; }
}
.farbschema button { min-width: 2.2rem; }
.dialog { border: 0; border-radius: var(--radius); padding: 1.2rem 1.3rem; width: min(34rem, 94vw); background: var(--flaeche);
  color: var(--text); box-shadow: var(--schatten-gross); }
.dialog::backdrop { background: rgba(10, 20, 15, .45); }
.summenzeile td { font-weight: 700; background: var(--flaeche-2); border-top: 2px solid var(--rand); }
.reiter { display: flex; gap: .2rem; border-bottom: 1px solid var(--rand); margin: .4rem 0 1rem; overflow-x: auto; }
.reiter a { padding: .55rem .9rem; text-decoration: none; color: var(--text-2); border-bottom: 3px solid transparent; white-space: nowrap; }
.reiter a.aktiv { color: var(--text); border-bottom-color: var(--akzent); font-weight: 600; }
.kennzahlen-klein { display: flex; gap: .6rem; }
.kennzahlen-klein .kennzahl { padding: .5rem .8rem; }
.kennzahlen-klein .kennzahl .wert { font-size: 1.3rem; }
.optionen-inline ul, .optionen-inline > div { display: flex; gap: 1.2rem; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }
.balken { display: block; height: .9rem; border-radius: 3px; background: linear-gradient(90deg, var(--akzent), var(--hellgruen, #7cc48e)); min-width: 2px; }
.verwaltung { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; }
.verwaltung .karte + .karte { margin-top: 0; }
.verwaltung-eintrag { display: flex; justify-content: space-between; gap: .5rem; padding: .55rem .2rem; border-bottom: 1px solid var(--linie);
  text-decoration: none; color: var(--text); font-weight: 600; }
.verwaltung-eintrag:last-child { border-bottom: 0; }
.verwaltung-eintrag:hover { color: var(--akzent); }
.verwaltung-eintrag small { color: var(--text-3); font-weight: 400; }

.thema-neu .hauptnav { flex: 1 1 auto; }
.kopf-nav { flex: none; }
@media (max-width: 1200px) { .thema-neu .globalsuche { flex-basis: 11rem; } .kopf-nav .umschalter button { padding: .25rem .45rem; } }
.filter-reset { margin-left: .6rem; vertical-align: middle; }
.filterleiste .filter-reset { align-self: center; margin-left: 0; }

/* ===================== Anmeldung ===================== */
body:has(.anmeldung-seite) .inhalt { max-width: none; padding: 0; }
.anmeldung-seite { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); min-height: 100vh; }
.anmeldung-marke { position: relative; overflow: hidden; display: flex; flex-direction: column; color: #fff;
  background: radial-gradient(circle at 12% 15%, rgba(166, 214, 74, .3), transparent 42%),
              linear-gradient(170deg, #12512a 0%, #1f7a3c 45%, #6fbf73 100%); }
.anmeldung-kopf { position: relative; z-index: 1; padding: clamp(2.5rem, 7vh, 5rem) clamp(2rem, 6vw, 6rem) 0; }
.anmeldung-wortmarke { font-size: clamp(5rem, 11vw, 9.5rem); line-height: .9; font-weight: 900; letter-spacing: .04em;
  color: #fff; text-shadow: 0 6px 24px rgba(0, 0, 0, .25); }
.anmeldung-logo-bild { max-height: 9rem; max-width: 26rem; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .25)); }
.anmeldung-untertitel { font-size: clamp(1.5rem, 2.6vw, 2.2rem); font-weight: 700; color: #d8f59b; margin: .6rem 0 0; letter-spacing: .02em; }
.anmeldung-zeile { font-size: clamp(1.05rem, 1.5vw, 1.3rem); color: #e6f4ea; margin: .3rem 0 1.8rem; }
.anmeldung-punkte { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, max-content); gap: .8rem 2rem; }
.anmeldung-punkte li { display: flex; align-items: center; gap: .8rem; font-size: 1.12rem; color: #f0faf2; }
.anmeldung-punkte span { display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 10px;
  background: rgba(255, 255, 255, .16); font-size: 1.15rem; }
.anmeldung-marke .garten { display: block; width: 100%; height: auto; margin-top: auto; min-height: 16rem; }
.anmeldung-formular { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 2rem 1.5rem; }
.anmeldung-karte { width: min(28rem, 100%); padding: 2.4rem 2.2rem; display: grid; gap: .4rem; box-shadow: var(--schatten-gross);
  border-radius: 14px; }
.anmeldung-karte h2 { margin: 0; font-size: 1.9rem; }
.anmeldung-karte > .leise { margin: 0 0 .9rem; font-size: 1.02rem; }
.anmeldung-karte label { font-size: .95rem; color: var(--text-2); margin-top: .6rem; }
.anmeldung-karte .eingabe { min-height: 3rem; font-size: 1.08rem; padding: .4rem .8rem; }
.anmeldung-karte .passwort .knopf { min-height: 3rem; }
.passwort { display: flex; gap: .4rem; }
.passwort .eingabe { flex: 1; min-width: 0; }
.anmeldung-knopf { margin-top: 1.3rem; width: 100%; min-height: 3.1rem; font-size: 1.1rem; }
.anmeldung-fuss { margin-top: 1.4rem; font-size: .88rem; color: var(--text-3); }
@media (max-width: 900px) {
  .anmeldung-seite { grid-template-columns: 1fr; min-height: auto; }
  .anmeldung-punkte { display: none; }
  .anmeldung-marke .garten { min-height: 9rem; max-height: 12rem; }
  .anmeldung-zeile { margin-bottom: 1rem; }
}
/* Hell/Dunkel-Schalter: rundes Symbol, zeigt das Ziel (🌙 im hellen, ☀️ im dunklen Modus) */
.kopf-nav .farbschalter, .farbschalter { display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; padding: 0;
  border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .14); cursor: pointer; font-size: 1.15rem; line-height: 1;
  font-family: "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", sans-serif; transition: background .15s, transform .15s; }
.kopf-nav .farbschalter:hover, .farbschalter:hover { background: rgba(255, 255, 255, .28); transform: rotate(-12deg); }
.nur-dunkel { display: none; }
:root[data-farbschema="dunkel"] .nur-dunkel { display: inline; }
:root[data-farbschema="dunkel"] .nur-hell { display: none; }
@media (prefers-color-scheme: dark) {
  :root[data-farbschema="system"] .nur-dunkel { display: inline; }
  :root[data-farbschema="system"] .nur-hell { display: none; }
}

/* ===================== Profilmenü oben rechts ===================== */
.profilmenue { position: relative; }
.profilmenue summary { list-style: none; }
.profilmenue summary::-webkit-details-marker { display: none; }
.profilknopf { display: flex; align-items: center; gap: .5rem; padding: .2rem .55rem .2rem .25rem; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .1); color: #fff; font-size: .9rem; user-select: none; }
.profilknopf:hover, .profilmenue[open] .profilknopf { background: rgba(255, 255, 255, .22); }
.profilname { max-width: 10rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pfeil { font-size: .7rem; opacity: .8; }
.avatar { width: 1.9rem; height: 1.9rem; border-radius: 50%; object-fit: cover; flex: none; }
.avatar-initialen { display: inline-grid; place-items: center; background: #fff; color: var(--akzent-dunkel); font-weight: 800; font-size: .8rem; }
.avatar-gross { width: 3rem; height: 3rem; font-size: 1.1rem; }
.profil-inhalt { position: absolute; right: 0; top: calc(100% + .45rem); z-index: 60; width: 19rem; padding: .9rem; background: var(--flaeche);
  color: var(--text); border: 1px solid var(--rand); border-radius: var(--radius); box-shadow: var(--schatten-gross); display: grid; gap: .45rem; }
.profil-kopf { display: flex; align-items: center; gap: .7rem; }
.profil-kopf .avatar-initialen { background: var(--akzent-hell); color: var(--akzent-text); }
.profil-bild { display: flex; gap: .4rem; }
.profil-titel { margin: .45rem 0 0; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); }
.segmente { display: grid; grid-template-columns: 1fr 1fr; padding: .2rem; border-radius: var(--radius-klein); background: var(--neutral); gap: .2rem; }
.segmente button { border: 0; border-radius: 5px; padding: .4rem; background: transparent; color: var(--text-2); cursor: pointer; font: inherit; font-size: .9rem; }
.segmente button.aktiv { background: var(--flaeche); color: var(--text); font-weight: 600; box-shadow: var(--schatten); }
.profil-link { padding: .4rem .3rem; border-radius: var(--radius-klein); color: var(--text); text-decoration: none; font-size: .92rem; }
.profil-link:hover { background: var(--hover); }
.profil-abmelden { border-top: 1px solid var(--rand); padding-top: .6rem; margin-top: .3rem; }
.profil-abmelden .knopf { width: 100%; }
@media (max-width: 700px) { .profilname, .pfeil { display: none; } }
.kopf-nav .profil-inhalt a.profil-link { color: var(--text); }
.kopf-nav .profil-inhalt a.profil-link:hover { color: var(--akzent); }
.kopf-nav .profil-inhalt .knopf { color: var(--text); background: var(--flaeche); border-color: var(--rand-stark); }
.kopf-nav .profil-inhalt .knopf:hover { border-color: var(--akzent); }
.anmeldung-karte label.angemeldet-bleiben { display: flex; align-items: center; gap: .5rem; margin-top: .9rem; color: var(--text); font-size: .95rem; cursor: pointer; }
.angemeldet-bleiben input { width: 1.1rem; height: 1.1rem; }


/* ===================== Kopfleisten-Varianten (Profilmenü › Kopfleiste) ===================== */
.marke { display: inline-flex; align-items: center; gap: .5rem; white-space: nowrap; }
.marke .blatt { width: 1.9rem; height: 1.9rem; color: var(--akzent-dunkel); flex: none; }
.marke-zusatz { font-weight: 500; font-size: .8rem; letter-spacing: .02em; opacity: .85; }
.hauptnav a { display: inline-flex; align-items: center; gap: .4rem; }
.nav-symbol { font-family: "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", sans-serif; line-height: 1; }
.kopfstil-wahl { display: grid; gap: .2rem; }
.kopfstil-wahl button { text-align: left; border: 1px solid var(--rand); border-radius: var(--radius-klein); padding: .35rem .55rem;
  background: var(--flaeche); color: var(--text); cursor: pointer; font: inherit; font-size: .88rem; }
.kopfstil-wahl button.aktiv { border-color: var(--akzent); background: var(--akzent-hell); color: var(--akzent-text); font-weight: 600; }
.kopf-nav .kopfstil-wahl button { color: var(--text); background: var(--flaeche); }
.kopf-nav .kopfstil-wahl button.aktiv { background: var(--akzent-hell); color: var(--akzent-text); }

/* 0 · Aktuell: nur Text */
.kopf-aktuell .marke .blatt, .kopf-aktuell .marke-zusatz, .kopf-aktuell .nav-symbol { display: none; }

/* 1 · Hell & schlicht: weiße Leiste, Blatt-Logo, aktiver Bereich grün unterstrichen */
.kopf-hell { --kopf-h: 3.6rem; }
.kopf-hell .kopf { background: var(--flaeche); color: var(--text); border-bottom: 1px solid var(--rand); box-shadow: var(--schatten); }
.kopf-hell .marke { color: var(--akzent-dunkel); font-size: 1.25rem; }
.kopf-hell .marke .blatt { color: var(--akzent); }
.kopf-hell .marke-zusatz, .kopf-hell .nav-symbol { display: none; }
.kopf-hell .hauptnav { align-self: stretch; }
.kopf-hell .hauptnav a { color: var(--text-2); border-radius: 0; padding: 0 .8rem; border-bottom: 3px solid transparent; height: 100%; }
.kopf-hell .hauptnav a:hover { background: transparent; color: var(--akzent); }
.kopf-hell .hauptnav a.aktiv { background: transparent; color: var(--akzent-text); border-bottom-color: var(--akzent); font-weight: 700; }
.kopf-hell .nav-bald { color: var(--text-3); }
.kopf-hell .kopf-nav a { color: var(--text-2); }
.kopf-hell .farbschalter, .kopf-hell .profilknopf { border-color: var(--rand-stark); background: var(--flaeche-2); color: var(--text); }
.kopf-hell .profilknopf:hover, .kopf-hell .profilmenue[open] .profilknopf { background: var(--hover); }
.kopf-hell .avatar-initialen { background: var(--akzent-hell); color: var(--akzent-text); }
.kopf-hell .globalsuche input { background: var(--flaeche-2); border-color: var(--rand-stark); color: var(--text); }
.kopf-hell .globalsuche input::placeholder { color: var(--text-3); }

/* 2 · Kapseln: Bereiche in einer abgesetzten Kapsel, aktiver Bereich als weiße Kapsel mit Symbol */
.kopf-kapseln { --kopf-h: 3.6rem; }
.kopf-kapseln .marke .blatt { color: #fff; }
.kopf-kapseln .marke .blatt rect { fill: rgba(255, 255, 255, .16); }
.kopf-kapseln .marke-zusatz { display: none; }
.kopf-kapseln .hauptnav { flex: 0 1 auto; background: rgba(0, 0, 0, .18); border-radius: 999px; padding: .25rem; gap: .15rem; }
.kopf-kapseln .hauptnav a { border-radius: 999px; padding: .35rem .8rem; }
.kopf-kapseln .hauptnav a .nav-symbol { display: none; }
.kopf-kapseln .hauptnav a.aktiv { background: #fff; color: #155c2c; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
.kopf-kapseln .hauptnav a.aktiv .nav-symbol { display: inline; }
.kopf-kapseln .globalsuche { margin-left: auto; }
.kopf-kapseln .kopf-nav { margin-left: auto; }

/* 3 · Symbolleiste: große Symbole über kurzen Beschriftungen */
.kopf-symbole { --kopf-h: 4.4rem; }
.kopf-symbole .marke { flex-direction: column; gap: .1rem; font-size: .95rem; }
.kopf-symbole .marke .blatt { width: 2.1rem; height: 2.1rem; color: #fff; }
.kopf-symbole .marke .blatt rect { fill: rgba(255, 255, 255, .15); }
.kopf-symbole .marke-zusatz { display: none; }
.kopf-symbole .hauptnav { align-self: stretch; gap: .2rem; }
.kopf-symbole .hauptnav a { flex-direction: column; justify-content: center; gap: .2rem; min-width: 5.2rem; padding: .3rem .5rem; font-size: .78rem; }
.kopf-symbole .nav-symbol { font-size: 1.45rem; }
.kopf-symbole .hauptnav a.aktiv { background: rgba(255, 255, 255, .18); box-shadow: inset 0 -3px 0 var(--hellgruen, #a6d64a); }

/* 4 · Zweizeilig: Markenband oben, helle Reiterleiste darunter */
.kopf-zweizeilig { --kopf-h: 6.3rem; }
.kopf-zweizeilig .kopf { flex-wrap: wrap; height: auto; min-height: var(--kopf-h); padding: 0; gap: 0; align-content: stretch; }
.kopf-zweizeilig .marke { order: 1; height: 3.4rem; padding: 0 1rem; font-size: 1.5rem; letter-spacing: .06em; }
.kopf-zweizeilig .marke .blatt { width: 2.2rem; height: 2.2rem; color: #fff; }
.kopf-zweizeilig .marke .blatt rect { fill: rgba(255, 255, 255, .15); }
.kopf-zweizeilig .marke-zusatz { font-size: 1rem; letter-spacing: .02em; color: #d8f59b; }
.kopf-zweizeilig .globalsuche { order: 2; margin-left: auto; align-self: center; }
.kopf-zweizeilig .kopf-nav { order: 3; padding: 0 1rem; align-self: center; margin-left: auto; }
.kopf-zweizeilig .globalsuche + .kopf-nav, .kopf-zweizeilig .globalsuche ~ .kopf-nav { margin-left: .8rem; }
.kopf-zweizeilig .hauptnav { order: 4; flex: 1 0 100%; height: 2.9rem; padding: 0 .8rem; background: var(--flaeche); border-bottom: 1px solid var(--rand); }
.kopf-zweizeilig .hauptnav a { color: var(--text-2); border-radius: 0; height: 100%; padding: 0 .9rem; border-bottom: 3px solid transparent; }
.kopf-zweizeilig .hauptnav a:hover { background: var(--hover); color: var(--text); }
.kopf-zweizeilig .hauptnav a.aktiv { background: transparent; color: var(--akzent-text); border-bottom-color: var(--akzent); font-weight: 700; }
.kopf-zweizeilig .nav-bald { color: var(--text-3); }

/* 5 · Seitenleiste: Navigation senkrecht links, Profil unten */
.kopf-seitenleiste { --kopf-h: 0rem; --leiste-b: 14.5rem; }
.kopf-seitenleiste .kopf { position: fixed; inset: 0 auto 0 0; width: var(--leiste-b); height: 100vh; flex-direction: column; align-items: stretch;
  gap: .4rem; padding: 1rem .7rem; overflow-y: auto; }
.kopf-seitenleiste .marke { padding: .3rem .4rem .8rem; font-size: 1.4rem; flex-wrap: wrap; row-gap: 0; }
.kopf-seitenleiste .marke .blatt { width: 2.3rem; height: 2.3rem; color: #fff; }
.kopf-seitenleiste .marke .blatt rect { fill: rgba(255, 255, 255, .15); }
.kopf-seitenleiste .marke-zusatz { flex-basis: 100%; padding-left: 2.8rem; font-size: .78rem; color: #d8f59b; }
.kopf-seitenleiste .hauptnav { flex-direction: column; flex: 0 0 auto; overflow: visible; gap: .15rem; }
.kopf-seitenleiste .hauptnav a { padding: .55rem .7rem; font-size: .95rem; gap: .65rem; }
.kopf-seitenleiste .hauptnav a.aktiv { box-shadow: inset 3px 0 0 var(--hellgruen, #a6d64a); }
.kopf-seitenleiste .nav-bald { padding: .55rem .7rem; }
.kopf-seitenleiste .globalsuche { flex: 0 0 auto; order: -1; margin: 0 0 .5rem; min-width: 0; }
.kopf-seitenleiste .globalsuche-treffer { left: 0; right: auto; width: 24rem; }
.kopf-seitenleiste .kopf-nav { margin-top: auto; flex-direction: row-reverse; justify-content: space-between; padding-top: .7rem;
  border-top: 1px solid rgba(255, 255, 255, .15); }
.kopf-seitenleiste .profil-inhalt { top: auto; bottom: calc(100% + .45rem); left: 0; right: auto; }
.kopf-seitenleiste .profilname { max-width: 6.5rem; }
.kopf-seitenleiste .inhalt { margin-left: var(--leiste-b); max-width: none; padding-left: 2rem; padding-right: 2rem; }
.kopf-seitenleiste .werkzeugleiste.fest { margin-left: -2rem; margin-right: -2rem; padding-left: 2rem; padding-right: 2rem; }
.kopf-seitenleiste.thema-klassisch .werkzeugleiste.fest { left: var(--leiste-b); padding-left: 2rem; margin: 0; }
.kopf-seitenleiste .meldungen { top: 1rem; }
@media (max-width: 900px) {
  .kopf-seitenleiste { --leiste-b: 4.2rem; }
  .kopf-seitenleiste .marke-text, .kopf-seitenleiste .marke-zusatz, .kopf-seitenleiste .nav-text, .kopf-seitenleiste .globalsuche,
  .kopf-seitenleiste .profilname, .kopf-seitenleiste .pfeil { display: none; }
  .kopf-seitenleiste .kopf-nav { flex-direction: column; align-items: center; }
  .kopf-seitenleiste .inhalt { padding-left: 1rem; padding-right: 1rem; }
  .kopf-zweizeilig .marke-zusatz { display: none; }
}
.kopf-seitenleiste .marke { order: -2; }
