/* SAPify Buchhaltung – Eigenes der App. Markenfarben nur über die Variablen des gemeinsamen Auftritts (--sd-…). */
.buch { --bh-akzent: var(--sd-akzent, var(--sap-blue)); --bh-wahl: rgba(var(--sd-akzent-rgb, 10,110,209), .12); --bh-krit: #c62828; --bh-hoch: #e0701a; --bh-mittel: #b26a00; --bh-tief: #6a7785; }
.bh-kopf { margin-bottom: 12px; gap: 10px; }
.bh-kopf select { width: auto; max-width: 280px; }
.bh-kopf h2 { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.buch .leer { padding: 28px 16px; text-align: center; color: var(--text-muted); }
.buch .zurueck { display: inline-block; margin-bottom: 8px; font-size: 13px; color: var(--bh-akzent); text-decoration: none; }
.buch .mono, .modal .mono { font-family: Consolas, "Cascadia Mono", monospace; font-size: 12.5px; }
.buch .zweit { display: block; font-size: 12.5px; color: var(--text-muted); }
.buch td.num, .buch th.num { text-align: right; font-variant-numeric: tabular-nums; }
.buch tr.klick { cursor: pointer; }
.buch tr.klick:hover td { background: var(--bh-wahl); }
.buch tr.zu td { color: var(--text-muted); }
.buch .tbl-wrap { overflow-x: auto; }
.buch td { vertical-align: middle; overflow-wrap: anywhere; }
.chip.ok { background: var(--ok-bg); color: var(--ok-fg); }
.buch section.panel { margin-bottom: 12px; }
.buch section.panel h3 { margin-top: 0; }
.modal.breit { width: min(760px, calc(100vw - 32px)); max-width: none; }
.modal input.mono { width: 100%; }

.bh-formraster { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px 10px; align-items: center; margin-bottom: 12px; }
.bh-formraster > * { min-width: 0; width: 100%; }
.bh-formraster > .hint { grid-column: 1 / -1; }

.bh-filter { display: flex; flex-direction: column; gap: 8px; margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.bh-filter-felder { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 10px; }
.bh-filter-felder > input[type=search] { flex: 1 1 260px; max-width: 420px; width: auto; height: 36px; padding: 0 11px; }
.bh-fwahl { display: flex; flex-direction: column; gap: 2px; margin: 0; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.bh-fwahl select { width: auto; min-width: 132px; max-width: 250px; height: 36px; padding: 0 28px 0 10px; font-size: 13px; font-weight: 400; letter-spacing: 0; text-transform: none; }
.bh-filter-felder > .btn { height: 36px; }
.bh-filter-fuss { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.bh-filter-fuss .spacer { flex: 1 1 auto; }
.bh-reiter { display: inline-flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 12px; padding: 4px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.bh-reiter-knopf { padding: 7px 16px; border: 0; border-radius: 999px; background: transparent; color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.bh-reiter-knopf.aktiv { background: var(--bh-akzent); color: #fff; }
@media (max-width: 760px) {
  .bh-filter-felder > input[type=search] { max-width: none; flex-basis: 100%; }
  .bh-fwahl, .bh-fwahl select { flex: 1 1 140px; max-width: none; }
}

.bh-es { --es-akzent: var(--sd-akzent-hell, var(--bh-akzent)); --es-wahl: rgba(var(--sd-hell-rgb, 108,184,255), .14); display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: calc(100dvh - 150px);
  border: 1px solid var(--border); border-radius: 16px; background: var(--surface); overflow: hidden; }
[data-theme="light"] .bh-es { --es-akzent: var(--bh-akzent); --es-wahl: rgba(var(--sd-akzent-rgb, 10,110,209), .11); }
.bh-es-nav { padding: 12px 8px; border-right: 1px solid var(--border); background: var(--surface-alt, rgba(127, 140, 160, .06)); min-width: 0; }
.bh-es-suche { position: relative; margin: 0 2px 12px; }
.bh-es-suche .sd-ikon { position: absolute; left: 10px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.bh-es-suche input { width: 100%; box-sizing: border-box; padding: 7px 10px 7px 32px; border-radius: 8px; font-size: 13px; }
.bh-es-gruppe { margin-bottom: 12px; }
.bh-es-titel { padding: 2px 10px 5px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.bh-es-knopf { display: flex; align-items: center; gap: 10px; width: 100%; margin-bottom: 2px; padding: 8px 10px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.bh-es-knopf .sd-ikon { flex: 0 0 auto; width: 17px; height: 17px; color: var(--text-muted); }
.bh-es-knopf:hover { background: var(--surface-hover, rgba(127, 140, 160, .12)); }
.bh-es-knopf:focus-visible { outline: 2px solid var(--bh-akzent); outline-offset: -2px; }
.bh-es-knopf.aktiv { background: var(--es-wahl); color: var(--es-akzent); font-weight: 600; }
.bh-es-knopf.aktiv .sd-ikon { color: var(--es-akzent); }
.bh-es-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bh-es-n { font-size: 11.5px; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.bh-es-knopf.aktiv .bh-es-n { color: inherit; }
.bh-es-n.warn { padding: 0 7px; border-radius: 10px; background: #e0701a; color: #fff; line-height: 19px; }
.bh-es-leer { padding: 6px 10px; }
.bh-es-seite { min-width: 0; padding: 18px 24px 24px; background: var(--bg, transparent); }
.bh-es-kopf { margin-bottom: 14px; }
.bh-es-kopf h2 { margin: 2px 0 0; font-size: 21px; }
.bh-es-pfad { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
@media (max-width: 860px) {
  .bh-es { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .bh-es-nav { border-right: 0; border-bottom: 1px solid var(--border); }
  .bh-es-gruppen { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  .bh-es-gruppe { display: contents; }
  .bh-es-titel { display: none; }
  .bh-es-knopf { width: auto; flex: 0 0 auto; margin-bottom: 0; }
  .bh-es-seite { padding: 14px; }
}

.bh-es { grid-template-columns: 290px minmax(0, 1fr); }
.bh-es-seite .grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.bh-es-seite .grid > :first-child:nth-last-child(3) { grid-column: 1 / -1; }
@media (max-width: 860px) { .bh-es { grid-template-columns: minmax(0, 1fr); } .bh-es-seite .grid { grid-template-columns: minmax(0, 1fr); } }

.bh-es-n.gut, .bh-es-knopf.aktiv .bh-es-n.gut { padding: 0 7px; border-radius: 10px; background: var(--ok-bg); color: var(--ok-fg); line-height: 19px; }

/* ----- Übersicht ----- */
.bh-kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin-bottom: 14px; }
.bh-kachel { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-left: 5px solid var(--bh-akzent); border-radius: 12px; color: var(--text); text-decoration: none; }
.bh-kachel:hover { border-color: var(--bh-akzent); }
.bh-kachel:focus-visible, .bh-zeile:focus-visible, .bh-glied:focus-visible { outline: 2px solid var(--bh-akzent); outline-offset: 1px; }
.bh-kachel span { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.bh-kachel b { font-size: 21px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bh-kachel small { font-size: 12.5px; color: var(--text-muted); }
.bh-kachel.warn { border-color: var(--bh-krit); }
.bh-kachel.warn b { color: var(--bh-krit); }
.bh-raster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.bh-raster .panel { margin: 0; min-width: 0; }
.bh-raster h3 { margin: 0 0 10px; font-size: 14px; }
.bh-breit { grid-column: 1 / -1; }
.bh-umsatz { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; }
.bh-monat { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.bh-wert { height: 15px; font-size: 11px; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bh-schacht { display: flex; align-items: flex-end; justify-content: center; width: 100%; height: 130px; border-bottom: 1px solid var(--border); }
.bh-saeule { display: block; width: min(20px, 38%); margin: 0 1px; border-radius: 4px 4px 0 0; }
.bh-saeule.f, .bh-punkt.f { background: var(--bh-akzent); }
.bh-saeule.e, .bh-punkt.e { background: #2fa36b; }
.bh-monat:hover .bh-saeule { filter: brightness(1.15); }
.bh-mname { font-size: 11.5px; color: var(--text-muted); }
.bh-zeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 8px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 13.5px; }
.bh-zeile + .bh-zeile { border-top: 1px solid var(--border); border-radius: 0; }
.bh-zeile:hover { background: var(--bh-wahl); }
.bh-zeile > span:first-child { min-width: 0; }
.bh-zeile-r { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.buch .num { text-align: right; font-variant-numeric: tabular-nums; }
/* ----- Status der Belege ----- */
.bh-status { display: inline-block; padding: 0 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; line-height: 21px; white-space: nowrap; vertical-align: middle; background: var(--surface-hover, #eef1f4); color: var(--text-muted); }
.bh-status.s-offen { background: rgba(var(--sd-akzent-rgb, 10,110,209), .14); color: var(--bh-akzent); }
.bh-status.s-teilweise { background: #fff1d6; color: #8a5200; }
[data-theme="dark"] .bh-status.s-teilweise { background: rgba(240, 180, 90, .18); color: #f0b45a; }
.bh-status.s-bezahlt, .bh-status.s-angenommen, .bh-status.s-erledigt { background: var(--ok-bg); color: var(--ok-fg); }
.bh-status.s-ueberfaellig { background: var(--bh-krit); color: #fff; }
.bh-status.s-abgelehnt, .bh-status.s-storniert { background: var(--nok-bg); color: var(--nok-fg); }
.bh-kopf h2 .bh-status { margin-left: 4px; }
/* ----- Listen ----- */
.bh-liste table { width: 100%; }
.bh-liste tfoot td { font-weight: 700; border-top: 2px solid var(--border); }
.bh-nr { white-space: nowrap; font-variant-numeric: tabular-nums; }
.bh-nr a { color: var(--bh-akzent); font-weight: 600; text-decoration: none; }
.bh-rot { color: var(--bh-krit); font-weight: 600; }
.bh-aktion { white-space: nowrap; text-align: right; }
.bh-gefahr { color: var(--nok-fg); }
.bh-kopf .btn, .bh-aktion .btn, .modal a.btn { text-decoration: none; }
/* ----- Beleg ----- */
.bh-beleg { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 14px; align-items: start; }
.bh-beleg .panel { margin: 0 0 12px; }
.bh-beleg .panel h3 { margin: 4px 0 8px; font-size: 14.5px; }
.bh-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 20px; }
.bh-form .field, .modal .field { margin-bottom: 10px; }
.bh-zwei { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.bh-drei { display: grid; grid-template-columns: 110px minmax(0, 1fr) 160px; gap: 0 12px; }
.buch textarea, .buch .field input, .buch .field select, .modal textarea, .modal .field input, .modal .field select { width: 100%; box-sizing: border-box; }
.bh-pos table { width: 100%; table-layout: fixed; min-width: 760px; }
.bh-pos th, .bh-pos td { padding: 5px 4px; vertical-align: top; }
.bh-pos th:nth-child(1) { width: 38px; }
.bh-pos th:nth-child(3) { width: 76px; }
.bh-pos th:nth-child(4) { width: 92px; }
.bh-pos th:nth-child(5) { width: 104px; }
.bh-pos th:nth-child(6) { width: 76px; }
.bh-pos th:nth-child(7) { width: 88px; }
.bh-pos th:nth-child(8) { width: 108px; }
.bh-pos th:nth-child(9) { width: 96px; }
.bh-pos input, .bh-pos select, .bh-pos textarea { width: 100%; box-sizing: border-box; min-height: 34px; padding: 6px 8px; font-size: 13.5px; }
.bh-pos textarea { resize: vertical; line-height: 1.4; }
.bh-pos input.num { text-align: right; }
.bh-pos td.bh-pos-nr, .bh-pos td.bh-betrag { padding-top: 12px; }
.bh-betrag { font-weight: 600; white-space: nowrap; }
.bh-pos-text input { font-weight: 700; }
.bh-pos-kn { white-space: nowrap; text-align: right; }
.bh-pos-kn .btn-icon, .bh-zahlungen .btn-icon { width: 28px; height: 28px; padding: 0; font-size: 13px; }
.bh-weg:hover { color: var(--nok-fg); }
.bh-pos-neu { margin: 8px 0 4px; }
.bh-summen-zeile { display: flex; justify-content: flex-end; margin: 6px 0 14px; }
.bh-summen { width: min(340px, 100%); }
.bh-sz { display: flex; justify-content: space-between; gap: 16px; padding: 4px 10px; font-size: 13.5px; }
.bh-sz.total { margin-top: 4px; padding: 8px 10px; border-top: 2px solid var(--bh-akzent); background: var(--bh-wahl); border-radius: 0 0 8px 8px; font-size: 15px; font-weight: 700; }
.bh-offen { box-shadow: 0 0 0 3px rgba(var(--sd-akzent-rgb, 10,110,209), .3); }
.bh-zahlungen, .bh-verlauf { margin: 0 0 10px; padding: 0; list-style: none; }
.bh-zahlungen li { display: grid; grid-template-columns: minmax(0, 1fr) auto 28px; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.bh-verlauf li { padding: 6px 0 6px 10px; border-left: 3px solid var(--border); margin-bottom: 6px; font-size: 13px; overflow-wrap: anywhere; }
.bh-kette { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.bh-glied { display: inline-flex; flex-direction: column; padding: 6px 10px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); text-decoration: none; font-size: 12.5px; }
.bh-glied b { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.bh-glied.hier { border-color: var(--bh-akzent); background: var(--bh-wahl); }
a.bh-glied:hover { border-color: var(--bh-akzent); }
.bh-pfeil { color: var(--text-muted); }
.bh-haken { display: flex; align-items: center; gap: 8px; margin: 4px 0 12px; font-weight: 400; }
.bh-haken input { width: 17px; height: 17px; margin: 0; accent-color: var(--bh-akzent); }
/* ----- Einstellungen ----- */
.bh-es-form { max-width: 820px; }
.bh-es-form h3 { margin: 14px 0 8px; font-size: 15px; }
.bh-nummern input { width: 100%; box-sizing: border-box; }
.bh-nummern table { table-layout: fixed; width: 100%; }
.bh-bsp { font-family: Consolas, "Cascadia Mono", monospace; font-size: 13px; }
@media (max-width: 1000px) {
  .bh-beleg, .bh-raster, .bh-form { grid-template-columns: minmax(0, 1fr); }
  .bh-umsatz { gap: 3px; }
  .bh-wert { display: none; }
}
@media (max-width: 640px) { .bh-zwei, .bh-drei { grid-template-columns: minmax(0, 1fr); } }

/* ----- Dashboard: Bausteine, Bearbeiten, Legende ----- */
.bh-baustein { min-width: 0; }
.bh-baustein > .panel, .bh-baustein > .bh-kacheln { margin: 0; }
.bh-raster.bearbeiten .bh-baustein { padding: 10px; border: 1px dashed var(--border); border-radius: 16px; }
.bh-baustein.aus > :not(.bh-b-kopf) { opacity: .35; pointer-events: none; }
.bh-b-kopf { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 14px; }
.bh-b-griff { font-size: 18px; color: var(--text-muted); }
.bh-b-kopf .btn-icon { width: 28px; height: 28px; padding: 0; }
.bh-schalter { position: relative; display: inline-block; width: 40px; height: 22px; margin: 0; cursor: pointer; }
.bh-schalter input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.bh-schalter i { position: absolute; inset: 0; border-radius: 999px; background: rgba(127, 140, 160, .4); transition: background .15s; }
.bh-schalter i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.bh-schalter input:checked + i { background: var(--bh-akzent); }
.bh-schalter input:checked + i::after { transform: translateX(18px); }
.bh-schalter input:focus-visible + i { outline: 2px solid var(--bh-akzent); outline-offset: 2px; }
.bh-legende { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; min-height: 26px; margin-bottom: 8px; font-size: 12.5px; }
.bh-legende > span, .bh-tipp > span { display: inline-flex; align-items: center; gap: 6px; }
.bh-punkt { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.bh-tipp { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-alt, rgba(127, 140, 160, .08)); }
.bh-monat:focus-visible { outline: 2px solid var(--bh-akzent); outline-offset: 2px; border-radius: 6px; }
.bh-raster h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.bh-mehr { font-size: 12px; font-weight: 400; color: var(--bh-akzent); text-decoration: none; }
.bh-kunde { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 5px 0; font-size: 13.5px; }
.bh-kunde span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bh-balken { grid-column: 1 / -1; display: block; height: 5px; background: var(--bh-akzent); border-radius: 3px; }
/* ----- Menü «Aktionen» ----- */
.bh-menue { position: relative; display: inline-block; }
.bh-menue > summary { list-style: none; cursor: pointer; user-select: none; }
.bh-menue > summary::-webkit-details-marker { display: none; }
.bh-menue > summary::after { content: " ▾"; font-size: 11px; }
.bh-menue-liste { position: absolute; left: 0; top: calc(100% + 4px); z-index: 30; min-width: 190px; padding: 6px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-solid, var(--surface)); box-shadow: 0 12px 30px rgba(0, 0, 0, .28); text-align: left; }
.bh-menue.rechts .bh-menue-liste { left: auto; right: 0; }
.bh-menue-liste a, .bh-menue-liste button { display: block; width: 100%; padding: 8px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-size: 13.5px; text-align: left; text-decoration: none; cursor: pointer; box-sizing: border-box; }
.bh-menue-liste a:hover, .bh-menue-liste button:hover { background: var(--bh-wahl); color: var(--bh-akzent); }
.bh-menue-liste hr { margin: 4px 6px; border: 0; border-top: 1px solid var(--border); }
.bh-liste { overflow: visible; }
.buch .tbl-wrap.bh-liste { overflow: visible; }
/* ----- Beleg: Kopf, Betragsleiste, Reiter, Seitenspalte ----- */
.bh-kunde-titel { color: var(--bh-akzent); }
.bh-untertitel { margin: 0 0 10px; font-size: 13.5px; }
.bh-leiste { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; margin-bottom: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-alt, rgba(127, 140, 160, .08)); }
.bh-lk { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 12px; font-size: 13.5px; }
.bh-lk span { font-weight: 700; }
.bh-lk b { font-weight: 400; font-variant-numeric: tabular-nums; }
.bh-lk.gut span { color: var(--ok-fg); }
.bh-lk.schlecht span, .bh-lk.schlecht b { color: var(--bh-krit); }
.bh-haupt { min-width: 0; }
.bh-tab { padding-top: 4px; }
.bh-ganz { grid-column: 1 / -1; }
.bh-seite h4 { margin: 14px 0 6px; padding-bottom: 4px; border-bottom: 1px dotted var(--border); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.bh-seite h4:first-child { margin-top: 0; }
.bh-s-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.bh-sl { display: flex; align-items: center; gap: 9px; width: 100%; padding: 6px 4px; border: 0; border-radius: 8px; background: transparent; color: var(--bh-akzent); font: inherit; font-size: 13.5px; text-align: left; text-decoration: none; cursor: pointer; box-sizing: border-box; }
.bh-sl:hover { background: var(--bh-wahl); }
.bh-sl .sd-ikon { flex: 0 0 auto; width: 16px; height: 16px; }
.bh-sl.gefahr { color: var(--nok-fg); }
.bh-sl:focus-visible, .bh-menue > summary:focus-visible { outline: 2px solid var(--bh-akzent); outline-offset: 1px; }
.bh-info { margin: 0; font-size: 13px; }
.bh-info dt { margin-top: 6px; color: var(--text-muted); font-size: 12px; }
.bh-info dd { margin: 0; overflow-wrap: anywhere; }
.bh-sz.fett { font-weight: 700; border-top: 1px solid var(--border); }
.bh-sz { border-bottom: 1px solid var(--border); }
.bh-pwahl { width: auto; max-width: 300px; height: 32px; padding: 0 28px 0 10px; font-size: 13px; }
.bh-pos-leer { padding: 22px 8px; text-align: center; color: var(--text-muted); }
.bh-pos-sonder td { background: var(--surface-alt, rgba(127, 140, 160, .06)); }
.bh-pos-sonder input { font-weight: 700; }
.bh-pos-text textarea { font-weight: 700; }
.bh-umbruch { display: block; padding: 6px 0; border-top: 2px dashed var(--border); font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); text-align: center; }
.bh-drei.gleich { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bh-haken { align-items: flex-start; }
.bh-haken.eng { margin: 0; }
.bh-haken .zweit { font-weight: 400; }
/* ----- Einstellungen: Logo, Farben, Import ----- */
.bh-logo-kasten { display: flex; align-items: center; justify-content: center; margin: 8px 0 14px; padding: 18px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.bh-logo { max-width: min(420px, 100%); max-height: 140px; }
.bh-es-form input[type=color] { width: 100%; height: 38px; padding: 3px; }
.bh-ablauf { margin: 12px 0 0; padding: 0; list-style: none; font-size: 13.5px; }
.bh-ablauf li { padding: 5px 0 5px 10px; border-left: 3px solid var(--bh-akzent); margin-bottom: 4px; }
.bh-ablauf li.warn { border-left-color: #e0701a; color: #e0701a; }
.note-box.bh-gut { background: var(--ok-bg); border-left-color: var(--ok-fg); color: var(--ok-fg); }
@media (max-width: 1000px) { .bh-beleg { grid-template-columns: minmax(0, 1fr); } }
.bh-ablauf li.ein { margin-left: 16px; border-left-color: var(--border); color: var(--text-muted); }
/* ----- Kontenplan ----- */
.bh-es-form.breit { max-width: 980px; }
.bh-es-form.breit input[type=search] { flex: 1 1 260px; max-width: 380px; }
.bh-kp { margin-top: 10px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); overflow: hidden; }
.bh-kp-z { display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.bh-kp-z:last-child { border-bottom: 0; }
.bh-kp-z.gruppe { font-weight: 700; background: var(--surface-alt, rgba(127, 140, 160, .06)); }
.bh-kp-z.aus { color: var(--text-muted); }
.bh-kp-z.t2 { padding-left: 26px; }
.bh-kp-z.t3 { padding-left: 40px; }
.bh-kp-z.t4 { padding-left: 54px; }
.bh-kp-auf { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--text-muted); font-size: 13px; cursor: pointer; flex: 0 0 auto; }
button.bh-kp-auf:hover { background: var(--bh-wahl); }
button.bh-kp-auf:focus-visible { outline: 2px solid var(--bh-akzent); }
.bh-kp-nr { width: 64px; font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.bh-kp-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.bh-kreuz { width: 30px; }
.bh-kreuz input { width: 16px; height: 16px; margin: 0; accent-color: var(--bh-akzent); }
.bh-sammel { margin: 0 0 10px; padding: 8px 12px; border: 1px solid var(--bh-akzent); border-radius: 12px; background: var(--bh-wahl); }
.bh-sammel .btn { text-decoration: none; }
.bh-gesendet { margin-left: 6px; color: var(--ok-fg); font-size: 13px; }
.bh-stufe { margin: 0 0 10px; }
.bh-stufe .btn-icon { width: 28px; height: 28px; padding: 0; }
/* ----- Positionen als gesetzter Text (wie auf dem Beleg) ----- */
.bh-pos tr.lesen td { padding: 9px 6px; vertical-align: top; font-size: 13.5px; }
.bh-pos tr.lesen td.bh-pos-nr, .bh-pos tr.lesen td.bh-betrag { padding-top: 9px; }
.bh-pos tr.lesen:hover td { background: var(--bh-wahl); }
.bh-reich { line-height: 1.45; overflow-wrap: anywhere; }
.bh-reich.fett { font-weight: 700; }
.bh-reich ul { margin: 2px 0 2px 4px; padding-left: 18px; }
.bh-reich li.tief { margin-left: 18px; list-style-type: circle; }
.bh-pos tr.lesen .zweit { font-size: 11px; }
.bh-pos th:nth-child(7) { width: 30px; }
.bh-pos th:nth-child(9) { width: 124px; }
.bh-fertig { color: var(--ok-fg); }
.bh-werkzeug { display: flex; gap: 4px; margin-bottom: 4px; }
.bh-wz { min-width: 28px; height: 26px; padding: 0 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.bh-wz:hover { border-color: var(--bh-akzent); color: var(--bh-akzent); }
.bh-wz.fett { font-weight: 800; }
.bh-wz.kursiv { font-style: italic; }
.bh-nachricht { margin: 0 0 10px; }
.bh-n-betreff { margin: 6px 0; font-weight: 600; }
.bh-n-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13.5px; }
/* ----- Dashboard: gegliederte Listen, Ziehen und Ablegen ----- */
.bh-dash table { width: 100%; table-layout: fixed; }
.bh-dash th:nth-child(1) { width: 17%; }
.bh-dash th:nth-child(2) { width: 22%; }
.bh-dash th:nth-child(4) { width: 112px; }
.bh-dash th:nth-child(5) { width: 156px; }
.bh-dash th:nth-child(6) { width: 112px; }
.bh-dash td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bh-dash td.bh-d-titel { color: var(--text-muted); }
.buch .tbl-wrap.bh-dash { overflow: hidden; }
.bh-raster.bearbeiten .bh-baustein { cursor: grab; transition: box-shadow .12s, opacity .12s; }
.bh-raster.bearbeiten .bh-baustein.zieht { opacity: .45; }
.bh-raster.bearbeiten .bh-baustein.ziel { border-color: var(--bh-akzent); border-style: solid; box-shadow: 0 0 0 3px var(--bh-wahl); }
.bh-raster.bearbeiten .bh-baustein > :not(.bh-b-kopf) { pointer-events: none; }
.bh-b-griff { cursor: grab; }
.bh-dash-hinweis { margin: 0 0 10px; }
@media (max-width: 900px) { .bh-dash th:nth-child(3), .bh-dash td:nth-child(3) { display: none; } }
.bh-dash th { white-space: nowrap; }
/* ----- Kontaktseite ----- */
.bh-kontakt { margin-bottom: 12px; }
.bh-kt { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 6px 12px; margin: 0; font-size: 13.5px; align-content: start; }
.bh-kt dt { color: var(--text-muted); }
.bh-kt dd { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }
.bh-kt a, .bh-person a { color: var(--bh-akzent); text-decoration: none; }
.bh-kt-fin { display: grid; grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr); gap: 24px; align-items: start; }
.bh-kt-fin h4 { margin: 0 0 8px; font-size: 13px; }
.bh-saeule.a, .bh-punkt.a { background: #e0a13a; }
.bh-person { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.bh-person .btn-icon { width: 28px; height: 28px; padding: 0; }
@media (max-width: 1000px) { .bh-kt-fin { grid-template-columns: minmax(0, 1fr); } }
/* ----- Verzeichnissuche im Dialog «Neuer Kontakt» ----- */
.bh-vz-kasten { margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-alt, rgba(127, 140, 160, .06)); }
.bh-vz-kasten input[type=search] { flex: 1 1 auto; width: auto; }
.bh-vz-liste { display: flex; flex-direction: column; gap: 4px; max-height: 240px; overflow: auto; margin-top: 8px; }
.bh-vz-liste:empty { display: none; }
.bh-vz { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 10px; align-items: center; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.bh-vz:hover, .bh-vz:focus-visible { border-color: var(--bh-akzent); background: var(--bh-wahl); outline: none; }
.bh-vz .zweit { grid-column: 1; }
.bh-vz .chip { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
.bh-uid-zeile { display: flex; gap: 8px; }
.bh-uid-zeile input { flex: 1 1 auto; min-width: 0; }
.bh-uid-zeile .btn { white-space: nowrap; }
