/* OpenScout – Komponenten. Alle Werte kommen aus tokens.css. */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body { background: var(--grund); color: var(--text); font: var(--gr-text)/var(--zh-text) var(--schrift); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--farbe-primaer); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--fokus); outline-offset: 2px; }
.mono { font-family: var(--schrift-mono); font-size: .9em; }
.icon { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.icon--20 { width: 20px; height: 20px; }
.icon--32 { width: 32px; height: 32px; stroke-width: 1.5; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ============================ App-Shell ============================ */
.shell { display: grid; grid-template-columns: var(--leiste-breit) minmax(0, 1fr); height: 100vh; }
.shell.leiste-zu { grid-template-columns: var(--leiste-schmal) minmax(0, 1fr); }

.leiste { background: var(--leiste-bg); color: var(--text-invers); display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; }
.leiste-marke { padding: 22px 20px 20px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid rgba(255,255,255,.18); }
.leiste-marke img { width: 112px; height: auto; display: block; }
.leiste-produkt { font-size: 17px; font-weight: 700; letter-spacing: .01em; }
.leiste-produkt small { display: block; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .85; margin-top: 2px; }
.leiste-nav { list-style: none; margin: 12px 0; padding: 0; display: flex; flex-direction: column; }
.leiste-nav a {
  display: flex; align-items: center; gap: 12px; padding: 11px 20px; color: var(--text-invers); text-decoration: none;
  font-size: 15px; border-left: 4px solid transparent; white-space: nowrap;
}
.leiste-nav a:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.leiste-nav a[aria-current="page"] { background: var(--leiste-aktiv-bg); border-left-color: var(--leiste-markierung); font-weight: 700; }
.leiste-nav .unter a { padding: 7px 20px 7px 52px; font-size: 14px; opacity: .92; }
.leiste-nav .unter a[aria-current="page"] { background: transparent; border-left-color: transparent; text-decoration: underline; text-underline-offset: 4px; opacity: 1; }
.leiste-fuss { margin-top: auto; border-top: 1px solid rgba(255,255,255,.18); padding: 8px 0; }
.leiste-schalter { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 20px; background: none; border: 0; color: var(--text-invers); cursor: pointer; opacity: .85; font-size: 13px; }
.leiste-schalter:hover { opacity: 1; background: rgba(255,255,255,.08); }
.shell.leiste-zu .leiste-text, .shell.leiste-zu .leiste-produkt, .shell.leiste-zu .unter { display: none; }
.leiste-marke .leiste-symbol { display: none; width: 32px; height: 32px; }
.shell.leiste-zu .leiste-marke img.logo { display: none; }   /* Styleguide: Logo nie beschneiden, „M“ nie allein */
.shell.leiste-zu .leiste-marke .leiste-symbol { display: block; }
.shell.leiste-zu .leiste-marke { align-items: center; padding: 16px 0; }
.shell.leiste-zu .leiste-nav a, .shell.leiste-zu .leiste-schalter { justify-content: center; padding-left: 0; padding-right: 0; }

.haupt { display: flex; flex-direction: column; min-width: 0; height: 100vh; }
.kopfzeile {
  flex: none; height: var(--kopfzeile); display: flex; align-items: center; gap: var(--a4); padding: 0 var(--seitenrand);
  border-bottom: 1px solid var(--linie); background: var(--flaeche);
}
.mobil-menue { display: none; background: none; border: 0; padding: 6px; cursor: pointer; color: var(--farbe-primaer); }
.brotkrumen { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; font-size: var(--gr-klein); white-space: nowrap; overflow: hidden; }
.brotkrumen a { color: var(--text); }
.brotkrumen span:last-child { font-weight: 700; color: var(--farbe-primaer); overflow: hidden; text-overflow: ellipsis; }
.brotkrumen .icon { width: 14px; height: 14px; color: var(--text-leise); }
.kopf-aktionen { display: flex; align-items: center; gap: var(--a2); }
.kopf-knopf { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; background: none; border: 1px solid transparent; cursor: pointer; color: var(--text); font-size: var(--gr-klein); }
.kopf-knopf:hover { border-color: var(--rahmen); }
.statuspunkt { width: 10px; height: 10px; border-radius: 50%; background: var(--status-offen); }
.statuspunkt--ok { background: var(--status-ok); } .statuspunkt--fehler { background: var(--status-fehler); } .statuspunkt--info { background: var(--status-info); }
.avatar { width: 30px; height: 30px; display: grid; place-items: center; background: var(--farbe-primaer); color: var(--text-invers); font-weight: 700; font-size: 12px; }
.menue { position: absolute; z-index: 30; min-width: 240px; background: var(--flaeche); border: 1px solid var(--rahmen); box-shadow: 0 8px 24px rgba(0,25,75,.14); padding: 6px 0; }
.menue-kopf { padding: 10px 16px; border-bottom: 1px solid var(--linie); margin-bottom: 6px; }
.menue-kopf strong { display: block; }
.menue-kopf small { color: var(--text-2); }
.menue button, .menue a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 16px; background: none; border: 0; text-align: left; cursor: pointer; color: var(--text); font-size: 14px; text-decoration: none; }
.menue button:hover, .menue a:hover { background: var(--flaeche-hover); }
.menue-gruppe { padding: 8px 16px; border-top: 1px solid var(--linie); margin-top: 6px; display: flex; flex-direction: column; gap: 6px; font-size: var(--gr-klein); }

.seite { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); overflow: hidden; }
.seite.mit-panel { grid-template-columns: minmax(0, 1fr) var(--panel-breite); }
.inhalt { overflow-y: auto; padding: var(--a5) var(--seitenrand) var(--a7); display: flex; flex-direction: column; gap: var(--a5); }
.inhalt > * { max-width: 1600px; width: 100%; }

