/* ===================== 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; }

@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; }
}
