/*
 * Modern Dark — global dark theme for the stock system.
 * The whole file is gated by data-table-theme="dark" so the existing light
 * presentation remains byte-for-byte unchanged.
 */
html[data-table-theme='dark'] {
  color-scheme: dark;
  --modern-dark-deep: #020203;
  --modern-dark-base: #050506;
  --modern-dark-elevated: #0a0a0c;
  --modern-dark-input: #0f0f12;
  --modern-dark-surface: rgba(255, 255, 255, .05);
  --modern-dark-surface-strong: rgba(255, 255, 255, .075);
  --modern-dark-surface-hover: rgba(255, 255, 255, .08);
  --modern-dark-foreground: #ededf0;
  --modern-dark-muted: #8a8f98;
  --modern-dark-subtle: rgba(255, 255, 255, .6);
  --modern-dark-accent: #5e6ad2;
  /* Keep white labels at WCAG AA contrast while hover feedback comes from the glow. */
  --modern-dark-accent-bright: #5e6ad2;
  --modern-dark-accent-soft: rgba(94, 106, 210, .16);
  --modern-dark-accent-glow: rgba(94, 106, 210, .3);
  --modern-dark-border: rgba(255, 255, 255, .06);
  --modern-dark-border-hover: rgba(255, 255, 255, .11);
  --modern-dark-border-accent: rgba(94, 106, 210, .3);
  --modern-dark-shadow: 0 0 0 1px rgba(255, 255, 255, .045), 0 2px 20px rgba(0, 0, 0, .4), 0 0 40px rgba(0, 0, 0, .2);
  --modern-dark-shadow-hover: 0 0 0 1px rgba(255, 255, 255, .09), 0 8px 40px rgba(0, 0, 0, .5), 0 0 70px rgba(94, 106, 210, .1);
  --modern-dark-ease: cubic-bezier(.16, 1, .3, 1);

  --rhea-background: #050506;
  --rhea-foreground: #ededf0;
  --rhea-card: #0a0a0c;
  --rhea-card-foreground: #ededf0;
  --rhea-popover: #0a0a0c;
  --rhea-popover-foreground: #ededf0;
  --rhea-primary: #5e6ad2;
  --rhea-primary-foreground: #fff;
  --rhea-secondary: rgba(255, 255, 255, .055);
  --rhea-secondary-foreground: #ededf0;
  --rhea-muted: rgba(255, 255, 255, .045);
  --rhea-muted-foreground: #8a8f98;
  --rhea-accent: rgba(94, 106, 210, .16);
  --rhea-accent-foreground: #dfe2ff;
  --rhea-border: rgba(255, 255, 255, .075);
  --rhea-input: rgba(255, 255, 255, .1);
  --rhea-ring: #6872d9;
  --rhea-sidebar: #08080a;
  --rhea-sidebar-foreground: #ededf0;
  --rhea-sidebar-primary: #5e6ad2;
  --rhea-sidebar-accent: rgba(94, 106, 210, .16);
  --rhea-sidebar-accent-foreground: #dfe2ff;
  --rhea-sidebar-border: rgba(255, 255, 255, .06);
  --rhea-sidebar-ring: #6872d9;

  --button-primary: #5e6ad2;
  --button-primary-hover: #6872d9;
  --button-primary-foreground: #fff;
  --button-primary-light: #9ba3f4;
  --button-secondary: rgba(255, 255, 255, .055);
  --button-secondary-hover: rgba(255, 255, 255, .09);
  --button-secondary-foreground: #ededf0;
  --button-border: rgba(255, 255, 255, .09);
  --button-focus: rgba(94, 106, 210, .38);

  --el-color-white: #ededf0;
  --el-color-black: #020203;
  --el-color-primary: #5e6ad2;
  --el-color-primary-rgb: 94, 106, 210;
  --el-color-primary-light-3: #7c86df;
  --el-color-primary-light-5: #9ba3e8;
  --el-color-primary-light-7: rgba(94, 106, 210, .36);
  --el-color-primary-light-8: rgba(94, 106, 210, .24);
  --el-color-primary-light-9: rgba(94, 106, 210, .14);
  --el-color-primary-dark-2: #4d58bc;
  --el-bg-color: #0a0a0c;
  --el-bg-color-page: #050506;
  --el-bg-color-overlay: #0d0d10;
  --el-fill-color: rgba(255, 255, 255, .06);
  --el-fill-color-light: rgba(255, 255, 255, .045);
  --el-fill-color-lighter: rgba(255, 255, 255, .032);
  --el-fill-color-extra-light: rgba(255, 255, 255, .02);
  --el-fill-color-dark: rgba(255, 255, 255, .085);
  --el-fill-color-darker: rgba(255, 255, 255, .11);
  --el-fill-color-blank: #0a0a0c;
  --el-text-color-primary: #ededf0;
  --el-text-color-regular: #b8bbc3;
  --el-text-color-secondary: #8a8f98;
  --el-text-color-placeholder: #666b75;
  --el-text-color-disabled: #50545d;
  --el-border-color: rgba(255, 255, 255, .09);
  --el-border-color-light: rgba(255, 255, 255, .075);
  --el-border-color-lighter: rgba(255, 255, 255, .055);
  --el-border-color-extra-light: rgba(255, 255, 255, .035);
  --el-border-color-dark: rgba(255, 255, 255, .12);
  --el-border-color-darker: rgba(255, 255, 255, .16);
  --el-border-color-hover: rgba(255, 255, 255, .2);
  --el-disabled-bg-color: rgba(255, 255, 255, .025);
  --el-disabled-border-color: rgba(255, 255, 255, .045);
  --el-disabled-text-color: #565a64;
  --el-mask-color: rgba(2, 2, 3, .88);
  --el-mask-color-extra-light: rgba(2, 2, 3, .62);
  --el-box-shadow: 0 12px 38px rgba(0, 0, 0, .48), 0 0 0 1px rgba(255, 255, 255, .04);
  --el-box-shadow-light: 0 10px 30px rgba(0, 0, 0, .42), 0 0 0 1px rgba(255, 255, 255, .05);
  --el-box-shadow-lighter: 0 6px 18px rgba(0, 0, 0, .34);
  --el-box-shadow-dark: 0 20px 60px rgba(0, 0, 0, .62), 0 0 80px rgba(94, 106, 210, .08);

  --main-nav-ink: #ededf0;
  --main-nav-muted: #8a8f98;
  --main-nav-accent: #9ba3f4;
  --main-nav-glass: rgba(10, 10, 12, .72);
  --main-nav-line: rgba(255, 255, 255, .08);
  --app-table-header-bg: rgba(255, 255, 255, .045);
  --app-table-header-hover-bg: rgba(94, 106, 210, .12);
  --app-table-header-text: #a7abb4;
  --app-table-header-border: rgba(255, 255, 255, .06);
  --app-table-header-icon: #666b75;
  --app-table-header-active: #9ba3f4;
  --table-surface: rgba(10, 10, 12, .86);
  --table-surface-muted: rgba(255, 255, 255, .045);
  --table-line: rgba(255, 255, 255, .065);
  --table-ink: #d9dbe1;
  --table-muted: #8a8f98;
  --table-accent: #6872d9;
  --table-accent-soft: rgba(94, 106, 210, .14);
  --table-accent-strong: #9ba3f4;

  --stock-canvas: transparent;
  --stock-surface: rgba(10, 10, 12, .78);
  --stock-surface-soft: rgba(255, 255, 255, .035);
  --stock-line: rgba(255, 255, 255, .065);
  --stock-ink: #ededf0;
  --stock-muted: #8a8f98;
  --technical-ink: #ededf0;
  --technical-muted: #8a8f98;
  --technical-line: rgba(255, 255, 255, .065);
  --technical-surface: rgba(10, 10, 12, .84);
  --technical-soft: rgba(255, 255, 255, .04);

  --bt-ink: #ededf0;
  --bt-muted: #8a8f98;
  --bt-line: rgba(255, 255, 255, .065);
  --bt-soft: rgba(255, 255, 255, .04);
  --bt-green: #5e6ad2;
  --bt-green-dark: #9ba3f4;
  --bt-shadow: var(--modern-dark-shadow);
  --calendar-ink: #ededf0;
  --calendar-muted: #8a8f98;
  --calendar-line: rgba(255, 255, 255, .065);
  --calendar-soft: rgba(255, 255, 255, .04);
  --calendar-blue: #6872d9;
  --calendar-green: #63d69d;
  --calendar-amber: #e9c77c;
  --calendar-red: #ff8b8b;
  --calendar-focus: rgba(94, 106, 210, .32);
  --fo-ink: #ededf0;
  --fo-muted: #8a8f98;
  --fo-line: rgba(255, 255, 255, .065);
  --fo-soft: rgba(255, 255, 255, .04);
  --fo-green: #5e6ad2;
  --fo-green-dark: #9ba3f4;
  --fo-shadow: var(--modern-dark-shadow);
  --indigo: #b8bdff;
  --indigo-2: #9ba3f4;
  --purple: #7c86df;
  --purple-soft: rgba(94, 106, 210, .14);
  --cyan-soft: rgba(50, 178, 190, .12);
  --coral-soft: rgba(199, 86, 74, .12);
  --green-soft: rgba(40, 120, 92, .14);
  --navy: #b8bdff;
  --navy-2: #9ba3f4;
  --teal-soft: rgba(22, 122, 114, .14);
  --ink: #ededf0;
  --muted: #8a8f98;
  --line: rgba(255, 255, 255, .065);
  --surface: rgba(10, 10, 12, .82);
  --surface-soft: rgba(255, 255, 255, .04);
  --bg: #050506;
  --card: rgba(10, 10, 12, .82);
  --text: #ededf0;
  --brand: #6872d9;
  --line-strong: rgba(255, 255, 255, .11);
  --canvas: transparent;
  --shadow: var(--modern-dark-shadow);
  --focus: rgba(94, 106, 210, .34);
}

