/* Massenimport (#/import) und Vermittler-Mehrfachupload: alles unter .im-seite bzw. mit Präfix .im- */
.im-seite { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.im-karte { min-width: 0; }
.im-h3 { font-size: 15px; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.im-h3 svg.i { width: 16px; height: 16px; color: var(--muted); }
.im-satz { margin: 10px 0 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.im-satz svg.i { width: 15px; height: 15px; }

/* Kopf */
.im-titel { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.im-titel .head-icon { width: 36px; height: 36px; border-radius: 10px; }
.im-titel .head-icon svg.i { width: 19px; height: 19px; }
.im-titel-text { flex: 1 1 240px; min-width: 0; }
.im-titel-text h2 { font-size: 20px; margin: 0; }
.im-titel-text .sub { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* Schritte */
.im-schritte { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; counter-reset: none; }
.im-schritte li { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px 10px; border-radius: 12px; background: var(--flaeche-2); border: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.im-schritte .im-nr { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; background: var(--flaeche-3); color: var(--text); }
.im-schritte .im-nr svg.i { width: 14px; height: 14px; }
.im-schritte .im-st { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.im-schritte li.aktiv { border-color: var(--ak-ln); background: var(--ak-bg); color: var(--text); font-weight: 600; }
.im-schritte li.aktiv .im-nr { background: var(--ak-btn); color: #fff; }
.im-schritte li.fertig .im-nr { background: var(--ok-bg); color: var(--ok-tx); }

/* Abteilungsschild: Logo, Name, Markenfarbe */
.im-schild { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--ak-ln); border-left: 5px solid var(--ak); background: var(--ak-bg); margin-bottom: 14px; min-width: 0; }
/* Logo wie in der Seitenleiste auf weisser Fläche (Logos sind für hellen Grund gemacht) */
.im-schild-logo { flex: none; min-width: 52px; height: 44px; padding: 0 10px; border-radius: 11px; display: grid; place-items: center; background: #fff; border: 1px solid rgba(255, 255, 255, .08); }
html[data-theme="light"] .im-schild-logo { border-color: var(--line); }
.im-schild-logo img { max-height: 28px; max-width: 128px; display: block; object-fit: contain; }
.im-schild-logo b { color: var(--ak-btn); font-size: 16px; }
.im-schild > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.im-schild > div b { font-size: 18px; letter-spacing: -.01em; }
.im-schild > div span { color: var(--muted); font-size: 13px; }

/* Ablagefläche */
.im-ablage { width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 42px 20px; border: 2px dashed var(--line-strong);
  border-radius: 14px; background: var(--flaeche-2); color: var(--muted); font: inherit; cursor: pointer; text-align: center; transition: border-color .15s, background .15s; }
.im-ablage svg.i { width: 30px; height: 30px; color: var(--muted); }
.im-ablage b { color: var(--text); font-size: 16px; }
.im-ablage:hover, .im-ablage:focus-visible { border-color: var(--line-3); }
.im-ablage.over { border-color: var(--ak-ln); background: var(--ak-bg); }

/* Fortschritt */
.im-balken { height: 8px; border-radius: 99px; background: var(--flaeche-3); overflow: hidden; flex: 1 1 200px; min-width: 120px; }
.im-balken span { display: block; height: 100%; border-radius: inherit; background: var(--ak-btn); transition: width .4s; }
.im-balken.gross { height: 12px; width: 100%; flex: none; }
.im-hoch { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; color: var(--muted); font-size: 13px; }
.im-fortschritt { display: flex; flex-direction: column; gap: 10px; padding: 14px 0 4px; }
.im-fortschritt > b { font-size: 18px; }
.im-zahlen { display: flex; gap: 6px; flex-wrap: wrap; }
.im-zahlen .tag { border: 1px solid var(--line); font-size: 12.5px; padding: 3px 10px; }

/* Abgelehnte Dateien, kurze Liste, Bestätigung */
.im-abgelehnt { margin-top: 12px; border: 1px solid var(--warn-ln); background: var(--warn-bg); border-radius: 12px; padding: 10px 14px; }
.im-abgelehnt summary { cursor: pointer; color: var(--warn-tx); font-weight: 600; }
.im-abgelehnt ul, .im-liste-kurz, .im-fehler ul, .im-ergebnis ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.im-abgelehnt li { display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px; min-width: 0; }
.im-bereit { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.im-bereit-kopf { display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; font-size: 15px; }
.im-liste-kurz { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; padding: 6px; margin: 0; }
.im-liste-kurz li { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 8px; min-width: 0; font-size: 13px; }
.im-liste-kurz li:hover { background: var(--hover); }
.im-d-ic svg.i { width: 15px; height: 15px; color: var(--muted); }
.im-d-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.im-d-hinweis { font-size: 12px; color: var(--warn-tx); }
.im-bestaetigen { flex-direction: row; align-items: center; gap: 10px; color: var(--text); font-size: 14px; font-weight: 600; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--flaeche-2); cursor: pointer; }
.im-bestaetigen:has(input:checked) { border-color: var(--ak-ln); background: var(--ak-bg); }
.im-aktionen { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-top: 4px; }

/* Letzte Läufe */
.im-laeufe { display: flex; flex-direction: column; gap: 6px; }
.im-lauf { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--flaeche-2); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.im-lauf:hover { border-color: var(--line-3); }
.im-lauf .tag { flex: none; border: 1px solid var(--line); }
.im-lauf-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.im-lauf-text .muted { font-size: 12.5px; }
.im-lauf-warn { font-size: 12px; color: var(--warn-tx); }
.im-lauf > svg.i { flex: none; width: 16px; height: 16px; color: var(--muted); }

/* Fehlerliste */
.im-fehler { margin-top: 14px; border: 1px solid var(--gefahr-ln); background: var(--gefahr-bg); border-radius: 12px; padding: 12px 14px; }
.im-fehler .im-h3 svg.i { color: var(--gefahr-tx); }
.im-fehler li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; padding: 4px 0; border-top: 1px solid var(--line); min-width: 0; }
.im-fehler li:first-child { border-top: 0; }
.im-fehler-text { color: var(--gefahr-tx); flex: 1 1 200px; min-width: 0; }
.im-fehler-knoepfe { display: flex; gap: 6px; flex-wrap: wrap; }

/* Prüfen: Personenkarten */
.im-pruef-kopf { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.im-pruef-kopf .im-schild { flex: 1 1 320px; margin-bottom: 0; }
.im-kosten-ist { font-size: 13px; }
.im-personen { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: 14px; }
.im-person { padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.im-p-kopf { display: flex; align-items: center; gap: 12px; min-width: 0; }
.im-p-av { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--flaeche-3); color: var(--text); border: 1px solid var(--line-strong); }
.im-p-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.im-p-name b { font-size: 16px; overflow-wrap: anywhere; }
.im-p-fakten { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.im-p-wahl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.im-p-wahl .wahl { border-radius: 14px; }
.im-p-wahl .wahl button { height: auto; min-height: 30px; padding: 4px 13px; border-radius: 10px; white-space: normal; text-align: left; }
.im-p-hinweis { margin: 0; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px 8px; flex-wrap: wrap; }
.im-p-hinweis > span { flex: 1 1 220px; min-width: 0; }
.im-p-hinweis svg.i { width: 15px; height: 15px; flex: none; }
.im-p-suche summary, .im-p-ergaenzen summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.im-p-suche .input-icon { margin-top: 8px; }
.im-treffer { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.im-treffer p { margin: 4px 0; font-size: 13px; }
.im-treffer-z { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--flaeche-2); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.im-treffer-z:hover { border-color: var(--ak-ln); }
.im-treffer-z .muted { font-size: 12px; }
.im-p-felder { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
.im-p-feld { min-width: 0; }
.im-p-feld.breit { grid-column: 1 / -1; }
.im-p-feld select, .im-p-feld input { width: 100%; min-width: 0; }
.im-pflicht { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 700; color: var(--ink); }
.im-dateien { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.im-datei { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--flaeche-2); min-width: 0; }
.im-d-kopf { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; }
.im-d-kopf .tag { flex: none; border: 1px solid var(--line); }
.im-d-kopf .btn.icon { flex: none; min-height: 28px; padding: 0 6px; }
.im-d-wahl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 6px; }
.im-d-wahl select { width: 100%; min-width: 0; height: 34px; padding-top: 0; padding-bottom: 0; font-size: 13px; }
.im-p-fuss { display: flex; justify-content: flex-end; }
.im-ohne .im-dateien { margin-top: 10px; }
.im-fuss { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.im-oben-aktion { display: flex; justify-content: flex-end; margin-top: 12px; }
.im-ergebnis li { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 4px 0; border-top: 1px solid var(--line); }
.im-ergebnis li:first-child { border-top: 0; }

@media (max-width: 900px) {
  .im-schritte { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .im-schritte .im-st { font-size: 12px; }
  .im-schild { padding: 12px; gap: 10px; }
  .im-schild > div b { font-size: 16px; }
  .im-ablage { padding: 30px 14px; }
  .im-p-felder, .im-d-wahl { grid-template-columns: minmax(0, 1fr); }
  .im-fuss .btn { flex: 1 1 auto; }
}
