/* ===== Website-Scanner – Optik wie das Lead-Cockpit („rapport“, seit 17.10.2026; Glow-up 29.10.2026) =====
   Ruhige Fläche (Creme-Verlauf, Glas-Karten), Schwarz = Auswahl und Hauptaktion, Terrakotta nur für Fehler/überfällig,
   Schieferblau für Info und Links, Senf/Grün für Status, fast alles eine Pille. Bewegung bestätigt, statt zu schmücken
   (app.js: Gummiband-Pille, Seitenaufbau, zählende Zahlen, wachsende Balken, Score-Ring) – abschaltbar über „weniger Bewegung“. */
:root {
  /* Hauptaktion & Auswahl: Schwarz (früher SLS-Rot) */
  --accent: #171918; --accent-dark: #2C2E2B; --accent-soft: rgba(23,25,24,.08);
  /* Flächen */
  --bg: #E6E6DA; --card: #F3F2EC; --surface: #F8F7F2; --surface-2: #F2F3ED; --input: #FAF9F5;
  --line: #DEDCD2; --line-strong: #CFCCC2; --hover: rgba(23,25,24,.06); --spur: #E1E2DD; --grau: #E9E8E1;
  /* Schrift */
  --text: #1C1D18; --muted: #63645C; --faint: #75756C;
  /* Status: Erfolgsgrün, Senf, Terrakotta (nur Fehler, überfällig, Zähler) */
  --green: #3A7854; --green-bg: #E0EADF; --green-ink: #2F6646;
  --yellow: #EDC142; --yellow-bg: #F7EDCB; --yellow-ink: #6A4F08;
  --red: #C03A1B; --red-bg: #F5E1D9; --red-ink: #9A2E14;
  /* Info/Link = Schieferblau – „Info“ sieht nie aus wie „läuft gut“ */
  --blue: #3F5A6B; --blue-bg: #E1E6E8; --purple: #2D322E; --teal: #2C4E44;
  /* Stufenflächen (Farbe = Stufe; je weiter, desto dunkler – Werte aus config.STUFEN) */
  --st-papier: #FBFAF4; --st-senf-hell: #F7EDCB; --st-senf: #EDC142; --st-gruen: #285247; --st-terra: #C03A1B; --st-schwarz: #181A19;
  --st-gewonnen: #3A7854; --st-verloren: #8E918B; --st-gewonnen-flaeche: #EDF4ED; --st-verloren-flaeche: #E4E6E1;
  /* Form */
  --radius: 18px; --radius-sm: 12px;
  --shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 6px 20px rgba(60,45,20,.06);
  --shadow-lift: 0 22px 40px -10px rgba(20,35,28,.30), 0 8px 16px rgba(20,35,28,.12);
  --sidebar-w: 232px; --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  /* Formen als Variablen – die Kundenseiten (Buchung, Einladung, Rechtstexte) setzen sie unten auf die alte Optik zurück */
  --page-bg: radial-gradient(1100px 520px at 0% 0%, #E7D7C4 0%, transparent 62%), radial-gradient(900px 480px at 48% 0%, #EADCB9 0%, transparent 58%),
             radial-gradient(900px 560px at 100% 0%, #E4E5D5 0%, transparent 60%), linear-gradient(180deg, #E6E6DA 0%, #DFE1D4 100%);
  --btn-radius: 999px; --btn-radius-sm: 999px; --btn-bg: rgba(255,255,255,.45); --btn-pad: 8px 15px; --btn-pad-sm: 5px 11px;
  --card-edge: rgba(255,255,255,.55); --card-pad: 18px;
  --field-radius: 12px; --field-pad: 8px 12px; --focus-ring: 0 0 0 3px rgba(23,25,24,.10);
  --empty-bg: rgba(255,255,255,.35); --pill-bg: rgba(255,255,255,.5);
}
/* Kundensichtbare Seiten (oeffentlich_base.html ohne Kennung „app“: Buchungsseite, Buchung-ok, Einladung, Rechtstexte) behalten
   ihre bisherige Optik. Spezifität (0,1,0) wie :root – schlägt den Block oben, verliert aber gegen den <style> der Buchungsseite,
   der --accent/--accent-dark nach ihm auf die Agenturfarbe setzt. Ohne :has() (Firefox < 121) sehen sie wie die App aus. */
:root:has(:where(.auth > .box:not(.app))) {
  --accent: #D82034; --accent-dark: #A00D24; --accent-soft: #FBE6E9;
  --bg: #F4F5F7; --card: #FFFFFF; --surface: #FFFFFF; --surface-2: #FFFFFF; --input: #FFFFFF;
  --line: #E5E5EA; --line-strong: #D1D1D6; --hover: #F4F5F7; --spur: #ECEDF0; --grau: #F0F0F2;
  --text: #1C1C1E; --muted: #6E6E73; --faint: #9A9AA0;
  --green: #1F9D55; --green-bg: #EAF6EF; --green-ink: #1F9D55; --yellow: #E9A821; --yellow-bg: #FDF3DC; --yellow-ink: #7A5306;
  --red: #D82034; --red-bg: #FBE6E9; --blue: #2E5AAC; --blue-bg: #E8EEF9;
  --red-ink: var(--accent-dark);   /* wie früher: Fehlertext folgt der Agenturfarbe der Buchungsseite (sonst #A00D24) */
  --radius: 12px; --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 6px 20px rgba(0,0,0,.05); --shadow-lift: 0 4px 12px rgba(0,0,0,.12), 0 12px 32px rgba(0,0,0,.10);
  --page-bg: #F4F5F7; --btn-radius: 9px; --btn-radius-sm: 7px; --btn-bg: #fff; --btn-pad: 8px 14px; --btn-pad-sm: 5px 10px; --card-edge: #E5E5EA; --card-pad: 16px;
  --field-radius: 8px; --field-pad: 8px 10px; --focus-ring: 0 0 0 3px #FBE6E9; --empty-bg: #fff; --pill-bg: #F4F5F7;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: var(--font); font-size: 14px; color: var(--text); background: var(--page-bg); background-color: var(--bg); background-attachment: fixed;
  -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
:is(#app, .box.app) a:hover { text-decoration: underline; text-underline-offset: 2px; }
:is(#app, .box.app) :is(a.btn, #nav a, .seg a, .tabs a, .flow a, a.lead-card, .brand, a.ev):hover { text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1 { font-size: 22px; margin: 0 0 4px; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 16px; margin: 0 0 10px; font-weight: 700; }
h3 { font-size: 14px; margin: 0 0 8px; font-weight: 600; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12px; } .tiny { font-size: 11px; }
.mono { font-variant-numeric: tabular-nums; }
.row { display: flex; gap: 10px; align-items: center; } .row.wrap { flex-wrap: wrap; } .grow { flex: 1; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mb8 { margin-bottom: 8px; } .mb16 { margin-bottom: 16px; }
[hidden] { display: none !important; }
form.inline { display: inline; }
#app ::selection, .box.app ::selection { background: rgba(237,193,66,.45); }

/* ===== Shell: durchscheinende Seitenleiste, aktive Navigation = schwarze Pille ===== */
#app { display: flex; min-height: 100vh; }
#sidebar { width: var(--sidebar-w); flex: 0 0 var(--sidebar-w); background: rgba(255,255,255,.32); border-right: 1px solid rgba(23,25,24,.08);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
/* Desktop: Die Seitenleiste rollt in sich, statt aus ihrer 100vh-Box zu ragen – sonst rollt jede Seite unter ~800 px Höhe
   senkrecht, und unter Windows kostet der Seiten-Rollbalken dem Board 17 px Breite */
@media (min-width: 861px) { #sidebar { overflow-y: auto; scrollbar-width: thin; } }
.sb-kopf { display: block; }
.brand { display: flex; gap: 10px; align-items: center; padding: 18px 16px 12px; color: var(--text); }
.brand img { flex: none; border-radius: 9px; }
.brand b { display: block; font-size: 15px; } .brand small { color: var(--muted); font-size: 11px; }
#nav { display: flex; flex-direction: column; gap: 2px; padding: 6px 10px; position: relative; }
#nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 999px; color: var(--text); font-weight: 500; }
#nav a .ico { width: 18px; text-align: center; color: var(--muted); flex: none; }
#nav a:hover { background: var(--hover); }
#nav a.active { background: var(--accent); color: #fff; } #nav a.active .ico { color: #fff; }
#nav a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.navgrp { font-size: 10px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--faint); padding: 14px 16px 4px; }
.badge { margin-left: auto; background: var(--red); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 7px; font-weight: 700; font-variant-numeric: tabular-nums; }
/* Gummiband-Pille (app.js): die echte .active wird durchsichtig, eine schwarze Kopie der Einträge (.nav-tinte) wird auf die Pille
   zugeschnitten – die Schrift wechselt genau an der Pillenkante von dunkel zu weiß. Ohne JS gilt die einfache Regel oben. */
#nav.mit-pille > a.active { background: transparent; color: var(--text); }
#nav.mit-pille > a.active .ico { color: var(--muted); }
#nav.mit-pille > a.active:hover { background: var(--hover); }
#nav > .nav-tinte { position: absolute; left: 0; top: 0; box-sizing: border-box; display: flex; flex-direction: inherit; align-items: inherit; gap: inherit; padding: inherit; margin: 0;
  background: var(--accent); pointer-events: none; z-index: 1; clip-path: inset(50%); }
#nav > .nav-tinte a, #nav > .nav-tinte .ico, #nav > .nav-tinte .navgrp { color: #fff; }
#nav > .nav-tinte a, #nav > .nav-tinte a:hover, #nav > .nav-tinte a.active { background: transparent; }
#nav > .nav-tinte .lock { border-color: rgba(255,255,255,.4); }
.sidebar-foot { margin-top: auto; padding: 12px 16px; border-top: 1px solid rgba(23,25,24,.08); font-size: 12px; }
.src-status { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.src-status .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); flex: none; }
.src-status.ok .dot { background: var(--green); }
#queue-info { margin-top: 8px; color: var(--muted); line-height: 1.4; }
#queue-info b { color: var(--text); font-variant-numeric: tabular-nums; }
#main { flex: 1; min-width: 0; padding: 22px 26px 40px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); }
.empty { color: var(--muted); padding: 30px; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--empty-bg); }

/* ===== Komponenten ===== */
.card { background: var(--card); border: 1px solid var(--card-edge); border-radius: var(--radius); padding: var(--card-pad); box-shadow: var(--shadow); }
.card > h2:first-child { margin-bottom: 12px; }
.grid { display: grid; gap: 14px; } .cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); } .cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.cols-5 { grid-template-columns: repeat(5, minmax(0,1fr)); } .cols-main { grid-template-columns: minmax(0,1.4fr) minmax(0,1fr); }
@media (max-width: 1100px) { .cols-5 { grid-template-columns: repeat(3, minmax(0,1fr)); } .cols-3 { grid-template-columns: repeat(2, minmax(0,1fr)); } .cols-main { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .cols-2, .cols-3, .cols-5 { grid-template-columns: 1fr 1fr; } }
/* Knöpfe: Pille; Primär = Schwarz (je Bereich einer), Gefahr = Terrakotta-hell, Erfolg = Grün-hell */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: var(--btn-pad); border-radius: var(--btn-radius); border: 1px solid var(--line-strong); background: var(--btn-bg);
  cursor: pointer; font-weight: 600; font-size: 13px; line-height: 1.2; white-space: nowrap; color: var(--text); }
:is(#app, .box.app) .btn { transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s; }
.btn:not(:disabled):hover { background: var(--hover); } .btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; } .btn.primary:not(:disabled):hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn.success { color: var(--green-ink); border-color: var(--green-bg); background: var(--green-bg); } .btn.success:not(:disabled):hover { background: #D3E2D2; border-color: #D3E2D2; }
.btn.danger { color: var(--red-ink); border-color: var(--red-bg); background: var(--red-bg); } .btn.danger:not(:disabled):hover { background: #F0D2C7; border-color: #F0D2C7; }
.btn.ghost { border-color: transparent; background: transparent; } .btn.ghost:not(:disabled):hover { background: var(--hover); }
.btn.sm { padding: var(--btn-pad-sm); font-size: 12px; border-radius: var(--btn-radius-sm); }
.btn.dunkel { background: var(--accent); border-color: var(--accent); color: #fff; } .btn.dunkel:not(:disabled):hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn:focus-visible, .chip:focus-visible, .seg > :focus-visible, .tabs > :focus-visible, .flow a:focus-visible, .plan:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn.primary:focus-visible, .btn.dunkel:focus-visible { box-shadow: inset 0 0 0 2px #fff; }
/* Ablauf-Leiste: Ring nach innen – außen schnitte ihn overflow:hidden der Leiste ab bzw. übermalte ihn das Nachbarfeld */
.flow a:focus-visible { outline-offset: -3px; z-index: 1; }
/* Pillen: helle Fläche + dunkle Schrift derselben Familie, nie volle Statusfarbe */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--pill-bg);
  color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.pill.green, .pill.gruen { background: var(--green-bg); color: var(--green-ink); border-color: transparent; }
.pill.yellow, .pill.gelb { background: var(--yellow-bg); color: var(--yellow-ink); border-color: transparent; }
.pill.red, .pill.rot { background: var(--red-bg); color: var(--red-ink); border-color: transparent; }
.pill.blue, .pill.blau { background: var(--blue-bg); color: var(--blue); border-color: transparent; }
.pill.gray, .pill.grau { background: var(--grau); color: var(--muted); border-color: transparent; }
.pill.top { background: var(--accent); color: #fff; border-color: transparent; }
/* Stufen-Pille (style="--stc: …" aus STUFEN_FARBE): graue Pille mit Punkt in Stufenfarbe – die Stufenfarbe ist nie Schrift */
.pill.st { background: var(--grau); color: var(--text); border-color: transparent; }
.pill.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--stc, var(--st-verloren)); box-shadow: inset 0 0 0 1px rgba(23,25,24,.14); }
/* Eingabefelder: hellere Fläche statt harter Kante, Fokus = schwarzer Rand + Hof */
input[type=text], input[type=email], input[type=number], input[type=password], input[type=url], select, textarea {
  width: 100%; padding: var(--field-pad); border: 1px solid var(--line-strong); border-radius: var(--field-radius); background: var(--input); outline: none; }
:is(#app, .box.app) :is(input[type=date], input[type=time], input[type=month], input[type=datetime-local], input[type=tel], input[type=search]) {
  width: 100%; padding: var(--field-pad); border: 1px solid var(--line-strong); border-radius: var(--field-radius); background: var(--input); outline: none; min-height: 36px; }
:is(#app, .box.app) :is(input[type=date], input[type=time], input[type=month], input[type=datetime-local])::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }
input:focus, select:focus, textarea:focus, :is(#app, .box.app) :is(input, select, textarea):focus { border-color: var(--accent); box-shadow: var(--focus-ring); }
#app select, .box.app select { appearance: none; -webkit-appearance: none; padding-right: 30px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2363645C' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
#app select[multiple], .box.app select[multiple] { background-image: none; padding-right: 12px; }
#app input[type=color] { border: 1px solid var(--line-strong); border-radius: 10px; background: var(--input); cursor: pointer; }
#app input[type=file] { font-size: 12px; color: var(--muted); max-width: 100%; }
#app input[type=file]::file-selector-button { font: inherit; font-weight: 600; font-size: 12px; color: var(--text); margin-right: 10px; padding: 6px 13px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(255,255,255,.45); cursor: pointer; }
#app input[type=file]::file-selector-button:hover { background: var(--hover); }
:is(#app, .box.app) :is(input[type=checkbox], input[type=radio], input[type=range], progress) { accent-color: var(--accent); }
:is(#app, .box.app) ::placeholder { color: var(--faint); opacity: 1; }
label.field .faint { color: var(--muted); font-weight: 500; }   /* Feldhinweis „(mind. 10 Zeichen)“: lesbar (≥ 4,5:1), abgesetzt über die Stärke */
/* nur für Vorleser (zählende Zahlen, app.js: der echte Wert steht hier, die zählende Anzeige ist aria-hidden) */
.sr-nur { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
textarea { min-height: 70px; resize: vertical; }
label.field { display: block; font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin-bottom: 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; margin-bottom: 8px; cursor: pointer; } .check input { margin-top: 3px; }
/* Tabellen: Haarlinien, Kopf in Versalien, Zeile hebt sich beim Zeigen */
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); font-weight: 600; white-space: nowrap; }
table.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom-color: transparent; }
table.tbl tr:hover td { background: var(--hover); } table.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl tr.clickable { cursor: pointer; }
.zeile-link { color: inherit; } .zeile-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
table.tbl tr.clickable:hover td:first-child { border-radius: 12px 0 0 12px; } table.tbl tr.clickable:hover td:last-child { border-radius: 0 12px 12px 0; }
/* Kennzahlen: Betrag ist nach dem Seitentitel das Größte */
.kpi { background: var(--card); border: 1px solid var(--card-edge); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); min-width: 0; }
.kpi .label { font-size: 12px; color: var(--muted); font-weight: 600; } .kpi .value { font-size: 24px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi .value.gut { color: var(--green); } .kpi .value.schlecht { color: var(--red); }
.kpi .sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.kpi .bar { margin: 8px 0 2px; }
/* Hinweise */
.note { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--blue-bg); color: var(--blue); font-size: 13px; margin-bottom: 14px; }
:is(#app, .box.app) .note { line-height: 1.45; }   /* nur in der App – Kundenseiten (Rechtstexte, Buchung, Einladung) bleiben pixelgleich */
.note.warn { background: var(--yellow-bg); color: var(--yellow-ink); } .note.err { background: var(--red-bg); color: var(--red-ink); } .note.ok { background: var(--green-bg); color: var(--green-ink); }
.note a { color: inherit; font-weight: 700; text-decoration: underline; }
/* Stufen-Box in der Akte (style="--stc: …"): Papier mit Stufenfarbe als Kante – lesbar auf jeder Stufe, Verloren/Verworfen grau.
   Nur ein Hauch Tönung: Terrakotta (Gespräch) soll nicht wie eine Fehlermeldung aussehen */
.note.st { background: color-mix(in srgb, var(--stc, var(--st-verloren)) 5%, var(--st-papier)); color: var(--text); border-left: 4px solid var(--stc, var(--st-verloren));
  box-shadow: inset 0 0 0 1px rgba(23,25,24,.06); }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 12px; } .filters > div { min-width: 150px; }
.kv { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 6px 14px; font-size: 13px; }
.kv > div:nth-child(odd) { color: var(--muted); }

/* ===== Ablauf-Leiste (Übersicht): eine Glas-Karte, je Stufe ein Feld mit Punkt in Stufenfarbe ===== */
.flow { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 0; margin-bottom: 14px; background: var(--card); border: 1px solid var(--card-edge);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.flow a { display: block; padding: 12px 14px; color: var(--text); border-right: 1px solid var(--line); position: relative; transition: background-color .15s; }
.flow a:last-child { border-right: 0; }
.flow a:hover { background: var(--hover); }
.flow .n { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; margin-top: 2px; }
.flow .t { font-size: 12px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.flow .t::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--stc, var(--st-verloren)); box-shadow: inset 0 0 0 1px rgba(23,25,24,.14); }
.flow .h { font-size: 11px; color: var(--muted); margin-top: 2px; line-height: 1.35; }
.flow a.hot { background: var(--yellow-bg); } .flow a.hot:hover { background: #F3E5B6; } .flow a.hot .t, .flow a.hot .h { color: var(--yellow-ink); }
@media (max-width: 900px) { .flow { grid-template-columns: repeat(3, minmax(0,1fr)); } .flow a:nth-child(3) { border-right: 0; } }

/* ===== Pipeline (Kanban wie im Lead-Cockpit): Glas-Spalten, Karten vollflächig in der Stufenfarbe ===== */
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; min-height: 60vh; }
.col { flex: 1 0 178px; min-width: 178px; background: rgba(255,255,255,.34); border: 1px solid rgba(255,255,255,.5); border-radius: 22px; padding: 10px;
  display: flex; flex-direction: column; max-height: calc(100vh - 150px); transition: background-color .14s; }
.col-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 8px; font-weight: 700; font-size: 13px; }
.col-head .count { margin-left: auto; color: var(--muted); font-weight: 700; font-size: 11px; background: rgba(23,25,24,.06); border-radius: 999px; padding: 1px 8px;
  font-variant-numeric: tabular-nums; }
.col-head .swatch { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--stc, var(--faint)); box-shadow: inset 0 0 0 1px rgba(23,25,24,.16); }
.col-hint { font-size: 11px; color: var(--muted); padding: 0 4px 10px; margin-top: -4px; line-height: 1.35; }
/* Desktop: jeder Hinweis bekommt zwei Zeilen – sonst steht die erste Karte unter einem zweizeiligen Hinweis tiefer als nebenan */
@media (min-width: 861px) { .board .col-hint { min-height: calc(2 * 1.35em + 10px); } }
/* 5 px Innenabstand: Platz für den Fokus-Ring der Karten (2 px Abstand + 2 px Strich) – der Rollbereich schnitte ihn sonst ab */
.col-body { overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 40px; flex: 1; padding: 5px; margin: -5px; }
.col.drag-over { outline: 2px solid color-mix(in srgb, var(--stc, var(--accent)) 65%, transparent); outline-offset: -3px;
  background: color-mix(in srgb, var(--stc, #fff) 12%, rgba(255,255,255,.5)); }
/* Board mit Zonen: 6 × 168 px + 5 × 8 px = 1048 px – passt bei 1366 px Breite (1082 px frei, mit Windows-Rollbalken 1065 px);
   schmaler zeigt ein Verlauf rechts, dass es weitergeht */
@media (min-width: 861px) { .board.mit-zonen { gap: 8px; } .board.mit-zonen .col { flex-basis: 168px; min-width: 168px; } }
.board.rechts-mehr { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }
/* Beim Ziehen: nicht erlaubte Spalte neutral (grau gepunktet, ohne Stufenfarbe) mit Kurztext aus regel(); Umleitung = Ablegen öffnet die Akte */
.col .col-zh { display: none; }
body.zieht .col.gesperrt, body.zieht .col.umleitung, body.zieht .col.umleitung.drag-over { outline: 2px dotted var(--line-strong); outline-offset: -3px; background: rgba(23,25,24,.035); }
body.zieht .col.gesperrt { cursor: not-allowed; } body.zieht .col.gesperrt .col-body { opacity: .55; }
body.zieht .col.umleitung.drag-over { outline-color: var(--muted); }
body.zieht .col.gesperrt .col-zh, body.zieht .col.umleitung .col-zh { display: block; margin: 0 0 8px; padding: 7px 10px; border-radius: 12px; background: var(--surface);
  font-size: 11px; font-weight: 600; line-height: 1.35; color: var(--text); box-shadow: 0 1px 2px rgba(30,30,20,.06); }
/* Karte: Fläche und Schrift je Stufe (data-status, setzt das Board-Skript beim Verschieben mit) – Papier → Senf → Dunkelgrün →
   Terrakotta → Schwarz. Schrift ≥ 4,5:1 auf jeder Fläche; „überfällig“ ist eine Pille, nie die Kartenfarbe. */
.lead-card { --sc-bg: var(--st-papier); --sc-fg: var(--text); --sc-sub: var(--muted); --sc-auf: transparent;
  background: var(--sc-bg); color: var(--sc-fg); transition: background-color .25s, color .25s, box-shadow .15s; border-radius: 16px; padding: 11px 13px;
  box-shadow: 0 1px 2px rgba(30,30,20,.06), 0 6px 14px rgba(30,30,20,.07); cursor: grab; display: block; }
:is(.lead-card, .akte-kopf)[data-status="gescannt"] { --sc-bg: var(--st-senf-hell); --sc-sub: rgba(28,29,24,.74); }
:is(.lead-card, .akte-kopf)[data-status="freigegeben"] { --sc-bg: var(--st-senf); --sc-sub: rgba(28,29,24,.78); --sc-auf: rgba(255,255,255,.9); }
:is(.lead-card, .akte-kopf)[data-status="kontaktiert"] { --sc-bg: var(--st-gruen); --sc-fg: #fff; --sc-sub: rgba(255,255,255,.88); --sc-auf: rgba(255,255,255,.92); }
:is(.lead-card, .akte-kopf)[data-status="gespraech"] { --sc-bg: var(--st-terra); --sc-fg: #fff; --sc-sub: rgba(255,255,255,.88); --sc-auf: rgba(255,255,255,.92); }
:is(.lead-card, .akte-kopf)[data-status="angebot"] { --sc-bg: var(--st-schwarz); --sc-fg: #fff; --sc-sub: #B1B3B2; --sc-auf: rgba(255,255,255,.92); }
:is(.lead-card, .akte-kopf)[data-status="kunde"] { --sc-bg: var(--st-gewonnen-flaeche); }
:is(.lead-card, .akte-kopf):is([data-status="verloren"], [data-status="verworfen"]) { --sc-bg: var(--st-verloren-flaeche); --sc-sub: #55564E; }
.lead-card:hover { box-shadow: var(--shadow-lift); } .lead-card.dragging { opacity: .5; }
.lead-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lead-card:is([data-status="kontaktiert"], [data-status="gespraech"], [data-status="angebot"]):focus-visible { outline-color: var(--accent); box-shadow: 0 0 0 2px #fff; }
/* Pillen auf farbiger Karte: helle Unterlage, eigene Tinte (Score-Ampel bleibt lesbar); „Top“ hell auf dunkler Karte */
.lead-card .pill { border-color: transparent; }
.lead-card:is([data-status="freigegeben"], [data-status="kontaktiert"], [data-status="gespraech"], [data-status="angebot"]) .pill:not(.top) { background: var(--sc-auf); }
.lead-card:is([data-status="freigegeben"], [data-status="kontaktiert"], [data-status="gespraech"], [data-status="angebot"]) .pill.gray { color: var(--muted); }
.lead-card:is([data-status="kontaktiert"], [data-status="gespraech"], [data-status="angebot"]) .pill.top { background: #fff; color: var(--text); }
/* in der Fußzeile vor dem Score: bricht mit den anderen Pillen um und verdeckt nie den Namen; kommt/geht mit der Klasse .sla */
.lead-card.sla .foot::before { content: "überfällig"; flex: none; padding: 0 7px; border-radius: 999px; font-size: 10px; font-weight: 700; line-height: 16px;
  background: var(--red-bg); color: var(--red-ink); }
.lead-card:is([data-status="freigegeben"], [data-status="kontaktiert"], [data-status="gespraech"], [data-status="angebot"]).sla .foot::before { background: var(--sc-auf); }
.pill.ueberfaellig { padding: 0 7px; font-size: 10px; font-weight: 700; line-height: 16px; background: var(--red-bg); color: var(--red-ink); border-color: transparent; }
/* Sperrliste (data-gesperrt, z. B. Namenstreffer – Status noch nicht Verworfen): kleines Schild mit Schloss oben rechts in der
   Karte (.sperr-schild aus pipeline.html), außerhalb der Fußzeile – sie bricht dadurch nie um. Die Erklärung steht in title/aria-label
   („Steht auf der Sperrliste – kein Kontakt“), nicht als Legende im Untertitel. Mittig zur ersten Namenszeile (10 + 16 px), weit
   rechts, damit der Name nur 13 px abgibt (Schild 16 + 6 − 12 px Kartenrand + 3 px Luft) – in der 168-px-Spalte bleiben 108 px.
   Verworfene Karten sind ohnehin gesperrt und tragen es nicht. Lange Namen trennt der Browser mit Trennstrich (hyphens:auto,
   html lang="de") statt sie ohne Strich mitten im Wort umzubrechen; overflow-wrap:break-word bleibt nur die Notbremse. */
.lead-card .sperr-schild { display: none; }
.lead-card:is([data-gesperrt="1"], [data-gesperrt="true"]):not([data-status="verworfen"]) { position: relative; }
.lead-card:is([data-gesperrt="1"], [data-gesperrt="true"]):not([data-status="verworfen"]) > .sperr-schild { display: grid; place-items: center;
  position: absolute; top: 10px; right: 6px; width: 16px; height: 16px; border-radius: 999px; background: rgba(23,25,24,.1); color: currentColor; }
.lead-card:is([data-gesperrt="1"], [data-gesperrt="true"]):not([data-status="verworfen"]) > .name { padding-right: 13px; overflow-wrap: break-word;
  -webkit-hyphens: auto; hyphens: auto; }
.lead-card:is([data-status="kontaktiert"], [data-status="gespraech"], [data-status="angebot"]) > .sperr-schild { background: rgba(255,255,255,.92); color: var(--text); }
.sperr-schild svg { display: block; width: 9px; height: 9px; }
.lead-card .name { font-weight: 700; font-size: 13px; line-height: 1.3; } .lead-card .meta { color: var(--sc-sub); font-size: 11px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-card .foot { display: flex; align-items: center; gap: 6px; margin-top: 9px; flex-wrap: wrap; }

/* ===== Akten-Kopf in der Stufenfläche (wie der Kopf des Akten-Fachs im Cockpit) =====
   Wirkt erst, wenn lead.html den Kopf so auszeichnet: <div class="page-head akte-kopf" data-status="{{ lead.status }}"> (Liste
   „nachzuziehen“). Fläche/Schrift wie die Karte im Board; auf dunklen Stufen werden Knöpfe und Pillen hell. Stufenwechsel = Farbsprung. */
.akte-kopf { --sc-bg: var(--st-papier); --sc-fg: var(--text); --sc-sub: var(--muted); --sc-auf: transparent; }   /* Standard schwächer als die Stufenregeln */
.page-head.akte-kopf { background: var(--sc-bg); color: var(--sc-fg); border: 1px solid var(--card-edge); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.akte-kopf .sub, .akte-kopf .muted { color: var(--sc-sub); }
.akte-kopf a:not(.btn) { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 2px; }
.akte-kopf:is([data-status="freigegeben"], [data-status="kontaktiert"], [data-status="gespraech"], [data-status="angebot"]) .pill { background: var(--sc-auf); border-color: transparent; }
.akte-kopf:is([data-status="freigegeben"], [data-status="kontaktiert"], [data-status="gespraech"], [data-status="angebot"]) .pill.st { color: var(--text); }
.akte-kopf:is([data-status="kontaktiert"], [data-status="gespraech"], [data-status="angebot"]) .btn:not(.primary) { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.34); color: #fff; }
.akte-kopf:is([data-status="kontaktiert"], [data-status="gespraech"], [data-status="angebot"]) .btn:not(.primary):not(:disabled):hover { background: rgba(255,255,255,.24); }
.akte-kopf:is([data-status="kontaktiert"], [data-status="gespraech"], [data-status="angebot"]) .btn.primary { background: #fff; border-color: #fff; color: var(--text); }
.akte-kopf:is([data-status="kontaktiert"], [data-status="gespraech"], [data-status="angebot"]) :focus-visible { outline-color: #fff; }

/* ===== Score-Ring (wie Anzeigen-Coach; Zeichnen beim ersten Anblick in app.js) ===== */
.ring { position: relative; width: 84px; height: 84px; flex: none; }
.ring svg { display: block; transform: rotate(-90deg); width: 100%; height: 100%; overflow: visible; }
.ring circle { fill: none; stroke-width: 8; stroke-linecap: round; }
.ring circle.bg { stroke: var(--spur); } .ring circle.fg { stroke: var(--faint); }
.ring.gruen circle.fg { stroke: var(--green); } .ring.gelb circle.fg { stroke: var(--yellow); } .ring.rot circle.fg { stroke: var(--red); } .ring.blau circle.fg { stroke: var(--blue); }
.ring .v { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.ring .v b { font-size: 24px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; } .ring .v small { font-size: 9px; color: var(--muted); margin-top: 2px; }
.score-head { display: flex; gap: 14px; align-items: center; }
.score-head .lbl { font-size: 13px; font-weight: 700; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.score-head .txt { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.5; }

/* ===== Prüfungen je Kategorie ===== */
details.cat { border: 1px solid var(--line); border-radius: 16px; margin-bottom: 8px; background: rgba(255,255,255,.45); overflow: hidden; }
details.cat summary { list-style: none; cursor: pointer; padding: 11px 14px; display: grid; grid-template-columns: minmax(0,1.5fr) minmax(0,2fr) 70px 178px; gap: 12px; align-items: center;
  transition: background-color .15s; }
details.cat summary > .small { white-space: nowrap; }   /* „Gewicht 17 · 100 % geprüft“ einzeilig – alle Zeilen gleich hoch */
details.cat summary > .pill { justify-self: end; }      /* Status-Pille (Postausgang) so breit wie ihr Text, nicht wie die Zelle */
details.cat summary:hover { background: var(--hover); }
details.cat summary::-webkit-details-marker { display: none; }
details.cat summary b { font-size: 13px; }
details.cat summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 16px; }
details.cat[open] summary { border-bottom: 1px solid var(--line); }
/* Balken: Spur + Füllung (Farbe per Klasse; wachsen beim ersten Anblick in app.js) */
.bar { height: 6px; background: var(--spur); border-radius: 999px; overflow: hidden; } .bar i { display: block; height: 100%; border-radius: 999px; background: var(--st-gruen); }
.bar i.rot { background: var(--red); } .bar i.gelb { background: var(--yellow); } .bar i.gruen { background: var(--green); } .bar i.blau { background: var(--blue); }
/* Trichter (Erfolg): dicke Balken auf der Spur, Dunkelgrün wie im Cockpit, Gewonnen in Erfolgsgrün */
.bar.trichter { height: 18px; } .bar.trichter i { min-width: 6px; } .bar.trichter i.leer { min-width: 0; }   /* 0 Leads = leere Spur, kein Stummel */
.trichter-zeile { margin-bottom: 10px; }
.rule { display: flex; gap: 10px; align-items: flex-start; padding: 9px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.rule:last-child { border-bottom: none; }
.rule .st { width: 20px; height: 20px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; background: var(--grau); color: var(--muted); }
.rule.ok .st { background: var(--green-bg); color: var(--green-ink); } .rule.teil .st { background: var(--yellow-bg); color: var(--yellow-ink); }
.rule.fehlt .st { background: var(--red-bg); color: var(--red-ink); }
.rule .bd { flex: 1; min-width: 0; } .rule .bd .t { font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rule .bd .t .src { font-weight: 500; font-size: 11px; color: var(--muted); }
.rule .bd .ev { color: var(--muted); margin-top: 3px; line-height: 1.5; } .rule .bd .rep { font-size: 12px; color: var(--blue); margin-top: 3px; }
.rule .pt { flex: none; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }
/* ===== Sonstiges ===== */
.shots { display: flex; gap: 12px; align-items: flex-start; } .shots img { border: 1px solid var(--line); border-radius: 12px; display: block; max-width: 100%; }
.shots .d { flex: 3; min-width: 0; } .shots .m { flex: 1; max-width: 170px; }
.progress { display: flex; align-items: center; gap: 12px; }
.spinner { width: 18px; height: 18px; border: 2.5px solid var(--line-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.matrix text { font-size: 11px; fill: var(--muted); }
.step-list { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.step-list li { display: flex; gap: 12px; align-items: flex-start; padding: 9px 0; font-size: 13px; border-bottom: 1px solid var(--line); }
.step-list li:last-child { border-bottom: 0; }
.step-list li::before { counter-increment: s; content: counter(s); width: 24px; height: 24px; border-radius: 50%; background: var(--bg); color: var(--muted); font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex: none; border: 1px solid var(--line); }
.step-list li.me::before { background: var(--accent); border-color: var(--accent); color: #fff; }
/* Hinweise unten rechts: dunkel, Erfolg mit grünem Punkt, Fehler Terrakotta, Rückgängig in Senf mit ablaufendem Zeitbalken */
#toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 1000; }
.toast { background: #1A1C1B; color: #E4E6E4; padding: 10px 16px; border-radius: 22px; box-shadow: var(--shadow-lift); font-size: 13px; max-width: 360px;
  position: relative; overflow: hidden; animation: toast-ein .2s ease-out; }
.toast.err { background: var(--red); color: #fff; } .toast.ok { background: #1A1C1B; color: #E4E6E4; }
.toast.ok::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #6FBF8E; margin-right: 8px; vertical-align: 1px; }
.toast.ok.mit-aktion::before { flex: none; margin-right: -4px; }
@keyframes toast-ein { from { opacity: 0; transform: translateY(8px); } }
/* Hinweis mit „Rückgängig“ (aufschieben in app.js): Senf-Knopf + ablaufender Zeitbalken = so lange lässt sich die Änderung zurücknehmen */
.toast.mit-aktion { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; }
.toast.mit-aktion .tt { flex: 1; min-width: 0; }
.toast .tt.zweiteilig { display: flex; flex-wrap: wrap; column-gap: .3em; }
.toast .t-name { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast .t-rest { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
#toasts.an-zonen { gap: 6px; }   /* Pipeline: Hinweise im Platz rechts neben den Zonen – etwas flacher, damit zwei übereinander Platz haben */
/* Pipeline: höchstens zwei Hinweise sichtbar – ein höherer Stapel wüchse über die Zonen ins Board und verdeckte Karten.
   Ältere Puffer speichern trotzdem nach Ablauf; „Rückgängig gemacht“ ersetzt den eigenen Hinweis (toast: statt) */
body.mit-zonen #toasts .toast:nth-last-child(n+3), #toasts .toast.kein-platz { display: none; }   /* kein-platz: toastPlatz() */
#toasts.an-zonen .toast { max-width: var(--toast-breite, 360px); } #toasts.an-zonen .toast.mit-aktion { padding-top: 6px; padding-bottom: 6px; }
.toast .undo { flex: none; border: 0; cursor: pointer; background: #EDC146; color: #332402; font-weight: 700; font-size: 12px; padding: 6px 13px; border-radius: 999px; }
.toast .undo:hover { background: #F3CF5A; } .toast .undo:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.toast .zeit { position: absolute; left: 14px; right: 14px; bottom: 0; height: 2px; border-radius: 2px; background: rgba(237,193,70,.75); transform-origin: left center; animation: toast-zeit linear forwards; }
@keyframes toast-zeit { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.toast.weg { opacity: 0; transform: translateY(6px); transition: opacity .16s ease-in, transform .16s ease-in; }

/* ===== Mobile: Seitenleiste wird Kopfleiste, Navigation rollt waagrecht (aktiver Eintrag wird ins Bild gerollt, app.js) ===== */
.user-chip.compact { display: none; }
@media (max-width: 860px) {
  #app { flex-direction: column; }
  #sidebar { width: 100%; flex: none; height: auto; position: static; border-right: 0; border-bottom: 1px solid rgba(23,25,24,.08); }
  .sb-kopf { display: flex; align-items: center; gap: 8px; padding-right: 12px; }
  .sb-kopf .brand { flex: 1; min-width: 0; padding-right: 0; }
  .sb-kopf .brand > div { min-width: 0; } .sb-kopf .brand small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .user-chip.compact { display: flex; align-items: center; gap: 6px; flex: none; }
  .user-chip.compact form { margin: 0; }
  #nav { flex-direction: row; overflow-x: auto; padding: 0 8px 10px; scrollbar-width: none; align-items: center; }
  #nav::-webkit-scrollbar { display: none; }
  #nav a { white-space: nowrap; padding: 7px 12px; flex: none; }
  .navgrp { padding: 0 6px 0 10px; white-space: nowrap; flex: none; }
  .sidebar-foot { display: none; }
  #main { padding: 16px; }
  .col { flex-basis: 84vw; }
  details.cat summary { grid-template-columns: 1fr 60px; } details.cat summary .bar, details.cat summary .small { display: none; }
}

/* ===== SaaS-Ergänzungen: Konto, Banner, CRM, Kalender, Preise, Anmeldung ===== */
.mt4 { margin-top: 4px; } .ellipsis { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#nav a.locked { color: var(--muted); } #nav a.locked .lock { margin-left: auto; font-size: 10px; font-weight: 600; background: var(--grau); color: var(--muted); border-radius: 99px; padding: 0 7px; }
.quota { margin-bottom: 10px; }
.quota .bar { height: 5px; }
.userbox { display: flex; gap: 10px; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(23,25,24,.08); }
.userbox b.ellipsis { font-size: 13px; }
/* Abmelden wie im Cockpit (.user-chip): beschrifteter Knopf über die volle Breite unter dem Namen */
.userbox { flex-wrap: wrap; } .userbox form { flex-basis: 100%; margin: 0; }
.userbox form .btn { width: 100%; justify-content: center; border: 1px solid var(--line); margin-top: 2px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px; flex: none; }
.user-chip.compact .avatar { width: 30px; height: 30px; font-size: 11px; }
.tiny-pill { font-size: 10px; padding: 0 7px; }
.banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--blue-bg); color: var(--blue);
  margin-bottom: 14px; font-size: 13px; border-left: 4px solid var(--blue); }
.banner .btn { margin-left: auto; }
.banner.warn { background: var(--yellow-bg); color: var(--yellow-ink); border-left-color: var(--yellow); }
.banner.err { background: var(--red-bg); color: var(--red-ink); border-left-color: var(--red); }
.banner a:not(.btn) { color: inherit; font-weight: 700; text-decoration: underline; }
.sec-title { font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.lead-card .who { margin-left: auto; width: 20px; height: 20px; border-radius: 50%; background: rgba(23,25,24,.08); color: inherit; font-size: 10px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; }
.lead-card:is([data-status="kontaktiert"], [data-status="gespraech"], [data-status="angebot"]) .who { background: rgba(255,255,255,.92); color: var(--text); }
/* Verlauf: runde Symbole in der Familie der Aktion */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; align-items: flex-start; }
.timeline li:last-child { border-bottom: 0; }
.timeline .ic { width: 28px; height: 28px; border-radius: 50%; background: var(--grau); color: var(--muted); display: flex; align-items: center; justify-content: center; font-size: 12px; flex: none; }
.timeline .ic.brief, .timeline .ic.anruf { background: var(--blue-bg); color: var(--blue); } .timeline .ic.termin { background: var(--purple); color: #fff; }
.timeline .ic.email { background: var(--yellow-bg); color: var(--yellow-ink); } .timeline .ic.whatsapp { background: var(--green-bg); color: var(--green-ink); }
.timeline .ic.angebot { background: var(--accent-soft); color: var(--accent-dark); } .timeline .ic.notiz { background: var(--grau); color: var(--teal); }
.timeline .ic.ueberfaellig { background: var(--red-bg); color: var(--red-ink); font-weight: 700; }
.timeline .meta { font-size: 11px; color: var(--muted); margin-top: 1px; }
.task-due { color: var(--red-ink); font-weight: 600; }
/* Reiter: Text mit schwarzem 2-px-Strich unter dem aktiven Eintrag (Strich wandert, app.js); Sprungmarken-Reiter kleben oben */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; flex-wrap: wrap; }
.tabs a { padding: 8px 12px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .2s ease .1s; }
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--text); border-bottom-color: var(--accent); }
.tabs.mit-pille { position: relative; }
.tabs.mit-pille > a.active { border-bottom-color: transparent; }
.tabs-strich { position: absolute; left: 0; height: 2px; border-radius: 2px; background: var(--accent); pointer-events: none; z-index: 1; }
.tabs.anker { position: sticky; top: 0; z-index: 30; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -8px; margin-right: -8px; padding: 6px 8px 0;
  background: rgba(236,234,222,.82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-radius: 0 0 14px 14px; }
.tabs.anker::-webkit-scrollbar { display: none; }
.tabs.anker a { flex: none; white-space: nowrap; }
.consent { display: flex; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.consent:last-child { border-bottom: 0; } .consent .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); flex: none; }
.consent.ok .dot { background: var(--green); }
.tpl { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 8px; background: rgba(255,255,255,.4); }
.tpl pre { white-space: pre-wrap; font: inherit; font-size: 12px; color: var(--muted); margin: 6px 0; max-height: 120px; overflow: auto; }
/* Erste Schritte (Übersicht) und Go-Live-Check: Häkchen-Kreise wie „Inbetriebnahme“ im Cockpit */
.step-check { list-style: none; margin: 0; padding: 0; }
.step-check li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.step-check li:last-child { border-bottom: 0; }
.step-check li .ck { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); flex: none; display: flex; align-items: center;
  justify-content: center; font-size: 13px; font-weight: 700; color: var(--muted); }
.step-check li.done .ck { background: var(--green-bg); border-color: transparent; color: var(--green-ink); } .step-check li.done span { color: var(--muted); font-weight: 600; }
.rd-ico { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex: none;
  background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.rd-ico.erledigt { background: var(--green-bg); color: var(--green-ink); border-color: transparent; }
.rd-ico.offen { background: var(--red-bg); color: var(--red-ink); border-color: transparent; font-size: 11px; }
.rd-bar { height: 12px; border-radius: 999px; background: var(--bg); overflow: hidden; border: 1px solid var(--line); }
.rd-bar > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.rd-bar.done > i { background: var(--green); }
/* Kalender: Wochenraster in einer Glas-Karte, heute = schwarze Pille, Termine Papier mit farbiger Kante */
.week { display: grid; grid-template-columns: 44px repeat(7, minmax(0,1fr)); border: 1px solid var(--card-edge); border-radius: var(--radius); overflow: hidden;
  background: var(--card); box-shadow: var(--shadow); }
.week .hd { padding: 8px 4px; font-size: 12px; font-weight: 700; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); text-align: center; background: var(--surface);
  color: var(--muted); }
.week .hd:first-child { border-left: 0; }
.week .hd > span { display: inline-flex; align-items: center; justify-content: center; min-height: 26px; padding: 0 10px; border-radius: 999px; }
.week .hd.today { color: var(--text); }
.week .hd.today > span { background: var(--accent); color: #fff; }
.week .hours { position: relative; height: 624px; } .week .hours div { height: 48px; font-size: 10px; color: var(--muted); text-align: right; padding-right: 6px; font-variant-numeric: tabular-nums; }
.week .day { position: relative; height: 624px; border-left: 1px solid var(--line); background: repeating-linear-gradient(transparent 0 47px, var(--line) 47px 48px); }
.week .ev { position: absolute; left: 3px; right: 3px; min-height: 18px; border-radius: 9px; background: var(--st-papier); border-left: 3px solid var(--blue); padding: 2px 6px;
  font-size: 11px; line-height: 1.3; overflow: hidden; color: var(--text); white-space: nowrap; text-overflow: ellipsis; box-shadow: 0 1px 2px rgba(30,30,20,.08);
  transition: box-shadow .15s; }
.week .ev:hover { box-shadow: var(--shadow-lift); z-index: 2; }
.week .ev b { font-variant-numeric: tabular-nums; margin-right: 2px; }
.week .ev.buchung { background: var(--green-bg); border-left-color: var(--green); } .week .ev.abgesagt { opacity: .45; text-decoration: line-through; }
/* Schmal: Uhrzeit über dem Titel, der Titel einzeilig mit „…“ (wie .ev .t im Cockpit) – nie quer durch die Buchstaben geschnitten.
   Kurze Termine (.kurz, unter zwei Zeilen Höhe, kalender.html) bleiben einzeilig: „11:00 Gespr…“; der volle Titel steht im title */
@media (max-width: 860px) { .week { grid-template-columns: 34px repeat(7, minmax(70px,1fr)); overflow-x: auto; }
  .week .ev { line-height: 1.2; padding: 2px 4px; }
  .week .ev:not(.kurz) b { display: block; }
  .week .ev:not(.kurz) .evt { display: block; overflow: hidden; text-overflow: ellipsis; } }
/* Handy: in 70 px bliebe bei kurzen Terminen neben der Uhrzeit nur „…“ – dort zählt der Titel (die Zeit zeigt die Lage im Raster) */
@media (max-width: 620px) { .week .ev.kurz b { display: none; } }
/* Preise: Auswahlkarten, aktuelles Paket mit schwarzem Rand */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.plan { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: rgba(255,255,255,.45); display: flex; flex-direction: column; gap: 8px; position: relative; }
.plan.current { border: 2px solid var(--accent); padding: 15px; background: var(--input); }
.plan .price { font-size: 26px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; } .plan .price small { font-size: 12px; color: var(--muted); font-weight: 600; }
.plan ul { list-style: none; padding: 0; margin: 0; font-size: 13px; } .plan li { padding: 3px 0; } .plan li::before { content: "✓ "; color: var(--green); font-weight: 700; }
.plan .tag { position: absolute; top: -10px; right: 12px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 99px; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } }
/* Umschalter: hellgraue Spur mit weißlicher Pille (wandert als Gummiband, app.js) – nicht schwarz */
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--spur); border-radius: 999px; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg a { flex: none; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.seg a:hover { color: var(--text); }
.seg a.active { background: #F7F7F5; color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.seg.mit-pille { position: relative; }
.seg.mit-pille > a { position: relative; z-index: 1; transition: color .2s ease .1s; }   /* Schrift wechselt, wenn die Pille ankommt */
.seg.mit-pille > a.active { background: transparent !important; box-shadow: none !important; }
.seg-pille { position: absolute; left: 0; top: 0; width: 0; height: 0; border-radius: 999px; background: #F7F7F5; box-shadow: 0 1px 2px rgba(0,0,0,.08); pointer-events: none; z-index: 0; }
/* Anmeldung & öffentliche Seiten (App-Seiten mit Kennung „app“ im Block boxclass: Login-Karte wie im Cockpit) */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.auth .box { width: 100%; max-width: 420px; }
.auth .box.wide { max-width: 640px; }
.auth .logo-row { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; justify-content: center; }
.auth .logo-row b { font-size: 17px; } .auth .logo-row small { display: block; color: var(--muted); font-size: 12px; }
.auth .foot { text-align: center; margin-top: 14px; font-size: 12px; color: var(--muted); }
.auth .foot a { color: var(--muted); text-decoration: underline; }
.auth > .box.app .logo-row img { border-radius: 10px; }
.auth > .box.app > .card { border-radius: 26px; padding: 26px 26px 22px; }
.auth > .box.app > .card { box-shadow: var(--shadow-lift); } .auth > .box.app > .card ~ .card { box-shadow: var(--shadow); }
.auth > .box.app > .card h2 { font-size: 20px; letter-spacing: -.01em; margin-bottom: 14px; }
@media (max-width: 480px) { .auth > .box.app > .card { padding: 22px 18px 18px; } }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; }
.slots label { display: block; } .slots input { display: none; }
.slots span { display: block; text-align: center; padding: 7px 0; border: 1px solid var(--line-strong); border-radius: var(--field-radius); font-weight: 600; font-size: 13px; cursor: pointer; background: var(--input); }
.slots input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.day-head { font-weight: 700; font-size: 13px; margin: 12px 0 6px; }
/* Rechnung (Dokument, Druck/PDF): bleibt weiß und schlicht – feste Werte statt Tokens */
.invoice { background: #fff; max-width: 820px; margin: 0 auto; padding: 40px 48px; border: 1px solid #E5E5EA; border-radius: 12px; font-size: 13px; color: #1C1C1E;
  box-shadow: 0 6px 20px rgba(60,45,20,.06); }
.invoice .muted { color: #6E6E73; } .invoice .divider { background: #E5E5EA; }
.invoice table { width: 100%; border-collapse: collapse; } .invoice td, .invoice th { padding: 7px 4px; border-bottom: 1px solid #E5E5EA; text-align: left; }
.invoice .r { text-align: right; } .invoice .sum td { border: 0; padding: 3px 4px; } .invoice .total td { font-weight: 800; font-size: 15px; border-top: 2px solid #1C1C1E; }
.kbd { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: var(--input); border: 1px solid var(--line); border-radius: 8px; padding: 2px 7px; word-break: break-all; }
div.kbd { padding: 8px 12px; }
.ok-text { color: var(--green-ink); font-weight: 600; } .err-text { color: var(--red-ink); font-weight: 600; }
@media (max-width: 700px) { .cols-5 > :last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (max-width: 620px) {
  .cols-2, .cols-3, .cols-main { grid-template-columns: minmax(0,1fr); }
  .cols-5 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .page-head .row.wrap { width: 100%; }
  .form-grid[style] { grid-template-columns: minmax(0,1fr) !important; }
  .shots { flex-direction: column; } .shots .m { max-width: 140px; }
  table.tbl { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .seg { flex-wrap: nowrap; }
}
/* Tablet: breite Tabellen (Betreiber) rollen in ihrer Karte statt die ganze Seite waagrecht */
@media (min-width: 621px) and (max-width: 860px) { .card:has(> table.tbl) { overflow-x: auto; } }
/* Ablauf-Leiste auf dem Tablet: alle sieben Stufen in einer waagrecht rollenden Reihe (das angeschnittene letzte Feld zeigt,
   dass es weitergeht) */
@media (max-width: 860px) {
  .flow { grid-template-columns: repeat(7, minmax(118px, 1fr)) !important; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
  .flow::-webkit-scrollbar { display: none; }
  .flow a { scroll-snap-align: start; } .flow a:nth-child(3) { border-right: 1px solid var(--line); } .flow a:last-child { border-right: 0; }
}
/* Handy: Raster mit zwei Spalten wie die Kennzahlen im Cockpit – alle Stufen sichtbar, die letzte (Gewonnen) über die volle Breite */
@media (max-width: 620px) {
  .flow { grid-template-columns: repeat(2, minmax(0,1fr)) !important; overflow: hidden; scroll-snap-type: none; }
  .flow a { border-bottom: 1px solid var(--line); }
  .flow a:nth-child(odd) { border-right: 1px solid var(--line); } .flow a:nth-child(even) { border-right: 0; }
  .flow a:last-child { grid-column: 1 / -1; border-right: 0; border-bottom: 0; }
}

/* ===== Ablagezonen Gewonnen | Verloren unter dem Board (Etappe 9a, rapport) ===== */
.zonen { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 4px; }
.zone { position: relative; display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 16px; border-radius: 22px;
  border: 1.5px dashed color-mix(in srgb, var(--stc) 42%, transparent); background: color-mix(in srgb, var(--stc) 9%, #F6F5EF);
  transition: border-color .15s, background-color .15s, opacity .15s, box-shadow .15s; }
.zone[data-art="verloren"] { background: color-mix(in srgb, var(--stc) 12%, #F2F2EC); }
.zone .zk { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--stc); color: #fff; font-weight: 700; font-size: 16px; }
.zone[data-art="verloren"] .zk { background: #DCE0DA; color: var(--text); }
.zone .zinfo { min-width: 0; }
.zone .zt { font-weight: 600; font-size: 14px; line-height: 1.25; }
.zone .zs { font-size: 12px; color: var(--muted); margin-top: 2px; }
.zone .zs b { color: var(--text); font-variant-numeric: tabular-nums; }
.zone .zs a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.zone:focus { outline: none; }   /* bekommt nach dem Dialog den Fokus (dialog: danach) – nur als Ruhepunkt, nicht bedienbar */
/* Zahlenzeile und Hinweise teilen sich eine Zelle: beim Ziehen wird nur umgeschaltet (visibility) – die Zone ändert ihre Höhe nicht */
.zone .zinfo { display: grid; grid-template-columns: minmax(0, 1fr); }
.zone .zt { grid-area: 1 / 1; } .zone .zs, .zone .zh { grid-area: 2 / 1; min-width: 0; }
.zone .zh { visibility: hidden; margin-top: 2px; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zone .zh-gesperrt { color: var(--text); } .zone .zh-gesperrt::before { content: "🔒\00a0"; }
body.zieht .zone { border-color: color-mix(in srgb, var(--stc) 70%, transparent); }
body.zieht .zone .zs { visibility: hidden; } body.zieht .zone .zh-frei { visibility: visible; }
/* gesperrt: Symbol und Titel blass, der Satz „warum“ bleibt gut lesbar (kein opacity auf der ganzen Zone) */
body.zieht .zone.gesperrt { border-style: dotted; border-color: var(--line-strong); background: #F2F2EC; cursor: not-allowed; }
body.zieht .zone.gesperrt .zk, body.zieht .zone.gesperrt .zt { opacity: .45; }
body.zieht .zone.gesperrt .zh-frei { visibility: hidden; } body.zieht .zone.gesperrt .zh-gesperrt { visibility: visible; }
.zone.ist-ziel, .zone.erfolg { border: 2px solid var(--stc); background: color-mix(in srgb, var(--stc) 15%, #F3F6F1); }
.zone[data-art="verloren"].ist-ziel { border-color: #8E918B; background: #E7E8E2; }
.zone.erfolg { box-shadow: 0 0 0 4px color-mix(in srgb, var(--stc) 22%, transparent); transition: none; }
.zone .delta { position: absolute; top: -8px; left: 44px; font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 6px; pointer-events: none; white-space: nowrap;
  color: color-mix(in srgb, var(--stc) 72%, #000); background: color-mix(in srgb, var(--stc) 14%, #fff); font-variant-numeric: tabular-nums; }
body.zieht #toasts { opacity: .3; pointer-events: none; }   /* Hinweise verdecken beim Ziehen keine Ablagezone */
.lead-card.leuchtet { animation: karte-leuchten .7s ease-out; }
@keyframes karte-leuchten { from { box-shadow: 0 0 0 4px color-mix(in srgb, var(--stc, #EDC142) 55%, transparent), 0 6px 14px rgba(30,30,20,.07); } }
.zonen-platz { display: none; }
@media (min-width: 861px) {
  .board.mit-zonen .col { max-height: calc(100vh - 250px); }   /* Platz für die Zonen: am Desktop ohne Scrollen sichtbar */
  #main:has(> .banner, > .note) .board.mit-zonen .col { max-height: calc(100vh - 300px); }   /* Banner/Meldung oben: Spalten kürzer */
  .zonen { position: sticky; bottom: 12px; z-index: 5; }
  .zone { box-shadow: var(--shadow); }
}
/* rechts neben den Zonen bleibt Platz für die Hinweise (Rückgängig) – so stehen sie auf Höhe der Zonen, nie über dem Board.
   Erst ab 1000 px: Das Raster braucht 200 + 200 + 220 + 2 × 12 = 644 px, #main hat vw − 284 px (mit Rollbalken 17 px weniger).
   Schmaler brechen die Zonen wie am Handy um (auto-fit) und die Hinweise stehen über den Zonen (toastPlatz) */
@media (min-width: 1000px) {
  .zonen { grid-template-columns: repeat(2, minmax(200px, 1fr)) minmax(220px, 360px); }
  .zonen-platz { display: block; min-height: 64px; pointer-events: none; }
}
@media (max-width: 860px) { .board.mit-zonen { min-height: 0; } }   /* Handy: Zonen direkt unter dem Board, im Fluss */
@media (max-width: 620px) { .zone .zh { display: none; } }
/* Touch (Handy, Tablet): anderer Untertitel („gedrückt halten und ziehen“). Ein schmales Fenster mit Maus behält den Desktop-Text. */
.nur-touch { display: none; }
@media (hover: none) { .nur-maus { display: none; } .nur-touch { display: inline; } }

/* ===== Ziehen per Finger/Stift (Etappe 9b, pipeline.html „Ziehen per Finger“) =====
   Langes Drücken auf einen Link: kein iOS-Callout bzw. keine Link-Vorschau, kein grauer Tipp-Blitz. Natives Ziehen und
   Textauswahl sind nur während Druck und Zug aus (fingerdruck/fingerzug) – die Maus zieht weiter per HTML5 (-webkit-user-drag
   auf der Karte selbst würde das abschalten). */
.board .lead-card { -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.lead-card.fingerdruck, body.fingerzug .lead-card { -webkit-user-drag: none; -webkit-user-select: none; user-select: none; }
body.fingerzug, body.fingerzug * { -webkit-user-select: none !important; user-select: none !important; }
.lead-card.landet { visibility: hidden; }   /* bis der Geist auf ihr gelandet ist */
/* Geist unter dem Finger: eigene Ebene ohne Zeiger-Ereignisse (elementFromPoint sieht hindurch), über den Handy-Zonen (905),
   unter den Hinweisen (1000); <dialog> liegt ohnehin in der obersten Ebene. Fläche = Stufe der Karte (data-status der Kopie),
   der Rand zeigt die Stufenfarbe des Ziels (--stc setzt das Skript). */
#zieh-ebene { position: fixed; inset: 0; pointer-events: none; z-index: 910; overflow: hidden; }
.geist { position: absolute; left: 0; top: 0; will-change: transform; }
.geist .lead-card { margin: 0; cursor: grabbing;
  outline: 2px solid color-mix(in srgb, var(--stc, var(--line-strong)) 75%, transparent); outline-offset: 2px;
  box-shadow: 0 22px 40px -10px rgba(20,35,28,.40), 0 8px 16px rgba(20,35,28,.14);
  transition: outline-color .18s, transform .16s cubic-bezier(.2,.8,.2,1); }
/* Handy-Board: Spalten rasten mittig ein (Seitenabstand = (Boardbreite − 84vw) / 2 bei 16 px Rand), beim Ziehen nicht –
   sonst zöge das Einrasten das Board gegen das Rand-Rollen zurück. Der Verlauf rechts nur noch im Rand, nicht über der Spalte.
   Zonen während des Zugs (fingerzug) und bis Dialog/Einsaugen vorbei sind (fingerablage) unten fest, mit Milchglas;
   .zonen-halter hält ihren Platz im Fluss. */
@media (max-width: 860px) {
  .board { scroll-snap-type: x mandatory; padding-left: max(0px, calc(8vw - 16px)); padding-right: max(0px, calc(8vw - 16px)); overscroll-behavior-x: contain; }
  .board .col { scroll-snap-align: center; scroll-snap-stop: always; max-height: none; }
  body.zieht .board { scroll-snap-type: none; }
  .board.rechts-mehr { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 14px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 14px), transparent); }
  body.fingerzug .zonen, body.fingerablage .zonen { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 905; margin: 0; }
  body.fingerzug .zone, body.fingerablage .zone { box-shadow: var(--shadow-lift); background: rgba(248,247,242,.94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
  body.fingerzug .zone.ist-ziel, body.fingerablage .zone.erfolg { background: color-mix(in srgb, var(--stc) 15%, #F3F6F1); }
}
@media (max-width: 620px) {
  body.fingerzug .zonen, body.fingerablage .zonen { gap: 6px; }
  body.fingerzug .zone, body.fingerablage .zone { min-height: 52px; padding: 6px 14px; }
  body.fingerzug .zone .zk, body.fingerablage .zone .zk { width: 30px; height: 30px; font-size: 14px; }
  body.fingerzug .zone .zh { display: block; }   /* Sperrgrund („Erst prüfen und freigeben“) auch am Handy lesbar */
}

/* ===== Dialoge (dialog() in app.js): Fenster wie das Cockpit-Modal, Hintergrund abgedunkelt und unscharf ===== */
.dlg { padding: 0; border: 0; border-radius: 26px; width: min(480px, calc(100vw - 32px)); max-height: calc(100vh - 32px); box-shadow: var(--shadow-lift); color: var(--text);
  background: var(--surface); }
.dlg::backdrop { background: rgba(22,24,22,.28); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.dlg[open] { animation: dlg-ein .18s cubic-bezier(.215,.61,.355,1); }
.dlg[open]::backdrop { animation: blende-ein .12s ease-out; }
@keyframes dlg-ein { from { opacity: 0; transform: translateY(6px) scale(.96); } }
.dlg-box { padding: 22px 22px 18px; margin: 0; }
.dlg h2 { margin: 0 0 6px; font-size: 18px; }
.dlg-text { margin: 0 0 14px; font-size: 13px; color: var(--muted); line-height: 1.45; }
.dlg-fuss { display: flex; justify-content: flex-end; gap: 8px; margin: 18px -22px -18px; padding: 12px 22px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.dlg .btn.success { background: var(--green); border-color: var(--green); color: #fff; } .dlg .btn.success:not(:disabled):hover { background: var(--green-ink); border-color: var(--green-ink); }
.euro-feld { position: relative; max-width: 260px; }
.euro-feld input { font-size: 20px; font-weight: 600; padding: 10px 34px 10px 12px; text-align: right; font-variant-numeric: tabular-nums; }
.euro-feld span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 17px; pointer-events: none; }
.wert-info { min-height: 18px; margin-top: 6px; color: var(--muted); font-variant-numeric: tabular-nums; } .wert-info.fehler { color: var(--red-ink); }
.dlg-hinweis { min-height: 18px; margin-top: 6px; color: var(--muted); }
.gruende { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip { border: 1px solid var(--line-strong); background: rgba(255,255,255,.45); border-radius: 999px; padding: 5px 11px; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--muted);
  transition: background-color .15s, color .15s, border-color .15s; }
.chip:hover { background: var(--hover); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ===== Seitenaufbau (Kopf-Skript in base.html setzt html.glow-ein nur nach einem Klick auf eine andere Seite) =====
   Reine CSS-Animation mit fill „backwards“: Der Inhalt ist nie dauerhaft unsichtbar – auch wenn app.js fehlt oder hängt. */
@keyframes glow-ein { from { opacity: 0; transform: translateY(10px); } }
html.glow-ein #main > :not(.grid):not(.board):not(.banner):not(.note):not(.zonen),
html.glow-ein #main > :is(.grid, .board) > *, html.glow-ein #main > .zonen > .zone {
  animation: glow-ein .36s cubic-bezier(.215,.61,.355,1) backwards; animation-delay: calc(min(var(--gi, 0) + var(--gj, 0), 8) * 45ms); }
#main > :nth-child(2) { --gi: 1; } #main > :nth-child(3) { --gi: 2; } #main > :nth-child(4) { --gi: 3; } #main > :nth-child(5) { --gi: 4; }
#main > :nth-child(6) { --gi: 5; } #main > :nth-child(n+7) { --gi: 6; }
:is(.grid, .board, .zonen) > :nth-child(2) { --gj: 1; } :is(.grid, .board, .zonen) > :nth-child(3) { --gj: 2; } :is(.grid, .board, .zonen) > :nth-child(4) { --gj: 3; }
:is(.grid, .board, .zonen) > :nth-child(5) { --gj: 4; } :is(.grid, .board, .zonen) > :nth-child(n+6) { --gj: 5; }

/* Weniger Bewegung: keine Bewegung, nur kurze Überblendungen (≤ 150 ms), Zahlen springen */
@media (prefers-reduced-motion: reduce) {
  .toast { animation: blende-ein .12s; } .toast .zeit { display: none; } .toast.weg { transform: none; transition: opacity .12s; }
  .dlg[open] { animation: blende-ein .12s; }
  .lead-card { transition: background-color .12s; } .lead-card.leuchtet { animation-duration: .15s; }
  .zone, .zone .zh { transition-duration: .1s; }
  .geist .lead-card { transition: outline-color .12s; }   /* Größe springt, Farbe blendet kurz über */
  html.glow-ein #main * { animation: none !important; }
  .seg.mit-pille > a, .tabs a { transition: none; }
}
@keyframes blende-ein { from { opacity: 0; } }

/* Druck: Seitenleiste, Banner, Hinweise und Bewegung aus, weißer Grund (sonst druckt der Creme-Verlauf mit) */
@media print {
  #sidebar, .no-print, .banner, .note, #toasts { display: none !important; }
  #main { padding: 0; } .invoice { border: 0; box-shadow: none; }
  body { background: #fff; }
  html.glow-ein #main * { animation: none !important; }
}

/* Pipeline „Aufräumen“: Auswahlmodus – wählbare Karten mit Kreis, gewählte mit rotem Rand; andere Spalten treten zurück */
body.aufraeumen .col:not([data-status="neu"]):not([data-status="gescannt"]) { opacity: .45; }
body.aufraeumen .col:is([data-status="neu"], [data-status="gescannt"]) .lead-card { cursor: pointer; position: relative; padding-left: 38px; }
body.aufraeumen .col:is([data-status="neu"], [data-status="gescannt"]) .lead-card::before { content: ""; position: absolute; left: 12px; top: 13px; width: 16px; height: 16px;
  border-radius: 50%; border: 2px solid var(--muted); background: var(--surface); box-sizing: border-box; }
body.aufraeumen .lead-card.gewaehlt { box-shadow: 0 0 0 2px var(--red), 0 6px 14px rgba(30,30,20,.07); }
body.aufraeumen .col:is([data-status="neu"], [data-status="gescannt"]) .lead-card.gewaehlt::before { border-color: var(--red); background: var(--red); box-shadow: inset 0 0 0 3px var(--surface); }
#aufraeumen-an.active { background: var(--text); color: #fff; border-color: var(--text); }
.aufraeum-leiste { position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 900; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  justify-content: center; max-width: calc(100vw - 32px); padding: 10px 14px 10px 18px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-lift); }
.aufraeum-leiste[hidden] { display: none; }
.aufraeum-leiste .al-sub { color: var(--muted); font-size: 12px; }
body.aufraeumen #toasts { bottom: 86px; }
@media (max-width: 860px) { .aufraeum-leiste { bottom: 10px; gap: 8px; width: calc(100vw - 20px); box-sizing: border-box; padding: 10px; } .aufraeum-leiste .al-sub { display: none; } body.aufraeumen .zonen { padding-bottom: 80px; } }
