/*
 * Firmendashboard Trepels Gruppe – Gestaltung nach Home Instead Brand Guidelines DE 1.5
 * Farben, Schriften und Formen kommen aus dem Design-System „Home Instead“.
 * Regeln: Hellmodus Standard, Status nie nur über Farbe, Kontrast ≥ 4,5:1, Klickflächen ≥ 44 px.
 */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/PlusJakartaSans-Variable.0c74fa620ce4.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/PlusJakartaSans-Italic-Variable.42627dd8ce9f.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/InstrumentSerif-Regular.19bca6142672.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  /* Markenfarben */
  --night-sky: #203c56;
  --clear-sky: #a6d9ff;
  --clear-sky-50: #d2ecff;
  --clear-sky-25: #e9f6ff;
  --serenity: #b7b4ee;
  --serenity-25: #edecfb;
  --bright-future: #faac6e;
  --bright-future-dunkler: #f79a50;
  --bright-future-25: #feeadb;
  --support: #faffee;
  --friendly: #deed6a;
  --peace: #3c3760;
  --brick: #662a12;
  --new-beginning: #2c4f26;
  --sky-wash: #e1f2ff;

  /* Bedeutung – Hellmodus */
  --bg: var(--sky-wash);
  --surface: #ffffff;
  --surface-2: var(--clear-sky-25);
  --nav-bg: #ffffff;
  --ink: var(--night-sky);
  --ink-muted: rgba(32, 60, 86, 0.8);
  --border: rgba(32, 60, 86, 0.16);
  --border-control: rgba(32, 60, 86, 0.6);
  --accent: var(--bright-future);
  --accent-hover: var(--bright-future-dunkler);
  --on-accent: var(--night-sky);
  --focus: var(--night-sky);
  --aktiv-bg: var(--night-sky);
  --aktiv-ink: var(--support);

  /* Status: immer mit Symbol und Text, Farbe nur zusätzlich */
  --ok-bg: #e8f2bd;
  --ok-ink: var(--new-beginning);
  --warn-bg: var(--bright-future-25);
  --warn-ink: var(--brick);
  --info-bg: var(--clear-sky-50);
  --info-ink: var(--night-sky);
  --neutral-bg: var(--serenity-25);
  --neutral-ink: var(--peace);

  --balken-spur: var(--clear-sky-25);
  --balken-1: var(--clear-sky);
  --balken-2: var(--serenity);
  --balken-3: var(--bright-future);
  --balken-4: var(--brick);

  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "PP Editorial New", "Instrument Serif", Georgia, serif;
  --radius: 12px;
  --pill: 9999px;
  color-scheme: light;
}

/* Dunkelmodus: alles auf Night Sky, Schrift in Support (laut Brand Guidelines) */
:root[data-theme="dark"] {
  --bg: var(--night-sky);
  --surface: #2b4660;
  --surface-2: #34506b;
  --nav-bg: #1a3247;
  --ink: var(--support);
  --ink-muted: var(--clear-sky);
  --border: rgba(250, 255, 238, 0.16);
  --border-control: rgba(250, 255, 238, 0.6);
  --focus: var(--bright-future);
  --aktiv-bg: var(--support);
  --aktiv-ink: var(--night-sky);
  --balken-spur: #34506b;
  --balken-4: #c0623d;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--night-sky);
    --surface: #2b4660;
    --surface-2: #34506b;
    --nav-bg: #1a3247;
    --ink: var(--support);
    --ink-muted: var(--clear-sky);
    --border: rgba(250, 255, 238, 0.16);
    --border-control: rgba(250, 255, 238, 0.6);
    --focus: var(--bright-future);
    --aktiv-bg: var(--support);
    --aktiv-ink: var(--night-sky);
    --balken-spur: #34506b;
    --balken-4: #c0623d;
    color-scheme: dark;
  }
}

/* --- Grundlagen ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 500 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }
h2 { font-size: 21px; font-weight: 700; }
h3 { font-size: 17px; font-weight: 700; }
p { margin: 0 0 12px; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.visuell-versteckt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -100px; background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: var(--pill); font-weight: 800; z-index: 100; }
.skip-link:focus { top: 16px; }

.icon {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.icon-gross { width: 28px; height: 28px; }

/* Markenlogo je nach Farbmodus */
.logo-dunkel { display: none; }
:root[data-theme="dark"] .logo-hell { display: none; }
:root[data-theme="dark"] .logo-dunkel { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-hell { display: none; }
  :root:not([data-theme="light"]) .logo-dunkel { display: block; }
}

