/* Local dark mode: saved company colors remain untouched. */
:root[data-dve-theme="dark"]{
 color-scheme:dark;
 --bg:#101a27!important;--card:#182536!important;--text:#e1e9f1!important;--muted:#a7b8c9!important;--line:#35485c!important;
 --primary:#7acced!important;--btnBg:#225f7e!important;--btnText:#f5fbff!important;--secondaryBtnBg:#273b4d!important;--secondaryBtnText:#dae9f4!important;
 --inputBg:#111e2c!important;--inputText:#e4edf5!important;--tableRowBg:#182536!important;
 --navBg:#142333!important;--navText:#dce7f0!important;--navMainBtnText:#dce7f0!important;--navSubBtnText:#c4d5e4!important;--navActiveBtnText:#e7f8ff!important;--navActiveBtnBg:#24516b!important;--navMainBtnHover:#253d51!important;--navSubBtnHover:#253d51!important;
 --taskDueBg:#473b20!important;--taskOverdueBg:#472d35!important;
}
html[data-dve-theme="dark"] body{background:var(--bg)!important;color:var(--text)!important}
html[data-dve-theme="dark"] body :is(.card,.theme-section,.accordion,.material-modal,.day-modal,dialog,.dve-meeting-dialog,.dve-contract-picker,.dve-context-menu,.dve-popup-menu,#dveRevisionPanel,.dve-global-results,.dve-settings-tabs,.dve-warehouse-sidebar){background:var(--card)!important;color:var(--text)!important;border-color:var(--line)!important}
html[data-dve-theme="dark"] body :is(h1,h2,h3,h4,label,summary){color:inherit}
html[data-dve-theme="dark"] body :is(input,select,textarea){background:var(--inputBg)!important;color:var(--inputText)!important;border-color:var(--line)!important;color-scheme:dark}
html[data-dve-theme="dark"] body :is(input,textarea)::placeholder{color:#8ca2b6!important;opacity:1}
html[data-dve-theme="dark"] body :is(.muted,.small.muted,th,.dve-breadcrumb){color:var(--muted)!important}
html[data-dve-theme="dark"] body :is(table,thead,tbody,tr,th,td){border-color:var(--line)!important}
html[data-dve-theme="dark"] body :is(th,.dve-project-group td,.material-modal-head,.material-modal-foot,.dve-meeting-dialog-head,.dve-meeting-dialog-foot,.dve-settings-separator){background:#203244!important;color:var(--text)!important}
html[data-dve-theme="dark"] body :is(td,.project-row,.contract-row){background:var(--card)!important;color:var(--text)!important}
html[data-dve-theme="dark"] body tr:hover>td{background:#22374a!important}
html[data-dve-theme="dark"] body .btn{background:var(--btnBg)!important;color:var(--btnText)!important;border-color:#39627c!important}
html[data-dve-theme="dark"] body :is(.btn.secondary,.icon-btn,.dve-info-button){background:var(--secondaryBtnBg)!important;color:var(--secondaryBtnText)!important;border-color:var(--line)!important}
html[data-dve-theme="dark"] body :is(.btn.danger,.btn.red){background:#68373d!important;color:#ffe1df!important}
html[data-dve-theme="dark"] body :is(.tabs,.tabbar,.project-tabs,.dve-settings-tabs button){background:transparent!important;color:var(--text)!important}
html[data-dve-theme="dark"] body :is(.tabs button.active,.tab-btn.active,.dve-settings-tabs button.active){background:#24516b!important;color:#e7f8ff!important}
html[data-dve-theme="dark"] body #nav{background-color:#142333!important;background-blend-mode:multiply!important;border-color:var(--line)!important;--navText:#dce7f0!important;--navMainBtnText:#dce7f0!important;--navSubBtnText:#c4d5e4!important;--navActiveBtnText:#e7f8ff!important;--navActiveBtnBg:#24516b!important;--navMainBtnHover:#253d51!important;--navSubBtnHover:#253d51!important}
html[data-dve-theme="dark"] body #dveNavLogo{filter:brightness(0) invert(1)}
html[data-dve-theme="dark"] body #dveNavSoftware{color:#d1e8f4}
html[data-dve-theme="dark"] body #dveProStatus{background:#152536!important;border-color:var(--line)!important;color:var(--text)!important}
html[data-dve-theme="dark"] body #dveProStatus :is(button,#dveBuildVersion){color:#b9def1!important}
html[data-dve-theme="dark"] body #dveNetworkStatus.online,html[data-dve-theme="dark"] body #dveStorageStatus[data-type=ok]{color:#87d9b0!important}
html[data-dve-theme="dark"] body :is(#dveStorageStatus[data-type=dirty],#dveStorageStatus[data-type=error],#dveNetworkStatus.offline){color:#ffd18c!important}
html[data-dve-theme="dark"] body #dveRevisionPanel :is(button,[data-sync]){background:#243b4f;color:var(--text);border-color:var(--line)}
html[data-dve-theme="dark"] body #dveRevisionPanel :is(h2,time,footer){color:var(--muted)}
html[data-dve-theme="dark"] body #dveObjectLockStatus{background:#44391f;color:#ffdd9a;border-color:#806432}
html[data-dve-theme="dark"] body :is(.dve-readonly-banner,.warn){background:#44391f!important;color:#ffdd9a!important;border-color:#806432!important}
html[data-dve-theme="dark"] body :is(.modal-backdrop,.day-modal-backdrop){background:#020912b8!important}
html[data-dve-theme="dark"] body :is(a,.link){color:var(--primary)}
html[data-dve-theme="dark"] body :is(button,input,select,textarea,a):focus-visible{outline-color:#7acced!important}
html[data-dve-theme="dark"]{scrollbar-color:#526a80 #142333}
@media print{html[data-dve-theme="dark"]{color-scheme:light;--bg:#fff!important;--card:#fff!important;--text:#17202a!important;--muted:#546477!important;--line:#ccd6e0!important;--primary:#164663!important}}

html[data-dve-theme="dark"] body #nav :is(button,a,summary,#appBrand){color:var(--navText)!important}
html[data-dve-theme="dark"] body #nav :is(.nav-group-title,.nav-section-title){color:var(--muted)!important}

html[data-dve-theme="dark"] body #dveCentralStatusBar{background:transparent!important;color:#a9d8ce!important}
/* 1.5.6: consistent surfaces and readable text, including legacy inline colors. */
:root[data-dve-theme="dark"]{--bg:#101c2a!important;--card:#1b2c3d!important;--text:#f0f5fa!important;--muted:#c1d0df!important;--line:#50677d!important;--secondary:#273d51!important;--navSelected:#294d67!important;--secondaryBtnBg:#2a4258!important;--secondaryBtnText:#f0f5fa!important;--inputBg:#112333!important;--inputText:#f6f9fc!important;--tableHeaderBg:#294157!important;--tableHeaderText:#f2f7fc!important;--tableRowText:#f0f5fa!important;--link:#8bddff!important}
html[data-dve-theme=dark] body :is(.dve-workflow-inbox,.dve-workflow-detail,.dve-workflow-entry,.dve-workflow-footer,.dve-workflow-scroll,.dve-call-delivery,.dve-call-address,.dve-access-heading,.dve-access-targets>label,.dve-context-menu button,.dve-popup-menu button,.dve-global-result,.dve-s-client,.dve-s-summary,.material-series-view,.material-call-series-view,.material-readonly-table,.taskpack-box,.taskpack-body,.contract-add-panel,.dve-portal-card,.dve-p-card,.dve-admin-appearance-layout){background:var(--card)!important;color:var(--text)!important;border-color:var(--line)!important}
html[data-dve-theme=dark] body :is(.dve-workflow-entry.active,.dve-workflow-entry:hover,.dve-context-menu button:hover,.dve-popup-menu button:hover){background:#2d4c64!important;color:#fff!important}
html[data-dve-theme=dark] body :is(.small,.sub-text,.dve-workflow-entry small,.dve-workflow-history,.dve-s-breadcrumb,.dve-breadcrumb,.dve-plan-caption,.dve-call-table small){color:var(--muted)!important}
html[data-dve-theme=dark] body :is(.main-text,.one-line-cell,.dve-s-name,.dve-w-title,.material-series-summary,.material-call-series-view>summary,.taskpack-header){color:var(--text)!important}
html[data-dve-theme=dark] body :is(.material-series-view>summary,.material-call-series-view>summary,.taskpack-header,.dve-plan-months,.dve-plan-weeks,.dve-plan-days,.dve-plan-sidebar){background:#253d52!important;color:var(--text)!important;border-color:var(--line)!important}
html[data-dve-theme=dark] body :is(input,select,textarea){-webkit-text-fill-color:var(--inputText)!important;opacity:1}
html[data-dve-theme=dark] body :is(input,textarea)::placeholder{color:#b4c6d7!important;-webkit-text-fill-color:#b4c6d7!important}
html[data-dve-theme=dark] body :is(input,button,select,textarea):disabled{color:#a8b8c7!important;-webkit-text-fill-color:#a8b8c7!important;background:#213243!important;opacity:1}
html[data-dve-theme=dark] body :is(.link,a,.copy-cell,.dve-bare-icon,.task-doc-delete){color:#89d9ff!important}
html[data-dve-theme=dark] body :is(.dve-pilot-error,#dveChatStatus.error,[data-access-status].error){color:#ffb0aa!important}
html[data-dve-theme=dark] body .dve-w-unread{color:#c2f1ff!important;background:#17475e!important}
html[data-dve-theme=dark] body #view :is(button.btn,button.btn.secondary){border-color:#64829b!important}
html[data-dve-theme=dark] body .dve-workflow-page .dve-workflow-actions button{background:#304c64!important;color:#f1f7fc!important;border-color:#64829b!important}
html[data-dve-theme=dark] body .dve-workflow-page .dve-workflow-actions button[data-w-done]{background:#237095!important;color:#fff!important;border-color:#82d4f1!important}
html[data-dve-theme=dark] body #dveTabRail .dve-window-tab{background:#263d52!important;color:#edf5fc!important;border-color:#5e7890!important}
html[data-dve-theme=dark] body #dveTabRail .dve-window-tab.active{background:#285b78!important;color:#fff!important;border-color:#83d7f4!important}
html[data-dve-theme=dark] body #dveTabRail .dve-window-tab button{color:inherit!important}
html[data-dve-theme=dark] body #view :is(.dve-separated-tabs,.project-page-tabs) [aria-selected=true]{background:#285b78!important;color:#fff!important;border-color:#83d7f4!important}
html[data-dve-theme=dark] body .dve-plan-line .dve-plan-track{background-color:var(--card)!important}
html[data-dve-theme=dark] body .dve-call-table .paper-check{background:transparent!important;border-color:#d9eaf7!important}
html[data-dve-theme=dark] body :is([style*="background:#fff"],[style*="background: #fff"],[style*="background:white"],[style*="background: white"]):not(svg):not(img):not(canvas){background-color:var(--card)!important;color:var(--text)!important}

:root[data-dve-theme="dark"] .dve-admin-divider{color:var(--muted)!important}