/* Layered near-black canvas: radial depth, ambient light pools and a 64px grid. */
html[data-table-theme='dark'],
html[data-table-theme='dark'] body,
html[data-table-theme='dark'] #app {
  background-color: var(--modern-dark-base);
  color: var(--modern-dark-foreground);
}

html[data-table-theme='dark'] body {
  background-image:
    linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px),
    radial-gradient(ellipse 70% 52% at 50% -12%, rgba(94, 106, 210, .24), transparent 68%),
    radial-gradient(ellipse 45% 52% at -8% 42%, rgba(123, 73, 163, .12), transparent 70%),
    radial-gradient(ellipse 40% 45% at 108% 26%, rgba(55, 92, 174, .11), transparent 72%),
    radial-gradient(ellipse at top, #0a0a0f 0%, #050506 52%, #020203 100%);
  background-attachment: fixed;
  background-size: 64px 64px, 64px 64px, auto, auto, auto, auto;
}

html[data-table-theme='dark'] body::before,
html[data-table-theme='dark'] body::after {
  position: fixed;
  z-index: 0;
  width: min(72vw, 1100px);
  height: min(72vw, 900px);
  border-radius: 50%;
  content: '';
  pointer-events: none;
  filter: blur(145px);
  opacity: .12;
  will-change: transform;
}

html[data-table-theme='dark'] body::before {
  top: -48%;
  left: 12%;
  background: #5e6ad2;
  animation: modern-dark-float 10s ease-in-out infinite;
}

html[data-table-theme='dark'] body::after {
  right: -30%;
  bottom: -54%;
  background: #3d4ca5;
  animation: modern-dark-float 9s ease-in-out -4s infinite reverse;
}

html[data-table-theme='dark'] body > #app {
  position: relative;
  z-index: 1;
}

@keyframes modern-dark-float {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0); }
  50% { transform: translate3d(0, -20px, 0) rotate(1deg); }
}

/* Main application and floating navigation. */
html[data-table-theme='dark'] body .main-layout,
html[data-table-theme='dark'] body .content-area,
html[data-table-theme='dark'] body .page-content,
html[data-table-theme='dark'] body .placeholder-content {
  background: transparent !important;
  color: var(--modern-dark-foreground);
}

html[data-table-theme='dark'] body .header {
  border-color: var(--modern-dark-border-hover);
  background: rgba(10, 10, 12, .76) !important;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .035), 0 15px 45px rgba(0, 0, 0, .42), 0 0 70px rgba(94, 106, 210, .08), inset 0 1px 0 rgba(255, 255, 255, .08);
  -webkit-backdrop-filter: blur(24px) saturate(135%);
  backdrop-filter: blur(24px) saturate(135%);
}

html[data-table-theme='dark'] body .header::before {
  border-top-color: rgba(255, 255, 255, .1);
}

html[data-table-theme='dark'] body .header.main-navigation-scrolled {
  border-color: var(--modern-dark-border-accent);
  background: rgba(5, 5, 6, .7) !important;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .035), 0 18px 50px rgba(0, 0, 0, .52), 0 0 80px rgba(94, 106, 210, .12), inset 0 1px 0 rgba(255, 255, 255, .08);
}

html[data-table-theme='dark'] body .header .logo-section::before {
  border-color: rgba(255, 255, 255, .1);
  background-color: rgba(255, 255, 255, .07);
  box-shadow: 0 5px 16px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .1);
}

html[data-table-theme='dark'] .header .main-tabs {
  background: rgba(255, 255, 255, .025);
}

html[data-table-theme='dark'] .header .main-tabs-active-indicator {
  border-color: rgba(94, 106, 210, .28);
  background: linear-gradient(180deg, rgba(94, 106, 210, .2), rgba(94, 106, 210, .09));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .035), 0 7px 20px rgba(0, 0, 0, .34), 0 0 30px rgba(94, 106, 210, .16), inset 0 1px 0 rgba(255, 255, 255, .1);
}

html[data-table-theme='dark'] .header .main-tabs > .main-tab-item:hover {
  border-color: var(--modern-dark-border-hover);
  background: rgba(255, 255, 255, .055);
  color: var(--modern-dark-foreground);
}

html[data-table-theme='dark'] .header .main-tabs > .main-tab-item.active,
html[data-table-theme='dark'] .header .main-tabs > .main-tab-item[aria-selected='true'] {
  color: #c7cbff !important;
  text-shadow: 0 0 18px rgba(94, 106, 210, .5);
}

html[data-table-theme='dark'] .header .main-tabs > .main-tab-item:not(.active):not([aria-selected='true']) {
  color: #aeb1ba !important;
}

html[data-table-theme='dark'] body .main-tabs > :is(
  #forest-observer-menu, #forest-expander-menu, #personnel-profile-menu,
  #sector-theme-menu, #stock-detail-menu, #technical-analysis-menu,
  #my-holdings-menu
) {
  background: transparent !important;
  color: #aeb1ba !important;
}

html[data-table-theme='dark'] body .main-tabs button#forest-observer-menu.main-tab-item {
  background: transparent !important;
  color: #aeb1ba !important;
}

html[data-table-theme='dark'] body .main-tabs > :is(
  #forest-observer-menu, #forest-expander-menu, #personnel-profile-menu,
  #sector-theme-menu, #stock-detail-menu, #technical-analysis-menu,
  #my-holdings-menu
):is(.active, [aria-selected='true']) {
  border-color: rgba(155, 163, 244, .34) !important;
  background: #4d58bc !important;
  color: #fff !important;
}

html[data-table-theme='dark'] body .main-tabs button#forest-observer-menu.main-tab-item:is(.active, [aria-selected='true']) {
  border-color: rgba(155, 163, 244, .34) !important;
  background: #4d58bc !important;
  color: #fff !important;
}

html[data-table-theme='dark'][data-global-font-scale] body .header :is(.global-font-scale-control, .toolbox-btn, .user-info, .membership-expiry),
html[data-table-theme='dark'] .table-style-settings-trigger {
  border-color: rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .05);
  color: #b8bbc3;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .075);
}

html[data-table-theme='dark'][data-global-font-scale] body .header :is(.global-font-scale-control, .toolbox-btn, .user-info):hover,
html[data-table-theme='dark'] .table-style-settings-trigger:hover,
html[data-table-theme='dark'] .table-style-settings-trigger[aria-expanded='true'] {
  border-color: var(--modern-dark-border-accent);
  background: rgba(94, 106, 210, .13);
  color: #dfe2ff;
  box-shadow: 0 7px 24px rgba(0, 0, 0, .35), 0 0 28px rgba(94, 106, 210, .12), inset 0 1px 0 rgba(255, 255, 255, .1);
}

/* Element Plus: overlays, forms, tables, navigation and feedback. */
html[data-table-theme='dark'] :is(.el-dialog, .el-drawer, .el-message-box, .el-card, .el-popover.el-popper, .el-popper.is-light, .el-select__popper, .el-dropdown__popper, .el-picker-panel, .el-table-filter) {
  border-color: var(--modern-dark-border-hover) !important;
  background: rgba(10, 10, 12, .96) !important;
  color: var(--modern-dark-foreground) !important;
  box-shadow: var(--modern-dark-shadow-hover) !important;
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
}

html[data-table-theme='dark'] :is(.el-dialog__header, .el-dialog__footer, .el-drawer__header, .el-drawer__footer, .el-card__header, .el-card__footer) {
  border-color: var(--modern-dark-border) !important;
}

html[data-table-theme='dark'] :is(.el-dialog__title, .el-drawer__title, .el-message-box__title, .el-popover__title) {
  color: var(--modern-dark-foreground) !important;
}

html[data-table-theme='dark'] :is(.el-input__wrapper, .el-select__wrapper, .el-textarea__inner, .el-input-number, .el-date-editor, .el-range-editor, .el-cascader .el-input__wrapper) {
  border-color: rgba(255, 255, 255, .1) !important;
  background: var(--modern-dark-input) !important;
  color: var(--modern-dark-foreground) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09) !important;
}

html[data-table-theme='dark'] :is(.el-input__wrapper, .el-select__wrapper, .el-textarea__inner, .el-input-number):hover {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16) !important;
}

html[data-table-theme='dark'] :is(.el-input__wrapper.is-focus, .el-select__wrapper.is-focused, .el-textarea__inner:focus, .el-input-number:focus-within) {
  border-color: var(--modern-dark-accent) !important;
  box-shadow: 0 0 0 3px rgba(94, 106, 210, .2), inset 0 0 0 1px var(--modern-dark-accent) !important;
}

html[data-table-theme='dark'] :is(.el-input__inner, .el-textarea__inner, .el-range-input, .el-select__selected-item) {
  color: var(--modern-dark-foreground) !important;
}

html[data-table-theme='dark'] :is(.el-button:not(.el-button--primary):not(.el-button--danger), .button--secondary, .button--ghost) {
  border-color: var(--modern-dark-border-hover) !important;
  background: rgba(255, 255, 255, .05) !important;
  color: #d8dae0 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .075);
}

