/* Theme controls */
#deleteAuthModal {
  z-index: 7060;
}

#deleteAuthModal .modal-dialog {
  width: calc(100% - 2rem);
  max-width: 30rem;
  margin-right: auto;
  margin-left: auto;
}

#deleteAuthModal .close {
  width: 44px;
  height: 44px;
  padding: 0;
}

html[data-theme="dark"] #deleteAuthModal .modal-content {
  border: 1px solid rgba(96, 165, 250, 0.24);
  background: #0d1626;
  color: #e6edf7;
  box-shadow: 0 24px 64px rgba(1, 5, 12, 0.62);
}

html[data-theme="dark"] #deleteAuthModal :is(.modal-header, .modal-footer) {
  border-color: rgba(96, 165, 250, 0.16);
}

html[data-theme="dark"] #deleteAuthModal .text-muted {
  color: #a8b7ca !important;
}

html[data-theme="dark"] #deleteAuthModal .close {
  color: #dbeafe;
  text-shadow: none;
}

html[data-theme="dark"] #deleteAuthModal .form-control {
  border-color: rgba(96, 165, 250, 0.28);
  background: #08111f;
  color: #f8fbff;
}

html[data-theme="dark"] #deleteAuthModal .form-control:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.18);
}

html[data-theme="dark"] {
  color-scheme: dark;
}

html:is([data-theme="light"], [data-theme="blue"]) {
  color-scheme: light;
  background: #f4f7fb;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 8px;
  background: rgba(22, 119, 255, 0.1);
  color: #dbeafe;
  font: inherit;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: rgba(96, 165, 250, 0.62);
  background: rgba(22, 119, 255, 0.18);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.13);
  outline: 0;
}

.theme-toggle-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  font-family: "Segoe UI Symbol", "Arial Unicode MS", sans-serif;
  font-size: 18px;
  line-height: 1;
}

.theme-toggle-nav {
  display: flex;
  align-items: center;
  margin-right: 0.2rem;
}

.theme-toggle-nav .theme-toggle,
.theme-toggle-nav .theme-toggle:hover,
.theme-toggle-nav .theme-toggle:focus-visible {
  border-color: transparent;
}

.login-theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10;
  width: auto;
  min-width: 72px;
  gap: 10px;
  padding: 0 11px;
}

.theme-toggle-mark {
  font-size: 0.7rem;
  font-weight: 800;
}

.screen-theme-toggle {
  width: 38px;
  height: 38px;
}

/* Global light surfaces */
html:is([data-theme="light"], [data-theme="blue"]) body {
  background-color: #f4f7fb;
  color: #172033;
}

html:is([data-theme="light"], [data-theme="blue"]) .app-navbar {
  background: #fff;
  border-bottom-color: #dbe4ef;
  box-shadow: 0 8px 24px rgba(24, 39, 75, 0.08);
}

html:is([data-theme="light"], [data-theme="blue"]) .app-navbar .navbar-brand,
html:is([data-theme="light"], [data-theme="blue"]) .app-navbar .navbar-brand:hover {
  color: #172033;
}

html:is([data-theme="light"], [data-theme="blue"]) .brand-mark {
  border-color: #b9d6ff;
  background: #eaf3ff;
  color: #0f5ed7;
  box-shadow: none;
}

html:is([data-theme="light"], [data-theme="blue"]) .app-navbar .nav-link {
  color: #44546a;
}

html:is([data-theme="light"], [data-theme="blue"]) .app-navbar .nav-group-icon {
  color: #1967d2;
}

html:is([data-theme="light"], [data-theme="blue"]) .app-navbar .nav-link:hover,
html:is([data-theme="light"], [data-theme="blue"]) .app-navbar .nav-item.active > .nav-link,
html:is([data-theme="light"], [data-theme="blue"]) .app-navbar .nav-item.show > .nav-link {
  border-color: #c7dcfa;
  background: #edf5ff;
  color: #0f4fa8;
}

