/* ================= Aufträge (Runde 2c): Seite, Auftrag-Pop-up, Vorschlag, Formular, Kundenprofil, Kandidatenseite =================
   Nur Tokens aus styles.css, eigene Klassen mit Präfix .au-. iPersonal Rot nur über die bestehenden Knöpfe, MediPersonal ohne Rot. */

.au-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Bildgrössen in den eigenen Bereichen (gleich wie die Bausteine xs 22, sm 28) */
:is(.au-seite, .au-pop, .au-profil, .au-kb) .avatar.xs, :is(.au-seite, .au-pop, .au-profil, .au-kb) .flogo.xs { width: 22px; height: 22px; border-radius: 50%; font-size: 9px; letter-spacing: 0; }
:is(.au-seite, .au-pop, .au-profil, .au-kb) .avatar.sm, :is(.au-seite, .au-pop, .au-profil, .au-kb) .flogo.sm { width: 28px; height: 28px; border-radius: 8px; font-size: 10.5px; }
:is(.au-seite, .au-pop, .au-profil, .au-kb) .avatar.xs { border-radius: 50%; }

/* ---------- Seite ---------- */
.au-seite { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.au-kopf { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.au-kopf .head-icon { width: 36px; height: 36px; }
.au-titel { flex: 1 1 260px; min-width: 0; }
.au-titel h2 { margin: 0; font-size: 20px; letter-spacing: -.015em; }
.au-titel .sub { margin-top: 2px; font-size: 13px; color: var(--muted); }
.au-kopf-aktionen { display: flex; flex-wrap: wrap; gap: 8px; }

.au-reiter { width: fit-content; max-width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.au-reiter::-webkit-scrollbar { display: none; }
.au-reiter .fc { position: relative; flex: none; border: 0; background: none; font-family: inherit; cursor: pointer; }
.au-reiter .fc:hover:not(.active) { background: var(--hover); color: var(--text); }
.au-reiter .fc.active { background: var(--text); color: var(--app); }
.au-reiter .fc.active b { background: color-mix(in srgb, var(--app) 18%, transparent); color: inherit; }
.au-reiter .fc:focus-visible { outline: 2px solid var(--fokus); outline-offset: 1px; }
.au-punkt { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--warn-tx); box-shadow: 0 0 0 2px var(--flaeche-2); }
.au-reiter .fc.active .au-punkt { box-shadow: 0 0 0 2px var(--text); }

.au-body { min-width: 0; }
.au-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.au-filter .au-suche { flex: 1 1 260px; min-width: 0; }
.au-filter select { flex: 0 1 200px; min-width: 0; }
.au-statuswahl button { height: 28px; padding: 0 12px; font-size: 12.5px; }

.au-leer { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; }

/* Tabelle ab 900 px, darunter Karten */
.au-tabelle-huelle { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.au-tabelle { width: 100%; }
.au-tabelle th { background: var(--flaeche); }
.au-tabelle th.zahl, .au-tabelle td.zahl { text-align: right; }
.au-tabelle th.aktion, .au-tabelle td.aktion { text-align: right; width: 1%; }
.au-tabelle tbody tr:last-child td { border-bottom: 0; }
.au-zeile { cursor: pointer; transition: background-color .12s ease; }
.au-zeile:hover td { background: var(--hover); }
.au-zeile:focus-visible { outline: 2px solid var(--fokus); outline-offset: -2px; }
.au-zeile.meins td:first-child { box-shadow: inset 3px 0 0 var(--line-3); }
.au-tabelle td { white-space: normal; }
.au-tabelle td.zahl, .au-tabelle td.aktion { white-space: nowrap; }
.au-person { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.au-person > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.au-person.small { gap: 6px; font-size: 12.5px; }
.au-kunde { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.au-kunde-text { display: flex; flex-direction: column; min-width: 0; }
.au-kunde-text b { overflow: hidden; text-overflow: ellipsis; }
td .au-kunde-text .muted.small, td .au-auftrag .muted.small { display: block; }
.au-auftrag { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
td.au-auftrag { display: table-cell; }
td.au-auftrag > * { display: block; }
.au-etiketten { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
td.au-auftrag .au-etiketten { display: flex; }
.au-etiketten .tag.small { margin: 0; }
.au-status { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.au-passend { gap: 5px; min-width: 52px; }
.au-passend svg.i { width: 14px; height: 14px; }

.au-karten { display: none; }
.au-karte { gap: 8px; outline: none; }
.au-karte:focus-visible { box-shadow: 0 0 0 2px var(--fokus); }
.au-karte.meins { border-color: var(--line-3); }
.au-karte-kopf { display: flex; align-items: center; gap: 10px; min-width: 0; }
.au-karte-kopf .au-kunde-text { flex: 1 1 auto; }
.au-karte-kopf .pill { flex: none; }
.au-karte-meta { line-height: 1.4; }
.au-karte-fuss { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.au-karte-fuss .spacer { flex: 1; }

@media (max-width: 899px) {
  .au-tabelle-huelle { display: none; }
  .au-karten { display: grid; }
  .au-filter select { flex: 1 1 140px; }
  .au-filter .wahl { width: 100%; justify-content: space-between; }
  .au-filter .wahl button { flex: 1 1 0; }
}

/* Stellen-Radar im Bereich Aufträge */
.au-radar-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 12px; }
.au-radar-text { flex: 1 1 320px; margin: 0; }
.au-radar-knoepfe { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.au-st-firma { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- Auftrag-Pop-up ---------- */
.au-pop { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.au-pop h2 { margin: 0; }
.au-pop h2:focus { outline: none; }
.au-pop h2:focus-visible { outline: 2px solid var(--fokus); outline-offset: 3px; border-radius: 4px; }
.au-vorschlagen-knopf svg.i { width: 14px; height: 14px; }
.au-zurueck { align-self: flex-start; }
.au-pop-kopf { display: flex; align-items: flex-start; gap: 14px; min-width: 0; }
.au-pop-titel { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 auto; }
.au-pop-titel h2 { font-size: 22px; line-height: 1.2; overflow-wrap: anywhere; }
.au-pop-kunde { width: fit-content; max-width: 100%; color: var(--muted); font-size: 13px; font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
a.au-pop-kunde:hover { color: var(--text); text-decoration: underline; }
.au-pop-meta { color: var(--muted); font-size: 13.5px; }
.au-pop-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 2px; }
.au-pop-notiz { margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--flaeche-2); white-space: pre-line; overflow-wrap: anywhere; }
.au-pop-aktionen { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.au-pop-aktionen:empty { display: none; }

.au-bereich { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); min-width: 0; }
.au-bereich-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.au-bereich-kopf h3 { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; }
.au-bereich-kopf h3 svg.i { width: 16px; height: 16px; color: var(--muted); }
.au-p-suche { flex: 1 1 240px; max-width: 360px; margin-left: auto; }
.au-bereich-fuss { display: flex; justify-content: flex-end; gap: 8px; }

.au-vs-liste, .au-kand-liste, .au-verlauf, .au-profil-liste, .au-kb-liste { list-style: none; margin: 0; padding: 0; }
.au-vs { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.au-vs:last-child { border-bottom: 0; }
.au-vs.offen { background: linear-gradient(90deg, var(--warn-bg), transparent 60%); margin: 0 -10px; padding: 10px; border-radius: 10px; }
.au-vs-text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.au-vs-notiz { padding-left: 10px; border-left: 2px solid var(--line-strong); font-size: 13px; overflow-wrap: anywhere; }
.au-vs-knoepfe { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; flex: none; }

.au-kand-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 6px; max-height: 360px; overflow: auto; padding: 2px; }
.au-kand { display: flex; flex-direction: row; align-items: center; gap: 10px; min-width: 0; color: var(--text); font-size: 13.5px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--flaeche-2); }
label.au-kand { cursor: pointer; }
label.au-kand:hover { border-color: var(--line-3); }
.au-kand.gewaehlt { border-color: var(--line-3); background: var(--flaeche-3); }
.au-kand input[type="checkbox"] { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--text); }
.au-kand:focus-within { box-shadow: 0 0 0 2px var(--fokus); }
.au-kand-text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.au-kand-text > b, .au-kand-text > .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.au-kand-hinweise { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12px; }
.au-kand-hinweise .tag.small { margin: 0; }
.au-kand .ring { flex: none; }

.au-verlauf li { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; }
.au-vl-ic { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--flaeche-3); }
.au-vl-ic svg.i { width: 12px; height: 12px; color: var(--muted); }
.au-vl-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; font-size: 13.5px; overflow-wrap: anywhere; }

/* ---------- Vorschlag ---------- */
.au-kurzinfo { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--flaeche-2); }
.au-kurzinfo > span { display: flex; flex-direction: column; min-width: 0; }
.au-hinweis { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13.5px; color: var(--muted); }
.au-v-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.au-v-kopf .lbl { margin: 0; }
.au-notiz-feld { display: flex; flex-direction: column; gap: 6px; }
.au-notiz-feld textarea { width: 100%; box-sizing: border-box; }

/* ---------- Formular ---------- */
.au-f-kunde { display: flex; flex-direction: column; gap: 8px; }
.au-f-kunde .lbl { margin: 0; }
.au-fester-kunde { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--flaeche-2); }
.au-fester-kunde > span { display: flex; flex-direction: column; min-width: 0; }
.au-kundenwahl { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 6px; max-height: 230px; overflow: auto; padding: 2px; }
.au-kw { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--flaeche-2);
  color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.au-kw:hover { border-color: var(--line-3); }
.au-kw[aria-pressed="true"] { border-color: var(--text); background: var(--flaeche-3); box-shadow: inset 0 0 0 1px var(--text); }
.au-kw:focus-visible { outline: 2px solid var(--fokus); outline-offset: 1px; }
.au-kw-name { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.au-kw-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.au-kw .tag.small { flex: none; margin: 0; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.au-form { margin: 0; }

/* ---------- Kundenprofil ---------- */
.au-profil { container-type: inline-size; }
.au-pz { display: grid; grid-template-columns: minmax(96px, 150px) minmax(0, 1fr) auto auto; align-items: center; gap: 6px 14px; padding: 9px 4px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 8px; }
.au-pz:last-child { border-bottom: 0; }
.au-pz:hover { background: var(--hover); }
.au-pz:focus-visible { outline: 2px solid var(--fokus); outline-offset: -2px; }
.au-pz .au-person { min-width: 0; }
.au-pz-auftrag { display: flex; flex-direction: column; min-width: 0; }
.au-pz-meta { white-space: nowrap; }
.au-pz-knoepfe { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
@container (max-width: 560px) { .au-pz { grid-template-columns: minmax(0, 1fr) auto; } .au-pz-meta { grid-column: 1; white-space: normal; } .au-pz-knoepfe { grid-column: 2; grid-row: 1 / span 3; } }
.au-profil-satz { margin-top: 6px; }

/* ---------- Kandidatenseite (Reiter Passende Kunden) ---------- */
.au-kb { margin-bottom: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--flaeche-2); }
.au-kb-kopf { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.au-kb-kopf h3 { margin: 0; font-size: 14.5px; }
.au-kb-kopf svg.i { width: 16px; height: 16px; color: var(--muted); }
.au-kb-liste li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.au-kb-liste li:first-child { border-top: 0; }
.au-kb-text { flex: 1 1 auto; min-width: 0; font-size: 13.5px; }
.au-kb-text .muted.small { display: block; }

@media (max-width: 600px) {
  /* Alle drei Reiter sichtbar: gleich breite Spalten, Beschriftung darf umbrechen */
  .au-reiter { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; overflow: visible; }
  .au-reiter .fc { min-width: 0; height: auto; min-height: 34px; padding: 5px 6px; justify-content: center; flex-wrap: wrap; gap: 3px 6px; white-space: normal; text-align: center; line-height: 1.2; }
  .au-pop-kopf { gap: 10px; }
  .au-pop-titel h2 { font-size: 19px; }
  .au-p-suche { max-width: none; margin-left: 0; flex-basis: 100%; }
  .au-vs { flex-wrap: wrap; }
  .au-vs-knoepfe { width: 100%; justify-content: flex-start; padding-left: 38px; }
  .au-bereich-fuss { justify-content: stretch; }
  .au-bereich-fuss .btn { flex: 1 1 auto; }
  .au-kopf-aktionen { width: 100%; }
  .au-kopf-aktionen .btn { flex: 1 1 auto; }
}