html[data-table-theme='dark'] :is(.el-button:not(.el-button--primary):not(.el-button--danger), .button--secondary, .button--ghost):hover {
  border-color: var(--modern-dark-border-accent) !important;
  background: rgba(255, 255, 255, .085) !important;
  color: #fff !important;
  box-shadow: 0 0 24px rgba(94, 106, 210, .09), inset 0 1px 0 rgba(255, 255, 255, .1);
  transform: translateY(-1px);
}

html[data-table-theme='dark'] :is(.el-button--primary, .button--primary, .holdings-primary-button, .technical-primary-button, .technical-search-submit, .stock-detail-search-button, .snapshot-button-primary, .opportunity-button:not(.is-secondary), .calendar-primary-command) {
  border-color: rgba(123, 134, 232, .55) !important;
  background: var(--modern-dark-accent) !important;
  color: #fff !important;
  box-shadow: 0 0 0 1px rgba(94, 106, 210, .45), 0 4px 14px rgba(94, 106, 210, .27), inset 0 1px 0 rgba(255, 255, 255, .2) !important;
}

html[data-table-theme='dark'] :is(.el-button--primary, .button--primary, .holdings-primary-button, .technical-primary-button, .technical-search-submit, .stock-detail-search-button, .snapshot-button-primary, .opportunity-button:not(.is-secondary), .calendar-primary-command):hover {
  background: var(--modern-dark-accent-bright) !important;
  box-shadow: 0 0 0 1px rgba(123, 134, 232, .62), 0 6px 20px rgba(94, 106, 210, .4), inset 0 1px 0 rgba(255, 255, 255, .22) !important;
  transform: translateY(-1px);
}

html[data-table-theme='dark'] :is(button, a, input, select, textarea, summary):focus-visible {
  outline: 2px solid rgba(104, 114, 217, .72) !important;
  outline-offset: 2px;
}

html[data-table-theme='dark'] :is(.el-dropdown-menu__item, .el-select-dropdown__item, .el-cascader-node, .el-autocomplete-suggestion li) {
  color: #b8bbc3;
}

html[data-table-theme='dark'] :is(.el-dropdown-menu__item, .el-select-dropdown__item, .el-cascader-node, .el-autocomplete-suggestion li):not(.is-disabled):hover,
html[data-table-theme='dark'] :is(.el-dropdown-menu__item, .el-select-dropdown__item).is-hovering {
  background: rgba(94, 106, 210, .14) !important;
  color: #dfe2ff !important;
}

html[data-table-theme='dark'] :is(.el-table, .el-table__inner-wrapper, .el-table__header-wrapper, .el-table__body-wrapper, .el-table__fixed, .el-table__fixed-right) {
  background: transparent !important;
  color: #d9dbe1;
}

html[data-table-theme='dark'] .el-table::before,
html[data-table-theme='dark'] .el-table__inner-wrapper::before {
  background-color: var(--modern-dark-border) !important;
}

html[data-table-theme='dark'] .el-table tr,
html[data-table-theme='dark'] .el-table td.el-table__cell {
  border-color: var(--modern-dark-border) !important;
  background: rgba(10, 10, 12, .46) !important;
  color: #c9cbd2;
}

html[data-table-theme='dark'] .el-table__body tr:hover > td.el-table__cell,
html[data-table-theme='dark'] .el-table__body tr.current-row > td.el-table__cell {
  background: rgba(94, 106, 210, .11) !important;
}

html[data-table-theme='dark'] .el-table__body tr.el-table__row--striped td.el-table__cell {
  background: rgba(255, 255, 255, .018) !important;
}

html[data-table-theme='dark'] .el-loading-mask {
  background: rgba(5, 5, 6, .78) !important;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

html[data-table-theme='dark'] :is(.el-tabs__nav-wrap::after, .el-divider, .el-collapse-item__wrap, .el-collapse-item__header) {
  border-color: var(--modern-dark-border) !important;
  background-color: transparent !important;
}

html[data-table-theme='dark'] .el-overlay {
  background: rgba(2, 2, 3, .76) !important;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* Theme panel. */
html[data-table-theme='dark'] .table-style-settings-panel {
  border-color: var(--modern-dark-border-hover);
  border-radius: 16px;
  background: rgba(10, 10, 12, .94);
  color: var(--modern-dark-foreground);
  box-shadow: var(--modern-dark-shadow-hover);
  -webkit-backdrop-filter: blur(24px) saturate(130%);
  backdrop-filter: blur(24px) saturate(130%);
}

html[data-table-theme='dark'] .table-style-option {
  border-color: var(--modern-dark-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, .04);
  color: var(--modern-dark-muted);
  transition: color .22s var(--modern-dark-ease), border-color .22s var(--modern-dark-ease), background-color .22s var(--modern-dark-ease), box-shadow .22s var(--modern-dark-ease), transform .22s var(--modern-dark-ease);
}

html[data-table-theme='dark'] .table-style-option:hover,
html[data-table-theme='dark'] .table-style-option.is-active {
  border-color: var(--modern-dark-border-accent);
  background: rgba(94, 106, 210, .15);
  color: #dfe2ff;
  box-shadow: 0 0 24px rgba(94, 106, 210, .1), inset 0 1px 0 rgba(255, 255, 255, .08);
}

html[data-table-theme='dark'] .table-style-settings-close:hover {
  background: rgba(94, 106, 210, .18);
  color: #dfe2ff;
}

/* Shared application cards, panels, search controls and list headings. */
html[data-table-theme='dark'] #app .app-list-heading,
html[data-table-theme='dark'] :is(
  .strategy-card, .stats-card, .chart-card, .blog-card, .detail-card,
  .daily-comparison-card, .distribution-chart-item, .sector-charts-container,
  .stock-detail-metric-card, .stock-detail-company-profile, .stock-detail-technical-view,
  .stock-workbench-sidebar, .stock-workbench-main, .technical-chart-shell,
  .technical-toolbar, .technical-chart-toolbar, .technical-analysis-panel,
  .technical-loading-card, .technical-trade-panel, .holdings-card, .holdings-summary-card,
  .sector-theme-group, .sector-theme-stocks, .sector-theme-inline-detail-host,
  .snapshot-manager-panel, .account-session-dialog, .release-card, .current-version-card
) {
  border-color: var(--modern-dark-border) !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, .065), rgba(255, 255, 255, .025)) !important;
  color: var(--modern-dark-foreground) !important;
  box-shadow: var(--modern-dark-shadow) !important;
}

html[data-table-theme='dark'] #app .app-list-heading {
  --app-list-heading-bg: rgba(255, 255, 255, .035);
  --app-list-heading-accent: #6872d9;
}

html[data-table-theme='dark'] #app :is(.app-list-heading, .app-list-heading__title, .chart-item-title) {
  color: #e4e5e9;
}

html[data-table-theme='dark'] #app :is(.app-list-heading__meta, .chart-item-subtitle, .selected-date, .subtitle) {
  color: var(--modern-dark-muted);
}

html[data-table-theme='dark'] #app .app-list-heading__count {
  border-color: var(--modern-dark-border);
  background: rgba(255, 255, 255, .045);
  color: #b8bdff;
}

html[data-table-theme='dark'] :is(
  .stock-detail-page-header, .stock-detail-analysis-filters, .stock-detail-search,
  .stock-detail-financial-tabs, .stock-detail-analysis-mode-switch, .stock-detail-basis-switch,
  .stock-workbench-filter-popover, .sector-theme-industry-filter-popover,
  .technical-search, .technical-control-group, .holdings-search,
  .technical-periods, .holdings-toolbar, .snapshot-manager-toolbar, .calendar-toolbar
) {
  border-color: var(--modern-dark-border-hover) !important;
  background: rgba(10, 10, 12, .78) !important;
  color: #c9cbd2 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 8px 24px rgba(0, 0, 0, .22) !important;
}

html[data-table-theme='dark'] :is(
  .stock-detail-search-input, .technical-search-input, .stock-workbench-select,
  .holdings-search-input, .snapshot-manager-panel input, .snapshot-manager-panel select,
  .snapshot-manager-panel textarea
) {
  border-color: var(--modern-dark-border-hover) !important;
  background: var(--modern-dark-input) !important;
  color: var(--modern-dark-foreground) !important;
}

html[data-table-theme='dark'] :is(
  .stock-detail-main-tab, .stock-detail-financial-tab, .stock-detail-analysis-mode-button,
  .stock-detail-basis-button, .stock-workbench-day, .stock-workbench-strategy,
  .stock-workbench-type, .sector-theme-tag, .sector-theme-directory-tab,
  .sector-theme-directory-mode-button, .technical-period-button, .technical-adjust-button,
  .technical-indicator-button, .calendar-analysis-tabs button,
  .technical-periods button, .technical-toggle, .technical-osc-button,
  .technical-quick-metric, .backtest-periods label > span
) {
  border-color: var(--modern-dark-border) !important;
  background: rgba(255, 255, 255, .035) !important;
  color: var(--modern-dark-muted) !important;
}

html[data-table-theme='dark'] :is(
  .stock-detail-main-tab, .stock-detail-financial-tab, .stock-detail-analysis-mode-button,
  .stock-detail-basis-button, .stock-workbench-day, .stock-workbench-strategy,
  .stock-workbench-type, .sector-theme-tag, .sector-theme-directory-tab,
  .sector-theme-directory-mode-button, .technical-period-button, .technical-adjust-button,
  .technical-indicator-button, .calendar-analysis-tabs button,
  .technical-periods button, .technical-toggle, .technical-osc-button,
  .technical-quick-metric, .backtest-periods label > span
):hover,
html[data-table-theme='dark'] :is(
  .stock-detail-main-tab, .stock-detail-financial-tab, .stock-detail-analysis-mode-button,
  .stock-detail-basis-button, .stock-workbench-day, .stock-workbench-strategy,
  .stock-workbench-type, .sector-theme-tag, .sector-theme-directory-tab,
  .sector-theme-directory-mode-button, .technical-period-button, .technical-adjust-button,
  .technical-indicator-button, .calendar-analysis-tabs button,
  .technical-periods button, .technical-toggle, .technical-osc-button,
  .technical-quick-metric, .backtest-periods label > span
).active {
  border-color: var(--modern-dark-border-accent) !important;
  background: rgba(94, 106, 210, .16) !important;
  color: #dfe2ff !important;
  box-shadow: 0 0 22px rgba(94, 106, 210, .1) !important;
}

