/* Vertriebs-CRM – Oberflaeche. Hell und dunkel, ab 360 px Breite. */

:root {
    --hg: #f4f6f9;
    --flaeche: #ffffff;
    --flaeche-2: #f8fafc;
    --flaeche-3: #eef2f6;
    --rand: #e3e7ee;
    --rand-stark: #cdd4de;
    --text: #141821;
    --text-2: #566072;
    --text-3: #8a93a3;
    --primaer: #2f5bea;
    --primaer-hover: #2349c6;
    --primaer-hell: #e9efff;
    --primaer-text: #ffffff;
    --erfolg: #177245;
    --erfolg-hell: #e5f4ec;
    --warnung: #a75a06;
    --warnung-hell: #fff3e0;
    --fehler: #c0262e;
    --fehler-hell: #fdecec;
    --info: #1a5fbf;
    --info-hell: #e8f1fd;
    --violett: #6d3fd6;
    --violett-hell: #f1ebff;
    --tuerkis: #0f7a80;
    --tuerkis-hell: #e3f5f5;
    --leiste: #0f172a;
    --leiste-hover: #1d2840;
    --leiste-text: #b8c2d4;
    --radius: 10px;
    --radius-klein: 7px;
    --schatten: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
    --schatten-gross: 0 20px 50px rgba(15, 23, 42, .28);
    --schrift: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --hg: #0d1117;
        --flaeche: #151b24;
        --flaeche-2: #1a212c;
        --flaeche-3: #212a37;
        --rand: #283241;
        --rand-stark: #364255;
        --text: #e6ebf2;
        --text-2: #a3aec0;
        --text-3: #7a8699;
        --primaer: #5b7ff5;
        --primaer-hover: #7494ff;
        --primaer-hell: #1c2750;
        --erfolg: #4cc38a;
        --erfolg-hell: #13301f;
        --warnung: #f0a54a;
        --warnung-hell: #3a2710;
        --fehler: #ff6b72;
        --fehler-hell: #3d1618;
        --info: #6aa6ff;
        --info-hell: #142a4a;
        --violett: #a68bff;
        --violett-hell: #2a1f4d;
        --tuerkis: #4fd1d9;
        --tuerkis-hell: #0f3033;
        --leiste: #0a0e15;
        --leiste-hover: #19212f;
        --schatten: 0 1px 2px rgba(0, 0, 0, .35);
        color-scheme: dark;
    }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--schrift);
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--text);
    background: var(--hg);
}
a { color: var(--primaer); }
a:hover { color: var(--primaer-hover); }
h1, h2, h3 { line-height: 1.25; }
img, svg { max-width: 100%; }
code { font-family: var(--mono); font-size: .9em; background: var(--flaeche-3); padding: 1px 5px; border-radius: 4px; }
.umbruch { word-break: break-all; }
hr { border: 0; border-top: 1px solid var(--rand); }

