/* THRS V14.1 — Premium Visual Language & Cross-Theme Upgrade
 * Scoped to ExecutiveDashboard plus its active header/sidebar.
 * Real data and all authorization/interaction paths untouched.
 * One self-contained theme-aware layer, intentionally no bitmap additions.
 */
html[data-theme="light"]:has(.thrs-main-dashboard--v7-1) {
  --v14-page:#edf3f9;
  --v14-page-high:#f8fafe;
  --v14-panel:#fffefa;
  --v14-card:#ffffff;
  --v14-panel-soft:#f4f7fc;
  --v14-ink:#122c48;
  --v14-muted:#526b85;
  --v14-line:#d2dce8;
  --v14-gold:#9a6b25;
  --v14-gold-soft:#f9edda;
  --v14-focus:#b58137;
  --v14-elevation:0 13px 38px rgba(15,42,70,.09);
  --v14-elevation-hover:0 19px 44px rgba(15,42,70,.15);
  --v14-surface-shadow:0 5px 18px rgba(15,42,70,.055);
}
html[data-theme="dark"]:has(.thrs-main-dashboard--v7-1) {
  --v14-page:#071525;
  --v14-page-high:#0e2136;
  --v14-panel:#102940;
  --v14-card:#163651;
  --v14-panel-soft:#1b3954;
  --v14-ink:#f2f7ff;
  --v14-muted:#bfd1e5;
  --v14-line:#486783;
  --v14-gold:#f5d38b;
  --v14-gold-soft:#3a342b;
  --v14-focus:#eac478;
  --v14-elevation:0 14px 38px rgba(0,0,0,.30);
  --v14-elevation-hover:0 19px 44px rgba(0,0,0,.39);
  --v14-surface-shadow:0 8px 22px rgba(0,0,0,.17);
}