/* Seitenkopf */
.seitenkopf { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--a4); flex-wrap: wrap; }
.overline { margin: 0 0 4px; font-size: var(--gr-overline); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--azure); }
.seitenkopf h1 { margin: 0; font-size: var(--gr-titel); line-height: var(--zh-titel); font-weight: 800; color: var(--farbe-primaer); letter-spacing: -.01em; }
.seitenkopf p.unter { margin: 4px 0 0; color: var(--text-2); max-width: 80ch; }
.seitenkopf-aktionen { display: flex; gap: var(--a2); flex-wrap: wrap; }

/* Kontextpanel */
.panel { border-left: 1px solid var(--rahmen); background: var(--flaeche); display: flex; flex-direction: column; min-height: 0; }
.panel-kopf { flex: none; display: flex; align-items: center; justify-content: space-between; gap: var(--a2); padding: 14px 20px; border-bottom: 1px solid var(--linie); background: var(--warm-grey); }
.panel-kopf h2 { margin: 0; font-size: 15px; font-weight: 700; color: var(--farbe-primaer); }
.panel-inhalt { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: var(--a4); }
.panel-fuss { flex: none; padding: 12px 20px; border-top: 1px solid var(--linie); display: flex; gap: var(--a2); flex-wrap: wrap; }

/* ============================ Bausteine ============================ */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--feld-hoehe); padding: 0 16px;
  font-weight: 700; font-size: 14px; cursor: pointer; border: 1px solid var(--farbe-primaer); border-radius: var(--ecke); white-space: nowrap; text-decoration: none;
}
.knopf:hover { text-decoration: none; }
.knopf--primaer { background: var(--button-primaer-bg); color: var(--button-primaer-text); }
.knopf--primaer:hover:not(:disabled) { background: var(--farbe-tief); border-color: var(--farbe-tief); }
.knopf--sekundaer { background: var(--flaeche); color: var(--farbe-primaer); }
.knopf--sekundaer:hover:not(:disabled) { background: var(--flaeche-hover); }
.knopf--tertiaer { background: none; border-color: transparent; color: var(--farbe-primaer); padding: 0 8px; }
.knopf--tertiaer:hover:not(:disabled) { background: var(--flaeche-hover); }
.knopf--gefahr { background: var(--flaeche); color: var(--status-fehler); border-color: var(--status-fehler); }
.knopf:disabled { cursor: not-allowed; background: var(--warm-grey); border-color: var(--warm-grey); color: var(--text-leise); }
.knopf--icon { width: var(--feld-hoehe); padding: 0; }

.card { background: var(--flaeche); border: 1px solid var(--rahmen); display: flex; flex-direction: column; min-width: 0; }
.card-kopf { display: flex; align-items: center; justify-content: space-between; gap: var(--a2); padding: 14px 18px; border-bottom: 1px solid var(--linie); }
.card-kopf h2, .card-kopf h3 { margin: 0; font-size: var(--gr-abschnitt); font-weight: 700; color: var(--text); }
.card-kopf small { color: var(--text-2); font-size: var(--gr-klein); }
.card-inhalt { padding: 16px 18px; display: flex; flex-direction: column; gap: var(--a3); }
.card-inhalt--ohne { padding: 0; }