.symbol { width: 18px; height: 18px; flex: none; vertical-align: -4px; }
.sprungmarke { position: absolute; left: -9999px; }
.sprungmarke:focus { left: 12px; top: 12px; z-index: 100; background: var(--flaeche); padding: 8px 12px; border-radius: var(--radius-klein); box-shadow: var(--schatten-gross); }
.versteckt { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------ Rahmen */

.rahmen { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.seitenleiste {
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
    background: var(--leiste); color: var(--leiste-text);
    display: flex; flex-direction: column;
}
.seitenleiste-kopf { display: flex; justify-content: space-between; align-items: center; padding: 18px 14px 10px; }
.logo { display: flex; gap: 11px; align-items: center; color: #fff; text-decoration: none; }
.logo:hover { color: #fff; }
.logo-zeichen {
    width: 34px; height: 34px; border-radius: 10px; background: var(--primaer); color: #fff;
    display: grid; place-items: center; font-weight: 800; font-size: 17px; flex: none;
}
.logo-text { display: flex; flex-direction: column; font-weight: 700; font-size: 16px; line-height: 1.15; }
.logo-text small { font-weight: 500; font-size: 11px; color: var(--leiste-text); letter-spacing: .02em; }
.hauptnavigation { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; flex: 1; }
.nav-punkt {
    display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 8px;
    color: var(--leiste-text); text-decoration: none; font-weight: 500;
}
.nav-punkt:hover { background: var(--leiste-hover); color: #fff; }
.nav-punkt.aktiv { background: var(--leiste-hover); color: #fff; box-shadow: inset 3px 0 0 var(--primaer); }
.nav-zahl {
    margin-left: auto; min-width: 22px; text-align: center; background: rgba(255, 255, 255, .14); color: #fff;
    border-radius: 999px; font-size: 11.5px; padding: 1px 7px; font-weight: 700;
}
.nav-zahl.warnung { background: #d8363e; }
.nav-abschnitt { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: #64748b; padding: 16px 11px 4px; }
.seitenleiste-fuss { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-top: 1px solid rgba(255, 255, 255, .08); }
.nutzer-box { display: flex; gap: 10px; align-items: center; flex: 1; min-width: 0; color: #fff; text-decoration: none; }
.nutzer-box:hover { color: #fff; }
.nutzer-box span { min-width: 0; }
.nutzer-box strong { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nutzer-box small { display: block; color: var(--leiste-text); font-size: 11.5px; }
.seitenleiste .knopf-symbol { color: var(--leiste-text); }
.seitenleiste .knopf-symbol:hover { color: #fff; background: var(--leiste-hover); }
.seitenleiste-schleier { display: none; }

.hauptbereich { min-width: 0; display: flex; flex-direction: column; }
.kopfleiste {
    position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px;
    padding: 12px 28px; background: color-mix(in srgb, var(--hg) 88%, transparent);
    backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--rand);
}
.suchfeld { flex: 1; max-width: 620px; position: relative; display: flex; align-items: center; margin: 0; }
.suchfeld .symbol { position: absolute; left: 11px; color: var(--text-3); pointer-events: none; }
.suchfeld input { padding-left: 38px; background: var(--flaeche); }
.inhalt { padding: 24px 28px 48px; width: 100%; max-width: 1480px; outline: none; }

/* ------------------------------------------------------------ Knoepfe */

.knopf {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 7px 13px; min-height: 36px; border: 1px solid var(--rand-stark); border-radius: var(--radius-klein);
    background: var(--flaeche); color: var(--text); font: inherit; font-weight: 550; font-size: 14px;
    text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s;
}
.knopf:hover { background: var(--flaeche-2); border-color: var(--text-3); color: var(--text); }
.knopf:focus-visible, .knopf-symbol:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--primaer) 45%, transparent); outline-offset: 2px; }
.knopf.primaer { background: var(--primaer); border-color: var(--primaer); color: var(--primaer-text); }
.knopf.primaer:hover { background: var(--primaer-hover); border-color: var(--primaer-hover); color: var(--primaer-text); }
.knopf.gefahr { color: var(--fehler); border-color: color-mix(in srgb, var(--fehler) 45%, transparent); }
.knopf.gefahr:hover { background: var(--fehler-hell); }
.knopf.klein { min-height: 30px; padding: 4px 10px; font-size: 13px; }
.knopf.breit { width: 100%; }
.knopf:disabled, .knopf[disabled] { opacity: .5; cursor: not-allowed; }
.knopf .symbol { width: 17px; height: 17px; }
.knopf-symbol {
    display: inline-grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: var(--radius-klein);
    background: transparent; color: var(--text-2); cursor: pointer;
}
.knopf-symbol:hover { background: var(--flaeche-3); color: var(--text); }
summary.knopf { list-style: none; }
summary::-webkit-details-marker { display: none; }

/* ------------------------------------------------------------ Karten und Raster */

.seitenkopf { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.seitenkopf h1 { font-size: 25px; margin: 0 0 4px; letter-spacing: -.01em; }
.untertitel { color: var(--text-2); margin: 0; max-width: 820px; }
.zurueck-link { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); text-decoration: none; font-size: 13px; margin-bottom: 6px; }
.zurueck-link .symbol { width: 15px; height: 15px; }

.karte {
    background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius);
    padding: 18px 20px; box-shadow: var(--schatten); margin-bottom: 18px; min-width: 0;
}
.karte.ohne-rand { padding: 0; overflow: hidden; }
.karte-kopf { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.karte-kopf.innen { padding: 14px 18px 4px; }
.karte-kopf h2 { font-size: 15.5px; margin: 0; display: flex; gap: 8px; align-items: center; }
.karte-kopf h2 .symbol { color: var(--text-2); }
.karte.hervorgehoben { border-color: var(--primaer); box-shadow: 0 0 0 3px var(--primaer-hell); }
.karte.schmal { max-width: 520px; margin: 15vh auto; }
.karte-link { display: block; text-decoration: none; color: inherit; transition: border-color .12s, transform .12s; }
.karte-link:hover { border-color: var(--primaer); color: inherit; }
.karte-link h2 { display: flex; gap: 8px; align-items: center; font-size: 15.5px; margin: 0 0 6px; }
.karte-link p { margin: 0; color: var(--text-2); }

.raster-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; align-items: start; }
.raster-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 18px; align-items: start; }
.raster-2.breit-links { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }

.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin-bottom: 20px; }
.kachel {
    background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius); box-shadow: var(--schatten);
    padding: 16px 18px; border-top: 4px solid var(--firma, var(--primaer));
}
.kachel header { display: flex; align-items: baseline; gap: 8px; }
.kachel-titel { font-weight: 700; font-size: 16px; color: var(--firma); }
.kachel header small { color: var(--text-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kachel-haupt { display: flex; align-items: baseline; gap: 10px; margin: 8px 0 10px; text-decoration: none; color: var(--text-2); }
.kachel-zahl { font-size: 36px; font-weight: 750; color: var(--text); line-height: 1; font-variant-numeric: tabular-nums; }
.kachel-werte { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; margin: 0; border-top: 1px solid var(--rand); padding-top: 10px; }
.kachel-werte div { display: flex; justify-content: space-between; gap: 8px; }
.kachel-werte dt { color: var(--text-2); font-size: 12.5px; }
.kachel-werte dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; }
.kachel-werte dd a { color: inherit; text-decoration: none; }
.kachel-werte .warnung dd, .kachel-werte .warnung dd a { color: var(--fehler); }

/* ------------------------------------------------------------ Listen */

.liste { list-style: none; margin: 0; padding: 0; }
.liste-zeile > a, .liste-zeile > span { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: var(--radius-klein); text-decoration: none; color: inherit; }
.liste-zeile > a:hover { background: var(--flaeche-2); color: inherit; }
.liste-zeile { border-bottom: 1px solid var(--rand); display: flex; align-items: center; gap: 8px; }
.liste-zeile:last-child { border-bottom: 0; }
.liste-zeile > a, .liste-zeile > span.liste-haupt { flex: 1; min-width: 0; }
.liste-haupt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.liste-haupt strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.liste-haupt small { color: var(--text-2); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.liste-titel { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); margin: 12px 0 2px; }
.liste-titel.warnung, h2.warnung { color: var(--fehler); }
.eingang-zeile { display: grid; gap: 4px; padding-bottom: 8px; }
.schnell-zuweisen { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 0 8px 4px; }
.schnell-zuweisen select { width: auto; min-width: 170px; min-height: 30px; padding: 4px 8px; }
.termin-zeit { display: flex; flex-direction: column; align-items: center; min-width: 64px; line-height: 1.2; }
.termin-zeit small { color: var(--text-2); font-size: 11.5px; }
.leer { text-align: center; color: var(--text-3); padding: 26px 12px; }
.leer .symbol { width: 30px; height: 30px; }
.leer p { margin: 8px 0 0; }

.aufgaben { list-style: none; margin: 0; padding: 0; }
.aufgabe { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px 14px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--rand); }
.aufgabe:last-child { border-bottom: 0; }
.aufgabe-haupt a { color: inherit; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.aufgabe-erledigen[open] { grid-column: 1 / -1; }
.aufgabe-erledigen form { margin-top: 8px; }
.zahl-rund { display: inline-grid; min-width: 24px; height: 22px; place-items: center; border-radius: 999px; background: var(--flaeche-3); color: var(--text-2); font-size: 12px; padding: 0 7px; font-weight: 600; }

/* ------------------------------------------------------------ Marken und Abzeichen */

.firma-marke {
    display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 650;
    color: var(--firma); background: color-mix(in srgb, var(--firma) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--firma) 32%, transparent); white-space: nowrap; line-height: 1.6;
}
@media (prefers-color-scheme: dark) {
    .firma-marke { color: color-mix(in srgb, var(--firma) 55%, #fff); }
}
.status { display: inline-flex; align-items: center; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; line-height: 1.7; background: var(--flaeche-3); color: var(--text-2); }
.status-neu { background: var(--info-hell); color: var(--info); }
.status-zugewiesen { background: var(--primaer-hell); color: var(--primaer); }
.status-kontaktiert { background: var(--tuerkis-hell); color: var(--tuerkis); }
.status-termin { background: var(--violett-hell); color: var(--violett); }
.status-angebot { background: var(--warnung-hell); color: var(--warnung); }
.status-gewonnen { background: var(--erfolg-hell); color: var(--erfolg); }
.status-spam { background: var(--fehler-hell); color: var(--fehler); }

.frist { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; padding: 2px 9px; border-radius: 999px; white-space: nowrap; background: var(--flaeche-3); color: var(--text-2); font-weight: 550; }
.frist .symbol { width: 14px; height: 14px; }
.frist-ueberfaellig { background: var(--fehler-hell); color: var(--fehler); }
.frist-knapp { background: var(--warnung-hell); color: var(--warnung); }
.frist-heute { background: var(--info-hell); color: var(--info); }
.frist-keine { background: transparent; color: var(--text-3); }

.abzeichen { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: var(--flaeche-3); color: var(--text-2); white-space: nowrap; font-weight: 550; }
.abzeichen .symbol { width: 14px; height: 14px; }
.abzeichen.warnung { background: var(--warnung-hell); color: var(--warnung); }
.abzeichen.erfolg { background: var(--erfolg-hell); color: var(--erfolg); }

.avatar {
    display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; flex: none;
    background: hsl(var(--ton) 60% 88%); color: hsl(var(--ton) 45% 28%); font-weight: 700; font-size: 12px; letter-spacing: .02em;
}
.avatar.klein { width: 22px; height: 22px; font-size: 10px; }
@media (prefers-color-scheme: dark) { .avatar { background: hsl(var(--ton) 35% 28%); color: hsl(var(--ton) 60% 85%); } }
.mit-avatar { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: inherit; }
.kanal .symbol, .kanal-text .symbol { width: 16px; height: 16px; color: var(--text-2); vertical-align: -3px; }
.kanal-text { color: var(--text-2); font-size: 13px; }
.nummer { font-family: var(--mono); font-size: 13px; color: var(--text-2); text-decoration: none; }

/* ------------------------------------------------------------ Tabellen */

.tabellen-rahmen { overflow-x: auto; }
.tabelle { width: 100%; border-collapse: collapse; }
.tabelle th {
    text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2);
    font-weight: 650; padding: 10px 14px; border-bottom: 1px solid var(--rand); background: var(--flaeche-2); white-space: nowrap;
}
.tabelle td { padding: 11px 14px; border-bottom: 1px solid var(--rand); vertical-align: top; }
.tabelle tbody tr:last-child td { border-bottom: 0; }
.tabelle.kompakt th, .tabelle.kompakt td { padding: 7px 10px; }
.zeile-link { cursor: pointer; }
.zeile-link:hover td { background: var(--flaeche-2); }
.zahl { text-align: right; font-variant-numeric: tabular-nums; }
.rechts { text-align: right; }
.vorgangstabelle td:first-child { white-space: nowrap; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--rand); margin-bottom: 16px; overflow-x: auto; }
.tab { padding: 9px 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--text-2); text-decoration: none; display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; font-weight: 550; }
.tab:hover { color: var(--text); }
.tab.aktiv { color: var(--text); border-color: var(--firma, var(--primaer)); }
.tab-punkt { width: 9px; height: 9px; border-radius: 50%; background: var(--firma); }

.filterleiste { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 16px; }
.filterleiste label > span { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 4px; font-weight: 550; }
.filterleiste select { width: auto; min-width: 150px; }
.filterleiste .schalter { padding-bottom: 8px; }
.filter-suche { flex: 1; min-width: 220px; }

.blaettern { display: flex; gap: 12px; justify-content: center; align-items: center; margin: 12px 0; color: var(--text-2); }

/* ------------------------------------------------------------ Formulare */

input, select, textarea {
    font: inherit; width: 100%; padding: 8px 10px; min-height: 38px;
    border: 1px solid var(--rand-stark); border-radius: var(--radius-klein); background: var(--flaeche); color: var(--text);
}
textarea { resize: vertical; line-height: 1.5; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; min-height: 0; padding: 0; accent-color: var(--primaer); flex: none; }
input[type="color"] { padding: 2px; height: 38px; }
input[type="file"] { padding: 6px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primaer); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primaer) 22%, transparent); }
input:disabled, select:disabled, textarea:disabled { opacity: .6; }
.felder { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px 16px; margin-bottom: 14px; }
.feld { min-width: 0; }
.feld.breit, .meldung.breit { grid-column: 1 / -1; }
.feld > label, .feld-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.pflicht { color: var(--fehler); }
.hilfe { color: var(--text-2); font-size: 12.5px; display: block; margin-top: 5px; }
.schalter { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; font-weight: 500; }
.schalter.klein { font-size: 12.5px; }
.feld-schalter { display: flex; flex-direction: column; justify-content: center; }
.formular .feld-schalter + .feld-schalter { margin-top: -4px; }
.auswahl-gruppe { display: flex; flex-direction: column; gap: 8px; }
.abschnitt { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
.abschnitt legend { font-weight: 700; font-size: 15px; margin-bottom: 10px; padding: 0; }
.formular-fuss { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.formular > .feld { margin-bottom: 12px; }
.inline-formular { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 12px; }
.inline-formular .feld { flex: 1; min-width: 160px; }
form.inline { display: inline; }
.tabelle.zeiten input[type="time"] { width: auto; }

details > summary { cursor: pointer; }
.naechster-schritt { margin-top: 14px; border-top: 1px dashed var(--rand-stark); padding-top: 10px; }
.naechster-schritt summary { font-size: 13px; color: var(--primaer); font-weight: 600; margin-bottom: 8px; }

/* ------------------------------------------------------------ Meldungen */

.meldung { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border-radius: var(--radius); margin-bottom: 14px; border: 1px solid; }
.meldung span { flex: 1; }
.meldung-erfolg { background: var(--erfolg-hell); color: var(--erfolg); border-color: color-mix(in srgb, var(--erfolg) 30%, transparent); }
.meldung-fehler { background: var(--fehler-hell); color: var(--fehler); border-color: color-mix(in srgb, var(--fehler) 30%, transparent); }
.meldung-warnung { background: var(--warnung-hell); color: var(--warnung); border-color: color-mix(in srgb, var(--warnung) 30%, transparent); }
.meldung-info { background: var(--info-hell); color: var(--info); border-color: color-mix(in srgb, var(--info) 30%, transparent); }
.meldung a { color: inherit; font-weight: 650; }
.meldung-zu { background: none; border: 0; cursor: pointer; color: inherit; padding: 0; opacity: .7; }
.meldung-zu:hover { opacity: 1; }
.gedimmt { color: var(--text-2); }
.text-klein { font-size: 12.5px; }
.warnung-text { color: var(--warnung); }
.erfolg-text { color: var(--erfolg); }
.text-block { line-height: 1.6; overflow-wrap: anywhere; }
pre.bericht { white-space: pre-wrap; font-family: var(--mono); font-size: 12px; background: var(--flaeche-2); padding: 12px; border-radius: var(--radius-klein); max-height: 340px; overflow: auto; margin: 0; }
.kopplungscode code { font-size: 22px; letter-spacing: .06em; padding: 8px 14px; display: inline-block; }

/* ------------------------------------------------------------ Vorgang */

.vorgang-kopf { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 14px; align-items: flex-end; }
.vorgang-titel h1 { font-size: 25px; margin: 2px 0 4px; letter-spacing: -.01em; }
.vorgang-titel h1 small { font-size: 16px; color: var(--text-2); font-weight: 500; }
.vorgang-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0 2px; }
.vorgang-stand { display: flex; gap: 26px; align-items: flex-start; background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius); padding: 12px 18px; box-shadow: var(--schatten); }
.stand-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin-bottom: 5px; font-weight: 650; }
.stand-frist .frist { font-size: 14px; padding: 4px 11px; }