html[data-table-theme='dark'] :is(
  .stock-detail-search-suggestions, .technical-search-suggestions,
  .backtest-search-suggestions, .sector-theme-category-heading,
  .sector-theme-favorite-shortcut, .sector-theme-sector-list-row,
  .stock-workbench-filter-option, .sector-theme-industry-filter-option,
  .holdings-trade-record, .account-session-device, .detail-row
) {
  border-color: var(--modern-dark-border) !important;
  background: rgba(10, 10, 12, .93) !important;
  color: #c9cbd2 !important;
}

html[data-table-theme='dark'] :is(
  .stock-detail-search-option, .technical-search-option, .backtest-search-suggestions button,
  .sector-theme-favorite-shortcut, .sector-theme-sector-list-row,
  .stock-workbench-filter-option, .sector-theme-industry-filter-option
):hover {
  background: rgba(94, 106, 210, .13) !important;
  color: #e5e7ff !important;
}

html[data-table-theme='dark'] :is(.stock-detail-company-label, .stock-detail-metric-label, .stock-detail-filter-label, .stock-workbench-list-meta, .technical-control-label, .holdings-label, .sector-theme-category-heading, .snapshot-field-label) {
  color: var(--modern-dark-muted) !important;
}

html[data-table-theme='dark'] :is(.stock-detail-company-value, .stock-detail-metric-value, .stock-workbench-list-heading strong, .technical-toolbar-title, .holdings-value, .sector-theme-directory-heading h2) {
  color: var(--modern-dark-foreground) !important;
}

html[data-table-theme='dark'] :is(.stock-workbench-table, .sector-theme-table, .calendar-table, .opportunity-table, .backtest-batch-table, table) {
  border-color: var(--modern-dark-border) !important;
  background: rgba(10, 10, 12, .55) !important;
  color: #d9dbe1 !important;
}

html[data-table-theme='dark'] :is(.stock-workbench-table, .sector-theme-table, .calendar-table, .opportunity-table, .backtest-batch-table, table) :is(th, td) {
  border-color: var(--modern-dark-border) !important;
}

html[data-table-theme='dark'] :is(.stock-workbench-table, .sector-theme-table, .calendar-table, .opportunity-table, .backtest-batch-table, table) th {
  background: rgba(255, 255, 255, .045) !important;
  color: #a7abb4 !important;
}

html[data-table-theme='dark'] :is(.stock-workbench-table, .sector-theme-table, .calendar-table, .opportunity-table, .backtest-batch-table, table) td {
  background: rgba(10, 10, 12, .46) !important;
  color: #c9cbd2;
}

html[data-table-theme='dark'] :is(.stock-workbench-table, .sector-theme-table, .calendar-table, .opportunity-table, .backtest-batch-table, table) tbody tr:hover td {
  background: rgba(94, 106, 210, .105) !important;
}

html[data-table-theme='dark'] :is(.stock-workbench-table, .sector-theme-table, .calendar-table, .opportunity-table, .backtest-batch-table, table) tbody tr:hover {
  background: rgba(94, 106, 210, .105) !important;
}

/* Standalone tools opened from the top navigation keep the selected theme. */
html[data-table-theme='dark'] body:is(.backtest-tool-page, .disclosure-calendar-page, .financial-opportunity-page),
html[data-table-theme='dark'] body:has(.study-app),
html[data-table-theme='dark'] body:has(.uiux-study-app),
html[data-table-theme='dark'] body:has(.planner-shell) {
  background-color: var(--modern-dark-base) !important;
  background-image:
    linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px),
    radial-gradient(ellipse 72% 50% at 50% -10%, rgba(94, 106, 210, .22), transparent 68%),
    radial-gradient(ellipse at top, #0a0a0f 0%, #050506 52%, #020203 100%) !important;
  background-size: 64px 64px, 64px 64px, auto, auto !important;
  color: var(--modern-dark-foreground) !important;
}

html[data-table-theme='dark'] :is(
  .backtest-header, .calendar-header, .opportunity-header, .app-header, .study-hero,
  .backtest-card, .backtest-analysis, .backtest-batch-editor, .backtest-rule-group,
  .calendar-metric, .calendar-update-panel, .calendar-workspace,
  .opportunity-loading, .opportunity-capabilities, .methodology-note, .detail-panel,
  .study-dashboard .metric, .study-panel, .capability-card, .filter-card,
  .stage-card, .stage-card__header, .task-item, .question-card, .question-option,
  .review-item, .history-item, .project-nav__item, .project-workspace,
  .planner-controls, .workspace, .metric-band .metric, .goal-strip, .chart-section,
  .table-section, .card, .level3-block, details,
  .opportunity-stat, .opportunity-model-card, .industry-toolbar, .industry-card,
  .opportunity-table-wrap, .calendar-table-wrap, .calendar-analysis-pane,
  .calendar-pagination, .calendar-list-toolbar, .calendar-workspace-toggle-bar, .calendar-batch-toolbar, .calendar-analysis-host,
  .calendar-analysis-tabs, .opportunity-filter-grid, .opportunity-pagination,
  .stock-detail-panel, .stock-detail-view
) {
  border-color: var(--modern-dark-border) !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, .065), rgba(255, 255, 255, .022)) !important;
  color: var(--modern-dark-foreground) !important;
  box-shadow: var(--modern-dark-shadow) !important;
}

html[data-table-theme='dark'] :is(.backtest-header, .calendar-header, .opportunity-header, .app-header, .study-hero) {
  border-bottom-color: var(--modern-dark-border-hover) !important;
  background: rgba(10, 10, 12, .76) !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, .36), inset 0 1px 0 rgba(255, 255, 255, .07) !important;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

html[data-table-theme='dark'] :is(
  .backtest-rule-group input, .backtest-rule-group select, .backtest-batch-editor textarea,
  .backtest-search input, .calendar-header input, .calendar-toolbar input,
  .opportunity-filter-grid input, .opportunity-filter-grid select,
  .field input, .field select, .content-textarea, .filter-card input, .filter-card select,
  .disclosure-calendar-page select, .financial-opportunity-page select,
  #search-input, #stock-search
) {
  border-color: rgba(255, 255, 255, .1) !important;
  background: var(--modern-dark-input) !important;
  color: var(--modern-dark-foreground) !important;
}

html[data-table-theme='dark'] :is(
  .backtest-strategy-selector label > span, .backtest-rule-summary, .backtest-phase-tag,
  .calendar-sync-tag, .calendar-command:not(.calendar-primary-command),
  .opportunity-button.is-secondary, .capability-tag, .hero-tags span,
  .study-tabs, .segmented, .segmented label span, .check-control, .command-button,
  #opportunity-previous, #opportunity-next
) {
  border-color: var(--modern-dark-border) !important;
  background: rgba(255, 255, 255, .045) !important;
  color: #b8bbc3 !important;
}

html[data-table-theme='dark'] :is(
  .backtest-strategy-selector input:checked + span, .study-tabs button[aria-selected='true'],
  .segmented button.active, .segmented label:has(input:checked) span, .review-switch .is-active
) {
  border-color: var(--modern-dark-border-accent) !important;
  background: rgba(94, 106, 210, .18) !important;
  color: #dfe2ff !important;
  box-shadow: 0 0 28px rgba(94, 106, 210, .12), inset 0 1px 0 rgba(255, 255, 255, .08) !important;
}

html[data-table-theme='dark'] :is(h1, h2, h3, .card-title, .section-heading h2, .panel-heading h2, .backtest-section-heading h2, .backtest-analysis-header h2) {
  color: var(--modern-dark-foreground);
}

html[data-table-theme='dark'] :is(.opportunity-eyebrow, .backtest-kicker, .panel-kicker, .section-heading > div > span) {
  color: #9ba3f4 !important;
  text-shadow: 0 0 20px rgba(94, 106, 210, .34);
}

html[data-table-theme='dark'] :is(.study-hero h1, .opportunity-header h1, .calendar-title h1, .backtest-header h1) {
  background: linear-gradient(180deg, #fff 0%, rgba(237, 237, 240, .72) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent !important;
}

/* Legacy standalone pages use deep green copy in light mode. Lift only those
   neutral labels for the dark surface while keeping gain/loss colors semantic. */
html[data-table-theme='dark'] .backtest-tool-page legend,
html[data-table-theme='dark'] body:has(.planner-shell) :is(
  .brand span, legend, .field-label, summary, .status-line, .metric span
),
html[data-table-theme='dark'] .disclosure-calendar-page :is(
  .calendar-toolbar label, .calendar-toolbar label > span, .calendar-filter-field > span, .calendar-table th button
),
html[data-table-theme='dark'] .financial-opportunity-page :is(
  .model-count, .industry-card summary, .industry-leaders button
) {
  color: #aeb1ba !important;
}

html[data-table-theme='dark'] .disclosure-calendar-page :is(
  .calendar-multiselect summary, .calendar-multiselect-options
) {
  border-color: var(--modern-dark-border-hover) !important;
  background: var(--modern-dark-input) !important;
  color: var(--modern-dark-foreground) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .34) !important;
}