.raster { display: grid; gap: var(--a4); }
.raster--4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.raster--2 { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
.raster--3-1 { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); }

/* KPI-Kachel (Shopfloor-Board) */
.kpi { background: var(--flaeche); border: 1px solid var(--rahmen); border-top: 3px solid var(--farbe-primaer); padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 2px; color: var(--text); text-decoration: none; min-width: 0; }
a.kpi:hover { background: var(--flaeche-hover); text-decoration: none; }
.kpi--leer { border-top-color: var(--middle-grey); }
.kpi-titel { font-size: var(--gr-overline); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text); display: flex; justify-content: space-between; gap: 8px; }
.kpi-wert { font-size: var(--gr-kennzahl); line-height: 1.15; font-weight: 300; color: var(--farbe-primaer); margin-top: 6px; }
.kpi-trend { font-size: var(--gr-klein); display: flex; align-items: center; gap: 4px; }
.kpi-stand { font-size: 12px; color: var(--text-2); margin-top: 4px; }

/* Badges und Status */
.status { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: var(--gr-klein); }
.status .punkt { width: 8px; height: 8px; border-radius: 50%; background: var(--status-offen); flex: none; }
.status--ok .punkt { background: var(--status-ok); }
.status--info .punkt { background: var(--status-info); }
.status--fehler { color: var(--status-fehler); } .status--fehler .punkt { background: var(--status-fehler); }
.status--leer .punkt { background: none; border: 1.5px solid var(--status-offen); }
.etikett { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; border: 1px solid var(--rahmen); color: var(--farbe-primaer); background: var(--flaeche); white-space: nowrap; }
.etikett--voll { background: var(--farbe-primaer); color: var(--text-invers); border-color: var(--farbe-primaer); }
.etikett--ki { border-color: var(--ki); color: var(--farbe-tief); }
.etikett--hypothese { border: 1px dashed var(--ki); color: var(--farbe-tief); }
.etikett--beispiel { border-color: var(--farbe-tief); color: var(--farbe-tief); background: var(--warm-grey); }
.ki-block { border-left: 3px solid var(--ki); padding: 4px 0 4px 12px; }
.konfidenz { letter-spacing: 1px; color: var(--farbe-primaer); font-size: 11px; white-space: nowrap; }
.fehlt { color: var(--text-leise); cursor: help; }

/* Objektkennung */
.objekt { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: var(--text); }
.objekt:hover { text-decoration: none; }
.objekt:hover .objekt-name { text-decoration: underline; color: var(--farbe-primaer); }
.objekt-zeichen { width: 32px; height: 32px; flex: none; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--text-invers); background: var(--farbe-primaer); }
.objekt-zeichen--tech { background: var(--flaeche); color: var(--farbe-primaer); border: 1px solid var(--rahmen); }
.objekt-text { display: flex; flex-direction: column; min-width: 0; }
.objekt-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.objekt-meta { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Score */
.score { display: inline-flex; align-items: center; gap: 8px; min-width: 110px; }
.score-balken { flex: 1; height: 6px; background: var(--warm-grey); position: relative; min-width: 50px; }
.score-balken span { position: absolute; inset: 0 auto 0 0; }
.score-wert { font-weight: 700; min-width: 2.2em; text-align: right; }

/* Hinweise */
.banner { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border: 1px solid var(--rahmen); border-left: 4px solid var(--farbe-tief); background: var(--warm-grey); font-size: var(--gr-klein); }
.banner strong { color: var(--farbe-tief); }
.banner--info { border-left-color: var(--azure); background: var(--flaeche); }
.banner--fehler { border-left-color: var(--status-fehler); background: var(--flaeche); color: var(--status-fehler); }
.banner--ok { border-left-color: var(--status-ok); background: var(--flaeche); }

/* Leerzustand */
.leer { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--a3); padding: var(--a7) var(--a5); color: var(--text); }
.leer .icon--32 { color: var(--middle-grey); }
.leer h3 { margin: 0; font-size: var(--gr-abschnitt); color: var(--farbe-primaer); }
.leer p { margin: 0; max-width: 56ch; color: var(--text-2); }

/* Skelett */
.skelett { background: var(--warm-grey); animation: skelett 1.2s ease-in-out infinite alternate; height: 14px; }
@keyframes skelett { to { opacity: .45; } }

