/* THRS Executive Dashboard Dark V3 — reference refinement, scoped and reversible.
   Preserve React data, charts, permissions, links, user flow, light mode.
   Matches approved navy/sapphire/champagne mock, responsive for smaller viewports. */
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 {
  --thrs-v3-champagne: #f1d28c;
  --thrs-v3-light: #f3f8ff;
  --thrs-v3-subtle: #c6d8eb;
  --thrs-v3-outline: rgba(139,192,244,.25);
  --thrs-v3-gold-outline: rgba(242,198,112,.53);
  --thrs-v3-elev: 0 20px 49px rgba(0,9,26,.31), inset 0 1px 0 rgba(244,251,255,.09);
  --v6-muted: #c2d4e9;
  --v7-muted: #bed1e6;
}
/* Decorative etched waves are a quiet footer texture, not behind navigation. */
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-sidebar::after {
  opacity:.12!important;
  height:30%!important;
  background:repeating-radial-gradient(ellipse 190px 90px at 0% 100%,transparent 0 15px,rgba(239,187,95,.24) 15.5px 16px,transparent 17px 28px)!important;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-sidebar-link.sidebar-active-link {
  border-color:#edc37a!important;
  background:linear-gradient(100deg,rgba(236,181,79,.29),rgba(71,120,165,.16))!important;
  box-shadow:inset 0 1px 0 rgba(255,235,191,.21),0 0 16px rgba(229,174,81,.16)!important;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-sidebar-section-label {
  color:#cedded!important;
}
/* Hero: generous height and spacing, refined serif title, skyline behind copy. */
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 .thrs-main-dashboard__page-header {
  min-height:162px;
  padding:27px clamp(19px,2.65vw,39px);
  margin-block-end:16px;
  align-items:center;
  border-color:rgba(232,196,127,.33)!important;
  background:
    radial-gradient(ellipse at 91% 2%,rgba(220,172,91,.18),transparent 43%),
    linear-gradient(111deg,rgba(8,35,64,.97) 0%,rgba(11,39,71,.97) 53%,rgba(18,43,74,.88) 100%)!important;
  box-shadow:0 12px 33px rgba(0,8,25,.22),inset 0 1px 0 rgba(246,227,190,.065)!important;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 .thrs-main-dashboard__page-header::before {
  inset-inline-end:0;
  width:44%;
  background:
    linear-gradient(153deg,transparent 46%,rgba(250,204,116,.44) 46.3%,rgba(236,184,100,.09) 46.6%,transparent 47.1%),
    repeating-linear-gradient(90deg,transparent 0 25px,rgba(153,196,238,.10) 26px 27px,transparent 28px 52px),
    repeating-linear-gradient(0deg,transparent 0 24px,rgba(153,196,238,.075) 25px 26px,transparent 27px 51px),
    linear-gradient(110deg,transparent 10%,rgba(32,55,85,.14) 37%,rgba(71,89,105,.17) 76%,rgba(12,30,60,.08));
  opacity:.96;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 .thrs-main-dashboard__page-header::after {
  content:"";position:absolute;
  inset-block:0;inset-inline-end:0;width:40%;
  border-radius:inherit;
  background:linear-gradient(127deg,transparent 63%,rgba(246,201,112,.38) 63.3%,transparent 63.75%);
  opacity:.7;pointer-events:none;z-index:0;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 .thrs-main-dashboard__page-heading h1 {
  font-size:clamp(37px,3.18vw,58px);
  line-height:1.06;
  letter-spacing:-.028em;
  color:#f8fbff!important;
  font-weight:800;
  text-shadow:0 4px 19px rgba(0,12,32,.25);
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7[dir="rtl"] .thrs-main-dashboard__page-heading h1 {
  font-family:inherit;letter-spacing:0;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__page-heading > p:last-child {font-size:12.5px;line-height:1.65;color:#c5d5e8!important;}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__customize {
  min-height:46px;
  color:#ffe5b3!important;
  border-color:rgba(242,201,123,.62)!important;
  background:linear-gradient(130deg,#153e6a,#10294a)!important;
  box-shadow:0 8px 19px rgba(0,10,25,.22),inset 0 1px 0 rgba(255,255,255,.1)!important;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v7-1-datebar {
  border-radius:15px;
  box-shadow:0 12px 27px rgba(0,8,22,.20),inset 0 1px 0 rgba(209,232,255,.08)!important;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v7-1-no-data {
  border-radius:15px;
  background:linear-gradient(103deg,rgba(103,28,48,.62),rgba(62,27,52,.73) 54%,rgba(25,37,65,.86))!important;
  box-shadow:0 13px 30px rgba(39,5,30,.20),inset 0 1px 0 rgba(255,239,237,.08)!important;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v7-1-no-data span {color:#ffa0a4!important;}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v7-1-no-data strong {color:#fffcfd!important;}
/* Executive briefing: less faint secondary copy, higher type hierarchy. */
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v7-briefing {
  margin-block:14px 23px;
  border-color:rgba(176,206,235,.17);
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v7-briefing-copy > strong {
  font-size:clamp(19px,1.65vw,27px);
  line-height:1.22;
  color:#f5f9ff;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v7-briefing-copy > small {
  color:#c6d8ec!important;font-size:11px;line-height:1.6;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v7-health-copy small {
  color:#c2d6eb!important;
}
/* Command center: luminous sapphire with a controlled golden bottom glow. */
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v6-command-deck {
  border-radius:19px!important;
  border-color:rgba(243,204,124,.71)!important;
  box-shadow:0 0 0 1px rgba(241,187,86,.12),0 21px 42px rgba(0,7,25,.31),0 7px 27px rgba(225,176,84,.13)!important;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v6-command-main {
  background:radial-gradient(ellipse at 88% 10%,rgba(101,92,181,.26),transparent 39%),radial-gradient(ellipse at 0% 10%,rgba(23,121,203,.33),transparent 42%),linear-gradient(113deg,#0c4071 0%,#0b305b 54%,#0c2548)!important;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v3-primary-kpi strong {color:#fff!important;text-shadow:0 4px 24px rgba(18,40,73,.12);}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v3-primary-kpi small {color:#f4d493!important;}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v3-primary-kpi span {color:#c9dced!important;}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v3-attention {
  background:radial-gradient(ellipse at 100% 1%,rgba(238,180,96,.19),transparent 43%),linear-gradient(145deg,#112f51,#08203d)!important;
  border-inline-start-color:rgba(239,199,116,.38)!important;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v3-attention-head strong {color:#fff!important;text-shadow:0 3px 18px rgba(0,0,0,.15);}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v3-attention p {color:#c2d4e9!important;line-height:1.62;}
/* KPI row: better visibility and equal visual weight, no invented metrics. */
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v6-signal-deck {
  margin-bottom:24px!important;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v6-critical-signal {
  border-color:rgba(255,119,143,.53)!important;
  box-shadow:0 12px 30px rgba(36,5,25,.28),inset 0 1px 0 rgba(255,214,225,.065)!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-card {
  box-shadow:0 10px 24px rgba(0,8,22,.27),inset 0 1px 0 rgba(237,246,255,.06)!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-value strong {
  font-size:clamp(36px,3vw,50px)!important;line-height:1.04;color:#f7fbff!important;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v6-critical-value strong {font-size:clamp(53px,4vw,67px)!important;color:#ff909d!important;}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v6-signal-rail .thrs-main-dashboard__stat-title {
  font-size:11px!important;color:#d9e7f5!important;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v6-signal-rail .thrs-main-dashboard__stat-subtitle {font-size:10px!important;color:#bccfe3!important;}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__stat-icon {
  box-shadow:inset 0 1px 0 rgba(251,255,255,.12),0 3px 12px rgba(0,8,25,.15);
}
/* Charts frame: two inset panels with real color separation. */
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v6-intelligence {
  background:linear-gradient(137deg,#0c2d51,#092140)!important;
  border-color:rgba(241,196,100,.57)!important;
  box-shadow:var(--thrs-v3-elev)!important;
  margin-block-end:24px;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v6-section-intro {
  background:linear-gradient(90deg,rgba(25,69,108,.24),rgba(9,35,66,.06));
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v6-section-intro h2 {
  font-size:clamp(26px,2.05vw,34px)!important;color:#f8fbff!important;line-height:1.18;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v6-intelligence-canvas > .thrs-main-dashboard__panel {
  background:linear-gradient(150deg,rgba(7,34,66,.70),rgba(7,27,51,.76))!important;
  box-shadow:inset 0 1px 0 rgba(182,219,247,.07)!important;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v6-intelligence-canvas > .thrs-main-dashboard__panel + .thrs-main-dashboard__panel {
  border-inline-start:1px solid rgba(178,210,243,.20)!important;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__chart-wrap canvas,
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__department-chart canvas {
  filter:brightness(1.07) saturate(1.09);
}
/* Decision queue: more compact top, three visible summary tiles. */
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v6-decision-console {
  background:radial-gradient(ellipse at 97% 0%,rgba(218,168,80,.11),transparent 40%),linear-gradient(128deg,#103458,#092545 69%,#09213e)!important;
  border-color:rgba(238,195,110,.52)!important;
  box-shadow:var(--thrs-v3-elev)!important;
  margin-block-end:24px;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v6-decision-heading {
  margin-bottom:15px!important;
  max-width:none;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v6-decision-heading h2 {
  font-size:clamp(29px,2.12vw,37px);
  line-height:1.16;margin-block:5px 5px;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v6-decision-heading p {color:#c9daed!important;font-size:11.5px!important;}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v7-decision-tools button {
  color:#d8e8f8!important;background:rgba(36,83,124,.46)!important;
  border:1px solid rgba(161,201,238,.22)!important;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v6-decision-summary {
  gap:11px!important;border:0!important;margin-bottom:17px!important;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v6-decision-summary > div {
  min-height:84px;
  background:linear-gradient(135deg,rgba(24,65,107,.70),rgba(11,39,76,.77))!important;
  border:1px solid rgba(150,193,233,.32)!important;
  border-radius:11px!important;
  box-shadow:inset 0 1px 0 rgba(239,248,255,.065);
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v6-decision-summary small {color:#c8dcf0!important;font-size:9px!important;}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v6-decision-summary strong {font-size:29px!important;}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v6-decision-console .thrs-main-dashboard__panel-header h2 {color:#fff!important;}
/* Business Pulse: add breathing room and useful hierarchy. */
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v6-business-pulse {
  background:linear-gradient(140deg,#0d2c4d,#08203e)!important;
  border-color:rgba(240,193,103,.59)!important;
  box-shadow:var(--thrs-v3-elev),0 0 19px rgba(220,169,83,.075)!important;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v6-business-head h2 {
  font-size:clamp(27px,2vw,36px)!important;
  line-height:1.2;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v6-business-status {
  border-color:rgba(165,212,252,.27)!important;
  background:rgba(14,43,79,.86)!important;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v6-business-grid .thrs-integration-widget__unavailable {
  background:linear-gradient(139deg,#1b3c61,#122e52)!important;
  border:1px solid rgba(135,184,233,.30)!important;
  color:#f4f9ff!important;
}
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v6-business-grid .thrs-integration-widget__subtitle {color:#c8d9eb!important;}
/* A consistent keyboard highlight across all real buttons, not screenshot-only icons. */
:is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard :is(a,button,input,select,[role="tab"]):focus-visible {
  outline:2px solid #f9d787!important;
  outline-offset:3px;
}
/* Target is desktop-inspired but responsive, never introduce horizontal overflow. */
@media (max-width:1050px) {
  :is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 .thrs-main-dashboard__page-header {
    min-height:132px;
    padding:21px 23px;
  }
  :is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v6-decision-heading h2 {
    font-size:clamp(25px,3vw,34px);
  }
}
@media (max-width:760px) {
  :is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 .thrs-main-dashboard__page-header {
    min-height:0;
    padding:19px 17px;
  }
  :is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 .thrs-main-dashboard__page-header::before,
  :is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 .thrs-main-dashboard__page-header::after {
    opacity:.18;
  }
  :is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard--v7 .thrs-main-dashboard__page-heading h1 {
    font-size:clamp(27px,7vw,38px);
  }
  :is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v6-decision-summary {
    gap:7px!important;
  }
  :is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v6-decision-summary > div {min-height:70px;padding:12px 13px;}
}
@media (max-width:520px) {
  :is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard__v6-decision-summary {grid-template-columns:1fr!important;}
}
@media (prefers-reduced-motion:reduce) {
  :is(html[data-theme="dark"],html.dark,body.dark-mode) .thrs-shell .thrs-main-dashboard :is(.thrs-main-dashboard__v6-command-deck,.thrs-main-dashboard__v6-intelligence,.thrs-main-dashboard__v6-decision-console,.thrs-main-dashboard__v6-business-pulse,.thrs-main-dashboard__stat-card) {
    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 :is(a,button,input,select):focus-visible {outline:2px solid Highlight!important;}
}
