/* CRM — Oberfläche
 *
 * Stilsystem seit 14.09.2026: feste Seitenleiste, weiße Arbeitsfläche, Farbe
 * ausschließlich für Zustand (überfällig, heute, gewonnen) und Strang.
 * Leitgedanke bleibt: nur einfärben, was eine Entscheidung verlangt.
 *
 * Kein Inline-CSS, kein Skript — die CSP in lib/web.php erlaubt beides nicht.
 * Wer hier ein style="…" einfügt, bekommt ein ungestyltes Element.
 *
 * Schrift: Inter, wenn /assets/InterVariable.woff2 vorhanden ist (selbst
 * ausgeliefert — font-src 'self'); sonst still die Systemschrift.
 */

@font-face {
  font-family: "Inter";
  src: url("/assets/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --tinte: #171b22;
  --ton: #5b6572;
  --leise: #8a94a1;
  --linie: #e3e7ec;
  --linie-stark: #cfd5dd;
  --grund: #f3f5f8;
  --flaeche: #ffffff;
  --flaeche-hover: #f7f9fb;
  --akzent: #1e6fbf;
  --akzent-tinte: #ffffff;
  --akzent-flaeche: #e9f1fb;
  --rot: #c2402f;      --rot-flaeche: #fbeeec;
  --amber: #b9770e;    --amber-flaeche: #fdf3e3;
  --gruen: #1f8a5b;    --gruen-flaeche: #e7f5ee;
  --schiefer: #6b7280; --schiefer-flaeche: #eef0f3;
  --pl: #b9467c;
  --fl: #0f7a8a;
  --schatten: 0 1px 2px rgba(23, 27, 34, .06), 0 0 0 1px rgba(23, 27, 34, .04);
  --radius: 8px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --tinte: #e8ecf1; --ton: #a2abb7; --leise: #6f7883;
    --linie: #262c35; --linie-stark: #343c47;
    --grund: #14171c; --flaeche: #1b1f26; --flaeche-hover: #20252d;
    --akzent: #5b9be6; --akzent-tinte: #0e1a2b; --akzent-flaeche: #1a2a3f;
    --rot: #f08a7c; --rot-flaeche: #3a1f1b;
    --amber: #e3a94d; --amber-flaeche: #3a2c14;
    --gruen: #58c48e; --gruen-flaeche: #16301f;
    --schiefer: #9aa3af; --schiefer-flaeche: #262c35;
    --pl: #e07fb0; --fl: #4fb6c6;
    --schatten: 0 1px 2px rgba(0, 0, 0, .4), 0 0 0 1px rgba(255, 255, 255, .04);
  }
}

* { box-sizing: border-box; }

html { background: var(--grund); }
body {
  margin: 0; background: var(--grund); color: var(--tinte);
  font: 14px/1.5 Inter, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-variant-numeric: tabular-nums;
}
a { color: var(--akzent); }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .nav a, .knopf, .zeile, tr td { transition: background-color .12s ease; }
}

/* ---- App-Rahmen: Seitenleiste + Arbeitsfläche ------------------------- */
.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }

.seite {
  background: var(--grund); border-right: 1px solid var(--linie);
  padding: 20px 12px; display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100vh;
}
.marke { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; font-weight: 600; font-size: 15px; color: var(--tinte); text-decoration: none; }
.marke .zeichen {
  width: 26px; height: 26px; border-radius: 7px; background: var(--akzent); color: var(--akzent-tinte);
  display: grid; place-items: center; font-size: 12px; font-weight: 700; letter-spacing: .02em;
}
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 6px;
  color: var(--ton); font-weight: 500; text-decoration: none;
}
.nav a:hover { background: var(--flaeche-hover); color: var(--tinte); }
.nav a.an { background: var(--flaeche); color: var(--tinte); box-shadow: var(--schatten); }
.nav svg { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.nav .zahl { margin-left: auto; font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: 999px; }
.nav .zahl.rot { background: var(--rot-flaeche); color: var(--rot); }
.nav .zahl.amber { background: var(--amber-flaeche); color: var(--amber); }
.seite .aktion-haupt {
  margin: 14px 0 4px; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 12px; border-radius: 7px; border: 0; cursor: pointer; text-decoration: none;
  background: var(--akzent); color: var(--akzent-tinte); font-weight: 600;
}
.seite .aktion-haupt svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; }
.seite .unten { margin-top: auto; padding: 10px; display: flex; align-items: center; gap: 10px; color: var(--ton); font-size: 13px; }
.seite .unten form { margin-left: auto; }
.seite .unten button {
  background: none; border: 0; padding: 0; cursor: pointer; color: var(--leise); font: inherit; font-size: 13px;
}
.seite .unten button:hover { color: var(--tinte); }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-size: 11px; font-weight: 600; background: var(--akzent-flaeche); color: var(--akzent); flex: none;
}
.avatar.klein { width: 26px; height: 26px; font-size: 10px; }

