/* THRS Dashboard V5 — Readability & Detail Refinement (Dark Mode)
   Layout locked; design-only, no changes to data, access, chart inputs, or actions.
   Compact navy/gold styling applied after Dark Luxe V1 / Reference V2-V3 / Polish V4. */

/* 01. Sidebar navigation readability: all role-visible labels remain in place. */
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-sidebar .thrs-sidebar-section-label {
  color:#d0dff0!important;
  font-size:11px!important;
  font-weight:800!important;
  letter-spacing:.065em;
  opacity:1!important;
  text-shadow:0 1px 5px rgba(1,13,32,.15);
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-sidebar .thrs-sidebar-link {
  color:#e4eefa!important;
  font-size:14.5px!important;
  font-weight:590!important;
  letter-spacing:.003em;
  text-shadow:0 1px 4px rgba(0,10,25,.14);
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-sidebar .thrs-sidebar-link.thrs-sidebar-link-child,
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-sidebar .thrs-sidebar-link-child .thrs-sidebar-link-label {
  font-size:13px!important;
  font-weight:560!important;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-sidebar .thrs-sidebar-link.sidebar-active-link {
  color:#fff1cf!important;
  font-weight:730!important;
  border-color:rgba(242,200,115,.65)!important;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-sidebar .thrs-sidebar-footer-summary strong {color:#f5e3b7!important;font-size:12px!important;}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-sidebar .thrs-sidebar-footer-summary small {color:#cedcec!important;font-size:10px!important;}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-sidebar::after {opacity:.05!important;}

/* 02. Overview facts and KPI explanatory copy, without modifying metric values. */
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 :is(
  .thrs-main-dashboard__v7-briefing-copy > small,
  .thrs-main-dashboard__v7-health-copy small,
  .thrs-main-dashboard__v6-critical-value > span,
  .thrs-main-dashboard__v3-attention > p
) {
  color:#cfdfef!important;
  font-size:12px!important;
  line-height:1.55;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 .thrs-main-dashboard__v3-primary-kpi small {
  color:#f3d895!important;
  font-size:12px!important;
  line-height:1.45;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 .thrs-main-dashboard__v3-primary-kpi span:not(.thrs-main-dashboard__v3-primary-icon) {
  color:#d5e5f5!important;
  font-size:11.5px!important;
  line-height:1.5;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 .thrs-main-dashboard__v6-critical-topline > span {
  color:#f6e7eb!important;
  font-size:12px!important;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 .thrs-main-dashboard__v6-critical-topline small {
  color:#ffa9b8!important;
  font-size:10px!important;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 .thrs-main-dashboard__v6-critical-link {
  color:#f6dcb0!important;
  font-size:11.5px!important;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 .thrs-main-dashboard__v6-signal-rail .thrs-main-dashboard__stat-title {
  color:#eaf4ff!important;
  font-size:12.5px!important;
  font-weight:770!important;
  line-height:1.36;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 .thrs-main-dashboard__v6-signal-rail .thrs-main-dashboard__stat-subtitle {
  color:#d2e0f0!important;
  font-size:11.5px!important;
  line-height:1.45;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 .thrs-main-dashboard__v6-signal-rail .thrs-main-dashboard__stat-icon svg {
  color:#ebf5ff!important;
  stroke-width:2.3;
}

/* 03. Workforce charts — panel headings, controls and accessible outer legends.
   Chart.js axis/legend text is canvas-rendered; do not pretend CSS changes JS font size. */
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 .thrs-main-dashboard__v6-intelligence .thrs-main-dashboard__panel-header h2 {
  color:#f7fbff!important;
  font-size:14px!important;
  font-weight:820!important;
  line-height:1.3;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 .thrs-main-dashboard__v6-intelligence-facts span {
  color:#d2e2f3!important;
  font-size:11.25px!important;
  line-height:1.45;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 .thrs-main-dashboard__v6-intelligence-facts strong {
  color:#f8fcff!important;
  font-size:18px!important;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 .thrs-main-dashboard__v7-range-switch button,
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 .thrs-main-dashboard__v7-focus-button {
  color:#e0efff!important;
  font-size:11px!important;
  font-weight:680!important;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 .thrs-main-dashboard__v7-range-switch button.is-active {
  color:#ffe9b2!important;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 .thrs-main-dashboard__v3-workforce-summary small {
  color:#cfe0f2!important;
  font-size:11.5px!important;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 .thrs-main-dashboard__v3-workforce-summary strong {
  color:#f5faff!important;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 .thrs-main-dashboard__department-row {
  color:#d4e4f4!important;
  font-size:11.7px!important;
  line-height:1.5;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 .thrs-main-dashboard__department-name span {
  color:#edf5ff!important;
  font-size:11.7px!important;
  font-weight:710!important;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 .thrs-main-dashboard__department-row :is(strong,small) {
  color:#d7e6f6!important;
  font-size:11px!important;
  font-weight:670!important;
  font-variant-numeric:tabular-nums;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 .thrs-main-dashboard__department-row:focus-visible {
  outline:2px solid #f1d48a!important;
  outline-offset:2px;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 .thrs-main-dashboard__chart-wrap canvas {
  filter:brightness(1.12) contrast(1.08) saturate(1.12);
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 .thrs-main-dashboard__department-chart canvas {
  filter:brightness(1.10) contrast(1.045) saturate(1.13);
}

/* 04. Business Pulse: readable empty states, separate by neutral blue tones only.
   Error/retry remain real; no fake metric or service health indicator. */
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 .thrs-main-dashboard__v6-business-grid .thrs-integration-widget__title {
  color:#f0f7ff!important;
  font-size:13.25px!important;
  font-weight:790!important;
  line-height:1.38;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 .thrs-main-dashboard__v6-business-grid .thrs-integration-widget__subtitle {
  color:#d0e1f1!important;
  font-size:11.5px!important;
  line-height:1.55;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 .thrs-main-dashboard__v6-business-grid .thrs-integration-widget__badge {
  color:#ffe5b0!important;
  background:rgba(212,168,80,.17)!important;
  border-color:rgba(239,198,110,.41)!important;
  font-size:9.25px!important;
  letter-spacing:.02em;
  font-weight:750!important;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 .thrs-main-dashboard__v6-business-grid .thrs-integration-widget__unavailable {
  color:#d6e6f7!important;
  border-style:solid!important;
  box-shadow:inset 0 1px 0 rgba(249,252,255,.07),0 8px 22px rgba(3,13,35,.13)!important;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 .thrs-main-dashboard__v6-business-grid .thrs-integration-widget__unavailable > div:first-child {
  color:#f3d891!important;
  text-shadow:0 2px 17px rgba(223,171,88,.17);
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 .thrs-main-dashboard__v6-business-grid .thrs-integration-widget__unavailable > div:nth-child(2) {
  color:#fbfdff!important;
  font-size:16.5px!important;
  line-height:1.42;
  font-weight:780!important;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 .thrs-main-dashboard__v6-business-grid .thrs-integration-widget__unavailable > div:nth-child(3) {
  color:#d0e2f4!important;
  font-size:13.5px!important;
  line-height:1.55;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 .thrs-main-dashboard__v6-business-grid .thrs-integration-widget__unavailable > button {
  color:#f8fcff!important;
  background:linear-gradient(145deg,#2773b5,#1a5c96)!important;
  border:1px solid rgba(153,211,255,.52)!important;
  font-size:12px!important;
  font-weight:760!important;
  box-shadow:0 8px 18px rgba(3,16,39,.23),inset 0 1px 0 rgba(245,252,255,.085)!important;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 .thrs-main-dashboard__v6-business-grid .thrs-integration-widget__unavailable > button:focus-visible {
  outline:2px solid #f3d78c!important;
  outline-offset:3px;
}

/* Keep interactions calm, preserve mobile layout and reduced-motion preferences. */
@media (max-width:760px) {
  :is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-sidebar .thrs-sidebar-link {
    font-size:14px!important;
  }
  :is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 .thrs-main-dashboard__department-row,
  :is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 .thrs-main-dashboard__department-name span {
    font-size:11.25px!important;
  }
}
@media (prefers-reduced-motion: reduce) {
  :is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 :is(
    .thrs-main-dashboard__v6-signal-rail .thrs-main-dashboard__stat-card,
    .thrs-main-dashboard__v6-business-grid .thrs-integration-widget__unavailable > button
  ) {
    animation:none!important;
    transition:none!important;
  }
}
@media (forced-colors: active) {
  :is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 :is(a,button,input,select):focus-visible {
    outline:2px solid Highlight!important;
  }
}
