/* RUESS Hub 3.7.0 - Kunden-Anlagen › Autostadt-Abgleich (public/autostadt-abgleich.js). Bausteine wie Eingangsprotokolle (box ap-box, ap-toolbar, ap-tabs, ap-table);
   hier nur Kacheln, Scanfeld und Scan-Ergebnis. Nur Tokens aus ruess-design-system.css. */
.as-abgleich .as-datei { position: relative; overflow: hidden; cursor: pointer; display: inline-flex; align-items: center; }
.as-abgleich .as-datei input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.as-abgleich .as-datei:focus-within { outline: 2px solid var(--ds-focus); outline-offset: 2px; }
.as-abgleich .as-kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: var(--ds-space-3); margin: var(--ds-space-3) 0; }
.as-abgleich .as-kachel { border: 1px solid var(--ds-line); border-radius: var(--ds-radius-lg); padding: var(--ds-space-3) var(--ds-space-4); background: var(--ds-surface); display: flex; flex-direction: column; gap: var(--ds-space-1); min-width: 0; }
.as-abgleich .as-kachel span { color: var(--ds-muted); font-size: var(--ds-font-xs); }
.as-abgleich .as-kachel b { font-size: var(--ds-font-xl); color: var(--ds-ink); font-variant-numeric: tabular-nums; }
.as-abgleich .as-kachel.as-ok { background: var(--ds-success-soft); }
.as-abgleich .as-kachel.as-warn { background: var(--ds-warning-soft); }
.as-abgleich .as-kachel.as-fehler { background: var(--ds-danger-soft); }
.as-abgleich .as-scanform { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: flex-start; gap: var(--ds-space-2); margin: var(--ds-space-3) 0; }
.as-abgleich .as-scanform label { display: flex; flex-direction: column; gap: var(--ds-space-1); font-size: var(--ds-font-xs); color: var(--ds-muted); flex: 0 1 360px; min-width: 0; }
.as-abgleich .as-scanform input { height: var(--ds-h-form); box-sizing: border-box; width: 100%; padding: 0 var(--ds-space-3); border: 1px solid var(--ds-line-strong); border-radius: var(--ds-radius-md); background: var(--ds-surface); color: var(--ds-text); font-size: var(--ds-font-lg); font-variant-numeric: tabular-nums; }
.as-abgleich .as-scanform input:focus-visible { outline: 2px solid var(--ds-focus); outline-offset: 1px; }
.as-abgleich .as-ergebnis { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--ds-space-2) var(--ds-space-4); padding: var(--ds-space-3) var(--ds-space-4); margin: 0 0 var(--ds-space-3); border: 1px solid var(--ds-line); border-radius: var(--ds-radius-lg); color: var(--ds-ink); }
.as-abgleich .as-ergebnis b { font-size: var(--ds-font-lg); }
.as-abgleich .as-ergebnis.as-ok { background: var(--ds-success-soft); }
.as-abgleich .as-ergebnis.as-warn { background: var(--ds-surface-2); }
.as-abgleich .as-ergebnis.as-fehler { background: var(--ds-warning-soft); }
.as-abgleich .as-ergebnis .as-rep { flex: 1 1 100%; padding: var(--ds-space-2) var(--ds-space-3); border: 1px solid var(--ds-line-strong); border-radius: var(--ds-radius-md); background: var(--ds-warning-soft); color: var(--ds-ink); font-size: var(--ds-font-lg); }
.as-abgleich .as-repmark { font-weight: 700; margin-right: var(--ds-space-1); }
/* Badges: spezifischer als ui-2026 (html[data-seiten] #appBox .app-view .ap-badge) */
html #appBox #autostadtView .as-abgleich .ap-badge.as-ok, .as-abgleich .ap-badge.as-ok { background: var(--ds-success-soft); color: var(--ds-ink); }
html #appBox #autostadtView .as-abgleich .ap-badge.as-warn, .as-abgleich .ap-badge.as-warn { background: var(--ds-surface-2); color: var(--ds-ink); }
html #appBox #autostadtView .as-abgleich .ap-badge.as-fehler, .as-abgleich .ap-badge.as-fehler { background: var(--ds-warning-soft); color: var(--ds-ink); }
html #appBox #autostadtView .as-abgleich :is(.ap-head, .ap-chips) { min-width: 0; max-width: 100%; }
html #appBox #autostadtView .as-abgleich .ap-chip { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; box-sizing: border-box; }
.as-abgleich .as-mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }
@media (max-width: 640px) {
  .as-abgleich .as-kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .as-abgleich .as-scanform label { flex: 1 1 100%; }
}
/* 3.7.0 Ausgang: Grund je Teil (Auswahl, Hinweis, voraussichtlich bis) in einer Zeile, am Handy umbrechen */
.as-abgleich .as-grund { display: flex; flex-wrap: wrap; gap: var(--ds-space-2); align-items: center; }
.as-abgleich .as-grund :is(select, input) { height: var(--ds-h-bar); box-sizing: border-box; padding: 0 var(--ds-space-2); border: 1px solid var(--ds-line-strong); border-radius: var(--ds-radius-md); background: var(--ds-surface); color: var(--ds-text); font: inherit; font-size: var(--ds-font-sm); min-width: 0; }
.as-abgleich .as-grund select { flex: 0 0 140px; }
.as-abgleich .as-grund input[type="text"] { flex: 1 1 160px; }
.as-abgleich .as-grund input[type="date"] { flex: 0 0 150px; }
.as-abgleich .as-grund :is(select, input):focus-visible { outline: 2px solid var(--ds-focus); outline-offset: 1px; }
/* 3.7.8 Mailverlauf: aufklappbarer Mailtext unter der Zeile */
.as-abgleich .as-mailtext td { background: var(--ds-surface-2); }
.as-abgleich .as-mailtext pre { margin: 0; white-space: pre-wrap; word-break: break-word; font: inherit; font-size: var(--ds-font-sm); color: var(--ds-text); max-height: 320px; overflow: auto; }
.as-abgleich td .ap-btn.klein + .ap-btn.klein { margin-left: var(--ds-space-1); }
.as-abgleich td.as-betreff { min-width: 240px; }
/* 3.7.13 Hinweis „Artikel ohne Abrechnungsartikel (ExportNr)“ – Übersicht aufklappbar */
.as-abgleich .as-export { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ds-space-2) var(--ds-space-3); padding: var(--ds-space-3) var(--ds-space-4); margin: var(--ds-space-3) 0; border: 1px solid var(--ds-line-strong); border-radius: var(--ds-radius-lg); background: var(--ds-warning-soft); color: var(--ds-ink); font-size: var(--ds-font-sm); }
.as-abgleich .as-export > span { flex: 1 1 320px; min-width: 0; }
.as-abgleich .as-export > .ap-table-wrap { flex: 1 1 100%; background: var(--ds-surface); border-radius: var(--ds-radius-md); }
html #appBox #autostadtView .as-abgleich .as-export > .ap-btn, .as-abgleich .as-export > .ap-btn { margin-left: auto; }   /* Knopf rechtsbündig (auch am Handy) */