/* Global chrome for this executive screen only. */
html[data-theme="light"]:has(.thrs-main-dashboard--v7-1) .thrs-main-shell {
  background:
    radial-gradient(circle at 91% 2%,rgba(212,174,107,.13),transparent 26%),
    linear-gradient(180deg,#f3f7fc 0%,#eaf1f9 56%,#f4f7fb 100%) !important;
}
html[data-theme="dark"]:has(.thrs-main-dashboard--v7-1) .thrs-main-shell {
  background:
    radial-gradient(circle at 91% 1%,rgba(202,153,63,.095),transparent 29%),
    linear-gradient(180deg,#081726 0%,#071422 59%,#0b1c2d 100%) !important;
}
html[data-theme="light"]:has(.thrs-main-dashboard--v7-1) .thrs-header {
  background:rgba(250,252,255,.97) !important;
  border-bottom:1px solid #dbe4ee !important;
  box-shadow:0 5px 24px rgba(16,40,70,.055) !important;
}
html[data-theme="dark"]:has(.thrs-main-dashboard--v7-1) .thrs-header {
  background:rgba(14,34,55,.98) !important;
  border-bottom:1px solid #34516f !important;
  box-shadow:0 5px 24px rgba(0,0,0,.22) !important;
}
html[data-theme]:has(.thrs-main-dashboard--v7-1) .thrs-header-brand h1 {
  letter-spacing:-.015em !important;
  font-weight:850 !important;
}
html[data-theme]:has(.thrs-main-dashboard--v7-1) .thrs-exec-search__input-wrap {
  min-height:44px;
  border-radius:14px;
  transition:border-color .2s ease,box-shadow .2s ease,background .2s ease;
}
html[data-theme="light"]:has(.thrs-main-dashboard--v7-1) .thrs-exec-search__input-wrap {
  background:#fff !important;
  border:1px solid #ccd8e5 !important;
  box-shadow:0 5px 14px rgba(10,37,66,.055) !important;
}
html[data-theme="dark"]:has(.thrs-main-dashboard--v7-1) .thrs-exec-search__input-wrap {
  background:#173651 !important;
  border:1px solid #50718f !important;
  box-shadow:0 5px 14px rgba(0,0,0,.19) !important;
}
html[data-theme]:has(.thrs-main-dashboard--v7-1) .thrs-exec-search:focus-within .thrs-exec-search__input-wrap {
  border-color:var(--v14-focus) !important;
  box-shadow:0 0 0 3px rgba(204,161,85,.17),var(--v14-surface-shadow) !important;
}
html[data-theme="light"]:has(.thrs-main-dashboard--v7-1) .thrs-sidebar {
  background:linear-gradient(180deg,#0b2b49,#081e36 54%,#051425) !important;
}
html[data-theme="dark"]:has(.thrs-main-dashboard--v7-1) .thrs-sidebar {
  background:linear-gradient(180deg,#06182c,#061425 54%,#030d1b) !important;
}
html[data-theme]:has(.thrs-main-dashboard--v7-1) .thrs-sidebar-link {
  border-radius:12px !important;
  transition:background-color .2s ease,transform .2s ease,box-shadow .2s ease;
}
html[data-theme]:has(.thrs-main-dashboard--v7-1) .thrs-sidebar-link:not(.sidebar-active-link):hover {
  background:rgba(140,180,219,.13) !important;
  color:#fff !important;
  transform:translateX(2px);
}
html[dir="rtl"][data-theme]:has(.thrs-main-dashboard--v7-1) .thrs-sidebar-link:not(.sidebar-active-link):hover {
  transform:translateX(-2px);
}
html[data-theme]:has(.thrs-main-dashboard--v7-1) .thrs-sidebar-link.sidebar-active-link {
  background:linear-gradient(110deg,#f5d991,#c99642) !important;
  border:1px solid #ffe5ae !important;
  color:#061a2f !important;
  box-shadow:0 5px 20px rgba(207,158,69,.28) !important;
}
html[data-theme]:has(.thrs-main-dashboard--v7-1) .thrs-sidebar-link.sidebar-active-link .thrs-sidebar-link-label {
  color:#061a2f !important;
}
html[data-theme]:has(.thrs-main-dashboard--v7-1) .thrs-sidebar-section-label {
  color:#c7d7e9 !important;
  letter-spacing:.065em !important;
}

/* The Executive Dashboard controls all its accent, surface and text tokens here. */
html[data-theme]:has(.thrs-main-dashboard--v7-1) .thrs-main-dashboard--v7-1 {
  --sig-ink:var(--v14-ink);
  --sig-muted:var(--v14-muted);
  --sig-surface:var(--v14-card);
  --sig-soft:var(--v14-panel-soft);
  --sig-hairline:var(--v14-line);
  --sig-accent:var(--v14-gold);
  --sig-shadow:var(--v14-elevation);
  color:var(--v14-ink) !important;
  font-family:Inter,"IBM Plex Sans Arabic","Tajawal",system-ui,sans-serif;
}
html[data-theme]:has(.thrs-main-dashboard--v7-1) .thrs-main-dashboard--v7-1 :where(button,a,input,select,textarea):focus-visible {
  outline:3px solid var(--v14-focus) !important;
  outline-offset:3px !important;
}

/* Signature hero keeps the high-resolution image; gradient/contrast tuned for each mode. */
html[data-theme="light"]:has(.thrs-main-dashboard--v7-1) .thrs-main-dashboard__page-header {
  border:1px solid rgba(220,179,107,.61) !important;
  box-shadow:0 22px 47px rgba(13,45,78,.23) !important;
}
html[data-theme="dark"]:has(.thrs-main-dashboard--v7-1) .thrs-main-dashboard__page-header {
  border:1px solid rgba(234,194,123,.35) !important;
  box-shadow:0 21px 49px rgba(0,0,0,.46) !important;
}
html[data-theme="light"]:has(.thrs-main-dashboard--v7-1) .thrs-main-dashboard__page-header::before {
  background-image:linear-gradient(90deg,#071e35f0 0%,#09243be3 35%,#0a274262 65%,#071a2c16 100%),url('/thrs-executive-hero-v12.webp') !important;
}
html[data-theme="dark"]:has(.thrs-main-dashboard--v7-1) .thrs-main-dashboard__page-header::before {
  background-image:linear-gradient(90deg,#041326f7 0%,#06172bf2 39%,#071b3378 68%,#071b303f 100%),url('/thrs-executive-hero-v12.webp') !important;
}
html[data-theme]:has(.thrs-main-dashboard--v7-1) .thrs-main-dashboard__page-heading > h1 {
  color:#fff !important;
  font-weight:870 !important;
  text-shadow:0 5px 19px rgba(0,10,22,.48);
}
html[data-theme]:has(.thrs-main-dashboard--v7-1) .thrs-main-dashboard__customize {
  min-height:47px !important;
  padding-inline:18px !important;
  border-radius:13px !important;
  background:rgba(9,35,57,.88) !important;
  border:1px solid rgba(244,209,141,.68) !important;
  color:#f9e4b5 !important;
  transition:transform .2s ease,box-shadow .2s ease,background .2s ease;
}
html[data-theme]:has(.thrs-main-dashboard--v7-1) .thrs-main-dashboard__customize:hover {
  background:#164a6b !important;
  box-shadow:0 13px 25px rgba(1,13,30,.3) !important;
  transform:translateY(-1px);
}

/* Floating attendance toolbar — bright but restrained in Light, steel navy in Dark. */
html[data-theme="light"] .thrs-main-dashboard--v7-1 > .thrs-main-dashboard__v7-1-datebar {
  background:rgba(255,255,255,.99) !important;
  border:1px solid #d2deeb !important;
  color:#1a3656 !important;
  box-shadow:0 12px 32px rgba(13,42,74,.12) !important;
}
html[data-theme="dark"] .thrs-main-dashboard--v7-1 > .thrs-main-dashboard__v7-1-datebar {
  background:#17344e !important;
  border:1px solid #55728f !important;
  color:#f4f8ff !important;
  box-shadow:0 12px 32px rgba(0,0,0,.31) !important;
}
html[data-theme]:has(.thrs-main-dashboard--v7-1) .thrs-main-dashboard__v7-1-date-nav label,
html[data-theme]:has(.thrs-main-dashboard--v7-1) .thrs-main-dashboard__v7-1-presets button {
  border-radius:11px !important;
}
html[data-theme]:has(.thrs-main-dashboard--v7-1) .thrs-main-dashboard__v7-1-presets button:is(:hover,.is-active) {
  border-color:var(--v14-focus) !important;
}
html[data-theme]:has(.thrs-main-dashboard--v7-1) .thrs-main-dashboard__v7-1-presets button.is-active {
  color:#081f35 !important;
  background:linear-gradient(125deg,#fee6ae,#dcb05a) !important;
  box-shadow:0 4px 12px rgba(151,100,30,.17) !important;
}
html[data-theme="dark"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v7-1-source :is(small,strong),
html[data-theme="dark"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v7-1-coverage :is(span,strong) {
  color:#e5eefb !important;
}

/* Data source warning — never make unapproved data appear as verified absences. */
html[data-theme="light"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v7-1-no-data {
  background:linear-gradient(115deg,#fff5e7,#fffaf3) !important;
  border:1px solid #dfbd87 !important;
  border-inline-start:5px solid #ae742c !important;
  box-shadow:0 9px 23px rgba(114,74,25,.07) !important;
}
html[data-theme="dark"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v7-1-no-data {
  background:linear-gradient(110deg,#453324,#202c40) !important;
  border:1px solid #a87d4e !important;
  border-inline-start:5px solid #e4b56b !important;
  box-shadow:0 9px 23px rgba(0,0,0,.18) !important;
}
html[data-theme="light"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v7-1-no-data strong {
  color:#492a12 !important;
}
html[data-theme="dark"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v7-1-no-data strong {
  color:#ffedcc !important;
}
html[data-theme="light"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v7-1-no-data small {
  color:#77573c !important;
}
html[data-theme="dark"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v7-1-no-data small {
  color:#e6cfb0 !important;
}

/* Briefing becomes a clear control dock in both palettes. */
html[data-theme="light"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v7-briefing {
  background:linear-gradient(113deg,#fffefa,#f2f6fc) !important;
  border:1px solid #d7e0eb !important;
  box-shadow:var(--v14-elevation) !important;
}
html[data-theme="dark"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v7-briefing {
  background:linear-gradient(113deg,#183750,#102941) !important;
  border:1px solid #486d8a !important;
  box-shadow:var(--v14-elevation) !important;
}
html[data-theme="light"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v7-briefing-copy > strong {
  color:#183652 !important;
}
html[data-theme="dark"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v7-briefing-copy > strong {
  color:#f4f8ff !important;
}
html[data-theme="light"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v7-briefing-copy > small {
  color:#526b85 !important;
}
html[data-theme="dark"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v7-briefing-copy > small {
  color:#c1d1e4 !important;
}
html[data-theme="dark"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v7-health-copy :is(strong,small) {
  color:#f1f5fc !important;
}
html[data-theme="light"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v7-focus-nav {
  background:#edf3fb !important;
  border:1px solid #d2e0ee !important;
}
html[data-theme="dark"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v7-focus-nav {
  background:#0e2740 !important;
  border:1px solid #486985 !important;
}
html[data-theme="light"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v7-focus-nav button {
  color:#34516b !important;
}
html[data-theme="dark"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v7-focus-nav button {
  color:#d9e7f6 !important;
}
html[data-theme="light"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v7-focus-nav button.is-active {
  color:#fff !important;background:#173e5f !important;
}
html[data-theme="dark"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v7-focus-nav button.is-active {
  color:#091c30 !important;background:#efcb81 !important;
}
html[data-theme]:has(.thrs-main-dashboard--v7-1) .thrs-main-dashboard__v7-command-button {
  min-height:46px !important;
  background:#102e49 !important;
  color:#fff !important;
  border:1px solid #bd9152 !important;
  border-radius:12px !important;
}

/* Executive command: well-defined gold/blue hierarchy, no mixed light text. */
html[data-theme]:has(.thrs-main-dashboard--v7-1) .thrs-main-dashboard__v6-command-main {
  border:1px solid rgba(136,172,199,.38) !important;
  box-shadow:var(--v14-elevation) !important;
}
html[data-theme="light"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v6-command-main {
  background:radial-gradient(circle at 77% 20%,rgba(63,120,168,.31),transparent 36%),linear-gradient(132deg,#194976,#09263f) !important;
}
html[data-theme="dark"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v6-command-main {
  background:radial-gradient(circle at 77% 20%,rgba(44,100,154,.32),transparent 35%),linear-gradient(132deg,#0f3759,#061a30) !important;
}
html[data-theme="light"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v3-attention {
  background:radial-gradient(circle at 94% 4%,rgba(218,157,62,.22),transparent 43%),linear-gradient(135deg,#173d5c,#09263d) !important;
}
html[data-theme="dark"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v3-attention {
  background:radial-gradient(circle at 94% 4%,rgba(219,164,68,.13),transparent 43%),linear-gradient(135deg,#102e48,#061a2f) !important;
}
html[data-theme]:has(.thrs-main-dashboard--v7-1) .thrs-main-dashboard__v3-attention {
  box-shadow:var(--v14-elevation) !important;
  border:1px solid rgba(216,175,107,.6) !important;
}
html[data-theme]:has(.thrs-main-dashboard--v7-1) .thrs-main-dashboard__v3-primary-kpi strong {
  letter-spacing:-.035em;
  font-variant-numeric:tabular-nums;
}

/* KPI cards: actual Light/Dark product card surfaces and distinct accents. */
html[data-theme="light"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v6-critical-signal {
  background:linear-gradient(145deg,#fffdfb,#fff2ed) !important;
  border:1px solid #e7c5ba !important;
  box-shadow:var(--v14-elevation) !important;
}
html[data-theme="dark"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v6-critical-signal {
  background:linear-gradient(145deg,#332e34,#1a2e43) !important;
  border:1px solid #9b7178 !important;
  box-shadow:var(--v14-elevation) !important;
}
html[data-theme="light"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v6-signal-rail > .thrs-main-dashboard__stat-card {
  background:linear-gradient(142deg,#ffffff,#f2f7fd) !important;
  border:1px solid #d0ddea !important;
  box-shadow:var(--v14-elevation) !important;
}
html[data-theme="dark"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v6-signal-rail > .thrs-main-dashboard__stat-card {
  background:linear-gradient(142deg,#183852,#102b44) !important;
  border:1px solid #4f708d !important;
  box-shadow:var(--v14-elevation) !important;
}
html[data-theme="light"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v6-signal-rail .thrs-main-dashboard__stat-title {
  color:#3c5772 !important;
}
html[data-theme="dark"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v6-signal-rail .thrs-main-dashboard__stat-title {
  color:#d1dfed !important;
}
html[data-theme="light"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v6-signal-rail .thrs-main-dashboard__stat-value strong {
  color:#102d4e !important;
}
html[data-theme="dark"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v6-signal-rail .thrs-main-dashboard__stat-value strong {
  color:#f3f8ff !important;
}
html[data-theme]:has(.thrs-main-dashboard--v7-1) .thrs-main-dashboard__v6-signal-rail > .thrs-main-dashboard__stat-card {
  transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease;
}
@media (hover:hover) and (pointer:fine) {
  html[data-theme]:has(.thrs-main-dashboard--v7-1) .thrs-main-dashboard__v6-signal-rail > .thrs-main-dashboard__stat-card:hover {
    transform:translateY(-3px);
    box-shadow:var(--v14-elevation-hover) !important;
    border-color:var(--v14-focus) !important;
  }
}

/* Workforce intelligence: title and panel surfaces remain high contrast in both themes.
   Do NOT globally recolor Chart.js data: existing chart colors are data-driven. */
html[data-theme="light"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v6-section-intro h2 {
  color:#132e4b !important;
}
html[data-theme="dark"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v6-section-intro h2 {
  color:#edf5ff !important;
}
html[data-theme="light"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v6-intelligence-facts > span {
  background:#fff !important;
  border:1px solid #d6e1ed !important;
  color:#36516b !important;
}
html[data-theme="dark"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v6-intelligence-facts > span {
  background:#142d45 !important;
  border:1px solid #54718b !important;
  color:#e1ebf6 !important;
}
html[data-theme="light"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v6-intelligence-canvas > .thrs-main-dashboard__panel {
  background:radial-gradient(circle at 96% 2%,rgba(70,125,168,.22),transparent 37%),linear-gradient(145deg,#1d4466,#0a2540) !important;
  border:1px solid #7694b2 !important;
  box-shadow:var(--v14-elevation) !important;
}
html[data-theme="dark"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v6-intelligence-canvas > .thrs-main-dashboard__panel {
  background:radial-gradient(circle at 96% 2%,rgba(50,107,154,.24),transparent 37%),linear-gradient(145deg,#153550,#071b30) !important;
  border:1px solid #557b9b !important;
  box-shadow:var(--v14-elevation) !important;
}
html[data-theme]:has(.thrs-main-dashboard--v7-1) .thrs-main-dashboard__v6-intelligence-canvas .thrs-main-dashboard__panel-header h2 {
  color:#f5f9ff !important;
}
html[data-theme]:has(.thrs-main-dashboard--v7-1) .thrs-main-dashboard__v6-intelligence-canvas > .thrs-main-dashboard__panel::before {
  background:linear-gradient(90deg,#f5d28c,#d7a04d) !important;
}
html[data-theme]:has(.thrs-main-dashboard--v7-1) .thrs-main-dashboard__department-row {
  border-radius:11px !important;
  transition:background .2s ease,border-color .2s ease,transform .2s ease;
}
html[data-theme]:has(.thrs-main-dashboard--v7-1) .thrs-main-dashboard__department-row:is(:hover,.is-selected) {
  background:#2c5878 !important;
  border-color:#e5bc71 !important;
}

/* Decision center: executive-grade surfaces + active keyboard states. */
html[data-theme="light"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v6-decision-console {
  background:radial-gradient(circle at 97% 4%,rgba(196,156,80,.14),transparent 35%),linear-gradient(132deg,#173c5d,#071e35) !important;
  border:1px solid rgba(200,156,82,.5) !important;
  box-shadow:var(--v14-elevation) !important;
}
html[data-theme="dark"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v6-decision-console {
  background:radial-gradient(circle at 97% 4%,rgba(196,156,80,.10),transparent 35%),linear-gradient(132deg,#102d46,#051a2c) !important;
  border:1px solid rgba(207,174,108,.4) !important;
  box-shadow:var(--v14-elevation) !important;
}
html[data-theme]:has(.thrs-main-dashboard--v7-1) .thrs-main-dashboard__v6-decision-summary {
  background:rgba(255,255,255,.062) !important;
  border:1px solid rgba(206,225,244,.22) !important;
  border-radius:15px !important;
}
html[data-theme]:has(.thrs-main-dashboard--v7-1) .thrs-main-dashboard__v6-decision-grid > :is(.thrs-main-dashboard__panel,.thrs-main-dashboard__integration-widget) {
  background:rgba(255,255,255,.062) !important;
  border:1px solid rgba(206,225,244,.21) !important;
  border-radius:17px !important;
}
html[data-theme]:has(.thrs-main-dashboard--v7-1) .thrs-main-dashboard__v6-decision-grid :is(.thrs-main-dashboard__quick-action,.thrs-main-dashboard__approval-item) {
  background:linear-gradient(125deg,#264d70,#183750) !important;
  border:1px solid rgba(168,195,224,.32) !important;
  color:#f7faff !important;
  border-radius:12px !important;
  transition:background .2s ease,border-color .2s ease,transform .2s ease;
}
html[data-theme]:has(.thrs-main-dashboard--v7-1) .thrs-main-dashboard__v6-decision-grid :is(.thrs-main-dashboard__quick-action,.thrs-main-dashboard__approval-item):hover {
  background:linear-gradient(125deg,#326183,#204866) !important;
  border-color:#e8c17c !important;
  transform:translateY(-1px);
}

/* Existing Business Pulse removal remains non-negotiable, regardless of future rules. */
html[data-theme="light"] .thrs-main-dashboard--v7-1 > .thrs-main-dashboard__v6-business-pulse,
html[data-theme="dark"] .thrs-main-dashboard--v7-1 > .thrs-main-dashboard__v6-business-pulse {
  display:none !important;
}

/* Mobile: improve targets, preserve sidebar behavior and avoid horizontal clipping. */
@media(max-width:760px) {
  html[data-theme="light"] .thrs-main-dashboard--v7-1,
  html[data-theme="dark"] .thrs-main-dashboard--v7-1 {
    row-gap:14px !important;
    padding:13px 12px 22px !important;
  }
  html[data-theme]:has(.thrs-main-dashboard--v7-1) .thrs-main-dashboard__page-header {
    border-radius:19px !important;
  }
  html[data-theme="light"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v6-signal-rail,
  html[data-theme="dark"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v6-signal-rail {
    gap:9px !important;
  }
  html[data-theme]:has(.thrs-main-dashboard--v7-1) .thrs-main-dashboard__v6-signal-rail > .thrs-main-dashboard__stat-card {
    padding:14px 12px !important;
  }
  html[data-theme]:has(.thrs-main-dashboard--v7-1) .thrs-main-dashboard__v7-focus-nav button,
  html[data-theme]:has(.thrs-main-dashboard--v7-1) .thrs-main-dashboard__v7-command-button {
    min-height:42px !important;
  }
}
@media(prefers-reduced-motion:reduce) {
  html[data-theme]:has(.thrs-main-dashboard--v7-1) .thrs-main-dashboard--v7-1 :is(button,a,.thrs-main-dashboard__stat-card),
  html[data-theme]:has(.thrs-main-dashboard--v7-1) .thrs-sidebar-link {
    transition:none !important;
    transform:none !important;
  }
}

/* V14.1 verified geometry: no half-hidden Refresh and no overlapping Commands. */
@media(min-width:1281px) {
  html[data-theme="light"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v7-1-datebar,
  html[data-theme="dark"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v7-1-datebar {
    grid-template-columns:max-content minmax(345px,1fr) minmax(145px,auto) minmax(155px,auto) !important;
    column-gap:10px !important;
  }
}
html[data-theme="light"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v7-1-presets,
html[data-theme="dark"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v7-1-presets {
  display:flex !important;
  align-items:center !important;
  gap:5px !important;
  min-width:0;
}
html[data-theme="light"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v7-focus-nav,
html[data-theme="dark"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v7-focus-nav {
  display:flex !important;
  gap:3px !important;
  min-width:0 !important;
  max-width:100% !important;
}
html[data-theme="light"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v7-focus-nav button,
html[data-theme="dark"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v7-focus-nav button {
  min-width:0 !important;
  flex:1 1 0 !important;
  padding-inline:8px !important;
  white-space:nowrap !important;
}
/* Business Pulse was explicitly removed in V13.1. Hide its orphan focus tab
   but keep the three remaining focus actions functional. */
html[data-theme="light"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v7-focus-nav button:last-child,
html[data-theme="dark"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v7-focus-nav button:last-child {
  display:none !important;
}
@media(max-width:760px) {
  html[data-theme="light"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v7-1-presets,
  html[data-theme="dark"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v7-1-presets {
    flex-wrap:wrap !important;
    overflow:visible !important;
    gap:7px !important;
  }
  html[data-theme="light"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v7-1-presets button,
  html[data-theme="dark"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v7-1-presets button {
    flex:0 0 auto !important;
    min-height:40px !important;
    white-space:nowrap !important;
  }
}
/* Visible control fallback: font swaps must never crop Refresh. */
@media(min-width:761px) {
  html[data-theme="light"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v7-1-presets,
  html[data-theme="dark"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v7-1-presets {
    flex-wrap:wrap !important;
    overflow:visible !important;
    align-content:center !important;
    row-gap:6px !important;
  }
  html[data-theme="light"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v7-1-presets > button,
  html[data-theme="dark"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v7-1-presets > button {
    flex:0 0 auto !important;
    min-height:38px !important;
    white-space:nowrap !important;
  }
}
/* Design rhythm for the two executive decks (without changing their order). */
html[data-theme="light"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v6-command-deck,
html[data-theme="dark"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v6-command-deck {
  gap:17px !important;
}
html[data-theme="light"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v6-signal-deck,
html[data-theme="dark"] .thrs-main-dashboard--v7-1 .thrs-main-dashboard__v6-signal-deck {
  gap:15px !important;
}
