/* ---------- Bereich Vertrieb (Präfix vt-) ---------- */
.vt-seite { display: flex; flex-direction: column; gap: 20px; }
.vt-gedimmt { color: #585a5f; }
.vt-gruen { color: #146c43; }
.vt-ueberzogen { color: #9a6206; }
.vt-nowrap { white-space: nowrap; }
.vt-leer { margin: 0; font-style: italic; color: #5c636a; }
.vt-mitte { padding: 12px 4px; text-align: center; }
.vt-zwischen { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; }

/* Eingaben */
.vt-eingabe { min-height: 32px; box-sizing: border-box; padding: 5px 8px; border: 1px solid #8a8a89; border-radius: 4px; background: #fff; font: inherit; color: #161616; width: 100%; }
.vt-eingabe:focus { outline: none; border-color: #1f7fcf; box-shadow: 0 0 0 .2rem rgba(31,127,207,.25); }
.vt-eingabe:disabled, fieldset:disabled .vt-eingabe { background: #f2f2f2; color: #3f3f3e; }
.vt-suche { width: 200px; }
.vt-breit { width: 100%; }
.vt-text { white-space: pre-wrap; font: inherit; }
.vt-nurlesen { padding: 6px 8px; border-radius: 4px; background: #f2f2f2; color: #3f3f3e; }
.vt-klein-btn { min-height: 24px; padding: 2px 8px; font-size: 12px; }

/* Filter und Reiter */
.vt-filterleiste { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.vt-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.vt-tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid #e0e0e0; }
.vt-tabs button { min-height: 32px; padding: 5px 10px; border: 0; border-bottom: 3px solid transparent; background: transparent; font: inherit; color: #161616; cursor: pointer; }
.vt-tabs button:hover { background: #d6f2a4; }
.vt-tabs button.aktiv { background: #d6eefd; border-bottom-color: #46a9ff; }

/* Tags (Badge-Paletten des Entwurfs) */
.vt-tag { display: inline-flex; align-items: center; padding: 1px 6px; border-radius: 4px; font-size: 12px; white-space: nowrap; border: 1px solid #e1e8eb; background: #e1e8eb; color: #2c3332; }
.vt-tag.weiss { background: #fff; border-color: #d3d3d2; color: #2c3332; }
.vt-tag.info { background: #e8f3ff; border-color: #c7e4fb; color: #235b7e; }
.vt-tag.ok { background: #e7f7ec; border-color: #bce7c6; color: #1c7a3a; }
.vt-tag.warn { background: #fdf1da; border-color: #f5d9a8; color: #9a6206; }
.vt-tag.danger { background: #fbe9e6; border-color: #f0b9b0; color: #a01b1b; }
.vt-tags { display: flex; flex-wrap: wrap; gap: 4px; }
/* In Karten und Tag-Gruppen dürfen lange Tags und Badges umbrechen statt über den Rand zu ragen. */
.vt-tags .vt-tag, .vt-lead .vt-tag, .vt-lead .km-badge { white-space: normal; max-width: 100%; overflow-wrap: break-word; }

/* Hinweisboxen */
.vt-box { padding: 10px 14px; border-radius: 8px; border: 1px solid #e1e8eb; background: #f8f9fa; color: #2c3332; }
.vt-box.info { background: #e8f3ff; border-color: #c7e4fb; color: #235b7e; }
.vt-box.ok { background: #e7f7ec; border-color: #bce7c6; color: #1c7a3a; }
.vt-box.warn { background: #fdf1da; border-color: #f5d9a8; color: #9a6206; }
.vt-box.danger { background: #fbe9e6; border-color: #f0b9b0; color: #a01b1b; }
.vt-box.neutral { background: #f8f9fa; border-color: #e9ecef; color: #2c3332; }

/* Karten mit grünem Kopf */
.vt-karte { box-sizing: border-box; background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,.1); overflow: hidden; }
.vt-karte-kopf { min-height: 56px; box-sizing: border-box; padding: 8px 16px; background: #acde79; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; color: #2c3332; }
.vt-karte-kopf h2 { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.2; color: #2c3332; }
.vt-karte-kopf .km-klein, .vt-kopf-text { color: #2c3332; }
/* Hauptknopf in der grünen Kopfzeile wie die übrigen Knöpfe weiß mit grauem Rand (grün auf grün ist kaum zu sehen). */
.vt-karte-kopf .pf-btn-primaer { background: #fff; border-color: #d3d3d2; color: #3f3f3e; }
.vt-karte-kopf .pf-btn-primaer:hover:not(:disabled) { background: var(--km-blau); border-color: var(--km-blau); color: #000; }
.vt-karte-inhalt { padding: 16px; display: flex; flex-direction: column; gap: 12px; }

/* Kennzahlen */
.vt-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.vt-kpi { display: flex; flex-direction: column; padding: 12px 16px; border-radius: 8px; background: #f8f9fa; border: 1px solid #e9ecef; }
.vt-kpi-wert { font-size: 24px; font-weight: 700; line-height: 1.5; color: #146c43; }
.vt-kpi-wert.warn { color: #9a6206; }
.vt-legende { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 12px; color: #585a5f; }

/* Board */
.vt-board-rahmen { overflow-x: auto; padding-bottom: 4px; }
.vt-board { display: grid; grid-template-columns: repeat(var(--vt-spalten, 5), minmax(172px, 1fr)); gap: 10px; align-items: start; min-width: calc(var(--vt-spalten, 5) * 182px - 10px); }
.vt-spalte { box-sizing: border-box; display: flex; flex-direction: column; gap: 8px; min-height: 480px; padding: 10px; border-radius: 8px; background: rgba(225,232,235,.5); border: 1px solid #e0e0e0; }
.vt-spalte-kopf { padding: 0 2px 6px; border-bottom: 3px solid #aec6d5; }
.vt-spalte-titel { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.vt-spalte-titel h3 { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.3; color: #333; }
.vt-lead { box-sizing: border-box; display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 8px; background: #fff; border: 1px solid #e0e0e0; box-shadow: 0 2px 8px rgba(0,0,0,.1); font-size: 12px; }
.vt-klickbar { cursor: pointer; }
.vt-klickbar:hover { border-color: #1f7fcf; }
.vt-tabelle tbody tr.vt-klickzeile { cursor: pointer; }
.vt-tabelle tbody tr.vt-klickzeile:hover { background: #d6eefd; }
.vt-lead-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; }
.vt-lead-vza { flex: none; font-weight: 600; color: #585a5f; }
.vt-lead-fuss { display: flex; flex-direction: column; gap: 4px; padding-top: 6px; border-top: 1px solid #e0e0e0; }
.vt-link { padding: 0; border: 0; background: transparent; font: inherit; font-weight: 600; line-height: 1.3; color: #2c3332; text-align: left; text-decoration: underline; text-decoration-color: #aec6d5; cursor: pointer; }
.vt-lead .vt-link { font-size: 14px; }
.vt-link:focus-visible { outline: 2px solid #1f7fcf; outline-offset: 2px; }

/* Tabellen */
.vt-tabelle-rahmen { overflow-x: auto; }
.vt-tabelle { width: 100%; border-collapse: collapse; font-size: 14px; }
.vt-tabelle th { text-align: left; font-weight: 600; color: #161616; background: #f2f2f2; padding: 6px 8px; border-bottom: 1px solid #e0e0e0; white-space: nowrap; }
.vt-tabelle td { padding: 6px 8px; border-bottom: 1px solid #e0e0e0; vertical-align: top; }
.vt-tabelle tbody tr:nth-child(even) { background: rgba(225,232,235,.5); }
.vt-punkt { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }

/* Detail */
.vt-detail-raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px 24px; }
.vt-detail-raster h3, .vt-panel h3, .vt-buchung h3 { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: #333; }
.vt-kv { margin: 0; display: grid; grid-template-columns: minmax(0, 140px) minmax(0, 1fr); gap: 4px 12px; }
.vt-kv dt { color: #5c636a; }
.vt-kv dd { margin: 0; font-weight: 600; }
.vt-buchung { margin-top: 16px; }
.vt-buchung .vt-kv { grid-template-columns: minmax(0, 320px) minmax(0, 1fr); }
@media (max-width: 640px) { .vt-buchung .vt-kv { grid-template-columns: minmax(0, 1fr); } .vt-buchung .vt-kv dd { margin-bottom: 6px; } }
.vt-verlauf { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.vt-verlauf li { padding-left: 10px; border-left: 3px solid #d6f2a4; }
.vt-verlauf li .km-klein { display: block; }
.vt-notiz { display: flex; gap: 8px; margin-top: 10px; }
.vt-aktionen { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid #e0e0e0; }
.vt-aktionen a.pf-btn, .vt-karte a.pf-btn { text-decoration: none; display: inline-flex; align-items: center; }

/* Formular Interessent */
.vt-formular-raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px 24px; }
.vt-feldgruppe { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.vt-feldgruppe legend { padding: 0; margin-bottom: 12px; font-size: 14px; font-weight: 600; color: #333; }
.vt-feldgruppe .km-label { margin-bottom: 4px; }
.vt-dubletten { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.vt-dublette { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 8px 12px; border-radius: 4px; background: #fff; border: 1px solid #f5d9a8; color: #2c3332; }
.vt-bereichswahl { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.vt-bereich { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid #d3d3d2; border-radius: 8px; background: #fff; font: inherit; text-align: left; cursor: pointer; }
.vt-bereich > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.vt-bereich.an { border: 2px solid #1f7fcf; background: #f0f6e9; }
.vt-bereich:disabled { cursor: default; }
.vt-haken { flex: none; width: 18px; height: 18px; border-radius: 4px; border: 1px solid #8a8a89; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.vt-bereich.an .vt-haken { background: #acde79; border-color: #acde79; }
.vt-panels { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.vt-panel { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid #e0e0e0; border-radius: 8px; }
.vt-panel-felder { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.vt-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.vt-checks .km-label { width: 100%; }
.vt-vza { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px 24px; }
.vt-vza > div { display: flex; flex-direction: column; gap: 8px; }
.vt-vza-kopf, .vt-vza-zeile { display: grid; grid-template-columns: 110px 110px 1fr 40px; gap: 8px; align-items: center; }
.vt-vza-kopf { font-size: 12px; color: #5c636a; }
.vt-vza-rechts { display: flex; flex-direction: column; gap: 12px; }
.vt-formel { margin-top: 8px; font-weight: 600; }
.vt-gross strong { font-size: 32px; color: #146c43; }
.vt-positionen { border: 1px solid #e0e0e0; border-radius: 8px; overflow: hidden; }
.vt-pos-kopf, .vt-pos-zeile, .vt-pos-summe { display: flex; justify-content: space-between; gap: 12px; padding: 6px 10px; }
.vt-pos-kopf { background: #f2f2f2; font-weight: 600; }
.vt-pos-zeile:nth-child(odd) { background: rgba(225,232,235,.5); }
.vt-pos-zeile strong { white-space: nowrap; }
.vt-pos-summe { border-top: 1px solid #e0e0e0; font-weight: 600; }
.vt-fussleiste { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; padding-top: 12px; border-top: 1px solid #e0e0e0; }

/* Dialog */
.vt-dialog-hintergrund { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.35); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; }
.vt-dialog { width: 640px; max-width: 100%; background: #fff; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.25); overflow: hidden; }
.vt-dialog-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 12px 16px; background: #acde79; }
.vt-dialog-kopf h2 { margin: 0; font-size: 18px; }
.vt-dialog-inhalt { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.vt-dialog-fuss { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid #e0e0e0; }

/* Mailvorlagen */
.vt-zwei-spalten { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 20px; align-items: start; }
.vt-schalter { position: relative; width: 40px; height: 24px; border: 0; border-radius: 12px; background: #adb5bd; cursor: pointer; }
.vt-schalter span { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; }
.vt-schalter.an { background: #acde79; }
.vt-schalter.an span { left: 19px; }
.vt-schalter:focus-visible { outline: 2px solid #1f7fcf; outline-offset: 2px; }
.vt-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.vt-chip { padding: 2px 6px; border: 1px solid #e1e8eb; border-radius: 4px; background: #e1e8eb; font-family: Consolas, "Courier New", monospace; font-size: 11px; cursor: pointer; }
.vt-chip:hover { background: #d6eefd; }
.vt-mail { border: 1px solid #e0e0e0; border-radius: 8px; overflow: hidden; }
.vt-mail-kopf { padding: 10px 14px; background: #f8f9fa; border-bottom: 1px solid #e0e0e0; }
.vt-mail-text { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.vt-mail-text p { margin: 0; white-space: pre-wrap; }
.vt-zeitstrahl { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 8px 10px; border-radius: 6px; background: #f8f9fa; font-size: 12px; }
.vt-station { padding: 1px 6px; border-radius: 4px; color: #5c636a; }
.vt-station.erledigt { color: #1c7a3a; }
.vt-station.aktuell { background: #acde79; color: #000; font-weight: 600; }
.vt-mail-liste { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.vt-mail-ueberschrift { font-weight: 700; font-size: 15px; margin-top: 8px !important; }
.vt-bedingt { padding: 2px 0 2px 8px !important; border-left: 3px solid #46a9ff; background: #e8f3ff; }
.vt-signatur { margin-top: 8px; font-size: 12px; color: #3f3f3e; }
.vt-claim { margin-top: 6px; color: #146c43; font-weight: 600; }

@media (max-width: 700px) {
    .vt-suche { width: 100%; }
    .vt-zwei-spalten { grid-template-columns: 1fr; }
    .vt-kv { grid-template-columns: 1fr; }
}

/* Mögliche Dubletten */
.vt-dub-filter { display: inline-flex; align-items: center; gap: 6px; }
.vt-dub-badge { margin: 2px 4px 2px 0; white-space: normal; }
.vt-dub-aktionen { white-space: nowrap; }
.vt-dub-aktionen .pf-btn + .pf-btn { margin-left: 6px; }
.vt-dublettenlink { font-size: 14px; }

/* Dialog „Mail an den Interessenten“ (VertriebMailDialog) */
.pr-dialog.breit { width: min(1180px, 100%); }
.pr-zwei { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .pr-zwei { grid-template-columns: minmax(0, 1fr); } }
.pr-text { font-family: inherit; line-height: 1.4; resize: vertical; }
.pr-anhaenge { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.pr-anhaenge li { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; }
