/* =====================================================================
   cockpit.css — Gestaltung des Cockpits (Paket C2, docs/COCKPIT-BAUPLAN.md §4; J 03.10.2026).
   Werte nach Florians Probeseite v5 (gelesen 03.10.2026 bei 1440 Pixeln): Grundschrift 12,5 px, Beschriftungen
   11,5 px, Titel 20 px, Kennzahlen 22 px; Radien 6 und 10 px; Seitenleiste #FAFAF8, Linien #ECEBE6.
   Schrift lokal aus /brand/fonts (Plus Jakarta Sans). --primaer und --akzent setzt cockpit.js aus der Marke des
   Mandanten (mandanten.marke); die Phasenfarben bleiben fest, damit eine Phase überall gleich aussieht.
   Keine Inline-Styles in der Seite (Sicherheitsrichtlinie im Caddyfile).
   ===================================================================== */
:root {
  --primaer: #0f1115;
  --akzent: #4170ff;
  --akzent-hell: color-mix(in srgb, var(--akzent) 10%, #fff);
  --text: #020314;
  --text-2: #4b4a4f;
  --gedaempft: #8b8a88;
  --sb: #fafaf8;
  --linie: #ecebe6;
  --chip-rand: #e7e6e0;
  --seg: #f1f0eb;
  --hell: #f6f5f2;
  --gruen: #1a9960;
  --rot: #c4372b;
  --weiss: #fff;
  --r: 6px;
  --r-gross: 10px;
  --sb-breite: 252px;
  --schrift: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--schrift); font-size: 12.5px; line-height: 1.45; color: var(--text); background: var(--weiss);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
body.pn-offen { overflow: hidden; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
h1 { font-size: 20px; font-weight: 600; letter-spacing: -.01em; margin: 0; }
h2 { font-size: 15px; font-weight: 600; margin: 0; }
h3 { font-size: 11.5px; font-weight: 500; color: var(--gedaempft); margin: 0 0 6px; }
p { margin: 0; }
.sub { color: var(--text-2); }
.klein { font-size: 11.5px; color: var(--gedaempft); margin-top: 6px; }
.gedaempft { color: var(--gedaempft); }
.fehler { color: var(--rot); margin-top: 8px; }
.fehler:empty, .erfolg:empty { display: none; }
.erfolg { color: var(--gruen); margin-top: 8px; font-weight: 500; }
.noscript { padding: 24px 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ik { width: 16px; height: 16px; flex: none; }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }

/* ---- Knöpfe und Eingaben ----------------------------------------------------------------------------------- */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 14px;
  border: 1px solid var(--chip-rand); border-radius: var(--r); background: var(--weiss); cursor: pointer;
  font-weight: 500; text-decoration: none; white-space: nowrap;
}
.knopf:hover { background: var(--hell); }
.knopf-haupt { background: var(--primaer); border-color: var(--primaer); color: #fff; }
.knopf-haupt:hover { background: var(--primaer); filter: brightness(1.18); }
.knopf:disabled { opacity: .42; cursor: not-allowed; filter: none; }
.knopf-breit { width: 100%; height: 38px; }
.knopf-s {
  height: 26px; padding: 0 10px; border: 1px solid #e5e4de; border-radius: var(--r); background: var(--weiss);
  cursor: pointer; font-weight: 500; font-size: 12px;
}
.knopf-s:hover:not(:disabled) { background: var(--hell); }
.knopf-s:disabled { opacity: .42; cursor: default; }
.knopf-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex: none;
  border: 0; border-radius: var(--r); background: transparent; color: var(--text-2); cursor: pointer;
}
.knopf-icon:hover { background: var(--seg); color: var(--text); }
input[type=email], input[type=password], input[type=search] {
  height: 34px; padding: 0 11px; border: 1px solid var(--chip-rand); border-radius: var(--r); background: var(--weiss);
  font-size: 13px; min-width: 0;
}
input:focus { outline: none; border-color: var(--akzent); box-shadow: 0 0 0 3px var(--akzent-hell); }
.chip {
  height: 28px; padding: 0 10px; border: 1px solid var(--chip-rand); border-radius: var(--r); background: var(--weiss);
  font-size: 12px; color: var(--text-2); display: inline-flex; align-items: center; white-space: nowrap;
}
select.chip {
  appearance: none; -webkit-appearance: none; padding-right: 26px; cursor: pointer;
  background: var(--weiss) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%238b8a88' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 8px center / 12px 12px;
}
select.chip:hover { border-color: #dddcd5; color: var(--text); }
.seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: var(--r); background: var(--seg); }
.seg-k {
  height: 24px; padding: 0 10px; border: 0; border-radius: 5px; background: transparent; color: var(--text-2);
  cursor: pointer; font-size: 12px; font-weight: 500; white-space: nowrap;
}
.seg-k.an { background: var(--weiss); color: var(--text); box-shadow: 0 1px 2px rgba(2, 3, 20, .08); }
.seg-dunkel { background: rgba(255, 255, 255, .12); }
.seg-dunkel .seg-k { color: rgba(255, 255, 255, .78); }
.seg-dunkel .seg-k.an { background: #fff; color: var(--text); }

/* ---- Seiten ohne Konto: Anmeldung, Demo-Tor, Wartung ------------------------------------------------------- */
.mitte { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: var(--sb); }
.karte-mitte {
  width: 100%; max-width: 400px; padding: 28px 26px; background: var(--weiss); border: 1px solid var(--linie);
  border-radius: var(--r-gross); box-shadow: 0 1px 2px rgba(2, 3, 20, .04);
}
.karte-mitte h1 { margin-bottom: 6px; }
.karte-mitte .sub + .sub { margin-top: 8px; }
.karte-mitte > .knopf { margin-top: 18px; }
.karte-mitte .klein { margin-top: 18px; }
.marke-logo img { display: block; height: 26px; width: auto; margin-bottom: 18px; }
.marke-logo:empty { display: none; }
.zeile-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.zeile-form input { flex: 1 1 180px; }
.spalte-form { display: flex; flex-direction: column; gap: 6px; margin-top: 18px; }
.spalte-form label { font-size: 11.5px; font-weight: 500; color: var(--gedaempft); }
.spalte-form .knopf { margin-top: 6px; height: 36px; }

/* ---- Gerüst ------------------------------------------------------------------------------------------------ */
.app { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
.demo-leiste {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px;
  padding: 6px 16px; background: var(--text); color: #fff; font-size: 12px;
}
.demo-marke { display: inline-flex; align-items: center; gap: 8px; }
/* Vorschau für Operatoren (C3): eigenes Band, damit niemand sie mit der Vorführung oder dem echten Zugang verwechselt */
.vorschau-leiste { background: #8a4b08; }
.vorschau-hinweis { font-weight: 600; }
.demo-marke-t { color: rgba(255, 255, 255, .6); }
.rahmen { flex: 1; display: flex; min-height: 0; }
.hb-huelle { flex: 1; min-width: 0; overflow-y: auto; display: flex; flex-direction: column; }
.hb { flex: 1 0 auto; padding: 14px 28px 40px; max-width: 1280px; }
/* Fußzeile mit Impressum und Datenschutz auf jeder Seite (J 05.10.2026): auf kurzen Seiten unten am Fenster,
   auf langen nach dem Inhalt; Linie so breit wie der Inhalt des Hauptbereichs */
.hb-fuss {
  flex: none; max-width: calc(1280px - 56px); margin: 0 28px; padding: 12px 0 16px; border-top: 1px solid var(--linie);
  font-size: 11.5px; color: var(--gedaempft);
}
.hb-fuss a { text-decoration: none; }
.hb-fuss a:hover { color: var(--text); text-decoration: underline; }
/* Stellen mit Tabelle oder Board nutzen breite Fenster (J 05.10.2026: rechts blieb Platz frei, das Board lief über) */
.hb-weit .hb { max-width: 1680px; }
.hb-weit .hb-fuss { max-width: calc(1680px - 56px); }
.kopf-mobil, .sb-hinter { display: none; }

/* ---- Seitenleiste ------------------------------------------------------------------------------------------ */
.sb {
  width: var(--sb-breite); flex: none; display: flex; flex-direction: column; padding: 12px 10px 10px;
  background: var(--sb); border-right: 1px solid var(--linie); overflow-y: auto;
}
.sb-kopf { display: flex; align-items: center; gap: 9px; padding: 2px 6px 12px; }
.sb-logo {
  width: 28px; height: 28px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 7px; background: var(--primaer); color: #fff; font-weight: 600;
}
.sb-titel { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sb-firma, .sb-marke { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-firma { font-weight: 600; }
.sb-marke { color: var(--gedaempft); font-size: 11px; }
.sb-ich { border: 0; cursor: pointer; }
.sb-such { display: block; padding: 0 2px 8px; }
.sb-such input { width: 100%; height: 30px; font-size: 12.5px; }
.sb-liste { list-style: none; margin: 0; padding: 0; }
.sb-punkt {
  display: flex; align-items: center; gap: 8px; min-height: 28px; padding: 4px 8px; border-radius: var(--r);
  color: var(--text-2); text-decoration: none;
}
.sb-punkt:hover { background: var(--seg); color: var(--text); }
.sb-punkt.an { background: var(--weiss); color: var(--text); font-weight: 500; box-shadow: 0 0 0 1px var(--linie); }
.sb-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-zahl { color: var(--gedaempft); font-size: 11.5px; font-weight: 400; font-variant-numeric: tabular-nums; }
.sb-gr { margin: 16px 8px 4px; font-size: 11px; font-weight: 500; color: var(--gedaempft); }
.sb-stelle { color: var(--text); font-weight: 500; }
.sb-stelle.pausiert { color: var(--gedaempft); font-weight: 400; }
.sb-phasen { list-style: none; margin: 2px 0 6px 13px; padding: 0 0 0 8px; border-left: 1px solid var(--linie); }
.sb-phasen .sb-punkt { min-height: 26px; padding: 3px 8px; font-weight: 400; }
.sb-phasen .sb-punkt.an { background: var(--akzent-hell); box-shadow: none; color: var(--text); font-weight: 500; }
.sb-leer { padding: 4px 8px; color: var(--gedaempft); }
.sb-fuss { margin-top: auto; display: flex; align-items: center; gap: 9px; padding: 12px 6px 2px; border-top: 1px solid var(--linie); }
.sb > .sb-liste:last-of-type { margin-bottom: 16px; }
.sb-fuss-t { min-width: 0; display: flex; flex-direction: column; }
.sb-fuss-t b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-fuss-t small { color: var(--gedaempft); font-size: 11px; }

.avatar {
  width: 26px; height: 26px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--seg); color: var(--text-2); font-size: 10.5px; font-weight: 600; letter-spacing: .02em;
}
.avatar-k { width: 22px; height: 22px; font-size: 9.5px; background: var(--akzent-hell); color: var(--akzent); }
.avatar-g { width: 40px; height: 40px; font-size: 14px; }

/* ---- Phasen und Herkunft ----------------------------------------------------------------------------------- */
.ph { display: inline-block; width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--gedaempft); }
.ph-neu { background: #9a99a0; }
.ph-kontakt { background: #4170ff; }
.ph-erstgespraech { background: #7b61ff; }
.ph-profil { background: #e09a2b; }
.ph-vorstellung { background: #1a9960; }
.ph-zweitgespraech { background: #0f9fb0; }
.ph-angebot { background: #e2700d; }
.ph-eingestellt { background: #0b6b45; }
.ph-abgesagt { background: #c9c8c3; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px 0 8px; border: 1px solid var(--chip-rand);
  border-radius: 999px; background: var(--weiss); font-size: 11.5px; font-weight: 500; white-space: nowrap;
}
.pill-abgesagt { color: var(--gedaempft); }
.quelle { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); white-space: nowrap; }
.q {
  width: 18px; height: 18px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 5px; background: var(--seg); color: var(--text-2); font-size: 10px; font-weight: 600;
}
.q-heyflow { background: #e8eeff; color: #2f55d4; }
.q-chat { background: #e3f5ec; color: #1a7f50; }
.q-bewerbung_v1 { background: #fff1e0; color: #b4610a; }
.q-pool { background: #f1ebff; color: #6a4fd8; }

/* ---- Kopf der Stelle und Kacheln --------------------------------------------------------------------------- */
.hb-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; min-height: 30px; margin-bottom: 14px; }
.krumen { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--gedaempft); }
.krumen span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.krumen b { color: var(--text); font-weight: 500; white-space: nowrap; }
.krumen-t { color: #d6d5cf; }
.hb-rechts { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.live { display: inline-flex; align-items: center; gap: 7px; color: var(--gruen); font-size: 12px; font-weight: 500; white-space: nowrap; }
.live-punkt { width: 7px; height: 7px; border-radius: 50%; background: var(--gruen); box-shadow: 0 0 0 3px rgba(26, 153, 96, .16); }
.live.pausiert { color: var(--gedaempft); }
.live.pausiert .live-punkt { background: #c9c8c3; box-shadow: none; }
.hb-titel { margin-bottom: 16px; }
.hb-titel .sub { margin-top: 3px; }
.hb-titel select.chip { margin-left: 4px; }
.kacheln { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--linie); border-radius: var(--r-gross); }
.kpi small { font-size: 11.5px; font-weight: 500; color: var(--gedaempft); }
.kpi b { font-size: 22px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.kpi-sub { min-height: 1.45em; font-size: 11.5px; color: var(--gedaempft); }

/* ---- Werkzeugleiste, Tabelle, Board ------------------------------------------------------------------------ */
.tb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 30px; margin-bottom: 10px; }
.tb-rechts { display: flex; align-items: center; gap: 10px; margin-left: auto; color: var(--gedaempft); }
.liste { transition: opacity .15s; }
.liste.laedt { opacity: .55; }
.tab-huelle { overflow-x: auto; border: 1px solid var(--linie); border-radius: var(--r-gross); }
.tab { width: 100%; border-collapse: collapse; }
.tab th {
  padding: 9px 12px; border-bottom: 1px solid var(--linie); background: var(--weiss); text-align: left;
  font-size: 11.5px; font-weight: 500; color: var(--gedaempft); white-space: nowrap;
}
.tab td { padding: 8px 12px; border-bottom: 1px solid var(--linie); white-space: nowrap; vertical-align: middle; }
.tab tbody tr:last-child td { border-bottom: 0; }
.tab .rechts { text-align: right; font-variant-numeric: tabular-nums; }
.zeile { cursor: pointer; }
.zeile:hover td { background: var(--hell); }
.zeile.gewaehlt td { background: var(--akzent-hell); }
.name-zelle { display: inline-flex; align-items: center; gap: 9px; }
.td-name a { font-weight: 500; text-decoration: none; }
.td-name a:hover { text-decoration: underline; }
.zust { display: inline-flex; align-items: center; gap: 6px; }
.board { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
/* Läuft Board oder Tabelle doch über (schmales Fenster, viele Phasen): dünner, heller Balken statt des breiten grauen
   (J 05.10.2026); dunkler, sobald die Maus darüber steht */
.board, .tab-huelle { scrollbar-width: thin; scrollbar-color: var(--chip-rand) transparent; }
.board:hover, .tab-huelle:hover { scrollbar-color: #c9c8c1 transparent; }
/* Spalten teilen sich die Breite und werden bis 150 Pixel schmal, erst dann läuft das Board über (J 05.10.2026) */
.spalte { flex: 1 1 0; min-width: 150px; min-height: 120px; display: flex; flex-direction: column; gap: 6px; padding: 8px; background: var(--sb); border: 1px solid var(--linie); border-radius: var(--r-gross); }
.spalte header { display: flex; align-items: center; gap: 7px; padding: 2px 4px 4px; }
.spalte header b { flex: 1; font-weight: 600; }
/* „Abgesagt“ eingeklappt (J 05.10.2026): schmale Leiste mit Punkt, Zahl und senkrechtem Titel; Klick klappt auf */
.spalte-zu { flex: none; width: 40px; min-width: 0; align-items: center; gap: 8px; padding: 11px 0; color: var(--text-2); text-align: center; cursor: pointer; }
.spalte-zu:hover { background: var(--seg); color: var(--text); }
.spalte-zu-t { writing-mode: vertical-rl; font-weight: 600; white-space: nowrap; }
.spalte-einklappen { width: 22px; height: 22px; margin: -3px -4px -3px 0; }
.spalte-einklappen .ik { width: 14px; height: 14px; }
.bkarte { display: flex; flex-direction: column; gap: 3px; padding: 9px 10px; background: var(--weiss); border: 1px solid var(--linie); border-radius: 8px; text-decoration: none; }
.bkarte:hover { border-color: #dddcd5; box-shadow: 0 1px 3px rgba(2, 3, 20, .06); }
.bkarte.gewaehlt { border-color: var(--akzent); }
.bkarte b { font-weight: 500; }
/* Nächster Schritt (C8b, J 05.10.2026): wer ist dran; „Sie“ in der Farbe der Marke, rot bei Verzug */
.schritt { font-size: 12px; color: var(--text-2); }
.schritt b { font-weight: 500; color: var(--text); }
.schritt-sie b { color: var(--akzent); }
.schritt.f-rot, .schritt.f-rot b { color: var(--rot); }
.bkarte-schritt { margin-top: 2px; line-height: 1.35; }
/* die Spalte bricht um, damit die Tabelle bei 1366 Pixeln nicht überläuft */
.tab td.td-schritt { white-space: normal; min-width: 150px; max-width: 230px; line-height: 1.35; }
.pn-schritt { margin: 6px 0 0; font-size: 12px; }
/* Kontaktstand (C8c): ohne Wortlaut; abgemeldet in Rot */
.pn-kontaktstand { margin: 3px 0 0; font-size: 12px; color: var(--text-2); }
.pn-kontaktstand.warn { color: var(--rot); }
.phase-seit { display: block; margin-top: 3px; font-size: 11px; color: var(--gedaempft); }
/* Kacheln als Filter (C8b) */
.kpi-knopf { text-align: left; background: var(--weiss); font: inherit; color: inherit; cursor: pointer; }
.kpi-knopf:hover { border-color: #dddcd5; }
.kpi-knopf.an { border-color: var(--akzent); box-shadow: 0 0 0 1px var(--akzent); }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; }
.chip-weg { border: 0; background: none; padding: 0 2px; font-size: 14px; line-height: 1; color: var(--gedaempft); cursor: pointer; }
.chip-weg:hover { color: var(--text); }
.bkarte-fuss { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 6px; margin-top: 4px; font-size: 11.5px; }
/* Zeitangabe am Stück; passt sie nicht neben die Quelle, rutscht sie rechtsbündig in die nächste Zeile */
.bkarte-fuss > :last-child { margin-left: auto; white-space: nowrap; }
.leer-klein { margin: 4px; font-size: 11.5px; color: var(--gedaempft); }
.tf { display: flex; align-items: center; justify-content: space-between; padding: 10px 2px; color: var(--gedaempft); }
.tf-knoepfe { display: flex; gap: 6px; }
.leer { padding: 24px 0; color: var(--gedaempft); }
.leer-karte { padding: 28px 20px; border: 1px dashed var(--chip-rand); border-radius: var(--r-gross); text-align: center; }
.leer-karte .sub { margin-top: 4px; }

/* ---- Detail je Bewerber ------------------------------------------------------------------------------------ */
.pn-hinter { position: fixed; inset: 0; z-index: 40; display: flex; justify-content: flex-end; background: rgba(2, 3, 20, .16); }
.pn {
  width: min(540px, 100%); height: 100%; display: flex; flex-direction: column; background: var(--weiss);
  box-shadow: -8px 0 30px rgba(2, 3, 20, .12); outline: none;
}
.pn-kopf { display: flex; align-items: flex-start; gap: 12px; padding: 18px 18px 12px; }
.pn-kopf > .sub, .pn-kopf > .fehler { flex: 1; margin: 6px 0 0; }
.pn-name { flex: 1; min-width: 0; }
.pn-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.pn-name .sub { margin-top: 4px; }
.pn-name .klein { margin-top: 2px; }
.pn-zu { margin: -4px -6px 0 0; }
.pn-kontakt { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 0 18px 12px 70px; }
.pn-kontakt a { color: var(--akzent); font-weight: 500; text-decoration: none; }
.pn-kontakt a:hover { text-decoration: underline; }
.reiterleiste { display: flex; gap: 2px; padding: 0 14px; border-bottom: 1px solid var(--linie); overflow-x: auto; }
.reiter {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: -1px; padding: 9px 10px; border: 0;
  border-bottom: 2px solid transparent; background: none; color: var(--gedaempft); cursor: pointer; font-weight: 500; white-space: nowrap;
}
.reiter:hover { color: var(--text); }
.reiter.an { color: var(--text); border-bottom-color: var(--text); }
.pn-inhalt { flex: 1; overflow-y: auto; padding: 16px 18px 18px; }
.pn-block { margin-bottom: 18px; }
.pn-lead { margin-bottom: 16px; font-size: 14px; font-weight: 500; }
.fliess { white-space: pre-line; }
.pn-fuss { padding: 12px 18px 16px; border-top: 1px solid var(--linie); }
.pn-fuss .klein, .pn-fuss .erfolg, .pn-fuss .stand { text-align: center; }
.pn-fuss .erfolg { margin: 0; }
/* C4 (0368): Stand in einer Zeile über „Rückmeldung geben“ */
.stand { margin: 0 0 10px; font-weight: 500; color: var(--text-2); }
.stand.gut { color: var(--gruen); }
.pn-fuss .stand:last-child { margin-bottom: 0; }
.pn-fuss .klein + .knopf { margin-top: 10px; }
.verlauf { list-style: none; margin: 0; padding: 0; }
.verlauf li { position: relative; display: grid; grid-template-columns: 14px 1fr auto; align-items: baseline; gap: 10px; padding: 6px 0; }
.verlauf li::before { content: ""; position: absolute; left: 3px; top: 0; bottom: 0; width: 1px; background: var(--linie); }
.verlauf li:first-child::before { top: 12px; }
.verlauf li:last-child::before { bottom: calc(100% - 12px); }
.vl-punkt { position: relative; z-index: 1; width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: #c9c8c3; }
.vl-an_bewerber .vl-punkt { background: var(--akzent); }
.vl-vom_bewerber .vl-punkt { background: var(--gruen); }
.vl-termin .vl-punkt { background: #7b61ff; }
.vl-phase .vl-punkt { background: var(--text); }
.vl-einladung .vl-punkt { background: var(--gruen); }
.vl-rueckmeldung .vl-punkt { background: #e09a2b; }
.vl-zeit { font-size: 11.5px; color: var(--gedaempft); white-space: nowrap; }
.termine { list-style: none; margin: 0; padding: 0; }
.termine li { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-bottom: 6px; padding: 8px 10px; border: 1px solid var(--linie); border-radius: 8px; }
/* C4 (0368): Gespräch bei Ihnen, mit Terminvorschlag, Eintragen, Verschieben und Absagen */
.termin-box { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border: 1px solid var(--linie); border-radius: 8px; background: var(--sb); }
.termin-box.steht { background: color-mix(in srgb, var(--gruen) 6%, #fff); border-color: color-mix(in srgb, var(--gruen) 25%, #fff); }
.termin-box b { font-weight: 600; }
.termin-box .klein { margin-top: 2px; }
.termin-knoepfe { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.knopf-s-haupt { background: var(--primaer); border-color: var(--primaer); color: #fff; }
.knopf-s-haupt:hover:not(:disabled) { background: var(--primaer); filter: brightness(1.18); }

/* ---- Auswertung und Unternehmen ---------------------------------------------------------------------------- */
.kz, .module, .team { list-style: none; margin: 0; padding: 0; border: 1px solid var(--linie); border-radius: var(--r-gross); max-width: 760px; }
.kz-zeile, .module li, .team li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--linie); }
.kz-zeile:last-child, .module li:last-child, .team li:last-child { border-bottom: 0; }
.kz-zeile b { font-variant-numeric: tabular-nums; }
/* Auswertung (C8a, J 05.10.2026): Überschriften der Blöcke und Hinweis auf fehlende Rückmeldungen */
.aw-titel { font-size: 13px; font-weight: 600; margin: 22px 0 10px; }
.aw-hinweis { max-width: 760px; margin: 14px 0 0; padding: 10px 14px; border: 1px solid var(--linie); border-radius: var(--r); background: var(--hell); }
.aw-hinweis a { color: var(--akzent); }
.modul-t { display: flex; flex-direction: column; gap: 2px; }
.modul-t b { font-weight: 500; }
.modul-stand { font-size: 11.5px; font-weight: 500; white-space: nowrap; }
.module li.an .modul-stand { color: var(--gruen); }
.module li.aus, .module li.aus .modul-stand { color: var(--gedaempft); }
.hb > .pn-block { max-width: 760px; }

/* ---- Dialoge ----------------------------------------------------------------------------------------------- */
.dlg-schicht { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(2, 3, 20, .32); }
.dlg { width: 100%; max-width: 420px; padding: 20px; background: var(--weiss); border-radius: 12px; box-shadow: 0 20px 50px rgba(2, 3, 20, .2); }
.dlg h2 { margin-bottom: 8px; }
.dlg .sub { margin-bottom: 16px; }
.dlg-knoepfe { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.dlg .fehler { margin: -6px 0 12px; }
/* C4 (0368): Felder wie frage() im Portal (Datum, ganzer Satz, Pflicht-Haken) und die Auswahl der Rückmeldung */
.dlg { max-height: calc(100vh - 32px); overflow-y: auto; }
.dlg-felder { display: flex; flex-direction: column; gap: 12px; margin: -4px 0 16px; }
.dlg-feld { display: flex; flex-direction: column; gap: 5px; }
.dlg-feld > span { font-size: 11.5px; font-weight: 500; color: var(--gedaempft); }
.dlg-feld textarea, .dlg-feld input {
  width: 100%; padding: 8px 11px; border: 1px solid var(--chip-rand); border-radius: var(--r); background: var(--weiss);
  font: inherit; font-size: 13px; color: inherit;
}
.dlg-feld textarea { min-height: 72px; resize: vertical; }
.dlg-feld input { height: 36px; }
.dlg-feld textarea:focus { outline: none; border-color: var(--akzent); box-shadow: 0 0 0 3px var(--akzent-hell); }
.dlg-haken { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; line-height: 1.45; }
.dlg-haken input { width: 16px; height: 16px; margin: 1px 0 0; flex: none; }
.dlg-wahl { display: flex; flex-direction: column; gap: 6px; margin: -4px 0 16px; }
.wahl {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 36px; padding: 6px 12px;
  border: 1px solid var(--chip-rand); border-radius: var(--r); background: var(--weiss); cursor: pointer; text-align: left; font-weight: 500;
}
.wahl:hover { background: var(--hell); }
.wahl.an { border-color: var(--akzent); background: var(--akzent-hell); }
.wahl small { font-size: 11px; font-weight: 500; color: var(--akzent); }
.wahl-zurueck { justify-content: center; border-style: dashed; color: var(--text-2); font-weight: 400; }

/* ---- Meine Aufgaben (C4, 0368): Ampel wie die Startseite des Portals ------------------------------------------- */
.aufgaben { list-style: none; margin: 0; padding: 0; max-width: 860px; border: 1px solid var(--linie); border-radius: var(--r-gross); }
.aufgaben li + li { border-top: 1px solid var(--linie); }
.aufgabe { display: flex; align-items: flex-start; gap: 12px; padding: 11px 14px; text-decoration: none; }
.aufgabe:hover { background: var(--hell); }
.aufgabe-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.aufgabe-t b { font-weight: 600; }
.aufgabe-los { flex: none; display: inline-flex; align-items: center; }
.ampel { width: 10px; height: 10px; flex: none; margin-top: 4px; border-radius: 50%; background: var(--akzent); }
.ampel-rot { background: var(--rot); }
.ampel-gelb { background: #e09a2b; }
.ampel-gruen { background: var(--gruen); }
.ampel-blau { background: var(--akzent); }
#sb-aufgaben-zahl:not(:empty) {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--rot); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 600;
}

/* ---- Posteingang, Nachrichten, Bericht, Kurve (C5, 0369) --------------------------------------------------------- */
a.knopf-s, .knopf-link { display: inline-flex; align-items: center; text-decoration: none; }
#sb-post-zahl:not(:empty) {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--akzent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 600;
}
.kpi-kurve:empty { display: none; }
.kurve { display: block; width: 100%; max-width: 160px; height: 20px; margin-top: 6px; }
.kurve-saeule { fill: color-mix(in srgb, var(--akzent) 26%, #fff); }
.kurve-jetzt { fill: var(--akzent); }
.post-raster { display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); gap: 14px; align-items: start; max-width: 1100px; }
.post-liste { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.post-faeden { list-style: none; margin: 0; padding: 0; border: 1px solid var(--linie); border-radius: var(--r-gross); overflow: hidden; }
.post-faeden li + li { border-top: 1px solid var(--linie); }
.post-eintrag { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; text-decoration: none; }
.post-eintrag:hover { background: var(--hell); }
.post-eintrag.an { background: var(--akzent-hell); }
.post-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.post-kopf b { font-weight: 600; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-kopf .gedaempft { flex: none; font-size: 11.5px; }
.post-vorschau { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-fuss { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.post-fuss .klein { margin: 0; }
.post-neu-zahl { margin-left: auto; padding: 1px 7px; border-radius: 999px; background: var(--akzent); color: #fff; font-size: 10.5px; font-weight: 600; }
.post-faden { min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--linie); border-radius: var(--r-gross); }
.post-faden[hidden] { display: none; }
.post-faden > .sub, .post-faden > .fehler, .post-faden > .leer-karte { margin: 16px; }
.post-faden > .leer-karte { border: 0; }
.post-faden-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 14px; border-bottom: 1px solid var(--linie); }
.post-titel { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.post-titel b { font-size: 13.5px; font-weight: 600; }
.post-zurueck { display: none; }
.post-leer { padding: 16px 14px; }
.post-faden .blasen { max-height: 52vh; overflow-y: auto; padding: 14px; }
.blasen { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.blase { max-width: 82%; display: flex; flex-direction: column; gap: 4px; padding: 8px 11px; border-radius: 10px; }
.blase-team { align-self: flex-start; background: var(--hell); border-bottom-left-radius: 3px; }
.blase-kunde { align-self: flex-end; background: var(--akzent-hell); border-bottom-right-radius: 3px; }
.blase-text { white-space: pre-line; overflow-wrap: anywhere; }
.blase-fuss { font-size: 11px; color: var(--gedaempft); }
.pn-block .blasen { margin-bottom: 4px; }
.post-schreiben { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 14px; border-top: 1px solid var(--linie); }
.post-schreiben textarea, .notiz-schreiben textarea {
  width: 100%; min-height: 84px; padding: 8px 11px; border: 1px solid var(--chip-rand); border-radius: var(--r); background: var(--weiss);
  font: inherit; font-size: 13px; color: inherit; resize: vertical;
}
.post-schreiben textarea:focus, .notiz-schreiben textarea:focus { outline: none; border-color: var(--akzent); box-shadow: 0 0 0 3px var(--akzent-hell); }
/* 0383 (C8e, C8h): Notizen des Kunden und Stand vom Recruiter */
.notiz-schreiben { display: flex; flex-direction: column; gap: 8px; }
.notiz-schreiben .fehler { margin: 0; }
.notiz-schreiben .post-knoepfe .knopf-s { flex-shrink: 0; white-space: nowrap; }
.notizen { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.notiz { padding: 9px 11px; border: 1px solid var(--linie); border-radius: var(--r); }
.notiz .fliess { margin: 0 0 4px; overflow-wrap: anywhere; }
.notiz-fuss { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0; }
.notiz-weg { padding: 0; border: 0; background: none; color: var(--gedaempft); cursor: pointer; font: inherit; text-decoration: underline; }
.notiz-weg:hover { color: var(--rot); }
.stand-team { padding: 10px 12px; border-radius: var(--r); background: var(--hell); }
.stand-team h3 { margin-top: 0; }
.stand-team .klein { margin: 4px 0 0; }
.post-schreiben .fehler { margin: 0; }
.post-knoepfe { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.post-knoepfe .klein { margin: 0 auto 0 0; }
.bericht { max-width: 900px; }
.bericht-kopf { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; margin-bottom: 14px; }
.bericht-kopf h2 { margin-top: 2px; font-size: 18px; }
.bericht-kopf .sub { margin-top: 2px; }
.bericht-huelle { overflow-x: auto; border: 1px solid var(--linie); border-radius: var(--r-gross); }
.bericht-tab { width: 100%; border-collapse: collapse; }
/* Trichter je Quelle (C8d): Anteil klein unter der Zahl, Absagen als Liste darunter */
.quellen-tab small.anteil { display: block; font-size: 10.5px; color: var(--gedaempft); }
.quellen-tab th[scope="row"] { white-space: nowrap; }
.absagen-quelle { margin-top: 10px; }
.absagen-quelle ul { margin: 4px 0 0; padding-left: 16px; font-size: 12px; color: var(--text-2); }
.bericht-tab th, .bericht-tab td { padding: 8px 12px; border-bottom: 1px solid var(--linie); text-align: left; white-space: nowrap; }
.bericht-tab thead th { font-size: 11.5px; font-weight: 500; color: var(--gedaempft); }
.bericht-tab tbody th { font-weight: 500; }
.bericht-tab tbody tr:last-child th, .bericht-tab tbody tr:last-child td { border-bottom: 0; }
.bericht-tab .rechts { text-align: right; font-variant-numeric: tabular-nums; }
.balken-zelle { width: 38%; min-width: 110px; }
.balken { display: block; width: 100%; height: 8px; }
.balken-grund { fill: var(--seg); }
.balken-fuell { fill: var(--akzent); }
.bericht-spalten { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.bericht-fuss { margin-top: 4px; }

/* Bis 1500 Pixel (Laptop) ohne „Verantwortlich“ und „Eingang“, beides steht im Detail; sonst liefe die Tabelle mit der
   Spalte „Nächster Schritt“ (C8b, 05.10.2026) bei 1366 Pixeln über. Am Handy gilt die Kartenansicht weiter unten. */
@media (min-width: 861px) and (max-width: 1500px) {
  .tab [data-k="Verantwortlich"], .tab [data-k="Eingang"] { display: none; }
}

/* ---- Mittlere Breite ----------------------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .hb { padding: 14px 20px 36px; }
  .hb-fuss { margin: 0 20px; }
  .kacheln { gap: 10px; }
}

/* ---- Handy und schmale Fenster: Seitenleiste als Überlagerung, Tabelle als Karten, Detail ganzseitig ---------- */
@media (max-width: 860px) {
  .sb {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 50; width: min(300px, 86vw);
    transform: translateX(-100%); transition: transform .2s ease;
  }
  .menu-offen .sb { transform: none; box-shadow: 8px 0 30px rgba(2, 3, 20, .15); }
  .menu-offen .sb-hinter { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(2, 3, 20, .25); }
  .kopf-mobil {
    position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; padding: 8px 12px;
    background: var(--weiss); border-bottom: 1px solid var(--linie);
  }
  .kopf-mobil b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hb { padding: 12px 16px 32px; }
  .hb-fuss { margin: 0 16px; }
  .hb-top { margin-bottom: 10px; }
  .hb-top .krumen { display: none; }
  .kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi { padding: 10px 12px; }
  .kpi b { font-size: 20px; }
  .tb-rechts { width: 100%; margin-left: 0; justify-content: space-between; }
  .tab-huelle { overflow: visible; border: 0; }
  .tab thead { display: none; }
  .tab, .tab tbody, .tab td { display: block; width: 100%; }
  .tab tr { display: flex; flex-wrap: wrap; align-items: center; margin-bottom: 8px; padding: 10px 12px; border: 1px solid var(--linie); border-radius: var(--r-gross); }
  .tab td { padding: 2px 0; border: 0; white-space: normal; }
  .tab tbody tr:last-child td { border: 0; }
  .tab td[data-k] { order: 2; display: flex; justify-content: space-between; gap: 12px; color: var(--text-2); text-align: right; }
  .tab td[data-k]::before { content: attr(data-k); color: var(--gedaempft); text-align: left; }
  .tab td[data-k="Verantwortlich"] { display: none; }
  .tab .td-name { flex: 1; width: auto; min-width: 0; padding-bottom: 6px; }
  .tab .td-status { order: 1; width: auto; padding-bottom: 6px; }
  .zeile:hover td, .zeile.gewaehlt td { background: none; }
  .zeile.gewaehlt { border-color: var(--akzent); }
  .pn { width: 100%; box-shadow: none; }
  .pn-kontakt { padding-left: 18px; }
  .kz-zeile { align-items: flex-start; }
  /* C5: Posteingang zeigt am Handy entweder die Liste oder den geöffneten Faden */
  .post-raster { grid-template-columns: minmax(0, 1fr); }
  .post-raster.mit-faden .post-liste, .post-raster:not(.mit-faden) .post-faden { display: none; }
  .post-zurueck { display: inline-flex; }
  .post-faden-kopf > a:last-child { margin-left: auto; }
  .post-titel { order: 3; flex-basis: 100%; }
  .post-faden .blasen { max-height: none; }
  .bericht-spalten { grid-template-columns: minmax(0, 1fr); }
  .bericht-tab th, .bericht-tab td { padding: 7px 8px; }
  .bericht-tab th { white-space: normal; }
  .balken-zelle, .bericht-tab thead th:last-child { display: none; }
  .quellen-tab thead th:last-child { display: table-cell; }
}

/* ---- Druck: der Bericht als Seite (C5); im Browser „Als PDF speichern“ -------------------------------------------- */
@media print {
  @page { margin: 14mm; }
  body { font-size: 10.5pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sb, .sb-hinter, .kopf-mobil, .demo-leiste, .hb-bericht .hb-top, .hb-bericht .hb-titel, .bericht-tb, .dlg-schicht, .hb-fuss { display: none !important; }
  .app, .rahmen, .hb-huelle { display: block; height: auto; overflow: visible; }
  .hb { max-width: none; padding: 0; }
  .bericht { max-width: none; }
  .kpi, .bericht-huelle, .kz, .pn-block { break-inside: avoid; }
}
