/* ================= Matching (Runde 2d): Seite mit Reitern Kunde sucht, Kandidat sucht, Einsatz-Radar, Vorgeschlagen, Erfolgreich =================
   Nur Tokens aus styles.css, eigene Klassen mit Präfix .ma-. Die Panels darunter sind die bestehenden (kunde.css, kandidat.css, karte.css).
   iPersonal Rot nur über die bestehenden Knöpfe und das Kopf-Symbol, MediPersonal ohne Rot (Tokens je Abteilung). */

.ma-seite { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ma-zurueck-zeile { margin: 0; }
.ma-zurueck { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Rahmen: Kopf und Reiter ---------- */
.ma-rahmen { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ma-kopf { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.ma-kopf .head-icon { width: 36px; height: 36px; }
.ma-titel { flex: 1 1 240px; min-width: 0; }
.ma-titel h2 { margin: 0; font-size: 20px; letter-spacing: -.015em; }
.ma-titel .sub { margin-top: 2px; font-size: 13px; color: var(--muted); }

.ma-reiter { width: fit-content; max-width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
.ma-reiter::-webkit-scrollbar { display: none; }
.ma-reiter .fc { flex: none; cursor: pointer; }
.ma-reiter .fc svg.i { width: 15px; height: 15px; }
.ma-reiter .fc:hover:not(.active) { background: var(--hover); color: var(--text); }
.ma-reiter .fc:focus-visible { outline: 2px solid var(--fokus); outline-offset: 1px; }
.ma-reiter .fc .ma-zahl[hidden] { display: none; }

.ma-inhalt { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ma-inhalt > * { min-width: 0; }

/* ---------- Auswahl (Combobox mit Vorschlägen) ---------- */
.ma-wahl-panel { min-width: 0; }
.ma-suche { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ma-lbl { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 0; }
.ma-suchzeile { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; min-width: 0; }
.ma-combo { flex: 1 1 320px; min-width: 0; max-width: 620px; }
.ma-combo input { height: 40px; font-size: 14.5px; }
.ma-sicht { flex: none; }

.ma-vs-huelle { min-width: 0; }
.ma-vs { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.ma-gruppe { min-width: 0; }
.ma-gruppe-titel { margin: 0 0 6px; font-size: 12px; font-weight: 700; color: var(--muted-2); }
.ma-gruppe-liste { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 2px 14px; }
.ma-option { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 10px; border: 1px solid transparent; border-radius: 12px; cursor: pointer; min-width: 0; }
.ma-option:hover { background: var(--hover); }
.ma-option.aktiv { background: var(--hover); border-color: var(--line-strong); box-shadow: inset 3px 0 0 var(--fokus); }
.ma-o-text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; line-height: 1.3; }
.ma-o-text b { font-size: 13.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ma-o-text span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ma-o-art, .ma-o-tag { flex: none; margin: 0; font-size: 11px; }
.ma-o-verf { flex: none; font-size: 12px; white-space: nowrap; }
.ma-vs-leer, .ma-vs-laedt { padding: 10px 2px; font-size: 13px; color: var(--muted); }
.ma-wahl-laedt { margin: 4px 0; }

/* ---------- Kopfkarte der gewählten Firma bzw. Person ---------- */
.ma-kopfkarte { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px 16px; min-width: 0; }
.ma-kopf-bild { display: inline-flex; text-decoration: none; }
.ma-kopf-text { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ma-kopf-name { font-size: 18px; font-weight: 700; letter-spacing: -.01em; color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.ma-kopf-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.ma-kopf-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; color: var(--muted); min-width: 0; }
.ma-kopf-meta > span { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.ma-kopf-meta svg.i { width: 14px; height: 14px; flex: none; }
.ma-kopf-meta .sep { opacity: .4; }
.ma-kopf-meta .tag { margin: 0; }
.ma-kopf-akt { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

.ma-auftrag { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--flaeche-2); font-size: 13.5px; }
.ma-auftrag-text { display: inline-flex; align-items: flex-start; gap: 8px; flex: 1 1 260px; min-width: 0; }
.ma-auftrag-text svg.i { width: 16px; height: 16px; margin-top: 2px; flex: none; color: var(--muted); }
.ma-ruhig { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.ma-ruhig > span { flex: 1 1 220px; min-width: 0; }

/* Beruf-Filter des Auftrags im Panel „Passende Kandidaten“ */
.ma-beruf-chip { display: inline-flex; align-items: center; gap: 6px; margin: 6px 0 0; padding: 3px 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--flaeche-2); color: var(--text); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.ma-beruf-chip:hover { background: var(--hover); }
.ma-beruf-chip:focus-visible { outline: 2px solid var(--fokus); outline-offset: 2px; }
.ma-beruf-chip span { font-size: 14px; line-height: 1; color: var(--muted); }

/* Im Matching steht die Firma schon in der Kopfkarte: das Logo im Panel-Kopf entfällt */
#ma-panel #matches-panel .lk-kopf > .flogo { display: none; }

/* ---------- Leere Zustände, Bereich der Pipeline ---------- */
.ma-leer { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 16px; text-align: center; color: var(--muted); }
.ma-leer svg.i { width: 28px; height: 28px; opacity: .7; }
.ma-leer p { margin: 0; max-width: 520px; }
.ma-pi { min-width: 0; }
.ma-pi-inhalt { min-width: 0; }
.ma-panel { min-width: 0; }
.ma-auftraege:empty { display: none; }
.ma-auftraege .au-kb { margin-bottom: 0; }

/* ---------- Schmale Fenster ---------- */
@media (max-width: 900px) {
  .ma-kopfkarte { grid-template-columns: auto minmax(0, 1fr); }
  .ma-kopf-akt { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 560px) {
  .ma-titel h2 { font-size: 18px; }
  .ma-kopf-name { font-size: 16px; white-space: normal; }
  .ma-kopf-meta { flex-direction: column; align-items: flex-start; gap: 3px; }
  .ma-kopf-meta .sep { display: none; }
  .ma-kopf-akt > * { flex: 1 1 auto; justify-content: center; }
  .ma-suchzeile .ma-sicht { width: 100%; }
  .ma-suchzeile .ma-sicht button { flex: 1 1 0; }
  .ma-gruppe-liste { grid-template-columns: minmax(0, 1fr); }
}
