
/* Test-only dark rich-text guard for dashboard notice/announcement HTML. */
html.dark .notice-content-scroll,
body[theme-mode="dark"] .notice-content-scroll,
html.dark .notice-content-scroll *,
body[theme-mode="dark"] .notice-content-scroll * {
  color: rgba(245, 247, 250, 0.92) !important;
  border-color: rgba(148, 163, 184, 0.34) !important;
}

html.dark .notice-content-scroll [style*="background"],
body[theme-mode="dark"] .notice-content-scroll [style*="background"],
html.dark .notice-content-scroll table,
body[theme-mode="dark"] .notice-content-scroll table,
html.dark .notice-content-scroll tr,
body[theme-mode="dark"] .notice-content-scroll tr,
html.dark .notice-content-scroll th,
body[theme-mode="dark"] .notice-content-scroll th,
html.dark .notice-content-scroll td,
body[theme-mode="dark"] .notice-content-scroll td {
  background: rgba(15, 23, 42, 0.42) !important;
}

html.dark .notice-content-scroll th,
body[theme-mode="dark"] .notice-content-scroll th {
  color: rgba(255, 255, 255, 0.96) !important;
  font-weight: 650;
}

html.dark .notice-content-scroll a,
body[theme-mode="dark"] .notice-content-scroll a {
  color: #7db7ff !important;
}

html.dark .notice-content-scroll pre,
html.dark .notice-content-scroll code,
body[theme-mode="dark"] .notice-content-scroll pre,
body[theme-mode="dark"] .notice-content-scroll code {
  background: rgba(2, 6, 23, 0.55) !important;
  color: rgba(226, 232, 240, 0.96) !important;
}

html.dark .ciyuan-dashboard-card [style*="background: #f8f9fa"],
body[theme-mode="dark"] .ciyuan-dashboard-card [style*="background: #f8f9fa"],
html.dark .ciyuan-dashboard-card [style*="background:#f8f9fa"],
body[theme-mode="dark"] .ciyuan-dashboard-card [style*="background:#f8f9fa"],
html.dark .ciyuan-dashboard-card [style*="background: white"],
body[theme-mode="dark"] .ciyuan-dashboard-card [style*="background: white"],
html.dark .ciyuan-dashboard-card [style*="background:#fff"],
body[theme-mode="dark"] .ciyuan-dashboard-card [style*="background:#fff"] {
  background: rgba(15, 23, 42, 0.42) !important;
}


/* Inline announcement tables can escape component scopes. */
html.dark tr[style*="background: #f8f9fa"],
body[theme-mode="dark"] tr[style*="background: #f8f9fa"],
html.dark tr[style*="background:#f8f9fa"],
body[theme-mode="dark"] tr[style*="background:#f8f9fa"] {
  background: rgba(15, 23, 42, 0.55) !important;
}

html.dark tr[style*="background: #f8f9fa"] > th,
html.dark tr[style*="background: #f8f9fa"] > td,
body[theme-mode="dark"] tr[style*="background: #f8f9fa"] > th,
body[theme-mode="dark"] tr[style*="background: #f8f9fa"] > td,
html.dark tr[style*="background:#f8f9fa"] > th,
html.dark tr[style*="background:#f8f9fa"] > td,
body[theme-mode="dark"] tr[style*="background:#f8f9fa"] > th,
body[theme-mode="dark"] tr[style*="background:#f8f9fa"] > td {
  background: transparent !important;
  color: rgba(245, 247, 250, 0.95) !important;
  border-color: rgba(148, 163, 184, 0.34) !important;
}


/* Test-only dark layout guard for the preserved classic dashboard shell. */
html.dark body,
body[theme-mode="dark"],
html.dark .app-layout,
body[theme-mode="dark"] .app-layout,
html.dark .app-main-layout,
body[theme-mode="dark"] .app-main-layout,
html.dark .app-content,
body[theme-mode="dark"] .app-content,
html.dark .console-content,
body[theme-mode="dark"] .console-content,
html.dark .semi-layout,
body[theme-mode="dark"] .semi-layout {
  background: #0b0d12 !important;
}

html.dark .app-sider,
body[theme-mode="dark"] .app-sider,
html.dark .sidebar-container,
body[theme-mode="dark"] .sidebar-container,
html.dark .sidebar-nav,
body[theme-mode="dark"] .sidebar-nav,
html.dark .semi-navigation,
body[theme-mode="dark"] .semi-navigation,
html.dark .semi-layout-sider,
body[theme-mode="dark"] .semi-layout-sider,
html.dark .semi-layout-sider-children,
body[theme-mode="dark"] .semi-layout-sider-children {
  background: #101318 !important;
  border-color: rgba(148, 163, 184, 0.18) !important;
}