html[data-table-theme='dark'] .disclosure-calendar-page .calendar-multiselect-options label > span {
  color: #c9cbd2 !important;
}

html[data-table-theme='dark'] .disclosure-calendar-page .calendar-multiselect summary > span:last-child {
  color: #b8bbc3 !important;
}

html[data-table-theme='dark'] .disclosure-calendar-page .calendar-multiselect-options label:hover,
html[data-table-theme='dark'] .disclosure-calendar-page .calendar-multiselect-options label:has(input:checked) {
  background: rgba(94, 106, 210, .16) !important;
}

html[data-table-theme='dark'] .calendar-list-toolbar > span:not(.is-success, .is-error) {
  color: #aeb1ba !important;
}

html[data-table-theme='dark'] .calendar-list-toolbar > span.is-success {
  color: #75d6ae !important;
}

html[data-table-theme='dark'] .calendar-list-toolbar > span.is-error {
  color: #ff939e !important;
}

html[data-table-theme='dark'] .calendar-workspace-toggle-bar > span[aria-hidden='true'] {
  background: var(--modern-dark-border-hover) !important;
}

html[data-table-theme='dark'] .calendar-workspace-toggle-bar button {
  border-color: var(--modern-dark-border-hover) !important;
  background: rgba(255, 255, 255, .055) !important;
  color: #c8cad1 !important;
}

html[data-table-theme='dark'] body:has(.planner-shell) :is(
  .metric strong, #realWealth, #totalContributions, #goalProgressText
) {
  color: var(--modern-dark-foreground) !important;
}

html[data-table-theme='dark'] body:has(.study-app) :is(
  .stage-progress, .task-time, .metric--primary strong
) {
  color: #8ed7ce !important;
}