.pipeline { display: flex; list-style: none; padding: 0; margin: 0 0 16px; gap: 3px; overflow-x: auto; }
.pipeline-schritt {
    flex: 1; min-width: 104px; text-align: center; padding: 8px 14px; font-size: 12.5px; font-weight: 600;
    background: var(--flaeche-3); color: var(--text-3);
    clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 50%, calc(100% - 11px) 100%, 0 100%, 11px 50%);
}
.pipeline-schritt:first-child { clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 50%, calc(100% - 11px) 100%, 0 100%); border-radius: 8px 0 0 8px; }
.pipeline-schritt.erreicht { background: var(--primaer-hell); color: var(--primaer); }
.pipeline-schritt.aktuell { background: var(--primaer); color: #fff; }
.pipeline-schritt.beendet.aktuell { background: var(--text-2); color: var(--flaeche); }

.aktionsleiste {
    display: flex; flex-wrap: wrap; gap: 8px; margin: 0 -4px 18px; padding: 8px 4px;
    position: sticky; top: 61px; z-index: 20; background: color-mix(in srgb, var(--hg) 92%, transparent); backdrop-filter: blur(6px);
}

.vorgang-raster { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.spalte-seite .karte { padding: 16px 18px; }

.zeitleiste { list-style: none; margin: 0; padding: 0; position: relative; }
.zeitleiste::before { content: ""; position: absolute; left: 16px; top: 8px; bottom: 8px; width: 2px; background: var(--rand); }
.eintrag { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 10px 0; position: relative; }
.eintrag-symbol {
    width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; z-index: 1;
    background: var(--flaeche); border: 2px solid var(--rand); color: var(--text-2);
}
.eintrag-symbol .symbol { width: 16px; height: 16px; }
.richtung-ein .eintrag-symbol { color: var(--info); border-color: color-mix(in srgb, var(--info) 40%, transparent); background: var(--info-hell); }
.richtung-aus .eintrag-symbol { color: var(--erfolg); border-color: color-mix(in srgb, var(--erfolg) 40%, transparent); background: var(--erfolg-hell); }
.eintrag-anruf_verpasst .eintrag-symbol { color: var(--fehler); border-color: color-mix(in srgb, var(--fehler) 40%, transparent); background: var(--fehler-hell); }
.eintrag-kopf { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.eintrag-art { font-size: 11px; color: var(--text-2); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.eintrag-kopf time { margin-left: auto; font-size: 12px; color: var(--text-3); white-space: nowrap; }
.eintrag-mailkopf { margin-top: 2px; overflow-wrap: anywhere; }
.eintrag-text { margin-top: 6px; background: var(--flaeche-2); border: 1px solid var(--rand); border-radius: var(--radius-klein); padding: 10px 12px; overflow-wrap: anywhere; }
.eintrag.kompakt { padding: 5px 0; }
.eintrag.kompakt .eintrag-symbol { width: 26px; height: 26px; margin-left: 4px; border-width: 1px; }
.eintrag.kompakt .eintrag-symbol .symbol { width: 13px; height: 13px; }
.eintrag.kompakt .eintrag-kopf { font-size: 13px; color: var(--text-2); }
.eintrag.kompakt .eintrag-text { background: transparent; border: 0; padding: 0; margin-top: 2px; font-size: 13px; color: var(--text-2); }
.eintrag-fuss { margin-top: 4px; }
.zitat summary, .eintrag-mehr summary { font-size: 12px; color: var(--text-2); margin-top: 6px; }
.zitat .eintrag-text { color: var(--text-2); font-size: 13px; }
.anhaenge { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.anhaenge a { display: inline-flex; gap: 5px; align-items: center; padding: 4px 11px; border: 1px solid var(--rand-stark); border-radius: 999px; font-size: 12.5px; text-decoration: none; color: var(--text); background: var(--flaeche); }
.anhaenge a:hover { border-color: var(--primaer); }
.anhaenge .symbol { width: 14px; height: 14px; }

.daten-liste { margin: 0; }
.daten-liste > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--rand); }
.daten-liste > div:last-child { border-bottom: 0; }
.daten-liste dt { color: var(--text-2); font-size: 12.5px; }
.daten-liste dd { margin: 0; overflow-wrap: anywhere; }
.daten-liste.klein dt, .daten-liste.klein dd { font-size: 12.5px; }
.platzhalter > div { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.bearbeiten summary { margin-top: 12px; }
.bearbeiten[open] summary { margin-bottom: 12px; }

.wv-liste { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.wv { border: 1px solid var(--rand); border-radius: var(--radius-klein); padding: 10px 12px; background: var(--flaeche); }
.wv-offen { border-left: 3px solid var(--primaer); }
.wv-erledigt, .wv-storniert { background: var(--flaeche-2); }
.wv-kopf { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.wv-meta { margin-top: 3px; }
.wv-aktionen { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.wv-aktionen details[open] { flex-basis: 100%; }
.wv-aktionen details form { margin-top: 10px; }
.verlauf-klein ul { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 6px; }
.verlauf-klein summary { color: var(--text-2); margin-top: 6px; }

.uebergabe { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px dashed var(--rand); }
.uebergabe:last-child { border-bottom: 0; }
.uebergabe small { display: block; color: var(--text-2); font-size: 12px; }
.gefahrzone summary { color: var(--fehler); font-weight: 650; }
.gefahrzone form { margin-top: 14px; }

.anruf-hinweis { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: var(--radius-klein); margin-bottom: 14px; }
.anruf-hinweis p { margin: 0; }
.anruf-hinweis.passend { background: var(--erfolg-hell); color: var(--erfolg); }
.anruf-hinweis.abweichend { background: var(--warnung-hell); color: var(--warnung); }

.geraet { border: 1px solid var(--rand); border-radius: var(--radius-klein); padding: 10px 14px; margin-bottom: 10px; }
.geraet summary { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.geraet-formular { margin-top: 12px; }

/* ------------------------------------------------------------ Dialoge */

dialog.dialog {
    border: 0; padding: 0; border-radius: 14px; width: min(580px, calc(100vw - 24px)); max-height: calc(100vh - 32px);
    box-shadow: var(--schatten-gross); background: var(--flaeche); color: var(--text); overflow: hidden;
}
dialog.dialog.breit { width: min(900px, calc(100vw - 24px)); }
dialog.dialog::backdrop { background: rgba(15, 23, 42, .5); backdrop-filter: blur(2px); }
dialog.dialog > form { display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.dialog-kopf { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px 14px 22px; border-bottom: 1px solid var(--rand); }
.dialog-kopf h2 { margin: 0; font-size: 17px; }
.dialog-inhalt { padding: 18px 22px; overflow-y: auto; }
.dialog-fuss { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 22px; border-top: 1px solid var(--rand); background: var(--flaeche-2); }

/* ------------------------------------------------------------ Anmeldung und Einzelseiten */

body.einfach { display: grid; place-items: center; min-height: 100vh; padding: 24px 16px; }
.anmeldung { width: min(420px, 100%); }
.anmeldung-marke { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; }
.anmeldung-marke strong { display: block; font-size: 18px; }
.anmeldung-marke span { color: var(--text-2); font-size: 13px; }
.anmeldung-karte { padding: 24px; }
.anmeldung-karte h1 { font-size: 21px; margin: 0 0 16px; }
.anmeldung-karte .feld { margin-bottom: 14px; }
.captchame { margin-bottom: 14px; }

/* ------------------------------------------------------------ Kleine Bildschirme */

.nur-mobil { display: none; }

@media (max-width: 1180px) {
    .raster-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .vorgang-raster { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
    .rahmen { grid-template-columns: minmax(0, 1fr); }
    .seitenleiste {
        position: fixed; left: 0; top: 0; bottom: 0; width: 272px; z-index: 60;
        transform: translateX(-100%); transition: transform .2s ease;
    }
    body.menue-offen .seitenleiste { transform: translateX(0); box-shadow: var(--schatten-gross); }
    body.menue-offen .seitenleiste-schleier { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 50; }
    .nur-mobil { display: inline-grid; }
    .ohne-mobil { display: none; }
    .kopfleiste { padding: 10px 14px; gap: 8px; }
    .inhalt { padding: 18px 14px 40px; }
    .raster-2, .raster-3, .raster-2.breit-links { grid-template-columns: minmax(0, 1fr); }
    .aktionsleiste { top: 57px; overflow-x: auto; flex-wrap: nowrap; }
    .vorgang-stand { width: 100%; }
    .seitenkopf h1, .vorgang-titel h1 { font-size: 21px; }
}

@media (max-width: 620px) {
    .aufgabe { grid-template-columns: minmax(0, 1fr); }
    .daten-liste > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
    .filterleiste select { min-width: 0; width: 100%; }
    .filterleiste label { flex: 1 1 45%; }
    .dialog-inhalt { padding: 14px 16px; }
    .kachel-werte { grid-template-columns: minmax(0, 1fr); }
}

@media print {
    .seitenleiste, .kopfleiste, .aktionsleiste, dialog, .wv-aktionen, .bearbeiten, .gefahrzone { display: none !important; }
    .rahmen { display: block; }
    .karte { box-shadow: none; break-inside: avoid; }
}