/* Registerkarten */
.tabs { display: flex; gap: var(--a5); border-bottom: 1px solid var(--linie); overflow-x: auto; }
.tabs a, .tabs button { padding: 10px 0 9px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--text); font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap; text-decoration: none; }
.tabs [aria-selected="true"] { color: var(--farbe-primaer); border-bottom-color: var(--farbe-primaer); }
.tabs [aria-disabled="true"] { color: var(--text-leise); cursor: not-allowed; font-weight: 400; }

/* Stepper */
.stepper { display: flex; gap: 0; counter-reset: schritt; }
.stepper li { list-style: none; display: flex; align-items: center; gap: 8px; padding: 8px 18px 8px 0; font-size: 14px; color: var(--text-leise); }
.stepper li + li::before { content: ""; width: 28px; height: 1px; background: var(--rahmen); margin-right: 10px; }
.stepper .nr { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--rahmen); font-size: 12px; font-weight: 700; }
.stepper .aktiv { color: var(--farbe-primaer); font-weight: 700; }
.stepper .aktiv .nr { background: var(--farbe-primaer); color: var(--text-invers); border-color: var(--farbe-primaer); }
.stepper .fertig { color: var(--text); }
.stepper .fertig .nr { background: var(--blue-grey); border-color: var(--blue-grey); color: var(--farbe-tief); }

/* Segment-Schalter */
.segment { display: inline-flex; border: 1px solid var(--farbe-primaer); }
.segment button { height: var(--feld-hoehe); padding: 0 16px; border: 0; background: var(--flaeche); color: var(--farbe-primaer); cursor: pointer; font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; }
.segment button + button { border-left: 1px solid var(--farbe-primaer); }
.segment button[aria-pressed="true"] { background: var(--farbe-primaer); color: var(--text-invers); }

/* Formulare */
.formular { display: flex; flex-direction: column; gap: var(--a4); }
.feld { display: flex; flex-direction: column; gap: 4px; font-size: var(--gr-klein); font-weight: 700; color: var(--text); }
.feld-hilfe { font-weight: 400; font-size: 12px; color: var(--text-2); }
.feld-fehler { font-weight: 400; font-size: 12px; color: var(--status-fehler); }
input[type="text"], input[type="password"], input[type="number"], input[type="email"], input[type="search"], select, textarea {
  height: var(--feld-hoehe); padding: 0 10px; border: 1px solid var(--rahmen); border-radius: var(--ecke); background: var(--flaeche);
  font-size: var(--gr-text); font-weight: 400; color: var(--text); width: 100%; min-width: 0;
}
textarea { height: auto; padding: 8px 10px; min-height: 80px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--fokus); outline-offset: -1px; border-color: var(--fokus); }
input:disabled, select:disabled { background: var(--warm-grey); color: var(--text-leise); }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--farbe-primaer); }
.schalter { display: flex; align-items: center; gap: 8px; font-weight: 400; cursor: pointer; }
.feld-gruppe { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--a3); }
.feld-zeile { display: flex; gap: var(--a2); }
.feld-zeile > :first-child { flex: 1; }
.abschnitt-titel { margin: var(--a2) 0 0; font-size: 14px; font-weight: 700; color: var(--farbe-primaer); padding-bottom: 6px; border-bottom: 1px solid var(--linie); }
.suchfeld-gross { height: 48px !important; font-size: 18px !important; padding: 0 16px !important; }
.werte { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0; font-size: 14px; }
.werte dt { color: var(--text-2); }
.werte dd { margin: 0; overflow-wrap: anywhere; }

