/* Verwaltungsbereich: Rechnungsübersicht und Benutzerverwaltung.
   Baut auf den Tokens aus style.css auf — hier stehen nur die Ergänzungen. */

body.verwaltung { overflow: auto; display: block; background: var(--bg); }

header .kopf-link {
  color: #938c7e; text-decoration: none; font-size: 12px;
  padding: 5px 10px; border-radius: var(--radius-sm);
  margin-right: 6px; transition: all 0.15s;
}
header .kopf-link:hover { color: #f2f0eb; background: #34302a; }

/* ── Reiter ───────────────────────────────────────────────────── */
.verw-tabs {
  display: flex; gap: 2px;
  padding: 0 26px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.verw-tab {
  padding: 13px 18px; border: none; background: none;
  font-family: 'IBM Plex Sans', sans-serif; font-size: 13px; font-weight: 500;
  color: var(--muted); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: all 0.15s;
}
.verw-tab:hover { color: var(--text); }
.verw-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.verw-bereich { display: none; padding: 24px 26px 60px; }
.verw-bereich.aktiv { display: block; }

.hinweis {
  margin-bottom: 16px; padding: 11px 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--accent); border-radius: var(--radius);
  font-size: 12.5px; line-height: 1.55; color: var(--text-2);
}

/* ── Kennzahlen ───────────────────────────────────────────────── */
.kennzahlen { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.kennzahl {
  flex: 1; min-width: 170px; padding: 15px 17px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.kennzahl .k-label {
  font-family: 'IBM Plex Mono', monospace; font-size: 9.5px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 7px;
}
.kennzahl .k-wert { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.kennzahl .k-zusatz { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.kennzahl.offen { border-left: 3px solid var(--warn-border); }
.kennzahl.offen .k-wert { color: var(--warn-text); }

/* ── Filter ───────────────────────────────────────────────────── */
.filterleiste {
  display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap;
  margin-bottom: 16px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.filter-feld { display: flex; flex-direction: column; gap: 5px; min-width: 150px; }
.filter-feld.schmal { min-width: 130px; }
.filter-feld label {
  font-size: 10.5px; font-weight: 500; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.filter-feld input, .filter-feld select {
  padding: 8px 10px; border: 1px solid var(--border-strong);
  border-radius: var(--radius); background: var(--surface);
  font-family: 'IBM Plex Sans', sans-serif; font-size: 12.5px; color: var(--text);
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.filter-feld input:focus, .filter-feld select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring);
}

.btn-klein {
  padding: 8px 13px; border: 1px solid var(--border-strong);
  border-radius: var(--radius); background: var(--surface);
  font-family: 'IBM Plex Sans', sans-serif; font-size: 12px; font-weight: 500;
  color: var(--text-2); cursor: pointer; text-decoration: none;
  white-space: nowrap; transition: all 0.15s;
}
.btn-klein:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.btn-export { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-export:hover { background: var(--accent-hover); color: #fff; border-color: var(--accent-hover); }

/* ── Tabelle ──────────────────────────────────────────────────── */
.tabelle-rahmen {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden auto;
  box-shadow: var(--shadow-sm);
}
.verw-tabelle { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.verw-tabelle th {
  position: sticky; top: 0;
  padding: 11px 14px; text-align: left;
  background: var(--surface-2); border-bottom: 1px solid var(--border);
  font-family: 'IBM Plex Mono', monospace; font-size: 9.5px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
  white-space: nowrap;
}
.verw-tabelle td {
  padding: 11px 14px; border-bottom: 1px solid var(--border);
  color: var(--text-2); vertical-align: middle;
}
.verw-tabelle tbody tr:last-child td { border-bottom: none; }
.verw-tabelle tbody tr:hover { background: var(--surface-2); }
.verw-tabelle .rechts { text-align: right; }
.verw-tabelle td.betrag {
  text-align: right; font-family: 'IBM Plex Mono', monospace;
  font-weight: 500; color: var(--text); white-space: nowrap;
}
.verw-tabelle td.leer { text-align: center; padding: 36px; color: var(--muted); font-style: italic; }
.verw-tabelle .lieferant { font-weight: 500; color: var(--text); }
.verw-tabelle .mono { font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; }

.kuerzel-chip {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  background: var(--accent-light); color: var(--accent);
  font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 600;
}

/* ── Status ───────────────────────────────────────────────────── */
.status-chip {
  display: inline-block; padding: 3px 9px; border-radius: 999px;
  font-size: 10.5px; font-weight: 500; white-space: nowrap;
  border: 1px solid transparent;
}
.status-eingereicht { background: #fdf6e3; color: #7a5c00; border-color: #ecd695; }
.status-vorgeprueft { background: #f2f6fb; color: #3a5a8c; border-color: #ccdcef; }
.status-geprueft    { background: #eaf0f8; color: #1a3a6b; border-color: #b9cbe4; }
.status-freigegeben { background: #eaf3ee; color: #2a5c3f; border-color: #a9cdb8; }
.status-bezahlt     { background: #dff0e8; color: #1e5c3a; border-color: #8fc7a8; }
.status-archiviert  { background: #2a5c3f; color: #fff;    border-color: #2a5c3f; }
.status-abgelehnt   { background: #fdf2f0; color: #c0392b; border-color: #e8b7b0; }
.status-verworfen  { background: #efedea; color: #6e6a63; border-color: #d6d2cb; }

/* Stempel-Marken im Detailfenster */
.stempel-marken { display: flex; flex-wrap: wrap; gap: 6px; }
.stempel-marke {
  display: inline-block; padding: 3px 9px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border);
  font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; color: var(--text-2);
}

/* ── Detailfenster ────────────────────────────────────────────── */
.detail-overlay {
  position: fixed; inset: 0; z-index: 1500;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(26, 24, 20, 0.5); backdrop-filter: blur(3px);
}
.detail-overlay.hidden { display: none; }
.detail-fenster {
  width: 100%; max-width: 1240px; height: 90vh; max-height: 90vh;
  display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.detail-kopf {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding: 20px 22px; border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.detail-titel { font-size: 15px; font-weight: 600; }
.detail-untertitel {
  margin-top: 4px; font-family: 'IBM Plex Mono', monospace;
  font-size: 11px; color: var(--muted); word-break: break-all;
}
.detail-inhalt { padding: 0; overflow: hidden; flex: 1; min-height: 0; }

/* ── Zwei Spalten: links der Beleg, rechts die Angaben ────────── */
.detail-spalten { display: flex; height: 100%; min-height: 0; }

.detail-links {
  flex: 1 1 58%; min-width: 0;
  display: flex; flex-direction: column; gap: 8px;
  padding: 18px; background: var(--surface-2);
  border-right: 1px solid var(--border);
  overflow-y: auto;
}
.detail-links .pdf-vorschau-rahmen { flex: 1; margin-bottom: 0; min-height: 320px; }
.detail-links .pdf-vorschau { height: 100%; min-height: 320px; }

.detail-rechts {
  flex: 1 1 42%; min-width: 0; max-width: 520px;
  padding: 18px 20px; overflow-y: auto;
}
.detail-abschnitt.erster { padding-top: 0; border-top: none; }

@media (max-width: 950px) {
  .detail-spalten { flex-direction: column; overflow-y: auto; }
  .detail-links { flex: none; border-right: none; border-bottom: 1px solid var(--border); }
  .detail-links .pdf-vorschau { height: 420px; }
  .detail-rechts { flex: none; max-width: none; overflow: visible; }
}

/* ── Bearbeitbare Belegdaten ──────────────────────────────────── */
.belegdaten {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px;
  margin-bottom: 20px;
}
.bd-feld { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.bd-feld.breit, .bd-fuss.breit { grid-column: 1 / -1; }
.bd-feld > span {
  font-family: 'IBM Plex Mono', monospace; font-size: 9.5px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.bd-feld > span em { color: var(--error); font-style: normal; }
.bd-feld input {
  width: 100%; padding: 8px 10px;
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--text);
  font-family: 'IBM Plex Sans', sans-serif; font-size: 13px;
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.bd-feld input.mono { font-family: 'IBM Plex Mono', monospace; }
.bd-feld input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }

.bd-fuss { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bd-hinweis { font-size: 11px; color: var(--muted); }

.detail-sha {
  margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--border);
  font-family: 'IBM Plex Mono', monospace; font-size: 10px;
  color: var(--muted); word-break: break-all;
}

.detail-gitter {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 14px; margin-bottom: 22px;
}
.detail-feld .df-label {
  font-family: 'IBM Plex Mono', monospace; font-size: 9.5px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 4px;
}
.detail-feld .df-wert { font-size: 13px; color: var(--text); }

.detail-abschnitt {
  font-family: 'IBM Plex Mono', monospace; font-size: 9.5px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 11px;
  padding-top: 18px; border-top: 1px solid var(--border);
}

.status-knoepfe { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; align-items: center; }

/* Konto-Chip in der Liste */
.konto-chip {
  display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px;
  background: #eaf0f8; color: #1a3a6b; border: 1px solid #b9cbe4;
  font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 600;
}

/* Kontoauswahl beim Bezahlen */
.bezahlt-box {
  width: 100%; padding: 14px; border: 1px solid var(--accent); border-radius: var(--radius);
  background: var(--accent-wash);
}
.bezahlt-box label { display: block; font-size: 12.5px; font-weight: 500; color: var(--text); margin-bottom: 8px; }
.bezahlt-box select {
  width: 100%; padding: 9px 11px; border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--surface); font-family: 'IBM Plex Sans', sans-serif; font-size: 13px; color: var(--text);
  outline: none; margin-bottom: 12px;
}
.bezahlt-box select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.bezahlt-aktionen { display: flex; gap: 8px; }

/* Hervorgehobene Status-Aktionen */
.btn-status-primary, .btn-status-danger {
  padding: 8px 13px; border-radius: var(--radius);
  font-family: 'IBM Plex Sans', sans-serif; font-size: 12px; font-weight: 500;
  cursor: pointer; white-space: nowrap; transition: all 0.15s;
}
.btn-status-primary { border: 1px solid var(--accent); background: var(--accent); color: #fff; }
.btn-status-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-status-danger { border: 1px solid #e8b7b0; background: var(--error-light); color: var(--error); }
.btn-status-danger:hover { border-color: var(--error); }

/* PDF-Vorschau im Detailfenster */
.pdf-vorschau-rahmen {
  margin-bottom: 8px; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; background: var(--canvas-bg);
}
.pdf-vorschau {
  display: block; width: 100%; height: 460px; border: none; background: var(--canvas-bg);
}

/* Datei nicht am verzeichneten Ort — ein Problem, kein Zustand */
.fehlt-chip {
  display: inline-block; margin-left: 6px; padding: 3px 8px; border-radius: 999px;
  background: var(--warn-bg); color: var(--warn-text); border: 1px solid var(--warn-border);
  font-size: 10px; font-weight: 500; white-space: nowrap;
}
.archiv-hinweis {
  padding: 12px 14px; margin-bottom: 8px;
  background: #efe9dd; border: 1px solid #d8cdb4; border-radius: var(--radius);
  font-size: 12.5px; line-height: 1.55; color: #6a6047;
}

/* Audit-Trail als Zeitstrahl */
.verlauf-liste { list-style: none; }
.verlauf-eintrag {
  position: relative; padding: 0 0 16px 22px;
  border-left: 2px solid var(--border);
}
.verlauf-eintrag:last-child { border-left-color: transparent; padding-bottom: 0; }
.verlauf-eintrag::before {
  content: ''; position: absolute; left: -6px; top: 3px;
  width: 10px; height: 10px; border-radius: 999px;
  background: var(--accent); border: 2px solid var(--surface);
}
.verlauf-eintrag .v-kopf { font-size: 12.5px; color: var(--text); }
.verlauf-eintrag .v-meta {
  margin-top: 2px; font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px; color: var(--muted);
}
.verlauf-eintrag .v-notiz {
  margin-top: 5px; padding: 7px 10px;
  background: var(--surface-2); border-radius: var(--radius);
  font-size: 12px; color: var(--text-2);
}

/* ── Benutzer ─────────────────────────────────────────────────── */
.rollen-wahl {
  padding: 5px 9px; border: 1px solid var(--border-strong);
  border-radius: var(--radius); background: var(--surface);
  font-family: 'IBM Plex Sans', sans-serif; font-size: 12px; color: var(--text);
  outline: none; cursor: pointer;
}
.rollen-wahl:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.rollen-wahl:disabled { opacity: 0.5; cursor: not-allowed; }

.zugang-schalter {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; cursor: pointer;
}
.zugang-schalter input { accent-color: var(--accent); cursor: pointer; width: 15px; height: 15px; }
.zugang-gesperrt { color: var(--error); font-weight: 500; }
.zugang-frei { color: var(--accent); font-weight: 500; }

.ich-marke {
  margin-left: 6px; padding: 1px 6px; border-radius: 999px;
  background: var(--border); color: var(--text-2);
  font-size: 9.5px; font-family: 'IBM Plex Mono', monospace;
}

/* ── Firmen ───────────────────────────────────────────────────── */
.leer-hinweis { padding: 30px; text-align: center; color: var(--muted); font-style: italic; font-size: 12.5px; }

.firma-karte {
  margin-bottom: 14px; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.firma-karte.neu { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }

.fk-kopf { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.fk-name { font-size: 13.5px; font-weight: 600; color: var(--text); }
.fk-meta { margin-left: auto; font-size: 11px; color: var(--muted); white-space: nowrap; }

.fk-gitter { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.fk-feld { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.fk-feld.breit { grid-column: 1 / -1; }
.fk-feld > span {
  font-size: 10.5px; font-weight: 500; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.fk-feld input, .fk-feld textarea {
  width: 100%; padding: 8px 10px;
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--text);
  font-family: 'IBM Plex Sans', sans-serif; font-size: 12.5px;
  outline: none; resize: vertical;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.fk-feld input.mono, .konto-zeile input.mono { font-family: 'IBM Plex Mono', monospace; }
.fk-feld input:focus, .fk-feld textarea:focus, .konto-zeile input:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring);
}
.fk-feld small { font-size: 10.5px; color: var(--muted); line-height: 1.4; }

.fk-konten { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.fk-abschnitt {
  margin-bottom: 9px;
  font-family: 'IBM Plex Mono', monospace; font-size: 9.5px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.fk-abschnitt small {
  margin-left: 8px; font-family: 'IBM Plex Sans', sans-serif;
  font-size: 10.5px; letter-spacing: normal; text-transform: none;
}
.konten-zeilen { display: flex; flex-direction: column; gap: 7px; margin-bottom: 9px; }
.konto-zeile { display: flex; gap: 7px; align-items: center; }
.konto-zeile input {
  padding: 7px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--text);
  font-family: 'IBM Plex Sans', sans-serif; font-size: 12.5px; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.konto-zeile input[name="konto-name"] { flex: 2 1 0; min-width: 0; }
.konto-zeile input[name="konto-kuerzel"] { flex: 1 1 0; min-width: 0; }
.konto-zeile .konto-weg { padding: 6px 10px; color: var(--muted); }
.konto-zeile .konto-weg:hover { border-color: var(--error); color: var(--error); background: var(--error-light); }

.fk-aktionen {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border);
}
.fk-warnung { font-size: 11px; color: var(--muted); }

.firmen-fuss { margin: 4px 0 8px; }
#firmen-verlauf { margin-top: 12px; }

@media (max-width: 720px) {
  .fk-gitter { grid-template-columns: minmax(0, 1fr); }
}
.btn-status-danger:disabled, .btn-status-primary:disabled {
  opacity: 0.45; cursor: not-allowed;
}
.btn-status-danger:disabled:hover { border-color: #e8b7b0; }

/* Zur Prüfung zugewiesen: noch nicht im Rechnungseingang */
.status-zugewiesen { background: #f3eefa; color: #4b3a72; border-color: #cfc0e6; }
.zugewiesen-chip {
  display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px;
  background: #f3eefa; color: #4b3a72; border: 1px solid #cfc0e6;
  font-size: 10px; font-weight: 500; white-space: nowrap;
}

/* ── Ordnerauswahl in der Firmenverwaltung ────────────────────── */
.ordner-zeile { display: flex; gap: 7px; align-items: center; }
.ordner-zeile input { flex: 1; min-width: 0; }

.ordner-auswahl {
  margin-top: 9px; padding: 11px 12px;
  background: var(--surface-2); border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}
.oa-pfad {
  margin-bottom: 8px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 11.5px; color: var(--text-2); word-break: break-all;
}
.oa-laedt, .oa-leer { padding: 10px 2px; font-size: 12px; color: var(--muted); font-style: italic; }
.oa-fehler { padding: 10px 2px; font-size: 12px; color: var(--error); }

.oa-liste {
  list-style: none; margin: 0 0 10px; padding: 0;
  max-height: 230px; overflow-y: auto;
}
.oa-ordner {
  display: flex; align-items: center; gap: 7px;
  width: 100%; padding: 6px 8px;
  border: none; border-radius: var(--radius-sm); background: none;
  font-family: 'IBM Plex Sans', sans-serif; font-size: 12.5px;
  color: var(--text); text-align: left; cursor: pointer;
}
.oa-ordner:hover { background: var(--accent-light); color: var(--accent); }
.oa-symbol { color: var(--muted); font-size: 10px; }

.oa-aktionen { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }

.oa-warnung {
  margin-bottom: 9px; padding: 8px 10px;
  background: var(--warn-bg); border: 1px solid var(--warn-border);
  border-radius: var(--radius-sm);
  font-size: 11.5px; line-height: 1.45; color: var(--warn-text);
}

/* ── Blättern im Detailfenster ────────────────────────────────── */
.detail-kopf-rechts { display: flex; align-items: center; gap: 10px; }
.detail-blaettern { display: flex; align-items: center; gap: 6px; }
.detail-blaettern .btn-klein { padding: 5px 10px; font-size: 13px; line-height: 1; }
.detail-blaettern .btn-klein:disabled { opacity: 0.35; cursor: not-allowed; border-color: var(--border); }
.detail-blaettern .btn-klein:disabled:hover { color: var(--text-2); background: var(--surface); }
.blaetter-stand {
  font-family: 'IBM Plex Mono', monospace; font-size: 11px;
  color: var(--muted); white-space: nowrap;
}

/* ── Klickbare Belegzeile ─────────────────────────────────────── */
.verw-tabelle tbody tr.klickbar { cursor: pointer; }
.verw-tabelle tbody tr.klickbar:focus-visible {
  outline: 2px solid var(--accent); outline-offset: -2px;
}
.verw-tabelle td.zeilen-pfeil {
  width: 28px; color: var(--border-strong);
  font-size: 18px; line-height: 1; text-align: right;
  transition: color 0.15s;
}
.verw-tabelle tbody tr.klickbar:hover .zeilen-pfeil { color: var(--accent); }
.btn-erfassen { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.btn-erfassen:hover { background: var(--accent); color: #fff; }

/* ── Belege einwerfen ─────────────────────────────────────────── */
.einwurf-fenster { max-width: 560px; height: auto; max-height: 88vh; }
.einwurf-inhalt { padding: 20px 22px; overflow-y: auto; }

.ew-feld { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.ew-feld > span {
  font-family: 'IBM Plex Mono', monospace; font-size: 9.5px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.ew-feld select, .ew-feld input[type="file"] {
  padding: 9px 11px; border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--text);
  font-family: 'IBM Plex Sans', sans-serif; font-size: 13px; outline: none;
}
.ew-feld select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.ew-feld small { font-size: 11px; color: var(--muted); }

.ew-adresse { margin-bottom: 10px; }
.ew-adresse .adr-zeile { display: block; font-size: 12.5px; color: var(--text); }
.ew-adresse .adr-label {
  font-family: 'IBM Plex Mono', monospace; font-size: 9.5px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px;
}
.ew-bestaetigung {
  display: flex; align-items: flex-start; gap: 9px; margin-bottom: 16px;
  padding: 11px 12px; background: var(--warn-bg);
  border: 1px solid var(--warn-border); border-radius: var(--radius);
  font-size: 12.5px; line-height: 1.45; color: var(--warn-text); cursor: pointer;
}
.ew-bestaetigung input { accent-color: var(--warn-text); width: 16px; height: 16px; margin-top: 1px; cursor: pointer; }

.ew-aktionen { display: flex; gap: 8px; }
.ew-bilanz {
  margin-top: 16px; padding: 11px 13px;
  background: var(--accent-light); border: 1px solid #a9cdb8;
  border-radius: var(--radius); font-size: 12.5px; color: var(--accent);
}
.ew-abgelehnt {
  list-style: none; margin: 9px 0 0; padding: 0;
  font-size: 11.5px; color: var(--text-2);
}
.ew-abgelehnt li { padding: 5px 0; border-bottom: 1px solid var(--border); }
.ew-abgelehnt .mono { font-family: 'IBM Plex Mono', monospace; }

/* Noch nicht erfasste Angaben: als Lücke zeigen, nicht als Wert */
.verw-tabelle .fehlt { color: var(--muted); font-style: italic; }
.status-erfasst { background: #efe9dd; color: #6a6047; border-color: #d8cdb4; }
.dub-status.status-erfasst { background: #efe9dd; color: #6a6047; border-color: #d8cdb4; }

/* Schalter in der Firmenkarte */
.fk-schalter { flex-direction: row !important; align-items: flex-start; gap: 9px !important; }
.fk-schalter input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--accent); cursor: pointer; flex: none; }
.fk-schalter-text { font-size: 12.5px; color: var(--text); }
.fk-schalter-text small { display: block; margin-top: 3px; font-size: 10.5px; color: var(--muted); line-height: 1.45; }
.firma-adresse.ohne-pruefung { opacity: 0.85; }
.oa-kein-zugriff {
  margin-left: auto; padding: 1px 7px; border-radius: 999px;
  background: var(--warn-bg); border: 1px solid var(--warn-border);
  font-size: 9.5px; color: var(--warn-text); white-space: nowrap;
}
.status-hinweis {
  margin-top: 9px; font-size: 11.5px; line-height: 1.45; color: var(--muted);
}
.archiv-aktion { display: flex; align-items: flex-start; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.archiv-suchergebnis { font-size: 11.5px; line-height: 1.45; color: #6a6047; flex: 1; min-width: 180px; }
.such-treffer { list-style: none; margin: 5px 0 0; padding: 0; font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; }
.such-treffer li { padding: 2px 0; word-break: break-all; }

/* ── Mailversand ──────────────────────────────────────────────── */
.firma-karte.vorgabe { border-left: 3px solid var(--accent); }
.mail-empfaenger {
  margin-bottom: 13px; padding: 8px 11px;
  background: var(--surface-2); border-radius: var(--radius);
  font-size: 12px; color: var(--text-2);
}
.mail-empfaenger .fehlt { color: var(--warn-text); font-style: normal; }
.fk-feld select {
  padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--text);
  font-family: 'IBM Plex Sans', sans-serif; font-size: 12.5px; outline: none;
}
.fk-feld select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.mail-stand { margin-left: auto; font-size: 10.5px; color: var(--muted); }

/* ── Versand: die zweite Dimension neben dem Statuslauf ─────────────────── */
/* Bewusst anders geformt als ein Status-Chip (Pfeil, eckiger): Es ist kein
   Status, und es soll auch nicht wie einer aussehen. */
.versand-chip {
  display: inline-block; margin-left: 6px; padding: 2px 7px; border-radius: var(--radius-sm);
  background: var(--accent-light); color: var(--accent); border: 1px solid #a9cdb8;
  font-size: 10px; font-weight: 500; white-space: nowrap;
}
.versand-chip.offen {
  background: transparent; color: var(--muted); border-style: dashed; border-color: var(--border-strong);
}

.versand-stand {
  padding: 9px 12px; margin-bottom: 8px;
  background: var(--accent-light); border: 1px solid #a9cdb8; border-radius: var(--radius);
  font-size: 12px; line-height: 1.5; color: var(--text-2);
}
.versand-stand.offen {
  background: var(--surface-2); border-color: var(--border); color: var(--muted);
}
.versand-stand .v-meta { color: var(--muted); }

.versand-fehler {
  margin: 8px 0 0; padding: 0 0 0 16px;
  font-size: 11.5px; line-height: 1.5; color: var(--error);
}
.versand-fehler li { margin-bottom: 3px; }

/* ── Abgeschlossenes: nach unten geschoben und zugeklappt ───────────────── */
/* Oben steht nur, was noch Arbeit macht. "Gezahlt" gehoert bewusst nicht
   hierher: Solange ein Beleg nicht archiviert ist, fehlt ihm eine Stufe. */
.erledigt-block { margin-top: 14px; }
.erledigt-kopf {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 10px 14px; cursor: pointer; text-align: left;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-family: inherit; font-size: 12.5px; font-weight: 500; color: var(--text-2);
}
.erledigt-kopf:hover {
  background: var(--surface); border-color: var(--border-strong); color: var(--text);
}
.erledigt-kopf:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 2px; }
.erledigt-pfeil { color: var(--muted); font-size: 11px; }
.erledigt-block .tabelle-rahmen { margin-top: 8px; }
