/* Eigene Darstellungsregeln des Buchhaltungsmoduls. */
.bhp-kopf { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0 0 14px; }
.bhp-kopf > div { min-width: min(100%, 320px); }
.bhp-kopf p { margin: 0 0 6px; }
.bhp-kopf label { display: grid; gap: 4px; color: var(--muted); }
.bhp-kopf select, .bhp-filter input { min-height: 40px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); padding: 8px 11px; }
.bhp-kennzahl { display: flex; align-items: baseline; gap: 10px; }
.bhp-kennzahl b { font-size: 1.55rem; color: var(--text); }
.bhp-reiter { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin: 0 0 12px; }
.bhp-reiter button { border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); padding: 10px 14px; cursor: pointer; font: inherit; }
.bhp-reiter button[aria-pressed="true"] { border-bottom-color: var(--gold); color: var(--text); font-weight: 700; }
.bhp-reiter button span { display: inline-block; margin-left: 5px; border-radius: 999px; background: var(--panel-2); padding: 1px 7px; font-size: .82em; }
.bhp-reiter button.bha-warn span { background: var(--gold); color: #fff; }
.bha-minus { color: var(--danger, #b42318); }
.bhp-filter { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; }
.bhp-filter label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.bhp-filter input { flex: 1 1 320px; min-width: min(100%, 240px); }
.bhp-filter > span, .bhp-fuss { color: var(--muted); font-size: .88em; }
.bhp-hinweis { padding: 8px 10px; border-inline-start: 3px solid var(--gold); background: var(--panel-2); color: var(--muted); font-size: .9em; }
.bhp-tabelle-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.bhp-tabelle { width: 100%; min-width: 960px; border-collapse: collapse; color: var(--text); }
.bhp-tabelle th, .bhp-tabelle td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.bhp-tabelle th { position: sticky; top: 0; z-index: 1; background: var(--panel-2); color: var(--muted); font-size: .84em; text-align: left; white-space: nowrap; }
.bhp-tabelle th.geld, .bhp-tabelle td.geld { text-align: right; white-space: nowrap; }
.bhp-tabelle tbody tr:last-child > td { border-bottom: 0; }
.bhp-tabelle tbody tr:hover > td { background: var(--panel-2); }
.bhp-eintrag { min-width: 220px; }
.bhp-eintrag summary { cursor: pointer; list-style-position: inside; }
.bhp-name { font-weight: 700; }
.bhp-eintrag summary small { display: block; padding: 3px 0 0 17px; color: var(--muted); overflow-wrap: anywhere; }
.bhp-detail { min-width: min(850px, 70vw); padding: 12px 10px 8px 17px; white-space: normal; }
.bhp-kontakt { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 8px 16px; margin: 0 0 12px; }
.bhp-kontakt dt { color: var(--muted); font-size: .84em; }
.bhp-kontakt dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.bhp-detail-block { margin-top: 12px; }
.bhp-detail-block h4 { margin: 0 0 6px; }
.bhp-belege { overflow-x: auto; }
.bhp-belege table { width: 100%; border-collapse: collapse; }
.bhp-belege th, .bhp-belege td { padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.bhp-belege th { position: static; }
.bhp-mahnungen { margin: 0; padding: 0; list-style: none; }
.bhp-mahnungen li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.bhp-mahnmarke { display: inline-block; border-radius: 999px; padding: 3px 8px; background: color-mix(in srgb, var(--red) 14%, var(--panel)); color: var(--red); font-weight: 700; white-space: nowrap; }
.bhp-leer { color: var(--muted); text-align: center; padding: 24px !important; }
.bhp-fehler { padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); }
.bhp-fuss { margin-top: 8px; }
@media (max-width: 760px) {
  .bhp-tabelle { min-width: 780px; }
  .bhp-detail { min-width: 520px; }
  .bhp-mahnungen li { display: grid; gap: 2px; }
}

.bha-ausgang .bhe-tabelle td .bht-zelle {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: none;
}
.bha-ausgang tr[data-beleg]:focus-visible td,
.bha-ausgang tr[data-beleg]:hover td {
  background: var(--panel-2);
}
.bha-ausgang-details {
  padding: 12px;
  white-space: normal;
  background: var(--panel-2);
}
.bha-ausgang-daten {
  display: grid;
  gap: 8px 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  margin: 0 0 14px;
}
.bha-ausgang-daten div { min-width: 0; }
.bha-ausgang-daten dt { color: var(--muted); font-size: .85em; }
.bha-ausgang-daten dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.bha-ausgang-dialog {
  width: min(760px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
}
.bha-ausgang-dialog .bhe-leiste {
  justify-content: space-between;
}
.bha-ausgang-dialog .compact-dialog-card {
  max-height: calc(100vh - 28px);
  overflow-y: auto;
}
.bh-rechnung-dialog { width: min(1180px, calc(100vw - 24px)); height: min(740px, calc(100dvh - 24px)); max-height: calc(100dvh - 24px); padding: 0; }
.bh-rechnung-dialog > .bhe-detail,
.bh-rechnung-dialog > .bha-dialog-layout { display: flex; flex-direction: column; height: 100%; max-height: 100%; overflow: hidden; background: var(--panel); }
.bh-rechnung-dialog .bhe-detail-kopf,
.bh-rechnung-dialog .bhe-dialog-tabs,
.bh-rechnung-dialog .bhe-dialog-footer { flex: 0 0 auto; }
.bh-rechnung-dialog .bh-rechnung-inhalt { min-height: 0; flex: 1 1 auto; overflow-y: auto; padding: 10px 2px 14px; }
.bh-rechnung-dialog[data-aktiver-tab="bank"] .bh-rechnung-inhalt { overflow-y: auto; padding-bottom: 4px; }
.bh-rechnung-dialog[data-aktiver-tab="bank"] .bhe-detail-raster { margin-top: 0; }
.bh-rechnung-dialog .bhe-dialog-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 10px; background: var(--panel); }
.bha-ausgang-dialog .bha-dialog-layout { padding: 18px 20px; }
.bha-ausgang-dialog .bha-dialog-spalten { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.bha-ausgang-dialog .bha-dialog-spalten > * { min-width: 0; }
.bha-ausgang-dialog .bha-dialog-spalten h4,
.bha-ausgang-dialog .bha-positionen h4 { margin: 0 0 9px; }
.bha-ausgang-dialog .bha-ausgang-daten { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bha-ausgang-dialog .bha-positionen { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 18px; }
.bha-ausgang-dialog .bha-positionen-scroll { overflow-x: auto; }
.bha-ausgang-dialog .bha-positionen-scroll table { min-width: 440px; }
.bha-ausgang-dialog .bha-ausgang-summe { text-align: right; margin: 12px 0; }
.bha-ausgang-dialog [data-bha-panel][hidden] { display: none !important; }
.bha-ausgang-dialog [data-bha-panel="druck"] iframe { display: block; width: 100%; height: 560px; border: 1px solid var(--line); background: var(--panel-2); }
@media (max-width: 800px) {
  .bha-ausgang-dialog .bha-dialog-spalten { grid-template-columns: 1fr; }
  .bha-ausgang-dialog .bha-ausgang-daten { grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
}
.bhm-dialog {
  width: min(680px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
}
.bhm-dialog-inhalt {
  max-height: calc(100vh - 28px);
  overflow-y: auto;
}
.bhm-vorschau {
  padding: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.bhm-liste tr[data-mw-mahnung] td,
.bhm-liste tr[data-mw-kandidat] td,
.bhm-liste tr[data-mw-kunde] td,
.bhm-liste tr[data-uw-laufzeile] td,
.bhm-liste tr[data-uw-offenzeile] td { white-space: nowrap; }
.bhm-liste tr[data-mw-mahnung]:focus-visible td,
.bhm-liste tr[data-mw-mahnung]:hover td,
.bhm-liste tr[data-mw-kandidat]:focus-visible td,
.bhm-liste tr[data-mw-kandidat]:hover td,
.bhm-liste tr[data-mw-kunde]:focus-visible td,
.bhm-liste tr[data-mw-kunde]:hover td,
.bhm-liste tr[data-uw-laufzeile]:focus-visible td,
.bhm-liste tr[data-uw-laufzeile]:hover td,
.bhm-liste tr[data-uw-offenzeile]:focus-visible td,
.bhm-liste tr[data-uw-offenzeile]:hover td { background: var(--panel-2); }
.bhm-klapp {
  padding: 12px;
  white-space: normal;
  background: var(--panel-2);
}
.bhm-posten { display: grid; gap: 8px; margin-bottom: 12px; }
.bhm-posten > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.bhm-posten > div > span { color: var(--muted); }
.bhm-stufen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 12px;
}
.bhm-stufen .bhe-kasten { margin: 0; }
.bhe-einkauf-liste tr[data-ek-oeffnen] td { white-space: nowrap; }
.bhe-einkauf-liste tr[data-ek-oeffnen]:focus-visible td,
.bhe-einkauf-liste tr[data-ek-oeffnen]:hover td { background: var(--panel-2); }
.bhe-einkauf-dialog { width: min(1080px, calc(100vw - 24px)); max-height: calc(100vh - 24px); }
.bhe-einkauf-dialog-inhalt { max-height: calc(100vh - 28px); overflow-y: auto; }
.bhe-einkauf-dialog .bhe-detail { margin: 0; }
.bhe-firma-zusammenfassung { margin: 10px 0 0; line-height: 1.5; }
.bhe-firma-dialog { width: min(900px, calc(100vw - 24px)); max-height: calc(100vh - 24px); }
.bhe-firma-dialog-inhalt { max-height: calc(100vh - 28px); overflow-y: auto; }
.bhe-einkauf-kurztext { display: block; max-width: 28rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bhe-einkauf-anfragetext { white-space: pre-wrap; overflow-wrap: anywhere; }
.bhe-beleg-dialog { width: min(1180px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; }
.bhe-beleg-dialog > .bhe-detail { display: flex; flex-direction: column; margin: 0; max-height: calc(100dvh - 28px); overflow: hidden; background: var(--panel); }
.bhe-beleg-dialog .bhe-detail-kopf { flex: 0 0 auto; }
.bhe-beleg-dialog .bhe-detail-kopf .small-note { margin: 2px 0; }
.bhe-beleg-dialog .bhe-dialog-body { min-height: 0; overflow-y: auto; flex: 1 1 auto; padding: 4px 2px 12px; }
.bhe-beleg-dialog .bhe-dialog-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; flex: 0 0 auto; border-top: 1px solid var(--line); padding-top: 10px; background: var(--panel); }
.bhe-beleg-dialog .bhe-dialog-footer .bhe-knopfreihe { margin-top: 0; }
.bhe-beleg-dialog .bhe-erfassen-felder { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.bhe-beleg-dialog .bhe-erfassen-felder fieldset { margin: 0; }
.bhe-beleg-dialog .bhe-erfassen-felder fieldset:last-of-type { grid-column: auto; }
.bhe-beleg-dialog .bhe-positionen-bereich { min-width: 0; margin-top: 0; }
.bhe-beleg-dialog .bhe-positionen-scroll { overflow-x: auto; }
.bhe-beleg-dialog .bhe-positionen { min-width: 480px; width: 100%; table-layout: fixed; }
.bhe-beleg-dialog .bhe-positionen th:nth-child(1) { width: 27%; }
.bhe-beleg-dialog .bhe-positionen th:nth-child(2) { width: 17%; }
.bhe-beleg-dialog .bhe-positionen th:nth-child(3) { width: 14%; }
.bhe-beleg-dialog .bhe-positionen th:nth-child(4) { width: 34%; }
.bhe-beleg-dialog .bhe-positionen th:nth-child(5) { width: 8%; }
.bhe-beleg-dialog .bhe-positionen select[data-f="konto"] { width: 100%; min-width: 0; }
.bhe-beleg-dialog .bhe-bezahlung-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.bhe-beleg-dialog .bhe-bezahlung-grid > * { min-width: 0; }
.bhe-beleg-dialog .bhe-bezahlung-grid .bhe-kasten { margin-top: 0; }
.bhe-beleg-dialog .bhe-bank-kopf fieldset { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px 10px; padding: 5px 10px 7px; margin-bottom: 3px; }
.bhe-beleg-dialog .bhe-bank-kopf fieldset > p { grid-column: 1 / 3; margin: 0; align-self: center; }
.bhe-beleg-dialog .bhe-bank-kopf .bhe-bestaetigen { grid-column: 3 / 5; min-height: 34px; }
.bhe-beleg-dialog .bhe-bank-kopf .bhe-banken { grid-column: 1 / -1; }
.bhe-beleg-dialog .bhe-bank-notiz { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 8px; margin-bottom: 2px; }
.bhe-beleg-dialog .bhe-bank-notiz textarea { min-height: 32px; height: 32px; resize: vertical; }
.bhe-beleg-dialog .bhe-bezahlung-grid .bhe-kasten { padding: 9px 11px; }
.bhe-beleg-dialog .bhe-ueberweisung-panel .bhe-kasten { position: relative; }
.bhe-beleg-dialog .bhe-ueberweisung-panel .bhe-kasten h4 { padding-right: 205px; min-height: 39px; }
.bhe-beleg-dialog .bhe-ueberweisung-panel [data-ueberwiesen] { position: absolute; right: 9px; top: 7px; padding: 5px 8px; font-size: 12px; max-width: 205px; }
.bhe-beleg-dialog .bhe-bezahlung-grid .bhe-kasten > p { margin: 4px 0; }
.bhe-beleg-dialog .bhe-bezahlung-grid .bhe-ueberweisung { flex-wrap: nowrap; gap: 10px; }
.bhe-beleg-dialog .bhe-bezahlung-grid .bhe-qr { flex: 0 0 164px; width: 164px; min-height: 164px; padding: 7px; line-height: normal; font-size: 12px; }
.bhe-beleg-dialog .bhe-bezahlung-grid .bhe-qr canvas,
.bhe-beleg-dialog .bhe-bezahlung-grid .bhe-qr img { max-width: 100%; height: auto; }
.bhe-beleg-dialog .bhe-bezahlung-grid .bhe-ueberweisung dl { min-width: 0; font-size: 13px; }
.bhe-beleg-dialog .bhe-zahlungen { max-height: 82px; overflow-y: auto; margin: 4px 0 6px; }
.bhe-beleg-dialog .bhe-zahlung-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bhe-beleg-dialog .bhe-zahlung-form input[name="notiz"] { grid-column: 1 / -1; }
.bhe-beleg-dialog .bhe-zahlung-form button { grid-column: 1 / -1; justify-self: end; }
.bhe-beleg-dialog .bhe-dokument iframe { display: block; width: 100%; height: min(66dvh, 700px); border: 1px solid var(--line); background: var(--panel-2); }
.bhe-beleg-dialog .bhe-scan-seiten { display: flex; gap: 12px; align-items: start; overflow: auto; height: min(60dvh, 590px); }
.bhe-beleg-dialog .bhe-scan-seiten figure { flex: 0 0 auto; height: 100%; margin: 0; text-align: center; }
.bhe-beleg-dialog .bhe-scan-seiten img { display: block; height: calc(100% - 24px); max-width: min(100%, 850px); object-fit: contain; background: #fff; border: 1px solid var(--line); }
.bhe-beleg-dialog .bhe-scan-seiten figcaption { margin-top: 4px; font-size: 12px; color: var(--muted); }
.bhe-beleg-dialog .bhe-detail-raster:not(.zwei) { grid-template-columns: minmax(0, 1fr); }
.bhe-dialog-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0; border-bottom: 1px solid var(--line); }
.bhe-dialog-tabs button { flex: 0 0 auto; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--panel); cursor: pointer; }
.bhe-dialog-tabs button[aria-selected="true"] { font-weight: 700; border-color: var(--gold); background: var(--panel-2); }
.bhe-dialog-tabs button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.bhe-beleg-dialog [data-bhe-panel][hidden] { display: none !important; }
.bhe-beleg-dialog .bhe-dialog-footer button[hidden] { display: none !important; }
@media (max-width: 800px) {
  .bhe-beleg-dialog .bhe-detail-raster { grid-template-columns: 1fr; }
  .bhe-beleg-dialog .bhe-erfassen-felder, .bhe-beleg-dialog .bhe-bezahlung-grid { grid-template-columns: 1fr; }
  .bhe-beleg-dialog .bhe-bank-kopf fieldset { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bhe-beleg-dialog .bhe-bank-kopf fieldset > p, .bhe-beleg-dialog .bhe-bank-kopf .bhe-bestaetigen { grid-column: 1 / -1; }
  .bhe-beleg-dialog .bhe-ueberweisung-panel [data-ueberwiesen] { position: static; max-width: none; margin-top: 8px; }
  .bhe-beleg-dialog .bhe-ueberweisung-panel .bhe-kasten h4 { padding-right: 0; }
  .bhe-beleg-dialog .bhe-erfassen-felder fieldset:last-of-type { grid-column: auto; }
}

/* Eingangsrechnung: „Gekauft“ in Listen einzeilig mit Tooltip (27.09.2026) */
.bhe-gekauft { display: inline-block; max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.bhb-liste .bhe-gekauft { max-width: 30ch; }
.bhe-beleg-dialog .bhe-dokument .pdf-vorschau { max-height: min(70dvh, 760px); overflow: auto; padding-right: 4px; }

/* Fenster „+ Neue Kategorie/Kostenstelle“ (28.09.2026) */
.bhe-neu-dialog { border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; width: min(420px, calc(100vw - 32px)); background: var(--panel); color: var(--text); }
.bhe-neu-dialog::backdrop { background: rgba(0, 0, 0, .35); }
.bhe-neu-dialog h3 { margin: 0 0 8px; }
.bhe-neu-dialog .bhe-knopfreihe { justify-content: flex-end; }

/* Anlagevermögen im Rechnungsfenster (28.09.2026) */
.bhe-anlage > span { display: grid; gap: 6px; }
.bhe-anlage-info { color: var(--text); }
.bhe-anlage-dialog { width: min(560px, calc(100vw - 32px)); }
.bhe-anlage-wahl { display: flex; gap: 16px; flex-wrap: wrap; }
/* Archiv MeinBüro in Kunden & Lieferanten (Claude, 29.09.2026) */
.bhp-wahl { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.bhp-filter label.bhp-schalter { position: static; width: auto; height: auto; overflow: visible; clip: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .88em; cursor: pointer; }
.bhp-archivmarke { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: color-mix(in srgb, var(--muted) 16%, transparent); color: var(--muted); font-size: .72em; font-weight: 600; vertical-align: middle; }
.bhp-filter .bhp-schalter input { flex: 0 0 auto; min-width: 0; min-height: 0; width: 18px; height: 18px; padding: 0; margin: 0; }
.bhp-filter label.bhp-schalter { white-space: nowrap; }

/* Buchhaltungs-Cockpit (Mockup Codex, Claude 04.10.2026) */
/* #bhDashboardRoot ist durch den Responsive-Adapter ein 4-Spalten-Raster: das Cockpit nimmt alle Spalten */
#bhDashboardRoot > .bhd-cockpit, .bhd-cockpit { grid-column: 1 / -1; display: grid; gap: 14px; color: var(--text); }
.bhd-cockpit .bhd-ic { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--panel-2, #eef2f7); color: #1c4d8c; flex: 0 0 auto; }
.bhd-cockpit .bhd-ic svg { width: 20px; height: 20px; }
.bhd-cockpit .bhd-ic.blau { background: #e3ecfb; color: #1c4d8c; } .bhd-cockpit .bhd-ic.gruen { background: #def5e6; color: #1f8a46; } .bhd-cockpit .bhd-ic.rot { background: #fde4e1; color: #c0392b; } .bhd-cockpit .bhd-ic.lila { background: #ebe4fb; color: #6b47c9; }
.bhd-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.bhd-kopf h3 { margin: 0; font-size: clamp(1.5rem, 2.4vw, 2rem); } .bhd-kopf p { margin: 4px 0 0; color: var(--muted); }
.bhd-kopf-rechts { display: flex; gap: 10px; align-items: center; }
.bhd-monat { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); font-weight: 600; cursor: pointer; }
.bhd-monat::before { content: '📅'; } .bhd-monat::after { content: '▾'; color: var(--muted); }
.bhd-monat input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.bhd-neu { display: inline-flex; align-items: center; gap: 6px; } .bhd-neu svg { width: 16px; height: 16px; }
.bhd-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.bhd-kpis article { position: relative; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); box-shadow: 0 2px 10px color-mix(in srgb, var(--text) 6%, transparent); display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: center; }
.bhd-kpis article small { font-size: .95rem; color: var(--text); } .bhd-kpis article strong { grid-column: 1 / -1; font-size: 1.7rem; letter-spacing: -.01em; }
.bhd-kpis article .sub { grid-column: 1 / -1; font-size: .85rem; color: var(--muted); min-height: 1.2em; } .bhd-kpis .rot { color: #c0392b; }
.bhd-link { grid-column: 1 / -1; justify-self: start; border: 0; background: none; padding: 0; margin-top: 4px; color: #0b63c4; font: inherit; font-weight: 600; cursor: pointer; }
.bhd-trend { position: absolute; top: 14px; right: 14px; padding: 2px 8px; border-radius: 999px; font-size: .78rem; font-weight: 700; } .bhd-trend.gut { background: #def5e6; color: #1f8a46; } .bhd-trend.schlecht { background: #fde4e1; color: #c0392b; }
.bhd-raster { display: grid; grid-template-columns: 1.45fr 1fr .95fr; grid-template-rows: auto auto; gap: 12px; }
.bhd-karte { min-width: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.bhd-karte > header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; } .bhd-karte h4 { margin: 0; font-size: 1.05rem; }
.bhd-heute { grid-column: 3; grid-row: 1 / span 2; }
.bhd-legende { display: inline-flex; gap: 10px; align-items: center; font-size: .8rem; color: var(--muted); margin: 0; }
.bhd-legende i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; } .bhd-legende i.ein { background: #3fbf6f; } .bhd-legende i.aus { background: #e8564d; } .bhd-legende i.ist { background: #1f6fd0; } .bhd-legende i.prog { background: #fff; border: 2px dashed #1f6fd0; width: 8px; height: 8px; }
.bhd-bars, .bhd-liquid { width: 100%; height: auto; display: block; }
.bhd-bars { aspect-ratio: 560 / 230; } .bhd-liquid { aspect-ratio: 360 / 190; }
.bhd-bars .raster line, .bhd-liquid .raster line { stroke: var(--line); stroke-width: 1; } .bhd-bars .raster text, .bhd-liquid .raster text { font-size: 11px; fill: var(--muted); text-anchor: end; }
.bhd-bars text.monat, .bhd-liquid text.monat { font-size: 11px; fill: var(--muted); text-anchor: middle; }
.bhd-bars rect.ein { fill: #3fbf6f; } .bhd-bars rect.aus { fill: #e8564d; }
.bhd-liquid .flaeche { fill: #1f6fd0; opacity: .12; } .bhd-liquid path.ist { fill: none; stroke: #1f6fd0; stroke-width: 2.2; } .bhd-liquid path.prognose { fill: none; stroke: #1f6fd0; stroke-width: 2; stroke-dasharray: 5 4; }
.bhd-liquid circle.ist { fill: #1f6fd0; } .bhd-liquid circle.prognose { fill: #fff; stroke: #1f6fd0; stroke-width: 2; }
.bhd-fuss { margin: 6px 0 0; font-size: .78rem; color: var(--muted); }
.bhd-leer { margin: 18px 0; color: var(--muted); font-size: .9rem; }
.bhd-heute ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bhd-heute li { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; background: var(--panel-2, #f3f5f8); }
.bhd-heute li.rot { background: #fdecea; } .bhd-heute li.orange { background: #fff1dc; } .bhd-heute li.blau { background: #e6f0fb; } .bhd-heute li.gruen { background: #e5f6ea; }
.bhd-heute li .bhd-ic { width: 28px; height: 28px; background: #fff; } .bhd-heute li.rot .bhd-ic { color: #c0392b; } .bhd-heute li.orange .bhd-ic { color: #d9780f; } .bhd-heute li.blau .bhd-ic { color: #1b62c6; }
.bhd-heute li .bhd-zahl { min-width: 28px; height: 28px; display: inline-grid; place-items: center; border-radius: 8px; font-size: .9rem; color: #fff; background: #1b62c6; } .bhd-heute li.rot .bhd-zahl { background: #c0392b; } .bhd-heute li.orange .bhd-zahl { background: #d9780f; } .bhd-heute li .bhd-zahl:empty { display: none; }
.bhd-heute li strong { display: block; font-size: .92rem; } .bhd-heute li small { display: block; color: var(--muted); font-size: .78rem; line-height: 1.3; }
.bhd-pfeil { border: 0; background: none; font-size: 1.4rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 4px; }
.bhd-badge { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px; background: #c0392b; color: #fff; font-size: .85rem; }
.bhd-donut-wrap { display: grid; grid-template-columns: 150px 1fr; gap: 14px; align-items: center; }
.bhd-donut { width: 150px; transform: rotate(-90deg); overflow: visible; } .bhd-donut circle { fill: none; stroke-width: 16; } .bhd-donut .bg { stroke: var(--panel-2, #eef2f7); }
.bhd-donut text { transform: rotate(90deg); transform-origin: 60px 60px; } .bhd-donut text.wert { font-size: 11px; font-weight: 700; fill: var(--text); } .bhd-donut text.sub { font-size: 8px; fill: var(--muted); }
.bhd-donut-legende { width: 100%; border-collapse: collapse; font-size: .85rem; } .bhd-donut-legende td { padding: 3px 4px; } .bhd-donut-legende td:nth-child(2) { color: var(--muted); text-align: right; } .bhd-donut-legende td:last-child { text-align: right; font-weight: 600; }
.bhd-donut-legende i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.bhd-tabs { display: inline-flex; gap: 2px; padding: 3px; margin: 0 0 8px; border-radius: 8px; background: var(--panel-2, #eef2f7); }
.bhd-tabs button { border: 0; border-radius: 6px; padding: 6px 12px; background: none; color: var(--text); font: inherit; cursor: pointer; } .bhd-tabs .active { background: #1c4d8c; color: #fff; }
.bhd-tabelle { width: 100%; border-collapse: collapse; font-size: .88rem; } .bhd-tabelle th { text-align: left; font-weight: 600; color: var(--muted); padding: 4px 6px; border-bottom: 1px solid var(--line); } .bhd-tabelle td { padding: 6px; border-bottom: 1px solid var(--line); } .bhd-tabelle .geld { text-align: right; } .bhd-tabelle .rot { color: #c0392b; font-weight: 600; }
.bhd-offene .bhd-link { margin-top: 8px; }
.bhd-synchron h4 { margin: 4px 0 8px; font-size: 1rem; }
.bhd-quellen { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; margin-bottom: 14px; }
.bhd-quelle { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; min-width: 170px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); text-align: left; font: inherit; color: var(--text); cursor: pointer; }
.bhd-logo { display: inline-block; width: 40px; height: 40px; flex: 0 0 auto; } .bhd-logo svg { width: 40px; height: 40px; display: block; }
.bhd-quelle strong { display: block; font-size: .92rem; } .bhd-quelle small { display: block; color: var(--muted); font-size: .78rem; }
.bhd-status { width: 12px; height: 12px; border-radius: 50%; } .bhd-status.ok { background: #27a25c; } .bhd-status.warn { background: #f2b02e; } .bhd-status.aus { background: #c9ced6; }
.bhd-sync { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; align-self: center; } .bhd-sync svg { width: 18px; height: 18px; }
.bhd-schnell { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.bhd-schnell button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); font: inherit; cursor: pointer; } .bhd-schnell button svg { width: 18px; height: 18px; }
.bhd-schnell button.haupt { background: #e6f0fb; border-color: #bcd3f2; color: #0b4a9e; font-weight: 600; }
@media (max-width: 1100px) { .bhd-kpis { grid-template-columns: repeat(2, 1fr); } .bhd-raster { grid-template-columns: 1fr 1fr; } .bhd-heute { grid-column: 1 / -1; grid-row: auto; } }
@media (max-width: 680px) { .bhd-kpis, .bhd-raster { grid-template-columns: 1fr; } .bhd-donut-wrap { grid-template-columns: 1fr; justify-items: center; } .bhd-sync { margin-left: 0; } }
/* Kunden & Lieferanten – Liste mit Spaltensortierung und Dialog (Claude, 29.09.2026) */
.bhp-kopf2 { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; margin: 0 0 12px; }
.bhp-kopf2 h2 { margin: 0 8px 0 0; font-size: 1.3em; }
.bhp-kopf2 .bhp-reiter { margin: 0; }
.bhp-kopf2 input[type=search] { flex: 1 1 260px; min-width: min(100%, 220px); min-height: 40px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); padding: 8px 11px; }
.bhp-kopf2 select { min-height: 40px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); padding: 8px 11px; }
.bhp-kopf2 .bhp-schalter { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .88em; white-space: nowrap; cursor: pointer; }
.bhp-kopf2 .bhp-schalter input { width: 18px; height: 18px; margin: 0; }
.bhp-kz { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.bhp-kz > div { border: 1px solid var(--line); border-radius: 10px; padding: 7px 12px; font-size: .82em; color: var(--muted); min-width: 130px; }
.bhp-kz b { display: block; font-size: 1.25em; color: var(--text); }
.bhp-kz b.rot, .bhp-t.rot, .bhp-st.o { color: #b3261e; }
.bhp-t.gruen, .bhp-st.b { color: #1f6f43; }
.bhp-liste th[data-bhp-sp], .bhp-tabelle th[data-bhp-bsp] { cursor: pointer; user-select: none; white-space: nowrap; }
.bhp-p { margin-left: 4px; opacity: .35; font-size: .85em; }
th.akt { color: var(--text); } th.akt .bhp-p { opacity: 1; }
.bhp-liste tbody tr[data-bhp-key] { cursor: pointer; }
.bhp-liste tbody tr[data-bhp-key]:hover, .bhp-liste tbody tr[data-bhp-key]:focus { background: color-mix(in srgb, var(--muted) 8%, transparent); outline: none; }
.bhp-liste td small { display: block; color: var(--muted); font-size: .85em; }
.bhp-f { padding: 2px 8px; border-radius: 9px; font-size: .86em; white-space: nowrap; }
.bhp-f.rot { background: #fbe9e7; color: #b3261e; } .bhp-f.gelb { background: #fff3d6; color: #8a5a00; }
.bhp-dlg-bg { position: fixed; inset: 0; z-index: 1000; background: rgba(20, 25, 35, .45); display: none; align-items: center; justify-content: center; padding: 16px; }
.bhp-dlg-bg.auf { display: flex; }
body.bhp-dlg-offen { overflow: hidden; }
.bhp-dlg { background: var(--panel, #fff); color: var(--text); border-radius: 14px; width: min(1000px, 100%); max-height: 92vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0, 0, 0, .28); }
.bhp-dlg header { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.bhp-dlg header h3 { margin: 0; flex: 1; font-size: 1.15em; }
.bhp-x { border: 0; background: none; font-size: 24px; line-height: 1; cursor: pointer; color: var(--muted); }
.bhp-dlg-nav { display: flex; gap: 2px; padding: 0 16px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.bhp-dlg-nav button { border: 0; background: none; padding: 11px 13px; font: inherit; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.bhp-dlg-nav button.on { color: var(--accent, #2f5f8f); border-color: var(--accent, #2f5f8f); font-weight: 600; }
.bhp-dlg-inhalt { padding: 18px 20px; overflow: auto; flex: 1; }
.bhp-dlg footer { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--line); }
.bhp-meldung { flex: 1; color: var(--muted); font-size: .9em; }
.bhp-badge { font-size: .75em; border-radius: 9px; padding: 2px 8px; background: color-mix(in srgb, var(--accent, #2f5f8f) 14%, transparent); color: var(--accent, #2f5f8f); font-weight: 600; }
.bhp-badge.rot { background: #fbe9e7; color: #b3261e; }
.bhp-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.bhp-grid2 h4 { margin: 0 0 10px; }
.bhp-abstand { margin-top: 16px !important; } .bhp-abstand2 { margin-top: 28px; }
.bhp-feld { display: grid; grid-template-columns: 130px 1fr; gap: 8px; align-items: center; margin-bottom: 8px; }
.bhp-feld label { color: var(--muted); font-size: .9em; display: flex; align-items: center; gap: 6px; }
.bhp-feld input, .bhp-feld select, .bhp-zeile input { width: 100%; min-height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font: inherit; background: var(--panel); color: var(--text); }
.bhp-feld input:disabled, .bhp-feld select:disabled, .bhp-zeile input:disabled { opacity: .7; background: color-mix(in srgb, var(--muted) 8%, transparent); }
.bhp-zeile { display: flex; gap: 8px; } .bhp-zeile .bhp-plz { max-width: 90px; }
.bhp-quelle { font-size: .72em; padding: 0 6px; border-radius: 8px; background: color-mix(in srgb, var(--muted) 14%, transparent); }
.bhp-chk { display: flex; align-items: center; gap: 8px; margin: 6px 0; cursor: pointer; }
.bhp-chk input { width: 17px; height: 17px; margin: 0; }
.bhp-hinweis-klein { color: var(--muted); font-size: .85em; margin: 8px 0 0; }
.bhp-mandat { background: #eef6f0; border: 1px solid #cfe5d6; color: #1f5d3a; border-radius: 10px; padding: 8px 12px; font-size: .88em; margin: 0 0 10px; }
.bhp-fl { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.bhp-fl input { flex: 1 1 220px; min-height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; background: var(--panel); color: var(--text); }
.bhp-fl select { min-height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; background: var(--panel); color: var(--text); }
.bhp-dlg tr.klickbar { cursor: pointer; } .bhp-dlg tr.klickbar:hover { background: color-mix(in srgb, var(--muted) 8%, transparent); }
.bhp-stat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.bhp-stat > div { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.bhp-stat small { color: var(--muted); } .bhp-stat b { display: block; font-size: 1.45em; margin: 2px 0; }
.bhp-t { font-size: .82em; color: var(--muted); }
.bhp-bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.bhp-bars div { flex: 1; background: color-mix(in srgb, var(--accent, #2f5f8f) 16%, transparent); border-top: 3px solid var(--accent, #2f5f8f); border-radius: 4px 4px 0 0; position: relative; }
.bhp-bars span { position: absolute; bottom: -20px; left: 0; right: 0; text-align: center; font-size: .75em; color: var(--muted); }
.bhp-notiz { width: 100%; min-height: 180px; border: 1px solid var(--line); border-radius: 8px; padding: 10px; font: inherit; background: var(--panel); color: var(--text); }
@media (max-width: 760px) {
  .bhp-grid2, .bhp-stat { grid-template-columns: 1fr; }
  .bhp-feld { grid-template-columns: 1fr; gap: 3px; }
  .bhp-dlg-bg { padding: 0; } .bhp-dlg { max-height: 100vh; height: 100%; border-radius: 0; }
}
/* Dialog behält seine Größe; Inhalt scrollt (vorher schob eine lange Belegliste Kopf und Reiter aus dem Bild) */
.bhp-dlg { height: min(760px, 92vh); overflow: hidden; }
.bhp-dlg > header, .bhp-dlg > .bhp-dlg-nav, .bhp-dlg > footer { flex: 0 0 auto; }
.bhp-dlg-inhalt { min-height: 0; flex: 1 1 auto; }
.bhp-dlg .bhp-tabelle-wrap { overflow: visible; max-height: none; }
.bhp-dlg .bhp-tabelle thead th { position: sticky; top: -18px; background: var(--panel, #fff); z-index: 1; }
.bhp-kat { font-size: .82em; padding: 2px 8px; border-radius: 9px; background: color-mix(in srgb, var(--accent, #2f5f8f) 12%, transparent); white-space: nowrap; }
.bhp-quelle.geschaetzt { background: #fff3d6; color: #8a5a00; }
@media (max-width: 760px) { .bhp-dlg { height: 100%; } }
/* Beleg-Dialog aus Kunden & Lieferanten (Doppelklick) */
.bhp-dlg tr.gewaehlt { background: color-mix(in srgb, var(--accent, #2f5f8f) 12%, transparent); }
.bhp-beleg-dlg { width: min(1100px, 96vw); max-height: 92vh; }
.bhp-beleg-karte { display: flex; flex-direction: column; max-height: 88vh; }
.bhp-beleg-inhalt { overflow: auto; min-height: 0; }
.bhp-beleg-pdf { width: 100%; height: 68vh; border: 0; border-radius: 8px; background: #f4f4f4; }
/* Positionen im Beleg-Dialog: feste Spalten, Zahlen rechtsbündig, Summenzeile */
.bhp-pos-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; margin: 6px 0 10px; }
.bhp-pos { width: 100%; border-collapse: collapse; font-size: .95em; }
.bhp-pos th, .bhp-pos td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.bhp-pos thead th { background: color-mix(in srgb, var(--muted) 9%, transparent); font-size: .85em; color: var(--muted); font-weight: 600; white-space: nowrap; }
.bhp-pos .geld { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bhp-pos .nr { width: 3.5em; color: var(--muted); }
.bhp-pos td:nth-child(2) { width: 100%; }
.bhp-pos tfoot td { border-bottom: 0; border-top: 2px solid var(--line); font-weight: 600; }
.bhp-pos tbody tr:last-child td { border-bottom: 0; }
.bhp-st.g { color: var(--muted); }
/* GoBD-Export */
.bhg-block { margin: 0 0 22px; }
.bhg-block h4 { margin: 0 0 6px; }
.bhg-form { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin: 10px 0 12px; }
.bhg-form label { display: grid; gap: 4px; color: var(--muted); font-size: .9em; }
.bhg-form input { min-height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; background: var(--panel); color: var(--text); }
.bhg-inhalt { font-size: .85em; color: var(--muted); }
.bhg-meldung { background: #eef6f0; border: 1px solid #cfe5d6; color: #1f5d3a; border-radius: 10px; padding: 8px 12px; }
.bhg-block .secondary-action { white-space: nowrap; }
/* Umstellung MeinBüro */
.bhu-klein { font-size: .82em; color: var(--muted); max-width: 260px; }
.bhu-vorschlag td:last-child select { border-style: dashed; }
.bhu-liste { margin: 6px 0 14px; padding-left: 18px; color: var(--muted); }
#bhUmstellungRoot select { min-height: 32px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; background: var(--panel); color: var(--text); }
/* Amazon-Bestellungen */
.bha-einrichten { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin: 0 0 14px; background: color-mix(in srgb, var(--accent, #2f5f8f) 5%, transparent); }
.bha-einrichten h4 { margin: 0 0 6px; } .bha-einrichten ol { margin: 0 0 8px; padding-left: 20px; }
.bha-lesezeichen { display: inline-block; padding: 8px 16px; border-radius: 999px; background: #2f5f8f; color: #fff !important; font-weight: 700; text-decoration: none; cursor: grab; }
.bha-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.bha-karte { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--panel); display: flex; flex-direction: column; gap: 8px; }
.bha-kopf { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; } .bha-summe { font-weight: 700; font-size: 1.1em; } .bha-nr { font-size: .8em; margin-left: auto; }
.bha-artikel { margin: 0; padding-left: 18px; font-size: .92em; } .bha-artikel li { margin: 2px 0; }
.bha-fuss { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: .85em; }
.bha-dok { text-decoration: none; padding: 2px 8px; border-radius: 8px; border: 1px solid var(--line); }
.bha-ohne { color: #8a5a00; background: #fff3d6; border-radius: 8px; padding: 2px 8px; } .bha-er { color: #1f6f43; font-weight: 600; }
.bha-knoepfe { display: flex; gap: 8px; margin-top: auto; }
.bha-knoepfe button { flex: 1; min-height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); font: inherit; font-weight: 600; cursor: pointer; color: var(--text); }
.bha-knoepfe .bha-z { flex: 0 0 44px; }
.bha-knoepfe .bha-g.an { background: #e6f2ea; border-color: #1f6f43; color: #1f6f43; } .bha-knoepfe .bha-p.an { background: #fbe9e7; border-color: #b3261e; color: #b3261e; }
.bha-knoepfe .bha-g:hover { border-color: #1f6f43; } .bha-knoepfe .bha-p:hover { border-color: #b3261e; }

/* Sammelzuordnung (30.09.2026) */
.sm-kopf { display: grid; gap: 8px; margin-bottom: 10px; }
.sm-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.sm-filter input { min-width: 240px; }
.sm-liste { display: grid; gap: 6px; }
.sm-gruppe { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.sm-gruppe.ohne { border-left: 4px solid var(--gold); }
.sm-zeile { display: grid; grid-template-columns: 28px minmax(160px, 1.3fr) 110px minmax(220px, 1.4fr) auto auto; gap: 10px; align-items: center; padding: 8px 10px; }
.sm-auf { background: none; border: 0; font-size: 16px; cursor: pointer; color: var(--muted); }
.sm-name { display: grid; } .sm-name small, .sm-wahl small { color: var(--muted); font-size: 12px; }
.sm-summe { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.sm-summe.minus { color: var(--red); } .sm-summe.plus { color: var(--green); }
.sm-wahl { display: grid; gap: 2px; } .sm-wahl select { max-width: 100%; }
.sm-regel { font-size: 12.5px; white-space: nowrap; display: inline-flex; gap: 4px; align-items: center; }
.sm-umsaetze { width: calc(100% - 20px); margin: 0 10px 10px; border-collapse: collapse; font-size: 13px; }
.sm-umsaetze td { padding: 3px 6px; border-top: 1px solid var(--line); vertical-align: top; }
.sm-umsaetze td.geld { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sm-regeln { margin-top: 14px; } .sm-regeln table { width: 100%; border-collapse: collapse; font-size: 13px; } .sm-regeln td, .sm-regeln th { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--line); }
@media (max-width: 900px) { .sm-zeile { grid-template-columns: 28px 1fr auto; } .sm-wahl, .sm-regel { grid-column: 2 / -1; } }
/* MeinBüro-Rechnungen unter Verkauf/Einkauf (30.09.2026) */
.arc-eingebettet { margin-top: 18px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: var(--panel); }
.arc-eingebettet summary { cursor: pointer; padding: 4px 0; }
.arc-eingebettet .arc-kopf { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.arc-eingebettet .arc-kopf input { min-width: 260px; flex: 1; }
.arc-eingebettet table { width: 100%; border-collapse: collapse; font-size: 13px; }
.arc-eingebettet td, .arc-eingebettet th { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.arc-eingebettet td.geld, .arc-eingebettet th.geld { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.arc-eingebettet tr.klickbar { cursor: pointer; } .arc-eingebettet tr.klickbar:hover { background: var(--gold-tint); }
.bhp-mb-bank details { margin: 4px 0; }

/* Freie Ausgangsrechnung (30.09.2026) */
.bha-neu-dialog { width: min(980px, 96vw); }
.bha-neu-dialog .form-grid-2 { gap: 10px 16px; }
.bha-plz-ort { display: flex; gap: 8px; }
.bha-plz-ort .bha-plz { width: 90px; flex: none; }
.bha-plz-ort input { flex: 1; min-width: 0; }
.bha-pos-tabelle { width: 100%; margin-top: 12px; }
.bha-pos-tabelle input, .bha-pos-tabelle select { width: 100%; min-width: 0; }
.bha-pos-tabelle .bha-zahl { max-width: 110px; text-align: right; }
.bha-pos-tabelle td:first-child { min-width: 240px; }
@media (max-width: 700px) { .bha-pos-tabelle td:first-child { min-width: 140px; } .bha-neu-dialog .form-grid-2 { grid-template-columns: 1fr; } }

/* Posteingang (30.09.2026) */
.bhe-pe { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; max-width: 100%; container-type: inline-size; }
#bhPosteingangRoot, .bhe-pe > *, [data-pe-blaetter], .bhe-pe-karte, .bhe-pe-geteilt > * { min-width: 0; }
[data-pe-blaetter] { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.bhe-pe-kopf { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 2fr); gap: 14px; }
/* KI-Widget mit Ampel */
.bhe-pe-ki { --ampel: #9aa6a0; border: 1px solid var(--line); border-left: 6px solid var(--ampel); border-radius: 14px; padding: 14px 16px; background: var(--panel); display: grid; gap: 12px; align-content: start; }
.bhe-pe-ki.gruen { --ampel: #2e9d5b; background: linear-gradient(135deg, rgba(46, 157, 91, .14), var(--panel) 65%); }
.bhe-pe-ki.rot { --ampel: #d4403a; background: linear-gradient(135deg, rgba(212, 64, 58, .16), var(--panel) 65%); }
.bhe-pe-ki.gelb { --ampel: #e0a613; background: linear-gradient(135deg, rgba(224, 166, 19, .16), var(--panel) 65%); }
.bhe-pe-ki-kopf { display: flex; gap: 12px; align-items: center; }
.bhe-pe-ki-kopf b { display: block; font-size: 1.1rem; color: var(--ampel); }
.bhe-pe-ki-kopf small { color: var(--muted); }
.bhe-pe-ampel { flex: none; width: 16px; height: 16px; border-radius: 50%; background: var(--ampel); box-shadow: 0 0 0 5px color-mix(in srgb, var(--ampel) 22%, transparent); }
.bhe-pe-ki.rot .bhe-pe-ampel { animation: bhePeBlink 1.6s ease-in-out infinite; }
@keyframes bhePeBlink { 50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--ampel) 10%, transparent); } }
.bhe-pe-ki-zahlen { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bhe-pe-ki-zahlen div { display: grid; gap: 1px; padding: 8px 10px; border-radius: 10px; background: var(--chip, rgba(0, 0, 0, .04)); }
.bhe-pe-ki-zahlen b { font-size: 1.25rem; color: var(--text); }
.bhe-pe-ki-zahlen small { color: var(--muted); font-size: 12px; }
.bhe-pe-ki-rest { display: grid; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--chip, rgba(0, 0, 0, .04)); }
.bhe-pe-ki-rest b { font-size: 1.25rem; color: var(--text); font-variant-numeric: tabular-nums; }
.bhe-pe-ki-rest small { color: var(--muted); font-size: 12px; }
.bhe-pe-guthaben-dialog { width: min(420px, calc(100vw - 32px)); }
.bhe-pe-guthaben-dialog form { display: grid; gap: 12px; }
.bhe-pe-guthaben-dialog h3, .bhe-pe-guthaben-dialog p { margin: 0; }
.bhe-pe-guthaben-dialog label { display: grid; gap: 6px; }
.bhe-pe-ki-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; }
/* Upload-Feld mit Drag & Drop */
.bhe-pe-upload { border: 2px dashed var(--line-strong, #cfc8bb); border-radius: 14px; padding: 18px 20px; display: grid; gap: 14px; align-content: center; background: var(--panel); transition: border-color .15s, background .15s, transform .15s; }
.bhe-pe-upload.aktiv { border-color: var(--gold, #2e6b57); background: var(--gold-tint, rgba(46, 107, 87, .08)); transform: scale(1.01); }
.bhe-pe-upload-text { display: flex; gap: 14px; align-items: center; }
.bhe-pe-upload-text b { display: block; font-size: 1.1rem; }
.bhe-pe-upload-text small { color: var(--muted); }
.bhe-pe-upload-icon { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; color: var(--gold); background: var(--gold-tint, rgba(0, 0, 0, .05)); }
.bhe-pe-upload-knoepfe { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bhe-pe-knopf { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--line-strong, var(--line)); background: var(--panel-2, var(--panel)); color: var(--text); font-weight: 600; cursor: pointer; transition: transform .1s, box-shadow .15s; }
.bhe-pe-knopf span { font-size: 22px; }
.bhe-pe-knopf:hover { box-shadow: 0 4px 14px rgba(0, 0, 0, .18); transform: translateY(-1px); }
.bhe-pe-knopf.haupt { background: var(--pri-grad, #2e6b57); color: var(--pri-text, #fff); border-color: transparent; }
.bhe-pe-upload .form-status:empty { display: none; }
/* Reiter Offen / Erledigt */
.bhe-pe-reiter { display: flex; gap: 6px; border-bottom: 1px solid var(--line); }
.bhe-pe-reiter button { border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); padding: 10px 14px; cursor: pointer; font: inherit; font-weight: 600; }
.bhe-pe-reiter button.aktiv { color: var(--text); border-bottom-color: var(--gold); }
/* Stapel zum Durchklicken */
.bhe-pe-stapel { max-width: 100%; display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x proximity; }
.bhe-pe-chip { flex: none; width: 170px; display: grid; gap: 2px; text-align: left; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; scroll-snap-align: center; font: inherit; }
.bhe-pe-chip b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bhe-pe-chip small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bhe-pe-chip.doppelt { border-left: 4px solid #d4403a; }
.bhe-pe-chip.aktiv { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); background: var(--gold-tint, var(--panel)); }
/* Dokument + Vorschlag */
.bhe-pe-karte { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); padding: 14px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.bhe-pe-karte-kopf { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; }
.bhe-pe-karte-kopf h3 { margin: 2px 0 0; }
.bhe-pe-pfeil { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong, var(--line)); background: var(--panel-2, var(--panel)); color: var(--text); font-size: 26px; line-height: 1; cursor: pointer; }
.bhe-pe-pfeil:disabled { opacity: .3; cursor: default; }
.bhe-pe-geteilt { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.bhe-pe-dok { height: min(78vh, calc(100vh - 140px)); border: 1px solid var(--line, #ddd8ce); border-radius: 10px; overflow: auto; background: #f4f2ee; }
.bhe-pe-dok iframe { width: 100%; height: 100%; border: 0; display: block; }
.bhe-pe-dok img { width: 100%; height: auto; display: block; }
.bhe-pe-vorschlag { max-height: 78vh; overflow: auto; padding-right: 4px; }
.bhe-pe-vorschlag .form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; margin: 10px 0; }
.bhe-pe-vorschlag label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
.bhe-pe-vorschlag label input, .bhe-pe-vorschlag label select, .bhe-pe-vorschlag textarea { width: 100%; min-width: 0; min-height: 38px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font: inherit; font-weight: 400; color: var(--text); background: var(--field, #fff); }
.bhe-pe-pos td input, .bhe-pe-pos td select { min-height: 34px; border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; background: var(--field, #fff); color: var(--text); }
.bhe-pe-karte-links { display: flex; gap: 12px; margin-top: 2px; font-size: 13px; }
@media (max-width: 520px) { .bhe-pe-vorschlag .form-grid-2 { grid-template-columns: 1fr; } }
.bhe-pe-aktionen { margin-top: 12px; flex-wrap: wrap; }
.bhe-pe-leer { display: grid; gap: 4px; place-items: center; padding: 40px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--muted); text-align: center; }
.bhe-pe-leer b { font-size: 1.3rem; color: #2e9d5b; }
/* richtet sich nach der Breite des Posteingangs (Seitenleiste abgezogen), nicht nach dem Fenster */
@container (max-width: 1000px) { .bhe-pe-geteilt { grid-template-columns: minmax(0, 1fr); } .bhe-pe-dok { height: 65vh; } .bhe-pe-vorschlag { max-height: none; } }
@container (max-width: 720px) { .bhe-pe-kopf { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .bhe-pe-upload-knoepfe { grid-template-columns: 1fr; } .bhe-pe-pfeil { width: 38px; height: 38px; } }
.bhe-pe-pos { overflow-x: auto; }
.bhe-pe-pos table { width: 100%; }
.bhe-pe-pos input, .bhe-pe-pos select { width: 100%; min-width: 0; }
.bhe-pe-pos .bha-zahl { max-width: 90px; text-align: right; }
.bhe-pe-pos td:first-child { min-width: 120px; }
.bhe-pe-pos [data-p="wahl"] { min-width: 170px; }
.bhe-kw-liste { position: fixed; z-index: 10000; overflow: auto; background: var(--panel, #fff); border: 1px solid var(--line-strong, var(--line)); border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .22); padding: 4px 0; }
.bhe-kw-gruppe { padding: 8px 12px 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.bhe-kw-eintrag { padding: 7px 12px; cursor: pointer; color: var(--text); }
.bhe-kw-eintrag:hover, .bhe-kw-eintrag.aktiv { background: var(--gold-tint, rgba(0, 0, 0, .06)); }
.bhe-kw-eintrag.gewaehlt { font-weight: 700; }
.bhe-pe-vorschlag .bhe-pe-belegnr { font-weight: 700; font-size: 1.05rem; background: var(--gold-tint, #f6f1e6); }
.bhe-pe-belegnr-hinweis { align-self: end; margin: 0 0 10px; font-size: 12px; color: var(--muted); }
/* Kontenplan & Kostenstellen (30.09.2026) */
.bkp { display: grid; gap: 14px; }
.bkp-schritte { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.bkp-schritt { position: relative; overflow: hidden; display: grid; gap: 2px; padding: 12px 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--muted); }
.bkp-schritt b { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--chip, #eee); color: var(--text); }
.bkp-schritt span { font-weight: 700; color: var(--text); }
.bkp-schritt.aktiv { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.bkp-schritt.aktiv b { background: var(--gold); color: var(--pri-text, #fff); }
.bkp-schritt i { position: absolute; left: 0; bottom: 0; height: 4px; width: var(--anteil, 0); background: #2e9d5b; }
.bkp-ks { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: var(--panel); }
.bkp-ks ul { margin: 8px 0; padding-left: 18px; display: grid; gap: 4px; }
.bkp-objekt { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: var(--gold-tint, #f3ecdc); font-size: 13px; }
.bkp-leiste { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.bkp-leiste p { margin: 0; flex: 1 1 420px; }
.bkp-gruppe { border: 1px solid var(--line); border-left: 5px solid var(--line-strong, #bbb); border-radius: 12px; padding: 12px 14px; background: var(--panel); min-width: 0; overflow-x: auto; }
.bkp-gruppe.ok { border-left-color: #2e9d5b; }
.bkp-gruppe header { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.bkp-gruppe header small { display: block; color: var(--muted); }
.bkp-ziel { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--chip, #eee); font-weight: 700; }
.bkp-tabelle { width: 100%; }
.bkp-tabelle select { max-width: 100%; min-height: 34px; }
.bkp-tabelle tr.ok td:first-child { box-shadow: inset 3px 0 0 #2e9d5b; }
.bkp-marke { display: inline-block; padding: 0 6px; border-radius: 6px; background: #fff3d9; color: #694b18; font-size: 12px; }
/* DATEV-Archiv (30.09.2026) */
.dtv { display: grid; gap: 12px; min-width: 0; }
.dtv-klick { cursor: pointer; }
.dtv-klick:hover td { background: var(--gold-tint, rgba(0, 0, 0, .04)); }
.dtv-minus { color: #c2413a; }
.dtv-weg td { color: var(--muted); text-decoration: line-through; }
.dtv-jahre { display: flex; flex-wrap: wrap; gap: 4px; }
.dtv-euer details { border-bottom: 1px solid var(--line); padding: 6px 0; }
.dtv-euer summary { display: flex; justify-content: space-between; gap: 12px; cursor: pointer; }
.dtv-euer table { width: 100%; margin: 6px 0 4px 16px; font-size: 13px; color: var(--muted); }
.dtv-filter input { min-height: 38px; }
/* Anlagen-Neuaufbau aus DATEV (30.09.2026) */
.bha-neuaufbau { border-left: 5px solid var(--gold); }
.bha-neuaufbau details { margin-top: 8px; }
.bha-na-tabelle { width: 100%; }
.bha-na-eingabe { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.bha-na-eingabe label { display: flex; gap: 6px; align-items: center; font-size: 13px; }
.bha-na-eingabe input { min-height: 34px; max-width: 150px; }
.bha-na-tabelle tr.bkp-ok td { opacity: .75; }
.bha-na-oder { color: var(--muted); font-size: 13px; }
.bha-na-eingabe select { min-height: 34px; max-width: 240px; }
.dtv-bilanz { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.dtv-bilanz section { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--panel); min-width: 0; }
.dtv-bilanz h4 { margin: 0 0 6px; }
.dtv-summe { display: flex; justify-content: space-between; margin: 10px 0 0; padding-top: 8px; border-top: 2px solid var(--line-strong, var(--line)); }
.bhb-darlehen { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 10px 0; background: var(--panel); }
.bhb-darlehen > summary { cursor: pointer; }
.bhb-darlehen table { width: 100%; margin-top: 8px; }
/* Darlehen (30.09.2026): Summen, Reiter wie Bank, Kacheln, Detail */
.bdl { display: grid; gap: 14px; min-width: 0; --bdl-bank: #3b6fb6; --bdl-privat: #c9891a; --bdl-gewaehrt: #2e9d5b; --bdl-person: #8a5cc2; }
.bdl-summen { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; align-items: stretch; }
.bdl-summe { display: grid; gap: 2px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); }
.bdl-summe small, .bdl-summe span { color: var(--muted); font-size: 13px; }
.bdl-summe b { font-size: 1.6rem; color: var(--text); }
.bdl-summe.schuld { background: linear-gradient(135deg, rgba(212, 64, 58, .10), var(--panel) 70%); border-left: 5px solid #d4403a; }
.bdl-summe.forderung { background: linear-gradient(135deg, rgba(46, 157, 91, .10), var(--panel) 70%); border-left: 5px solid #2e9d5b; }
.bdl-aktionen { display: flex; flex-wrap: wrap; gap: 8px; align-content: center; align-items: center; }
.bdl-aktionen small { flex-basis: 100%; }
.bdl-reiter { padding-bottom: 4px; }
.bdl-reiter .bhb-chip { min-width: 150px; }
.bdl-gruppe { margin: 6px 0 0; color: var(--muted); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.bdl-kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.bdl-kachel { --farbe: var(--bdl-bank); display: grid; gap: 6px; align-content: start; text-align: left; font: inherit; color: var(--text); cursor: pointer; padding: 14px 16px; border-radius: 14px;
  border: 1px solid var(--line); border-top: 4px solid var(--farbe); background: var(--panel); box-shadow: 0 1px 2px rgba(0, 0, 0, .05); transition: transform .12s, box-shadow .15s; }
.bdl-kachel:hover, .bdl-kachel:focus-visible { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0, 0, 0, .12); }
.bdl-kachel.privat, .bdl-detail.privat { --farbe: var(--bdl-privat); }
.bdl-kachel.gewaehrt, .bdl-detail.gewaehrt { --farbe: var(--bdl-gewaehrt); }
.bdl-kachel.person, .bdl-detail.person { --farbe: var(--bdl-person); }
.bdl-kachel.getilgt { opacity: .6; }
.bdl-kopf { display: flex; gap: 10px; align-items: center; }
.bdl-kopf i, .bdl-detail-kopf > i { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 18px; background: color-mix(in srgb, var(--farbe) 14%, transparent); color: var(--farbe); }
.bdl-kopf b { display: block; font-size: 15px; line-height: 1.2; }
.bdl-kopf small { color: var(--muted); font-size: 12px; }
.bdl-saldo { font-size: 1.45rem; font-weight: 700; letter-spacing: -.01em; }
.bdl-meta { color: var(--muted); font-size: 12px; }
.bdl-balken { display: block; height: 6px; border-radius: 99px; background: var(--chip, #eee); overflow: hidden; }
.bdl-balken i { display: block; height: 100%; background: var(--farbe, #2e9d5b); border-radius: 99px; }
.bdl-balken.gross { height: 10px; }
.bdl-marke { justify-self: start; display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.bdl-marke.gruen { background: #e3f4ea; color: #1f6b3e; } .bdl-marke.rot { background: #fdebea; color: #9b2c26; } .bdl-marke.grau { background: var(--chip, #f1f1f1); color: var(--muted); }
.bdl-detail { --farbe: var(--bdl-bank); display: grid; gap: 10px; padding: 16px; border-radius: 16px; border: 1px solid var(--line); border-top: 5px solid var(--farbe); background: var(--panel); min-width: 0; }
.bdl-detail-kopf { display: grid; grid-template-columns: auto 1fr; gap: 12px 14px; align-items: center; }
.bdl-detail-kopf h3 { margin: 2px 0; }
.bdl-detail-zahlen { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.bdl-detail-zahlen div { display: grid; gap: 1px; padding: 10px 12px; border-radius: 12px; background: var(--chip, rgba(0, 0, 0, .04)); }
.bdl-detail-zahlen small { color: var(--muted); font-size: 12px; } .bdl-detail-zahlen b { font-size: 1.15rem; }
.bdl-detail-raster { display: grid; grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr); gap: 16px; align-items: start; }
.bdl-detail-raster table { width: 100%; }
.bdl-form .form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.bdl-form label, .bdl-privat label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
.bdl-form input, .bdl-form select, .bdl-privat input { min-height: 36px; width: 100%; box-sizing: border-box; }
.bdl-privat-felder { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.bdl-marke.blau { background: #e6effa; color: #24548f; }
.bdl-rot { color: #9b2c26; }
/* Darlehen: Kontoauszug und Kosten (01.10.2026) */
.bdl-auszug { display: grid; gap: 10px; min-width: 0; }
.bdl-kosten { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; align-items: stretch; }
.bdl-kosten > div { display: grid; gap: 1px; align-content: start; padding: 10px 12px; border-radius: 12px; background: var(--chip, rgba(0, 0, 0, .04)); }
.bdl-kosten small { color: var(--muted); font-size: 12px; } .bdl-kosten b { font-size: 1.15rem; }
.bdl-kosten .bdl-kosten-gross { background: #fdebea; } .bdl-kosten-gross b { font-size: 1.45rem; color: #9b2c26; } .bdl-kosten-gross span { font-size: 12px; color: #9b2c26; }
.bdl-kosten .bdl-jahre { grid-column: span 2; width: 100%; }
.bdl-auszug-kopf { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; }
.bdl-auszug-kopf h4 { margin: 0; }
.bdl-auszug-tabelle { max-height: 520px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.bdl-auszug-tabelle table { width: 100%; }
.bdl-auszug-tabelle thead th { position: sticky; top: 0; background: var(--panel); z-index: 1; }
.bdl-auszug-tabelle .bdl-text { font-size: 12px; color: var(--muted); max-width: 360px; }
.bdl-v-zinsausgleich td { opacity: .75; }
@media (max-width: 900px) { .bdl-detail-raster, .bdl-form .form-grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .bdl-kosten .bdl-jahre { grid-column: 1 / -1; } .bdl-auszug-tabelle .bdl-text { display: none; } }

/* Direkt bei der Bank überweisen (02.10.2026) */
.bhm-direkt .gut { color: #1a7f37; }
.bhm-direkt .schlecht { color: #b42318; }
.bhm-direkt .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.bhm-direkt .checkbox-label { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0; }
.bhm-wahl { display: grid; gap: 8px; margin: 10px 0; }
.bhm-wahl-karte { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.bhm-wahl-karte input { grid-row: 1 / span 2; }
.bhm-wahl-karte span { font-size: 13px; color: var(--muted); }
.bhm-wahl-karte:has(input:checked) { border-color: var(--gold, #b08830); background: var(--panel-2); }
.bhm-vorschau { margin: 8px 0 12px; }
.bhm-ueberweisung { display: grid; grid-template-columns: 1.2fr 1fr 1fr auto; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--line); font-size: 14px; align-items: center; }
.bhm-ueberweisung:first-child { border-top: 0; }
.bhm-summe { border-top: 2px solid var(--line); }
.bhm-warten { padding: 14px; border: 1px dashed var(--gold, #b08830); border-radius: 10px; text-align: center; }
.bhm-formular { border: 1px solid var(--line); border-radius: 12px; padding: 4px 14px 10px; margin: 8px 0 12px; background: var(--panel-2); }
.bhm-empfaenger { padding: 6px 0 10px; border-bottom: 1px solid var(--line); }
.bhm-empfaenger:last-of-type { border-bottom: 0; }
.bhm-feld { display: grid; grid-template-columns: 150px 1fr; gap: 4px 12px; align-items: center; padding: 5px 0; }
.bhm-feld > span { color: var(--muted); font-size: 13px; }
.bhm-feld > b { font-weight: 600; word-break: break-all; }
.bhm-feld input { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.bhm-feld small { grid-column: 2; }
.bhm-betrag { font-size: 1.25em; }
.bhm-feld.bhm-summe { border-top: 2px solid var(--line); margin-top: 6px; padding-top: 10px; }
.bhm-feld.bhm-von { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 10px; }
@media (max-width: 600px) { .bhm-feld { grid-template-columns: 1fr; } .bhm-feld small { grid-column: 1; } }
/* Sammelzuordnung: Kundenzahlung und Amazon (06.10.2026) */
.sm-kunde { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 8px; margin-bottom: 4px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); color: var(--text); font-size: 13px; }
.sm-kunde .primary-action { padding: 4px 10px; font-size: 13px; }
.sm-amazon a { color: var(--accent, #1f5fa8); }
.sm-kundendialog { width: min(520px, calc(100vw - 32px)); border: 0; border-radius: 12px; padding: 18px; }
.sm-kundendialog input[type=search] { width: 100%; margin: 8px 0; }
.sm-kundenliste { display: grid; gap: 4px; max-height: 50vh; overflow: auto; }
.sm-kundenzeile { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; text-align: left; padding: 8px 10px; border: 1px solid #dde3ea; border-radius: 8px; background: #fff; cursor: pointer; }
.sm-kundenzeile span { color: var(--muted); font-size: 12px; } .sm-kundenzeile span.minus { color: #c2413a; }
.sm-kundenzeile:disabled { opacity: .45; cursor: not-allowed; }
/* Darlehen: Verbindlichkeiten gegenüber Kunden (06.10.2026) */
.bdl-kunden { width: 100%; border-collapse: collapse; } .bdl-kunden td { padding: 6px 8px; border-bottom: 1px solid #eef1f4; } .bdl-kunden .geld { text-align: right; white-space: nowrap; }
.bdl-kachel.kunde { --farbe: #b7791f; } .bdl-kachel.kunde.aktiv { box-shadow: 0 0 0 2px var(--farbe) inset; }
.bdl-kunden th { text-align: left; font-size: 12px; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid #e3e8ee; }


/* Bank-Dialog: Amazon-Bestellung und „Beleg dazu“ im selben Kasten-Stil wie „Möglicher Treffer“ (John, 06.10.2026) */
.bhb-amazon, .bhb-beleg { display: grid; gap: 7px; padding: 10px 12px; margin: 10px 0; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); font-size: 13px; }
.bhb-amazon span { color: var(--muted); } .bhb-amazon-links { display: flex; flex-wrap: wrap; gap: 8px; }
.bhb-beleg h4 { margin: 0; font-size: inherit; font-weight: 700; }
.bhb-beleg-karte { display: grid; gap: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.bhb-beleg-kopf { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; } .bhb-beleg-kopf small { color: var(--muted); } .bhb-beleg-kopf a { margin-left: auto; }
.bhb-beleg-daten { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 0; } .bhb-beleg-daten dt { color: var(--muted); } .bhb-beleg-daten dd { margin: 0; }
.bhb-beleg-daten dd.ok { color: #2f855a; font-weight: 600; } .bhb-beleg-daten dd.abw { color: #c05621; font-weight: 600; }
.bhb-beleg-aktion { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; justify-content: space-between; } .bhb-beleg-aktion label { display: grid; color: var(--muted); }
.bhb-beleg-upload { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; cursor: pointer; } .bhb-beleg-upload small { color: var(--muted); }
/* Anlagen-Durchsicht (07.10.2026) */
.adu{display:grid;gap:10px}.adu-kopf{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between}
.adu-tabs{display:flex;gap:4px;background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:3px}.adu-tabs button{border:0;background:none;padding:7px 14px;border-radius:8px;font:inherit;cursor:pointer;color:var(--text)}.adu-tabs button.on{background:var(--accent,#1e3a52);color:#fff}.adu-tabs b{background:#c53030;color:#fff;border-radius:10px;padding:0 6px;font-size:12px;margin-left:4px}
.adu-fort{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:13px}.adu-bar{width:160px;height:8px;background:var(--line);border-radius:4px;overflow:hidden}.adu-bar i{display:block;height:100%;background:#2f855a}
.adu-hinweis{margin:0;color:var(--muted);font-size:13px}
.adu-zwei{display:grid;grid-template-columns:340px minmax(0,1fr);gap:14px;align-items:start}@media(max-width:1000px){.adu-zwei{grid-template-columns:1fr}}
.adu-links{border:1px solid var(--line);border-radius:10px;background:var(--panel);max-height:calc(100vh - 220px);overflow:auto;position:sticky;top:10px}
.adu-filter{display:flex;flex-wrap:wrap;gap:6px;padding:10px;border-bottom:1px solid var(--line);position:sticky;top:0;background:var(--panel);z-index:1}.adu-filter input{flex:1 1 100%}
.adu-chip{border:1px solid var(--line);background:transparent;border-radius:20px;padding:3px 10px;font-size:12px;cursor:pointer;color:var(--text)}.adu-chip.on{background:var(--accent,#1e3a52);color:#fff;border-color:transparent}
.adu-gr{padding:8px 12px 4px;font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.adu-zeile{display:grid;grid-template-columns:10px minmax(0,1fr) auto;gap:8px;align-items:center;width:100%;text-align:left;padding:7px 12px;border:0;border-bottom:1px solid var(--line);background:transparent;cursor:pointer;font:inherit;color:var(--text)}.adu-zeile:hover{background:rgba(0,0,0,.03)}.adu-zeile.on{background:rgba(30,58,82,.1)}
.adu-name b{display:block;font-weight:500;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.adu-name small,.adu-wert small{display:block;color:var(--muted);font-size:11.5px}.adu-wert{text-align:right;font-size:12.5px;white-space:nowrap}
.adu-dot{width:9px;height:9px;border-radius:50%;background:#c9c1b1}.adu-dot.ok{background:#2f855a}.adu-dot.bad{background:#c53030}.adu-dot.warn{background:#d69e2e}.adu-dot.abg{background:#8c94a3}
.adu-akte{display:grid;gap:12px;min-width:0}.adu-karte{border:1px solid var(--line);border-radius:10px;background:var(--panel);padding:12px 14px}.adu-karte h2{margin:2px 0 8px;font-size:21px}.adu-karte h3{margin:0 0 8px;font-size:15px}
.adu-steck{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px}.adu-steck div{border:1px solid var(--line);border-radius:8px;padding:7px 9px}.adu-steck small{display:block;color:var(--muted);font-size:11.5px}.adu-steck b{font-size:15px}
.adu-warn{margin:6px 0;padding:7px 10px;border-radius:8px;background:#fff7e6;border:1px solid #f0d9a8;color:#5c4210}.adu-warn-t{color:#b7791f}.adu-ok{color:#2f855a;font-weight:600}
.adu-zeit{border-left:2px solid var(--line);margin-left:6px;padding-left:16px;display:grid;gap:10px}.adu-jahr{position:relative}.adu-jahr:before{content:"";position:absolute;left:-23px;top:5px;width:12px;height:12px;border-radius:50%;background:#1e3a52}.adu-jahr.p:before{background:#2f855a}
.adu-jahr ul{margin:3px 0;padding-left:16px}.adu-q{font-size:11px;color:#fff;background:#1e3a52;border-radius:10px;padding:1px 7px;margin-left:6px}.adu-jahr.p .adu-q{background:#2f855a}
.adu-karte details{border:1px solid var(--line);border-radius:8px;margin:6px 0}.adu-karte summary{padding:8px 10px;cursor:pointer;display:flex;gap:10px;justify-content:space-between}.adu-karte details>*:not(summary){margin:0 10px 8px}
.adu-g,.adu-tab .g{text-align:right;white-space:nowrap}.adu-abgl{padding:6px 9px;border-radius:7px;background:#fff7e6;font-size:13px}.adu-abgl.ok{background:#eef8f1}
.adu-tab{overflow-x:auto}.adu-tab table{width:100%;border-collapse:collapse;font-size:12.5px}.adu-tab th,.adu-tab td{padding:5px 8px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}.adu-tab th{color:var(--muted);font-weight:500}.adu-erledigt td{opacity:.65}
.adu-ent{display:flex;flex-wrap:wrap;gap:8px}.adu-ent button{border:1px solid var(--line);background:transparent;border-radius:8px;padding:7px 12px;font:inherit;cursor:pointer;color:var(--text)}.adu-ent button.on{background:var(--accent,#1e3a52);color:#fff;border-color:transparent}
.adu-felder{display:flex;flex-wrap:wrap;gap:10px;margin-top:8px}.adu-felder label{display:grid;font-size:12px;color:var(--muted)}.adu-karte textarea{width:100%;margin-top:8px}
.adu-fuss{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:8px;flex-wrap:wrap}[data-adu-sq]{width:100%;margin-bottom:10px}
/* Anlagen-Gruppen (07.10.2026) */
.bha-gruppe{cursor:pointer;background:rgba(30,58,82,.06)}.bha-gruppe td{font-weight:500}.bha-in-gruppe td:nth-child(2){padding-left:22px}
.adu-gruppe{display:grid;grid-template-columns:14px minmax(0,1fr) auto;gap:6px;align-items:center;padding:7px 12px;border-bottom:1px solid var(--line);background:rgba(30,58,82,.06);cursor:pointer;font-size:13px;width:100%;border-left:0;border-right:0;border-top:0;text-align:left;font-family:inherit;color:var(--text)}.adu-gruppe small{display:block;color:var(--muted);font-size:11.5px}.adu-in-gruppe{padding-left:26px}
.adu-gruppenfeld{display:flex;flex-wrap:wrap;gap:8px;align-items:end;margin-top:10px}.adu-gruppenfeld label{display:grid;font-size:12px;color:var(--muted)}.adu-gruppenfeld input{min-width:260px}
.adu-titel{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.adu-umbenennen{font-size:13px;padding:4px 10px}
.adu-pdf{display:inline-block;padding:3px 9px;border:1px solid var(--line);border-radius:6px;text-decoration:none;white-space:nowrap;font-size:12px}.adu-pdf:hover{background:rgba(30,58,82,.08)}.adu-raus td{color:#9a6b00}
/* Kunden & Lieferanten – Belegliste unten: Markierung und Kontextmenü (08.10.2026) */
.bhp-tabelle tr.bhp-mark td { background: #dbe9f4 !important; }
.bhp-tabelle tr.bhp-mark td:first-child { box-shadow: inset 3px 0 0 #1f5f8b; }
.bhp-kontext { position: fixed; z-index: 1000; min-width: 230px; background: #fff; border: 1px solid #c9d3dc; border-radius: 10px; box-shadow: 0 10px 28px rgba(0,0,0,.18); padding: 6px; display: grid; }
.bhp-kontext button { text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 6px; font: inherit; cursor: pointer; color: #1d2b38; }
.bhp-kontext button:hover:not(:disabled) { background: #e7f0f7; }
.bhp-kontext button:disabled { color: #9aa6b1; cursor: default; }
.bhp-kontext-kopf { padding: 6px 10px; font-size: 12px; color: #6b7785; border-bottom: 1px solid #eef1f4; margin-bottom: 4px; }

/* Zahlstatus Lastschrift (08.10.2026) */
.bhp-st.gelb { color: #9a6a00; } .bhp-st.rot { color: #b3261e; }
.bhe-status.gelb { color: #8a6100; } .bhe-status.gruen { color: #1f6f43; } .bhe-status.rot { color: #b3261e; }
.bhe-status.orange { color: #a8560f; }

/* Sicherer Treffer im Bank-Assistenten grün (John, 08.10.2026) */
.bhb-vorschlaege.bhb-treffer-sicher { background: #e8f5e9; border-color: #66bb6a; color: #1b5e20; }
/* Zuzuordnen-Filter (16.10.2026) */
.adu-zfilter{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0}.adu-zfilter button{border:1px solid var(--line);background:var(--panel,#fff);border-radius:999px;padding:5px 11px;font:inherit;font-size:12.5px;cursor:pointer;color:inherit}.adu-zfilter button.an{background:#1b2430;color:#fff;border-color:#1b2430}.adu-zfilter button b{margin-left:4px;opacity:.75}
.adu-summe{margin:4px 0 8px;font-size:13px}.adu-tab td.adu-was{max-width:320px;font-size:12px;color:#4b5563}
.adu-teile{display:block;margin-top:3px;color:#4b5563;line-height:1.4}
dialog.adu-teilen{border:0;border-radius:16px;padding:18px;width:min(760px,94vw);background:var(--panel,#fff);color:inherit}dialog.adu-teilen::backdrop{background:rgba(20,24,32,.38)}
.adu-teil-zeile{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:6px 0}.adu-teil-zeile select{flex:1 1 300px;min-width:0}.adu-teil-zeile input{width:90px}
.adu-ziel-knopf{max-width:320px;text-align:left;border:1px solid var(--line);background:var(--panel,#fff);border-radius:8px;padding:5px 9px;font:inherit;font-size:12.5px;cursor:pointer;color:inherit;white-space:normal}.adu-ziel-knopf.gesetzt{border-color:#b08830;background:#fbf6ea}
.adu-zielsuche input[type=search]{width:100%;box-sizing:border-box;padding:9px 11px;font-size:15px;margin:6px 0 8px}.adu-zs-liste{max-height:55vh;overflow:auto;display:flex;flex-direction:column;gap:2px;margin-bottom:10px}.adu-zs-liste button{text-align:left;border:0;background:transparent;border-radius:8px;padding:8px 10px;font:inherit;cursor:pointer;color:inherit}.adu-zs-liste button:hover,.adu-zs-liste button.markiert{background:#f2ece0}.adu-zs-liste button.aktuell{font-weight:700}
dialog.adu-teilen{height:auto!important;min-height:0!important;max-height:90vh;overflow:auto}
/* Barbewegung am Handy (John, 20.10.2026): große Felder, Buchen-Knopf über die ganze Breite */
@media (max-width: 700px) {
  .bhk-barbewegung .form-grid-2 { grid-template-columns: 1fr; gap: 6px; }
  .bhk-barbewegung input, .bhk-barbewegung select { font-size: 16px; min-height: 46px; }
  .bhk-barbewegung [data-sb="betrag"] { font-size: 26px; font-weight: 700; min-height: 56px; }
  .bhk-barbewegung .bhe-leiste { flex-direction: column; align-items: stretch; gap: 8px; }
  .bhk-barbewegung [data-sb-buchen] { width: 100%; min-height: 52px; font-size: 18px; }
}
