/* HDSRE v2 – Oberfläche. Helles Design als Standard, dunkles wahlweise (data-theme am html-Element).
   Aufbau: links das Menü, rechts die Bahn mit Sichten nebeneinander. Jede Sicht ist eine Spalte mit Karten. */
:root {
  --bg: #f1f2f4; --flaeche: #ffffff; --flaeche2: #f6f7f9; --text: #1f2933; --leise: #66717e; --linie: #e3e6ea;
  --akzent: #7f1329; --akzent-text: #ffffff; --akzent-zart: #f7e9ec; --logo-burg: #7f1329; --logo-bruecke: #706d6c; --diag-a: #7f1329; --diag-b: #8f8a82;
  --gut: #177245; --gut-zart: #e3f4ea; --warn: #8f5400; --warn-zart: #fdf0d6; --schlecht: #b42318; --schlecht-zart: #fde8e6;
  --info: #1f5fa8; --info-zart: #e6eff9;
  --schatten: 0 1px 3px rgba(15,23,42,.08), 0 1px 2px -1px rgba(15,23,42,.08);
  --schatten-gross: 0 4px 10px rgba(15,23,42,.08), 0 20px 48px rgba(15,23,42,.16);
  --radius: 14px; color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0f1317; --flaeche: #181d23; --flaeche2: #1e242b; --text: #e6eaee; --leise: #9aa5b1; --linie: #2a323b;
  --akzent: #e8798f; --akzent-text: #1a0a0e; --akzent-zart: #34191f; --logo-burg: #d9768a; --logo-bruecke: #a7a2a0; --diag-a: #e8798f; --diag-b: #77736d;
  --gut: #5fcf9a; --gut-zart: #16302a; --warn: #f0b860; --warn-zart: #33280f; --schlecht: #ff8a7d; --schlecht-zart: #3a1a17;
  --info: #7fb4ee; --info-zart: #172a40;
  --schatten: 0 1px 2px rgba(0,0,0,.5); --schatten-gross: 0 20px 48px rgba(0,0,0,.6); color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
h1 { font-size: 1.3rem; margin: 0; font-weight: 700; letter-spacing: -.01em; overflow-wrap: anywhere; }
h2 { font-size: 1rem; margin: 0; font-weight: 650; }
a { color: var(--akzent); text-decoration: none; } a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
.zahl { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.leise { color: var(--leise); } .klein { font-size: .86rem; }
#app { height: 100%; }

/* Rahmen: Menü links, Bühne rechts */
.rahmen { display: grid; grid-template-columns: 232px minmax(0, 1fr); height: 100vh; height: 100dvh; overflow: hidden; }
.seitenleiste { background: var(--flaeche); border-right: 1px solid var(--linie); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; min-height: 0; overflow-y: auto; }
.marke { font-weight: 700; letter-spacing: .04em; padding: 2px 8px 16px; display: flex; align-items: center; gap: 10px; }
.logo { display: inline-block; flex: none; width: 52px; aspect-ratio: 912 / 487; }
.logo svg { display: block; width: 100%; height: 100%; }
.logo.gross { width: 120px; margin: 0 auto 10px; display: block; }
.anmeldekopf { text-align: center; }
.marke small { display: block; font-weight: 400; letter-spacing: 0; color: var(--leise); }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; padding: 8px 10px; border-radius: 9px; color: var(--text); font-weight: 500; }
.nav a:hover { background: var(--flaeche2); text-decoration: none; }
.nav a.aktiv { background: var(--akzent-zart); color: var(--akzent); font-weight: 650; }
.nav .trenner { margin: 12px 10px 4px; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--leise); }
.nav details.abschnitt { display: grid; gap: 2px; }
.nav details.abschnitt[open] { padding-bottom: 2px; }
.nav details.abschnitt > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; border-radius: 6px; }
.nav details.abschnitt > summary::-webkit-details-marker { display: none; }
.nav details.abschnitt > summary::after { content: '›'; font-size: .95rem; transition: transform .15s; }
.nav details.abschnitt[open] > summary::after { transform: rotate(90deg); }
.nav details.abschnitt > summary:hover { color: var(--text); }
.nav details.abschnitt > summary:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
.konto { margin-top: auto; border-top: 1px solid var(--linie); padding: 10px 0 0; position: relative; }
.konto-zeile { display: flex; align-items: center; gap: 4px; }
.konto-knopf { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; padding: 6px; border: 0; border-radius: 10px;
  background: transparent; color: var(--text); font: inherit; font-weight: 550; cursor: pointer; text-align: left; }