/* --- Seitenaufbau ------------------------------------------------------------- */
.layout { display: grid; grid-template-columns: 292px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 18px;
  padding: 24px 16px 16px;
  background: var(--nav-bg);
  border-right: 1px solid var(--border);
}
.sidebar-logo { display: block; padding: 0 12px; }
.sidebar-logo img { width: 150px; height: auto; }
.nav-gruppe { display: flex; flex-direction: column; gap: 2px; }
.nav-titel { padding: 0 16px 4px; }
.nav-link {
  display: flex; align-items: center; gap: 12px;
  min-height: 44px; padding: 10px 16px;
  border-radius: var(--pill);
  color: var(--ink); font-weight: 600; text-decoration: none;
}
.nav-link:hover { background: var(--surface-2); }
.nav-link[aria-current="page"] { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.zaehler {
  margin-left: auto; min-width: 26px; padding: 1px 8px;
  border-radius: var(--pill); background: var(--aktiv-bg); color: var(--aktiv-ink);
  font-size: 13px; font-weight: 800; text-align: center;
}
.nav-link[aria-current="page"] .zaehler { background: var(--night-sky); color: var(--support); }
.sidebar-fuss { margin-top: auto; display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--border); padding-top: 12px; }
.sidebar-person { padding: 4px 16px 8px; font-size: 14px; color: var(--ink-muted); }
.sidebar-person strong { display: block; color: var(--ink); font-size: 15px; }
.nav-link-knopf { width: 100%; background: none; border: 0; font: inherit; cursor: pointer; text-align: left; }

.topbar { display: none; }
.main { width: 100%; max-width: 1280px; padding: 40px; }
.seite-schmal { max-width: 760px; }

@media (max-width: 1023px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: sticky; top: 0; z-index: 40;
    padding: 10px 16px; background: var(--nav-bg); border-bottom: 1px solid var(--border);
  }
  .topbar img { width: 40px; height: 40px; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 60; width: min(300px, 86vw);
    transform: translateX(-105%); transition: transform 0.2s ease;
    box-shadow: 0 0 0 100vmax transparent;
  }
  body.nav-offen .sidebar { transform: none; box-shadow: 0 0 0 100vmax rgba(10, 25, 40, 0.45); }
  .main { padding: 24px 16px 48px; }
}
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }

/* --- Seitenkopf und Typografie -------------------------------------------------- */
.seitenkopf { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.seitenkopf h1, .titel-display {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(34px, 4vw, 46px); line-height: 1.05; letter-spacing: -0.01em; margin: 6px 0 0;
}
.label { display: block; text-transform: uppercase; letter-spacing: 0.08em; font-size: 13px; font-weight: 700; color: var(--ink-muted); }
.einleitung { font-size: 18px; max-width: 70ch; color: var(--ink-muted); }
.gedaempft { color: var(--ink-muted); }
.klein { font-size: 14px; }
.abschnitt { margin-top: 40px; }
.abschnitt-kopf { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.abschnitt-kopf h2 { margin: 0; }
.zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.zeile-ende { justify-content: flex-end; }
.stapel > * + * { margin-top: 16px; }

/* --- Karten, Kennzahlen, Raster -------------------------------------------------- */
.karte { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.karte h2:first-child, .karte h3:first-child { margin-top: 0; }
.raster-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 24px; }
.raster-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.kennzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 16px; }
.kpi { display: flex; flex-direction: column; gap: 6px; color: inherit; text-decoration: none; position: relative; }
a.kpi:hover { border-color: var(--border-control); }
.kpi-wert { font-size: 32px; font-weight: 800; line-height: 1.15; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.kpi-unter { color: var(--ink-muted); font-size: 15px; }
.kpi .icon-pfeil { position: absolute; right: 18px; top: 22px; color: var(--ink-muted); }
a.kpi .label { padding-right: 28px; }
.vergleich { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; }
.vergleich-gut { color: var(--ok-ink); }
.vergleich-schlecht { color: var(--warn-ink); }
.vergleich-neutral { color: var(--ink-muted); }
:root[data-theme="dark"] .vergleich-gut, :root[data-theme="dark"] .vergleich-schlecht { color: var(--support); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .vergleich-gut, :root:not([data-theme="light"]) .vergleich-schlecht { color: var(--support); }
}

/* Aufgabenliste „Heute wichtig“ */
.aufgaben { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.aufgabe {
  display: flex; align-items: center; gap: 14px;
  min-height: 56px; padding: 12px 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  color: inherit; text-decoration: none; font-weight: 700;
}
.aufgabe:hover { border-color: var(--border-control); }
.aufgabe .symbol { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; flex: none; }
.aufgabe-warn .symbol { background: var(--warn-bg); color: var(--warn-ink); }
.aufgabe-info .symbol { background: var(--info-bg); color: var(--info-ink); }
.aufgabe .icon-pfeil { margin-left: auto; color: var(--ink-muted); }
.alles-erledigt { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: var(--radius); background: var(--ok-bg); color: var(--ok-ink); font-weight: 700; }

/* Module */
.modul { display: flex; flex-direction: column; gap: 10px; color: inherit; text-decoration: none; min-height: 190px; }
a.modul:hover { border-color: var(--border-control); }
.modul-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.modul-symbol { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--clear-sky-50); color: var(--night-sky); }
.modul h3 { margin: 4px 0 0; font-size: 18px; }
.modul p { color: var(--ink-muted); font-size: 15px; margin: 0; }
.modul-geplant { background: transparent; border-style: dashed; }
.modul-geplant .modul-symbol { background: var(--serenity-25); color: var(--peace); }

/* --- Status-Chips ----------------------------------------------------------------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 11px; border-radius: var(--pill);
  font-size: 14px; font-weight: 700; line-height: 1.5; white-space: nowrap;
}
.chip .icon { width: 16px; height: 16px; stroke-width: 2.2; }
.chip-ok { background: var(--ok-bg); color: var(--ok-ink); }
.chip-warn { background: var(--warn-bg); color: var(--warn-ink); }
.chip-info { background: var(--info-bg); color: var(--info-ink); }
.chip-neutral { background: var(--neutral-bg); color: var(--neutral-ink); }

/* --- Schaltflächen ------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 24px;
  border-radius: var(--pill); border: 2px solid transparent;
  font: 800 16px/1.2 var(--font); text-decoration: none; cursor: pointer;
}
.btn-primaer { background: var(--accent); color: var(--on-accent); }
.btn-primaer:hover { background: var(--accent-hover); }
.btn-sekundaer { background: transparent; color: var(--ink); border-color: var(--border-control); }
.btn-sekundaer:hover { background: var(--surface-2); }
.btn-gefahr { background: var(--brick); color: var(--support); }
.btn-text { background: none; border: 0; padding: 8px 4px; min-height: 36px; color: var(--ink); text-decoration: underline; font-weight: 700; }
.btn-klein { min-height: 38px; padding: 6px 16px; font-size: 15px; }
.btn-breit { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }

/* --- Formulare ------------------------------------------------------------------------- */
.formular { max-width: 640px; }
.formular-breit { max-width: none; }
.feld { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.feld > label, .feld-titel, .formular p > label { font-weight: 700; }
.feld-pflicht::after { content: " *"; color: var(--ink-muted); }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="number"],
input[type="search"], input[type="tel"], input[type="url"], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 14px;
  border: 1px solid var(--border-control); border-radius: 10px;
  background: var(--surface); color: var(--ink);
  font: 500 16px/1.4 var(--font);
}
textarea { min-height: 96px; resize: vertical; }
input[type="file"] { font: inherit; color: var(--ink); max-width: 100%; }
input[type="radio"], input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--night-sky); margin: 2px 0 0; flex: none; }
:root[data-theme="dark"] input[type="radio"], :root[data-theme="dark"] input[type="checkbox"] { accent-color: var(--bright-future); }
.hilfe, .helptext { color: var(--ink-muted); font-size: 14px; }
.auswahl > div, .feld > div > div { display: block; }
.feld label:has(> input[type="radio"]), .feld label:has(> input[type="checkbox"]) {
  display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; font-weight: 500;
}
.feld-haken { flex-direction: row; align-items: flex-start; gap: 10px; }
.feld-haken label { font-weight: 700; }
.fehler, .errorlist {
  list-style: none; margin: 0; padding: 8px 12px; border-radius: 8px;
  background: var(--warn-bg); color: var(--warn-ink); font-weight: 700; font-size: 15px;
}
.feld-fehler input, .feld-fehler select { border-color: var(--brick); border-width: 2px; }
.ablage {
  display: grid; place-items: center; gap: 8px; text-align: center;
  padding: 28px 16px; border: 2px dashed var(--border-control); border-radius: var(--radius);
  background: var(--surface-2); cursor: pointer;
}
.ablage.ueber { border-color: var(--focus); background: var(--clear-sky-50); }
.ablage:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
:root[data-theme="dark"] .ablage.ueber { background: var(--surface); }
.ablage-datei { font-weight: 800; }
fieldset { border: 0; padding: 0; margin: 0 0 20px; }
legend { font-weight: 700; margin-bottom: 8px; }