main.arbeitsflaeche { background: var(--flaeche); padding: 36px 44px 80px; min-width: 0; }
main.arbeitsflaeche > * { max-width: 1040px; }

.fuss { padding: 0 44px 40px; font-size: 12px; color: var(--leise); background: var(--flaeche); grid-column: 2; }

/* Schmale Fenster: Seitenleiste wird zur Kopfzeile. */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .seite { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--linie); flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 12px; }
  .marke { padding: 4px 8px; }
  .nav { display: flex; gap: 2px; flex-wrap: wrap; }
  .seite .aktion-haupt { margin: 0 0 0 auto; }
  .seite .unten { margin: 0; flex-basis: 100%; padding: 6px 8px 0; }
  main.arbeitsflaeche { padding: 22px 16px 60px; }
  .fuss { padding: 0 16px 30px; grid-column: 1; }
}

/* ---- Anmeldung -------------------------------------------------------- */
.login {
  max-width: 360px; margin: 80px auto; padding: 28px;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; box-shadow: var(--schatten);
}
.login h1 { margin: 0 0 6px; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.login p { margin: 0 0 18px; color: var(--ton); font-size: 13px; }
.login label { display: block; font-size: 13px; color: var(--ton); margin-bottom: 5px; }
.login input {
  width: 100%; padding: 9px 11px; margin-bottom: 14px; font: inherit;
  border: 1px solid var(--linie-stark); border-radius: 6px; background: var(--flaeche); color: var(--tinte);
}
.login input:focus { outline: 2px solid var(--akzent); outline-offset: 0; border-color: transparent; }
.login button {
  width: 100%; padding: 10px; border: 0; border-radius: 7px;
  background: var(--akzent); color: var(--akzent-tinte); font-size: 15px; font-weight: 600; cursor: pointer;
}
.login button:hover { filter: brightness(1.06); }
.login button[disabled] { opacity: .5; cursor: default; }

/* ---- Seitenkopf ------------------------------------------------------- */
.kopfzeile { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.kopfzeile h1 { margin: 0; }
h1 { margin: 0 0 20px; font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
h1 .leise { font-weight: 400; color: var(--ton); font-size: 15px; margin-left: 8px; letter-spacing: 0; }
h1 .chip, h1 .mal { vertical-align: middle; margin-left: 8px; letter-spacing: 0; }
.lage { margin: 6px 0 0; color: var(--ton); font-size: 15px; }
.lage b { color: var(--tinte); font-weight: 600; }
.kopfzeile .knoepfe, .kopfzeile .rechts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; }

h2 { margin: 30px 0 10px; font-size: 15px; font-weight: 600; color: var(--tinte); }
h2:first-child { margin-top: 0; }
.spalten > div > h2:first-child { margin-top: 0; }
.abschnitt-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 30px 0 10px; }
.abschnitt-kopf h2 { margin: 0; }
.abschnitt-kopf a, .abschnitt-kopf span { font-size: 13px; color: var(--ton); text-decoration: none; }
.abschnitt-kopf a:hover { color: var(--akzent); }
.abschnitt-kopf:first-child { margin-top: 0; }

.zurueck { display: inline-flex; align-items: center; gap: 6px; color: var(--ton); font-size: 13px; margin-bottom: 14px; text-decoration: none; }
.zurueck:hover { color: var(--tinte); }

/* ---- Karten und Spalten ------------------------------------------------ */
.karte { border: 1px solid var(--linie); border-radius: var(--radius); background: var(--flaeche); overflow: hidden; }
.karte-innen { padding: 18px 20px; }
.karte-innen.klein { font-size: 14px; }
.karte-innen + .karte-innen, .karte table + .karte-innen, .karte .verlauf + .karte-innen { border-top: 1px solid var(--linie); }
.karte .karte-innen + table, .karte .karte-innen + .verlauf, .karte .karte-innen + .leer { border-top: 1px solid var(--linie); }
.spalten { display: grid; gap: 28px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .spalten { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); } }