html:is([data-theme="light"], [data-theme="blue"]) body.app-shell.app-shell .app-navbar .dropdown-menu,
html:is([data-theme="light"], [data-theme="blue"]) .dropdown-menu {
  border-color: #d9e2ec !important;
  background: #fff !important;
  color: #26364d !important;
  box-shadow: 0 18px 44px rgba(24, 39, 75, 0.16) !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.app-shell.app-shell .app-navbar .dropdown-item,
html:is([data-theme="light"], [data-theme="blue"]) .dropdown-menu a,
html:is([data-theme="light"], [data-theme="blue"]) .dropdown-item {
  color: #34445b !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.app-shell.app-shell .app-navbar .dropdown-item:hover,
html:is([data-theme="light"], [data-theme="blue"]) body.app-shell.app-shell .app-navbar .dropdown-item:focus,
html:is([data-theme="light"], [data-theme="blue"]) body.app-shell.app-shell .app-navbar .dropdown-item.active,
html:is([data-theme="light"], [data-theme="blue"]) .dropdown-menu a:hover,
html:is([data-theme="light"], [data-theme="blue"]) .dropdown-item:hover,
html:is([data-theme="light"], [data-theme="blue"]) .dropdown-item:focus {
  background: #edf5ff !important;
  color: #0f4fa8 !important;
  box-shadow: none !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.app-shell.app-shell .app-navbar .dropdown-divider,
html:is([data-theme="light"], [data-theme="blue"]) .dropdown-divider {
  border-top-color: #e2e8f0 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.app-shell.app-shell .app-navbar .nav-item-icon {
  color: #60738d !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.app-shell.app-shell .app-navbar .dropdown-item.active .nav-item-icon {
  color: #0f5ed7 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.app-shell.app-shell .app-navbar .dropdown-item.platform-xhs:is(.active, :active) {
  background: #fff0f2 !important;
  color: #a3203a !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.app-shell.app-shell .app-navbar .dropdown-item.platform-xhs:is(.active, :active) .nav-item-icon {
  color: #d72a45 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.app-shell.app-shell .app-navbar .dropdown-item.platform-douyin:is(.active, :active) {
  background: #e9fbfb !important;
  color: #125963 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.app-shell.app-shell .app-navbar .dropdown-item.platform-douyin:is(.active, :active) .nav-item-icon {
  color: #167c84 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) .app-navbar .navbar-toggler {
  border-color: #bac8d8;
}

html:is([data-theme="light"], [data-theme="blue"]) .app-navbar .navbar-toggler-icon {
  filter: invert(1) opacity(0.72);
}

html:is([data-theme="light"], [data-theme="blue"]) .theme-toggle {
  border-color: #cbd7e6;
  background: #f7f9fc;
  color: #34445b;
}

html:is([data-theme="light"], [data-theme="blue"]) .theme-toggle:hover,
html:is([data-theme="light"], [data-theme="blue"]) .theme-toggle:focus-visible {
  border-color: #8db9f3;
  background: #eaf3ff;
  color: #0f5ed7;
}

html:is([data-theme="light"], [data-theme="blue"]) .theme-toggle-nav .theme-toggle,
html:is([data-theme="light"], [data-theme="blue"]) .theme-toggle-nav .theme-toggle:hover,
html:is([data-theme="light"], [data-theme="blue"]) .theme-toggle-nav .theme-toggle:focus-visible {
  border-color: transparent;
}

html:is([data-theme="light"], [data-theme="blue"]) footer,
html:is([data-theme="light"], [data-theme="blue"]) .overview-body footer,
html:is([data-theme="light"], [data-theme="blue"]) .dashboard-page footer,
html:is([data-theme="light"], [data-theme="blue"]) .statistics-page footer,
html:is([data-theme="light"], [data-theme="blue"]) .import-page footer {
  border-top-color: #dbe4ef !important;
  background: #fff !important;
  color: #607086 !important;
}

/* Shared controls and overlays */
html:is([data-theme="light"], [data-theme="blue"]) body.app-shell select,
html:is([data-theme="light"], [data-theme="blue"]) body.app-shell .custom-select,
html:is([data-theme="light"], [data-theme="blue"]) body.app-shell .form-control,
html:is([data-theme="light"], [data-theme="blue"]) body.app-shell input,
html:is([data-theme="light"], [data-theme="blue"]) body.app-shell textarea,
html:is([data-theme="light"], [data-theme="blue"]) body.app-shell .input-group-text {
  border-color: #cbd7e6 !important;
  background-color: #fff !important;
  color: #172033 !important;
  color-scheme: light;
}

html:is([data-theme="light"], [data-theme="blue"]) body.app-shell select:focus,
html:is([data-theme="light"], [data-theme="blue"]) body.app-shell .custom-select:focus,
html:is([data-theme="light"], [data-theme="blue"]) body.app-shell .form-control:focus,
html:is([data-theme="light"], [data-theme="blue"]) body.app-shell input:focus,
html:is([data-theme="light"], [data-theme="blue"]) body.app-shell textarea:focus {
  border-color: #3182e8 !important;
  background-color: #fff !important;
  color: #172033 !important;
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.13) !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.app-shell input::placeholder,
html:is([data-theme="light"], [data-theme="blue"]) body.app-shell textarea::placeholder {
  color: #66758b !important;
  opacity: 1;
}

html:is([data-theme="light"], [data-theme="blue"]) body.app-shell select option,
html:is([data-theme="light"], [data-theme="blue"]) body.app-shell select optgroup {
  background: #fff;
  color: #172033 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.app-shell :is(.select-trigger, .st-select-trigger) {
  border-color: #cbd7e6;
  background: #fff;
  color: #172033;
}

html:is([data-theme="light"], [data-theme="blue"]) body.app-shell :is(.select-menu, .st-select-menu) {
  border-color: #d4deea;
  background: #fff;
  box-shadow: 0 18px 44px rgba(24, 39, 75, 0.16);
}

html:is([data-theme="light"], [data-theme="blue"]) body.app-shell :is(.select-item, .st-select-item) {
  color: #26364d;
}

html:is([data-theme="light"], [data-theme="blue"]) body.app-shell :is(.select-item, .st-select-item):hover,
html:is([data-theme="light"], [data-theme="blue"]) body.app-shell :is(.select-item, .st-select-item):focus,
html:is([data-theme="light"], [data-theme="blue"]) body.app-shell :is(.select-item, .st-select-item).active,
html:is([data-theme="light"], [data-theme="blue"]) body.app-shell :is(.select-item, .st-select-item)[aria-selected="true"] {
  border-color: #c7dcfa;
  background: #edf5ff;
  color: #0f4fa8;
}

html:is([data-theme="light"], [data-theme="blue"]) .modal,
html:is([data-theme="light"], [data-theme="blue"]) .custom-modal {
  background: rgba(15, 23, 42, 0.42) !important;
}

html:is([data-theme="light"], [data-theme="blue"]) .modal-content,
html:is([data-theme="light"], [data-theme="blue"]) .custom-modal-content,
html:is([data-theme="light"], [data-theme="blue"]) .ai-progress-modal {
  border-color: #d9e2ec !important;
  background: #fff !important;
  color: #172033 !important;
  box-shadow: 0 24px 64px rgba(24, 39, 75, 0.2) !important;
}

html:is([data-theme="light"], [data-theme="blue"]) .modal-header,
html:is([data-theme="light"], [data-theme="blue"]) .modal-footer {
  border-color: #e2e8f0 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) .modal .close {
  color: #44546a !important;
  text-shadow: none;
}

/* Overview */
html:is([data-theme="light"], [data-theme="blue"]) body.overview-body {
  --overview-bg: #f4f7fb;
  --overview-surface: #fff;
  --overview-surface-raised: #f8fafc;
  --overview-surface-strong: #f8fafc;
  --overview-border: #d8e2ee;
  --overview-border-soft: #e5ebf2;
  --overview-text: #172033;
  --overview-muted: #5f6f84;
  background-color: #f4f7fb;
  background-image: linear-gradient(#e8eef6 1px, transparent 1px), linear-gradient(90deg, #e8eef6 1px, transparent 1px);
}

html:is([data-theme="light"], [data-theme="blue"]) .overview-panel,
html:is([data-theme="light"], [data-theme="blue"]) .overview-platform-note,
html:is([data-theme="light"], [data-theme="blue"]) .overview-hero,
html:is([data-theme="light"], [data-theme="blue"]) .overview-summary,
html:is([data-theme="light"], [data-theme="blue"]) .overview-section,
html:is([data-theme="light"], [data-theme="blue"]) .overview-lower-grid > div {
  border-color: #d8e2ee;
  background: #fff;
  box-shadow: 0 12px 32px rgba(24, 39, 75, 0.08);
}

html:is([data-theme="light"], [data-theme="blue"]) .overview-source-content strong,
html:is([data-theme="light"], [data-theme="blue"]) .overview-tool-content strong,
html:is([data-theme="light"], [data-theme="blue"]) .overview-platform-note-copy strong,
html:is([data-theme="light"], [data-theme="blue"]) .capability-item strong {
  color: #172033;
}

html:is([data-theme="light"], [data-theme="blue"]) .overview-source-row:hover,
html:is([data-theme="light"], [data-theme="blue"]) .overview-source-row:focus,
html:is([data-theme="light"], [data-theme="blue"]) .overview-tool-row:hover,
html:is([data-theme="light"], [data-theme="blue"]) .overview-tool-row:focus {
  background: #edf5ff;
  color: #0f4fa8;
}

html:is([data-theme="light"], [data-theme="blue"]) .overview-primary-link {
  border-color: #9fc4f6;
  background: #eaf3ff;
  color: #0f5ed7;
}

html:is([data-theme="light"], [data-theme="blue"]) .overview-primary-link:hover,
html:is([data-theme="light"], [data-theme="blue"]) .overview-primary-link:focus {
  border-color: #4f91e8;
  background: #dcecff;
  color: #0b459b;
  box-shadow: none;
}

/* New dashboard, statistics, and import surfaces */
html:is([data-theme="light"], [data-theme="blue"]) body.dashboard-page,
html:is([data-theme="light"], [data-theme="blue"]) body.statistics-page,
html:is([data-theme="light"], [data-theme="blue"]) body.import-page {
  background: #f4f7fb !important;
  color: #172033 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) .dashboard-container {
  --dashboard-bg: #f4f7fb;
  --dashboard-surface: #fff;
  --dashboard-surface-strong: #f8fafc;
  --dashboard-border: #d8e2ee;
  --dashboard-border-strong: #9fc4f6;
  --dashboard-text: #172033;
  --dashboard-muted: #5f6f84;
  --dashboard-soft: #44546a;
}

html:is([data-theme="light"], [data-theme="blue"]) .st-page,
html:is([data-theme="light"], [data-theme="blue"]) .import-console {
  --bg: #f4f7fb;
  --surface: #fff;
  --surface-strong: #f8fafc;
  --border: #d8e2ee;
  --border-strong: #9fc4f6;
  --text: #172033;
  --muted: #5f6f84;
  --soft: #44546a;
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.dashboard-container, .st-page, .import-console)::before {
  opacity: 0.45;
  background-image: linear-gradient(#e7edf5 1px, transparent 1px), linear-gradient(90deg, #e7edf5 1px, transparent 1px);
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.dashboard-hero, .st-header, .import-hero) {
  border-color: #d8e2ee;
  background: #fff;
  box-shadow: 0 14px 38px rgba(24, 39, 75, 0.09);
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.dashboard-hero h1, .st-header h1, .import-hero h1) {
  color: #172033;
  text-shadow: none;
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.dashboard-toolbar, .dashboard-panel, .st-overview-suite, .st-panel, .st-platform-section, .import-panel, .import-section) {
  border-color: #d8e2ee;
  background: #fff;
  box-shadow: 0 12px 32px rgba(24, 39, 75, 0.08);
  backdrop-filter: none;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page :is(.st-overview-suite-head, .st-filters, .st-trend) {
  border-color: #d8e2ee;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .st-overview-suite .st-filters {
  background: #f7f9fc;
  box-shadow: none;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .st-overview-suite .st-card {
  box-shadow: none;
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.select-wrap, .st-input-wrap, .import-input-wrap, .dashboard-stat-tabs, .daily-tabs) {
  border-color: #cbd7e6;
  background: #f7f9fc;
  color: #5f6f84;
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.dashboard-stat-tabs, .daily-tabs) {
  border-color: #aebfd2 !important;
  background-clip: padding-box;
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.metric-card, .st-card, .import-card) {
  border-color: #dce5ef;
  background: #fff;
  color: #172033;
  box-shadow: 0 8px 24px rgba(24, 39, 75, 0.06);
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .st-live {
  border-color: #86dca8;
  background: #ecfdf3;
  color: #137a3a;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .st-live-dot {
  background: #16a34a;
  box-shadow: 0 0 0 5px #c9f3d8;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page :is(.st-eyebrow, .st-panel-kicker) {
  color: #0f5ed7;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page :is(.st-input-wrap > i, .st-select-trigger .select-leading i, .st-select-caret) {
  color: #486482;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .st-select-shell.open .st-select-caret {
  color: #0f5ed7;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .st-date-trigger {
  border-color: #a9ccff;
  background: #eaf3ff;
  color: #0f5ed7;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .st-date-trigger:hover,
html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .st-date-trigger:focus-visible {
  border-color: #6ea6ef;
  background: #dcecff;
  color: #0b459b;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .st-platform-switch {
  border-color: #cbd7e6;
  background: #f4f7fb;
  box-shadow: none;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .st-platform-switch button {
  color: #52657d;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .st-platform-switch button:hover,
html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .st-platform-switch button:focus-visible {
  border-color: #9fc4f6;
  background: #eaf3ff;
  color: #0f5ed7;
  outline: 0;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .st-platform-switch button.active[data-platform=""] {
  border-color: #1677ff;
  background: #1677ff;
  color: #fff;
  box-shadow: none;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .st-platform-switch button.active[data-platform="douyin"] {
  border-color: #66d9dc;
  background: #e5fbfb;
  color: #0b6971;
  box-shadow: none;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .st-platform-switch button.active[data-platform="xiaohongshu"] {
  border-color: #ff92a3;
  background: #fff0f2;
  color: #c91837;
  box-shadow: none;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .st-card-icon {
  color: var(--card-color);
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .c-total .st-card-icon {
  border-color: #a9ccff;
  background: #eaf3ff;
  color: #0f5ed7;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .c-valid .st-card-icon {
  border-color: #a4e5bf;
  background: #eafbf2;
  color: #168a4a;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .c-invalid .st-card-icon {
  border-color: #ffc2cb;
  background: #fff0f2;
  color: #d9364f;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .c-negative .st-card-icon {
  border-color: #d8c4ff;
  background: #f4eeff;
  color: #7138c7;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .c-intent .st-card-icon {
  border-color: #ffd98a;
  background: #fff6df;
  color: #a85f00;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .c-pending .st-card-icon {
  border-color: #a9dcf2;
  background: #e8f8ff;
  color: #007aaf;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .c-bio .st-card-icon {
  border-color: #cfbdff;
  background: #f2edff;
  color: #6d3bd1;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .c-contact .st-card-icon {
  border-color: #a5e2dc;
  background: #e9fbf8;
  color: #087f77;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .c-total .st-panel-kicker {
  color: #0f5ed7;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .c-valid .st-panel-kicker {
  color: #137a3a;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .c-valid .st-card-pct {
  border-color: #a4e5bf;
  background: #eafbf2;
  color: #137a3a;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .c-invalid .st-panel-kicker {
  color: #c52c47;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .c-invalid .st-card-pct {
  border-color: #ffc2cb;
  background: #fff0f2;
  color: #c52c47;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .c-negative .st-panel-kicker {
  color: #7138c7;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .c-negative .st-card-pct {
  border-color: #d8c4ff;
  background: #f4eeff;
  color: #7138c7;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .c-intent .st-panel-kicker {
  color: #8a4d00;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .c-intent .st-card-pct {
  border-color: #ffd98a;
  background: #fff6df;
  color: #8a4d00;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .c-pending .st-panel-kicker {
  color: #006b99;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .c-bio .st-panel-kicker {
  color: #6535bc;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .c-contact .st-panel-kicker {
  color: #08746e;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page :is(.st-platform-tag, .st-panel-tag).all {
  border-color: #9fc4f6;
  background: #eaf3ff;
  color: #0f5ed7;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page :is(.st-platform-tag, .st-panel-tag, .st-kw-plat-tag).dy {
  border-color: #8ddbdd;
  background: #e9fbfb;
  color: #0b6870;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page :is(.st-platform-tag, .st-panel-tag, .st-kw-plat-tag).xhs {
  border-color: #ffb5c0;
  background: #fff0f2;
  color: #b91c36;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .st-empty i {
  background: #eaf3ff;
  color: #0f5ed7;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .st-lvl-track {
  border-color: #dce5ef;
  background: #eef3f8;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .st-table-wrap {
  border-color: #d8e2ee;
  background: #fff;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .st-table {
  color: #34445b;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .st-table th {
  border-color: #dce5ef;
  background: #f1f5f9;
  color: #34445b;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .st-table td {
  border-color: #e5ebf2;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .st-table tbody tr:hover {
  background: #f0f6ff;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .st-proj-total td {
  border-top-color: #c7dcfa;
  background: #eaf3ff;
  color: #172033;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page :is(.st-proj-row, .st-kw-item) {
  border-color: #d8e2ee;
  background: #fff;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page :is(.st-proj-header, .st-kw-header) {
  background: #f7f9fc;
  color: #172033;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page :is(.st-proj-header, .st-kw-header):hover,
html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .st-kw-header.expanded {
  background: #edf5ff;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .st-proj-header.unmatched {
  background: #f1f5f9;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page :is(.st-proj-expand-icon, .st-kw-expand-icon) {
  border-color: #a9ccff;
  background: #eaf3ff;
  color: #0f5ed7;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page :is(.st-proj-stat, .st-kw-stat, .st-video-stat) {
  border-color: #dce5ef;
  background: #f6f8fb;
  color: #44546a;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page :is(.st-proj-stat-value, .st-kw-stat-value, .st-video-stat-value) {
  color: #172033;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page :is(.st-kw-stat-value.success, .st-video-stat-value.success, .st-semantic-success) {
  color: #137a3a;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .st-semantic-danger {
  color: #c52c47;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .st-semantic-negative {
  color: #7138c7;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .st-semantic-intent {
  color: #8a4d00;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .st-video-card {
  border-color: #dce5ef;
  background: #f8fafc;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .st-video-title {
  color: #44546a;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .st-video-title a {
  color: #0f5ed7;
}

html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .st-video-title a:hover,
html:is([data-theme="light"], [data-theme="blue"]) .statistics-page .st-video-title a:focus-visible {
  color: #0b459b;
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.metric-detail span, .metric-note, .st-card-pct, .st-pill) {
  border-color: #dce5ef;
  background: #f6f8fb;
  color: #44546a;
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.dashboard-tab, .st-tab) {
  color: #5f6f84;
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.dashboard-tab, .st-tab).is-active,
html:is([data-theme="light"], [data-theme="blue"]) :is(.dashboard-tab, .st-tab).active {
  border-color: #9fc4f6;
  background: #eaf3ff;
  color: #0f5ed7;
  box-shadow: none;
}

html:is([data-theme="light"], [data-theme="blue"]) .dashboard-page .action-button.secondary {
  border-color: #cbd7e6;
  background: #f7f9fc;
  color: #34445b;
}

html:is([data-theme="light"], [data-theme="blue"]) .dashboard-page .action-button.secondary:hover,
html:is([data-theme="light"], [data-theme="blue"]) .dashboard-page .action-button.secondary:focus-visible {
  border-color: #8db9f3;
  background: #eaf3ff;
  color: #0f5ed7;
}

html:is([data-theme="light"], [data-theme="blue"]) .dashboard-page .table-shell,
html:is([data-theme="light"], [data-theme="blue"]) .dashboard-page .data-table,
html:is([data-theme="light"], [data-theme="blue"]) .dashboard-page .data-table tbody tr {
  border-color: #d8e2ee;
  background: #fff;
  color: #26364d;
}

html:is([data-theme="light"], [data-theme="blue"]) .dashboard-page .data-table th {
  border-color: #dce5ef;
  background: #f1f5f9;
  color: #34445b;
}

html:is([data-theme="light"], [data-theme="blue"]) .dashboard-page .data-table td {
  border-color: #e5ebf2;
  color: #26364d;
}

html:is([data-theme="light"], [data-theme="blue"]) .dashboard-page .data-table tbody tr:hover {
  background: #f0f6ff;
}

html:is([data-theme="light"], [data-theme="blue"]) .dashboard-page .empty-state {
  background: #f7f9fc;
  color: #5f6f84;
}

html:is([data-theme="light"], [data-theme="blue"]) .dashboard-page .empty-state i {
  background: #eaf3ff;
  color: #1677ff;
}

html:is([data-theme="light"], [data-theme="blue"]) body.app-shell .sl-list-pager {
  border-color: #d8e2ee;
  background: #f7f9fc;
  color: #34445b;
}

html:is([data-theme="light"], [data-theme="blue"]) body.app-shell .sl-page-info,
html:is([data-theme="light"], [data-theme="blue"]) body.app-shell .sl-page-ellipsis {
  color: #5f6f84;
}

html:is([data-theme="light"], [data-theme="blue"]) body.app-shell .sl-page-btn,
html:is([data-theme="light"], [data-theme="blue"]) body.app-shell .sl-page-jump input {
  border-color: #cbd7e6;
  background: #fff;
  color: #34445b;
}

html:is([data-theme="light"], [data-theme="blue"]) body.app-shell .sl-page-btn:hover:not(:disabled),
html:is([data-theme="light"], [data-theme="blue"]) body.app-shell .sl-page-btn:focus:not(:disabled) {
  border-color: #8db9f3;
  background: #eaf3ff;
  color: #0f5ed7;
}

html:is([data-theme="light"], [data-theme="blue"]) body.app-shell .sl-page-btn:disabled {
  border-color: #d8e0ea;
  background: #e9eef5;
  color: #718096;
  opacity: 1;
}

html:is([data-theme="light"], [data-theme="blue"]) body.app-shell .sl-page-btn.active,
html:is([data-theme="light"], [data-theme="blue"]) body.app-shell .sl-page-jump button {
  border-color: #1677ff;
  background: #1677ff;
  color: #fff;
}

html:is([data-theme="light"], [data-theme="blue"]) body.app-shell :is(.table-responsive, .st-table-wrap) {
  color-scheme: light;
  scrollbar-color: #9aadc2 #edf1f6;
}

html:is([data-theme="light"], [data-theme="blue"]) body.app-shell :is(.table-responsive, .st-table-wrap)::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

html:is([data-theme="light"], [data-theme="blue"]) body.app-shell :is(.table-responsive, .st-table-wrap)::-webkit-scrollbar-track,
html:is([data-theme="light"], [data-theme="blue"]) body.app-shell :is(.table-responsive, .st-table-wrap)::-webkit-scrollbar-corner,
html:is([data-theme="light"], [data-theme="blue"]) body.app-shell :is(.table-responsive, .st-table-wrap)::-webkit-scrollbar-button {
  background: #edf1f6;
}

html:is([data-theme="light"], [data-theme="blue"]) body.app-shell :is(.table-responsive, .st-table-wrap)::-webkit-scrollbar-thumb {
  border: 2px solid #edf1f6;
  border-radius: 999px;
  background: #9aadc2;
}

/* Import workspace */
html:is([data-theme="light"], [data-theme="blue"]) .import-page {
  scrollbar-color: #a8b8cc #edf1f6;
}

html:is([data-theme="light"], [data-theme="blue"]) .import-page::-webkit-scrollbar-track,
html:is([data-theme="light"], [data-theme="blue"]) .import-page::-webkit-scrollbar-corner,
html:is([data-theme="light"], [data-theme="blue"]) .import-page::-webkit-scrollbar-button {
  background: #edf1f6;
}

html:is([data-theme="light"], [data-theme="blue"]) .import-page::-webkit-scrollbar-thumb {
  border-color: #edf1f6;
  background: #a8b8cc;
}

html:is([data-theme="light"], [data-theme="blue"]) .import-page :is(.panel-meta, .platform-switch, .file-label, .file-name, .upload-actions, .review-card, .table-shell, .batch-pagination, .batch-selection, .batch-column, .collapsible-content, .batch-options, .checkbox-label) {
  border-color: #d8e2ee !important;
  background: #f7f9fc !important;
  color: #26364d !important;
  box-shadow: none !important;
  backdrop-filter: none;
}

html:is([data-theme="light"], [data-theme="blue"]) .import-page .platform-option {
  color: #52657d;
}

html:is([data-theme="light"], [data-theme="blue"]) .import-page .platform-option i {
  background: #eaf3ff;
  color: #1967d2;
}

html:is([data-theme="light"], [data-theme="blue"]) .import-page .platform-option:hover,
html:is([data-theme="light"], [data-theme="blue"]) .import-page .platform-option:focus-visible {
  border-color: #9fc4f6;
  background: #edf5ff;
  color: #0f4fa8;
}

html:is([data-theme="light"], [data-theme="blue"]) .import-page .platform-option.platform-douyin.active {
  border-color: #72d5d7;
  background: #e7fafa;
  color: #125963;
  box-shadow: none;
}

html:is([data-theme="light"], [data-theme="blue"]) .import-page .platform-option.platform-xhs.active {
  border-color: #ff9dac;
  background: #fff0f2;
  color: #a3203a;
  box-shadow: none;
}

html:is([data-theme="light"], [data-theme="blue"]) .import-page :is(.file-copy strong, .task-toggle strong, .review-card strong, .column-header h3, .batch-info strong) {
  color: #172033;
}

html:is([data-theme="light"], [data-theme="blue"]) .import-page :is(.file-copy small, .task-toggle small, .review-card small, .file-name, .batch-project, .batch-count) {
  color: #5f6f84 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) .import-page :is(.file-icon, .file-cta) {
  border-color: #b9d6ff;
  background: #eaf3ff;
  color: #0f5ed7;
}

html:is([data-theme="light"], [data-theme="blue"]) .import-page .file-label:hover,
html:is([data-theme="light"], [data-theme="blue"]) .import-page .file-label.drag-over,
html:is([data-theme="light"], [data-theme="blue"]) .import-page .review-card:hover,
html:is([data-theme="light"], [data-theme="blue"]) .import-page .review-card:focus {
  border-color: #8db9f3 !important;
  background: #edf5ff !important;
  color: #172033 !important;
  box-shadow: 0 10px 24px rgba(24, 39, 75, 0.1) !important;
}

html:is([data-theme="light"], [data-theme="blue"]) .import-page .file-name.has-file {
  border-color: #9bd8b8 !important;
  background: #edf9f2 !important;
  color: #087f46 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) .import-page .toggle-box {
  border-color: #8fd3ad;
  background: #e7f7ee;
  color: #087f46;
}

html:is([data-theme="light"], [data-theme="blue"]) .import-page .task-toggle input:not(:checked) + .toggle-box,
html:is([data-theme="light"], [data-theme="blue"]) .import-page .checkmark {
  border-color: #cbd7e6;
  background: #fff;
}

html:is([data-theme="light"], [data-theme="blue"]) .import-page .console-button:not(.primary),
html:is([data-theme="light"], [data-theme="blue"]) .import-page .page-button,
html:is([data-theme="light"], [data-theme="blue"]) .import-page .icon-button,
html:is([data-theme="light"], [data-theme="blue"]) .import-page .toggle-btn {
  border-color: #cbd7e6;
  background: #fff;
  color: #34445b;
  box-shadow: none;
}

html:is([data-theme="light"], [data-theme="blue"]) .import-page .console-button:not(.primary):hover,
html:is([data-theme="light"], [data-theme="blue"]) .import-page .console-button:not(.primary):focus,
html:is([data-theme="light"], [data-theme="blue"]) .import-page .page-button:hover,
html:is([data-theme="light"], [data-theme="blue"]) .import-page .icon-button:hover,
html:is([data-theme="light"], [data-theme="blue"]) .import-page .icon-button:focus,
html:is([data-theme="light"], [data-theme="blue"]) .import-page .toggle-btn:hover,
html:is([data-theme="light"], [data-theme="blue"]) .import-page .toggle-btn:focus {
  border-color: #8db9f3;
  background: #eaf3ff;
  color: #0f5ed7;
}

html:is([data-theme="light"], [data-theme="blue"]) .import-page .console-button.primary {
  border-color: #1677ff;
  background: #1677ff;
  color: #fff;
}

html:is([data-theme="light"], [data-theme="blue"]) .import-page .console-button:disabled {
  opacity: 1;
  border-color: #d8e0ea;
  background: #e9eef5;
  color: #718096;
}

html:is([data-theme="light"], [data-theme="blue"]) .import-page .review-card.platform-xhs {
  border-color: #ffc5ce !important;
  background: #fff7f8 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) .import-page .review-card.platform-douyin {
  border-color: #a8dfe1 !important;
  background: #f3fbfb !important;
}

html:is([data-theme="light"], [data-theme="blue"]) .import-page .review-card.platform-xhs .review-icon {
  border-color: #ffb5c0;
  background: #fff0f2;
  color: #a3203a;
}

html:is([data-theme="light"], [data-theme="blue"]) .import-page .review-card.platform-douyin .review-icon {
  border-color: #8ddbdd;
  background: #e9fbfb;
  color: #125963;
}

html:is([data-theme="light"], [data-theme="blue"]) .import-page .data-table {
  background: #fff;
  color: #26364d;
}

html:is([data-theme="light"], [data-theme="blue"]) .import-page .data-table th {
  border-color: #dce5ef;
  background: #f1f5f9;
  color: #34445b;
}

html:is([data-theme="light"], [data-theme="blue"]) .import-page .data-table td {
  border-color: #e5ebf2;
  color: #26364d;
}

html:is([data-theme="light"], [data-theme="blue"]) .import-page .data-table tbody tr {
  background: #fff;
}

html:is([data-theme="light"], [data-theme="blue"]) .import-page .data-table tbody tr:nth-child(even) {
  background: #fbfcfe;
}

html:is([data-theme="light"], [data-theme="blue"]) .import-page .data-table tbody tr:hover {
  background: #f0f6ff;
}

html:is([data-theme="light"], [data-theme="blue"]) .import-page .icon-button.primary {
  border-color: #b9d6ff;
  background: #eaf3ff;
  color: #0f5ed7;
}

html:is([data-theme="light"], [data-theme="blue"]) .import-page .icon-button.danger {
  border-color: #ffc5ce;
  background: #fff0f2;
  color: #b42332;
}

html:is([data-theme="light"], [data-theme="blue"]) .import-page .page-button.active {
  border-color: #1677ff;
  background: #1677ff;
  color: #fff;
}

html:is([data-theme="light"], [data-theme="blue"]) body.import-page .export-section {
  border-color: #d8e2ee !important;
  background: #fff !important;
  color: #172033 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.import-page .export-section .batch-selection {
  border-color: #d8e2ee !important;
  background: #f7f9fc !important;
  color: #26364d !important;
  box-shadow: none !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.import-page .export-section .batch-column {
  border-color: #d8e2ee !important;
  background: #fff !important;
  color: #26364d !important;
  scrollbar-color: #9aadc2 #edf1f6 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.import-page .export-section .column-header {
  border-color: #dce5ef !important;
  background: #f1f5f9 !important;
  color: #172033 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.import-page .export-section .column-header h3 {
  color: #172033 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.import-page .export-section :is(.batch-options, .collapsible-content) {
  border-color: #d8e2ee !important;
  background: #f7f9fc !important;
  color: #26364d !important;
  scrollbar-color: #9aadc2 #edf1f6 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.import-page .export-section .checkbox-label {
  border-color: #d8e2ee !important;
  background: #fff !important;
  color: #26364d !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.import-page .export-section .checkbox-label:hover,
html:is([data-theme="light"], [data-theme="blue"]) body.import-page .export-section .checkbox-label:focus-within {
  border-color: #8db9f3 !important;
  background: #edf5ff !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.import-page .export-section .checkbox-label:has(input:checked) {
  border-color: #9fc4f6 !important;
  background: #eaf3ff !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.import-page .export-section .checkmark {
  border-color: #aebdd0 !important;
  background: #fff !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.import-page .export-section .checkbox-label input:checked + .checkmark {
  border-color: #3182e8 !important;
  background: #eaf3ff !important;
  box-shadow: inset 0 0 0 4px #3182e8 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.import-page .export-section :is(.batch-info, .batch-info strong) {
  color: #172033 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.import-page .export-section :is(.batch-project, .batch-count, .panel-meta) {
  color: #5f6f84 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.import-page .export-section .select-all-control {
  border-color: #cbd7e6 !important;
  background: #fff !important;
  color: #34445b !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.import-page .export-section .select-all-control:hover {
  border-color: #8db9f3 !important;
  background: #eaf3ff !important;
  color: #0f5ed7 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.import-page .export-section .toggle-btn {
  border-color: #cbd7e6 !important;
  background: #fff !important;
  color: #34445b !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.import-page .export-section .platform-badge.platform-douyin {
  border-color: #8ddbdd !important;
  background: #e9fbfb !important;
  color: #125963 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.import-page .export-section .platform-badge.platform-xhs {
  border-color: #ffb5c0 !important;
  background: #fff0f2 !important;
  color: #a3203a !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.import-page .export-section .platform-badge i {
  color: inherit !important;
}

html:is([data-theme="light"], [data-theme="blue"]) .import-page :is(.batch-options, .table-shell) {
  scrollbar-color: #a8b8cc #edf1f6;
}

html:is([data-theme="light"], [data-theme="blue"]) body.import-page .export-section .batch-selection * {
  scrollbar-color: #9aadc2 #edf1f6 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.import-page .export-section :is(.batch-column, .batch-options, .collapsible-content)::-webkit-scrollbar-track {
  background: #edf1f6 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.import-page .export-section :is(.batch-column, .batch-options, .collapsible-content)::-webkit-scrollbar-thumb {
  border-color: #edf1f6 !important;
  background: #9aadc2 !important;
}

/* Dense comment, user, and private-message consoles */
html:is([data-theme="light"], [data-theme="blue"]) body.comments-page,
html:is([data-theme="light"], [data-theme="blue"]) body.comment-users-page,
html:is([data-theme="light"], [data-theme="blue"]) body.pm-page {
  background: #f4f7fb !important;
  color: #172033 !important;
  scrollbar-color: #a8b8cc #edf1f6;
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.comments-console, .pm-console)::before {
  background: #f4f7fb !important;
  background-image: linear-gradient(#e8eef6 1px, transparent 1px), linear-gradient(90deg, #e8eef6 1px, transparent 1px) !important;
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.console-title h1, .page-title h2, .pm-header h2, .pm-page .card-title, .pm-page h5) {
  color: #172033 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.console-title p, .page-title p, .pm-header p, .comments-page .text-muted, .comment-users-page .text-muted, .pm-page .text-muted) {
  color: #5f6f84 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.console-filter-shell, .console-table-card, .filter-card, .table-card, .pm-page .card) {
  border-color: #d8e2ee !important;
  background: #fff !important;
  color: #172033 !important;
  box-shadow: 0 12px 32px rgba(24, 39, 75, 0.08) !important;
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.pm-page .card-header, .pm-page .card-footer, .table-footer-console) {
  border-color: #e2e8f0 !important;
  background: #f7f9fc !important;
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.console-status, .console-btn, .pm-action-btn, .pm-row-action) {
  border-color: #cbd7e6;
  background: #f7f9fc;
  color: #34445b;
  box-shadow: none;
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.console-btn, .pm-action-btn, .pm-row-action):hover,
html:is([data-theme="light"], [data-theme="blue"]) :is(.console-btn, .pm-action-btn, .pm-row-action):focus {
  border-color: #8db9f3;
  background: #eaf3ff;
  color: #0f5ed7;
  box-shadow: none;
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.console-btn.primary, .pm-action-btn.primary) {
  border-color: #1677ff;
  background: #1677ff;
  color: #fff;
}

html:is([data-theme="light"], [data-theme="blue"]) body.pm-page .console-btn.danger {
  border-color: #e5a4ad;
  background: #fff0f2;
  color: #a91d36;
}

html:is([data-theme="light"], [data-theme="blue"]) body.pm-page .console-btn.danger:hover,
html:is([data-theme="light"], [data-theme="blue"]) body.pm-page .console-btn.danger:focus-visible {
  border-color: #cf6474;
  background: #ffe1e6;
  color: #88152a;
}

html:is([data-theme="light"], [data-theme="blue"]) body.pm-page .console-btn.danger:disabled {
  border-color: #d8e2ee;
  background: #f1f5f9;
  color: #718096;
  opacity: 1;
}

html:is([data-theme="light"], [data-theme="blue"]) body.pm-page .pm-selection-count {
  color: #52657d;
}

html:is([data-theme="light"], [data-theme="blue"]) body.pm-page .pm-lead-checkbox {
  color-scheme: light;
  accent-color: #1677ff;
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.comments-page, .comment-users-page, .pm-page) .table,
html:is([data-theme="light"], [data-theme="blue"]) :is(.comments-page, .comment-users-page, .pm-page) table {
  background: #fff !important;
  color: #26364d !important;
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.comments-page, .comment-users-page, .pm-page) thead th {
  border-color: #dce5ef !important;
  background: #f1f5f9 !important;
  color: #34445b !important;
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.comments-page, .comment-users-page, .pm-page) td {
  border-color: #e5ebf2 !important;
  color: #26364d !important;
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.comments-page, .comment-users-page, .pm-page) tbody tr:hover {
  background: #f5f9ff !important;
}

/* Private-message workspace: dynamic rows and sticky action columns also need
   explicit light surfaces because the page template defines dark defaults. */
html:is([data-theme="light"], [data-theme="blue"]) body.pm-page :is(.pm-list-card, .pm-list-card > .card-body, .pm-table-viewport) {
  border-color: #d8e2ee !important;
  background: #fff !important;
  color: #26364d !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.pm-page .pm-table-viewport {
  color-scheme: light;
  scrollbar-color: #9aadc2 #edf1f6 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.pm-page .pm-table-viewport::-webkit-scrollbar-track {
  border-color: #e5ebf2 !important;
  background: #edf1f6 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.pm-page .pm-table-viewport::-webkit-scrollbar-thumb {
  border-color: #edf1f6 !important;
  background: #9aadc2 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.pm-page .pm-table-viewport::-webkit-scrollbar-thumb:hover {
  background: #71869e !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.pm-page tbody tr {
  background: #fff !important;
  color: #26364d !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.pm-page tbody tr:nth-child(even) {
  background: #fbfcfe !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.pm-page tbody tr:hover {
  background: #f0f6ff !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.pm-page :is(.pm-leads-table th.col-actions, .pm-leads-table td.col-actions, .pm-accounts-table th.col-account-actions, .pm-accounts-table td.col-account-actions) {
  border-color: #d8e2ee !important;
  background: #fff !important;
  color: #26364d !important;
  box-shadow: -12px 0 18px -14px rgba(24, 39, 75, 0.2) !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.pm-page :is(.pm-leads-table th.col-actions, .pm-accounts-table th.col-account-actions) {
  background: #f1f5f9 !important;
  color: #34445b !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.pm-page :is(.pm-leads-table tbody tr:hover td.col-actions, .pm-accounts-table tbody tr:hover td.col-account-actions) {
  background: #f0f6ff !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.pm-page :is(.user-name, .pm-comment-cell, .pm-video-cell, .pm-message-preview) {
  color: #172033 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.pm-page :is(.user-uid, .pm-message-preview.is-empty, .pm-message-preview:empty::before) {
  color: #607086 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.pm-page .pm-message-preview:hover,
html:is([data-theme="light"], [data-theme="blue"]) body.pm-page .pm-message-preview:focus-visible {
  background: #edf5ff !important;
  color: #172033 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.pm-page .pm-message-preview.is-editing {
  border-color: #8db9f3 !important;
  background: #fff !important;
  color: #172033 !important;
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.13) !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.pm-page .pm-message-preview.is-sent {
  color: #087f46 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.pm-page :is(.pm-message-preview.is-loading, .pm-message-preview.is-submitted) {
  color: #0f5ed7 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.pm-page :is(.platform-badge.douyin, .platform-badge.xhs, .status-pill) {
  color: #34445b;
}

html:is([data-theme="light"], [data-theme="blue"]) body.pm-page .platform-badge.douyin {
  border-color: #8ddbdd;
  background: #e9fbfb;
  color: #125963;
}

html:is([data-theme="light"], [data-theme="blue"]) body.pm-page .platform-badge.xhs {
  border-color: #ffb5c0;
  background: #fff0f2;
  color: #a3203a;
}

html:is([data-theme="light"], [data-theme="blue"]) body.pm-page :is(.status-pill.valid, .status-pill.message-sent) {
  border-color: #8fd3ad;
  background: #e7f7ee;
  color: #087f46;
}

html:is([data-theme="light"], [data-theme="blue"]) body.pm-page :is(.status-pill.invalid, .status-pill.message-failed) {
  border-color: #f3a6ad;
  background: #fff0f1;
  color: #b42332;
}

html:is([data-theme="light"], [data-theme="blue"]) body.pm-page :is(.status-pill.intent-medium, .status-pill.message-processing) {
  border-color: #e8c477;
  background: #fff8e8;
  color: #7a5100;
}

html:is([data-theme="light"], [data-theme="blue"]) body.pm-page .status-pill.intent-high {
  border-color: #f3a6ad;
  background: #fff0f1;
  color: #b42332;
}

html:is([data-theme="light"], [data-theme="blue"]) body.pm-page :is(.status-pill.intent-low, .status-pill.intent-unrated, .status-pill.message-unsent) {
  border-color: #b9d6ff;
  background: #eaf3ff;
  color: #0f5ed7;
}

html:is([data-theme="light"], [data-theme="blue"]) body.pm-page .sl-list-pager {
  border-color: #d8e2ee !important;
  background: #f7f9fc !important;
  color: #34445b !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.pm-page :is(.sl-page-info, .sl-page-ellipsis) {
  color: #5f6f84 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.pm-page :is(.sl-page-btn, .sl-page-jump input, .sl-list-pager select) {
  border-color: #cbd7e6 !important;
  background: #fff !important;
  color: #34445b !important;
  color-scheme: light !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.pm-page .sl-page-btn:hover:not(:disabled),
html:is([data-theme="light"], [data-theme="blue"]) body.pm-page .sl-page-btn:focus:not(:disabled) {
  border-color: #8db9f3 !important;
  background: #eaf3ff !important;
  color: #0f5ed7 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.pm-page .sl-page-btn.active,
html:is([data-theme="light"], [data-theme="blue"]) body.pm-page .sl-page-jump button {
  border-color: #1677ff !important;
  background: #1677ff !important;
  color: #fff !important;
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.comments-page, .comment-users-page) :is(.filter-control, .form-control, .custom-select) {
  border-color: #cbd7e6 !important;
  background: #fff !important;
  color: #172033 !important;
  box-shadow: none;
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.comments-page, .comment-users-page) :is(.filter-control, .form-control, .custom-select):focus {
  border-color: #3182e8 !important;
  background: #fff !important;
  color: #172033 !important;
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.13) !important;
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.comments-page, .comment-users-page) #dataTable tbody tr {
  background: #fff !important;
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.comments-page, .comment-users-page) #dataTable tbody tr:nth-child(even) {
  background: #fbfcfe !important;
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.comments-page, .comment-users-page) #dataTable tbody tr:hover {
  background: #f0f6ff !important;
}

html:is([data-theme="light"], [data-theme="blue"]) .comments-page #dataTable .col-actions {
  background: #fff;
  box-shadow: -8px 0 18px rgba(24, 39, 75, 0.08);
}

html:is([data-theme="light"], [data-theme="blue"]) .comments-page #dataTable thead .col-actions {
  background: #f1f5f9 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) .comments-page #dataTable tbody tr:hover .col-actions {
  background: #f0f6ff !important;
}

html:is([data-theme="light"], [data-theme="blue"]) .comments-page .comment-row-action {
  border-color: #f3a6ad;
  background: #fff0f1;
  color: #b42332;
}

html:is([data-theme="light"], [data-theme="blue"]) .comments-page .comment-row-action:hover,
html:is([data-theme="light"], [data-theme="blue"]) .comments-page .comment-row-action:focus-visible {
  border-color: #df6b76;
  background: #ffe1e4;
  color: #8f1523;
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.comments-page, .comment-users-page) :is(.user-name, .comment-text, .table-number) {
  color: #172033 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.comments-page, .comment-users-page) :is(.user-uid, .user-meta, .compact-text, .time-text, .col-id, .table-total) {
  color: #607086 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.comments-page, .comment-users-page) .platform-badge.douyin {
  border-color: #8ddbdd;
  background: #e9fbfb;
  color: #125963;
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.comments-page, .comment-users-page) .platform-badge.xhs {
  border-color: #ffb5c0;
  background: #fff0f2;
  color: #a3203a;
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.comments-page, .comment-users-page) :is(.status-pill.valid, .level-pill.high) {
  border-color: #8fd3ad;
  background: #e7f7ee;
  color: #087f46;
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.comments-page, .comment-users-page) :is(.status-pill.invalid, .level-pill.low) {
  border-color: #f3a6ad;
  background: #fff0f1;
  color: #b42332;
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.comments-page, .comment-users-page) :is(.status-pill.pending, .level-pill.mid) {
  border-color: #e8c477;
  background: #fff8e8;
  color: #7a5100;
}
html:is([data-theme="light"], [data-theme="blue"]) :is(.comments-page, .comment-users-page) .status-pill.failed {
  border-color: rgba(126, 34, 206, .28);
  background: rgba(126, 34, 206, .10);
  color: #7e22ce;
}

html:is([data-theme="light"], [data-theme="blue"]) .comment-users-page .badge-fan,
html:is([data-theme="light"], [data-theme="blue"]) :is(.comments-page, .comment-users-page) :is(.link-pill, .reply-badge) {
  border-color: #b9d6ff;
  background: #eaf3ff;
  color: #0f5ed7;
}

html:is([data-theme="light"], [data-theme="blue"]) .comment-users-page .badge-blogger {
  border-color: #e8c477;
  background: #fff8e8;
  color: #7a5100;
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.comments-page, .comment-users-page) :is(.pagination .page-link, .sl-page-btn) {
  border-color: #cbd7e6 !important;
  background: #fff !important;
  color: #34445b !important;
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.comments-page, .comment-users-page) :is(.pagination .page-item.active .page-link, .sl-page-btn.active) {
  border-color: #1677ff !important;
  background: #1677ff !important;
  color: #fff !important;
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.comments-page, .comment-users-page) :is(.pagination .page-item.disabled .page-link, .sl-page-btn.disabled) {
  border-color: #d8e0ea !important;
  background: #e9eef5 !important;
  color: #718096 !important;
  opacity: 1;
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.comments-page, .comment-users-page) :is(.modal-content, .comment-tooltip) {
  border-color: #d8e2ee !important;
  background: #fff !important;
  color: #172033 !important;
  box-shadow: 0 20px 48px rgba(24, 39, 75, 0.18) !important;
}

html:is([data-theme="light"], [data-theme="blue"]) .table-card .table-responsive,
html:is([data-theme="light"], [data-theme="blue"]) .comments-page .console-table-card .table-responsive,
html:is([data-theme="light"], [data-theme="blue"]) .pm-page .pm-table-viewport {
  background: #fff !important;
  scrollbar-color: #a8b8cc #edf1f6;
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.comments-page .console-table-card, .comment-users-page .table-card) .table-responsive::-webkit-scrollbar-track,
html:is([data-theme="light"], [data-theme="blue"]) :is(.comments-page .console-table-card, .comment-users-page .table-card) .table-responsive::-webkit-scrollbar-corner,
html:is([data-theme="light"], [data-theme="blue"]) :is(.comments-page .console-table-card, .comment-users-page .table-card) .table-responsive::-webkit-scrollbar-button {
  border-color: #e5ebf2;
  background: #edf1f6;
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.comments-page .console-table-card, .comment-users-page .table-card) .table-responsive::-webkit-scrollbar-thumb {
  border-color: #edf1f6;
  background: #a8b8cc;
}

html:is([data-theme="light"], [data-theme="blue"]) .comment-users-page .table-footer-select option {
  background: #fff;
  color: #172033;
}

/* Legacy screens */
html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page {
  --console-bg: #f4f7fb;
  --console-surface: #fff;
  --console-surface-strong: #f8fafc;
  --console-border: #d8e2ee;
  --console-border-soft: #e5ebf2;
  --console-text: #172033;
  --console-muted: #5f6f84;
  --legacy-surface: #fff;
  --legacy-surface-soft: #f7f9fc;
  --legacy-border: #d8e2ee;
  --legacy-border-soft: #e5ebf2;
  --legacy-text: #172033;
  --legacy-muted: #5f6f84;
  background: #f4f7fb !important;
  color: #172033 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) .legacy-console-page :is(.card, .stat-card, .dashboard-container, .upload-section, .batch-list, .review-header, .review-table-container, .table-controls, .pagination-controls, .ai-operations, .batch-selection, .column-selector),
html:is([data-theme="light"], [data-theme="blue"]) .app-shell :is(.export-section, .batch-list, .review-total-section) {
  border-color: #d8e2ee !important;
  background: #fff !important;
  color: #172033 !important;
  box-shadow: 0 12px 32px rgba(24, 39, 75, 0.08) !important;
}

html:is([data-theme="light"], [data-theme="blue"]) .legacy-console-page :is(.card-header, .card-footer, .bg-light, .bg-white, .table-light, .thead-light, .batch-grid, .batch-item, #batchesList, .result-box, .stats-container, .stat-item, .drop-area, .file-label),
html:is([data-theme="light"], [data-theme="blue"]) .app-shell :is(.batch-list-header, .export-section .batch-selection, .export-section .batch-column, .export-section .batch-options, .export-section .collapsible-content) {
  border-color: #e2e8f0 !important;
  background: #f7f9fc !important;
  color: #172033 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) .legacy-console-page :is(.text-dark, .text-body, label, h1, h2, h3, h4, h5, h6),
html:is([data-theme="light"], [data-theme="blue"]) .app-shell :is(.export-section h2, .export-section h3, .export-section h4, .batch-list h3, .review-total-section h3) {
  color: #172033 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) .legacy-console-page :is(.text-muted, .form-text, .subtitle, small),
html:is([data-theme="light"], [data-theme="blue"]) .app-shell :is(.section-subtitle, .panel-meta, .batch-pagination-info, .batch-project, .batch-count) {
  color: #5f6f84 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) .legacy-console-page :is(.table, .data-table, .review-table) {
  background: #fff !important;
  color: #26364d !important;
}

html:is([data-theme="light"], [data-theme="blue"]) .legacy-console-page :is(.table, .data-table, .review-table) thead th,
html:is([data-theme="light"], [data-theme="blue"]) .legacy-console-page .review-table th {
  border-color: #dce5ef !important;
  background: #f1f5f9 !important;
  color: #34445b !important;
}

html:is([data-theme="light"], [data-theme="blue"]) .legacy-console-page :is(.table, .data-table, .review-table) td {
  border-color: #e5ebf2 !important;
  color: #26364d !important;
}

html:is([data-theme="light"], [data-theme="blue"]) .legacy-console-page :is(.table-striped tbody tr:nth-of-type(odd), .review-table tr:nth-child(even), .batch-item:nth-child(even)) {
  background: #f8fafc !important;
}

html:is([data-theme="light"], [data-theme="blue"]) .legacy-console-page :is(.table-hover tbody tr:hover, .review-table tr:hover, .batch-item:hover) {
  background: #f0f6ff !important;
}

html:is([data-theme="light"], [data-theme="blue"]) .legacy-console-page :is(.btn-secondary, .btn-outline-secondary, .btn-dark, .pagination .page-link, .pagination-buttons .btn-small, .pagination-controls .btn-small),
html:is([data-theme="light"], [data-theme="blue"]) .app-shell .export-section .export-actions :is(.btn, .console-button) {
  border-color: #cbd7e6 !important;
  background: #f7f9fc !important;
  color: #34445b !important;
}

html:is([data-theme="light"], [data-theme="blue"]) .legacy-console-page :is(.nav-tabs .nav-link.active, .nav-tabs .nav-link:hover) {
  border-color: #cbd7e6 !important;
  border-bottom-color: #fff !important;
  background: #edf5ff !important;
  color: #0f5ed7 !important;
}

/* Readable semantic controls for light legacy screens */
html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page :is(.text-muted, .form-text, small.text-muted) {
  color: #52657d !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page .text-info {
  color: #075f8f !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page :is(.btn-success, .badge-success, .status-active) {
  border: 1px solid #86cfa1 !important;
  background: #dcfce7 !important;
  color: #166534 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page .btn-success:hover,
html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page .btn-success:focus {
  border-color: #55a877 !important;
  background: #c8f3d7 !important;
  color: #10552b !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page :is(.btn-warning, .badge-warning) {
  border: 1px solid #e3bd62 !important;
  background: #fff4d2 !important;
  color: #854d0e !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page .btn-warning:hover,
html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page .btn-warning:focus {
  border-color: #c9962e !important;
  background: #ffe8a3 !important;
  color: #713f0a !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page :is(.btn-danger, .btn-outline-danger, .badge-danger, .status-banned) {
  border: 1px solid #efa8b4 !important;
  background: #fff0f2 !important;
  color: #b4233d !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page :is(.btn-danger, .btn-outline-danger):hover,
html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page :is(.btn-danger, .btn-outline-danger):focus {
  border-color: #dc7486 !important;
  background: #ffe0e5 !important;
  color: #981b31 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page :is(.btn-info, .btn-outline-info, .badge-info, .badge-primary) {
  border: 1px solid #8db9e5 !important;
  background: #e8f4ff !important;
  color: #0b5fa5 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page :is(.btn-info, .btn-outline-info):hover,
html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page :is(.btn-info, .btn-outline-info):focus {
  border-color: #5e9bd6 !important;
  background: #d8ebff !important;
  color: #084b82 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page .badge-secondary {
  border: 1px solid #c2cedb !important;
  background: #edf1f6 !important;
  color: #44546a !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page :is(.btn, .page-link):disabled,
html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page :is(.btn, .page-link).disabled,
html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page .page-item.disabled .page-link {
  border-color: #bcc8d6 !important;
  background: #e6ebf1 !important;
  color: #526174 !important;
  opacity: 1 !important;
  box-shadow: none !important;
  transform: none !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page .table-number.primary {
  color: #0f5ed7 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page .table-number.info {
  color: #006b99 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page .table-number.success {
  color: #137a3a !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page .table-number.warning {
  color: #8a4d00 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page .table-number.danger {
  color: #b4233d !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page .table-number.muted {
  color: #52657d !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.system-config-page.legacy-console-page .config-restart-alert {
  border-color: #e58b99 !important;
  background: #fff0f2 !important;
  color: #9f1239 !important;
  box-shadow: 0 4px 14px rgba(159, 18, 57, 0.08) !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.system-config-page.legacy-console-page .config-restart-alert i {
  color: #c91837 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.system-config-page.legacy-console-page .config-restart-alert strong {
  color: #881337 !important;
}

/* Cloud customer library */
html:is([data-theme="light"], [data-theme="blue"]) body.cloud-customers-page {
  color: #172033 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.cloud-customers-page :is(.dashboard-card .text-dark, .card .modal-title) {
  color: #172033 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.cloud-customers-page :is(.dashboard-card .text-muted, .card-footer .text-muted, .modal-content .text-muted) {
  color: #52657d !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.cloud-customers-page .dashboard-card .text-info {
  color: #0e7490 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.cloud-customers-page #searchInput::placeholder {
  color: #61738a !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.cloud-customers-page #dataTable thead th {
  border-color: #d5dfeb !important;
  background: #e9eff6 !important;
  color: #34445b !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.cloud-customers-page #dataTable tbody td {
  color: #26364d !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.cloud-customers-page #dataTable .user-name {
  color: #274a78 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.cloud-customers-page #dataTable .user-uid {
  color: #52657d !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.cloud-customers-page #dataTable .platform-logo-icon {
  color: #1967d2 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.cloud-customers-page #dataTable .platform-logo-icon.douyin {
  color: #087f8c !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.cloud-customers-page #dataTable .platform-logo-icon.xhs {
  color: #c62843 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.cloud-customers-page #dataTable :is(.sort-indicator.asc, .sort-indicator.desc)::after {
  color: #1967d2 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.cloud-customers-page :is(#platformDropdown, #projectDropdown) {
  border: 1px solid #9ebfe8 !important;
  background: #edf5ff !important;
  color: #0f5ed7 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.cloud-customers-page :is(.btn-outline-secondary, .btn-secondary) {
  border-color: #aebdce !important;
  background: #f7f9fc !important;
  color: #26364d !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.cloud-customers-page :is(.btn-outline-secondary, .btn-secondary) i {
  color: #315f91 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.cloud-customers-page .btn-success {
  border-color: #8fc9a5 !important;
  background: #e7f7ed !important;
  color: #176b3a !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.cloud-customers-page .btn-success:hover,
html:is([data-theme="light"], [data-theme="blue"]) body.cloud-customers-page .btn-success:focus {
  border-color: #55a877 !important;
  background: #d7f0e1 !important;
  color: #105b30 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.cloud-customers-page .btn-info {
  border-color: #8db9e5 !important;
  background: #e8f4ff !important;
  color: #0b5fa5 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.cloud-customers-page :is(.btn, .page-link):disabled,
html:is([data-theme="light"], [data-theme="blue"]) body.cloud-customers-page :is(.btn, .page-link).disabled,
html:is([data-theme="light"], [data-theme="blue"]) body.cloud-customers-page .page-item.disabled .page-link {
  border-color: #c1ccda !important;
  background: #e8edf3 !important;
  color: #5e6c7e !important;
  opacity: 1 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.cloud-customers-page .pagination .page-link {
  border-color: #b8c7d8 !important;
  background: #fff !important;
  color: #284c75 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.cloud-customers-page .pagination .page-item.active .page-link {
  border-color: #1677ff !important;
  background: #1677ff !important;
  color: #fff !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.cloud-customers-page :is(#totalRecords, .card-footer strong) {
  color: #284c75 !important;
}

/* Role configuration */
html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page .role-panel {
  border-color: #d8e2ee !important;
  background: #fff !important;
  color: #172033 !important;
  box-shadow: 0 14px 34px rgba(24, 39, 75, 0.1) !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page .role-panel .panel-header {
  border-color: #dce5ef !important;
  background: #f1f5f9 !important;
  color: #172033 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page .role-panel .panel-body,
html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page .role-list {
  background: #fff !important;
  color: #172033 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page .role-item {
  border-color: #e5ebf2 !important;
  background: #fff !important;
  color: #172033 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page .role-item:hover {
  background: #f7faff !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page .role-item.active {
  background: #edf5ff !important;
  box-shadow: inset 0 0 0 1px #b9d6ff !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page .role-code {
  color: #0f5ed7 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page .role-help,
html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page .empty-tip,
html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page .picker-group-title {
  color: #5f6f84 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page .role-badge,
html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page .selection-tag {
  border: 1px solid #c9ddfb !important;
  background: #eaf3ff !important;
  color: #0f5ed7 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page .role-form .form-control {
  border-color: #cbd7e6 !important;
  background: #fff !important;
  color: #172033 !important;
  box-shadow: none !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page .role-form .form-control::placeholder {
  color: #718096 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page .role-form .form-control:focus {
  border-color: #3182e8 !important;
  background: #fff !important;
  color: #172033 !important;
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.13) !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page :is(.permission-tree, .picker-section) {
  border-color: #d8e2ee !important;
  background: #f7f9fc !important;
  color: #26364d !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page :is(.permission-tree, .picker-panel) {
  color-scheme: light;
  scrollbar-color: #9aadc2 #edf1f6 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page .permission-tree-row {
  color: #26364d !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page .permission-tree-row:hover {
  background: #eaf3ff !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page :is(.permission-tree-row[data-node-type="group"], .permission-tree-row[data-node-type="page"], .picker-label, .picker-option) {
  color: #172033 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page .permission-tree-toggle {
  color: #1967d2 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page .permission-tree-toggle:hover,
html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page .permission-tree-toggle:focus {
  background: #eaf3ff !important;
  color: #0f5ed7 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page .permission-tree-children {
  border-color: #cbd7e6 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page .picker-trigger {
  border-color: #cbd7e6 !important;
  background: #fff !important;
  color: #172033 !important;
  box-shadow: 0 1px 2px rgba(24, 39, 75, 0.04) !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page .picker-trigger:hover,
html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page .picker-trigger:focus {
  border-color: #8db9f3 !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.13) !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page .picker-summary {
  color: #172033 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page .picker-panel {
  border-color: #cbd7e6 !important;
  background: #fff !important;
  color: #172033 !important;
  box-shadow: 0 14px 30px rgba(24, 39, 75, 0.16) !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page :is(.picker-actions, .picker-group) {
  border-color: #e5ebf2 !important;
}

html:is([data-theme="light"], [data-theme="blue"]) body.legacy-console-page .picker-actions button {
  color: #0f5ed7 !important;
}

/* Login */
html:is([data-theme="light"], [data-theme="blue"]) body:has(.login-container) {
  --login-bg: #f4f7fb;
  --login-surface: #fff;
  --login-border: #d8e2ee;
  --login-text: #172033;
  --login-muted: #44546a;
  background: #f4f7fb;
  color: #172033;
}

html:is([data-theme="light"], [data-theme="blue"]) .login-container {
  border-color: #d8e2ee;
  background: #fff;
  box-shadow: 0 20px 56px rgba(24, 39, 75, 0.13);
}

html:is([data-theme="light"], [data-theme="blue"]) .login-container::before {
  color: #1967d2;
}

html:is([data-theme="light"], [data-theme="blue"]) .login-container h2 {
  color: #172033;
}

html:is([data-theme="light"], [data-theme="blue"]) .login-container .form-group label {
  color: #44546a;
}

html:is([data-theme="light"], [data-theme="blue"]) .login-container .form-group input {
  border-color: #cbd7e6;
  background: #fff;
  color: #172033;
}

html:is([data-theme="light"], [data-theme="blue"]) .login-container .form-group input::placeholder {
  color: #66758b;
}

/* Standalone big screen */
html:is([data-theme="light"], [data-theme="blue"]) body.platform-douyin,
html:is([data-theme="light"], [data-theme="blue"]) body.platform-xiaohongshu {
  --bg: #f4f7fb;
  --bg-soft: #f4f7fb;
  --surface: #fff;
  --surface-2: #f8fafc;
  --surface-3: #f7f9fc;
  --border: #d8e2ee;
  --text: #172033;
  --muted: #52647a;
  --faint: #6b7c91;
  background: #f4f7fb;
  color: #172033;
}

html:is([data-theme="light"], [data-theme="blue"]) body.platform-douyin::before,
html:is([data-theme="light"], [data-theme="blue"]) body.platform-xiaohongshu::before {
  opacity: 0.55;
  background-image: linear-gradient(#e5ecf4 1px, transparent 1px), linear-gradient(90deg, #e5ecf4 1px, transparent 1px);
}

html:is([data-theme="light"], [data-theme="blue"]) body.platform-douyin::after,
html:is([data-theme="light"], [data-theme="blue"]) body.platform-xiaohongshu::after {
  display: none;
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.overview-panel, .chart-panel) {
  border-color: #d8e2ee;
  background: #fff;
  box-shadow: 0 12px 32px rgba(24, 39, 75, 0.08);
}

html:is([data-theme="light"], [data-theme="blue"]) body:is(.platform-douyin, .platform-xiaohongshu) .overview-main {
  border-color: var(--brand-border);
  background: linear-gradient(135deg, var(--brand-soft), rgba(255, 255, 255, 0.96) 58%), #fff;
}

html:is([data-theme="light"], [data-theme="blue"]) body:is(.platform-douyin, .platform-xiaohongshu) .empty-state {
  border-color: #cbd7e6;
  background: #f7f9fc;
  color: #52647a;
}

html:is([data-theme="light"], [data-theme="blue"]) body:is(.platform-douyin, .platform-xiaohongshu) .empty-mark {
  color: var(--brand);
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.metric-compact, .pill, .platform-badge, .panel-tag) {
  border-color: #dce5ef;
  background: #f7f9fc;
  color: #34445b;
}

html:is([data-theme="light"], [data-theme="blue"]) .nav {
  border-color: #dce5ef;
  background: rgba(247, 249, 252, 0.92);
}

html:is([data-theme="light"], [data-theme="blue"]) .nav a {
  border-color: transparent;
  background: transparent;
  color: #34445b;
}

html:is([data-theme="light"], [data-theme="blue"]) .nav a:hover,
html:is([data-theme="light"], [data-theme="blue"]) .nav a:focus-visible,
html:is([data-theme="light"], [data-theme="blue"]) .nav a.active {
  border-color: var(--brand-border);
  background: var(--brand-soft);
  color: #172033;
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.title-block h1, .total-number, .metric-number, .panel-title, .empty-title) {
  color: #172033;
  text-shadow: none;
}

html:is([data-theme="light"], [data-theme="blue"]) :is(.title-block p, .metric-note, .panel-desc, .total-meta, .footer) {
  color: #52647a;
}

html:is([data-theme="light"], [data-theme="blue"]) .trend-switch,
html:is([data-theme="light"], [data-theme="blue"]) .project-picker summary {
  border-color: #d8e2ee;
  background: #f7f9fc;
  color: #172033;
}

html:is([data-theme="light"], [data-theme="blue"]) .view-button {
  color: #52647a;
}

html:is([data-theme="light"], [data-theme="blue"]) .view-button:hover,
html:is([data-theme="light"], [data-theme="blue"]) .view-button:focus-visible,
html:is([data-theme="light"], [data-theme="blue"]) .view-button.active {
  color: #172033;
}

html:is([data-theme="light"], [data-theme="blue"]) .project-menu {
  border-color: #d8e2ee;
  background: #fff;
  box-shadow: 0 18px 46px rgba(24, 39, 75, 0.18);
}

html:is([data-theme="light"], [data-theme="blue"]) .project-menu-title,
html:is([data-theme="light"], [data-theme="blue"]) .project-option-all {
  color: #172033;
}

html:is([data-theme="light"], [data-theme="blue"]) .project-option {
  color: #52647a;
}

html:is([data-theme="light"], [data-theme="blue"]) .project-option:hover {
  background: #eef6ff;
  color: #172033;
}

/* Deep-blue navigation with the complete light content system above. */
html[data-theme="blue"] {
  background: #eef3f8;
}

html[data-theme="blue"] body {
  background-color: #eef3f8;
}

html[data-theme="blue"] .app-navbar {
  border-bottom-color: #244c70;
  background: #0b2a4a;
  box-shadow: 0 10px 28px rgba(8, 31, 54, 0.2);
}

html[data-theme="blue"] .app-navbar .navbar-brand,
html[data-theme="blue"] .app-navbar .navbar-brand:hover {
  color: #f7fbff;
}

html[data-theme="blue"] .app-navbar .brand-mark {
  border-color: rgba(130, 190, 244, 0.52);
  background: rgba(86, 164, 235, 0.16);
  color: #b9dcfb;
  box-shadow: inset 0 0 18px rgba(73, 154, 229, 0.12);
}

html[data-theme="blue"] .app-navbar .nav-link {
  color: #d6e6f5;
}

html[data-theme="blue"] .app-navbar .nav-group-icon {
  color: #83c4ff;
}

html[data-theme="blue"] .app-navbar .nav-link:hover,
html[data-theme="blue"] .app-navbar .nav-item.active > .nav-link,
html[data-theme="blue"] .app-navbar .nav-item.show > .nav-link {
  border-color: rgba(133, 195, 250, 0.3);
  background: rgba(90, 168, 239, 0.15);
  color: #fff;
}

html[data-theme="blue"] body.app-shell.app-shell .app-navbar .dropdown-menu {
  border-color: #2d567b !important;
  background: #102f50 !important;
  color: #e9f3fc !important;
  box-shadow: 0 20px 46px rgba(4, 21, 38, 0.34) !important;
}

html[data-theme="blue"] body.app-shell.app-shell .app-navbar .dropdown-item {
  color: #d9e8f6 !important;
}

html[data-theme="blue"] body.app-shell.app-shell .app-navbar .dropdown-item:hover,
html[data-theme="blue"] body.app-shell.app-shell .app-navbar .dropdown-item:focus,
html[data-theme="blue"] body.app-shell.app-shell .app-navbar .dropdown-item.active {
  background: rgba(102, 178, 246, 0.16) !important;
  color: #fff !important;
}

html[data-theme="blue"] body.app-shell.app-shell .app-navbar .dropdown-divider {
  border-top-color: rgba(150, 198, 239, 0.18) !important;
}

html[data-theme="blue"] body.app-shell.app-shell .app-navbar .nav-item-icon,
html[data-theme="blue"] body.app-shell.app-shell .app-navbar .dropdown-item.active .nav-item-icon {
  color: #8dc9fb !important;
}

html[data-theme="blue"] body.app-shell.app-shell .app-navbar .dropdown-item.platform-xhs:is(.active, :active) {
  background: rgba(255, 79, 108, 0.16) !important;
  color: #ffe4ea !important;
}

html[data-theme="blue"] body.app-shell.app-shell .app-navbar .dropdown-item.platform-xhs:is(.active, :active) .nav-item-icon {
  color: #ff8197 !important;
}

html[data-theme="blue"] body.app-shell.app-shell .app-navbar .dropdown-item.platform-douyin:is(.active, :active) {
  background: rgba(55, 207, 214, 0.14) !important;
  color: #e4fcff !important;
}

html[data-theme="blue"] body.app-shell.app-shell .app-navbar .dropdown-item.platform-douyin:is(.active, :active) .nav-item-icon {
  color: #69dce2 !important;
}

html[data-theme="blue"] .app-navbar .navbar-toggler {
  border-color: rgba(210, 232, 250, 0.35);
}

html[data-theme="blue"] .app-navbar .navbar-toggler-icon {
  filter: none;
}

html[data-theme="blue"] .app-navbar .theme-toggle {
  border-color: transparent;
  background: rgba(114, 184, 247, 0.12);
  color: #dceefe;
}

html[data-theme="blue"] .app-navbar .theme-toggle:hover,
html[data-theme="blue"] .app-navbar .theme-toggle:focus-visible {
  border-color: rgba(133, 195, 250, 0.35);
  background: rgba(114, 184, 247, 0.2);
  color: #fff;
}

html[data-theme="blue"] body:is(.platform-douyin, .platform-xiaohongshu) .nav {
  border-color: #244c70;
  background: #0b2a4a;
  box-shadow: 0 10px 28px rgba(8, 31, 54, 0.16);
}

html[data-theme="blue"] body:is(.platform-douyin, .platform-xiaohongshu) .nav a {
  color: #d6e6f5;
}

html[data-theme="blue"] body:is(.platform-douyin, .platform-xiaohongshu) .nav a:hover,
html[data-theme="blue"] body:is(.platform-douyin, .platform-xiaohongshu) .nav a:focus-visible,
html[data-theme="blue"] body:is(.platform-douyin, .platform-xiaohongshu) .nav a.active {
  border-color: rgba(133, 195, 250, 0.34);
  background: rgba(90, 168, 239, 0.16);
  color: #fff;
}

html[data-theme] body,
html[data-theme] .app-navbar,
html[data-theme] footer,
html[data-theme] .card,
html[data-theme] .modal-content,
html[data-theme] .form-control,
html[data-theme] .custom-select,
html[data-theme] .input-group-text,
html[data-theme] table,
html[data-theme] th,
html[data-theme] td {
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 180ms;
  animation-timing-function: ease;
}

@media (max-width: 991.98px) {
  .theme-toggle-nav {
    justify-content: flex-end;
    margin: 0.35rem 0;
  }
}

@media (max-width: 480px) {
  .login-theme-toggle {
    top: 12px;
    right: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .theme-toggle,
  html[data-theme] body,
  html[data-theme] .app-navbar,
  html[data-theme] footer,
  html[data-theme] .card,
  html[data-theme] .modal-content,
  html[data-theme] .form-control,
  html[data-theme] .custom-select,
  html[data-theme] .input-group-text,
  html[data-theme] table,
  html[data-theme] th,
  html[data-theme] td {
    transition: none;
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0.01ms;
  }
}
