/* FIPAX CRM – neues Design */
:root {
    --navy: #142B44;
    --text: #142B44;
    --text-2: #2E3A4B;
    --gedimmt: #4E5A6B;
    --linie: #B4BFCC;        /* Rahmen von Karten, Kopf, Navigation */
    --linie-2: #D2D9E2;      /* Trennlinien innerhalb von Karten/Tabellen */
    --rand-feld: #93A0B1;    /* Rahmen von Eingabefeldern und Knoepfen */
    --grund: #DCE3EB;        /* Seitenhintergrund – deutlich getoent, damit sich die Karten abheben */
    --band: #E6EDF6;         /* Kopfband der Karten, Tabellenkoepfe */
    --nav-grund: #EDF2F8;    /* Navigation */
    --schatten: 0 1px 2px rgba(20, 43, 68, .14), 0 3px 12px rgba(20, 43, 68, .08);
    --flaeche: #FFFFFF;
    --akzent: #1F5FB8;
    --akzent-soft: #1F5FB81A;
    --rot: #A61B1B; --rot-bg: #FDECEC;
    --orange: #8A4B08; --orange-bg: #FEF3E2;
    --gruen: #15703A; --gruen-bg: #E7F6EC;
    --blau: #1F4E9A; --blau-bg: #E8F0FB;
    --lila: #4E3591; --lila-bg: #F1ECFB;
    --radius: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--grund); color: var(--text); font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 14px; line-height: 1.45; }
a { color: var(--akzent); }
a:hover { color: var(--navy); }
h1, h2, h3 { margin: 0; }
.sr { position: absolute; left: -9999px; }

/* Rahmen */
.shell { display: flex; flex-wrap: wrap; min-height: 100vh; }
.nav { flex: 1 1 248px; max-width: 100%; background: var(--flaeche); border-right: 1px solid var(--linie); padding: 22px 16px; display: flex; flex-direction: column; gap: 4px; }
.nav .logo img { width: 132px; height: auto; margin: 0 8px 22px 8px; display: block; }
.nav a:not(.logo) { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; color: var(--text-2); text-decoration: none; min-height: 40px; }
.nav a:not(.logo):hover { background: #EEF2F7; color: var(--navy); }
.nav a.active { background: var(--akzent-soft); color: var(--akzent); font-weight: 600; }
.nav .pfeil { margin-left: auto; color: #8492A6; font-size: 12px; }
.nav-gruppe { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--gedimmt); padding: 16px 12px 4px; }
.nav-fuss { margin-top: auto; padding-top: 20px; border-top: 1px solid var(--linie-2); }

.inhalt { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; }
.kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px 32px; background: var(--flaeche); border-bottom: 1px solid var(--linie); }
.suche { flex: 1 1 320px; max-width: 560px; display: flex; align-items: center; gap: 10px; background: var(--grund); border: 1px solid var(--linie); border-radius: 10px; padding: 0 14px; height: 44px; color: var(--gedimmt); }
.suche input { border: 0; background: transparent; flex: 1; font: inherit; color: var(--text); outline: none; min-width: 0; height: 100%; }
.kopf-rechts { display: flex; gap: 12px; margin-left: auto; align-items: center; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; }
.abmelden { color: var(--gedimmt); text-decoration: none; font-weight: 500; }
.haupt { padding: 28px 32px 48px; width: 100%; max-width: 1360px; }