.konto-knopf:hover, .konto-knopf[aria-expanded="true"] { background: var(--flaeche2); }
.konto-knopf:focus-visible, .symbolknopf:focus-visible, .konto-menue button:focus-visible { outline: 2px solid var(--akzent); outline-offset: 1px; }
.initialen { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--akzent-zart);
  color: var(--akzent); font-size: .78rem; font-weight: 700; letter-spacing: .02em; }
.kname { font-size: .92rem; line-height: 1.25; overflow-wrap: anywhere; }
.symbolknopf { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent;
  color: var(--leise); cursor: pointer; padding: 0; }
.symbolknopf:hover { color: var(--text); background: var(--flaeche2); }
.konto-menue { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.14); padding: 6px; display: grid; gap: 2px; z-index: 30; }
.konto-menue button { text-align: left; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: inherit; cursor: pointer; }
.konto-menue button:hover { background: var(--flaeche2); }

.buehne { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.oben { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 14px; background: var(--flaeche); border-bottom: 1px solid var(--linie); }
.pfad { display: flex; align-items: center; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.pfad button { border: 0; background: transparent; padding: 5px 9px; border-radius: 8px; cursor: pointer; color: var(--leise); font-weight: 500; max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.pfad button:hover { background: var(--flaeche2); color: var(--text); }
.pfad button.aktuell { color: var(--text); font-weight: 650; }
.pfad .pfeil { color: var(--leise); opacity: .6; }
.nur-handy { display: none !important; }
[hidden] { display: none !important; }
.innen > * + .merkmale { margin-top: 10px; }

/* Bahn mit den Sichten */
.bahn { flex: 1; min-height: 0; display: flex; overflow-x: auto; overflow-y: hidden; scroll-behavior: smooth; }
.sicht { flex: 0 0 auto; width: 640px; max-width: 100%; height: 100%; display: flex; flex-direction: column; border-right: 1px solid var(--linie); container: sicht / inline-size; outline: none; }
.sicht[data-art="liste"], .sicht[data-art="breit"] { width: 560px; }
.sicht[data-art="liste"].letzte { width: min(1100px, 100%); }
.sicht[data-art="breit"].letzte { width: min(1200px, 100%); }
.sicht[data-art="dokument"] { width: min(920px, 100%); }
.sicht.blitz .sichtkopf { animation: blitz .9s ease-out; }
@keyframes blitz { from { background: var(--akzent-zart); } }
.sichtkopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 18px 10px; }
.sichtkopf .ueber { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--leise); font-weight: 600; }
.sichtkopf .unter { color: var(--leise); font-size: .9rem; margin-top: 1px; }
.sichtkopf .rechts { display: flex; align-items: center; gap: 6px; flex: none; }
.rund { width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; cursor: pointer; font-size: 1.25rem; line-height: 1; color: var(--leise); display: inline-grid; place-items: center; flex: none; }
.rund:hover { background: var(--linie); color: var(--text); }
.sichtleib { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 18px 40px; display: grid; gap: 14px; align-content: start; grid-template-columns: minmax(0, 1fr); grid-auto-rows: max-content; }

/* Karten und Bausteine */
.karte { background: var(--flaeche); border-radius: var(--radius); box-shadow: var(--schatten); min-width: 0; overflow: hidden; }
.karte > header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 16px 0; }
.karte > .innen { padding: 12px 16px 16px; }
.karte > header + .rolle { margin-top: 6px; }
.summe { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; padding: 16px; }
.summe .betrag { font-size: 1.9rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.summe .marken { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; }
.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kachel { background: var(--flaeche); border-radius: var(--radius); box-shadow: var(--schatten); padding: 14px 16px; color: var(--text); display: block; min-width: 0; }
a.kachel:hover { text-decoration: none; background: var(--flaeche2); }
.kachel .wert { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kachel .name { color: var(--leise); font-size: .88rem; }
.merkmale { display: grid; grid-template-columns: max-content 1fr; gap: 5px 16px; margin: 0; }
.merkmale dt { color: var(--leise); } .merkmale dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.rolle { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--leise); font-weight: 600; padding: 9px 12px; border-bottom: 1px solid var(--linie); white-space: nowrap; }
td { padding: 9px 12px; border-bottom: 1px solid var(--linie); vertical-align: top; overflow-wrap: anywhere; }
td.fest { white-space: nowrap; } td.fest .klein { white-space: normal; overflow-wrap: normal; }
th:first-child, td:first-child { padding-left: 16px; } th:last-child, td:last-child { padding-right: 16px; }
tr:last-child td { border-bottom: 0; }
tfoot td { font-weight: 650; border-top: 2px solid var(--linie); border-bottom: 0; }
.unterzeile td { padding-top: 0; color: var(--leise); font-size: .86rem; }
tr:has(+ .unterzeile) td { border-bottom: 0; padding-bottom: 2px; }
@container sicht (max-width: 600px) { .neben { display: none; } }

/* Alles, was eine weitere Sicht öffnet */
[data-ziel] { cursor: pointer; }
tr[data-ziel]:hover, li[data-ziel]:hover { background: var(--flaeche2); }
tr[data-ziel].offen, li[data-ziel].offen { background: var(--akzent-zart); box-shadow: inset 3px 0 0 var(--akzent); }
a[data-ziel].offen, button[data-ziel].offen { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
a.kachel[data-ziel].offen { text-decoration: none; box-shadow: var(--schatten), inset 0 0 0 2px var(--akzent); }

.marke-chip { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: .76rem; font-weight: 600; white-space: nowrap; background: var(--flaeche2); border: 1px solid var(--linie); color: var(--leise); }
.chip-gut { background: var(--gut-zart); color: var(--gut); border-color: transparent; }
.chip-warn { background: var(--warn-zart); color: var(--warn); border-color: transparent; }
.chip-schlecht { background: var(--schlecht-zart); color: var(--schlecht); border-color: transparent; }
.chip-info { background: var(--info-zart); color: var(--info); border-color: transparent; }
.chip-akzent { background: var(--akzent-zart); color: var(--akzent); border-color: transparent; }

/* Bedienung */
.leiste { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.leiste .suche { flex: 1 1 200px; }
input[type=text], input[type=search], input[type=email], input[type=password], select, textarea {
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: 9px; padding: 7px 11px; min-height: 38px; width: 100%; }
textarea { min-height: 120px; resize: vertical; }
select { width: auto; max-width: 100%; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible, tr:focus-visible, li:focus-visible { outline: 2px solid var(--akzent); outline-offset: -2px; }
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--linie); background: var(--flaeche); border-radius: 9px; padding: 6px 14px; min-height: 36px; cursor: pointer; font-weight: 600; color: var(--text); white-space: nowrap; }
.knopf:hover { background: var(--flaeche2); text-decoration: none; }
.knopf.haupt { background: var(--akzent); border-color: var(--akzent); color: var(--akzent-text); }
.knopf.haupt:hover { filter: brightness(1.1); }
.knopf.schlicht { border-color: transparent; background: transparent; color: var(--akzent); padding-inline: 8px; }
.knopf.schlicht:hover { background: var(--flaeche2); }
.knopf.klein { min-height: 30px; padding: 3px 10px; }
.knopf[disabled] { opacity: .5; cursor: default; }
.blaettern { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; padding: 10px 16px; color: var(--leise); border-top: 1px solid var(--linie); }
.reiter { display: flex; gap: 4px; background: var(--flaeche); border-radius: 11px; box-shadow: var(--schatten); padding: 4px; width: max-content; max-width: 100%; }
.reiter button { border: 0; background: transparent; padding: 6px 14px; border-radius: 8px; cursor: pointer; color: var(--leise); font-weight: 600; }
.reiter button.aktiv { background: var(--akzent-zart); color: var(--akzent); }
.leer { padding: 36px 18px; text-align: center; color: var(--leise); }
.feld { display: grid; gap: 5px; } .feld label { font-size: .88rem; font-weight: 600; }
.felder { display: grid; gap: 14px; }
.wahl { display: grid; gap: 6px; } .wahl label { display: flex; gap: 9px; align-items: center; font-weight: 400; }
.fehlertext { color: var(--schlecht); font-size: .9rem; min-height: 1.3em; }
.hinweiskasten { background: var(--info-zart); color: var(--text); border-radius: var(--radius); padding: 12px 16px; }
.hinweiskasten.gut { background: var(--gut-zart); } .hinweiskasten.warn { background: var(--warn-zart); }
code.geheim { display: block; font: 1.05rem ui-monospace, Menlo, Consolas, monospace; background: var(--flaeche2); border: 1px dashed var(--linie); border-radius: 8px; padding: 12px; user-select: all; overflow-wrap: anywhere; }
.blatt { border: 0; width: 100%; height: calc(100dvh - 190px); min-height: 420px; display: block; background: #fff; }

/* Anmeldung */
.anmeldung { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.anmeldung .karte { width: min(400px, 100%); box-shadow: var(--schatten-gross); }
.anmeldung .innen { padding: 28px; }

/* Fenster */
#schicht:empty { display: none; }
#schicht { position: fixed; inset: 0; background: rgba(10,14,20,.45); display: grid; place-items: center; padding: 16px; z-index: 40; }
.fenster { background: var(--flaeche); border-radius: 16px; box-shadow: var(--schatten-gross); width: min(520px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; }
.fenster > header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px 4px; }
.fenster > .innen { padding: 12px 20px 18px; overflow: auto; flex: 1; }
.fenster > footer { display: flex; justify-content: flex-end; gap: 10px; padding: 0 20px 18px; }
#meldungen { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 50; }
.meldung { background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; box-shadow: var(--schatten-gross); max-width: 360px; }

/* Belegkette und Beiträge */
.kette { display: grid; margin: 0; padding: 4px 0; list-style: none; }
.kette li { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 10px; padding: 9px 16px; align-items: start; position: relative; }
.kette li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--linie); margin-top: 7px; margin-left: 2px; }
.kette li.gueltig::before { background: var(--gut); }
.kette li:not(:last-child)::after { content: ""; position: absolute; left: 22px; top: 28px; bottom: -8px; width: 2px; background: var(--linie); }
.kette .titel { font-weight: 600; }
.beitrag { padding: 12px 0; border-bottom: 1px solid var(--linie); }
.beitrag:last-child { border-bottom: 0; }
.beitrag.antwort { margin-left: 22px; padding-left: 14px; border-left: 2px solid var(--linie); }
.beitrag.hinweis { background: var(--warn-zart); border-radius: 10px; padding: 12px 14px; border-bottom: 0; margin-bottom: 6px; }
.beitrag .kopfzeile { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; font-size: .88rem; color: var(--leise); }
.beitrag .kopfzeile b { color: var(--text); }
.beitrag p { margin: 4px 0 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.beitrag .zurueckgezogen { color: var(--leise); font-style: italic; }

/* Handy: eine Sicht je Bildschirm, oben links der Pfeil zurück, das Menü als Schublade */
@media (max-width: 760px) {
  .rahmen { grid-template-columns: minmax(0, 1fr); }
  .nur-handy:not([hidden]) { display: inline-flex !important; }
  .nur-breit { display: none !important; }
  .oben { padding: 0 6px; min-height: 50px; justify-content: space-between; }
  .zurueck-knopf { border: 0; background: transparent; cursor: pointer; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 9px; color: var(--akzent); font-weight: 600; min-width: 0; }
  .zurueck-knopf .ziel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .zurueck-knopf .pf { font-size: 1.3rem; line-height: 1; }
  .handy-marke { font-weight: 700; letter-spacing: .04em; padding: 0 10px; }
  .seitenleiste { position: fixed; inset: 0 auto 0 0; width: min(280px, 86vw); z-index: 30; transform: translateX(-102%); transition: transform .18s ease-out; }
  .rahmen.menue-offen .seitenleiste { transform: none; box-shadow: var(--schatten-gross); }
  .rahmen.menue-offen::after { content: ""; position: fixed; inset: 0; background: rgba(10,14,20,.45); z-index: 20; }
  .bahn { overflow: hidden; }
  .sicht { display: none; border-right: 0; }
  .sicht.letzte, .sicht[data-art].letzte { display: flex; width: 100%; }
  .sichtkopf { padding: 14px 14px 8px; } .sichtkopf .zu { display: none; }
  .sichtleib { padding: 6px 12px 40px; }
}
@media (prefers-reduced-motion: no-preference) {
  .fenster { animation: auf .14s ease-out; } @keyframes auf { from { transform: translateY(6px); opacity: 0; } }
  .sicht { animation: herein .18s ease-out; } @keyframes herein { from { opacity: 0; } }
}
@media (prefers-reduced-motion: reduce) { .bahn { scroll-behavior: auto; } }

/* Zahlung in der Bestellung */
.zahlkopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.zahlkopf .links { display: flex; gap: 6px; flex-wrap: wrap; }
.betrag-klein { font-variant-numeric: tabular-nums; font-weight: 650; }
table.einbehalte { width: 100%; margin-top: 10px; border-collapse: collapse; font-size: .92rem; }
table.einbehalte th, table.einbehalte td { padding: 6px 0; border-bottom: 1px solid var(--linie); text-align: left; }
table.einbehalte th { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--leise); font-weight: 600; }
table.einbehalte .zahl { text-align: right; font-variant-numeric: tabular-nums; }
table.einbehalte tfoot td { border-bottom: none; }

/* Umschalter Hauslayout/Original in der PDF-Sicht */
.kopfknoepfe { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.umschalter { display: inline-flex; padding: 2px; border-radius: 9px; background: var(--flaeche2); border: 1px solid var(--linie); }
.umschalter button { border: 0; background: transparent; color: var(--leise); font: inherit; font-size: .85rem; font-weight: 550;
  padding: 4px 10px; border-radius: 7px; cursor: pointer; }
.umschalter button[aria-checked="true"] { background: var(--flaeche); color: var(--akzent); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.umschalter button:focus-visible { outline: 2px solid var(--akzent); outline-offset: 1px; }

/* Diagramme (Übersicht) */
.diag-filterzeile { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.diag-filter { display: grid; gap: 2px; }
.diag-filter select { font: inherit; font-size: .9rem; padding: 6px 8px; border: 1px solid var(--linie); border-radius: 8px; background: var(--flaeche); color: var(--text); }
.diag-schalter { display: flex; align-items: center; gap: 6px; font-size: .9rem; padding-bottom: 7px; }
#diag-tabelle[aria-pressed="true"] { background: var(--akzent-zart); color: var(--akzent); }
.diag-raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 8px 24px; padding: 0 20px 4px; }
.diag-block { min-width: 0; }
.diag-kopf { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin: 6px 0 4px; }
.diag-kopf h2 { font-size: 1rem; margin: 0; }
.diag-summe { text-align: right; }
.diag-summe .wert { font-size: 1.35rem; font-weight: 650; }
.diag-flaeche { position: relative; min-width: 0; }
.diag-flaeche svg { display: block; width: 100%; height: auto; overflow: visible; }
.diag-gitter { stroke: var(--linie); stroke-width: 1; }
.diag-basis { stroke: var(--leise); stroke-width: 1; opacity: .6; }
.diag-achse { fill: var(--leise); font-size: 11px; font-variant-numeric: tabular-nums; }
.diag-wert { fill: var(--text); font-size: 11px; font-weight: 600; }
path.diag-a { fill: var(--diag-a); }
path.diag-b { fill: var(--diag-b); }
.diag-saeule.aktiv path { opacity: .82; }
.diag-treffer { fill: transparent; cursor: pointer; outline: none; }
.diag-treffer:focus-visible { stroke: var(--akzent); stroke-width: 1.5; }
.diag-tipp { position: absolute; top: 0; pointer-events: none; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0,0,0,.12); padding: 8px 10px; font-size: .85rem; white-space: nowrap; z-index: 5; }
.tipp-zeile { display: flex; align-items: center; gap: 8px; }
.tipp-zeile i, .diag-legende i { display: inline-block; flex: none; }
.tipp-zeile i { width: 12px; height: 2px; border-radius: 1px; }
.tipp-zeile i.diag-a, .diag-legende i.diag-a { background: var(--diag-a); }
.tipp-zeile i.diag-b, .diag-legende i.diag-b { background: var(--diag-b); }
.diag-legende { display: flex; gap: 14px; font-size: .82rem; color: var(--leise); margin-bottom: 2px; }
.diag-legende span { display: inline-flex; align-items: center; gap: 6px; }
.diag-legende i { width: 10px; height: 10px; border-radius: 2px; }
.diag-hinweis { margin-top: 2px; }
table.diag-tabelle { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: .9rem; }
table.diag-tabelle th, table.diag-tabelle td { padding: 6px 8px; border-bottom: 1px solid var(--linie); text-align: left; }
table.diag-tabelle .zahl { text-align: right; font-variant-numeric: tabular-nums; }

/* Abgleich an der Bestellung */
.abgleich header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.abgleich-liste { list-style: none; margin: 0; padding: 4px 20px 16px; display: grid; gap: 10px; }
.abgleich-zeile { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; }
.abgleich-zeichen { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 700; }
.abgleich-zeichen.gut { background: var(--gut-zart); color: var(--gut); }
.abgleich-zeichen.warn { background: var(--warn-zart); color: var(--warn); }
.abgleich-zeichen.neutral { background: var(--flaeche2); color: var(--leise); }
