/* Oberfläche des CRM, nach dem Claude-Design-Entwurf vom 22.10.2026
   (https://claude.ai/artifact/NFNVdpCt8FHkSkC9DDJ5yV): Dunkelblau mit Messing wie die Verkaufsseite.
   Keine Inline-Styles: die CSP erlaubt nur dieses Stylesheet. */
@font-face { font-family: "Source Serif 4"; font-weight: 700; font-display: swap; src: url("fonts/SourceSerif4-Bold.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 400; font-display: swap; src: url("fonts/SourceSans3-Regular.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 400; font-style: italic; font-display: swap; src: url("fonts/SourceSans3-It.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 600; font-display: swap; src: url("fonts/SourceSans3-Semibold.woff2") format("woff2"); }

:root {
  --ink: #1b2a36; --text: #3d4b56; --muted: #5d6a75; --line: #e3e6e8; --feld: #cfd6db;
  --grund: #f4f6f7; --karte: #ffffff; --sanft: #f7f8f9; --spalte: #eaeef0;
  --messing: #85631f; --messing-hell: #e2c98f; --messing-grund: #fbf7ee;
  --nav: #1b2a36; --nav-aktiv: #2c3e4c; --nav-text: #c9d2d9;
  --a: #2f6f62; --a-grund: #e3f1ec; --b: #2e5f8a; --b-grund: #e4edf6;
  --c: #7a4f0e; --c-grund: #f6ecd9; --d: #5d6a75; --d-grund: #eceff1;
  --rot: #a63d32; --rot-grund: #f8e6e3; --rot-text: #5b211b;
  --gelb: #7a4f0e; --gelb-grund: #f9efd9; --gelb-text: #4f340a;
  --aus-grund: #eef3f8;
  --radius: 14px; --serif: "Source Serif 4", Georgia, serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--grund); color: var(--ink); font: 400 15px/1.5 "Source Sans 3", system-ui, sans-serif; }
a { color: var(--ink); text-underline-offset: 3px; text-decoration-color: var(--messing-hell); }
a:hover { color: var(--messing); }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 700; letter-spacing: -0.005em; }
h1 { font-size: clamp(26px, 3vw, 34px); line-height: 1.15; margin-bottom: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
h2 { font-size: 20px; line-height: 1.25; margin-bottom: 12px; }
h3 { font-size: 17px; margin: 12px 0 6px; }
p { margin: 0 0 8px; }
:focus-visible { outline: 3px solid var(--messing); outline-offset: 2px; }

/* ------------------------------------------------------------------ Rahmen mit Seitenleiste */
.rahmen { display: flex; flex-wrap: wrap; min-height: 100vh; }
.seitenleiste { flex: 1 1 232px; max-width: 100%; background: var(--nav); color: #e8ecef; padding: 24px 16px;
  display: flex; flex-direction: column; gap: 24px; }
.seitenleiste .marke { display: flex; flex-direction: column; padding: 0 8px; text-decoration: none; color: #fff; }
.seitenleiste .marke b { font-family: var(--serif); font-size: 20px; }
.seitenleiste .marke span { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--messing-hell); }
.seitenleiste nav { display: flex; flex-direction: column; gap: 2px; }
.seitenleiste nav a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 8px;
  color: var(--nav-text); text-decoration: none; }
.seitenleiste nav a:hover { background: #24384a; color: #fff; }
.seitenleiste nav a[aria-current="page"] { background: var(--nav-aktiv); color: #fff; font-weight: 600; }
.seitenleiste .abmelden { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 0 8px; font-size: 14px; color: var(--nav-text); }
.leise-hell { background: none; border: 0; color: var(--nav-text); font: inherit; text-decoration: underline; cursor: pointer; min-height: 40px; }
.seite { flex: 999 1 560px; min-width: 0; padding: 28px 40px 56px; }
.seite.allein { max-width: 1100px; margin: 0 auto; }
@media (max-width: 860px) {
  .seitenleiste { flex-basis: 100%; padding: 12px; gap: 8px; }
  .seitenleiste nav { flex-direction: row; overflow-x: auto; gap: 4px; -webkit-overflow-scrolling: touch; }
  .seitenleiste nav a { white-space: nowrap; min-height: 40px; }
  .seitenleiste .abmelden { margin-top: 0; }
  .seite { padding: 18px 16px 48px; }
}

/* ------------------------------------------------------------------ Karten und Raster */
.karte { background: var(--karte); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 20px; min-width: 0; }
.karte.schmal { max-width: 520px; margin: 8vh auto; }
.karte.hervor { border: 2px solid var(--messing-hell); }
details.karte > summary { cursor: pointer; font-weight: 600; min-height: 32px; }
details.karte[open] > summary { margin-bottom: 12px; }
.raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; align-items: start; margin-bottom: 20px; }
.raster > .karte { margin-bottom: 0; }
.raster.zwei { grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); }
@media (max-width: 1000px) { .raster.zwei { grid-template-columns: minmax(0, 1fr); } }
.kennzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 20px; }
.kennzahl { background: var(--karte); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.kennzahl .wert { font-family: var(--serif); font-size: 34px; font-weight: 700; line-height: 1.05; }
.kennzahl .titel, .kennzahl .unter { font-size: 13px; color: var(--muted); }
.kennzahl .unter.gut { color: var(--a); }
.kopfzeile { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; }
.kopfzeile h1 { margin: 0; }
.datum { font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------------ Text, Marken */
.leise { color: var(--muted); }
.klein { font-size: 13px; }
.ueberfaellig { color: var(--rot); font-weight: 600; }
.hinweis { background: var(--messing-grund); border: 1px solid var(--messing-hell); color: var(--gelb-text); padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; }
.fehler { color: var(--rot); }
.marke-klasse, .marke-risiko, .chip { display: inline-flex; align-items: center; font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; line-height: 1.6; vertical-align: middle; white-space: nowrap; }
.k-A { background: var(--a-grund); color: var(--a); }
.k-B { background: var(--b-grund); color: var(--b); }
.k-C { background: var(--c-grund); color: var(--c); }
.k-D { background: var(--d-grund); color: var(--d); }
.r-rot.marke-risiko { background: var(--rot-grund); color: var(--rot); }
.r-gelb.marke-risiko { background: var(--gelb-grund); color: var(--gelb); }
.chip { background: #eef1f3; color: var(--text); font-weight: 400; font-size: 13px; padding: 3px 10px; }
.themen { display: flex; flex-wrap: wrap; gap: 6px; }
.thema { font-size: 13px; padding: 2px 10px; border-radius: 999px; border: 1px solid #dfe3e6; }
.risiko-box { padding: 12px 14px; border-radius: 10px; margin: 10px 0; }
.risiko-box.r-rot { background: var(--rot-grund); color: var(--rot-text); }
.risiko-box.r-gelb { background: var(--gelb-grund); color: var(--gelb-text); }
.risiko-box.r-gruen { background: var(--a-grund); color: #1d4a40; }
.empfehlung { background: var(--sanft); border-radius: 10px; padding: 12px 14px; }
code.geheim { display: block; word-break: break-all; background: var(--sanft); border: 1px dashed var(--feld); border-radius: 10px; padding: 14px; font-size: 15px; cursor: copy; }

/* ------------------------------------------------------------------ Formulare und Knöpfe */
input, select, textarea, button { font: inherit; color: inherit; }
input:not([type=checkbox]):not([type=radio]), select, textarea {
  min-height: 44px; padding: 8px 12px; border: 1px solid var(--feld); border-radius: 10px; background: #fff; width: 100%; max-width: 100%; }
textarea { resize: vertical; line-height: 1.55; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--a); flex: none; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
label > input, label > select, label > textarea { font-size: 15px; color: var(--ink); }
label.inline { flex-direction: row; align-items: center; gap: 8px; font-size: 14px; color: var(--text); }
.formular { display: flex; flex-direction: column; gap: 12px; }
.zeile { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.zeile > input, .zeile > select { width: auto; flex: 1 1 140px; }
.filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; }
.filter > input, .filter > select { width: auto; flex: 1 1 160px; }
button, .knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border-radius: 10px; border: 1px solid var(--feld); background: #fff; color: var(--ink); font-weight: 600; text-decoration: none; cursor: pointer; }
button:hover, .knopf:hover { border-color: var(--ink); color: var(--ink); }
.haupt { background: var(--ink); border-color: var(--ink); color: #fff; }
.haupt:hover { background: #2a3d4c; color: #fff; }
.gefahr { color: var(--rot); border-color: #e6bdb7; }
button.leise { border-color: transparent; background: transparent; font-weight: 400; color: var(--muted); }
.gross-knopf { min-height: 60px; font-size: 19px; padding: 0 26px; border-radius: 14px; }
.knopfleiste { gap: 10px; }
.haken { min-height: 32px; width: 32px; padding: 0; border-radius: 16px; font-size: 15px; color: var(--a); flex: none; }
.aufgabe { display: flex; gap: 10px; align-items: center; min-height: 44px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ Listen, Tabellen */
.tabellenrahmen { overflow-x: auto; background: var(--karte); border: 1px solid var(--line); border-radius: var(--radius); }
.tabelle { width: 100%; border-collapse: collapse; min-width: 760px; }
.tabelle th { text-align: left; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.tabelle td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tabelle tr:last-child td { border-bottom: 0; }
.tabelle tbody tr:hover { background: var(--sanft); }
.kontaktzeile { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; min-height: 44px; padding: 6px 0; text-decoration: none; border-bottom: 1px solid var(--line); }
.kontaktzeile:last-child { border-bottom: 0; }
.kontaktzeile .name { font-weight: 600; }
.kontaktzeile .leise { flex-basis: 100%; font-size: 13px; }
.eintrag { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 10px; background: var(--sanft); text-decoration: none; margin-bottom: 10px; }
.eintrag:hover { background: #f0f2f4; }

/* Termin-Kacheln */
.termin, .termin-gross { display: flex; gap: 14px; align-items: flex-start; padding: 8px 0; flex-wrap: wrap; }
.tag { width: 54px; flex: none; text-align: center; border-radius: 10px; background: #eef1f3; padding: 6px 0; line-height: 1.15; }
.tag small { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; }
.tag b { font-size: 20px; }
.tag.nah { background: var(--ink); color: #fff; }
.tag.nah small { color: var(--messing-hell); }
.termin .was { display: flex; flex-direction: column; flex: 1 1 220px; min-width: 0; }

/* ------------------------------------------------------------------ Kontakt */
.kontakt-kopf { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.kontakt-kopf .wer { display: flex; gap: 18px; align-items: center; min-width: 0; }
.kontakt-kopf h1 { margin: 0 0 6px; }
.initialen { width: 64px; height: 64px; border-radius: 32px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 700; font-size: 24px; background: #eef1f3; color: var(--text); }
.initialen.k-A { background: var(--a-grund); color: var(--a); }
.initialen.k-B { background: var(--b-grund); color: var(--b); }
.initialen.k-C { background: var(--c-grund); color: var(--c); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.stufenleiste { display: flex; flex-wrap: wrap; gap: 4px; background: var(--karte); border: 1px solid var(--line); border-radius: 12px; padding: 6px; margin-bottom: 20px; }
.stufenleiste span { flex: 1 1 110px; text-align: center; padding: 8px 6px; border-radius: 8px; font-size: 13px; color: var(--muted); }
.stufenleiste .erledigt { background: var(--a-grund); color: var(--a); font-weight: 600; }
.stufenleiste .aktuell { background: var(--ink); color: #fff; font-weight: 600; }
.kartenkopf { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.kartenkopf h2 { margin: 0; }
.kartenkopf > a, .kartenkopf > .leise { margin-left: auto; }
.ki-symbol { width: 28px; height: 28px; border-radius: 8px; background: #f3ead5; display: inline-flex; align-items: center; justify-content: center; color: var(--messing); font-size: 15px; }
.teilwerte { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px 24px; font-size: 14px; margin: 10px 0 14px; }
.teilwert span { display: flex; justify-content: space-between; gap: 8px; }
.balken { display: block; width: 100%; height: 6px; margin-top: 4px; }
.verlauf { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ereignis { padding: 12px 16px; border-radius: 12px; background: var(--sanft); }
.ereignis .meta { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.ereignis .betreff { font-weight: 600; margin-bottom: 4px; }
.ereignis.r-aus { background: var(--aus-grund); margin-left: 48px; }
.ereignis.r-ein { margin-right: 48px; }
.ereignis.art-bericht { background: var(--messing-grund); }
.ereignis.art-stufe, .ereignis.art-system, .ereignis.art-aufgabe, .ereignis.art-termin, .ereignis.art-expose_geoeffnet {
  background: none; padding: 0 4px; font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.ereignis.art-stufe .meta, .ereignis.art-system .meta, .ereignis.art-aufgabe .meta, .ereignis.art-termin .meta, .ereignis.art-expose_geoeffnet .meta { margin: 0; }
.ereignis.intern { outline: 1.5px dashed var(--messing-hell); }
.text.lang { max-height: 18em; overflow: auto; }
.treppe { display: flex; flex-direction: column; gap: 10px; font-size: 14px; margin-bottom: 12px; }
.treppe div { display: flex; gap: 10px; align-items: center; }
.punkt { width: 24px; height: 24px; border-radius: 12px; border: 2px solid #b9c3cc; flex: none; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.punkt.ja { background: var(--a); border-color: var(--a); color: #fff; }
@media (max-width: 700px) { .ereignis.r-aus { margin-left: 16px; } .ereignis.r-ein { margin-right: 16px; } }

/* ------------------------------------------------------------------ Pipeline */
.kanban-rahmen { overflow-x: auto; padding-bottom: 8px; }
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 14px; align-items: start; min-width: min-content; }
.spalte { background: var(--spalte); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 10px; min-width: 230px; }
.spalte h2 { font-family: "Source Sans 3", system-ui, sans-serif; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--text);
  display: flex; justify-content: space-between; margin: 0 0 2px; }
.kanban-karte { display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; text-decoration: none; }
.kanban-karte:hover { border-color: var(--feld); color: var(--ink); }
.kanban-karte .kopf { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.leer-spalte { margin: 0; padding: 18px 12px; text-align: center; font-size: 14px; color: var(--muted); border: 1.5px dashed #c5cdd3; border-radius: 10px; }

/* ------------------------------------------------------------------ Diagramme */
.diagramm { width: 100%; height: auto; display: block; }
.diagramm .d-achse { font: 12px "Source Sans 3", system-ui, sans-serif; fill: var(--muted); }
.diagramm .d-zahl { font: 600 12px "Source Sans 3", system-ui, sans-serif; fill: var(--ink); }

/* ------------------------------------------------------------------ Wolfgang: große Schrift */
body.gross { font-size: 19px; line-height: 1.45; }
body.gross .karte { padding: 20px; border-radius: 16px; }
body.gross h1 { font-size: 30px; }
body.gross h2 { font-size: 23px; }
.bericht-knopf { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 64px; border-radius: 14px; background: var(--messing);
  border: 0; color: #fff; text-decoration: none; font-weight: 700; font-size: 21px; width: 100%; }
.bericht-knopf:hover { background: #6f5219; color: #fff; }
.zahlen3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; text-align: center; }
.zahlen3 b { display: block; font-family: var(--serif); font-size: 32px; }
.zahlen3 span { font-size: 15px; color: var(--muted); }
.aufnahme { min-height: 76px; width: 100%; border: 0; border-radius: 18px; background: var(--messing); color: #fff; font-size: 22px; font-weight: 700; }
.aufnahme.laeuft { background: var(--rot); }
.aufnahme:hover { color: #fff; }
.diktat-text { min-height: 12em; font-size: 19px; }

/* ------------------------------------------------------------------ Interessentenseite */
body.oeffentlich .seite { max-width: 760px; }
.oeffentlich-kopf { display: flex; flex-direction: column; gap: 2px; margin: 8px 0 20px; }
.oeffentlich-kopf span { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--messing); font-weight: 600; }
.slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.slot { display: flex; gap: 10px; align-items: center; padding: 12px; border: 1px solid var(--feld); border-radius: 10px; color: var(--ink); font-size: 15px; }

/* ------------------------------------------------------------------ Druck */
body.druck { background: #fff; font-size: 16px; }
body.druck .seite { max-width: 820px; margin: 0 auto; padding: 24px; }
.druck-knopf { margin-bottom: 18px; }
.druck-termin { border-bottom: 1px solid var(--line); padding: 14px 0; page-break-inside: avoid; }
.druck-termin h2 { font-size: 22px; margin-bottom: 4px; }
.linien p { border-bottom: 1px solid #999; height: 2.2em; margin: 0; }
@media print {
  .druck-knopf, .seitenleiste, .hinweis { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .karte { border: 0; padding: 0; }
  a { text-decoration: none; color: #000; }
  .briefing-seite { page-break-after: always; }
}

/* Besucherstatistik: schmale Tabellen in Karten, Zeilen mit Wert rechts */
.tabelle.kompakt { min-width: 0; }
.tabelle.kompakt th, .tabelle.kompakt td { padding: 8px 10px; }
.karte > p.zeile { justify-content: space-between; margin: 0; padding: 6px 0; border-bottom: 1px solid var(--line); }
.karte > p.zeile:last-of-type { border-bottom: 0; }