/* Tabellen */
.filterleiste { display: flex; flex-wrap: wrap; align-items: center; gap: var(--a2); padding: 12px 16px; border-bottom: 1px solid var(--linie); }
.filterleiste .suche { position: relative; flex: 1 1 260px; max-width: 420px; }
.filterleiste .suche .icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-leise); }
.filterleiste .suche input { padding-left: 34px; }
.filterleiste select { width: auto; min-width: 140px; }
.kontextzeile { display: flex; justify-content: space-between; gap: var(--a3); flex-wrap: wrap; padding: 8px 16px; font-size: var(--gr-klein); color: var(--text-2); border-bottom: 1px solid var(--linie); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 8px; border: 1px solid var(--rahmen); background: var(--flaeche); font-size: 12px; color: var(--text); }
.chip button { border: 0; background: none; padding: 0 2px; cursor: pointer; display: inline-flex; color: var(--text-2); }
.tabelle-rahmen { overflow-x: auto; }
table.tabelle { border-collapse: collapse; width: 100%; font-size: 14px; }
.tabelle th { position: sticky; top: 0; z-index: 1; background: var(--tabellenkopf); text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .03em; color: var(--text); padding: 0 14px; height: 38px; white-space: nowrap; }
.tabelle th button { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.tabelle th button:focus-visible { outline: 2px solid var(--fokus); }
.tabelle td { padding: 0 14px; height: var(--zeile-hoehe); border-bottom: 1px solid var(--linie); vertical-align: middle; }
.tabelle tbody tr { cursor: pointer; }
.tabelle tbody tr:hover td { background: var(--flaeche-hover); }
.tabelle tbody tr[aria-selected="true"] td { background: var(--flaeche-auswahl); }
.tabelle--statisch tbody tr { cursor: default; }
.tabelle--statisch tbody tr:hover td { background: none; }
.tabelle .zahl { text-align: right; }
.tabelle td small { display: block; font-size: 12px; color: var(--text-2); line-height: 1.3; }
.tabelle .aktionen { width: 1%; white-space: nowrap; text-align: right; }
.seitenwahl { display: flex; justify-content: flex-end; align-items: center; gap: var(--a2); padding: 10px 16px; font-size: var(--gr-klein); }

/* Diagramme (SVG) */
.diagramm { width: 100%; height: auto; display: block; font-family: var(--schrift); }
.diagramm text { fill: var(--text); font-size: 12px; }
.diagramm .achse line, .diagramm .gitter line { stroke: var(--linie); }
.diagramm .achse-titel { font-size: 12px; font-weight: 700; }
.diagramm .markierung { fill: var(--farbe-primaer); }
.diagramm .markierung--hl { fill: var(--farbe-highlight); }
.diagramm .markierung:hover, .diagramm .markierung--hl:hover { fill: var(--farbe-tief); }
.legende { display: flex; gap: var(--a4); flex-wrap: wrap; font-size: 12px; }
.legende span { display: inline-flex; align-items: center; gap: 6px; }
.legende i { width: 10px; height: 10px; display: inline-block; }
.tooltip { position: fixed; z-index: 50; pointer-events: none; background: var(--flaeche); border: 1px solid var(--rahmen); box-shadow: 0 6px 18px rgba(0,25,75,.14); padding: 8px 10px; font-size: 12px; min-width: 160px; }
.tooltip strong { display: block; margin-bottom: 4px; color: var(--farbe-primaer); }

/* Detailseite */
.detailkopf { display: flex; gap: var(--a4); align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.detailkopf .objekt-zeichen { width: 56px; height: 56px; font-size: 18px; }
.detailkopf h1 { margin: 0; font-size: var(--gr-titel); font-weight: 800; color: var(--farbe-primaer); }
.detailkopf .meta { display: flex; gap: var(--a2); flex-wrap: wrap; align-items: center; margin-top: 6px; font-size: 14px; }

/* One-Pager (A4) */
.onepager { background: var(--white); border: 1px solid var(--rahmen); width: min(100%, 794px); aspect-ratio: 210 / 297; padding: 36px 40px; display: flex; flex-direction: column; gap: 14px; font-size: 12px; line-height: 1.45; margin: 0 auto; }
.onepager-kopf { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--farbe-primaer); padding-bottom: 10px; }
.onepager-kopf img { width: 96px; }
.onepager h2 { margin: 0; font-size: 22px; color: var(--farbe-primaer); font-weight: 800; }
.onepager h3 { margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--azure); }
.onepager .kpi { padding: 8px 10px; } .onepager .kpi-wert { font-size: 24px; margin-top: 2px; }
.onepager-fuss { margin-top: auto; border-top: 1px solid var(--linie); padding-top: 8px; font-size: 10px; color: var(--text-2); display: flex; justify-content: space-between; gap: 12px; }

/* Toast */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; align-items: center; gap: 10px; background: var(--flaeche); border: 1px solid var(--rahmen); border-left: 4px solid var(--status-ok); padding: 10px 14px; box-shadow: 0 6px 18px rgba(0,25,75,.14); font-size: 14px; max-width: 420px; }
.toast--fehler { border-left-color: var(--status-fehler); }
.toast--info { border-left-color: var(--azure); }

/* Dialog */
dialog { border: 1px solid var(--rahmen); padding: 0; max-width: 460px; width: calc(100% - 32px); box-shadow: 0 12px 40px rgba(0,25,75,.25); }
dialog::backdrop { background: rgba(0,25,75,.35); }
.dialog-inhalt { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.dialog-inhalt h2 { margin: 0; font-size: 18px; color: var(--farbe-primaer); }
.dialog-fuss { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--linie); }

