/* Buchhaltung (02.11.2026) — miesiące, dokumenty, kontrola, paczka dla księgowej, skaner w telefonie. Kolory i elementy z styles.css. */
.bh { padding: 20px 28px 48px; max-width: 1120px; display: flex; flex-direction: column; gap: 16px; }
.bh h2 { font-size: 24px; }
.bh .blatt, .bh-zwei .blatt { margin: 0; }
.bh-zeile { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bh-zeile > .wachsen { flex: 1 1 280px; min-width: 0; }
.bh-ablage { border: 2px dashed var(--rand); border-radius: 12px; background: var(--flaeche); padding: 18px 20px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.bh-ablage.ueber { border-color: var(--aktion); background: var(--aktion-hell); }
.bh-ablage .ikon { width: 44px; height: 44px; border-radius: 50%; background: var(--aktion-hell); color: var(--aktion); display: grid; place-items: center; flex: none; }
.bh-ablage .ikon svg, .btn svg.bh-ik { width: 20px; height: 20px; }
.bh-ablage .text { flex: 1 1 260px; }

/* pasek stanu miesiąca */
.bh-spur { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--linie); margin-top: 8px; max-width: 520px; }
.bh-spur span { display: block; height: 100%; }
.bh-s-neu { background: var(--marker); }
.bh-s-pruef { background: var(--aktion); }
.bh-s-ok { background: var(--gruen); }
.bh-s-storno { background: var(--linie2); }
.bh-legende { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--grafit); }
.bh-legende i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.posten .bh-rechts { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }

/* miesiąc: lista + szczegóły */
.bh-monat { display: flex; flex-wrap: wrap; align-items: flex-start; }
.bh-liste { flex: 999 1 620px; min-width: 0; padding: 16px 20px 40px 28px; display: flex; flex-direction: column; gap: 12px; }
.bh-detail { flex: 1 1 380px; max-width: 480px; min-width: 0; border-left: 1px solid var(--linie); padding: 16px 28px 40px 22px; display: flex; flex-direction: column; gap: 12px; position: sticky; top: 0; max-height: 100vh; overflow-y: auto; }
.bh-detail .leer { padding: 40px 10px; }
.bh-filter { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.bh-filter .chip .n { opacity: .7; font-variant-numeric: tabular-nums; margin-left: 4px; }
.bh-tab { overflow-x: auto; }
.bh-tab .tabelle tbody tr { cursor: pointer; }
.bh-tab .tabelle tbody tr:hover td { background: #F8FAF8; }
.bh-tab .tabelle tr.aktuell td { background: var(--aktion-hell); }
.bh-tab .tabelle tr.aktuell td:first-child { box-shadow: inset 3px 0 0 var(--aktion); }
.bh-tab .tabelle input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--aktion); margin: 0; }
.bh-tab .tabelle .klein { display: block; color: var(--grafit); }
.bh-vorschau { width: 100%; height: 420px; border: 1px solid var(--linie2); border-radius: 8px; background: #fff; }
.bh-verlauf { list-style: none; margin: 0; padding: 0; }
.bh-verlauf li { position: relative; padding: 0 0 12px 22px; font-size: 14px; }
.bh-verlauf li::before { content: ''; position: absolute; left: 4px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--gruen); }
.bh-verlauf li::after { content: ''; position: absolute; left: 8px; top: 17px; bottom: 0; width: 1px; background: var(--linie2); }
.bh-verlauf li:last-child::after { display: none; }
.bh-verlauf li.offen::before { background: var(--flaeche); border: 2px solid var(--rand); width: 7px; height: 7px; }
.bh-verlauf small { display: block; color: var(--grafit); font-size: 12.5px; }

