/* ZaPhi Manager v0.22.47 · vollständiger Dark Mode und kompakte Rechnungslisten. */
.v226-invoice-heading-actions{display:flex;align-items:end;justify-content:flex-end;gap:7px;flex-wrap:wrap;margin-left:auto}
.v226-invoice-heading-actions label{display:grid;gap:3px;min-width:112px;color:var(--muted);font-size:10px}
.v226-invoice-heading-actions label span{font-weight:700}
.v226-invoice-heading-actions select{width:100%;min-height:36px;padding:7px 9px;border:1px solid var(--line);border-radius:9px;background:var(--card);color:var(--ink)}
.v226-invoice-heading-actions .btn{min-height:36px;white-space:nowrap}

html[data-zaphi-theme="dark"]{
 --color-text:#edf2f6;--color-text-muted:#aeb8c2;--color-border:#3b4651;--color-page:#101419;--color-surface:#1b2229;
 --ink:#edf2f6;--muted:#aeb8c2;--line:#3b4651;--bg:#101419;--card:#1b2229;
}
html[data-zaphi-theme="dark"] body{background:#101419;color:#edf2f6}
html[data-zaphi-theme="dark"] :where(h1,h2,h3,h4,h5,h6,strong,label,legend,.label,.preview-title){color:#edf2f6}
html[data-zaphi-theme="dark"] :where(p,small,.muted,.sub,.hint,.profile-address){color:#aeb8c2}
html[data-zaphi-theme="dark"] :where(.page,.page-head,.split,.grid,.profile-section,.profile-head,.doc-workspace,.v203-invoice-workspace,.v211-offer-workspace){color:#edf2f6}
html[data-zaphi-theme="dark"] :where(.card,.detail,.list-card,.list-item,.mini,.kv,.notice,.panel,.subcard,.profile-section,.table-wrap,.doc-list-card,.doc-editor,.v09-section,.v20-settings-section,.v217-customer-panel-content,.v217-case-file,.v217-file-folder,.zfr-section,.zfr-object,.zfr-object-detail,.v203-invoice-list,.v203-invoice-kpis>button,.v212-case-kpi,.v195-case-summary>button,.v195-kva-summary>div,.v194-kva-summary>div){background:#1b2229!important;color:#edf2f6;border-color:#3b4651!important}
html[data-zaphi-theme="dark"] :where(.list-item.active,.doc-list-row.active,.v212-case-kpi.active,.v195-case-summary>button.active,.v217-customer-panel-tabs button.active){background:#30241c!important;color:#fff;border-color:#c66a28!important}
html[data-zaphi-theme="dark"] :where(.list-item:hover,.doc-list-row:hover,.zfr-object:hover,tbody tr.clickable:hover){background:#242c34!important}
html[data-zaphi-theme="dark"] :where(input,select,textarea,.search input,.field input,.field select,.field textarea){background:#202830!important;color:#edf2f6!important;border-color:#46525e!important;caret-color:#fff}
html[data-zaphi-theme="dark"] :where(input,textarea)::placeholder{color:#8f9ba6!important;opacity:1}
html[data-zaphi-theme="dark"] :where(.btn,button:not(.primary):not(.active):not(.v218-license-status)){background:#202830;color:#edf2f6;border-color:#46525e}
html[data-zaphi-theme="dark"] :where(.btn:hover,button:not(.primary):not(.active):hover){background:#29333c;color:#fff;border-color:#697784}
html[data-zaphi-theme="dark"] :where(table,thead,tbody,tfoot,tr,th,td){border-color:#3b4651!important}
html[data-zaphi-theme="dark"] :where(th,.table th,thead td){background:#202830!important;color:#c5ced6!important}
html[data-zaphi-theme="dark"] :where(td,tfoot){background:transparent;color:#e7edf2}
html[data-zaphi-theme="dark"] :where(.modal,.modal-card,.modal-head,.modal-body,.modal-foot,.context-menu,.v217-file-menu>div,.zfr-suggestions){background:#1b2229!important;color:#edf2f6!important;border-color:#3b4651!important}
html[data-zaphi-theme="dark"] :where(.modal-head,.modal-foot,.section-title,.profile-section-head){border-color:#3b4651!important}
html[data-zaphi-theme="dark"] :where(.planner,.planner-head,.planner-corner,.planner-row,.employee-cell,.day-cell,.dayhead,.calendar-grid,.calendar-day){background:#1b2229;color:#edf2f6;border-color:#3b4651!important}
html[data-zaphi-theme="dark"] :where(.planner-head,.planner-corner,.dayhead,.calendar-head){background:#202830!important;color:#c5ced6!important}
html[data-zaphi-theme="dark"] :where(.day-cell.weekend,.calendar-day.weekend){background:#171d23!important}
html[data-zaphi-theme="dark"] :where(.notice,.v218-license-local-note,.v218-booking-status){background:#202830!important;color:#c9d2da!important;border-color:#46525e!important}
html[data-zaphi-theme="dark"] :where(.badge,.pill,.source-pill,.v224-source-badge){color:inherit}

/* Das Lizenzcenter nutzt eigene Farbnamen und braucht deshalb eine bewusste Umschaltung. */
html[data-zaphi-theme="dark"] .v218-license-page{--lic-ink:#edf2f6;--lic-muted:#aeb8c2;--lic-line:#3b4651;--lic-soft:#202830;--lic-orange:#f58a3a}
html[data-zaphi-theme="dark"] :where(.v218-booking-panel li,.v218-license-metric,.v218-license-list-row,.v218-license-module,.v218-license-template,.v218-license-feature,.v218-license-invoice-automation,.v218-license-analysis-summary){background:#202830!important;color:#edf2f6!important;border-color:#46525e!important}
html[data-zaphi-theme="dark"] .v218-booking-panel li b{background:#2a333c;color:#ff9a54}
html[data-zaphi-theme="dark"] .v218-booking-status{background:#202830!important}
html[data-zaphi-theme="dark"] .v218-license-list-row:hover{background:#29333c!important}
html[data-zaphi-theme="dark"] .v218-license-list-row.active{background:#30241c!important;box-shadow:inset 4px 0 var(--lic-orange)}
html[data-zaphi-theme="dark"] :where(.v218-license-editor-head,.v218-license-editor-body,.v218-license-section,.v218-license-detail){color:#edf2f6}
html[data-zaphi-theme="dark"] .v218-license-booking-meta{background:#30241c;border-color:#654128}
html[data-zaphi-theme="dark"] .v218-license-status{background:#303a43;color:#cbd4dc}
html[data-zaphi-theme="dark"] .v218-license-status.active{background:#183b2a;color:#7fd5a1}
html[data-zaphi-theme="dark"] .v218-license-status.paused,
html[data-zaphi-theme="dark"] .v218-license-status.scheduled{background:#443517;color:#f4c86d}
html[data-zaphi-theme="dark"] .v218-license-status.deactivated,
html[data-zaphi-theme="dark"] .v218-license-status.expired{background:#472525;color:#f1a3a0}

/* Dokumentvorschauen bleiben absichtlich papierweiß. */
html[data-zaphi-theme="dark"] :where(.document-paper,.v09-paper,.paper,.print-page,.v203-invoice-preview .document-paper){background:#fff!important;color:#111!important;color-scheme:light}
html[data-zaphi-theme="dark"] :where(.document-paper,.v09-paper,.paper,.print-page) *{color:inherit}

@media(max-width:1100px){.v226-invoice-heading-actions{justify-content:flex-start;width:100%;margin-left:0}.page-head:has(.v226-invoice-heading-actions){flex-wrap:wrap}}
@media(max-width:700px){.v226-invoice-heading-actions{display:grid;grid-template-columns:1fr 1fr}.v226-invoice-heading-actions label{min-width:0}}
@media print{.v226-invoice-heading-actions{display:none!important}}
