/* TrueHelm 2.1.1 R2 - readable Deep Ocean surfaces and consistent Back controls.
   UI-only hotfix: no schema changes, no stock/account/asset mutations. */
.v211-dark .modal-head{gap:12px;position:relative;z-index:3}
.v211-dark .modal-head h2{flex:1;min-width:0;overflow-wrap:anywhere;line-height:1.25}
.v211-dark .modal-back-btn{
  display:inline-flex;align-items:center;justify-content:center;flex:none;
  min-height:42px;padding:8px 13px;border:1px solid #48778e;
  border-radius:11px;background:#14384f;color:#effaff;
  font-size:14px;font-weight:750;cursor:pointer;white-space:nowrap;
}
.v211-dark .modal-back-btn:hover{background:#1e526a;border-color:#68b4c5}
.v211-dark .modal-back-btn:focus-visible{outline:3px solid #68e0e8;outline-offset:2px}
.v211-dark .modal-head .close-btn{margin-left:0;flex:none;min-width:42px;min-height:42px}
/* Some screens retained V1/V2 white cards despite the R1 overrides. Pair their
   background and foreground colours; preserve dedicated photo and drawing canvases. */
.v211-dark :is(
 .poc-card,.workspace-summary>div,.asset-mini-card,.source-card,.nameplate-source,
 .list-button,.relationship-asset,.relationship-summary,.research-task,
 .location-asset,.asset-intelligence-summary,.asset-spare-group,.v192-case-entry,
 .v19-stats>div,.v19-tabs,.v19-job-card,.v19-manual-card,.v19-timeline-row,
 .v19-vm-step,.v19-service-status,.v191-quick-stats>button,.v191-panel,
 .v191-work-item,.v191-space-grid button,.v192-hidden-assets,.v192-hidden-asset,
 .v193-reports button,.v193-safety-check,.v193-setting-access,
 .v195-folder,.v195-doc-list,.v195-manage,.v195-tools,.v195-path,.v195-empty,
 .v196-spare-row,.v218-check-form,.v219-stores-panel,
 .v217-asset-details .asset-facts,.v217-detail-disclosure>summary,
 .nvm-commission-fields,.nvm-care-tools,
 .nvm-guide-grid>section,.nvm-guide-steps label,
 .v230-job-summary,.v230-part-row,.v230-job-row,
 .v2-setup-footer,.v1911-prompt-grid>div
){background:#102f44!important;color:#ecf8ff!important;border-color:#356176!important}
.v211-dark :is(
 .poc-card,.workspace-summary>div,.asset-mini-card,.source-card,.nameplate-source,
 .list-button,.relationship-asset,.relationship-summary,.research-task,
 .location-asset,.asset-intelligence-summary,.asset-spare-group,
 .v19-job-card,.v19-manual-card,.v191-panel,.v191-work-item,.v195-folder,
 .v195-doc-list,.v195-manage,.v195-tools,.v217-detail-disclosure,
 .nvm-guide-grid>section,.v230-job-summary,.v230-job-row
) :is(h1,h2,h3,h4,h5,b,strong,summary,dd){color:#eefbff!important}
.v211-dark :is(
 .poc-card,.workspace-summary>div,.asset-mini-card,.source-card,.nameplate-source,
 .list-button,.relationship-asset,.relationship-summary,.research-task,
 .location-asset,.asset-intelligence-summary,.asset-spare-group,
 .v19-job-card,.v19-manual-card,.v191-panel,.v191-work-item,.v195-folder,
 .v195-doc-list,.v195-manage,.v195-tools,.v217-detail-disclosure,
 .nvm-guide-grid>section,.v230-job-summary,.v230-job-row
) :is(p,small,dt,.muted){color:#b2d0de!important}
/* Dashboard and plan lists must never inherit pale text on light backgrounds. */
.v211-dark :is(
 .v217-attention-row,.v223-record-row,.v223-activity,.v223-priority-row,
 .v217-setup-summary,.v217-commission-guide,.v216-stock-card,
 .v216-bin,.v216-job-item,.v220-row,.v218-check-step
) :is(span,strong,b,em){color:#e8f8ff!important}
/* White canvas is intentional on vessel/technical drawings only. */
.v211-dark :is(#sceneViewport,.v198-scene,.v230-scene-viewport,.v2-plan-stage,.v197-plan){background:#f2f0e9!important}
/* Keep legible controls at the bottom of small tablet/phone detail overlays. */
@media(max-width:760px){
 .v211-dark .modal-head{padding:10px 12px;gap:8px}
 .v211-dark .modal-back-btn{min-height:44px;padding:7px 10px}
 .v211-dark .modal-head h2{font-size:clamp(14px,3.8vw,19px)!important}
}

/* R2 final: use one consistent Deep Ocean surface, without pale highlighting
   entire panels when a navigation tab is selected. The active tab carries the
   contrast cue (cyan label, border and underline); the data cards stay navy. */
.v211-dark :is(.v223-page-tabs,.v223-filter-tabs,.v234-part-tabs,.v19-tabs,.tabbar,.v234-store-tools){
  background:transparent!important;
  color:var(--th-ink)!important;
}
.v211-dark :is(
  .v223-page-tabs button,.v223-filter-tabs button,.v234-part-tabs button,
  .v19-tabs button,.tabbar button,.v234-store-tools button,
  .v216-category,.v210-area-link
){
  background:#123247!important;color:#c5dde8!important;
  border-color:#355a70!important;box-shadow:none!important;
}
.v211-dark :is(
  .v223-page-tabs button.active,.v223-filter-tabs button.active,
  .v234-part-tabs button.active,.v234-part-tabs button[aria-selected="true"],
  .v19-tabs button.active,.tabbar button.active,
  .v234-store-tools .v234-store-selected,
  .v216-category.active,.v210-area-link.selected,
  [role="tab"][aria-selected="true"]
){
  background:#173c51!important;color:#8ef4ff!important;
  border-color:#3ac3d1!important;
  box-shadow:inset 0 -4px #24d8e8!important;
  font-weight:800!important;
}
.v211-dark :is(
  .v223-page-tabs button.active,.v223-filter-tabs button.active,
  .v234-part-tabs button.active,.v234-part-tabs button[aria-selected="true"],
  .v19-tabs button.active,.tabbar button.active,
  .v234-store-tools .v234-store-selected,.v216-category.active,
  .v210-area-link.selected
) svg{color:#8ef4ff!important;stroke:#8ef4ff!important}
/* Preserve the user's separate yellow-text preference for the main sidebar. */
.v211-dark .sidebar :is(.nav-btn.active,.v234-nav-current,[aria-current="page"]){
  background:transparent!important;color:var(--th-yellow)!important;box-shadow:none!important;
}
.v211-dark .sidebar :is(.nav-btn.active,.v234-nav-current,[aria-current="page"]) svg{
  color:var(--th-yellow)!important;stroke:var(--th-yellow)!important;
}
/* Explicit text/background pairing for additional old-format information rows. */
.v211-dark :is(.asset-facts>div,.asset-detail-head,.asset-mini-card,.v194-back-row,
 .v195-tools,.v195-path,.v196-spare-row,.v230-job-summary,.v230-part-row,
 .v217-detail-disclosure,.v217-detail-disclosure>summary,
 .v234-part-info,.v234-asset-specifics,.v234-asset-overview,
 .v223-equipment-links button,.v223-maint-table td,.v223-maint-table th){
  background:#102f44!important;color:#edf9ff!important;border-color:#355e75!important;
}
.v211-dark :is(.asset-facts>div,.v234-part-info,.v234-asset-specifics,.v223-maint-table td)
 :is(b,strong,dd){color:#f4fdff!important}
.v211-dark :is(.asset-facts>div,.v234-part-info,.v234-asset-specifics,.v223-maint-table td)
 :is(small,dt,.muted){color:#b9d3df!important}
/* Zoom controls show a genuine end-stop, rather than suddenly zooming IN. */
.v211-dark #v230ZoomOut:disabled,.v211-dark #v230ZoomIn:disabled{
  opacity:.45;cursor:not-allowed!important;box-shadow:none!important;
}
/* Document/image viewer should have the same obvious way out as modal details. */
.v211-dark .viewer-head #viewerClose{
  color:#effaff!important;background:#14384f!important;border:1px solid #48778e!important;
  min-height:42px;font-weight:750;
}
.v211-dark .viewer-head #viewerClose:hover{background:#1e526a!important}