/* ---- Kacheln: nur wo die Zahl der Punkt ist ---------------------------- */
.kennzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 34px; }
.kennzahl, .kachel {
  padding: 14px 16px; border: 1px solid var(--linie); border-radius: var(--radius); background: var(--flaeche);
  text-decoration: none; color: inherit; display: block;
}
a.kennzahl:hover { border-color: var(--linie-stark); }
.kennzahl .k, .kachel .k { font-size: 13px; color: var(--ton); }
.kennzahl .v, .kachel .v { font-size: 24px; font-weight: 600; margin-top: 2px; letter-spacing: -.01em; display: flex; align-items: baseline; gap: 8px; }
.kennzahl .v small, .kachel .v small { font-size: 13px; font-weight: 500; color: var(--ton); }
.kennzahl.rot, .kachel.rot { border-color: color-mix(in srgb, var(--rot) 45%, var(--linie)); background: var(--rot-flaeche); }
.kennzahl.rot .v, .kachel.rot .v { color: var(--rot); }
.kennzahl.warn, .kachel.warn, .kachel.amber { border-color: color-mix(in srgb, var(--amber) 45%, var(--linie)); background: var(--amber-flaeche); }
.kennzahl.warn .v, .kachel.warn .v, .kachel.amber .v { color: var(--amber); }

/* ---- Zeilenlisten ----------------------------------------------------- */
.liste { border: 1px solid var(--linie); border-radius: var(--radius); overflow: hidden; background: var(--flaeche); }
.zeile-liste {
  display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 16px; align-items: center;
  padding: 12px 16px; border-bottom: 1px solid var(--linie);
}
.zeile-liste:last-child { border-bottom: 0; }
.zeile-liste:hover { background: var(--flaeche-hover); }
.zeile-liste .titel { font-weight: 500; }
.zeile-liste .titel a { color: var(--tinte); text-decoration: none; }
.zeile-liste .titel a:hover { color: var(--akzent); }
.zeile-liste .neben { display: block; font-size: 13px; color: var(--ton); margin-top: 1px; }
.zeile-liste .aktionen { display: flex; gap: 6px; }
.zeile-liste.vorgang { grid-template-columns: minmax(0, 1fr) 150px 150px auto; }
.zeile-liste.eingang { grid-template-columns: 110px minmax(0, 1fr) auto; }
.gruppe-kopf { padding: 8px 16px; font-size: 13px; font-weight: 600; color: var(--ton); background: var(--grund); border-bottom: 1px solid var(--linie); }
@media (max-width: 700px) { .zeile-liste, .zeile-liste.vorgang, .zeile-liste.eingang { grid-template-columns: 1fr; gap: 6px; } }

/* ---- Chips und Marken ------------------------------------------------- */
.chip, .mal {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1.5; border: 0;
}
.chip.rot, .mal.rot { background: var(--rot-flaeche); color: var(--rot); }
.chip.amber, .mal.gelb { background: var(--amber-flaeche); color: var(--amber); }
.chip.gruen, .mal.gruen { background: var(--gruen-flaeche); color: var(--gruen); }
.chip.schiefer, .mal.grau { background: var(--schiefer-flaeche); color: var(--schiefer); }
.chip.blau, .mal.blau { background: var(--akzent-flaeche); color: var(--akzent); }
.chip.leer { background: transparent; color: var(--ton); font-weight: 500; padding-left: 0; }
.strang { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ton); white-space: nowrap; }
.strang::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--schiefer); flex: none; }
.strang.pl::before { background: var(--pl); }
.strang.fl::before { background: var(--fl); }

