/* Belegakte der Buchhaltung (Bauplan BU13): Betrag, Knöpfe, Prüfbefunde, Blöcke wie die Zeilendetails des PC-Programms, Positionen
   und Zahlungen als schmale Tabellen. Haarlinien, Ecken 3 px, Farbe nur für Bedeutung (Befunde, Beträge). */
.bh-a-betragzeile { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 4px 14px 10px; }
.bh-a-betrag { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bh-a-marken { display: flex; flex-wrap: wrap; gap: 4px; }
.bh-a-leiste { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; border-bottom: 1px solid var(--linie); }
.bh-a-leiste .kn { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.bh-a-spiegel { margin: 10px 14px 0; padding: 8px 10px; border: 1px solid var(--linie); border-radius: 3px; background: var(--flaeche-2);
    font-size: 12.5px; color: var(--tinte-2); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.bh-a-laedt { display: flex; align-items: center; gap: 8px; margin: 14px; color: var(--tinte-3); font-size: 13px; }
.bh-a-fehler { margin: 10px 14px 0; }
.bh-a-befunde { display: flex; flex-direction: column; gap: 4px; margin: 10px 14px 0; }
.bh-a-befund { display: flex; flex-direction: column; gap: 1px; padding: 6px 9px; border-radius: 3px; border-left: 3px solid var(--warn);
    background: var(--warn-grund); font-size: 12.5px; }
.bh-a-befund.fehler { border-left-color: var(--alarm); background: var(--alarm-grund); }
.bh-a-befund.hinweis { border-left-color: var(--tinte-4); background: var(--flaeche-2); }
.bh-a-befund strong { font-weight: 600; }
.bh-a-befund span { color: var(--tinte-2); }
.bh-a-block, .bh-a-positionen, .bh-a-zahlungen { margin: 0 14px; padding: 10px 0; border-bottom: 1px solid var(--linie-fein); }
.bh-a-block h3, .bh-a-positionen h3, .bh-a-zahlungen h3 { margin: 0 0 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .02em;
    text-transform: uppercase; color: var(--tinte-3); display: flex; align-items: baseline; gap: 6px; }
.bh-a-block dl { margin: 0; display: grid; gap: 3px; }
.bh-a-zeile { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 8px; font-size: 13px; line-height: 1.35; }
.bh-a-zeile dt { color: var(--tinte-3); }
.bh-a-zeile dd { margin: 0; overflow-wrap: anywhere; }
.bh-a-gutschrift dd { display: flex; flex-wrap: wrap; gap: 2px 10px; }
.bh-a-summe { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--tinte-2); font-variant-numeric: tabular-nums; }
.bh-a-tabelle { overflow-x: auto; }
.bh-a-tabelle table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.bh-a-tabelle th { text-align: left; font-weight: 500; color: var(--tinte-3); padding: 3px 6px; border-bottom: 1px solid var(--linie); white-space: nowrap; }
.bh-a-tabelle td { padding: 4px 6px; border-bottom: 1px solid var(--linie-fein); vertical-align: top; }
.bh-a-tabelle .zahl { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bh-a-tabelle .bh-a-text { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bh-a-positionen .blass, .bh-a-zahlungen .blass { color: var(--tinte-3); font-size: 12.5px; margin: 0; }
.bh-z-chips { display: flex; gap: 4px; margin-top: 4px; }
.bh-z-hinweis { margin: 10px 0 0; font-size: 12.5px; color: var(--tinte-2); }
.bh-zahlungsdialog { width: min(640px, calc(100vw - 32px)); }

/* Vorschau der Belegdatei (BU14): Kopf mit Name, Blättern, „In neuem Tab öffnen“, Anhängen/Entfernen; PDF im iframe, Bild als img.
   Am Handy (schmales Fenster oder Touch ohne Maus) kein iframe: der PDF-Betrachter des Browsers ist dort unbrauchbar, der Verweis
   öffnet einen eigenen Tab. ☠️ Nach dem FENSTER, nicht nach der Breite der Akte: die Akte ist auch am Schreibtisch nur gut 400 px
   breit (eine Containerabfrage bis 420 px verbarg die PDF überall, Prüfung im Browser 14.11.2026). */
.bh-vorschau { margin: 10px 14px 0; }
.bh-v-kopf { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; min-height: 28px; }
.bh-v-kopf h3 { margin: 0; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; color: var(--tinte-3); text-transform: uppercase; }
.bh-v-name { min-width: 0; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--tinte-2); }
.bh-v-blaettern { display: inline-flex; align-items: center; gap: 2px; }
.bh-v-zaehler { font-size: 12px; color: var(--tinte-3); font-variant-numeric: tabular-nums; }
.bh-v-kopf .kn { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.bh-v-hinzu { position: relative; cursor: pointer; }
.bh-v-hinzu input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.bh-v-hinzu[aria-disabled=true] { opacity: .55; pointer-events: none; }
.bh-v-flaeche { margin-top: 6px; border: 1px solid var(--linie); border-radius: 3px; background: var(--flaeche-2); }
.bh-v-pdf { display: block; width: 100%; height: 460px; border: 0; border-radius: 3px; background: #fff; }
.bh-v-bild { display: block; max-width: 100%; max-height: 460px; margin: 0 auto; object-fit: contain; }
.bh-v-hinweis, .bh-v-laedt { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0; padding: 10px; font-size: 12.5px; color: var(--tinte-2); }
.bh-v-laedt { color: var(--tinte-3); }
@media (max-width: 640px), (pointer: coarse) and (hover: none) {
    .bh-v-pdf { display: none; }
    .bh-vorschau[data-zustand=Fertig] .bh-v-flaeche:has(.bh-v-pdf) { display: none; }
}