/* kontrola */
.bh-kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); border-top: 2px solid var(--tinte); border-left: 1px solid var(--linie); }
.bh-kachel { background: var(--flaeche); padding: 12px 16px; border-right: 1px solid var(--linie); border-bottom: 1px solid var(--linie); text-decoration: none; color: inherit; }
.bh-kachel .was { font-size: 14px; color: var(--grafit); font-weight: 560; }
.bh-kachel .zahl-gross { font-size: 32px; font-weight: 800; font-stretch: 75%; line-height: 1.15; }
.bh-kachel.rot .zahl-gross { color: var(--rot); }
.bh-kachel.ok .zahl-gross { color: var(--gruen); }
.bh-pz { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--linie); }
.bh-pz:last-child { border-bottom: 0; }
.bh-pz .wer { flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; }
.bh-pz .betrag { font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 92px; text-align: right; }
.bh-pz .akt { display: flex; gap: 6px; flex-wrap: wrap; }
.bh-pz .treffer { flex-basis: 100%; padding-left: 38px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.bh-punkt { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 800; font-size: 14px; }
.bh-punkt.ok { background: var(--gruen-hell); color: var(--gruen); }
.bh-punkt.fehlt { background: var(--rot-hell); color: var(--rot); }
.bh-punkt.warte { background: var(--marker-weich); color: #6B5200; }
.bh-punkt.info { background: var(--aktion-hell); color: var(--aktion); }
.bh-blass { opacity: .65; }
.bh-mailtext { padding: 12px 14px; background: var(--papier); border-radius: 8px; font-size: 14px; white-space: pre-wrap; }
.bh-fortschritt { height: 8px; border-radius: 999px; background: var(--linie); overflow: hidden; }
.bh-fortschritt span { display: block; height: 100%; background: var(--aktion); transition: width .3s; }
.bh-zwei { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.bh-zwei > .blatt { margin: 0; }

/* Postfach: przycisk przy załączniku */
.anh-mit-bh { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.anh-mit-bh .badge { white-space: normal; }

/* skaner (pełny ekran) */
.bh-scan { position: fixed; inset: 0; z-index: 70; background: var(--tinte); color: #fff; display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
.bh-scan-kopf { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.bh-scan-kopf b { font-size: 19px; font-stretch: 75%; font-weight: 800; margin-right: auto; }
.bh-scan-kopf button { background: none; border: 1px solid rgba(255, 255, 255, .3); color: #fff; border-radius: 8px; padding: 6px 12px; min-height: 40px; }
.bh-scan-buehne { flex: 1; min-height: 0; position: relative; display: grid; place-items: center; padding: 8px 12px; touch-action: none; }
.bh-scan-buehne canvas { max-width: 100%; max-height: 100%; display: block; }
.bh-scan-buehne img { object-fit: contain; }
.bh-scan-leer { text-align: center; padding: 24px; max-width: 420px; }
.bh-scan-leer p { color: #C9D2D8; }
.bh-scan-fuss { background: var(--papier); color: var(--tinte); padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; border-radius: 14px 14px 0 0; max-height: 62vh; overflow-y: auto; }
.bh-scan-fuss .btn { min-height: 46px; }
@media (min-width: 761px) { .bh-scan-fuss { width: 100%; max-width: 620px; margin: 0 auto; } }
.bh-scan-knoepfe { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.bh-seiten { display: flex; gap: 8px; overflow-x: auto; align-items: center; padding-bottom: 2px; }
.bh-seite { position: relative; flex: none; width: 54px; height: 72px; border-radius: 6px; border: 2px solid var(--aktion); overflow: hidden; background: #fff; }
.bh-seite img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bh-seite button { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(21, 32, 43, .75); color: #fff; font-size: 13px; line-height: 1; padding: 0; }
.bh-seite span { position: absolute; left: 3px; bottom: 2px; font-size: 11px; font-weight: 700; background: rgba(255, 255, 255, .85); border-radius: 4px; padding: 0 4px; }
.bh-form-zwei { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; }
.bh-art { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; }
.bh-art button { padding: 9px 4px; }
.bh-datei-liste { font-size: 14px; margin: 4px 0 0; padding-left: 18px; }

/* zwijane sekcje, ekran startowy, Eigenbeleg (03.11.2026) */
.bh-klapp > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bh-klapp > summary::-webkit-details-marker { display: none; }
.bh-klapp > summary::before { content: ''; flex: none; width: 8px; height: 8px; margin: 0 4px 0 2px; border-right: 2px solid var(--grafit); border-bottom: 2px solid var(--grafit);
  transform: rotate(-45deg); transition: transform .15s; }
.bh-klapp[open] > summary::before { transform: rotate(45deg); }
.bh-klapp > summary:focus-visible { outline: 2px solid var(--aktion); outline-offset: 3px; border-radius: 6px; }
.bh-klapp-titel { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bh-klapp > summary h2, .bh-klapp > summary h3, .bh-klapp > summary h4 { margin: 0; }
.bh-klapp.blatt[open] > summary { margin-bottom: 8px; }
.bh-klapp-klein > summary::before { width: 6px; height: 6px; }
.bh-fehlt { display: flex; flex-direction: column; gap: 10px; }
.bh-fehlt .blatt { padding: 12px 16px; }
.bh-fehlt summary small { font-size: 13px; font-weight: 400; }
.bh-fehlt summary .bh-punkt { width: 30px; height: 30px; }
.bh-st-kurz .bh-kachel { display: flex; flex-direction: column; gap: 2px; }
.bh-st-zeile { font-size: 14px; }
.bh-eb-seg button { white-space: normal; line-height: 1.2; font-size: 13.5px; }
.dialog span.lbl { display: block; font-size: 13px; color: var(--grafit); margin: 10px 0 4px; font-weight: 540; }

@media (max-width: 760px) {
  .bh { padding: 14px 14px 40px; }
  .bh-liste { padding: 12px 12px 40px; }
  .bh-detail { display: none; }
  .bh-detail.offen { display: flex; position: fixed; inset: 0; z-index: 50; max-width: none; background: var(--papier); padding: 0 0 40px; border: 0;
    padding-top: env(safe-area-inset-top); }
  .bh-detail .bh-innen { padding: 12px 16px; display: flex; flex-direction: column; gap: 12px; }
  .bh-vorschau { display: none; }
  .bh-tab .tabelle td:first-child { position: absolute; right: 12px; }
  .bh-tab .tabelle tr { position: relative; }
  .posten .bh-rechts { grid-column: 1 / -1; align-items: flex-start; text-align: left; }
  .bh-ablage { display: none; }
  .bh-st-kurz { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bh-st-kurz .bh-kachel { padding: 10px 12px; }
  .bh-eb-seg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 761px) { .bh-detail .detail-zurueck { display: none; } .bh-detail .bh-innen { display: flex; flex-direction: column; gap: 12px; } }
