/* Only the screen theme changes. Printed reports, exports and authored email content keep their own presentation. */
[data-command-theme-toggle]{white-space:nowrap;min-height:40px}
.command-account{flex-wrap:wrap}
@media screen {
 html[data-command-theme="dark"] {
  color-scheme:dark;
  --bg:#10191f;--white:#19262e;--ink:#e3edf1;--muted:#b2c4cd;--line:#465b66;--navy:#0c151b;--teal:#64d4b5;--mint:#244b42;
  --ui-text:#e3edf1;--ui-muted:#b2c4cd;--ui-border:#465b66;--ui-accent:#64d4b5;--ui-danger:#ffaaa4;
 }
 html[data-command-theme="dark"] body{background:#10191f;color:#e3edf1}
 html[data-command-theme="dark"] :is(#authScreen,#authScreen #login,.console,main,#nav,.command-sidebar,.organization-bar,.org-tools-menu,dialog,.panel,.stat,.dashboard-widget,.form-card,.map-sidebar,.map-layer,.fl-folder,.submission-sidebar,.submission-details,.builder-canvas,.builder-properties,.form-value,.build-field,.ics204-sheet,.ics204-row,.op-card,.aar-card){background:#19262e!important;color:#e3edf1!important;border-color:#465b66!important}
 html[data-command-theme="dark"] :is(.command-bar,.dialog-head,.dialog-actions,.comm-editor-toolbar){background:#132029;color:#e3edf1}
 html[data-command-theme="dark"] :is(#operatingContext.operating-context,.operating-dialog-context,.resources-record-context,.uw-summary,.rl-bulk-shared,.rl-bulk-scroll-controls,.rl-resource-top-scroll,.rl-table-tools,.submission-toolbar,.mw-bar,.mw-type,.mw-summary){background:#20343e!important;color:#e3edf1!important;border-color:#526b77!important}
 html[data-command-theme="dark"] :is(.operating-context-label,.operating-context-scope,.muted,.context-label,.eyebrow,.nav-label,.status-key,footer,.map-help,.map-progress){color:#b2c4cd!important}
 html[data-command-theme="dark"] :is(table,tbody,td,[role=cell]){background:#19262e!important;color:#e3edf1!important;border-color:#465b66!important}
 html[data-command-theme="dark"] :is(thead,th,[role=columnheader]){background:#263c47!important;color:#e3edf1!important;border-color:#526b77!important}
 html[data-command-theme="dark"] :is(input,textarea,select,option){background:#101d25!important;color:#e3edf1!important;border-color:#617985!important}
 html[data-command-theme="dark"] :is(input,textarea)::placeholder{color:#b2c4cd!important;opacity:1}
 html[data-command-theme="dark"] :is(button:not(.leaflet-marker-icon),.leaflet-bar a){background:#263c47!important;color:#e3edf1!important;border-color:#617985!important}
 html[data-command-theme="dark"] :is(button:not(.leaflet-marker-icon),.leaflet-bar a):hover{background:#355361!important;color:#fff!important}
 html[data-command-theme="dark"] :is(button.primary,button.active,button[aria-current="page"],button[aria-pressed="true"],#nav button.current,.mw-active){background:#246b5a!important;color:#fff!important;border-color:#64d4b5!important}
 html[data-command-theme="dark"] :is(button,input,select,textarea):disabled{background:#26343c!important;color:#a3b6bf!important;border-color:#465b66!important;opacity:1}
 html[data-command-theme="dark"] :is(button.link,a:not(.brand):not(.leaflet-bar a)){color:#85dfc7}
 html[data-command-theme="dark"] :is(button.link,.rl-column-sort){background:transparent!important;color:#85dfc7!important}
 html[data-command-theme="dark"] :is(input[type=checkbox],input[type=radio],input[type=range]){accent-color:#64d4b5}
 html[data-command-theme="dark"] :is(button,a,input,select,textarea,summary,[tabindex]):focus-visible{outline:3px solid #8debd4!important;outline-offset:3px}
 html[data-command-theme="dark"] :is(.rl-status,.badge){background:#20343e!important;color:#edf5f8!important;border-color:#617985!important}
 html[data-command-theme="dark"] .rl-status{border-inline-start-color:var(--status-color)!important}
 html[data-command-theme="dark"] .badge:is(.Critical,.Disrupted){background:#542e2d!important;color:#ffc2bd!important}
 html[data-command-theme="dark"] .badge:is(.Draft,.Pending){background:#443c20!important;color:#ffe29c!important}
 html[data-command-theme="dark"] :is(.banner,.rl-warning,.op-warning,[data-bulk-message]:not(:empty)){background:#443c20!important;color:#ffe29c!important;border-color:#d0ac48!important}
 html[data-command-theme="dark"] :is(#dialogError,.danger,[role=alert]){color:#ffaaa4!important}
 html[data-command-theme="dark"] [data-rl-message]:not(:empty){background:#462c2b;color:#ffd1cd}
 html[data-command-theme="dark"] :is(.leaflet-popup-content-wrapper,.leaflet-popup-tip,.leaflet-control-layers,.leaflet-control-attribution){background:#19262e;color:#e3edf1}
 html[data-command-theme="dark"] :is(.leaflet-popup-content,.leaflet-popup-content h3,.leaflet-popup-content p){color:#e3edf1}
 html[data-command-theme="dark"] :is(.rl-status-symbol,.leaflet-marker-icon){forced-color-adjust:auto}
 html[data-command-theme="dark"] dialog::backdrop{background:#02070cc9}
 html[data-command-theme="dark"] :is(fieldset,details,.tablewrap,.rl-bulk-scroll){border-color:#526b77}

 /* UAT-21-02 row151: shared screen typography across every Command workspace. */
 html[data-command-theme="dark"] :is(h1,h2,h3,h4,h5,h6,label,legend,dt,summary,.eyebrow,.context-label,.nav-label,.operating-context-label,.operating-context-scope){color:#64d4b5!important}
 html[data-command-theme="dark"] #nav.command-sidebar details[data-nav-group]>summary,
 html[data-command-theme="dark"] .organization-bar .context-field label,
 html[data-command-theme="dark"] .map-sidebar :is(h4,label,summary,.map-layer),
 html[data-command-theme="dark"] :is(.map-overlay-toggle,.map-radar-options summary){color:#64d4b5!important}
 html[data-command-theme="dark"] a:not(.brand):not(.leaflet-bar a){color:#64d4b5!important}
 html[data-command-theme="dark"] :is(small,.muted,.activity-origin,.op-period small,.map-overlay-toggle small,.map-radar-options small,.map-radar-status,.map-counties-status,.map-popup small){color:#b2c4cd!important}
 html[data-command-theme="dark"] :is(.op-note,.ics202-objective,.ics202-form [data-ics-checks]){background:#20343e!important;color:#e3edf1!important;border-color:#526b77!important}
 html[data-command-theme="dark"] :is(.op-warning,.ics202-status){background:#443c20!important;color:#ffe29c!important}
 html[data-command-theme="dark"] :is(.op-error,.danger,[role=alert],#dialogError){color:#ffaaa4!important}
 /* Keep semantic alerts and authored document text independent of the accent. */
 html[data-command-theme="dark"] :is(.banner,.rl-warning,.op-warning,[data-bulk-message],.badge,.rl-status,.danger,[role=alert]) :is(h1,h2,h3,h4,h5,h6,label,legend,dt,summary,small){color:inherit!important}
 html[data-command-theme="dark"] :is(.comm-rich-editor,.print-sheet) :is(h1,h2,h3,h4,h5,h6,label,legend,dt,summary,small,a){color:revert!important}

 /* Table action styles carry IDs and !important: match their scope explicitly. */
 html[data-command-theme="dark"] body .console :is(#headerActions,.toolbar,.rl-table-tools,.operational-toolbar) button,
 html[data-command-theme="dark"] body .console #recordTable td.record-row-actions>button[data-action-role],
 html[data-command-theme="dark"] body .console #recordTable [data-mission-tasks]{background:#244b42!important;color:#e3edf1!important;border-color:#64d4b5!important}
 html[data-command-theme="dark"] body .console :is(#headerActions,.toolbar,.rl-table-tools,.operational-toolbar) button:hover,
 html[data-command-theme="dark"] body .console #recordTable td.record-row-actions>button[data-action-role]:hover,
 html[data-command-theme="dark"] body .console #recordTable [data-mission-tasks]:hover{background:#306354!important;color:#fff!important}
 html[data-command-theme="dark"] body .console #recordTable td.record-row-actions>button[data-action-role="destructive"]{background:#462c2b!important;color:#ffaaa4!important;border-color:#c27d77!important}
 html[data-command-theme="dark"] body .console :is(#headerActions,.toolbar,.rl-table-tools,.operational-toolbar,#recordTable) button:disabled{background:#26343c!important;color:#a3b6bf!important;border-color:#465b66!important;opacity:1}

 /* Shared Export, Print and View options are details/summary dropdowns. */
 html[data-command-theme="dark"] .uw-workspace .uw-menu>summary{background:#244b42!important;color:#e3edf1!important;border-color:#64d4b5!important}
 html[data-command-theme="dark"] .uw-workspace .uw-menu>summary:hover,
 html[data-command-theme="dark"] .uw-workspace .uw-menu[open]>summary{background:#306354!important;color:#fff!important}
 html[data-command-theme="dark"] .uw-workspace .uw-menu>summary:focus-visible{outline:3px solid #8debd4!important;outline-offset:3px}
 html[data-command-theme="dark"] .uw-workspace .uw-menu-items{background:#19262e!important;color:#e3edf1!important;border-color:#617985!important;box-shadow:0 8px 22px #0008}
 html[data-command-theme="dark"] .uw-workspace .uw-menu-items button{background:#263c47!important;color:#e3edf1!important;border-color:#617985!important}
 html[data-command-theme="dark"] .uw-workspace .uw-menu-items button:hover{background:#355361!important;color:#fff!important}
 html[data-command-theme="dark"] .uw-workspace .uw-menu-items button:disabled{background:#26343c!important;color:#a3b6bf!important;border-color:#465b66!important;opacity:1}

 /* Left navigation: explicit child text, disclosure arrows and current badge. */
 html[data-command-theme="dark"] body .console #nav.command-sidebar details>summary,
 html[data-command-theme="dark"] body .console #nav.command-sidebar details>summary *,
 html[data-command-theme="dark"] body .console #nav.command-sidebar details>summary::before{color:#64d4b5!important}
 html[data-command-theme="dark"] body .console #nav.command-sidebar button,
 html[data-command-theme="dark"] body .console #nav.command-sidebar button>span:not([aria-hidden="true"]){color:#e3edf1!important}
 html[data-command-theme="dark"] body .console #nav.command-sidebar button[aria-current="page"]::after{background:#20343e!important;color:#64d4b5!important;border-color:#64d4b5!important}
 html[data-command-theme="dark"] body .console #nav.command-sidebar details[data-nav-group="administration"]{background:#132029!important;border-color:#465b66!important}

 /* BCM overview and supporting workspace descriptions use explicit legacy colors. */
 html[data-command-theme="dark"] .bcm-workspace{--bcm-ink:#e3edf1;--bcm-line:#465b66;--bcm-teal:#64d4b5;color:#e3edf1!important}
 html[data-command-theme="dark"] :is(.bcm-card p,.bcm-card p strong,.bcm-intro,.bcm-empty,.bcm-footnote,.bcm-detail dd){color:#e3edf1!important}
 html[data-command-theme="dark"] :is(.bcm-context,.bcm-table-wrap,.bcm-stat){background:#19262e!important;color:#e3edf1!important;border-color:#465b66!important}
 html[data-command-theme="dark"] .bcm-card button[data-board]{background:#244b42!important;color:#e3edf1!important;border-color:#64d4b5!important}
 html[data-command-theme="dark"] .bcm-card button[data-board]:hover{background:#306354!important;color:#fff!important}
 html[data-command-theme="dark"] .bcm-overdue{color:#ffaaa4!important}

 /* UAT-21-02: consistent dark header controls and summary/count cards. */
 html[data-command-theme="dark"] body .console .organization-bar #role,
 html[data-command-theme="dark"] body .console .organization-bar .org-tools>summary{background:#244b42!important;color:#e3edf1!important;border:1px solid #64d4b5!important;border-radius:6px}
 html[data-command-theme="dark"] body .console .organization-bar .org-tools>summary:hover{background:#306354!important;color:#fff!important}
 html[data-command-theme="dark"] body .console :is(.stat,.uw-summary-card,.bcm-stat,[data-personnel-counts]>.panel){background:#263c47!important;color:#e3edf1!important;border-color:#617985!important}
 html[data-command-theme="dark"] body .console :is(.stat,.uw-summary-card,.bcm-stat,[data-personnel-counts]>.panel) :is(span,div,p,small){color:#b2c4cd!important}
 html[data-command-theme="dark"] body .console :is(.stat,.uw-summary-card,.bcm-stat,[data-personnel-counts]>.panel) strong{color:#e3edf1!important}
 html[data-command-theme="dark"] body .console .bcm-stat[data-page]>span{color:#64d4b5!important}
 html[data-command-theme="dark"] .map-canvas{background:#10191f}
 html[data-command-theme="dark"] body #dialogForm,
 html[data-command-theme="dark"] body #dialogFields,
 html[data-command-theme="dark"] body #dialogForm>.dialog-head,
 html[data-command-theme="dark"] body #dialogForm>.dialog-actions{background:#19262e!important;color:#e3edf1!important;border-color:#465b66!important}
 /* Authored email and document previews are intentionally paper-colored, not theme-colored. */
 html[data-command-theme="dark"] :is(.comm-rich-editor,.print-sheet){background:#fff!important;color:#15333c!important;color-scheme:light}
 html[data-command-theme="dark"] .comm-rich-editor :is(table,tbody,td,th){background:revert!important;color:revert!important}
}
@media(max-width:760px){.command-account{gap:8px}.command-account [data-command-theme-toggle]{min-height:44px}}
@media print{[data-command-theme-toggle]{display:none!important}}

html[data-command-theme="dark"] div.toolbar[style*="position:sticky"]{background:#19262e!important}

html[data-command-theme="dark"] div.toolbar[style*="position"][style*="sticky"]{background:#19262e!important}

/* Map settings form layers follow the application dark theme. */
html[data-command-theme="dark"] .map-layer-editor{background:#20343e!important;color:#e3edf1!important;border-color:#526b77!important}
html[data-command-theme="dark"] .map-layer-editor .row>b{color:#e3edf1!important}