/* --- Meldungen ------------------------------------------------------------------------- */
.meldung { display: flex; align-items: flex-start; gap: 12px; padding: 14px 18px; border-radius: var(--radius); margin-bottom: 16px; font-weight: 600; }
.meldung .icon { margin-top: 2px; }
.meldung-success { background: var(--ok-bg); color: var(--ok-ink); }
.meldung-error, .meldung-warning { background: var(--warn-bg); color: var(--warn-ink); }
.meldung-info { background: var(--info-bg); color: var(--info-ink); }
.meldung a { color: inherit; font-weight: 800; }

/* --- Tabellen --------------------------------------------------------------------------- */
.tabelle-rahmen { position: relative; overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.tabelle { width: 100%; border-collapse: collapse; font-size: 15px; }
.tabelle th {
  text-align: left; padding: 12px 16px; white-space: nowrap;
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-muted);
  border-bottom: 1px solid var(--border);
}
.tabelle td { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.tabelle tbody tr:last-child td { border-bottom: 0; }
.tabelle tbody tr:hover { background: var(--surface-2); }
.tabelle .zahl, .zahl { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabelle a { font-weight: 700; }
.tabelle td:first-child a { white-space: nowrap; }
.tabelle-summe td { font-weight: 800; border-top: 2px solid var(--border-control); }
.unterzeile { display: block; font-size: 14px; color: var(--ink-muted); }

/* --- Filter ------------------------------------------------------------------------------ */
.filterleiste { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.filter-pill {
  display: inline-flex; align-items: center; min-height: 40px; padding: 8px 16px;
  border-radius: var(--pill); border: 1px solid var(--border-control);
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px;
}
.filter-pill:hover { background: var(--surface-2); }
.filter-pill[aria-current="true"] { background: var(--aktiv-bg); color: var(--aktiv-ink); border-color: var(--aktiv-bg); font-weight: 800; }
.suchleiste { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 20px; }
.suchleiste .feld { margin: 0; flex: 1 1 220px; }

/* --- Balken (Altersstruktur) -------------------------------------------------------------- */
.balkenliste { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.balken-kopf { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; margin-bottom: 4px; }
.balken-kopf strong { font-variant-numeric: tabular-nums; }
.balken { display: block; width: 100%; height: 14px; }
.balken .spur { fill: var(--balken-spur); }
.balken .wert-1 { fill: var(--balken-1); }
.balken .wert-31 { fill: var(--balken-2); }
.balken .wert-61 { fill: var(--balken-3); }
.balken .wert-91 { fill: var(--balken-4); }

/* --- Beschreibungslisten ------------------------------------------------------------------ */
.daten { display: grid; grid-template-columns: minmax(140px, max-content) 1fr; gap: 8px 20px; margin: 0; }
.daten dt { color: var(--ink-muted); }
.daten dd { margin: 0; font-weight: 600; }

/* --- Abgleich --------------------------------------------------------------------------- */
.zahlung { display: grid; gap: 14px; }
.zahlung-kopf { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; }
.zahlung-betrag { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.zweck { padding: 10px 14px; border-radius: 10px; background: var(--surface-2); font-size: 15px; overflow-wrap: anywhere; }
.vorschlag { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; }
.vorschlag-text { flex: 1 1 280px; }
.manuell { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.manuell input { flex: 1 1 180px; width: auto; }
details > summary { cursor: pointer; font-weight: 700; min-height: 32px; }

/* --- Anmeldung --------------------------------------------------------------------------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 40px 16px; }
.auth-karte { width: 100%; max-width: 460px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 40px 32px 32px; }
.auth-logo { display: block; margin-bottom: 28px; }
.auth-logo img { width: 170px; height: auto; }
.auth-karte h1 { font-family: var(--font-display); font-weight: 400; font-size: 38px; line-height: 1.1; margin-bottom: 8px; }
.auth-karte form { margin-top: 20px; }
.auth-karte .btn { width: 100%; margin-top: 4px; }
.auth-fuss { margin-top: 20px; text-align: center; font-weight: 700; }
.auth-hinweis { margin-top: 28px; text-align: center; font-size: 13px; color: var(--ink-muted); max-width: 460px; }
@media (max-width: 480px) { .auth-karte { padding: 32px 20px 24px; } }

/* --- Hinweis vor automatischer Abmeldung ------------------------------------------------------ */
.abmelde-hinweis {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 80;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
  width: min(640px, calc(100vw - 32px)); padding: 16px 20px;
  background: var(--night-sky); color: var(--support); border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(10, 25, 40, 0.35); font-weight: 700;
}

.fehlerseite { max-width: 560px; margin: 10vh auto; text-align: center; }
.fehlerseite .titel-display { margin-bottom: 16px; }
.passwort { font: 800 22px/1.3 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: 0.04em; padding: 14px 18px; border-radius: 10px; background: var(--surface-2); overflow-wrap: anywhere; }

/* --- Orientierung: Brotkrumen, „So funktioniert diese Seite“, Ort in der Handy-Kopfzeile ------------ */
.ortszeile { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; margin: -12px 0 18px; }
.brotkrumen ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; font-size: 15px; font-weight: 600; }
.brotkrumen li { display: flex; align-items: center; }
.brotkrumen li + li::before { content: "›"; margin: 0 10px; color: var(--ink-muted); font-weight: 700; }
.brotkrumen a { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; color: var(--ink); text-decoration-color: var(--border-control); }
.brotkrumen a:hover { text-decoration-color: currentColor; }
.brotkrumen-zurueck { display: none; }
.seitenhilfe { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; font-size: 15px; font-weight: 700; color: var(--ink); }
.topbar-ort { flex: 1; min-width: 0; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) {
  /* Auf dem Handy nur der Schritt zurück: „‹ Team“ */
  .brotkrumen li:not(:last-child) { display: none; }
  .brotkrumen li + li::before { content: none; }
  .brotkrumen-zurueck { display: block; }
  .brotkrumen a, .seitenhilfe { min-height: 44px; }
}

/* --- Rundgang ------------------------------------------------------------------------------------ */
.rundgang {
  position: fixed; right: 24px; bottom: 24px; z-index: 70;
  width: min(420px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow-y: auto;
  padding: 18px 22px 16px; border-radius: var(--radius);
  background: var(--surface); color: var(--ink); border: 2px solid var(--accent);
  box-shadow: 0 10px 34px rgba(10, 25, 40, 0.28);
}
.rundgang h2 { font-size: 19px; margin: 12px 0 6px; }
.rundgang p { font-size: 15px; }
.rundgang-kopf .label { display: flex; align-items: center; gap: 6px; }
.rundgang-fortschritt { display: block; width: 100%; height: 6px; margin-top: 8px; }
.rundgang-fortschritt .spur { fill: var(--balken-spur); }
.rundgang-fortschritt .wert { fill: var(--accent); }
.rundgang-beenden { margin-left: auto; }
.rundgang-kapitel { margin: 6px 0 0; font-size: 13px; color: var(--ink-muted); }
.rundgang-ziel { outline: 3px solid var(--accent); outline-offset: 4px; box-shadow: 0 0 0 9px rgba(250, 172, 110, 0.28); border-radius: var(--radius); scroll-margin: 96px; }
.sidebar.rundgang-ziel, .sidebar .rundgang-ziel { outline-offset: -3px; box-shadow: none; }
body.mit-rundgang .main { padding-bottom: 320px; }
@media (max-width: 640px) {
  .rundgang { left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 52vh; padding: 14px 16px; }
  .rundgang h2 { margin-top: 10px; }
  .rundgang-kapitel { display: none; }
}
.willkommen { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 32px; border: 2px solid var(--accent); }
.willkommen h2 { margin-bottom: 6px; }
.willkommen .modul-symbol, .rundgang-karte .modul-symbol { flex: none; }
@media (max-width: 480px) { .willkommen { flex-direction: column; } }
.rundgang-karte h3 { margin-bottom: 6px; }
.rundgang-karte details { border-top: 1px solid var(--border); padding-top: 12px; }
.schrittliste { margin: 12px 0 0; padding-left: 22px; display: grid; gap: 10px; font-size: 15px; }

/* --- Passwort mit „Anzeigen“-Knopf ------------------------------------------------------------------ */
.passwort-feld { position: relative; }
.passwort-feld input { padding-right: 132px; }
.passwort-auge {
  position: absolute; right: 3px; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 6px 14px; border: 0; border-radius: var(--pill);
  background: var(--surface-2); color: var(--ink); font: 700 15px/1 var(--font); cursor: pointer;
}
.passwort-auge:hover { background: var(--clear-sky-50); color: var(--night-sky); }

/* --- Einstellungen: Anleitung je Schnittstelle --------------------------------------------------------- */
.anleitung h3 { font-size: 16px; margin-bottom: 6px; }
.anleitung ul { margin: 0; padding-left: 20px; }
.anleitung-schritte { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.anleitung-schritte > li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; align-items: start; }
.anleitung-nr { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 800; }
.link-extern { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; overflow-wrap: anywhere; }
.link-extern .icon { width: 16px; height: 16px; }
.anleitung-schritte .link-extern { display: flex; width: fit-content; min-height: 36px; margin-top: 2px; }
.anleitung-felder { display: block; margin-top: 4px; font-size: 14px; font-weight: 700; color: var(--ink-muted); }
.anleitung-hinweise { margin: 0; }
.anleitung-hinweise ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 6px; font-weight: 500; }
.linkliste { list-style: none; padding-left: 0 !important; display: grid; gap: 2px; }
.linkliste .link-extern { min-height: 36px; }

/* --- Team: Zugang ----------------------------------------------------------------------------------- */
.karte h3 .icon { vertical-align: -4px; margin-right: 4px; }
.trenner { border-top: 1px solid var(--border); padding-top: 16px; }
/* Sprungziele (#zugang, #freischalten) nicht unter der Handy-Kopfzeile verstecken */
.main [id] { scroll-margin-top: 88px; }

@media print {
  .sidebar, .topbar, .no-print, .abmelde-hinweis, .ortszeile, .rundgang { display: none !important; }
  .layout { display: block; }
  body { background: #fff; }
}

/* Einstellungen: Vorschau einer E-Mail */
.mail-vorschau {
  margin: 0; padding: 14px 16px; white-space: pre-wrap; overflow-wrap: anywhere;
  font: inherit; font-size: 15px; line-height: 1.55;
  background: var(--surface-2); border: 1px solid var(--border);
}

/* Ladehinweis beim Hochladen und Übernehmen */
.lade-hinweis {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px;
  background: color-mix(in srgb, var(--bg, #E1F2FF) 80%, transparent);
}
.lade-karte {
  max-width: 420px; padding: 28px 28px 22px; text-align: center;
  background: var(--surface); border: 1px solid var(--border); box-shadow: 0 8px 30px rgb(0 0 0 / 0.12);
}
.lade-karte p { margin: 12px 0 0; font-weight: 600; }
.lade-karte .hilfe { font-weight: 400; }
.lade-kreis {
  display: inline-block; width: 40px; height: 40px; border-radius: 50%;
  border: 4px solid var(--border); border-top-color: var(--ink, #203C56);
  animation: lade-dreh 0.9s linear infinite;
}
@keyframes lade-dreh { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .lade-kreis { animation-duration: 3s; } }