/* ---- Stufenpfad ------------------------------------------------------- */
.stufen { display: flex; gap: 4px; margin: 0 0 26px; flex-wrap: wrap; }
.stufen span {
  padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 500;
  background: var(--grund); color: var(--leise);
}
.stufen span.war { color: var(--ton); }
.stufen span.jetzt { background: var(--tinte); color: var(--flaeche); font-weight: 600; }
.stufen span.jetzt.gruen { background: var(--gruen); color: #fff; }
.stufen span.jetzt.rot { background: var(--rot); color: #fff; }
.stufen span.jetzt.schiefer { background: var(--schiefer); color: #fff; }

/* ---- Fakten (Seitenspalte) -------------------------------------------- */
.fakten { border: 1px solid var(--linie); border-radius: var(--radius); padding: 4px 16px; background: var(--flaeche); }
.fakten dl { margin: 0; display: grid; grid-template-columns: 112px minmax(0, 1fr); }
.fakten dt, .fakten dd { margin: 0; padding: 9px 0; border-bottom: 1px solid var(--linie); font-size: 13px; }
.fakten dt { color: var(--ton); }
.fakten dd { font-weight: 500; overflow-wrap: anywhere; }
.fakten dd .neben { display: block; font-weight: 400; color: var(--ton); }
.fakten dl > :nth-last-child(-n+2) { border-bottom: 0; }

/* ---- Verlauf (Zeitstrahl) --------------------------------------------- */
.verlauf { list-style: none; margin: 0; padding: 18px 20px 6px 20px; position: relative; }
.verlauf::before { content: ""; position: absolute; left: 27px; top: 26px; bottom: 26px; width: 2px; background: var(--linie); }
.verlauf li { position: relative; padding: 0 0 20px 28px; }
.verlauf li::before {
  content: ""; position: absolute; left: 2px; top: 5px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--flaeche); border: 2px solid var(--linie-stark);
}
.verlauf li.ein::before { border-color: var(--akzent); background: var(--akzent-flaeche); }
.verlauf .meta { font-size: 13px; color: var(--ton); margin-bottom: 2px; }
.verlauf .meta a { color: inherit; }
.verlauf .inhalt { white-space: pre-wrap; }
.verlauf .inhalt.klein { font-size: 14px; }
.verlauf.einzeln::before { display: none; }
.verlauf.einzeln li { padding-left: 0; }
.verlauf.einzeln li::before { display: none; }

/* ---- Tabellen --------------------------------------------------------- */
.tabelle-huelle { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 13px; font-weight: 600; color: var(--ton); padding: 10px 14px; border-bottom: 1px solid var(--linie); background: var(--grund); white-space: nowrap; }
td { padding: 11px 14px; border-bottom: 1px solid var(--linie); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--flaeche-hover); }
td.zahl, th.zahl { text-align: right; white-space: nowrap; }
td.aktion { text-align: right; white-space: nowrap; }
td a { color: var(--tinte); text-decoration: none; font-weight: 500; }
td a:hover { color: var(--akzent); }
.gruppe td { background: var(--grund); font-size: 13px; font-weight: 600; color: var(--ton); padding: 8px 14px; }
.neben { display: block; font-size: 13px; color: var(--ton); margin-top: 1px; }
.person-zelle { display: flex; align-items: center; gap: 10px; }

.wert-still   { color: var(--ton); }
.wert-schlecht{ color: var(--rot); font-weight: 600; }
.wert-warn    { color: var(--amber); font-weight: 600; }
.wert-fehlt   { color: var(--leise); }
.wert-gut     { color: var(--gruen); }
.erledigt { opacity: .55; }
.erledigt td:first-child { text-decoration: line-through; }

/* ---- Hinweise und Leerzustände ---------------------------------------- */
.hinweis {
  margin: 0 0 18px; padding: 11px 14px; border-radius: 7px; font-size: 13px;
  border: 1px solid color-mix(in srgb, var(--gruen) 40%, var(--linie)); background: var(--gruen-flaeche); color: var(--tinte);
}
.hinweis.fehler { border-color: color-mix(in srgb, var(--rot) 45%, var(--linie)); background: var(--rot-flaeche); }
.hinweis.warn   { border-color: color-mix(in srgb, var(--amber) 45%, var(--linie)); background: var(--amber-flaeche); }
.hinweis a { color: var(--tinte); font-weight: 500; }
.fehler {
  padding: 10px 12px; margin-bottom: 14px; border-radius: 7px;
  background: var(--rot-flaeche); color: var(--rot); border: 1px solid color-mix(in srgb, var(--rot) 45%, var(--linie)); font-size: 13px;
}
.leer { padding: 32px 20px; text-align: center; color: var(--ton); }
.leer a { color: var(--akzent); }

/* ---- Formulare -------------------------------------------------------- */
.formular label { display: block; font-size: 13px; color: var(--ton); margin-bottom: 5px; }
.formular input[type="text"], .formular input[type="email"], .formular input[type="tel"],
.formular input[type="url"], .formular input[type="date"], .formular input[type="datetime-local"],
.formular input[type="number"], .formular input[type="password"], .formular input[type="search"],
.formular select, .formular textarea {
  width: 100%; padding: 8px 10px; margin-bottom: 14px; font: inherit; font-size: 14px;
  border: 1px solid var(--linie-stark); border-radius: 6px; background: var(--flaeche); color: var(--tinte);
}
.formular textarea { min-height: 96px; resize: vertical; }
.formular input:focus, .formular select:focus, .formular textarea:focus { outline: 2px solid var(--akzent); outline-offset: 0; border-color: transparent; }
.formular .zeile { display: flex; gap: 14px; flex-wrap: wrap; }
.formular .zeile > div { flex: 1 1 200px; min-width: 0; }
.formular .schmal { flex: 0 1 150px; }
.formular .kontroll { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 14px; }
.formular .kontroll input { margin-top: 4px; }
.formular .kontroll label { margin: 0; color: var(--tinte); font-size: 14px; }
.formular .hilfe, .hilfe { font-size: 12px; color: var(--leise); margin: -8px 0 14px; }
.formular h2 { margin: 6px 0 12px; }
.formular h2:not(:first-child) { margin-top: 10px; }

.knopf, button.knopf {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 6px;
  border: 1px solid transparent; background: var(--akzent); color: var(--akzent-tinte);
  font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.knopf:hover { filter: brightness(1.06); }
.knopf.zweit { background: var(--flaeche); color: var(--tinte); border-color: var(--linie-stark); }
.knopf.zweit:hover { background: var(--flaeche-hover); filter: none; }
.knopf.still { background: transparent; color: var(--ton); border-color: transparent; }
.knopf.still:hover { color: var(--tinte); background: var(--flaeche-hover); filter: none; }
.knopf.gefahr { background: var(--flaeche); color: var(--rot); border-color: color-mix(in srgb, var(--rot) 50%, var(--linie)); }
.knopf.gefahr:hover { background: var(--rot-flaeche); filter: none; }
.knopf.klein { padding: 4px 9px; font-size: 13px; }
.knoepfe { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
form.inline { display: inline; margin: 0; }

.suche { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.suche input[type="search"], .suche select {
  padding: 7px 10px; font: inherit; font-size: 14px; border: 1px solid var(--linie-stark); border-radius: 6px;
  background: var(--flaeche); color: var(--tinte);
}
.suche input[type="search"] { min-width: 240px; }
.suche .leise a { color: var(--ton); text-decoration: none; }
.suche .leise a.an { color: var(--tinte); font-weight: 600; }
.reiter { display: inline-flex; border: 1px solid var(--linie-stark); border-radius: 6px; overflow: hidden; }
.reiter a { padding: 6px 12px; color: var(--ton); text-decoration: none; font-size: 14px; border-right: 1px solid var(--linie-stark); }
.reiter a:last-child { border-right: 0; }
.reiter a:hover { background: var(--flaeche-hover); color: var(--tinte); }
.reiter a.an { background: var(--grund); color: var(--tinte); font-weight: 600; }

/* ---- Eingang zuordnen ------------------------------------------------- */
.nachricht { border: 1px solid var(--linie); border-radius: var(--radius); padding: 16px 18px; background: var(--grund); }
.nachricht .absender { font-weight: 600; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.nachricht .absender span { font-weight: 400; color: var(--ton); font-size: 13px; }
.nachricht .text { margin: 10px 0 0; white-space: pre-wrap; }
.nachricht .quelle { margin: 8px 0 0; font-size: 13px; color: var(--ton); }

/* ---- Hilfsklassen statt style-Attributen ------------------------------- */
.klein   { font-size: 13px; }
.leise   { color: var(--ton); }
.mono    { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.rechts  { text-align: right; }
.abstand { margin-top: 18px; }
.inhalt  { white-space: pre-wrap; }

/* ---- Seitenleiste: Strang-Umschalter, Suche, Gruppen (25.09.2026) ----- */
.umschalter { margin: 0 0 8px; position: relative; }
.umschalter summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 6px; border: 1px solid var(--linie-stark); background: var(--flaeche);
  font-weight: 600; font-size: 13px; color: var(--tinte);
}
.umschalter summary::-webkit-details-marker { display: none; }
.umschalter summary svg { width: 14px; height: 14px; margin-left: auto; stroke: var(--ton); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.umschalter[open] summary svg { transform: rotate(180deg); }
.umschalter form {
  margin-top: 4px; padding: 4px; border: 1px solid var(--linie); border-radius: 7px;
  background: var(--flaeche); box-shadow: var(--schatten); display: flex; flex-direction: column; gap: 2px;
}
.umschalter button {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 0; border-radius: 5px;
  background: transparent; color: var(--ton); font-size: 13px; text-align: left; cursor: pointer;
}
.umschalter button:hover { background: var(--flaeche-hover); color: var(--tinte); }
.umschalter button.an { color: var(--tinte); font-weight: 600; background: var(--grund); }
.punkt { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--schiefer); }
.punkt.pl { background: var(--pl); }
.punkt.fl { background: var(--fl); }
.punkt.beide { background: linear-gradient(90deg, var(--pl) 50%, var(--fl) 50%); }

.suchfeld { position: relative; margin: 0 0 10px; }
.suchfeld svg { position: absolute; left: 9px; top: 50%; width: 14px; height: 14px; margin-top: -7px; stroke: var(--leise); fill: none; stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.suchfeld input {
  width: 100%; padding: 6px 10px 6px 30px; font: inherit; font-size: 13px; border-radius: 6px;
  border: 1px solid var(--linie); background: var(--flaeche); color: var(--tinte);
}
.suchfeld input:focus { outline: 2px solid var(--akzent); outline-offset: 0; border-color: transparent; }
.nav-gruppe { margin: 14px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--leise); }
.nav { display: flex; flex-direction: column; gap: 1px; }
.seite { overflow-y: auto; }

@media (max-width: 860px) {
  .umschalter, .suchfeld { margin: 0; flex: 1 1 200px; }
  .umschalter form { position: absolute; z-index: 5; left: 0; right: 0; }
  .nav { flex-direction: row; }
  .nav-gruppe { display: none; }
}

/* ---- Pipeline-Board ---------------------------------------------------- */
main.arbeitsflaeche > .board { max-width: none; }
.board {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 12px;
  overflow-x: auto; padding-bottom: 10px; align-items: start;
}
.spalte-board { background: var(--grund); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 140px; }
.spalte-board.geparkt { background: transparent; border: 1px dashed var(--linie-stark); }
.spalte-board h3 { margin: 2px 4px 2px; font-size: 13px; font-weight: 600; color: var(--tinte); display: flex; justify-content: space-between; align-items: baseline; }
.spalte-board h3 span { color: var(--leise); font-weight: 500; }
.leer-board { color: var(--leise); text-align: center; padding: 18px 0; font-size: 13px; }
.karte-board {
  display: block; padding: 10px 11px; border-radius: 7px; background: var(--flaeche);
  border: 1px solid var(--linie); text-decoration: none; color: var(--tinte); box-shadow: 0 1px 1px rgba(23, 27, 34, .03);
}
.karte-board:hover { border-color: var(--linie-stark); box-shadow: var(--schatten); }
.karte-board .titel { display: block; font-weight: 500; font-size: 13.5px; line-height: 1.35; }
.karte-board .neben { display: block; font-size: 12px; color: var(--ton); margin-top: 2px; }
.karte-board .fuss { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--leise); }
.karte-board .fuss .chip { font-size: 11px; padding: 1px 7px; }
.karte-board .fuss .chip.leer { padding-left: 0; }
.karte-board .fuss .strang { font-size: 12px; }
.karte-board .fuss .alter { margin-left: auto; }

/* ---- Pipeline-Leiste auf „Heute" --------------------------------------- */
.pipeline-leiste {
  display: flex; border: 1px solid var(--linie); border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: var(--tinte); background: var(--flaeche);
}
.pipeline-leiste span { flex: 1 1 0; min-width: 0; padding: 10px 12px; border-right: 1px solid var(--linie); font-size: 12px; color: var(--ton); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pipeline-leiste span:last-child { border-right: 0; }
.pipeline-leiste span b { display: block; font-size: 20px; font-weight: 600; color: var(--tinte); letter-spacing: -.01em; }
.pipeline-leiste span.ohne b { color: var(--leise); font-weight: 500; }
.pipeline-leiste span.geparkt { background: var(--grund); }
.pipeline-leiste:hover { border-color: var(--linie-stark); }
@media (max-width: 700px) { .pipeline-leiste { flex-wrap: wrap; } .pipeline-leiste span { flex: 1 1 33%; border-bottom: 1px solid var(--linie); } }

/* ---- Hinweis mit Liste, Trefferzeilen ---------------------------------- */
.hinweis.einrichtung ul { margin: 6px 0 0; padding-left: 18px; }
.hinweis.einrichtung li { margin: 2px 0; }
.zeile-liste.treffer { grid-template-columns: 110px minmax(0, 1fr); }
.zeile-liste.treffer .avatar { justify-self: start; }

/* ---- System: Einstellungen und Geheimnisse ----------------------------- */
.einstellungen { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 6px 14px; margin: 10px 0; }
.einstellungen dt { color: var(--ton); }
.einstellungen dd { margin: 0; overflow-wrap: anywhere; }
.geheim { display: inline-block; }
.geheim summary { cursor: pointer; color: var(--akzent); list-style: none; display: inline; }
.geheim summary::-webkit-details-marker { display: none; }
.geheim[open] summary { color: var(--ton); margin-right: 8px; }
.karte.schnittstelle + .karte.schnittstelle { margin-top: 12px; }
.karte h3 { margin: 0 0 8px; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.karte-innen p { margin: 6px 0; }
@media (max-width: 700px) { .einstellungen { grid-template-columns: 1fr; } .einstellungen dt { margin-top: 6px; } }

/* ---- Versand (25.09.2026) ----------------------------------------------- */
h1.umbruch { overflow-wrap: anywhere; }
.zeile-liste.zweck { grid-template-columns: 56px minmax(0, 1fr); }
.zeile-liste.nachricht-zeile, .zeile-liste.vorlage { grid-template-columns: 130px minmax(0, 1fr) auto; }
.formular textarea.gross { min-height: 280px; font-family: inherit; line-height: 1.55; }
.einstellungen.schmal { grid-template-columns: 120px minmax(0, 1fr); }
.abstand-unten { margin-bottom: 16px; }
.nachricht .text { font-size: 14px; }

/* ---- Öffentliche Seiten: Abmelden, Bestätigen ---------------------------- */
body.oeffentlich { background: var(--grund); padding: 48px 16px; }
.oeffentlich-karte {
  max-width: 520px; margin: 0 auto; background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: 10px; overflow: hidden; box-shadow: var(--schatten);
}
.oeffentlich-marke { padding: 16px 24px; color: #fff; font-weight: 600; font-size: 15px; background: #0F2A47; }
.oeffentlich-marke.marke-fl { background: #1E6FBF; }
.oeffentlich-inhalt { padding: 24px; }
.oeffentlich-inhalt h1 { font-size: 22px; margin: 0 0 12px; }
.oeffentlich-inhalt p { margin: 0 0 14px; }
.oeffentlich-inhalt form { margin: 18px 0 0; }
.oeffentlich-fuss { max-width: 520px; margin: 16px auto 0; font-size: 12px; color: var(--leise); text-align: center; line-height: 1.6; }
.oeffentlich-fuss a { color: var(--ton); }

/* ---- Newsletter, Automatiken ------------------------------------------- */
fieldset.ohne-rahmen { border: 0; padding: 0; margin: 0; min-width: 0; }
ul.kurz { margin: 4px 0 10px; padding-left: 18px; }
ul.kurz li { margin: 2px 0; }

/* ---- Sicherheit ---------------------------------------------------------- */
.karte.hervorgehoben { border-color: color-mix(in srgb, var(--akzent) 45%, var(--linie)); box-shadow: 0 0 0 3px var(--akzent-flaeche); margin-bottom: 26px; }
ol.schritte { margin: 8px 0 16px; padding-left: 20px; }
ol.schritte li { margin: 0 0 10px; }
.schluessel { display: inline-block; margin: 8px 0; padding: 10px 14px; font-size: 18px; letter-spacing: .08em; background: var(--grund); border: 1px solid var(--linie); border-radius: 6px; user-select: all; }
.versteckt { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
