/* Module "Buchhaltung" */
.bh-tabs { flex-wrap: wrap; align-items: center; }
.bh-scan-link { margin-left: auto; }
.bh-month-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; flex-wrap: wrap; }
.bh-month-nav h2 { margin: 0; display: flex; gap: 10px; align-items: center; }
.bh-table tr.bh-group td, .bh-group td { background: var(--bg); font-weight: 600; font-size: 0.88rem; }
.bh-files { display: flex; flex-wrap: wrap; gap: 10px; }
.bh-files figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bh-files img, .bh-pdf { display: grid; place-items: center; width: 120px; height: 120px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); font-weight: 700; color: var(--primary); text-decoration: none; }
.bh-qr-note { display: block; }
.bh-in { color: var(--ok); }
.bh-out { color: var(--text); }
.bh-camt .bh-text { max-width: 320px; overflow-wrap: anywhere; }

/* Balance sheet and income statement */
.bh-statements { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 16px; align-items: start; }
.bh-statements > .card { min-width: 0; margin: 0; }
.bh-fin td.num, .bh-fin th.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.bh-fin .bh-side td { font-weight: 700; font-size: 1rem; padding-top: 14px; border-bottom: 2px solid var(--line); }
.bh-fin .bh-subtotal td { font-weight: 600; border-top: 1px solid var(--line); }
.bh-fin .bh-total td { font-weight: 700; border-top: 2px solid var(--text); }
.bh-fin .bh-result-line td { font-style: italic; }
.bh-neg { color: var(--primary); }
.grid.grid-5 { display: grid; grid-template-columns: 150px 2fr 1fr 1fr 130px; gap: 12px; }
.bh-span-2 { min-width: 0; }
@media (max-width: 900px) {
    .bh-statements { grid-template-columns: 1fr; }
    .grid.grid-5 { grid-template-columns: 1fr 1fr; }
    .bh-span-2 { grid-column: 1 / -1; }
}

/* Photographing on the phone */
.bh-scan { max-width: 640px; }
.bh-camera { display: block; position: relative; }
.bh-camera input[type="file"] { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.bh-camera-btn { width: 100%; min-height: 64px; font-size: 1.15rem; }
.bh-preview { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.bh-preview img { width: 96px; height: 96px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.form input.bh-amount, input.bh-amount { font-size: 1.4rem !important; min-height: 52px !important; font-variant-numeric: tabular-nums; }
.bh-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.bh-cat { position: relative; margin: 0 !important; }
.bh-cat input { position: absolute; opacity: 0; }
.bh-cat span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 52px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-weight: 500; font-size: 0.92rem; cursor: pointer; }
.bh-cat input:checked + span { border-color: var(--primary); background: var(--error-bg); color: var(--primary); font-weight: 700; }
.bh-cat input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.bh-scan-actions { flex-wrap: wrap; }
@media (max-width: 760px) {
    .bh-scan-link { margin-left: 0; }
    .bh-scan-actions .btn { width: 100%; min-height: 52px; }
}