/* Bausteine */
.stapel { display: flex; flex-direction: column; gap: 20px; }
.stapel-klein { display: flex; flex-direction: column; gap: 14px; }
.zeile { display: flex; flex-wrap: wrap; gap: 20px; }
.zeile.oben { align-items: flex-start; }
.breit1 { flex: 1 1 280px; min-width: 0; }
.breit2 { flex: 2 1 340px; min-width: 0; }
.breit3 { flex: 3 1 480px; min-width: 0; }
.titel { font-family: Montserrat, Inter, sans-serif; font-weight: 700; font-size: 26px; letter-spacing: -.01em; }
.titel-zeile { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.gedimmt { color: var(--gedimmt); }
.klein { font-size: 13px; }
.fett { font-weight: 600; }
.durch { text-decoration: line-through; color: #8492A6; }
.nowrap { white-space: nowrap; }
.rot { color: var(--rot); }

.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 18px 20px; }
.karte.ohne-pad { padding: 0; overflow: hidden; }
.karte h2 { font-family: Montserrat, Inter, sans-serif; font-size: 17px; font-weight: 700; margin-bottom: 12px; }
.karte-kopf { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.karte-kopf h2 { margin: 0; }
.karte-kopf a { font-weight: 500; text-decoration: none; }
.leer { color: var(--gedimmt); padding: 14px 0; }
.karte.leer { padding: 24px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.kpi { display: block; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 18px 20px; color: inherit; text-decoration: none; }
a.kpi:hover { border-color: #C9D2DE; color: inherit; }
.kpi-label { color: var(--gedimmt); font-weight: 500; }
.kpi-zahl { font-family: Montserrat, sans-serif; font-size: 30px; font-weight: 700; margin-top: 6px; }
.kpi-sub { color: var(--text-2); font-size: 13px; }
.kpi-sub.rot { color: var(--rot); font-weight: 500; }

.badge { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 10px; white-space: nowrap; display: inline-block; }
.badge.rot { background: var(--rot-bg); color: var(--rot); }
.badge.orange { background: var(--orange-bg); color: var(--orange); }
.badge.gruen { background: var(--gruen-bg); color: var(--gruen); }
.badge.blau { background: var(--blau-bg); color: var(--blau); }
.badge.lila { background: var(--lila-bg); color: var(--lila); }
.badge.grau { background: var(--linie-2); color: var(--text-2); font-weight: 500; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 40px; padding: 0 16px; border-radius: 20px; border: 1px solid var(--rand-feld); background: var(--flaeche); color: var(--navy); font-weight: 500; text-decoration: none; display: inline-flex; align-items: center; }
.chip:hover { border-color: var(--navy); color: var(--navy); }
.chip.aktiv { background: var(--navy); border-color: var(--navy); color: #fff; }
.chips-klein { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Aufgaben */
.aufgabe { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--linie-2); }
.aufgabe.zeile-rand { padding: 12px 20px; }
.aufgabe:hover { background: #EEF3F9; }
.aufgabe form { margin: 0; display: flex; }
.aufgabe-text { flex: 1 1 240px; min-width: 0; }
.haken { width: 24px; height: 24px; border-radius: 6px; border: 2px solid #A9B3C1; background: #fff; cursor: pointer; padding: 0; position: relative; }
.haken:hover { border-color: var(--navy); }
.haken.an { background: var(--navy); border-color: var(--navy); }
.haken.an::after { content: ""; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.gruppe-kopf { display: flex; align-items: center; gap: 10px; padding: 14px 20px; }
.gruppe-kopf h2 { font-family: Inter, sans-serif; font-size: 15px; font-weight: 600; margin: 0; }
.punkt { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.punkt.rot { background: #C62828; } .punkt.orange { background: #D97706; } .punkt.blau { background: var(--akzent); } .punkt.grau { background: #8492A6; } .punkt.gruen { background: #2E9E5B; }
.mini-link { color: #8492A6; display: inline-flex; padding: 6px; border-radius: 6px; }
.mini-link:hover { background: var(--linie-2); color: var(--navy); }

/* Pipeline */
.balken-liste { display: flex; flex-direction: column; gap: 12px; }
.balken-kopf { display: flex; justify-content: space-between; font-size: 13px; }
.balken { height: 8px; background: var(--linie-2); border-radius: 4px; margin-top: 4px; }
.balken div { height: 8px; background: var(--akzent); border-radius: 4px; min-width: 4px; }

/* Aktivitaeten / Verlauf */
.akt { display: flex; gap: 14px; padding: 10px 0; border-top: 1px solid var(--linie-2); align-items: flex-start; }
.akt-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--blau-bg); color: var(--akzent); display: flex; align-items: center; justify-content: center; flex: none; }
.verlauf { display: flex; gap: 12px; padding: 6px 0; }
.verlauf-punkt { width: 8px; height: 8px; border-radius: 50%; background: var(--akzent); margin-top: 7px; flex: none; }
.unter { font-size: 14px; font-weight: 600; margin-bottom: 8px; }

/* Tabelle */
.tabelle-box { overflow-x: auto; }
.tabelle { width: 100%; border-collapse: collapse; min-width: 640px; }
.tabelle th { text-align: left; color: var(--gedimmt); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; padding: 12px 14px; }
.tabelle td { padding: 12px 14px; border-top: 1px solid var(--linie-2); vertical-align: top; }
.tabelle tr:hover td { background: #FAFBFD; }
.tabelle tr.gewaehlt td { background: #1F5FB812; }
.tabelle tr.gewaehlt td:first-child { box-shadow: inset 3px 0 0 var(--akzent); }
.zeilen-link { font-weight: 600; color: var(--text); text-decoration: none; }
.zeilen-link:hover { color: var(--akzent); text-decoration: underline; }

/* Detail */
.karte .detail-titel { font-family: Montserrat, sans-serif; font-size: 22px; font-weight: 700; margin: 8px 0 2px; }
.aktionen { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.aktionen a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border: 1px solid var(--linie); border-radius: 10px; text-decoration: none; color: var(--navy); font-size: 12px; font-weight: 500; }
.aktionen a:hover { background: var(--grund); }
.daten { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px 12px; margin: 0; padding-top: 14px; border-top: 1px solid var(--linie-2); }
.daten dt { color: var(--gedimmt); }
.daten dd { margin: 0; overflow-wrap: anywhere; }

/* Buttons & Formulare */
.btn-primaer, .btn-sek { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 10px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn-primaer { background: var(--akzent); color: #fff; border: 0; }
.btn-primaer:hover { background: #194E97; color: #fff; }
.btn-sek { background: #fff; color: var(--navy); border: 1px solid var(--rand-feld); font-weight: 500; }
.btn-sek:hover { background: var(--grund); color: var(--navy); }
.breit { width: 100%; }
.meldung { padding: 12px 14px; border-radius: 10px; font-weight: 500; }
.meldung.fehler { background: var(--rot-bg); color: var(--rot); }

/* Login */
.login-seite { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--grund); }
.login-karte { width: 100%; max-width: 400px; background: #fff; border: 1px solid var(--linie); border-radius: 18px; padding: 36px 32px; display: flex; flex-direction: column; gap: 14px; }
.login-logo { width: 150px; height: 150px; align-self: center; }
.login-karte h1 { font-family: Montserrat, sans-serif; font-size: 22px; font-weight: 700; }
.formular { display: flex; flex-direction: column; gap: 14px; }
.feld { display: flex; flex-direction: column; gap: 6px; }
.feld label { font-weight: 500; }
.feld input { height: 44px; border: 1px solid var(--rand-feld); border-radius: 10px; padding: 0 12px; font: inherit; color: var(--text); }
.feld input:focus { outline: 2px solid var(--akzent); outline-offset: 1px; border-color: var(--akzent); }
.check { display: flex; align-items: center; gap: 10px; }
.check input { width: 18px; height: 18px; accent-color: var(--navy); }

@media (max-width: 640px) {
    .kopf, .haupt { padding-left: 16px; padding-right: 16px; }
    .nav { border-right: 0; border-bottom: 1px solid var(--linie); }
}

/* Formulare (Erfassen & Bearbeiten) */
.raster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.raster.vier { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.raster.eng { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--linie-2); }
.span2 { grid-column: span 2; }
.span4 { grid-column: 1 / -1; }
.feld select, .feld textarea { border: 1px solid var(--rand-feld); border-radius: 10px; padding: 10px 12px; font: inherit; color: var(--text); background: #fff; }
.feld select { height: 44px; padding: 0 10px; }
.feld textarea { resize: vertical; min-height: 80px; }
.feld select:focus, .feld textarea:focus { outline: 2px solid var(--akzent); outline-offset: 1px; border-color: var(--akzent); }
.feld input[type=date] { height: 44px; }
.meldung.ok { background: var(--gruen-bg); color: var(--gruen); }
.schmal { max-width: 860px; }
.inline-suche { display: flex; gap: 8px; margin-top: 12px; }
.inline-suche input { flex: 1; min-width: 0; height: 40px; border: 1px solid var(--rand-feld); border-radius: 10px; padding: 0 12px; font: inherit; }
.inline-suche .btn-sek { height: 40px; }
.treffer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--linie-2); margin: 0; }
.klein-btn { height: 34px; padding: 0 12px; font-size: 13px; }
.klein-avatar { width: 34px; height: 34px; font-size: 12px; flex: none; }
.knopf { border: 0; background: transparent; cursor: pointer; font-size: 14px; }
.mehrzeilig { white-space: pre-line; color: var(--text-2); margin-top: 2px; }
.akt form { margin: 0; }
@media (max-width: 760px) {
    .raster, .raster.vier { grid-template-columns: minmax(0, 1fr); }
    .span2, .span4 { grid-column: 1 / -1; }
}

/* Akquise */
.schritt-nr { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 13px; align-items: center; justify-content: center; margin-right: 8px; vertical-align: 2px; }
.hinweis-klein { color: var(--gedimmt); font-size: 12px; margin-top: 6px; }
.aufklapp { margin-top: 16px; border-top: 1px solid var(--linie-2); padding-top: 12px; }
.aufklapp summary { cursor: pointer; font-weight: 500; color: var(--akzent); }
.projekt-info { background: var(--grund); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.hr-box { background: #F7F9FC; border: 1px solid var(--linie); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wahl { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--linie); border-radius: 10px; background: #fff; cursor: pointer; }
.wahl input { margin-top: 3px; accent-color: var(--navy); }
.trenner { border-top: 1px solid var(--linie-2); margin: 18px 0 14px; }
.empfaenger { min-height: 44px; display: flex; align-items: center; padding: 0 12px; background: var(--grund); border-radius: 10px; color: var(--text-2); }
.hinweis-box { background: var(--blau-bg); color: var(--blau); border-radius: 10px; padding: 10px 14px; font-size: 13px; }
.tabelle.kompakt { min-width: 560px; }
.tabelle.kompakt td, .tabelle.kompakt th { padding: 8px 12px; }
.tabelle tr.total td { font-weight: 700; background: #EEF3F9; }

/* Aktivitaeten */
.filter-raster { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.filter-knoepfe { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.seiten { display: flex; gap: 12px; align-items: center; justify-content: center; }
.gruppe { border: 1px solid var(--linie); border-radius: 12px; padding: 12px 16px 16px; margin: 0; min-width: 0; }
.gruppe legend { font-weight: 600; padding: 0 6px; }
.wahl-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin-top: 6px; }
.wahl-raster .wahl { align-items: center; }
.wahl-raster .wahl input { margin-top: 0; width: 16px; height: 16px; }
.loesch-zeile { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.btn-gefahr { height: 44px; padding: 0 18px; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer; background: #fff; color: var(--rot); border: 1px solid var(--rot); }
.btn-gefahr:hover { background: var(--rot-bg); }
@media (max-width: 760px) { .filter-raster { grid-template-columns: minmax(0, 1fr); } }

/* Pitch-Vorlagen */
.tabelle .zahl { text-align: right; white-space: nowrap; }
.platzhalter { display: flex; flex-wrap: wrap; gap: 6px; }
.ph { font: 12px/1 ui-monospace, Consolas, monospace; padding: 7px 8px; border: 1px solid var(--linie); border-radius: 8px; background: var(--grund); color: var(--navy); cursor: pointer; }
.ph:hover { border-color: var(--akzent); color: var(--akzent); }
.feld textarea.mono { font: 14px/1.5 ui-monospace, Consolas, monospace; }
.vorschau { border: 1px solid var(--linie); border-radius: 12px; padding: 24px 28px; background: #fff; font-family: Aptos, Calibri, Arial, sans-serif; font-size: 15px; line-height: 1.45; max-width: 760px; }
.vorschau.brief { box-shadow: 0 1px 3px rgba(15, 30, 60, .08); }
.vorschau-wahl select { height: 38px; min-width: 260px; }

/* Rechnungen */
.trenn-strich { width: 1px; height: 28px; background: var(--linie); margin: 0 4px; }
.inline-form { display: inline-flex; gap: 8px; align-items: center; margin: 0; }
.inline-form select { height: 40px; border: 1px solid var(--rand-feld); border-radius: 20px; padding: 0 14px; font: inherit; color: var(--navy); background: #fff; }
.tabellen-titel { padding: 16px 16px 4px; margin: 0; font-size: 15px; }
.knopf-zelle { text-align: right; }
.knopf-zelle .knopf { margin-left: 6px; }
.knopf.rot { color: var(--rot); }
.betrag-raster { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr) minmax(0, 3fr) minmax(0, 1fr); gap: 12px 16px; }
.datum-klein { height: 36px; border: 1px solid var(--rand-feld); border-radius: 8px; padding: 0 8px; font: inherit; }
.tabelle tr.gedimmt td { color: var(--gedimmt); }
.logo-vorschau { background: var(--grund); border-radius: 10px; padding: 14px; display: flex; justify-content: center; }
.logo-vorschau img { max-height: 90px; max-width: 100%; }
@media (max-width: 760px) { .betrag-raster { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } }

/* Zeiten & Ferien */
.zeit-raster { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .6fr) minmax(0, .6fr) minmax(0, 3fr) auto; gap: 12px 14px; align-items: end; }
.zeit-raster .zr-opp { grid-column: 1 / -1; }
.zeit-raster .zr-knopf .btn-primaer { height: 44px; }
.tabelle tr.tag-summe td { background: #F7F9FC; color: var(--text-2); font-size: 12px; font-weight: 600; }
@media (max-width: 960px) { .zeit-raster { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .zeit-raster .zr-opp, .zeit-raster .zr-text { grid-column: 1 / -1; } }

/* Aktuelle Opportunitaet (Kontext) */
.kontext { display: flex; align-items: center; gap: 6px; min-width: 0; margin-left: 12px; margin-right: auto; }
.kontext-name { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 20px; background: var(--blau-bg); color: var(--navy); font-weight: 600; text-decoration: none; max-width: 320px; }
.kontext-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kontext-name svg, .kontext-knopf svg { width: 16px; height: 16px; flex: none; }
.kontext-knopf { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: 17px; color: var(--text-2); text-decoration: none; font-size: 13px; white-space: nowrap; }
.kontext-knopf:hover { background: var(--grund); color: var(--navy); }
.opp-feld .label-text { font-weight: 500; }
.opp-gewaehlt { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 44px; padding: 6px 12px; border: 1px solid var(--rand-feld); border-radius: 10px; background: #F7F9FC; }
.opp-gewaehlt.leer-feld { background: #fff; border-style: dashed; justify-content: space-between; }
.opp-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; margin-right: auto; }
.opp-name svg { width: 16px; height: 16px; }
.opp-schnell { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.chip-klein { font-size: 12px; padding: 4px 10px; border-radius: 12px; border: 1px solid var(--linie); background: #fff; color: var(--navy); text-decoration: none; }
.chip-klein:hover { border-color: var(--navy); }
.inline-suche.gross { margin-top: 0; }
.inline-suche.gross input { height: 48px; font-size: 16px; }
.inline-suche.gross .btn-primaer { height: 48px; }
.treffer-liste { list-style: none; margin: 0; padding: 0; }
.treffer-liste li a { display: flex; flex-direction: column; gap: 2px; padding: 12px 20px; border-top: 1px solid var(--linie-2); text-decoration: none; color: var(--text); }
.treffer-liste li:first-child a { border-top: 0; }
.treffer-liste li a:hover { background: var(--grund); }
@media (max-width: 900px) { .kontext-name { max-width: 180px; } .kontext { margin-left: 0; } }

/* Opportunitaet komplett */
.favorit-an { color: #B7791F; border-color: #E9C46A; background: #FFF8E6; }
.reiter { display: flex; gap: 4px; border-bottom: 1px solid var(--linie); padding: 0 12px; overflow-x: auto; }
.reiter a { padding: 14px 12px 12px; text-decoration: none; color: var(--text-2); font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap; }
.reiter a.aktiv { color: var(--navy); border-bottom-color: var(--akzent); }
.reiter a:hover { color: var(--navy); }
.reiter-inhalt { padding: 16px 20px 20px; }
.kpis.drei { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.auswahl-flex { flex: 1; min-width: 0; height: 40px; border: 1px solid var(--rand-feld); border-radius: 10px; padding: 0 10px; font: inherit; background: #fff; }
@media (max-width: 760px) { .kpis.drei { grid-template-columns: minmax(0, 1fr); } }

/* Sales-Pipeline */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.spalte { background: #EEF2F7; border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.spalte-kopf { display: flex; justify-content: space-between; align-items: center; font-weight: 600; color: var(--navy); padding: 4px 4px 2px; }
.karten-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.pkarte { background: #fff; border: 1px solid var(--linie); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pkarte-kopf { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.pkarte-kopf a { text-decoration: none; color: var(--navy); overflow-wrap: anywhere; }
.pkarte-edit summary { cursor: pointer; color: var(--text-2); font-size: 13px; margin-top: 2px; }
.pkarte-edit[open] { display: flex; flex-direction: column; gap: 6px; }
.pkarte-edit select, .pkarte-edit input { height: 36px; border: 1px solid var(--rand-feld); border-radius: 8px; padding: 0 8px; font: inherit; font-size: 13px; background: #fff; min-width: 0; }
.tabelle.rollen td { padding: 6px 8px; }

/* Pitch-Szenarien / Factsheets */
.anhang-tabelle { min-width: 900px; }
.zelle-eingabe { width: 100%; min-width: 120px; height: 34px; border: 1px solid var(--rand-feld); border-radius: 8px; padding: 0 8px; font: inherit; font-size: 13px; background: #fff; }
.zahl-eingabe { width: 64px; min-width: 64px; text-align: right; }
.ersetzen { display: inline-block; margin: 0 6px; }
.ersetzen summary { cursor: pointer; display: inline; }
.ersetzen[open] { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.anhang-neu { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) auto; gap: 12px 14px; align-items: end; padding: 16px 20px 8px; border-top: 1px solid var(--linie-2); }
.anhang-neu.zwei { grid-template-columns: minmax(0, 2fr) auto; }
.anhang-neu.vier { grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) minmax(0, 1fr) auto; }
@media (max-width: 760px) { .anhang-neu, .anhang-neu.zwei, .anhang-neu.vier { grid-template-columns: minmax(0, 1fr); } }
.aktionen-stapel { display: flex; flex-direction: column; gap: 4px; white-space: nowrap; }
.anhang-tabelle td:first-child .zelle-eingabe { min-width: 200px; }
.liste-kopf { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--linie-2); }
.edit-tabelle td { vertical-align: middle; }
.edit-tabelle .zahl-eingabe { width: 76px; }

.wahl-mit-link { display: flex; flex-direction: column; gap: 4px; }
.wahl-mit-link > a { padding-left: 12px; }
.druck-box { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.weitere-fs { margin-top: 10px; border: 1px dashed var(--linie); border-radius: 10px; padding: 8px 12px; background: #fbfcfe; }
.weitere-fs > summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.weitere-fs .unter { margin-top: 10px; }
.inaktiv-zeile td { opacity: .55; }
.trenner { border-top: 1px solid var(--linie); margin: 6px 0; }
.ki-box { border: 1px solid #d9d2f5; background: #f8f6ff; border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.ki-box .ki-kopf { font-weight: 600; color: #4b3a99; }
.ki-box textarea { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid var(--linie); border-radius: 8px; }
.ki-box .chips { align-items: center; }
textarea.ki-text { border-color: #b9a9f0; background: #fdfcff; }
.normal { font-weight: 400; }
.gruen-text { color: var(--gruen); font-weight: 500; margin-top: 4px; }
.nachfass-zeile { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; padding: 8px 10px; background: #f6f8fb; border: 1px dashed var(--linie); border-radius: 10px; }
.nachfass-zeile input[type=date] { width: 150px; }
.nachfass-zeile input[name=nfbez] { flex: 1; min-width: 200px; }
.nachfass-zeile .klein { flex-basis: 100%; }
.nachfass-zeile input { padding: 6px 8px; border: 1px solid var(--linie); border-radius: 8px; font: inherit; background: #fff; }

/* ---------- Mehr Kontrast: klare Flaechen und Linien ---------- */
.karte, .kpi { box-shadow: var(--schatten); }
.kopf { box-shadow: 0 1px 0 var(--linie), 0 2px 6px rgba(20, 43, 68, .05); }
.nav { border-right-color: var(--linie); }
.tabelle th { background: #EEF2F6; border-bottom: 1px solid var(--linie); color: var(--text-2); }
.tabelle td { border-top-color: var(--linie-2); }
.tabelle tr:hover td { background: #EEF3F9; }
.tabelle tbody tr:nth-child(even) td { background: #FAFBFC; }
.tabelle tbody tr:nth-child(even):hover td { background: #EEF3F9; }
.feld input, .feld select, .feld textarea { border-color: var(--rand-feld); background: #fff; }
.feld input:hover, .feld select:hover, .feld textarea:hover { border-color: #7F8C9D; }
.feld input:disabled, .feld select:disabled, .feld textarea:disabled { background: #F1F4F7; color: var(--gedimmt); }
.feld > label:not(.check), .unter { color: var(--text); font-weight: 600; }
.btn-sek:hover { background: #E8EEF5; border-color: #7F8C9D; }
.akt { border-top-color: var(--linie-2); }
.suche { background: #fff; border-color: var(--rand-feld); }
.hinweis-box { border: 1px solid #B9CDEA; }
.meldung { border: 1px solid transparent; }
.meldung.ok { border-color: #A9D8B9; }
.meldung.fehler { border-color: #EBB2B2; }
.wahl { border-color: var(--rand-feld); }
.nav a:not(.logo):hover { background: #E3E9F1; }
.nav a.active { background: #DCE7F6; box-shadow: inset 3px 0 0 var(--akzent); }
.nav-fuss { border-top-color: var(--linie); }
.badge { border: 1px solid rgba(20, 43, 68, .12); }

/* ---------- Farbflaechen: Kopfband der Karten, getoente Navigation ---------- */
.nav { background: var(--nav-grund); }
.nav a.active { background: #fff; box-shadow: inset 3px 0 0 var(--akzent), 0 1px 3px rgba(20, 43, 68, .10); }
.nav a:not(.logo):hover { background: #DDE6F1; }
.kopf { background: #fff; border-bottom: 1px solid var(--linie); }
.karte:not(.ohne-pad) > h2:first-child,
.karte:not(.ohne-pad) > .karte-kopf:first-child {
    margin: -18px -20px 16px; padding: 13px 20px; background: var(--band);
    border-bottom: 1px solid var(--linie-2); border-radius: var(--radius) var(--radius) 0 0;
}
.karte:not(.ohne-pad) > .karte-kopf:first-child h2 { margin: 0; }
.karte.ohne-pad > .karte-kopf:first-child, .karte.ohne-pad > h2:first-child {
    background: var(--band); border-bottom: 1px solid var(--linie-2); padding-bottom: 12px !important; margin-bottom: 0;
}
details.karte > summary { background: var(--band); margin: -18px -20px 0; padding: 13px 20px; border-radius: var(--radius); cursor: pointer; }
details.karte[open] > summary { border-radius: var(--radius) var(--radius) 0 0; border-bottom: 1px solid var(--linie-2); margin-bottom: 14px; }
.tabelle th { background: var(--band); border-bottom: 1px solid var(--linie); color: var(--navy); }
.tabelle tbody tr:nth-child(even) td { background: #F6F8FB; }
.kpi { border-top: 4px solid var(--akzent); }
.kpis > :nth-child(2) { border-top-color: #2E8B57; }
.kpis > :nth-child(3) { border-top-color: #C9861A; }
.kpis > :nth-child(4) { border-top-color: #6A4FB5; }
.karte .daten { background: #F6F8FB; border: 1px solid var(--linie-2); border-radius: 10px; padding: 12px 14px; }
.hinweis-box { background: #E5EEFA; }
.wahl { background: #F8FAFD; }
.wahl:has(input:checked) { background: #E3EDFA; border-color: var(--akzent); }
.btn-sek { background: #F4F7FB; }
.feld input, .feld select, .feld textarea { background: #fff; }
.akt-icon { background: #DCE8F8; }
/* keine doppelte Linie direkt unter dem Kopfband */
.karte > :is(h2, .karte-kopf):first-child + :is(.akt, .aufgabe, .person-zeile, .treffer),
.karte > :is(h2, .karte-kopf):first-child + .leer + :is(.akt, .aufgabe, .person-zeile, .treffer) { border-top: 0; padding-top: 4px; }