html[data-table-theme='dark'] :is(.detail-backdrop, .snapshot-manager-backdrop) {
  background: rgba(2, 2, 3, .76) !important;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

html[data-table-theme='dark'] :is(.chart-box, .backtest-equity-chart, .technical-chart, .chart-frame, canvas) {
  border-color: var(--modern-dark-border) !important;
}

html[data-table-theme='dark'] :is(.technical-chart, .technical-data-note) {
  background: rgba(5, 5, 6, .74) !important;
  color: var(--modern-dark-muted) !important;
}

html[data-table-theme='dark'] .technical-load-overlay {
  border-color: var(--modern-dark-border) !important;
  background: rgba(5, 5, 6, .86) !important;
  color: var(--modern-dark-muted) !important;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

html[data-table-theme='dark'] .technical-load-overlay.is-error {
  background: rgba(30, 10, 14, .82) !important;
}

html[data-table-theme='dark'] :is(.technical-loading-progress-track, .goal-progress) {
  background: rgba(255, 255, 255, .08) !important;
}

html[data-table-theme='dark'] .technical-loading-reload {
  border-color: var(--modern-dark-border-accent) !important;
  background: rgba(94, 106, 210, .14) !important;
  color: #dfe2ff !important;
}

html[data-table-theme='dark'] #backtest-current-code {
  background: rgba(94, 106, 210, .16) !important;
  color: #dfe2ff !important;
}

html[data-table-theme='dark'] :is(
  .assumption-note, .disclaimer, .output, .pill,
  #stock-counter, #search-box, .nav-btn, #exit-btn,
  .calendar-icon-command, .cycle-pill, .confidence-pill, .opportunity-tag,
  .grade-badge, .model-tags span, .industry-badges span
) {
  border-color: var(--modern-dark-border) !important;
  background: rgba(255, 255, 255, .045) !important;
  color: #b8bbc3 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .055);
}

html[data-table-theme='dark'] :is(.task-item, .question-option, .review-item, .project-nav__item):hover {
  border-color: var(--modern-dark-border-accent) !important;
  background: rgba(94, 106, 210, .12) !important;
}

html[data-table-theme='dark'] :is(.task-item.is-complete, .question-option.is-active, .project-nav__item.is-active) {
  border-color: rgba(94, 106, 210, .35) !important;
  background: rgba(94, 106, 210, .16) !important;
}

html[data-table-theme='dark'] :is(.calendar-table tr.selected, .calendar-table tr.selected td) {
  background: rgba(94, 106, 210, .14) !important;
}

/* Header utilities and Element Plus states that are mounted after the base app. */
html[data-table-theme='dark'] :is(.global-font-scale-select, .global-font-scale-select option) {
  border-color: var(--modern-dark-border-hover) !important;
  background: var(--modern-dark-input) !important;
  color: #d8dae0 !important;
}

html[data-table-theme='dark'] .global-session-expiry {
  color: #aeb1ba !important;
}

html[data-table-theme='dark'] :is(.pagination-container, .el-pagination) {
  border-color: var(--modern-dark-border) !important;
  background: rgba(10, 10, 12, .82) !important;
  color: #b8bbc3 !important;
}

html[data-table-theme='dark'] :is(
  .el-pagination button, .el-pagination .btn-prev, .el-pagination .btn-next,
  .el-pager li, .el-pagination__total, .el-pagination__goto,
  .el-pagination__classifier, .el-pagination__sizes
) {
  background: transparent !important;
  color: #b8bbc3 !important;
}

html[data-table-theme='dark'] .el-pager li.is-active {
  background: var(--modern-dark-accent) !important;
  color: #fff !important;
}

html[data-table-theme='dark'] .el-loading-text {
  color: #9ba3f4 !important;
}

html[data-table-theme='dark'] .el-button.el-button.is-disabled,
html[data-table-theme='dark'] .el-button.el-button.is-disabled > span {
  border-color: var(--modern-dark-border) !important;
  background: rgba(255, 255, 255, .035) !important;
  color: #8a8f98 !important;
  box-shadow: none !important;
}

html[data-table-theme='dark'] .el-message {
  border-color: var(--modern-dark-border-hover) !important;
  background: rgba(10, 10, 12, .96) !important;
  box-shadow: var(--modern-dark-shadow-hover) !important;
}

html[data-table-theme='dark'] .el-message.el-message--error {
  border-color: rgba(255, 126, 126, .24) !important;
  background: rgba(42, 15, 20, .96) !important;
}

html[data-table-theme='dark'] .el-message--error :is(.el-message__content, .el-message__icon) {
  color: #ff9b9b !important;
}

html[data-table-theme='dark'] .el-table th.el-table__cell,
html[data-table-theme='dark'] .el-table th.el-table__cell .cell {
  color: #c6c9d0 !important;
}

/* Forest Observer: its compiled route owns a separate light surface system. */
html[data-table-theme='dark'] :is(
  .tabs-container, .strategy-stats-table, .no-selection-tip,
  .daily-comparison-section, .daily-comparison-card,
  .forest-deferred-placeholder, .favorites-filter-row,
  .favorites-copy-row, .favorites-stats, .stock-code-cleanup-option,
  .stock-codes-description, .no-chart-message, .monthly-sector-tables,
  .monthly-sector-tables .grid-container, .monthly-sector-tables .date-header,
  .monthly-sector-tables .sector-blocks, .monthly-sector-tables .sector-block,
  .charts-container, .chart-box-with-control, .chart-control-header
) {
  border-color: var(--modern-dark-border) !important;
  background: rgba(10, 10, 12, .8) !important;
  color: #b8bbc3 !important;
  box-shadow: var(--modern-dark-shadow) !important;
}

html[data-table-theme='dark'] .strategy-stats-table.frequent-stocks-table {
  --app-table-header-bg: rgba(255, 255, 255, .045);
  --app-table-header-hover-bg: rgba(94, 106, 210, .12);
  --app-table-header-text: #c6c9d0;
  --app-table-header-active: #9ba3f4;
}

html[data-table-theme='dark'] :is(.tab-item, .favorites-filter-label) {
  color: #b8bbc3 !important;
}

html[data-table-theme='dark'] .tab-item.active {
  border-color: var(--modern-dark-border-accent) !important;
  background: rgba(94, 106, 210, .16) !important;
  color: #dfe2ff !important;
}

html[data-table-theme='dark'] :is(
  .daily-comparison-header h3, .daily-comparison-card span:not([class*='change']),
  .strategy-stats-table .app-list-heading__title,
  .monthly-sector-tables h3, .monthly-sector-tables .sector-name,
  .chart-control-title, .distribution-title
) {
  color: var(--modern-dark-foreground) !important;
}

html[data-table-theme='dark'] :is(
  .daily-comparison-header__summary, .daily-comparison-empty,
  .forest-deferred-placeholder, .no-selection-tip, .no-chart-message,
  .monthly-sector-tables .subtitle, .monthly-sector-tables .sector-count,
  .industry-level-label, .distribution-controls
) {
  color: #aeb1ba !important;
}

html[data-table-theme='dark'] .monthly-sector-tables .more-button {
  color: #9ba3f4 !important;
}

html[data-table-theme='dark'] .el-radio-button__inner {
  border-color: var(--modern-dark-border-hover) !important;
  background: rgba(255, 255, 255, .045) !important;
  color: #b8bbc3 !important;
  box-shadow: none !important;
}

html[data-table-theme='dark'] .el-radio-button__original-radio:checked + .el-radio-button__inner {
  border-color: var(--modern-dark-border-accent) !important;
  background: #4d58bc !important;
  color: #fff !important;
  box-shadow: -1px 0 0 0 rgba(155, 163, 244, .28) !important;
}

/* Forest Expander: Vue scoped styles are injected on first navigation. */
html[data-table-theme='dark'] :is(
  .intelligence-station, .intelligence-station .main-content,
  .intelligence-station .timeline-content
) {
  background: transparent !important;
  color: var(--modern-dark-foreground) !important;
}

html[data-table-theme='dark'] .intelligence-station :is(
  .top-navigation, .sidebar, .post-card, .timeline-date, .action-icon,
  .edit-column-btn, .images-preview, .category-item, .article-stats,
  .action-buttons, .post-diagram, .category-position
) {
  border-color: var(--modern-dark-border) !important;
  background: rgba(10, 10, 12, .86) !important;
  color: #b8bbc3 !important;
  box-shadow: var(--modern-dark-shadow) !important;
}

html[data-table-theme='dark'] .intelligence-station :is(
  .nav-tab, .post-content p, .query-section h4, .month-item,
  .category-name, .images-header, .form-helper, .no-more-text,
  .empty-state p
) {
  color: #b8bbc3 !important;
}

html[data-table-theme='dark'] .intelligence-station :is(.post-title, .nav-tab.active) {
  color: #9ba3f4 !important;
}

html[data-table-theme='dark'] .intelligence-station :is(.nav-tab.active, .month-item.active) {
  border-color: var(--modern-dark-border-accent) !important;
  background: rgba(94, 106, 210, .18) !important;
  color: #eef0ff !important;
}

html[data-table-theme='dark'] .intelligence-station :is(
  .edit-column-btn, .refresh-btn, .search-btn
) {
  border-color: var(--modern-dark-border-hover) !important;
  background: rgba(255, 255, 255, .05) !important;
  color: #d8dae0 !important;
}

html[data-table-theme='dark'] .intelligence-station .el-button.el-button.is-disabled,
html[data-table-theme='dark'] .intelligence-station .el-button.el-button.is-disabled > span {
  --el-button-disabled-bg-color: rgba(255, 255, 255, .035);
  --el-button-disabled-text-color: #8a8f98;
  border-color: var(--modern-dark-border) !important;
  background-color: rgba(255, 255, 255, .035) !important;
  background-image: none !important;
  color: #8a8f98 !important;
}

html[data-table-theme='dark'] .intelligence-station .el-input-group__append:has(.el-button.is-disabled) {
  border-color: var(--modern-dark-border) !important;
  background: rgba(255, 255, 255, .035) !important;
}

/* Personnel profile route. */
html[data-table-theme='dark'] .personnel-container {
  background: transparent !important;
  color: var(--modern-dark-foreground) !important;
}

html[data-table-theme='dark'] .personnel-container :is(
  .table-section, .search-container, .detail-card, .search-result-info
) {
  border-color: var(--modern-dark-border) !important;
  background: rgba(10, 10, 12, .82) !important;
  color: #d8dae0 !important;
  box-shadow: var(--modern-dark-shadow) !important;
}

html[data-table-theme='dark'] .personnel-container .table-tab {
  border-color: var(--modern-dark-border) !important;
  background: rgba(255, 255, 255, .04) !important;
  color: #b8bbc3 !important;
}

html[data-table-theme='dark'] .personnel-container .table-tab.active {
  border-color: var(--modern-dark-border-accent) !important;
  background: var(--modern-dark-accent) !important;
  color: #fff !important;
}

/* Sector/theme directory and the stock detail embedded beside it. */
html[data-table-theme='dark'] :is(.sector-theme-panel, .stock-detail-inline-panel) {
  background: transparent !important;
  color: var(--modern-dark-foreground) !important;
}

html[data-table-theme='dark'] :is(
  .sector-theme-sidebar, .sector-theme-directory-modes,
  .sector-theme-category-heading, .sector-theme-stock-state,
  .sector-theme-sector-list-sort, .sector-theme-stock-count,
  .sector-theme-view, .sector-theme-favorite,
  .sector-theme-revenue-filter, .sector-theme-xi-button,
  .sector-theme-volatility-button, .sector-theme-industry-filter-popover,
  .sector-theme-industry-filter-actions button
) {
  border-color: var(--modern-dark-border) !important;
  background: rgba(10, 10, 12, .82) !important;
  color: #b8bbc3 !important;
  box-shadow: none !important;
}

html[data-table-theme='dark'] :is(
  .sector-theme-directory-mode-button.active, .sector-theme-directory-tab.active,
  .sector-theme-tag.active, .sector-theme-favorite-shortcut.active,
  .sector-theme-sector-list-row.active
) {
  border-color: var(--modern-dark-border-accent) !important;
  background: rgba(94, 106, 210, .18) !important;
  color: #dfe2ff !important;
}

html[data-table-theme='dark'] :is(
  .sector-theme-heading h1, .sector-theme-group h2,
  .sector-theme-stock-heading h2, .sector-theme-stock-title,
  .sector-theme-category-heading strong, .sector-theme-name,
  .sector-theme-sector-list-name
) {
  color: var(--modern-dark-foreground) !important;
}

html[data-table-theme='dark'] :is(
  .sector-theme-heading p, .sector-theme-empty, .sector-theme-inline-empty,
  .sector-theme-stock-eyebrow, .sector-theme-sector-list-category,
  .sector-theme-change-missing, .sector-theme-financial-loading
) {
  color: #aeb1ba !important;
}

html[data-table-theme='dark'] .sector-theme-sort.active,
html[data-table-theme='dark'] .sector-theme-sort.active span {
  color: #9ba3f4 !important;
}

html[data-table-theme='dark'] .sector-theme-stock-count {
  color: #b8bdff !important;
}

/* Stock candidate workbench and financial detail controls. */
html[data-table-theme='dark'] :is(
  .stock-workbench-filter, .stock-workbench-list-card,
  .stock-workbench-list-heading, .stock-workbench-filter-popover,
  .stock-detail-financial-nav, .stock-detail-range-picker,
  .stock-detail-contract-search-tag, .stock-detail-unit-badge,
  .stock-detail-filter-check, .stock-detail-financial-download,
  .stock-detail-view-header, .stock-detail-readonly-badge,
  .stock-detail-count-badge, .stock-detail-financial-overview-company,
  .stock-detail-financial-overview-company-meta,
  .stock-detail-financial-overview-composition,
  .stock-detail-financial-overview-composition-header,
  .stock-detail-industry-analysis-context,
  .stock-detail-key-changes,
  .stock-detail-key-change,
  .stock-detail-metric-guide-popover, .stock-detail-company-description-popover,
  .stock-detail-company-tag
) {
  border-color: var(--modern-dark-border) !important;
  background: rgba(10, 10, 12, .84) !important;
  color: #d8dae0 !important;
  box-shadow: var(--modern-dark-shadow) !important;
}

html[data-table-theme='dark'] .stock-detail-industry-analysis-path,
html[data-table-theme='dark'] .stock-detail-industry-analysis-notice {
  border-color: var(--modern-dark-border) !important;
}

html[data-table-theme='dark'] .stock-detail-panel .stock-detail-statement-collapsible {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html[data-table-theme='dark'] .stock-detail-panel .stock-detail-content {
  background: transparent !important;
}

html[data-table-theme='dark'] :is(.stock-detail-industry-analysis-version, .stock-detail-industry-analysis-level) {
  border-color: var(--modern-dark-border-accent) !important;
  background: rgba(94, 106, 210, .12) !important;
  color: #c8ccff !important;
}

html[data-table-theme='dark'] :is(
  .stock-detail-industry-analysis-title,
  .stock-detail-statement-section-title strong,
  .stock-detail-key-changes > strong
) {
  color: #e4e6eb !important;
}

html[data-table-theme='dark'] :is(
  .stock-detail-industry-analysis-focus,
  .stock-detail-industry-analysis-notice,
  .stock-detail-statement-section-title span,
  .stock-detail-key-changes p,
  .stock-detail-metric-basis,
  .stock-detail-metric-missing,
  .stock-detail-unavailable-reason,
  .stock-detail-unavailable-source
) {
  color: #a8abb3 !important;
}

html[data-table-theme='dark'] .stock-detail-metric-basis-tag {
  border-color: rgba(150, 162, 215, .5) !important;
  background: rgba(94, 106, 210, .16) !important;
  color: #c8ccff !important;
}

html[data-table-theme='dark'] .stock-detail-statement-unavailable > .stock-detail-statement-section-title,
html[data-table-theme='dark'] .stock-detail-unavailable-row > :is(th, td) {
  background: rgba(142, 105, 45, .09) !important;
}

html[data-table-theme='dark'] .stock-detail-key-change:hover,
html[data-table-theme='dark'] .stock-detail-key-change:focus-visible {
  border-color: var(--modern-dark-border-accent) !important;
  background: rgba(94, 106, 210, .16) !important;
  color: #dfe2ff !important;
}

html[data-table-theme='dark'] :is(
  .stock-workbench-count, .stock-workbench-backtest-button,
  .stock-workbench-revenue-filter-button, .stock-workbench-xi-button,
  .stock-workbench-volatility-button, .stock-workbench-kline-refresh-button, .stock-detail-range-button,
  .stock-detail-financial-tab, .stock-detail-basis-button,
  .stock-workbench-filter-actions button
) {
  border-color: var(--modern-dark-border) !important;
  background: rgba(255, 255, 255, .045) !important;
  color: #b8bbc3 !important;
}

html[data-table-theme='dark'] :is(
  .stock-detail-range-button.active, .stock-detail-financial-tab.active,
  .stock-detail-filter-check.active, .stock-detail-basis-button.active
) {
  border-color: var(--modern-dark-border-accent) !important;
  background: rgba(94, 106, 210, .18) !important;
  color: #dfe2ff !important;
}

html[data-table-theme='dark'] :is(
  .stock-workbench-count, .stock-detail-unit-badge,
  .stock-detail-count-badge, .stock-detail-readonly-badge
) {
  color: #b8bdff !important;
}

html[data-table-theme='dark'] .stock-workbench-status {
  color: #9ba3f4 !important;
}

/* Technical-analysis toolbar, dialogs and loading/error states. */
html[data-table-theme='dark'] :is(.technical-analysis-panel, .technical-analysis-inline-panel) {
  background: transparent !important;
  color: var(--modern-dark-foreground) !important;
}

html[data-table-theme='dark'] :is(
  .technical-contract-search-tag, .technical-segmented, .technical-segmented button,
  .technical-status, .technical-icon-button, .technical-trade-stat,
  .technical-drawing-menu, .technical-drawing-editor,
  .technical-indicator-settings-panel, .technical-indicator-settings-tab,
  .technical-trade-dialog, .technical-loading-card
) {
  border-color: var(--modern-dark-border) !important;
  background: rgba(10, 10, 12, .86) !important;
  color: #b8bbc3 !important;
  box-shadow: var(--modern-dark-shadow) !important;
}

html[data-table-theme='dark'] :is(
  .technical-segmented button.active, .technical-indicator-settings-tab.active
) {
  border-color: var(--modern-dark-border-accent) !important;
  background: rgba(94, 106, 210, .18) !important;
  color: #dfe2ff !important;
}

html[data-table-theme='dark'] :is(
  .technical-stock-name, .technical-heading h1,
  .technical-trade-stat strong, .technical-load-title
) {
  color: var(--modern-dark-foreground) !important;
}

html[data-table-theme='dark'] :is(
  .technical-stock-meta, .technical-data-note, .technical-trade-stat span,
  .technical-load-detail, .technical-kicker
) {
  color: #aeb1ba !important;
}

html[data-table-theme='dark'] .technical-status-error,
html[data-table-theme='dark'] .technical-trade-error {
  border-color: rgba(255, 126, 126, .22) !important;
  background: rgba(42, 15, 20, .82) !important;
  color: #ff9b9b !important;
}

html[data-table-theme='dark'] .technical-load-overlay.is-error .technical-load-title {
  color: #ff9b9b !important;
}

/* Holdings overview, asset modules, tables and trade manager. */
html[data-table-theme='dark'] .holdings-panel {
  background: transparent !important;
  color: var(--modern-dark-foreground) !important;
}

html[data-table-theme='dark'] :is(
  .holdings-live, .holdings-account, .holdings-summary,
  .holdings-asset-module, .holdings-module-account, .holdings-table-wrap,
  .holdings-card, .holdings-toolbar, .holdings-trade-dialog-surface,
  .holdings-trade-manager-footer, .holdings-trade-form-actions
) {
  border-color: var(--modern-dark-border) !important;
  background: rgba(10, 10, 12, .84) !important;
  color: #d8dae0 !important;
  box-shadow: var(--modern-dark-shadow) !important;
}

html[data-table-theme='dark'] :is(
  .holdings-refresh, .holdings-account-edit, .holdings-secondary-button,
  .holdings-row-actions button, .holdings-trade-record-actions button,
  .holdings-dialog-close
) {
  border-color: var(--modern-dark-border-hover) !important;
  background: rgba(255, 255, 255, .05) !important;
  color: #d8dae0 !important;
}

html[data-table-theme='dark'] .holdings-panel :is(input, select) {
  border-color: var(--modern-dark-border-hover) !important;
  background: var(--modern-dark-input) !important;
  color: var(--modern-dark-foreground) !important;
}

html[data-table-theme='dark'] .holdings-panel :is(
  h2, h3, h4, .holdings-section-title, .holdings-module-heading h3
) {
  color: var(--modern-dark-foreground) !important;
}

html[data-table-theme='dark'] .holdings-panel :is(
  p, .holdings-stat span, .holdings-account-metrics span,
  .holdings-empty, .holdings-field, .is-unavailable
) {
  color: #aeb1ba !important;
}

html[data-table-theme='dark'] .holdings-distribution-row i {
  background: rgba(255, 255, 255, .09) !important;
}

html[data-table-theme='dark'] .holdings-notice {
  border-color: rgba(216, 169, 74, .34) !important;
  background: rgba(120, 79, 14, .16) !important;
  color: #e9c77c !important;
}

html[data-table-theme='dark'] .holdings-panel .is-profit {
  color: #ff8b8b !important;
}

html[data-table-theme='dark'] .holdings-panel .is-loss {
  color: #63d69d !important;
}

/* Standalone study pages and financial opportunity content. */
html[data-table-theme='dark'] :is(.study-app, .uiux-study-app) .stage-number {
  border-color: rgba(155, 163, 244, .35) !important;
  background: var(--modern-dark-accent) !important;
  color: #fff !important;
}

html[data-table-theme='dark'] :is(.study-app, .uiux-study-app) .study-footer {
  border-color: var(--modern-dark-border) !important;
  background: rgba(10, 10, 12, .88) !important;
  color: var(--modern-dark-foreground) !important;
  box-shadow: var(--modern-dark-shadow) !important;
}

html[data-table-theme='dark'] :is(.study-app, .uiux-study-app) .study-footer :is(p, a) {
  color: #b8bbc3 !important;
}

html[data-table-theme='dark'] :is(.study-app, .uiux-study-app) :is(.study-hero__mark, .panel-badge) {
  border-color: var(--modern-dark-border-accent) !important;
  background: rgba(94, 106, 210, .28) !important;
  color: #eef0ff !important;
}

html[data-table-theme='dark'] .financial-opportunity-page :is(
  .model-kicker, #opportunity-industry-count, #opportunity-result-count
) {
  color: #9ba3f4 !important;
}

html[data-table-theme='dark'] .financial-opportunity-page .opportunity-filter-grid label > span {
  color: #aeb1ba !important;
}

html[data-table-theme='dark'] .financial-opportunity-page .company-cell strong {
  color: var(--modern-dark-foreground) !important;
}

html[data-table-theme='dark'] .backtest-rule-action {
  color: #f08b86 !important;
}

/* Account sessions are mounted directly under body and keep their own light
   palette, so every internal surface/state must be themed explicitly. */
html[data-table-theme='dark'] :is(.account-session-dialog-header, .account-session-dialog-footer) {
  border-color: var(--modern-dark-border) !important;
  background: transparent !important;
}

html[data-table-theme='dark'] :is(
  .account-session-dialog-header h2, .account-session-device-title,
  .account-session-device-title strong
) {
  color: var(--modern-dark-foreground) !important;
}

html[data-table-theme='dark'] :is(
  .account-session-summary, .account-session-device-meta,
  .account-session-device-expiry, .account-session-status
) {
  color: #aeb1ba !important;
}

html[data-table-theme='dark'] .account-session-current-tag {
  background: rgba(38, 166, 113, .14) !important;
  color: #75d9ad !important;
}

html[data-table-theme='dark'] .account-session-remember-tag {
  background: rgba(94, 106, 210, .16) !important;
  color: #b8bdff !important;
}

html[data-table-theme='dark'] :is(.account-session-revoke, .account-session-logout-others) {
  border-color: rgba(255, 126, 126, .3) !important;
  background: rgba(120, 28, 38, .14) !important;
  color: #ff9b9b !important;
}

html[data-table-theme='dark'] :is(.account-session-revoke, .account-session-logout-others):hover {
  border-color: rgba(255, 139, 139, .5) !important;
  background: rgba(160, 39, 52, .24) !important;
  color: #ffd0d0 !important;
}

html[data-table-theme='dark'] .account-session-close:hover,
html[data-table-theme='dark'] .account-session-close:focus-visible {
  background: rgba(94, 106, 210, .16) !important;
  color: #dfe2ff !important;
  outline-color: rgba(104, 114, 217, .72) !important;
}

/* Snapshot manager is another body-level application with a complete local
   light palette. Normalize its surfaces, labels, separators and controls. */
html[data-table-theme='dark'] .snapshot-manager-panel {
  background: #08080a !important;
}

html[data-table-theme='dark'] :is(
  .snapshot-manager-header, .snapshot-notice, .snapshot-section,
  .snapshot-background-detail, .snapshot-scope-group, .snapshot-segments,
  .snapshot-source-modes, .snapshot-source-mode span, .snapshot-preview,
  .snapshot-inline-status, .snapshot-scan-results, .snapshot-status,
  .snapshot-failure-row, .snapshot-background-detail-count
) {
  border-color: var(--modern-dark-border) !important;
  background: rgba(10, 10, 12, .9) !important;
  color: #c9cbd2 !important;
  box-shadow: none !important;
}

html[data-table-theme='dark'] :is(
  .snapshot-manager-header h2, .snapshot-section-heading h3,
  .snapshot-subsection-heading, .snapshot-background-detail summary,
  .snapshot-background-detail-row, .snapshot-scope-label,
  .snapshot-field, .snapshot-source-mode-field, .snapshot-check,
  .snapshot-scope-group strong, .snapshot-scope-group span
) {
  color: var(--modern-dark-foreground) !important;
}

html[data-table-theme='dark'] :is(
  .snapshot-manager-kicker, .snapshot-section-heading p,
  .snapshot-subsection-heading span, .snapshot-task-meta,
  .snapshot-task-time, .snapshot-history-row p, .snapshot-history-row time,
  .snapshot-background-detail-row span, .snapshot-empty,
  .snapshot-background-detail-empty
) {
  color: #aeb1ba !important;
}

html[data-table-theme='dark'] :is(
  .snapshot-manager-header, .snapshot-notice, .snapshot-subsection-heading,
  .snapshot-scope-all, .snapshot-background-detail-row,
  .snapshot-background-detail-empty, .snapshot-history-row
) {
  border-color: var(--modern-dark-border) !important;
}

html[data-table-theme='dark'] :is(.snapshot-icon-button, .snapshot-button) {
  border-color: var(--modern-dark-border-hover) !important;
  background: rgba(255, 255, 255, .05) !important;
  color: #d8dae0 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06) !important;
}

html[data-table-theme='dark'] :is(.snapshot-icon-button, .snapshot-button):hover:not(:disabled) {
  border-color: var(--modern-dark-border-accent) !important;
  background: rgba(94, 106, 210, .14) !important;
  color: #eef0ff !important;
}

html[data-table-theme='dark'] :is(
  .snapshot-segments .snapshot-button.is-active,
  .snapshot-source-mode input:checked + span,
  .snapshot-group-results .snapshot-button.is-selected
) {
  border-color: var(--modern-dark-border-accent) !important;
  background: rgba(94, 106, 210, .18) !important;
  color: #eef0ff !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08) !important;
}

html[data-table-theme='dark'] .snapshot-button-primary,
html[data-table-theme='dark'] .snapshot-button-primary:hover:not(:disabled) {
  border-color: rgba(123, 134, 232, .55) !important;
  background: var(--modern-dark-accent) !important;
  color: #fff !important;
}

html[data-table-theme='dark'] .snapshot-progress {
  background: rgba(255, 255, 255, .08) !important;
}

html[data-table-theme='dark'] .snapshot-notice[data-tone='success'],
html[data-table-theme='dark'] .snapshot-status[data-tone='success'],
html[data-table-theme='dark'] :is(.snapshot-preview, .snapshot-inline-status)[data-tone='success'] {
  border-color: rgba(99, 214, 157, .34) !important;
  background: rgba(38, 166, 113, .12) !important;
  color: #75d9ad !important;
}

html[data-table-theme='dark'] .snapshot-notice[data-tone='warning'],
html[data-table-theme='dark'] .snapshot-status[data-tone='warning'],
html[data-table-theme='dark'] .snapshot-inline-status[data-tone='warning'] {
  border-color: rgba(233, 199, 124, .34) !important;
  background: rgba(120, 79, 14, .16) !important;
  color: #e9c77c !important;
}

html[data-table-theme='dark'] .snapshot-notice[data-tone='error'],
html[data-table-theme='dark'] .snapshot-status[data-tone='error'],
html[data-table-theme='dark'] :is(.snapshot-preview, .snapshot-inline-status)[data-tone='error'],
html[data-table-theme='dark'] .snapshot-failure-row {
  border-color: rgba(255, 126, 126, .3) !important;
  background: rgba(120, 28, 38, .14) !important;
  color: #ff9b9b !important;
}

html[data-table-theme='dark'] .snapshot-notice[data-tone='active'],
html[data-table-theme='dark'] .snapshot-status[data-tone='active'] {
  border-color: var(--modern-dark-border-accent) !important;
  background: rgba(94, 106, 210, .16) !important;
  color: #b8bdff !important;
}

html[data-table-theme='dark'] .sector-theme-sort:hover,
html[data-table-theme='dark'] .sector-theme-sort:focus-visible,
html[data-table-theme='dark'] .sector-theme-sort:hover :is(span, .sector-theme-sort-arrow) {
  color: #9ba3f4 !important;
}

html[data-table-theme='dark'] :is(
  .stock-workbench-resizer, .sector-theme-resizer, .calendar-workspace-resizer
)::before {
  background: rgba(255, 255, 255, .12) !important;
  box-shadow: none !important;
}

html[data-table-theme='dark'] :is(
  .stock-workbench-resizer, .sector-theme-resizer, .calendar-workspace-resizer
):is(:hover, :focus-visible, .active)::before,
html[data-table-theme='dark'] .stock-detail-workbench.is-resizing .stock-workbench-resizer::before,
html[data-table-theme='dark'] .calendar-workspace.is-resizing .calendar-workspace-resizer::before {
  background: #6872d9 !important;
  box-shadow: 0 0 0 3px rgba(94, 106, 210, .18), 0 0 18px rgba(94, 106, 210, .2) !important;
}

/* Version and membership dialogs are lazy Vue components with scoped light
   copy; normalize both the containers and every text tier. */
html[data-table-theme='dark'] .version-dialog :is(.current-version-card, .release-card) {
  border-color: var(--modern-dark-border) !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .025)) !important;
  color: var(--modern-dark-foreground) !important;
  box-shadow: none !important;
}

