/*
 * BetreuungsDesk – Dunkles Design (Anthrazit)
 * Wird NACH index.html-<style>, style.css und post-enterprise.css geladen.
 * Teil 1: Farbvariablen für hell/dunkel. Teil 2: Basisregeln. Teil 3: automatisch abgeleitete
 * Dunkel-Varianten aller fest eingetragenen Farben (scripts/gen-dark-theme.py).
 * Neue Styles bitte direkt mit var(--…) schreiben, dann ist Teil 3 dafür nicht nötig.
 */
html[data-theme="dark"]{
  color-scheme:dark;
  --bg:#2c2f34;--p:#35393f;--ink:#eef0f3;--m:#b4bac3;--muted:#b4bac3;--line:#454a52;
  --blue:#7c9cff;--nav:#232629;--green:#62d29b;--red:#ff8f85;--orange:#f2b35c;
}
html[data-theme="dark"] body{background:var(--bg)!important;color:var(--ink)!important}
html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea{background:#2f3338!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#8e96a1!important}
html[data-theme="dark"] .btn.primary{background:#4b6fe8!important;color:#fff!important}
html[data-theme="dark"] a{color:#9db4ff}

/* ---- abgeleitet aus index.html <style> ---- */
html[data-theme="dark"] .loginbox{background:#383b40 !important}
html[data-theme="dark"] .card{background:#383b40 !important}
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field textarea{background:#383b40 !important}
html[data-theme="dark"] .btn{background:#43474d !important}
html[data-theme="dark"] .btn.green{background:#454950 !important}
html[data-theme="dark"] .btn.red{background:#553230 !important}
html[data-theme="dark"] .client-row:hover{background:#3c3f45 !important}
html[data-theme="dark"] .badge{background:#303a55 !important}
html[data-theme="dark"] .badge.green{background:#454950 !important}
html[data-theme="dark"] .badge.orange{background:#554630 !important}
html[data-theme="dark"] .notice{background:#3c3f45 !important}
html[data-theme="dark"] .toast{background:#292b2f !important}
html[data-theme="dark"] .sidebar-signet{background:#383b40 !important}
html[data-theme="dark"] .record-head{background:#383b40 !important}
html[data-theme="dark"] .record-tabs{background:#383b40 !important}
html[data-theme="dark"] .journal-entry{border-left:5px solid #44527e !important;background:#383b40 !important}
html[data-theme="dark"] .journal-empty{background:#383b40 !important}
html[data-theme="dark"] .ratebox{background:#303b55 !important;border:1px solid #44507e !important}
html[data-theme="dark"] .care-history{background:#3e4247 !important}
html[data-theme="dark"] .event-card{border-left:5px solid #445c7e !important}
html[data-theme="dark"] .event-green{background:#40444a !important}
html[data-theme="dark"] .event-blue{background:#304155 !important}
html[data-theme="dark"] .event-yellow{background:#554e30 !important}
html[data-theme="dark"] .event-red{background:#553230 !important}
html[data-theme="dark"] .modal{background:#383b40 !important}
html[data-theme="dark"] .wizard-step{background:#43474d !important}
html[data-theme="dark"] .wizard-step.active{background:#303a55 !important}
html[data-theme="dark"] .dropzone{border:2px dashed #445a7e !important;background:#383b40 !important}
html[data-theme="dark"] .post-tree{background:#383b40 !important}
html[data-theme="dark"] .post-stage-head{background:#3d4146 !important;color:#d9dcdf !important}
html[data-theme="dark"] .tree-row{border-bottom:1px solid #4c5057 !important}
html[data-theme="dark"] .tree-row:hover{background:#393c42 !important}
html[data-theme="dark"] .tree-row.selected{background:#303a55 !important}
html[data-theme="dark"] .doc-preview{background:#393c42 !important}
html[data-theme="dark"] .folder-drop{background:#303d55 !important}
html[data-theme="dark"] .post-count{background:#303a55 !important;color:#8097e5 !important}
html[data-theme="dark"] .folder-name-preview{background:#3b3e44 !important}
html[data-theme="dark"] .manual-help{background:#303d55 !important;color:#cbced3 !important}
html[data-theme="dark"] .pro-tabs{background:#383b40 !important}
html[data-theme="dark"] .pro-tabs button.active{background:#303a55 !important}
html[data-theme="dark"] .pro-badge{background:linear-gradient(135deg,#2a2d31,#315efb) !important}
html[data-theme="dark"] .completeness{background:#454950 !important}
html[data-theme="dark"] .warning{background:#554830 !important}
html[data-theme="dark"] .access-once{background:#292b2f !important}

/* ---- abgeleitet aus client-onboarding-wizard-layout-fix.css ---- */

/* ---- abgeleitet aus design-pages.css ---- */
html[data-theme="dark"] .danger,
html[data-theme="dark"] .danger-button{color:#e28383 !important}

/* ---- abgeleitet aus nextcloud-browser.css ---- */
html[data-theme="dark"] .bd-nc-head{background:#383b40 !important}
html[data-theme="dark"] .bd-nc-title>.bd-nc-icon{color:#7993ec !important}
html[data-theme="dark"] .bd-nc-toolbar{background:#393c42 !important}
html[data-theme="dark"] .bd-nc-crumb{color:#cbced3 !important}
html[data-theme="dark"] .bd-nc-crumb:hover{background:#303b55 !important;color:#7993ec !important}
html[data-theme="dark"] .bd-nc-crumb.current{color:#96a8cf !important}
html[data-theme="dark"] .bd-nc-status[data-tone="ok"]{color:#7beab3 !important}
html[data-theme="dark"] .bd-nc-status[data-tone="error"]{color:#e48881 !important}
html[data-theme="dark"] .bd-nc-entries{background:#383b40 !important}
html[data-theme="dark"] .bd-nc-row{border-bottom:1px solid #4c5057 !important}
html[data-theme="dark"] .bd-nc-row.is-folder:hover{background:#383b40 !important}
html[data-theme="dark"] .bd-nc-row-icon{background:#3e4247 !important;color:#b4b8bf !important}
html[data-theme="dark"] .bd-nc-row.is-folder .bd-nc-row-icon{background:#303b55 !important;color:#7993ec !important}
html[data-theme="dark"] .bd-nc-row-meta{color:#afb4bb !important}
html[data-theme="dark"] .bd-nc-open{color:#b4b8bf !important}
html[data-theme="dark"] .bd-nc-open:hover{background:#303b55 !important;color:#7993ec !important}
html[data-theme="dark"] .bd-nc-empty,
html[data-theme="dark"] .bd-nc-error{color:#afb4bb !important}
html[data-theme="dark"] .bd-nc-error{color:#e48881 !important}
html[data-theme="dark"] .bd-nc-error span{color:#c5c8cd !important}

/* ---- abgeleitet aus post-enterprise.css ---- */
html[data-theme="dark"] .enterprise-tree-controls{background:#383b40 !important}
html[data-theme="dark"] .enterprise-tree-row{border-bottom:1px solid #4c5158 !important;background:#383b40 !important}
html[data-theme="dark"] .enterprise-tree-row:hover,
html[data-theme="dark"] .enterprise-tree-row.selected{background:#303a55 !important}
html[data-theme="dark"] .tree-disclosure{color:#b4b8bf !important}
html[data-theme="dark"] .tree-copy small{color:#b4b8bf !important}
html[data-theme="dark"] .post-flow-panel{border:1px solid #44507e !important;background:#383b40 !important}
html[data-theme="dark"] .post-flow-map button{border:1px solid #565b63 !important;background:#383b40 !important}
html[data-theme="dark"] .post-flow-map button small{color:#b4b8bf !important}
html[data-theme="dark"] .post-flow-map button.done{background:#30553f !important}
html[data-theme="dark"] .post-flow-map button.active{background:#303a55 !important}
html[data-theme="dark"] .post-flow-finish select{background:#383b40 !important}

/* ---- abgeleitet aus style.css ---- */
html[data-theme="dark"] .post-column{background:#383b40 !important;border:1px solid #445d7e !important}
html[data-theme="dark"] .post-column-head{border-bottom:1px solid #4d5259 !important}
html[data-theme="dark"] .post-eyebrow{color:#aaafb6 !important}
html[data-theme="dark"] .post-state-strip{border-bottom:1px solid #4c5158 !important}
html[data-theme="dark"] .post-state-chip{background:#3f4349 !important}
html[data-theme="dark"] .post-preview{background:#3a3d42 !important}
html[data-theme="dark"] .post-preview-empty{color:#a9aeb6 !important}
html[data-theme="dark"] .post-preview-empty strong{color:#eef0f3 !important}
html[data-theme="dark"] .post-next-actions{border:1px dashed #445c7e !important;background:#393c42 !important}
html[data-theme="dark"] .post-inspector-actions{background:#383b40 !important}
html[data-theme="dark"] .post-workbench-column{background:#383b40 !important;border:1px solid #445e7e !important}
html[data-theme="dark"] .post-workbench-header{border-bottom:1px solid #4e5259 !important}
html[data-theme="dark"] .post-workbench-kicker{color:#a9aeb6 !important}
html[data-theme="dark"] .post-workbench-hint{color:#b5b9c0 !important;background:#393c42 !important;border-bottom:1px solid #4e5259 !important}
html[data-theme="dark"] .post-workbench-preview{background:#3c3f45 !important}
html[data-theme="dark"] .post-preview-placeholder{color:#a9aeb6 !important}
html[data-theme="dark"] .post-preview-placeholder strong{color:#eef0f3 !important}
html[data-theme="dark"] .post-preview-host{background:#3b3e44 !important;border:1px solid #4f545b !important}
html[data-theme="dark"] #post .post-preview-host{background:#43474d !important;border:1px solid #445a7e !important}
html[data-theme="dark"] #post .post-preview-host iframe{background:#383b40 !important}
html[data-theme="dark"] #post .post-preview-host img{background:#383b40 !important}
html[data-theme="dark"] #post #postInspector.post-column-editor{background:#383b40 !important;border:1px solid #53585f !important}
html[data-theme="dark"] #post #postInspector .split-title{border-bottom:1px solid #50555c !important}
html[data-theme="dark"] .import-progress{background:#303f55 !important}
html[data-theme="dark"] .import-error{color:#e48881 !important}
html[data-theme="dark"] #post #postInspector input,
html[data-theme="dark"] #post #postInspector select,
html[data-theme="dark"] #post #postInspector textarea{border:1px solid #445d7e !important;background:#383b40 !important}
html[data-theme="dark"] #post #postInspector .actions{border-top:1px solid #50555c !important}
html[data-theme="dark"] #post #postInspector.post-column-editor{background:#383b40 !important}
html[data-theme="dark"] #post .post-column-tree{background:#383b40 !important}
html[data-theme="dark"] #post .post-column-preview{background:#383b40 !important}
html[data-theme="dark"] #post .post-preview-host{background:#474b52 !important}
html[data-theme="dark"] #post #postInspector.post-column-editor{border-left:1px solid #535860 !important;background:#383b40 !important}
html[data-theme="dark"] #post .post-workspace.bd-resizable-three-column::-webkit-scrollbar-track{background:#474b52 !important}
html[data-theme="dark"] #post .post-workspace.bd-resizable-three-column::-webkit-scrollbar-thumb{border:3px solid #4f545b !important}
html[data-theme="dark"] .icloud-browser{border:1px solid #535860 !important}
html[data-theme="dark"] .finder-list{border-right:1px solid #52575e !important;background:#383b40 !important}
html[data-theme="dark"] .finder-head{color:#b8bcc2 !important;border-bottom:1px solid #51555d !important;background:#3e4147 !important}
html[data-theme="dark"] .finder-folder-row{color:#eef0f3 !important}
html[data-theme="dark"] .finder-folder-row:hover{background:#464b51 !important}
html[data-theme="dark"] .disclosure{color:#aeb2ba !important}
html[data-theme="dark"] .folder-count{color:#b3b7be !important;background:#474b52 !important}
html[data-theme="dark"] .finder-file-row{color:#eef0f3 !important}
html[data-theme="dark"] .finder-file-row:hover{background:#464b51 !important}
html[data-theme="dark"] .file-name small{color:#b3b7be !important}
html[data-theme="dark"] .document-inspector{background:#383b40 !important}
html[data-theme="dark"] .document-placeholder{color:#a0a5ae !important}
html[data-theme="dark"] .document-placeholder h3{color:#d9dcdf !important}
html[data-theme="dark"] .document-detail-head p{color:#b3b7be !important}
html[data-theme="dark"] .document-preview{border:1px solid #52575f !important;background:#41454b !important}
html[data-theme="dark"] .document-no-preview{color:#b3b7be !important}
html[data-theme="dark"] .document-empty{color:#b3b7be !important}
@media(max-width:1050px){html[data-theme="dark"] .finder-list{border-bottom:1px solid #52575e !important}}
@media(min-width:1051px){html[data-theme="dark"] .icloud-browser>.bd-document-width-handle{background:#3d4146 !important}}
html[data-theme="dark"] .document-preview{background:#464b51 !important}
html[data-theme="dark"] .document-text-preview{background:#383b40 !important;color:#eef0f3 !important}
html[data-theme="dark"] .finder-folder-row.folder-drop{background:#304355 !important}
html[data-theme="dark"] .document-client-row{background:#3e4147 !important;border:1px solid #4f545b !important}
html[data-theme="dark"] .document-client-row:hover{background:#303d55 !important}
html[data-theme="dark"] .client-folder-icon{background:#383b40 !important}
html[data-theme="dark"] .document-tree-folder{border-left:2px solid #50545b !important}
html[data-theme="dark"] .document-browser-actions{border-bottom:1px solid #51555d !important;background:#383b40 !important}
html[data-theme="dark"] .document-browser-actions>span{color:#b3b7be !important}
html[data-theme="dark"] .folder-import-button{border:1px solid #445e7e !important;background:#383b40 !important;color:#799dec !important}
html[data-theme="dark"] .folder-import-button:hover{background:#304055 !important;border-color:#445f7e !important}
html[data-theme="dark"] .process-slide{background:#43474d !important;color:#babec4 !important}
html[data-theme="dark"] .process-slide.status-green{background:#454950 !important;color:#7beab3 !important}
html[data-theme="dark"] .process-slide.status-orange{background:#554830 !important;color:#ecb479 !important}
html[data-theme="dark"] .process-slide.status-red{background:#553230 !important;color:#e6847f !important}
html[data-theme="dark"] .process-slide.status-grey{background:#41454b !important;border-color:#545961 !important}
html[data-theme="dark"] .process-paper{background:#383b40 !important;border:1px solid #445a7e !important}
html[data-theme="dark"] .process-paper .missing-value{background:#553230 !important;color:#e6847f !important}
html[data-theme="dark"] .process-missing-item{background:#3b3f44 !important}
html[data-theme="dark"] .process-missing-item.optional{background:#554730 !important}
html[data-theme="dark"] .draft-resume:hover{background:#3a3d42 !important}
html[data-theme="dark"] .rich-toolbar{background:#41454b !important}
html[data-theme="dark"] .rich-toolbar button,
html[data-theme="dark"] .rich-toolbar select{border:1px solid #445b7e !important;background:#383b40 !important}
html[data-theme="dark"] .rich-editor{background:#383b40 !important}
html[data-theme="dark"] .process-return{background:#554a30 !important}
html[data-theme="dark"] .bd-action[data-action-level="danger"]{border-color:#7e4944 !important;background:#383b40 !important}
html[data-theme="dark"] .bd-density{border:1px solid var(--line,#545961) !important;background:#3c3f45 !important}
html[data-theme="dark"] .bd-density>span{color:var(--m,#b4b8bf) !important}
html[data-theme="dark"] .bd-density button{color:#b4b8bf !important}
html[data-theme="dark"] .bd-density button[aria-pressed="true"]{background:#383b40 !important}
html[data-theme="dark"] .bd-master-detail [data-pane="master"]{background:#383b40 !important}
html[data-theme="dark"] .bd-master-detail [data-pane="inspector"]{background:#383b40 !important;border-left:1px solid #535860 !important}
html[data-theme="dark"] .bd-skip-link{background:#292b2f !important}
html[data-theme="dark"] .bd-onboarding{background:#383b40 !important}
html[data-theme="dark"] .bd-kicker{color:var(--blue,#7993ec) !important}
html[data-theme="dark"] .bd-onboarding header>[data-close]{background:#43474d !important}
html[data-theme="dark"] .bd-onboarding-progress span{background:#474b52 !important}
html[data-theme="dark"] .bd-onboarding>[data-text]{color:#cbced3 !important}
html[data-theme="dark"] .bd-onboarding-actions button{border:1px solid #445b7e !important;background:#383b40 !important}
@media(max-width:800px),(min-resolution:1.8dppx) and (max-width:1200px){html[data-theme="dark"] .bd-mobile-dock{border-top:1px solid #535860 !important}}
@media(max-width:800px),(min-resolution:1.8dppx) and (max-width:1200px){html[data-theme="dark"] .bd-mobile-dock button{color:#d9dcdf !important}}
@media(max-width:800px){html[data-theme="dark"] .bd-mobile-dock button[data-active]{background:#303a55 !important;color:#7e95e7 !important}}

/* ---- abgeleitet aus template-manager.css ---- */
html[data-theme="dark"] .tm2-dropzone{border:2px dashed #445a7e !important;background:#383b40 !important}
html[data-theme="dark"] .tm2-dropzone.dragging{background:#303d55 !important}
html[data-theme="dark"] .tm2-column{background:#383b40 !important}
html[data-theme="dark"] .tm2-disclosure{border-bottom:1px solid #4c5057 !important;background:#393c42 !important}
html[data-theme="dark"] .tm2-disclosure:hover{background:#3e4147 !important}
html[data-theme="dark"] .tm2-template-row:hover,
html[data-theme="dark"] .tm2-token-row:hover{background:#3a3d42 !important}
html[data-theme="dark"] .tm2-template-row.selected{background:#303a55 !important;outline:1px solid #44527e !important}
html[data-theme="dark"] .tm2-detected button{background:#383b40 !important}
html[data-theme="dark"] .tm2-detected button:hover{background:#303d55 !important}
html[data-theme="dark"] .tm2-detected code,
html[data-theme="dark"] .tm2-token-row code,
html[data-theme="dark"] .tm2-value-grid code{color:#8096e5 !important}
html[data-theme="dark"] .tm2-value-grid>div{border-bottom:1px solid #4c5057 !important}
html[data-theme="dark"] .tm2-warning{background:#554830 !important}
html[data-theme="dark"] .tm2-modal{background:#383b40 !important}

/* ---- abgeleitet aus accept-invitation.html ---- */
html[data-theme="dark"] .card{background:#383b40 !important;border:1px solid #50555d !important}
html[data-theme="dark"] input,
html[data-theme="dark"] button{border:1px solid #565b63 !important}
html[data-theme="dark"] .muted{color:#b4b8bf !important}
html[data-theme="dark"] .error{color:#ec8179 !important}
html[data-theme="dark"] .ok{color:#79ecbc !important}

/* ---- abgeleitet aus admin-users.html ---- */
html[data-theme="dark"] .head,
html[data-theme="dark"] .card{background:#383b40 !important;border:1px solid #50555d !important}
html[data-theme="dark"] .muted{color:#b4b8bf !important}
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] button{border:1px solid #565b63 !important}
html[data-theme="dark"] .danger{color:#ec8179 !important;border-color:#7e4744 !important;background:#383b40 !important}
html[data-theme="dark"] .row{border-bottom:1px solid #4e535a !important}
html[data-theme="dark"] .badge{background:#303855 !important}
html[data-theme="dark"] .badge.warn{background:#554430 !important}
html[data-theme="dark"] .badge.ok{background:#30553f !important}
html[data-theme="dark"] .once{background:#292b2f !important}
html[data-theme="dark"] .error{color:#ec8179 !important}
html[data-theme="dark"] .ok{color:#79ecbc !important}
html[data-theme="dark"] .access-head{color:#b4b8bf !important}
html[data-theme="dark"] .access-row{border-top:1px solid #4e535a !important}
html[data-theme="dark"] .access-note,
html[data-theme="dark"] .subcard{background:#393c42 !important;border:1px solid #50555c !important}
html[data-theme="dark"] .client-checks{border:1px solid #50555c !important;background:#383b40 !important}
html[data-theme="dark"] .empty{color:#b4b8bf !important}
html[data-theme="dark"] dialog{border:1px solid #50555d !important}
html[data-theme="dark"] .dialog-note{background:#393c42 !important;border:1px solid #50555c !important}
html[data-theme="dark"] .dialog-close{background:#383b40 !important}

/* ---- abgeleitet aus client-record-config.html ---- */
html[data-theme="dark"] .head,
html[data-theme="dark"] .card{background:#383b40 !important;border:1px solid #50555d !important}
html[data-theme="dark"] .muted{color:#b4b8bf !important}
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] button,
html[data-theme="dark"] textarea{border:1px solid #565b63 !important}
html[data-theme="dark"] .ok{color:#79ecbc !important}
html[data-theme="dark"] .error{color:#ec8179 !important}
html[data-theme="dark"] .badge{background:#303855 !important}
html[data-theme="dark"] .badge.repeat{background:#30553f !important;color:#79ecbc !important}
html[data-theme="dark"] .notice{background:#303d55 !important}
html[data-theme="dark"] .category{border:1px solid #50555c !important}
html[data-theme="dark"] .category-head{background:#393c42 !important}
html[data-theme="dark"] .danger-button{color:#ec8179 !important;background:#383b40 !important;border-color:#7e4844 !important}
html[data-theme="dark"] .section-node{border-left:3px solid #565b63 !important;background:#383b40 !important}
html[data-theme="dark"] .field-row{border-top:1px solid #4e535a !important}
html[data-theme="dark"] .new-block{border-top:1px solid #4e535a !important}

/* ---- abgeleitet aus client-storage-status.html ---- */
html[data-theme="dark"] .title-icon{background:#303a55 !important}
html[data-theme="dark"] .btn{background:#383b40 !important}
html[data-theme="dark"] .btn:hover{background:#393c42 !important}
html[data-theme="dark"] .notice{background:#383b40 !important}
html[data-theme="dark"] .notice.warn{background:#554d30 !important}
html[data-theme="dark"] .metric{background:#383b40 !important}
html[data-theme="dark"] th,
html[data-theme="dark"] td{border-bottom:1px solid #4c5158 !important}
html[data-theme="dark"] th{background:#383b40 !important}
html[data-theme="dark"] .toast{background:#292b2f !important}

/* ---- abgeleitet aus export-import.html ---- */
html[data-theme="dark"] body{background:#3c3f45 !important;color:#96a8cf !important}
html[data-theme="dark"] .card{background:#383b40 !important;border:1px solid #50555d !important}
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field input{border:1px solid #50555d !important;background:#383b40 !important}
html[data-theme="dark"] .btn{background:#43474d !important}
html[data-theme="dark"] .muted{color:#afb4bb !important}
html[data-theme="dark"] .notice{background:#3c3f45 !important}
html[data-theme="dark"] .warning{background:#554830 !important}
html[data-theme="dark"] .drop{border:2px dashed #445a7e !important;background:#383b40 !important}
html[data-theme="dark"] .list{border:1px solid #4e535a !important}
html[data-theme="dark"] .row{border-bottom:1px solid #4c5158 !important}
html[data-theme="dark"] .kind.document,
html[data-theme="dark"] .kind.new{color:#82e3ae !important}
html[data-theme="dark"] .kind.duplicate{color:#bec2c8 !important}
html[data-theme="dark"] .kind.metadata{color:#ecce79 !important}
html[data-theme="dark"] .kind.conflict,
html[data-theme="dark"] .kind.unsupported,
html[data-theme="dark"] .kind.error{color:#e87d7d !important}
html[data-theme="dark"] .conflict-controls select,
html[data-theme="dark"] .conflict-controls input{border:1px solid #50555d !important;background:#383b40 !important}
html[data-theme="dark"] .decision-note{color:#afb4bb !important}

/* ---- abgeleitet aus portal.html ---- */
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .field select{background:#383b40 !important}
html[data-theme="dark"] .notice{background:#303b55 !important}
html[data-theme="dark"] .notice.error{background:#553230 !important}
html[data-theme="dark"] .notice.warn{background:#554830 !important}
html[data-theme="dark"] .chooser button{background:#41454b !important}
html[data-theme="dark"] .badge{background:#454950 !important}
html[data-theme="dark"] .badge.green{background:#305542 !important}
html[data-theme="dark"] .mfa-qr{background:#383b40 !important}

/* ---- abgeleitet aus client-onboarding-wizard.js (eingebettete Styles) ---- */
html[data-theme="dark"] #clientOnboardingWizard .onboarding-step{background:#41454b !important;color:#b2b7be !important}
html[data-theme="dark"] #clientOnboardingWizard .onboarding-step.active{background:#304055 !important;color:#7997ec !important}
html[data-theme="dark"] #clientOnboardingWizard .ob-field label{color:#d9dcdf !important}
html[data-theme="dark"] #clientOnboardingWizard .onboarding-footer{border-top:1px solid #50555c !important}
html[data-theme="dark"] #clientOnboardingWizard .ob-dropzone{border:2px dashed #445f7e !important;background:#383b40 !important}
html[data-theme="dark"] #clientOnboardingWizard .ob-dropzone.dragging{background:#304055 !important}
html[data-theme="dark"] #clientOnboardingWizard .ob-scope-option{border:1px solid #445c7e !important;background:#383b40 !important}
html[data-theme="dark"] #clientOnboardingWizard .ob-scope-option small{color:#b2b7be !important}

/* ---- abgeleitet aus personal-workspace.js (eingebettete Styles) ---- */
html[data-theme="dark"] .pw-settings{background:#393c42 !important}
html[data-theme="dark"] .pw-link{background:#383b40 !important}

/* ---- abgeleitet aus post-batch-worklist.js (eingebettete Styles) ---- */
html[data-theme="dark"] .post-summary-badge{border:1px solid #565b63 !important;background:#383b40 !important}
html[data-theme="dark"] .post-summary-badge:hover{background:#393c42 !important;border-color:#44507e !important}
html[data-theme="dark"] .post-summary-badge[data-kind="error"]{color:#ec8179 !important}
html[data-theme="dark"] .post-summary-badge[data-kind="working"]{color:#8486e1 !important}
html[data-theme="dark"] .post-summary-badge[data-kind="done"]{color:#79ecbc !important}
html[data-theme="dark"] .post-summary-badge[data-kind="overdue"]{color:#eca379 !important}
html[data-theme="dark"] .post-filter-label{color:#cbced3 !important}
html[data-theme="dark"] .post-filter-chip{border:1px solid #44507e !important;background:#383b40 !important;color:#89a0dc !important}
html[data-theme="dark"] .post-filter-reset{color:#7993ec !important}
html[data-theme="dark"] .post-batch-bar{border:1px solid #44507e !important;background:#383b40 !important}
html[data-theme="dark"] .post-batch-count{color:#89a0dc !important}
html[data-theme="dark"] .post-batch-hint{color:#b4b8bf !important}
html[data-theme="dark"] .post-batch-row.batch-selected>.enterprise-tree-row{background:#303a55 !important}
html[data-theme="dark"] .batch-status-new{background:#3f4349 !important;color:#d9dcdf !important;border-color:#565b63 !important}
html[data-theme="dark"] .batch-status-working{background:#303d55 !important;color:#8486e1 !important;border-color:#44557e !important}
html[data-theme="dark"] .batch-status-done{background:#30553f !important;color:#79ecbc !important;border-color:#447e5b !important}
html[data-theme="dark"] .batch-status-error{background:#3b3f44 !important;color:#ec8179 !important;border-color:#7e4744 !important}
html[data-theme="dark"] .post-batch-status-select,
html[data-theme="dark"] .post-batch-priority-select,
html[data-theme="dark"] .post-batch-date{border:1px solid #575c64 !important;background:#383b40 !important}
html[data-theme="dark"] .post-batch-group-label{color:#cbced3 !important}
html[data-theme="dark"] .post-worklist-overdue-label{color:#eca379 !important}

/* ---- abgeleitet aus post-filing-plan.js (eingebettete Styles) ---- */
html[data-theme="dark"] .post-filing-panel{border:1px solid #44577e !important;background:#383b40 !important}
html[data-theme="dark"] .post-filing-grid label{color:#cbced3 !important}
html[data-theme="dark"] .post-filing-grid input,
html[data-theme="dark"] .post-filing-grid select{border:1px solid #575c64 !important;background:#383b40 !important}
html[data-theme="dark"] .post-filing-source span{background:#3f4349 !important;color:#cbced3 !important}
html[data-theme="dark"] .post-filing-warning{border:1px solid #7e6f44 !important;background:#554c30 !important;color:#ec9d79 !important}
html[data-theme="dark"] .post-filing-ready{color:#79ecbc !important}
html[data-theme="dark"] .post-filing-note{color:#b4b8bf !important}

/* ---- abgeleitet aus post-storage-plan.js (eingebettete Styles) ---- */
html[data-theme="dark"] .post-storage-panel{border:1px solid #44577e !important;background:#383b40 !important}
html[data-theme="dark"] .post-storage-state span{background:#3f4349 !important;color:#cbced3 !important}
html[data-theme="dark"] .post-storage-path{background:#393c42 !important;border:1px solid #4e535a !important}
html[data-theme="dark"] .post-storage-warning{border:1px solid #7e6f44 !important;background:#554c30 !important;color:#ec9d79 !important}
html[data-theme="dark"] .post-storage-success{border:1px solid #447e5b !important;background:#30553f !important;color:#79ecbc !important}
html[data-theme="dark"] .post-storage-controls label{color:#cbced3 !important}
html[data-theme="dark"] .post-storage-controls select{border:1px solid #575c64 !important;background:#383b40 !important}
html[data-theme="dark"] .post-storage-note{color:#b4b8bf !important}

/* ---- abgeleitet aus process-communications.js (eingebettete Styles) ---- */
html[data-theme="dark"] .process-communication-card{border:1px solid #44577e !important;background:#383b40 !important}
html[data-theme="dark"] .process-communication-meta span{background:#3f4349 !important;color:#cbced3 !important}
html[data-theme="dark"] .process-communication-actions select{border:1px solid #575c64 !important;background:#383b40 !important}
html[data-theme="dark"] .process-source-note{background:#304555 !important;border:1px solid #44647e !important;color:#79a3ec !important}

/* ---- abgeleitet aus process-timeline.js (eingebettete Styles) ---- */
html[data-theme="dark"] .bd-process-panel{background:var(--card,#383b40) !important}
html[data-theme="dark"] .bd-timeline-row{background:#393c42 !important}
html[data-theme="dark"] .bd-timeline-row.overdue{background:#3c3f45 !important}
html[data-theme="dark"] .bd-timeline-meta{color:#b4b8bf !important}
html[data-theme="dark"] .bd-communication-docs{border-top:1px dashed #565b63 !important}

/* ---- abgeleitet aus search-client-context.js (eingebettete Styles) ---- */
html[data-theme="dark"] .bd-command-box{background:#383b40 !important}
html[data-theme="dark"] .bd-client-context{background:#303b55 !important;border:1px solid #44507e !important}

/* ---- abgeleitet aus task-scope-catalog.js (eingebettete Styles) ---- */
html[data-theme="dark"] .task-scope-catalog-grid .notice.danger{border:1px solid #7e4744 !important;background:#3a3e43 !important;color:#e9837c !important}
html[data-theme="dark"] .tsc-knowledge-panel,
html[data-theme="dark"] .tsc-history{border-top:1px solid #44587e !important}
html[data-theme="dark"] .tsc-history-row,
html[data-theme="dark"] .tsc-preview-source{border-left:3px solid #44537e !important}
html[data-theme="dark"] .tsc-preview-head{background:#303c55 !important}
html[data-theme="dark"] .tsc-preview-card{border:1px solid #44587e !important}

/* ---- abgeleitet aus work-control-cockpit.js (eingebettete Styles) ---- */
html[data-theme="dark"] .wc-metric{background:#383b40 !important}
html[data-theme="dark"] .wc-row{background:#383b40 !important}
html[data-theme="dark"] .wc-batch{background:#393c42 !important}

/* ---- Ausnahmen: Logos brauchen hellen Grund ---- */
html[data-theme="dark"] .sidebar-signet{background:#ffffff !important}
html[data-theme="dark"] .loginbrand img{background:#ffffff;border-radius:14px;padding:14px;box-sizing:border-box}