html.dark .semi-navigation-header,
html.dark .semi-navigation-footer,
html.dark .semi-navigation-list-wrapper,
body[theme-mode="dark"] .semi-navigation-header,
body[theme-mode="dark"] .semi-navigation-footer,
body[theme-mode="dark"] .semi-navigation-list-wrapper {
  background: transparent !important;
}

html.dark .semi-navigation-item,
html.dark .semi-navigation-sub-title,
html.dark .semi-navigation-item-text,
html.dark .semi-navigation-item-icon,
body[theme-mode="dark"] .semi-navigation-item,
body[theme-mode="dark"] .semi-navigation-sub-title,
body[theme-mode="dark"] .semi-navigation-item-text,
body[theme-mode="dark"] .semi-navigation-item-icon {
  color: rgba(226, 232, 240, 0.78) !important;
}

html.dark .semi-navigation-item:hover,
body[theme-mode="dark"] .semi-navigation-item:hover {
  background: rgba(59, 130, 246, 0.12) !important;
}

html.dark .semi-navigation-item-selected,
body[theme-mode="dark"] .semi-navigation-item-selected {
  background: rgba(34, 197, 94, 0.16) !important;
  color: #86efac !important;
}

html.dark .semi-navigation-item-selected .semi-navigation-item-text,
html.dark .semi-navigation-item-selected .semi-navigation-item-icon,
body[theme-mode="dark"] .semi-navigation-item-selected .semi-navigation-item-text,
body[theme-mode="dark"] .semi-navigation-item-selected .semi-navigation-item-icon {
  color: #86efac !important;
}

html.dark .semi-navigation-sub-title,
body[theme-mode="dark"] .semi-navigation-sub-title {
  color: rgba(148, 163, 184, 0.75) !important;
}

html.dark .sidebar-container::after,
body[theme-mode="dark"] .sidebar-container::after {
  background: rgba(148, 163, 184, 0.16) !important;
}


/* Test-only dark text contrast guard for dashboard cards. */
html.dark .semi-tag-white-light,
body[theme-mode="dark"] .semi-tag-white-light {
  background: rgba(148, 163, 184, 0.16) !important;
  border-color: rgba(226, 232, 240, 0.42) !important;
  color: rgba(245, 247, 250, 0.94) !important;
}

html.dark .semi-tag-white-light *,
body[theme-mode="dark"] .semi-tag-white-light * {
  color: rgba(245, 247, 250, 0.94) !important;
}

html.dark .semi-navigation-item-selected,
body[theme-mode="dark"] .semi-navigation-item-selected {
  background: rgba(16, 185, 129, 0.24) !important;
}

html.dark .semi-navigation-item-selected *,
body[theme-mode="dark"] .semi-navigation-item-selected * {
  color: #d1fae5 !important;
}

html.dark h1[style*="color: #2c3e50"],
html.dark h2[style*="color: #2c3e50"],
html.dark h3[style*="color: #2c3e50"],
body[theme-mode="dark"] h1[style*="color: #2c3e50"],
body[theme-mode="dark"] h2[style*="color: #2c3e50"],
body[theme-mode="dark"] h3[style*="color: #2c3e50"],
html.dark h1[style*="color:#2c3e50"],
html.dark h2[style*="color:#2c3e50"],
html.dark h3[style*="color:#2c3e50"],
body[theme-mode="dark"] h1[style*="color:#2c3e50"],
body[theme-mode="dark"] h2[style*="color:#2c3e50"],
body[theme-mode="dark"] h3[style*="color:#2c3e50"] {
  color: rgba(248, 250, 252, 0.96) !important;
  border-color: rgba(96, 165, 250, 0.75) !important;
}

html.dark .semi-card h1,
html.dark .semi-card h2,
html.dark .semi-card h3,
body[theme-mode="dark"] .semi-card h1,
body[theme-mode="dark"] .semi-card h2,
body[theme-mode="dark"] .semi-card h3 {
  color: rgba(248, 250, 252, 0.96) !important;
}

html.dark .semi-card .semi-typography,
html.dark .semi-card .semi-typography *,
body[theme-mode="dark"] .semi-card .semi-typography,
body[theme-mode="dark"] .semi-card .semi-typography * {
  color: inherit;
}


/* Test-only dark contrast v2: use opaque surfaces for readable card badges. */
html.dark .semi-card,
body[theme-mode="dark"] .semi-card,
html.dark .ciyuan-dashboard-card,
body[theme-mode="dark"] .ciyuan-dashboard-card {
  color: rgba(248, 250, 252, 0.96) !important;
}