/* Unternavigation (Einstellungen) */
.unternav { display: flex; flex-direction: column; border: 1px solid var(--rahmen); background: var(--flaeche); align-self: start; }
.unternav a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; color: var(--text); border-left: 3px solid transparent; font-size: 14px; }
.unternav a:hover { background: var(--flaeche-hover); text-decoration: none; }
.unternav a[aria-current="page"] { border-left-color: var(--farbe-primaer); color: var(--farbe-primaer); font-weight: 700; background: var(--warm-grey); }
.mit-unternav { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: var(--a5); align-items: start; }

/* Fortschritt / Zeitleiste */
.zeitleiste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.zeitleiste li { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--linie); }
.zeitleiste .nr { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--rahmen); font-weight: 700; color: var(--farbe-primaer); }
.zeitleiste .in_arbeit .nr { background: var(--farbe-primaer); color: var(--text-invers); border-color: var(--farbe-primaer); }
.zeitleiste .abgenommen .nr { background: var(--status-ok); color: var(--farbe-tief); border-color: var(--status-ok); }
.checkliste { list-style: none; margin: 0; padding: 0; }
.checkliste li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--linie); align-items: flex-start; }
.checkliste li:last-child { border-bottom: 0; }
.checkliste small { display: block; color: var(--text-2); }
.passwort-anzeige { font: 700 17px var(--schrift-mono); padding: 10px 12px; border: 1px dashed var(--farbe-primaer); color: var(--farbe-primaer); user-select: all; }

/* Anmeldung */
.anmeldung { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--white); }
.anmeldung-karte { width: min(420px, 100%); border: 1px solid var(--rahmen); border-top: 3px solid var(--farbe-primaer); padding: 32px; display: flex; flex-direction: column; gap: var(--a4); }
.anmeldung-karte img { width: 132px; margin-bottom: 18px; }
.anmeldung-karte h1 { margin: 0; font-size: 28px; font-weight: 800; color: var(--farbe-primaer); }
.anmeldung-karte .knopf { width: 100%; height: 42px; }

/* Responsiv */
@media (max-width: 1279px) {
  .seite.mit-panel { grid-template-columns: minmax(0, 1fr); }
  .seite.mit-panel .panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(var(--panel-breite), 100vw); z-index: 40; box-shadow: -8px 0 30px rgba(0,25,75,.18); }
  .raster--3-1 { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 961px) {
  .seite.mit-panel .mit-unternav { grid-template-columns: minmax(0, 1fr); }
  .seite.mit-panel .unternav { flex-direction: row; overflow-x: auto; }
  .seite.mit-panel .unternav a { border-left: 0; border-bottom: 3px solid transparent; white-space: nowrap; }
  .seite.mit-panel .unternav a[aria-current="page"] { border-bottom-color: var(--farbe-primaer); }
}
@media (max-width: 960px) { .mit-unternav { grid-template-columns: minmax(0, 1fr); } .unternav { flex-direction: row; overflow-x: auto; } .unternav a { border-left: 0; border-bottom: 3px solid transparent; white-space: nowrap; } .unternav a[aria-current="page"] { border-bottom-color: var(--farbe-primaer); } }
@media (max-width: 767px) {
  .shell, .shell.leiste-zu { grid-template-columns: minmax(0, 1fr); }
  .leiste { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 45; transform: translateX(-100%); transition: transform .2s; }
  .shell.mobil-offen .leiste { transform: none; box-shadow: 8px 0 30px rgba(0,25,75,.3); }
  .shell .leiste-text, .shell .leiste-produkt { display: initial; }
  .mobil-menue { display: inline-flex; }
  .leiste-fuss .leiste-schalter[data-aktion="leiste"] { display: none; }
  .nur-desktop { display: none !important; }
  .inhalt { padding: 16px; }
  .raster--2 { grid-template-columns: minmax(0, 1fr); }
  .raster--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--a2); }
  .kpi { padding: 10px 12px; } .kpi-wert { font-size: 28px; }
  .seitenkopf h1 { font-size: 24px; line-height: 30px; }
  .kopf-aktionen .kopf-knopf span.text { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }
@media print {
  .leiste, .kopfzeile, .seitenkopf-aktionen, .banner, .panel { display: none !important; }
  .shell, .haupt, .seite, .inhalt { display: block; height: auto; overflow: visible; padding: 0; }
  .onepager { border: 0; width: 100%; padding: 0; }
}
