/* ===================== Vermittler (Leitstand 2): Portal, Eingang, Prüfpanel =====================
   Nur Tokens aus styles.css. Präfix .vm- */

/* ---------- Intern: Kopf und Eingang ---------- */
.vm-intern-kopf .panel-head { margin-bottom: 10px; }
.vm-reiter { margin: 0; }
.vm-eingang-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; }
.vm-filter { max-width: 100%; }
.vm-liste { display: flex; flex-direction: column; gap: 10px; }
.vm-zeile { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px 14px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--flaeche-2); }
.vm-zeile:hover { border-color: var(--line-strong); }
.vm-z-haupt { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.vm-z-titel { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.vm-z-name { text-decoration: none; }
.vm-z-name b { font-size: 15px; }
.vm-z-name:hover b { text-decoration: underline; text-decoration-color: var(--ak-ln); }
.vm-z-info { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.vm-z-info b { color: var(--text); font-weight: 600; }
.vm-z-info .sep, .vm-p-meta .sep { margin: 0 6px; color: var(--muted-2); }
.vm-z-aktion { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.vm-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.vm-chip { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  border: 1px solid var(--line-strong); color: var(--muted); background: transparent; white-space: nowrap; }
.vm-chip.ok { background: var(--ok-bg); color: var(--ok-tx); border-color: var(--ok-ln); }
.vm-chip.fehlt { background: var(--warn-bg); color: var(--warn-tx); border-color: var(--warn-ln); }
.vm-hinweis-tag { cursor: help; }
.vm-hinweis-tag svg.i, .vm-z-aktion .tag svg.i { width: 12px; height: 12px; vertical-align: -1px; }

/* ---------- Prüfpanel auf der Setcard ---------- */
.vm-panel { display: flex; flex-direction: column; gap: 12px; }
.vm-panel .panel-head { margin-bottom: 0; }
.vm-panel .panel-head .sub a { color: inherit; }
.vm-p-satz { margin: 0; font-size: 13px; color: var(--muted); }
.vm-p-meta { margin: 0; }
.vm-entscheid { display: flex; flex-wrap: wrap; gap: 8px; }
.vm-entscheid .btn { flex: 1 1 auto; }
.vm-p-abgelehnt { margin: 0; }
.vm-p-teil { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.vm-p-teil h3 { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.vm-p-teil h3 svg.i { width: 16px; height: 16px; color: var(--ink); }
.vm-p-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.vm-p-mehr { border-top: 1px solid var(--line); padding-top: 10px; }
.vm-p-mehr > summary { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 700; font-size: 13.5px; list-style: none; }
.vm-p-mehr > summary::-webkit-details-marker { display: none; }
.vm-p-mehr > summary svg.i { width: 16px; height: 16px; color: var(--ink); }
.vm-p-mehr > .vm-p-teil { border-top: 0; padding-top: 8px; }
.vm-leer { margin: 0; }

.vm-check, .vm-hinweise, .vm-erinnerungen, .vm-d-liste, .vm-d-docs { list-style: none; margin: 0; padding: 0; }
.vm-check { display: grid; gap: 6px; }
.vm-check li { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; }
.vm-check-ic { flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 11px; font-weight: 700;
  border: 1px solid var(--line-strong); color: var(--muted); }
.ok > .vm-check-ic { background: var(--ok-bg); color: var(--ok-tx); border-color: var(--ok-ln); }
.fehlt > .vm-check-ic { background: var(--warn-bg); color: var(--warn-tx); border-color: var(--warn-ln); }
.vm-check-text { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding-top: 1px; }
.vm-doc { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; font-size: 12px; color: var(--muted); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vm-doc:hover { color: var(--text); }
.vm-doc svg.i { width: 13px; height: 13px; }
.vm-hinweise { display: grid; gap: 6px; }
.vm-h { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; }
.vm-h .tag { flex: none; margin-top: 1px; }
.vm-h a { white-space: nowrap; }
.vm-erinnerungen { display: grid; gap: 6px; }
.vm-erinnerungen li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.vm-erinnerungen li > div { flex-basis: 100%; }

/* Nachrichtenverlauf (intern und Portal) */
.vm-faden { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; padding: 2px 2px 2px 0; }
.vm-nachricht { max-width: 92%; padding: 9px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--flaeche-2); }
.vm-nachricht.eigen { align-self: flex-end; background: var(--ak-bg); border-color: var(--ak-ln); }
.vm-nachricht.fremd { align-self: flex-start; }
.vm-n-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12px; margin-bottom: 4px; }
.vm-n-text { font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.vm-mail { font-size: 11px; color: var(--muted-2); }
.vm-mail.gesendet { color: var(--ok-tx); }
.vm-mail.fehler, .vm-mail.nicht_gesendet { color: var(--warn-tx); }
.vm-antwort { display: flex; align-items: flex-end; gap: 8px; }
.vm-antwort textarea { flex: 1; min-width: 0; }

/* Pop-ups intern */
.vm-notice { margin: 0 0 12px; }
.vm-er-liste { display: flex; flex-wrap: wrap; gap: 2px 18px; margin-bottom: 8px; }
.vm-er-liste .check-line { margin: 4px 0; }
.vm-vorschau { padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--line-strong); background: var(--flaeche-2); font-size: 13px; max-height: 260px; overflow-y: auto; }
.vm-v-betreff { font-weight: 700; margin-bottom: 8px; }
.vm-v-betreff .muted { font-weight: 400; margin-right: 6px; }
.vm-v-text { white-space: pre-wrap; line-height: 1.5; color: var(--text); }
.vm-gruende { border: 1px solid var(--line); border-radius: 12px; padding: 6px 14px 4px; margin: 0 0 12px; }
.vm-gruende legend { font-size: 12px; color: var(--muted); padding: 0 6px; }
.vm-gruende .check-line { margin: 6px 0; }
#modal-box .vm-faden { margin-bottom: 12px; }

/* ---------- Portal (Rolle Vermittler) ---------- */
.vm-portal-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; padding: 22px 24px; position: relative; overflow: hidden; isolation: isolate; }
.vm-portal-kopf::before { content: ""; position: absolute; z-index: -1; width: 420px; height: 420px; right: -150px; top: -220px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(var(--ak-rgb), .12), transparent 66%); }
.vm-logo { flex: none; display: inline-flex; align-items: center; height: 52px; padding: 0 16px; border-radius: 13px; background: #fff; border: 1px solid var(--line); }
.vm-logo img { display: block; height: 26px; width: auto; max-width: 180px; object-fit: contain; }
body[data-mandant="med"] .vm-logo img { height: 34px; }
.vm-gruss { flex: 1 1 300px; min-width: 0; }
.vm-gruss h1 { font-size: 28px; line-height: 1.1; letter-spacing: -.03em; overflow-wrap: anywhere; }
.vm-gruss p { margin: 6px 0 0; }
.vm-kopf-knoepfe { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.vm-kacheln { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.vm-kachel { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 14px 16px; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.vm-kachel:hover { box-shadow: var(--sch-1), 0 0 0 1px var(--line-3); }
.vm-kachel[aria-pressed="true"] { box-shadow: var(--sch-1), 0 0 0 2px var(--fokus); }
.vm-k-ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--flaeche-2); border: 1px solid var(--line); color: var(--ink); }
.vm-k-ic svg.i { width: 18px; height: 18px; }
.vm-k-text { min-width: 0; display: flex; flex-direction: column; }
.vm-k-text b { font-size: 26px; line-height: 1.05; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.vm-k-text span { font-size: 12.5px; color: var(--muted); }
.vm-kachel.achtung .vm-k-text b { color: var(--orange); }
.vm-karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.vm-karte { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--flaeche-2); cursor: pointer; }
.vm-karte:hover { border-color: var(--line-3); }
.vm-karte-kopf { display: flex; align-items: center; gap: 12px; }
.vm-karte-status { display: flex; margin-top: -2px; }
.vm-karte-status .tag { white-space: normal; }
.vm-karte-titel { min-width: 0; display: flex; flex-direction: column; }
.vm-karte-name { padding: 0; border: 0; background: none; font: inherit; font-size: 15px; font-weight: 700; color: var(--text); text-align: left; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vm-karte-name:hover { text-decoration: underline; text-decoration-color: var(--ak-ln); }
.vm-karte-titel .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vm-karte-stand { display: flex; align-items: flex-start; gap: 7px; margin: 0; font-size: 13px; line-height: 1.4; }
.vm-karte-stand svg.i { width: 16px; height: 16px; margin-top: 1px; }
.vm-karte-stand.ok { color: var(--ok-tx); }
.vm-karte-stand.fehlt { color: var(--warn-tx); }
.vm-karte-fuss { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: auto; }
.vm-karte-fuss .spacer { flex: 1; }
.vm-zahl { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; font-size: 11px; font-weight: 700;
  background: var(--ak-btn); color: #fff; }

/* Einreichen und Nachreichen */
.vm-form .chipsel { margin-top: 2px; }
.vm-schritt { margin: 16px 0 8px; font-weight: 700; color: var(--text); }
.vm-schritt:first-child { margin-top: 0; }
.vm-schritt b { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 6px; border-radius: 50%; font-size: 12px; background: var(--flaeche-3); }
.vm-ablage { position: relative; min-width: 0; cursor: pointer; }
/* Natives Dateifeld unsichtbar, aber bedienbar (Tastatur, Bildschirmleser): die ganze Ablage ist das Klickziel */
.vm-ablage input[type=file] { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; border: 0; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.vm-ablage:focus-within { outline: 2px solid var(--ak); outline-offset: 2px; }
.vm-ablage.gewaehlt { border-style: solid; border-color: var(--ak-ln); }
.vm-ablage.gewaehlt small { color: var(--text); }
.vm-modal-kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.vm-modal-kopf h2 { margin: 0; }
.vm-ablage small { overflow-wrap: anywhere; }
.vm-ablage.gross { align-items: center; justify-content: center; gap: 6px; min-height: 120px; padding: 18px; text-align: center; border-width: 2px; }
.vm-ablage.gross > svg.i { width: 26px; height: 26px; color: var(--ink); }
.vm-ablage.gross > span { font-size: 15px; font-weight: 700; color: var(--text); }
.vm-bank { margin-top: 8px; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); }
.vm-form .upload-grid { grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); }
.vm-bank-lesen { margin-right: 8px; max-width: 100%; white-space: normal; text-align: left; height: auto; padding-top: 6px; padding-bottom: 6px; }
.vm-hinweis { display: flex; align-items: center; gap: 8px; margin: 16px 0 6px; }
.vm-hinweis svg.i { width: 16px; height: 16px; color: var(--ok-tx); flex: none; }

/* Detail-Pop-up */
.vm-detail { display: flex; flex-direction: column; gap: 12px; }
.vm-d-kopf { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding-right: 44px; }
.vm-d-titel { min-width: 0; flex: 1 1 200px; display: flex; flex-direction: column; }
.vm-d-titel h2 { margin: 0; overflow-wrap: anywhere; }
.vm-d-zu { position: absolute; top: 0; right: 0; }
.vm-d-raster { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.vm-d-teil { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--flaeche-2); }
.vm-d-teil h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.vm-d-teil h3 svg.i { width: 17px; height: 17px; color: var(--ink); }
.vm-d-teil > p { margin: 0; }
.vm-d-liste { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.vm-d-punkt { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.vm-d-inhalt { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.vm-d-inhalt > b { font-size: 13.5px; }
.vm-d-inhalt select, .vm-d-inhalt input:not([type=file]) { width: 100%; max-width: 360px; }
.vm-d-inhalt .upload-box { padding: 10px; }
.vm-d-wert { font-size: 13.5px; overflow-wrap: anywhere; }
.vm-iban { font-family: var(--mono); font-size: 12.5px; }
.vm-d-frei { border-top: 1px solid var(--line); padding-top: 10px; }
.vm-d-frei > summary { cursor: pointer; font-weight: 700; font-size: 13px; color: var(--muted); }
.vm-d-frei .upload-grid { margin-top: 10px; }
.vm-d-knopf { display: flex; justify-content: flex-end; margin-top: 4px; }
.vm-d-lbl { margin: 6px 0 0; }
.vm-d-docs { display: grid; gap: 6px; }
.vm-d-docs li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; overflow-wrap: anywhere; }
.vm-d-docs li svg.i { width: 14px; height: 14px; color: var(--muted); }

/* ---------- Breiten ---------- */
@media (max-width: 1100px) {
  .vm-kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vm-d-raster { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .vm-zeile { grid-template-columns: auto minmax(0, 1fr); padding: 12px; }
  .vm-z-aktion { grid-column: 1 / -1; justify-content: flex-start; }
  .vm-portal-kopf { padding: 18px 16px; gap: 14px; }
  .vm-gruss h1 { font-size: 23px; }
  .vm-kopf-knoepfe, .vm-kopf-knoepfe .btn { width: 100%; }
  .vm-kacheln { gap: 10px; }
  .vm-kachel { padding: 12px; gap: 10px; }
  .vm-k-text b { font-size: 22px; }
  .vm-karten { grid-template-columns: minmax(0, 1fr); }
  .vm-entscheid .btn { flex: 1 1 100%; }
  .vm-antwort { flex-direction: column; align-items: stretch; }
  .vm-nachricht { max-width: 100%; }
  .vm-d-teil { padding: 12px; }
}

/* Mehrere Kandidaten auf einmal (Portal, INTEGRATION) */
.vm-mehrfach { display: contents; }
.vm-import-zurueck { margin: 0 0 12px; }

/* ===================== Runde 2b: Eingang filtern, Setcards, Vermittler-Liste, Agenturdaten, Sperren ===================== */
/* Kopf mit Filtern (Vermittler, Suche, Land) und rechts Prüfung starten und Karten/Liste */
.vm-eingang-kopf { justify-content: space-between; margin-bottom: 12px; }
.vm-such { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: 1 1 520px; min-width: 0; }
.vm-such select { height: 36px; padding-top: 0; padding-bottom: 0; max-width: 100%; min-width: 0; }
.vm-such > select { flex: 0 1 230px; }
.vm-such > #vm-f-land, .vm-such > #ag-f-land { flex: 0 1 180px; }
.vm-suche { flex: 1 1 220px; min-width: 0; max-width: 340px; }
.vm-suche input { height: 36px; }
.vm-kopf-rechts { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-left: auto; }
#vm-pruef-slot:empty { display: none; }
.vm-pruef-start { white-space: nowrap; }
.vm-pruef-start .wahl-zahl { background: rgba(0, 0, 0, .28); color: #fff; }
.vm-ansicht button { height: 28px; }
.vm-filter .fc svg.i { width: 14px; height: 14px; }
.vm-aktiv { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.vm-aktiv > svg.i { width: 14px; height: 14px; color: var(--muted-2); }
.vm-aktiv b { color: var(--text); font-weight: 700; overflow-wrap: anywhere; }
#vm-inhalt, #ag-inhalt { margin-top: 14px; min-width: 0; }

/* Setcards im Eingang (Bausteine von Meine Kunden: .kv-raster, .kv-karte, .kv-fuss) */
.vm-ekarte .kv-oben { padding-right: 0; }
.vm-ek-name { display: block; max-width: 100%; padding: 0; border: 0; background: none; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.vm-ek-name b { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; font-size: 15.5px; line-height: 1.3; }
.vm-ek-name:hover b { text-decoration: underline; text-decoration-color: var(--ak-ln); }
.vm-ek-status, .vm-ek-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.vm-ek-status .tag { white-space: normal; }
.vm-ek-status .tag svg.i, .vm-ek-tags .tag svg.i { width: 12px; height: 12px; vertical-align: -1px; }
.vm-ek-von, .vm-ek-berater { display: flex; align-items: flex-start; gap: 7px; min-width: 0; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.vm-ek-von b { color: var(--text); font-weight: 600; }
.vm-ek-von svg.i, .vm-ek-berater svg.i { flex: none; width: 14px; height: 14px; margin-top: 1px; color: var(--muted-2); }
.vm-ek-von .sep { margin: 0 6px; color: var(--muted-2); }
.vm-ekarte.beantwortet { border-color: var(--info-ln); }
.vm-z-name { padding: 0; border: 0; background: none; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.vm-z-titel .tag svg.i { width: 12px; height: 12px; vertical-align: -1px; }

/* Pop-up „Öffnen“ (kompaktes Vermittler-Panel) */
.vm-oeffnen-host .vm-panel { box-shadow: none; background: transparent; border: 0; padding: 0; }

/* Vermittler-Liste (Agenturen) */
.ag-status button { height: 28px; padding: 0 11px; }
.ag-zahl { margin: 10px 0 0; }
.ag-karte.gesperrt { border-style: dashed; background: transparent; }
.ag-karte.gesperrt .avatar { filter: grayscale(1); opacity: .7; }
.ag-name { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; font-size: 15.5px; line-height: 1.3; color: var(--text); }
.ag-kontakt { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 13px; }
.ag-kontakt:empty { display: none; }
.ag-kontakt a { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; min-width: 0; color: var(--text); text-decoration: none; }
.ag-kontakt a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-kontakt a:hover { text-decoration: underline; text-decoration-color: var(--ak-ln); }
.ag-kontakt svg.i { flex: none; width: 14px; height: 14px; color: var(--muted-2); }
.ag-zahlen { display: flex; align-items: flex-start; gap: 7px; font-size: 13px; color: var(--muted); }
.ag-zahlen b { color: var(--text); }
.ag-zahlen svg.i { flex: none; width: 14px; height: 14px; margin-top: 2px; color: var(--muted-2); }
.ag-stand { display: flex; flex-wrap: wrap; gap: 6px; }
.ag-stand .tag, .ag-tabelle td .tag { white-space: normal; }
.ag-stand .tag svg.i, .ag-tabelle td .tag svg.i { width: 12px; height: 12px; vertical-align: -1px; }
.ag-meta { font-size: 12px; color: var(--muted-2); overflow-wrap: anywhere; }
/* Gesperrt: iPersonal sparsam rot, MediPersonal ohne Rot (neutral) */
.tag.ag-gesperrt { background: var(--neu-bg); color: var(--neu-tx); border-color: var(--neu-ln); }
body[data-mandant="bau"] .tag.ag-gesperrt { background: var(--gefahr-bg); color: var(--gefahr-tx); border-color: var(--gefahr-ln); }
body[data-mandant="bau"] .ag-sperren { color: var(--gefahr-tx); border-color: var(--gefahr-ln); }
body[data-mandant="bau"] .ag-sperren:hover { background: var(--gefahr-bg); }
/* Tabelle: feste Spalten, alles umbrechbar, Knöpfe immer sichtbar (ab 1280 px kein waagrechtes Scrollen) */
.ag-tabelle table { table-layout: fixed; }
.ag-tabelle col.ag-c-agentur { width: 27%; }
.ag-tabelle col.ag-c-akt { width: 226px; }
.ag-tabelle th, .ag-tabelle td { white-space: normal; overflow-wrap: anywhere; }
.ag-tabelle td { vertical-align: top; }
.ag-tabelle tbody tr { cursor: default; }
.ag-t-agentur b { display: block; }
.ag-t-person { font-weight: 600; margin-bottom: 2px; }
.ag-t-zahlen { font-size: 13px; color: var(--muted); }
.ag-t-zahlen b { color: var(--text); }
.ag-tabelle td.actions { text-align: right; }
.ag-t-akt { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.ag-t-akt .btn { margin: 0; }
.ag-t-akt .ag-sym { padding: 4px 7px; }
.ag-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ag-kontakt-zelle .ag-mail, .ag-kontakt-zelle .ag-tel { display: flex; align-items: flex-start; gap: 6px; font-size: 12.5px; color: var(--text); text-decoration: none; }
.ag-kontakt-zelle .ag-mail span { overflow-wrap: anywhere; }
.ag-kontakt-zelle svg.i { flex: none; width: 13px; height: 13px; margin-top: 2px; color: var(--muted-2); }
.ag-zeile-gesperrt td { color: var(--muted); }
.ag-mail-offen svg.i { width: 12px; height: 12px; vertical-align: -1px; }

/* Agenturdaten: Formular (Pflichtseite, Bearbeiten, Registrierung) */
.ag-form, .vm-reg { min-width: 0; }
.ag-teil { min-width: 0; margin: 0 0 12px; padding: 10px 16px 14px; border: 1px solid var(--line); border-radius: 14px; }
.ag-teil legend { padding: 0 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ag-raster2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.ag-raster2 > .breit { grid-column: 1 / -1; }
.ag-feld { min-width: 0; font-size: 12.5px; font-weight: 600; }
.ag-feld input, .ag-feld select { width: 100%; min-width: 0; }
.ag-lbl { color: var(--muted); }
.ag-stern { color: var(--ink); }
.ag-hinweis { font-size: 11.5px; font-weight: 400; color: var(--muted-2); }
.ag-form [aria-invalid="true"], .vm-reg [aria-invalid="true"], .ag-einladen [aria-invalid="true"] { border-color: var(--warn-ln) !important; box-shadow: 0 0 0 3px var(--warn-bg); }
.ag-einladen { grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); }
.ag-inv-result .copy-row input { min-width: 0; }
#ag-b-fehler, #ag-p-fehler, #inv-fehler { min-height: 1em; margin: 4px 0 0; font-size: 13px; color: var(--warn-tx); }

/* Pflichtseite und Meine Agentur (Portal) */
.vm-pflicht { max-width: 940px; }
.vm-pflicht-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-bottom: 16px; }
.vm-pflicht-kopf > div { flex: 1 1 300px; min-width: 0; }
.vm-pflicht-kopf h1 { font-size: 24px; line-height: 1.15; letter-spacing: -.02em; }
.vm-pflicht-kopf p { margin: 6px 0 0; color: var(--muted); }
.vm-pflicht-fuss { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.vm-gruss-agentur { color: var(--text); font-weight: 700; }
.ag-bereiche { margin-top: 4px; }
.ag-hinweis-zugang { margin: 8px 0 0; }
.ag-stand-zeit { margin: 12px 0 0; }

/* Registrierung über den Einladungslink (Bühne der Anmeldung, Bausteine .anm-*) */
.vm-reg-satz { display: flex; align-items: flex-start; gap: 8px; margin-top: 16px !important; }
.vm-reg-satz svg.i { flex: none; width: 16px; height: 16px; margin-top: 1px; color: var(--ink); }
.anm .vm-reg .ag-hinweis { font-weight: 400; color: var(--muted-2); }
.anm .vm-reg [aria-invalid="true"] { border-color: var(--ak-ln) !important; box-shadow: 0 0 0 4px rgba(var(--ak-rgb), .14); }
/* Ohne Bühne (Rückfall): breite Karte */
.vm-reg-karte.breit { width: min(780px, calc(100vw - 32px)); max-width: none; }

/* Runde 2i: Einladen mit Willkommens-E-Mail, offene Einladungen (nur Tokens, keine Markenfarbe fest, MediPersonal ohne Rot) */
.vm-einl-mailwahl { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 12px; }
.vm-einl-mailwahl .check-line { margin: 0; font-weight: 600; }
.vm-einl-mailwahl .ag-hinweis { padding-left: 26px; }
.vm-einl-mailwahl input:disabled + span { color: var(--muted); }
.vm-einl-postfach { margin: 8px 0 0; }
.vm-einl-postfach a { color: inherit; font-weight: 700; }
.vm-einl-ok { background: var(--ok-bg); border: 1px solid var(--ok-ln); border-radius: 10px; padding: 10px 14px; color: var(--text); }
.vm-einl-fehler { display: block; margin-top: 4px; font-size: 12.5px; color: var(--warn-tx); overflow-wrap: anywhere; }
.vm-einl-zahl { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-left: 6px; padding: 0 7px; border-radius: 999px;
  font-size: 12px; font-weight: 700; background: var(--flaeche-3); color: var(--text); vertical-align: 2px; }
.vm-einl-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.vm-einl-zeile { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 14px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--flaeche-2); }
.vm-einl-haupt { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.vm-einl-titel { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.vm-einl-titel b { font-size: 15px; }
.vm-einl-titel .muted { font-size: 13px; }
.vm-einl-adr { overflow-wrap: anywhere; color: var(--text); }
.vm-einl-mail, .vm-einl-verlauf li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12.5px; color: var(--muted); }
.vm-einl-wann { overflow-wrap: anywhere; }
.vm-einl-verlauf summary { cursor: pointer; width: fit-content; font-size: 12px; color: var(--muted); }
.vm-einl-verlauf ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.vm-einl-hinweise .notice { margin: 6px 0 0; }
.vm-einl-mehr { margin-top: 10px; }
.vm-einl-edit { margin-top: 4px; }
.vm-einl-vorschau { height: 340px; max-height: none; padding: 0; } /* Korrektur 2i: Höhe setzt vermittler.js nach dem Laden (ganze E-Mail sichtbar) */
/* Runde 2i Korrektur: «Meinten Sie …?», Meldungen ohne Rot (beide Abteilungen, Warn-Tokens), Adresse im Fenster hervorgehoben, Zurückziehen zurückhaltend */
.vm-einl-tipp { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 2px 0 12px; padding: 10px 14px; border-radius: 10px;
  background: var(--warn-bg); border: 1px solid var(--warn-ln); color: var(--text); }
.vm-einl-tipp b { overflow-wrap: anywhere; }
.vm-einl-tipp-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; }
.vm-einl-meldung { margin: 0; min-height: 1em; color: var(--text); }
.vm-einl-meldung:not(:empty) { margin: 8px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--warn-bg); border: 1px solid var(--warn-ln); overflow-wrap: anywhere; }
.vm-einl-kopf { align-items: start; }
.vm-einl-an { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--flaeche-2); }
.vm-einl-an .lbl { margin: 0; }
.vm-einl-an-adr { font-size: 16px; color: var(--text); overflow-wrap: anywhere; }
.vm-einl-an small { color: var(--muted); font-size: 12.5px; }
.vm-einl-korr { align-self: flex-start; margin-top: 4px; }
.vm-einl-zurueck { color: var(--muted); }
.vm-einl-zurueck:hover { color: var(--text); }

@media (max-width: 760px) {
  .vm-such, .vm-such > select, .vm-such > #vm-f-land, .vm-such > #ag-f-land, .vm-suche { flex: 1 1 100%; max-width: 100%; }
  .vm-kopf-rechts { margin-left: 0; justify-content: flex-start; width: 100%; }
  .vm-pruef-start { flex: 1 1 auto; justify-content: center; }
  .vm-filter { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .vm-filter::-webkit-scrollbar { display: none; }
  .vm-filter .fc { flex: none; }
  .ag-status { display: flex; width: 100%; }
  .ag-status button { flex: 1 1 auto; padding: 0 8px; }
  .ag-raster2 { grid-template-columns: minmax(0, 1fr); }
  .ag-teil { padding: 8px 12px 12px; }
  .vm-pflicht-kopf h1 { font-size: 21px; }
  .vm-pflicht-fuss .btn { width: 100%; }
  /* Tabelle der Vermittler auf dem Handy als Blöcke untereinander */
  .ag-tabelle table, .ag-tabelle tbody, .ag-tabelle tr, .ag-tabelle td { display: block; width: 100%; }
  .ag-tabelle colgroup, .ag-tabelle thead { display: none; }
  .ag-tabelle tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .ag-tabelle td { padding: 3px 4px; border: 0; }
  .ag-tabelle td.actions { text-align: left; padding-top: 8px; }
  .ag-t-akt { justify-content: flex-start; }
  /* Runde 2i: offene Einladungen untereinander, Knöpfe volle Breite */
  .vm-einl-zeile { grid-template-columns: minmax(0, 1fr); }
  .vm-einl-zeile .vm-z-aktion { justify-content: stretch; }
  .vm-einl-zeile .vm-z-aktion .btn { flex: 1 1 auto; justify-content: center; }
  #inv-los { width: 100%; justify-content: center; }
  .vm-einl-vorschau { height: 260px; }
  .vm-einl-tipp-knoepfe, .vm-einl-tipp-knoepfe .btn { width: 100%; justify-content: center; }
  .vm-einl-korr { align-self: stretch; justify-content: center; }
}

/* ================= Runde 2j: «An» (alle oder ein Berater), Ansprechperson mit Foto, direkte Nachrichten =================
   Portal (Sie-Form) und intern. Ruhig, Fotos rund, gewählte Person mit grünem Rand (beide Abteilungen ohne Rot). */
.vm-an { border: 0; margin: 0; padding: 0; min-width: 0; }
.vm-an legend { font-weight: 700; font-size: 13px; padding: 0; margin-bottom: 6px; }
.vm-an-liste { display: flex; flex-wrap: wrap; gap: 6px; max-height: 168px; overflow: auto; padding: 2px; }
.vm-an-wahl { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 8px !important; padding: 5px 12px 5px 6px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--flaeche-2); cursor: pointer; color: var(--text) !important; font-size: 13px; max-width: 100%; margin: 0 !important; position: relative; }
.vm-an-wahl input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.vm-an-wahl:has(input:checked) { border-color: var(--ok-tx); background: var(--ok-bg); font-weight: 700; }
.vm-an-wahl:has(input:focus-visible) { outline: 2px solid var(--fokus); outline-offset: 2px; }
.vm-an-wahl .avatar.xs { width: 24px; height: 24px; border-radius: 50%; font-size: 9.5px; }
.vm-an-alle { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--flaeche-3); color: var(--muted); flex: none; }
.vm-an-alle svg.i { width: 14px; height: 14px; }
.vm-an-name { min-width: 0; overflow-wrap: anywhere; }
.vm-an-hinweis { margin: 6px 0 0; }
/* Korrektur 2j: bei offener Rückfrage statt «An:» nur der Hinweis, dass die Antwort an das Team geht */
.vm-an-rf { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; }
.vm-an-rf svg.i { width: 14px; height: 14px; flex: none; }
.vm-ansprech { display: flex; align-items: center; gap: 12px; margin-top: 10px; min-width: 0; }
.vm-ansprech > .avatar { width: 48px; height: 48px; border-radius: 50%; font-size: 16px; flex: none; }
.vm-ansprech-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.vm-ansprech-text b { overflow-wrap: anywhere; }
.vm-ansprech-tel { display: inline-flex; align-items: center; gap: 5px; color: var(--text); text-decoration: underline; text-decoration-color: var(--muted); text-underline-offset: 3px; }
.vm-ansprech-tel svg.i { width: 13px; height: 13px; }
.vm-d-teil .vm-ansprech { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.tag.vm-direkt { background: var(--ok-bg); color: var(--ok-tx); border-color: var(--ok-ln); }
.vm-direkt-hinweis { display: flex; align-items: flex-start; gap: 6px; margin: 8px 0 0; padding: 8px 10px; border-radius: 10px; background: var(--ok-bg); border: 1px solid var(--ok-ln); color: var(--text); }
.vm-direkt-hinweis svg.i { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--ok-tx); }
@media (max-width: 760px) {
  .vm-an-liste { max-height: 200px; }
  .vm-an-wahl { flex: 1 1 calc(50% - 6px); min-width: 0; border-radius: 14px; }
  .vm-an-wahl:first-child { flex-basis: 100%; }
}

/* ===================== Runde 2l (V1, V4, V5): Vermittler-Bereich neu sortiert. Präfix .vx-, nur Tokens aus styles.css =====================
   Kopf: Titel links, Knopf «Vermittler einladen» oben rechts, darunter drei Reiter als Linie (Eingang, Nachrichten, Vermittler).
   Eine Werkzeugleiste je Seite, Filter (Vermittler, Branche, Land) hinter dem Knopf «Filter». Eingang in Status-Gruppen. */
.vx-kopf { padding-bottom: 0; }
.vx-kopf-zeile { display: flex; align-items: center; gap: 14px; min-width: 0; }
.vx-titel { flex: 1 1 auto; min-width: 0; }
.vx-titel h2 { font-size: 20px; letter-spacing: -.015em; }
.vx-titel .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.vx-einladen { flex: none; border-radius: 999px; padding: 0 18px; min-height: 40px; font-weight: 700; background: var(--text); color: var(--app); border-color: var(--text); }
.vx-einladen:hover { background: var(--text); border-color: var(--text); opacity: .9; }
.vx-einladen svg.i { color: inherit; }
.vx-einladen .vx-kurz { display: none; }
.vx-reiter { display: flex; gap: 4px; margin: 14px -20px 0; padding: 0 14px; border-top: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.vx-reiter::-webkit-scrollbar { display: none; }
.vx-reiter-a { display: inline-flex; align-items: center; gap: 8px; padding: 12px 10px 10px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none;
  border-bottom: 2px solid transparent; white-space: nowrap; }
.vx-reiter-a:hover { color: var(--text); }
.vx-reiter-a.active { color: var(--text); border-bottom-color: var(--ak); }
.vx-reiter-a svg.i { width: 16px; height: 16px; }
.vx-reiter-a b { min-width: 20px; height: 20px; padding: 0 6px; box-sizing: border-box; border-radius: 10px; display: inline-grid; place-items: center; font-size: 11.5px; font-weight: 700;
  background: var(--flaeche-3); color: var(--text); }
.vx-reiter-a.active b { background: var(--text); color: var(--app); }
.vx-reiter-a:focus-visible { outline: 2px solid var(--fokus); outline-offset: -2px; border-radius: 8px 8px 0 0; }

/* Werkzeugleiste */
.vx-leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; }
.vx-suche { flex: 1 1 260px; max-width: 420px; min-width: 0; }
.vx-leiste > .spacer { flex: 1 1 0; }
.vx-sicht button { height: 30px; }
.vx-filter-knopf { min-height: 36px; border-radius: 999px; }
.vx-filter-knopf[aria-expanded="true"] { border-color: var(--line-3); background: var(--flaeche-2); }
.vx-filter-zahl { min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 9px; display: inline-grid; place-items: center; font-size: 11px; background: var(--ak-btn); color: #fff; }
.vx-filterfeld { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--flaeche-2); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.vx-filterfeld .vf-filter { margin: 0; }
.vx-land-wahl { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
label.vx-land-wahl { flex-direction: row; text-align: left; } /* Runde 2l (Korrektur 2): Formular-Label sind sonst untereinander und zentriert */
.vx-land-wahl select { width: auto; min-width: 180px; text-transform: none; letter-spacing: 0; font-weight: 400; }

/* Status-Gruppen im Eingang */
.vx-gruppe + .vx-gruppe { margin-top: 22px; }
.vx-gruppe-kopf { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 10px; }
.vx-gruppe-kopf h3 { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.vx-gruppe-zahl { min-width: 22px; height: 20px; padding: 0 7px; box-sizing: border-box; border-radius: 10px; display: inline-grid; place-items: center; font-size: 11.5px; font-weight: 700;
  background: var(--flaeche-3); color: var(--text); align-self: center; }
.vx-g-pruefen .vx-gruppe-zahl { background: var(--text); color: var(--app); }
.vx-g-rueckfrage .vx-gruppe-zahl { background: var(--warn-bg); color: var(--warn-tx); box-shadow: inset 0 0 0 1px var(--warn-ln); }
.vx-gruppe-sub { font-size: 12.5px; color: var(--muted); }
.vx-gruppe-leer { margin: 0; padding: 14px 16px; border: 1px dashed var(--line-strong); border-radius: 14px; font-size: 13px; color: var(--muted); }

/* Karte im Eingang */
.vx-karte { gap: 9px; }
.vx-karte .kv-oben { align-items: flex-start; padding-right: 0; }
.vx-karte .kv-kopf { flex: 1 1 auto; }
.vx-wann { flex: none; margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; padding-top: 2px; }
.vx-von { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 13px; }
.vx-von-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.vx-land { flex: none; padding: 0 6px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--muted); border: 1px solid var(--line-strong); }
.tag.vx-gesperrt { margin: 0; background: var(--neu-bg); color: var(--neu-tx); border: 1px dashed var(--line-3); }
.vx-unterlagen { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 8px 10px; border-radius: 12px; background: var(--flaeche-2); cursor: help; }
.vx-u-kopf { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.vx-u-lbl { color: var(--muted); }
.vx-u-balken { display: inline-flex; gap: 3px; flex: 1 1 auto; max-width: 120px; }
.vx-u-balken i { flex: 1 1 0; height: 6px; border-radius: 3px; background: var(--line-strong); }
.vx-u-balken i.ok { background: var(--green); }
.vx-u-kopf b { margin-left: auto; font-size: 12.5px; }
.vx-u-fehlt { font-size: 12px; color: var(--warn-tx); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vx-unterlagen.voll .vx-u-fehlt { color: var(--ok-tx); }
.vx-fuss { flex-wrap: nowrap; }
.vx-zust { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-size: 12.5px; color: var(--muted); }
.vx-zust span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vx-zust .avatar { border-radius: 50%; }
body[data-mandant="med"] .vx-u-balken i.ok { background: var(--ak2); }

/* Vermittler-Liste */
.vx-einl-offen { margin: 0 0 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--flaeche-2); }
.vx-einl-offen > summary { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; list-style: none; font-weight: 700; font-size: 13.5px; }
.vx-einl-offen > summary::-webkit-details-marker { display: none; }
.vx-einl-offen > summary svg.i { width: 16px; height: 16px; color: var(--ink); }
.vx-einl-offen > summary::after { content: ''; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
.vx-einl-offen[open] > summary::after { transform: rotate(-135deg); }
.vx-einl-offen > summary .vm-einl-zahl { margin-left: 6px; }
.vx-einl-sub { font-weight: 400; }
.vx-einl-offen > #inv-offen-liste { padding: 0 14px 12px; }
.vx-ag { gap: 12px; }
.vx-ag-kopf { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.vx-ag-kopf .kv-kopf { flex: 1 1 auto; }
.tag.vx-st { flex: none; margin: 0; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.tag.vx-st-gesperrt { background: var(--neu-bg); color: var(--neu-tx); border: 1px dashed var(--line-3); }
.vx-ag-abt { display: flex; flex-wrap: wrap; gap: 6px; min-height: 0; }
.vx-ag-abt:empty { display: none; }
.vx-abt { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; border: 1px solid var(--line-strong); color: var(--text); }
.vx-abt::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); }
.vx-ag-zahlen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.vx-zahl { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: 12px; background: var(--flaeche-2); text-decoration: none; color: var(--text); min-width: 0; }
.vx-zahl b { font-size: 20px; line-height: 1.1; letter-spacing: -.02em; }
.vx-zahl span { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.vx-zahl:hover { box-shadow: inset 0 0 0 1px var(--line-3); }
.vx-ag-person { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; }
.vx-ag-person > svg.i { flex: none; width: 15px; height: 15px; color: var(--muted-2); }
.vx-ag-person > span:not(.spacer) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vx-ag-person .spacer { flex: 1 1 auto; }
.vx-kontakt { min-height: 30px; width: 30px; padding: 0; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--text); text-decoration: none; display: inline-grid; place-items: center; }
.vx-kontakt svg.i { width: 14px; height: 14px; }
.vx-ag-liefert { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: -4px; }
.vx-ag-grund { margin: 0; padding: 8px 10px; border-radius: 10px; font-size: 12.5px; background: var(--neu-bg); color: var(--neu-tx); border: 1px dashed var(--line-3); }
.vx-ag-fuss { flex-wrap: wrap; row-gap: 8px; } /* Runde 2l (Korrektur 2): schmale Karten (4 Spalten, 1280 px) brechen um, statt «Mehr» unter die Nachbarkarte zu schieben */
.vx-ag-fuss .spacer { flex: 1 1 auto; }
.vx-ag-fuss .mehr { margin-left: auto; }
.vx-ag-fuss .mehr > .btn { min-height: 30px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; }
.vx-ag-fuss .mehr-liste { bottom: calc(100% + 6px); top: auto; }

/* Pop-up «Vermittler einladen» */
.modal-box.vx-einl-pop { width: min(720px, 100%); }
.vx-einl-satz { margin: -6px 0 12px; }
.vx-abt-wahl { margin: 0 0 14px; padding: 0; border: 0; min-width: 0; }
.vx-abt-wahl legend { font-weight: 700; font-size: 13.5px; margin-bottom: 8px; }
.vx-abt-optionen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.vx-abt-opt { position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px; border: 1px solid var(--line-strong); border-radius: 14px; cursor: pointer; background: var(--flaeche); }
.vx-abt-opt input { margin: 3px 0 0; accent-color: var(--ak-btn); flex: none; }
.vx-abt-opt-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vx-abt-opt-text b { font-size: 14px; }
.vx-abt-opt-text small { font-size: 12px; color: var(--muted); line-height: 1.35; }
.vx-abt-opt:has(input:checked) { border-color: var(--ak-ln); box-shadow: inset 0 0 0 1px var(--ak-ln); background: var(--ak-bg); }
.vx-abt-opt:focus-within { outline: 2px solid var(--fokus); outline-offset: 2px; }
.vx-abt-fest { margin: 0 0 12px; }
.vx-einl-form { margin-bottom: 4px; }

/* Portal: Empfänger «An» (Sie-Form) */
.vx-an { margin: 4px 0 10px; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.vx-an legend { font-weight: 700; font-size: 13.5px; margin-bottom: 8px; padding: 0; }
.vx-an-modus { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.vx-an-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 14px; cursor: pointer; background: var(--flaeche); min-width: 0; }
.vx-an-opt input { position: absolute; opacity: 0; pointer-events: none; }
.vx-an-ic { flex: none; width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--flaeche-3); }
.vx-an-ic svg.i { width: 16px; height: 16px; }
.vx-an-opt-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.vx-an-opt-text b { font-size: 14px; }
.vx-an-opt-text small { font-size: 12px; color: var(--muted); }
.vx-an-opt:has(input:checked) { border-color: var(--ak-ln); background: var(--ak-bg); box-shadow: inset 0 0 0 1px var(--ak-ln); }
.vx-an-opt:has(input:checked) .vx-an-ic { background: var(--ak-btn); color: #fff; }
.vx-an-opt:focus-within { outline: 2px solid var(--fokus); outline-offset: 2px; }
.vx-an-personen { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.vx-an-person { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; min-width: 0; background: var(--flaeche); }
.vx-an-person input { position: absolute; opacity: 0; pointer-events: none; }
.vx-an-person .avatar.vx-an-foto { width: 38px; height: 38px; border-radius: 50%; font-size: 13px; flex: none; object-fit: cover; }
.vx-an-pname { display: flex; flex-direction: column; min-width: 0; font-size: 13px; font-weight: 600; line-height: 1.25; }
.vx-an-pname small { font-weight: 400; font-size: 11px; color: var(--muted); }
.vx-an-haken { position: absolute; top: 6px; right: 6px; width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center; border: 1px solid var(--line-strong); background: var(--flaeche); }
.vx-an-haken svg.i { width: 11px; height: 11px; opacity: 0; }
.vx-an-person:has(input:checked) { border-color: var(--ak-ln); background: var(--ak-bg); }
.vx-an-person:has(input:checked) .vx-an-haken { background: var(--ak-btn); border-color: var(--ak-btn); color: #fff; }
.vx-an-person:has(input:checked) .vx-an-haken svg.i { opacity: 1; }
.vx-an-person:focus-within { outline: 2px solid var(--fokus); outline-offset: 2px; }
.vx-an-hinweis { display: flex; align-items: center; gap: 6px; margin: 0; }
.vx-an-hinweis svg.i { width: 13px; height: 13px; }

/* Schmal: Leiste umbrechen, Knopf «Einladen» kurz, Gruppen und Wahl untereinander */
@media (max-width: 760px) {
  .vx-suche { flex: 1 1 100%; max-width: none; }
  .vx-leiste > .spacer { display: none; }
  .vx-sicht { flex: 1 1 100%; justify-content: space-between; }
  .vx-sicht button { flex: 1 1 0; padding: 0 8px; }
  .vx-abt-optionen, .vx-an-modus { grid-template-columns: minmax(0, 1fr); }
  .vx-land-wahl { flex-wrap: wrap; }
  .vx-land-wahl select { min-width: 0; flex: 1 1 auto; }
}
@media (max-width: 560px) {
  .vx-einladen { padding: 0 14px; }
  .vx-einladen .vx-lang { display: none; }
  .vx-einladen .vx-kurz { display: inline; }
  .vx-titel .sub { display: none; }
  .vx-reiter-a { padding: 11px 7px 9px; font-size: 13.5px; gap: 6px; }
  .vx-reiter-a svg.i { display: none; }
  .vx-reiter { margin: 12px -20px 0; padding: 0 10px; }
  .vx-ag-fuss { flex-wrap: wrap; }
  .vx-ag-fuss .mehr { margin-left: auto; } /* Runde 2l (Korrektur 1): Menü «Mehr» rechts halten, Liste bleibt im Bild */
  .vx-ag-fuss .mehr-liste { right: 0; left: auto; max-width: calc(100vw - 32px); }
  .vx-an-personen { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Runde 2l: Auswahl-Kacheln als Zeile (Formular-Label sind sonst untereinander) */
label.vx-abt-opt, label.vx-an-opt { flex-direction: row; text-align: left; color: var(--text); font-size: 14px; }
label.vx-an-person { flex-direction: row; text-align: left; color: var(--text); }
/* ===================== Runde 2l (Einbau): Ergänzungen zum Muster, Präfix .vx-, nur Tokens aus styles.css ===================== */
/* V2: Haken «Zu meinen Kandidaten» unter «Annehmen» (Panel und Prüf-Durchlauf) */
.vx-zumir { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; font-size: 13px; color: var(--text); }
label.vx-zumir { flex-direction: row; text-align: left; cursor: pointer; }
.vx-zumir input { accent-color: var(--ak-btn); margin: 0; }
.vx-zumir svg.i { width: 14px; height: 14px; color: var(--muted); }
.pd-zumir { padding: 0 2px; }
/* V5: Empfänger «an alle» intern (neutral, ohne Markenfarbe) */
.tag.vx-an-alle { background: var(--flaeche-2); color: var(--muted); border: 1px solid var(--line); }
/* V3: Abteilung entzogen, Abteilung in der Tabelle und bei offenen Einladungen */
.tag.vx-entzogen { margin: 0; }
.vx-ag-abt-t { margin: 4px 0 2px; }
.vx-abt.vx-einl-abt { height: 20px; font-size: 11px; margin-left: 2px; }
/* V3, V4: Abteilungen in «Agentur bearbeiten» */
.vx-abt-optionen.vx-abt-zwei { grid-template-columns: repeat(2, minmax(0, 1fr)); }
label.vx-abt-check { flex-direction: row; text-align: left; color: var(--text); font-size: 14px; }
.vx-abt-opt:has(input:disabled) { cursor: default; opacity: .75; }
/* V4: Umschalter der Abteilung im Portal und Hinweis im Formular «Kandidat einreichen» */
.vx-portal-abt { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 10px; }
.vx-portal-abt .wahl button { height: 32px; }
.vx-portal-abt-form { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 12px; }
.vx-portal-abt-form svg.i { width: 15px; height: 15px; flex: none; margin-top: 2px; }
@media (max-width: 760px) {
  .vx-abt-optionen.vx-abt-zwei { grid-template-columns: minmax(0, 1fr); }
  .vx-portal-abt .wahl { flex: 1 1 100%; }
  .vx-portal-abt .wahl button { flex: 1 1 0; }
}
/* V2: «Zu meinen Kandidaten» in der Zeile «Eingereicht von …» der Setcard */
.vx-zu-mir-kopf { margin-left: 8px; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.vx-zu-mir-kopf svg.i { width: 14px; height: 14px; }
/* Abteilungen in «Agentur bearbeiten» wie die übrigen Teile des Formulars, Haken der Personenwahl ohne Überlappung */
.vx-abt-teil .vx-abt-optionen { margin-top: 2px; }
.vx-abt-hinweis { display: block; margin-top: 8px; }
.vx-an-person { padding-right: 30px; }
/* leere Zahl in der Sicht (z.B. 0 Entschieden) nicht als leere Pille zeigen */
.vx-sicht .wahl-zahl:empty { display: none; }