html.dark .semi-card .semi-typography,
html.dark .semi-card .semi-typography *,
body[theme-mode="dark"] .semi-card .semi-typography,
body[theme-mode="dark"] .semi-card .semi-typography * {
  color: rgba(248, 250, 252, 0.92) !important;
}

html.dark .semi-card .text-gray-500,
html.dark .semi-card .text-gray-600,
html.dark .semi-card .text-slate-500,
html.dark .semi-card .text-slate-600,
body[theme-mode="dark"] .semi-card .text-gray-500,
body[theme-mode="dark"] .semi-card .text-gray-600,
body[theme-mode="dark"] .semi-card .text-slate-500,
body[theme-mode="dark"] .semi-card .text-slate-600 {
  color: rgba(203, 213, 225, 0.92) !important;
}

html.dark .semi-tag-white-light,
body[theme-mode="dark"] .semi-tag-white-light {
  background: #1f2937 !important;
  border-color: rgba(226, 232, 240, 0.55) !important;
  color: #f8fafc !important;
}

html.dark .semi-tag-white-light *,
body[theme-mode="dark"] .semi-tag-white-light * {
  color: #f8fafc !important;
}

html.dark .semi-navigation-item-selected,
body[theme-mode="dark"] .semi-navigation-item-selected {
  background: #064e3b !important;
}

html.dark .semi-navigation-item-selected,
html.dark .semi-navigation-item-selected *,
body[theme-mode="dark"] .semi-navigation-item-selected,
body[theme-mode="dark"] .semi-navigation-item-selected * {
  color: #ecfdf5 !important;
}

html.dark .semi-avatar-green,
body[theme-mode="dark"] .semi-avatar-green {
  background: #166534 !important;
}


/* v3 high-priority dark dashboard contrast layer. */
html.dark body,
body[theme-mode="dark"] {
  --semi-color-text-0: rgba(248, 250, 252, 0.96) !important;
  --semi-color-text-1: rgba(226, 232, 240, 0.92) !important;
  --semi-color-text-2: rgba(203, 213, 225, 0.88) !important;
  --semi-color-text-3: rgba(148, 163, 184, 0.86) !important;
  --semi-color-bg-0: #0b0d12 !important;
  --semi-color-bg-1: #101318 !important;
  --semi-color-bg-2: #16161a !important;
  --semi-color-bg-3: #1f2937 !important;
  --semi-color-bg-overlay: #1f232b !important;
  --semi-color-fill-0: rgba(148, 163, 184, 0.10) !important;
  --semi-color-fill-1: rgba(148, 163, 184, 0.16) !important;
  --semi-color-fill-2: rgba(148, 163, 184, 0.22) !important;
  --semi-color-border: rgba(226, 232, 240, 0.62) !important;
}

html.dark .semi-card,
body[theme-mode="dark"] .semi-card,
html.dark .semi-card *,
body[theme-mode="dark"] .semi-card *,
html.dark .ciyuan-dashboard-card,
body[theme-mode="dark"] .ciyuan-dashboard-card,
html.dark .ciyuan-dashboard-card *,
body[theme-mode="dark"] .ciyuan-dashboard-card * {
  color: rgba(248, 250, 252, 0.94) !important;
}

html.dark .semi-card [class*="text-gray-"],
html.dark .semi-card [class*="text-slate-"],
html.dark .semi-card [class*="text-zinc-"],
body[theme-mode="dark"] .semi-card [class*="text-gray-"],
body[theme-mode="dark"] .semi-card [class*="text-slate-"],
body[theme-mode="dark"] .semi-card [class*="text-zinc-"] {
  color: rgba(226, 232, 240, 0.92) !important;
}

html.dark .semi-tag,
body[theme-mode="dark"] .semi-tag {
  background: #1f2937 !important;
  border-color: rgba(226, 232, 240, 0.58) !important;
  color: #f8fafc !important;
}

html.dark .semi-tag *,
body[theme-mode="dark"] .semi-tag * {
  color: #f8fafc !important;
}

html.dark .semi-navigation-item-selected,
body[theme-mode="dark"] .semi-navigation-item-selected {
  background: #064e3b !important;
}

html.dark .semi-navigation-item-selected,
html.dark .semi-navigation-item-selected *,
body[theme-mode="dark"] .semi-navigation-item-selected,
body[theme-mode="dark"] .semi-navigation-item-selected * {
  color: #ecfdf5 !important;
}

html.dark .semi-navigation-item:not(.semi-navigation-item-selected),
html.dark .semi-navigation-item:not(.semi-navigation-item-selected) *,
body[theme-mode="dark"] .semi-navigation-item:not(.semi-navigation-item-selected),
body[theme-mode="dark"] .semi-navigation-item:not(.semi-navigation-item-selected) * {
  color: rgba(226, 232, 240, 0.82) !important;
}