html[data-table-theme='dark'] .version-dialog :is(.app-name, .history-title, .release-title) {
  color: var(--modern-dark-foreground) !important;
}

html[data-table-theme='dark'] .version-dialog :is(
  .update-time, .change-list, .change-list li, .el-timeline-item__timestamp
) {
  color: #b8bbc3 !important;
}

html[data-table-theme='dark'] .version-dialog .release-version {
  color: #9ba3f4 !important;
}

html[data-table-theme='dark'] .version-dialog :is(.stock-detail-version-current, .el-tag) {
  border-color: var(--modern-dark-border-accent) !important;
  background: rgba(94, 106, 210, .2) !important;
  color: #eef0ff !important;
}

html[data-table-theme='dark'] .version-dialog :is(.stock-detail-version-current, .el-tag, .el-tag__content):hover,
html[data-table-theme='dark'] .version-dialog .el-tag__content {
  color: #eef0ff !important;
}

html[data-table-theme='dark'] .version-dialog :is(.el-timeline-item__tail, .el-timeline-item__node) {
  border-color: var(--modern-dark-border-hover) !important;
}

html[data-table-theme='dark'] .membership-warning-dialog :is(.warning-message, .contact-title) {
  color: var(--modern-dark-foreground) !important;
}

html[data-table-theme='dark'] .membership-warning-dialog :is(.warning-tip, .qr-code-placeholder p, .qr-tip) {
  color: #aeb1ba !important;
}

