/* Buchhaltung › BWA: dieselbe OfficeOmni-Palette, Plex-Schrift und 3-px-Ecken wie Belege.
   Die breite Auswertung rollt in einem eigenen Bereich; Zahlen bleiben rechtsbündig und die Kopfzeile stehen. */
.bwa-seite { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; min-height: 0; height: 100%; padding: 20px 24px 16px; gap: 16px; overflow: hidden; }
.bwa-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: 0 0 auto; }
.bwa-kopf h1 { font-size: 21px; font-weight: 600; line-height: 1.3; }
.bwa-kopf .kn { white-space: nowrap; }
.bwa-bericht { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; min-height: 0; border: 1px solid var(--linie); border-radius: 4px; background: var(--flaeche); overflow: hidden; }
.bwa-bericht-kopf { flex: 0 0 auto; border-bottom: 1px solid var(--linie); }
.bwa-bericht-name { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 16px 18px 12px; }
.bwa-bericht-name h2 { font-size: 16px; font-weight: 600; margin-right: 5px; }
.bwa-auswertungswahl { max-width: 100%; border: 1px solid var(--linie-stark); border-radius: 3px; background: var(--flaeche); color: var(--tinte-1); font-size: 15px; font-weight: 600; height: 32px; padding: 0 28px 0 8px; }
.bwa-bericht-name .marke { color: var(--tinte-3); background: var(--flaeche-2); border: 1px solid var(--linie); border-radius: 3px; padding: 2px 6px; font-size: 11px; white-space: nowrap; }
.bwa-firma { margin-left: auto; font-size: 12px; color: var(--tinte-4); }
.bwa-werkzeuge { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 0 18px 14px; }
.bwa-fuell { flex: 1 1 auto; }
.bwa-periode { display: inline-flex; align-items: center; gap: 4px; }
.bwa-feld input, .bwa-feld select { height: 28px; border: 1px solid var(--linie-stark); border-radius: 3px; padding: 0 8px; background: var(--flaeche); color: var(--tinte-1); }
.bwa-jahr { width: 78px; }
.bwa-periodenwahl { min-width: 120px; }
.bwa-leere { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--tinte-3); white-space: nowrap; cursor: pointer; }
.bwa-leere input { appearance: none; width: 28px; height: 16px; padding: 2px; border-radius: 10px; background: var(--linie-stark); cursor: pointer; }
.bwa-leere input::before { content: ""; display: block; width: 12px; height: 12px; background: var(--flaeche); border-radius: 50%; }
.bwa-leere input:checked { background: var(--akzent); }
.bwa-leere input:checked::before { transform: translateX(12px); }
.bwa-export { position: relative; }
.bwa-export-menue { position: absolute; z-index: 12; right: 0; top: calc(100% + 4px); min-width: 190px; padding: 4px; border: 1px solid var(--linie-stark); border-radius: 3px; background: var(--flaeche); box-shadow: var(--schatten); }
.bwa-export-menue button { display: block; width: 100%; padding: 8px; border: 0; background: none; color: var(--tinte-1); text-align: left; cursor: pointer; }
.bwa-export-menue button:hover { background: var(--flaeche-2); }
.bwa-hinweis { display: flex; flex: 0 0 auto; align-items: flex-start; gap: 8px; padding: 8px 18px; color: var(--tinte-4); font-size: 12px; border-bottom: 1px solid var(--linie); }
.bwa-hinweis .sym { flex: 0 0 auto; margin-top: 1px; }
.bwa-hinweis span { flex: 1 1 auto; }
.bwa-hinweis.warnung { color: var(--warn); background: var(--warn-grund); }
.bwa-hinweis.fehler { color: var(--alarm); background: var(--alarm-grund); align-items: center; }
.bwa-grundlage { flex: 0 0 auto; padding: 8px 18px; color: var(--tinte-4); font-size: 12px; border-bottom: 1px solid var(--linie); }
.bwa-grundlage summary { display: flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; }
.bwa-grundlage summary::-webkit-details-marker { display: none; }
.bwa-grundlage summary::before { content: "▸"; }
.bwa-grundlage[open] summary::before { transform: rotate(90deg); }
.bwa-grundlage summary .sym { flex: 0 0 auto; }
.bwa-grundlage p { padding: 8px 0 0 21px; max-width: 100ch; }
.bwa-zustand { padding: 28px 18px; display: flex; align-items: center; justify-content: center; gap: 9px; color: var(--tinte-4); }
.bwa-laden { flex: 1 1 auto; min-height: 160px; }
.bwa-leer { flex-direction: column; align-items: flex-start; padding: 14px 18px; gap: 3px; border-bottom: 1px solid var(--linie); font-size: 12px; }
.bwa-leer strong { color: var(--tinte-2); font-weight: 600; }
.bwa-tabelle-rolle { min-width: 0; min-height: 130px; overflow: auto; flex: 1 1 auto; scrollbar-gutter: stable; }
.bwa-tabelle { width: 100%; min-width: 1080px; border-collapse: separate; border-spacing: 0; font-size: 12px; font-variant-numeric: tabular-nums; }
.bwa-tabelle .bwa-bezeichnung-spalte { width: 30%; }
.bwa-tabelle th, .bwa-tabelle td { height: 34px; padding: 7px 14px; border-bottom: 1px solid var(--linie-fein); text-align: right; vertical-align: middle; white-space: nowrap; }
.bwa-tabelle thead th { position: sticky; top: 0; z-index: 3; height: 58px; background: var(--flaeche-2); border-bottom: 1px solid var(--linie-stark); font-weight: 500; font-size: 11px; line-height: 1.4; white-space: normal; }
.bwa-tabelle thead th span { display: block; font-size: 10px; color: var(--tinte-4); }
.bwa-tabelle th:first-child { text-align: left; padding-left: 18px; }
.bwa-tabelle tbody th { font-weight: 400; }
.bwa-tabelle .bwa-kumuliert { border-left: 1px solid var(--linie); }
.bwa-tabelle .bwa-prozent { color: var(--tinte-4); }
.bwa-tabelle .bwa-betrag { min-width: 145px; }
.bwa-tabelle tbody tr:hover { background: var(--flaeche-2); }
.bwa-tabelle .bwa-summe th, .bwa-tabelle .bwa-summe td { font-weight: 600; border-top: 1px solid var(--linie); }
.bwa-tabelle .bwa-ergebnis th, .bwa-tabelle .bwa-ergebnis td { font-weight: 600; border-top: 1px solid var(--linie-stark); background: var(--flaeche-2); }
.bwa-tabelle tr[data-zeile="vorlaeufiges_ergebnis"] th, .bwa-tabelle tr[data-zeile="vorlaeufiges_ergebnis"] td { border-bottom: 3px double var(--linie-stark); }
.bwa-tabelle .bwa-abschnitt th { padding: 13px 18px 5px; height: 36px; font-weight: 600; font-size: 12px; color: var(--tinte-3); border-bottom: 1px solid var(--linie); }
.bwa-analyse-tabelle th:first-child { min-width: 310px; max-width: 360px; white-space: normal; }
.bwa-analyse-tabelle thead th:first-child { left: 0; z-index: 5; }
.bwa-analyse-tabelle tbody th:first-child { position: sticky; left: 0; z-index: 2; background: var(--flaeche); border-right: 1px solid var(--linie); }
.bwa-analyse-tabelle .bwa-ergebnis th:first-child { background: var(--flaeche-2); }
.bwa-analyse-kontoname { display: flex; align-items: baseline; gap: 10px; padding-left: 25px; }
.bwa-zellbelege { border: 0; background: none; color: inherit; padding: 0; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.bwa-planspalte { border-left: 1px solid var(--linie); }
.bwa-aufklappen, .bwa-konto-knopf { display: inline-flex; align-items: center; gap: 7px; border: 0; padding: 0; margin: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.bwa-aufklappen { width: 100%; min-height: 20px; }
.bwa-aufklappen .sym { flex: 0 0 auto; color: var(--tinte-4); }
.bwa-zeilentext { display: inline-block; padding-left: 21px; }
.bwa-konto th, .bwa-konto td { color: var(--tinte-3); font-size: 11.5px; }
.bwa-konto-knopf { padding-left: 25px; gap: 10px; min-height: 20px; }
.bwa-konto-knopf:hover { text-decoration: underline; }
.bwa-kontonummer { min-width: 35px; color: var(--tinte-4); }
.bwa-fuss { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: space-between; gap: 5px 18px; padding: 8px 18px; font-size: 11px; color: var(--tinte-4); border-top: 1px solid var(--linie); }
.bwa-nicht-zugeordnet { flex: 0 0 auto; max-height: 190px; padding: 10px 18px; overflow: auto; font-size: 12px; border-top: 1px solid var(--linie); }
.bwa-nicht-zugeordnet summary { cursor: pointer; color: var(--warn); }
.bwa-nicht-zugeordnet p { margin: 7px 0; color: var(--tinte-4); }
.bwa-nicht-zugeordnet div { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0; }
.bwa-nicht-zugeordnet div strong { margin-left: auto; }
.bwa-kontoblatt.oo-dialog { top: 8vh; width: min(850px, calc(100vw - 32px)); max-width: none; max-height: 84vh; overflow-y: auto; }
.bwa-kontoblatt-kopf { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.bwa-kontoblatt-kopf p { flex-basis: 100%; color: var(--tinte-4); font-size: 12px; }
.bwa-kontosumme { margin-left: auto; font-size: 17px; }
.bwa-kontobelege-rolle { overflow: auto; max-height: 50vh; border: 1px solid var(--linie); border-radius: 3px; }
.bwa-kontobelege { width: 100%; min-width: 540px; border-collapse: collapse; font-size: 12px; }
.bwa-kontobelege th, .bwa-kontobelege td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--linie-fein); vertical-align: top; }
.bwa-kontobelege th { position: sticky; top: 0; background: var(--flaeche-2); font-weight: 500; }
.bwa-kontobelege th:last-child, .bwa-kontobelege td:last-child { text-align: right; white-space: nowrap; }
.bwa-kontobelege td:first-child { white-space: nowrap; }
.bwa-kontobelege a { display: inline-flex; align-items: center; gap: 5px; }
.bwa-konto-hilfe, .bwa-konto-leer { font-size: 12px; color: var(--tinte-4); margin-top: 12px; }
.bwa-planung.oo-dialog { top: 5vh; width: min(1480px, calc(100vw - 32px)); max-height: 90vh; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.bwa-planung.oo-dialog p { margin-bottom: 0; font-size: 12px; }
.bwa-plan-rolle { flex: 1 1 auto; min-height: 120px; max-height: 62vh; overflow: auto; border: 1px solid var(--linie); border-radius: 3px; }
.bwa-plan-tabelle { width: 100%; min-width: 1380px; border-collapse: separate; border-spacing: 0; font-size: 12px; }
.bwa-plan-tabelle th, .bwa-plan-tabelle td { padding: 5px; border-bottom: 1px solid var(--linie-fein); }
.bwa-plan-tabelle thead th { position: sticky; top: 0; z-index: 3; background: var(--flaeche-2); font-weight: 500; text-align: right; }
.bwa-plan-tabelle th:first-child { position: sticky; left: 0; z-index: 2; min-width: 235px; text-align: left; background: var(--flaeche); border-right: 1px solid var(--linie); font-weight: 500; }
.bwa-plan-tabelle thead th:first-child { z-index: 4; background: var(--flaeche-2); }
.bwa-plan-tabelle input { width: 88px; height: 28px; padding: 3px 6px; border: 1px solid var(--linie-stark); border-radius: 3px; text-align: right; background: var(--flaeche); color: var(--tinte-1); }
.bwa-plan-tabelle input[aria-invalid="true"] { border-color: var(--alarm); }
.bwa-plan-nullen { align-self: flex-start; }
.bwa-nur-vorlesen { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 1200px) {
    .bwa-seite { padding: 16px; }
    .bwa-werkzeuge { gap: 8px; }
    .bwa-fuell { display: none; }
    .bwa-leere { margin-left: auto; }
}
@media (max-width: 760px) {
    .bwa-seite { padding: 12px 8px; gap: 10px; overflow: auto; }
    .bwa-kopf { align-items: flex-start; }
    .bwa-kopf h1 { font-size: 18px; }
    .bwa-kopf > a { font-size: 11px; }
    .bwa-bericht { flex: 1 0 auto; overflow: visible; }
    .bwa-bericht-name { padding: 12px 10px 10px; gap: 6px; }
    .bwa-firma { flex-basis: 100%; margin-left: 0; }
    .bwa-werkzeuge { padding: 0 10px 10px; }
    .bwa-periode { flex-wrap: nowrap; }
    .bwa-periodenwahl { min-width: 105px; }
    .bwa-leere { margin: 0; flex: 1 1 auto; }
    .bwa-hinweis, .bwa-grundlage { padding: 8px 10px; }
    .bwa-tabelle-rolle { max-height: 65vh; flex: 1 1 auto; }
    .bwa-tabelle { min-width: 990px; }
    .bwa-analyse-tabelle th:first-child { min-width: 190px; max-width: 220px; }
    .bwa-fuss { padding: 8px 10px; }
    .bwa-kontoblatt.oo-dialog { width: calc(100vw - 16px); }
    .bwa-planung.oo-dialog { top: 3vh; width: calc(100vw - 16px); max-height: 94vh; padding: 12px; }
    .bwa-plan-tabelle th:first-child { min-width: 170px; max-width: 180px; }
}