html[data-table-theme='dark'] .membership-warning-dialog :is(.admin-contact, .qr-code-placeholder) {
  border-color: var(--modern-dark-border) !important;
}

html[data-table-theme='dark'] .membership-warning-dialog .qr-code-placeholder {
  background: rgba(255, 255, 255, .035) !important;
}

html[data-table-theme='dark'] .technical-chart-height-resizer {
  border-color: var(--modern-dark-border) !important;
  background: rgba(255, 255, 255, .035) !important;
}

html[data-table-theme='dark'] .technical-chart-height-resizer::after {
  background: rgba(174, 177, 186, .58) !important;
}

html[data-table-theme='dark'] .technical-chart-height-resizer:is(:hover, :focus, .active) {
  border-color: var(--modern-dark-border-accent) !important;
  background: rgba(94, 106, 210, .12) !important;
}

html[data-table-theme='dark'] .technical-chart-height-resizer:is(:hover, :focus, .active)::after {
  background: #9ba3f4 !important;
}

html[data-table-theme='dark'] .uiux-study-app :is(
  .guidance-block, .empty-state, .project-field textarea
),
html[data-table-theme='dark'] .study-app .empty-state {
  border-color: var(--modern-dark-border) !important;
  background: rgba(10, 10, 12, .82) !important;
  color: #b8bbc3 !important;
}

html[data-table-theme='dark'] .uiux-study-app .project-field textarea {
  background: var(--modern-dark-input) !important;
  color: var(--modern-dark-foreground) !important;
}

html[data-table-theme='dark'] .uiux-study-app .project-nav__number {
  background: #4d58bc !important;
  color: #fff !important;
}

html[data-table-theme='dark'] .uiux-study-app .project-goal {
  border-color: rgba(87, 194, 184, .38) !important;
  background: rgba(31, 122, 122, .15) !important;
  color: #8ed7ce !important;
}

html[data-table-theme='dark'] .uiux-study-app .guidance-block h4 {
  color: #b8bdff !important;
}

html[data-table-theme='dark'] :is(.study-app, .uiux-study-app) .empty-state strong {
  color: var(--modern-dark-foreground) !important;
}

html[data-table-theme='dark'] :is(.study-app, .uiux-study-app) .empty-state span {
  color: #aeb1ba !important;
}

html[data-table-theme='dark'] ::selection {
  background: rgba(94, 106, 210, .46);
  color: #fff;
}

html[data-table-theme='dark'] * {
  scrollbar-color: rgba(126, 134, 150, .5) rgba(255, 255, 255, .025);
}

html[data-table-theme='dark'] *::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, .02) !important;
}

html[data-table-theme='dark'] *::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(126, 134, 150, .45) !important;
  background-clip: padding-box !important;
}

html[data-table-theme='dark'] *::-webkit-scrollbar-thumb:hover {
  background: rgba(155, 163, 244, .58) !important;
  background-clip: padding-box !important;
}

@media (prefers-reduced-motion: reduce) {
  html[data-table-theme='dark'] body::before,
  html[data-table-theme='dark'] body::after {
    animation: none;
  }

  html[data-table-theme='dark'] * {
    scroll-behavior: auto !important;
  }
}

@media (max-width: 768px) {
  html[data-table-theme='dark'] body::before,
  html[data-table-theme='dark'] body::after {
    width: 110vw;
    height: 80vh;
    opacity: .09;
    filter: blur(110px);
  }
}
