/* 全站轻量视觉微调：统一字号、间距、玻璃卡片和表单手感 */
html {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

:root {
  --theme-bg: #07101c;
  --theme-bg-soft: rgba(10, 18, 32, 0.78);
  --theme-card: rgba(255, 255, 255, 0.055);
  --theme-card-strong: rgba(10, 18, 32, 0.86);
  --theme-border: rgba(0, 229, 255, 0.24);
  --theme-text: #ffffff;
  --theme-muted: #a8d8e0;
  --theme-accent: #00e5ff;
  --theme-accent-2: #64ffda;
  --theme-warm: #ffb86b;
  --theme-shadow: rgba(0, 0, 0, 0.28);
}

html[data-theme="light"] {
  --theme-bg: #eef8f7;
  --theme-bg-soft: rgba(255, 255, 255, 0.7);
  --theme-card: rgba(255, 255, 255, 0.72);
  --theme-card-strong: rgba(255, 255, 255, 0.86);
  --theme-border: rgba(19, 148, 170, 0.2);
  --theme-text: #132633;
  --theme-muted: #4c6872;
  --theme-accent: #008fb0;
  --theme-accent-2: #0f9f8f;
  --theme-warm: #c7781c;
  --theme-shadow: rgba(33, 82, 96, 0.14);
}

body {
  letter-spacing: 0;
}

body[data-theme="light"] {
  color: var(--theme-text) !important;
  background:
    radial-gradient(circle at 14% 10%, rgba(0, 180, 210, 0.18), transparent 30%),
    radial-gradient(circle at 86% 12%, rgba(99, 214, 185, 0.16), transparent 28%),
    linear-gradient(135deg, #f7fbf8 0%, #eaf7f8 50%, #edf5ff 100%) !important;
}

.glass-card,
.glass-card-inner {
  border-radius: 10px !important;
  border-color: var(--theme-border) !important;
  box-shadow: 0 16px 42px var(--theme-shadow), 0 0 0 1px rgba(0, 229, 255, 0.08) inset !important;
}

body[data-theme="light"] .glass-card,
body[data-theme="light"] .glass-card-inner,
body[data-theme="light"] .tool-card,
body[data-theme="light"] .panel,
body[data-theme="light"] .data-card,
body[data-theme="light"] .info-band,
body[data-theme="light"] .feature,
body[data-theme="light"] .notice,
body[data-theme="light"] .support-note {
  background: var(--theme-card) !important;
  border-color: var(--theme-border) !important;
  color: var(--theme-text) !important;
  box-shadow: 0 18px 46px var(--theme-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.75) !important;
}

body[data-theme="light"] .topbar,
body[data-theme="light"] .navbar,
body[data-theme="light"] .status-bar {
  background: rgba(255, 255, 255, 0.72) !important;
  border-color: var(--theme-border) !important;
  color: var(--theme-text) !important;
  box-shadow: 0 10px 34px rgba(33, 82, 96, 0.12) !important;
}

body[data-theme="light"] h1,
body[data-theme="light"] h2,
body[data-theme="light"] h3,
body[data-theme="light"] .brand-name,
body[data-theme="light"] .brand-wrap,
body[data-theme="light"] .nav-left .brand-name,
body[data-theme="light"] .text-white,
body[data-theme="light"] .card-value,
body[data-theme="light"] .sec-title,
body[data-theme="light"] .sec-subtitle {
  color: var(--theme-text) !important;
}

body[data-theme="light"] p,
body[data-theme="light"] .subtitle,
body[data-theme="light"] .helper-text,
body[data-theme="light"] .sub-text,
body[data-theme="light"] .card-label,
body[data-theme="light"] .field-hint,
body[data-theme="light"] .raw-preview,
body[data-theme="light"] .chat-content,
body[data-theme="light"] .result-area,
body[data-theme="light"] .text-\[\#A8D8E0\] {
  color: var(--theme-muted) !important;
}

body[data-theme="light"] .nav-links a,
body[data-theme="light"] .logout-link,
body[data-theme="light"] .user-meta {
  color: #24404c !important;
}

body[data-theme="light"] .nav-links a:hover,
body[data-theme="light"] .nav-links a.active,
body[data-theme="light"] .eyebrow,
body[data-theme="light"] .card-action,
body[data-theme="light"] a {
  color: var(--theme-accent) !important;
}

body[data-theme="light"] .neon-input,
body[data-theme="light"] .neon-select,
body[data-theme="light"] .neon-textarea,
body[data-theme="light"] input[type="text"],
body[data-theme="light"] input[type="password"],
body[data-theme="light"] input[type="number"],
body[data-theme="light"] input[type="datetime-local"],
body[data-theme="light"] textarea,
body[data-theme="light"] select {
  background: rgba(255, 255, 255, 0.78) !important;
  border-color: rgba(19, 148, 170, 0.28) !important;
  color: var(--theme-text) !important;
}

body[data-theme="light"] select option {
  background: #f7fbf8 !important;
  color: var(--theme-text) !important;
}

body[data-theme="light"] .neon-btn,
body[data-theme="light"] .voice-btn,
body[data-theme="light"] .download-btn-sm,
body[data-theme="light"] .btn,
body[data-theme="light"] .action-btn {
  border-color: rgba(19, 148, 170, 0.34) !important;
  background: rgba(0, 143, 176, 0.1) !important;
  color: var(--theme-accent) !important;
}

body[data-theme="light"] .neon-btn:hover,
body[data-theme="light"] .voice-btn:hover,
body[data-theme="light"] .download-btn-sm:hover,
body[data-theme="light"] .btn-primary,
body[data-theme="light"] .action-btn.primary {
  background: var(--theme-accent) !important;
  border-color: var(--theme-accent) !important;
  color: #ffffff !important;
  box-shadow: 0 10px 22px rgba(0, 143, 176, 0.22) !important;
}

body[data-theme="light"] .action-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(239, 251, 246, 0.66)) !important;
  border-color: rgba(199, 120, 28, 0.22) !important;
  color: var(--theme-text) !important;
}

body[data-theme="light"] .action-panel p,
body[data-theme="light"] .task-reason {
  color: #5f5a46 !important;
}

body[data-theme="light"] .icon-box,
body[data-theme="light"] .icon-tile {
  background: rgba(0, 143, 176, 0.1) !important;
  color: var(--theme-accent) !important;
}

body[data-theme="light"] .chat-bubble.ai,
body[data-theme="light"] .chat-bubble.system,
body[data-theme="light"] .result-area,
body[data-theme="light"] .bg-black\/20,
body[data-theme="light"] .bg-black\/30 {
  background: rgba(255, 255, 255, 0.52) !important;
}

body[data-theme="light"] .text-\[\#D1D5DB\],
body[data-theme="light"] .text-\[\#D7EDF2\],
body[data-theme="light"] .text-\[\#9CA3AF\],
body[data-theme="light"] .text-gray-100,
body[data-theme="light"] .text-gray-200,
body[data-theme="light"] .text-gray-300,
body[data-theme="light"] .text-gray-400,
body[data-theme="light"] .text-slate-200,
body[data-theme="light"] .text-slate-300,
body[data-theme="light"] .text-slate-400,
body[data-theme="light"] .opacity-70,
body[data-theme="light"] .opacity-80 {
  color: #31515d !important;
}

body[data-theme="light"] label,
body[data-theme="light"] .label,
body[data-theme="light"] .form-label,
body[data-theme="light"] .input-label,
body[data-theme="light"] .chat-label,
body[data-theme="light"] .status-label,
body[data-theme="light"] .lbl,
body[data-theme="light"] .funnel-label,
body[data-theme="light"] .metric-label,
body[data-theme="light"] .text-xs,
body[data-theme="light"] .text-sm {
  color: #3b5f6b !important;
}

body[data-theme="light"] input::placeholder,
body[data-theme="light"] textarea::placeholder,
body[data-theme="light"] .neon-input::placeholder,
body[data-theme="light"] .neon-textarea::placeholder {
  color: #6b8189 !important;
  opacity: 1 !important;
}

body[data-theme="light"] .form-alert-error {
  background: rgba(255, 242, 230, 0.88) !important;
  border-color: rgba(214, 86, 49, 0.34) !important;
  color: #7a2d1b !important;
}

body[data-theme="light"] .form-alert-error .alert-text,
body[data-theme="light"] .form-alert-error .alert-icon {
  color: #9a3412 !important;
}

body[data-theme="light"] .theme-toggle,
body[data-theme="light"] .copy-btn,
body[data-theme="light"] .refine-btn,
body[data-theme="light"] .platform-toggle-btn,
body[data-theme="light"] .tab-btn {
  background: rgba(255, 255, 255, 0.76) !important;
  border-color: rgba(19, 148, 170, 0.34) !important;
  color: #006f8b !important;
}

body[data-theme="light"] .theme-toggle:hover,
body[data-theme="light"] .copy-btn:hover,
body[data-theme="light"] .refine-btn:hover,
body[data-theme="light"] .platform-toggle-btn.active,
body[data-theme="light"] .tab-btn.active {
  background: #008fb0 !important;
  border-color: #008fb0 !important;
  color: #ffffff !important;
}

body[data-theme="light"] .chat-window,
body[data-theme="light"] .chat-input-wrap,
body[data-theme="light"] .monitor-output,
body[data-theme="light"] .report-container,
body[data-theme="light"] .archive-section,
body[data-theme="light"] .result-card,
body[data-theme="light"] .task-card,
body[data-theme="light"] .stat-card {
  background: rgba(255, 255, 255, 0.64) !important;
  border-color: rgba(19, 148, 170, 0.22) !important;
  color: var(--theme-text) !important;
}

body[data-theme="light"] .val,
body[data-theme="light"] .funnel-val,
body[data-theme="light"] .metric-value,
body[data-theme="light"] .data-value,
body[data-theme="light"] .status-value,
body[data-theme="light"] .markdown-body,
body[data-theme="light"] .markdown-body p,
body[data-theme="light"] .review-report p,
body[data-theme="light"] .review-report li {
  color: #18313c !important;
}

body[data-theme="light"] .chat-bubble.user {
  background: rgba(0, 143, 176, 0.14) !important;
  color: #12313b !important;
  border-color: rgba(0, 143, 176, 0.28) !important;
}

/* Theme contrast guardrails: keep controls readable across all pages. */
select option,
.neon-select option,
.form-select option {
  background: #111827 !important;
  color: #f8fafc !important;
}

select:disabled,
input:disabled,
textarea:disabled,
button:disabled,
.btn:disabled,
.neon-btn:disabled,
.voice-btn:disabled {
  opacity: 0.58 !important;
  cursor: not-allowed !important;
}

html[data-theme="light"] body,
body[data-theme="light"],
body.light-mode {
  color: #111827 !important;
}

html[data-theme="light"] body .topbar,
html[data-theme="light"] body .navbar,
html[data-theme="light"] body .status-bar,
body[data-theme="light"] .topbar,
body[data-theme="light"] .navbar,
body[data-theme="light"] .status-bar,
body.light-mode .topbar,
body.light-mode .navbar,
body.light-mode .status-bar {
  background: rgba(255, 255, 255, 0.86) !important;
  border-color: #94a3b8 !important;
  color: #111827 !important;
}

html[data-theme="light"] body .glass-card,
html[data-theme="light"] body .glass-card-inner,
html[data-theme="light"] body .tool-card,
html[data-theme="light"] body .panel,
html[data-theme="light"] body .panel-left,
html[data-theme="light"] body .panel-right,
html[data-theme="light"] body .data-card,
html[data-theme="light"] body .info-band,
html[data-theme="light"] body .feature,
html[data-theme="light"] body .notice,
html[data-theme="light"] body .support-note,
html[data-theme="light"] body .card,
body[data-theme="light"] .glass-card,
body[data-theme="light"] .glass-card-inner,
body[data-theme="light"] .tool-card,
body[data-theme="light"] .panel,
body[data-theme="light"] .panel-left,
body[data-theme="light"] .panel-right,
body[data-theme="light"] .data-card,
body[data-theme="light"] .info-band,
body[data-theme="light"] .feature,
body[data-theme="light"] .notice,
body[data-theme="light"] .support-note,
body[data-theme="light"] .card,
body.light-mode .glass-card,
body.light-mode .glass-card-inner,
body.light-mode .tool-card,
body.light-mode .panel,
body.light-mode .panel-left,
body.light-mode .panel-right,
body.light-mode .data-card,
body.light-mode .info-band,
body.light-mode .feature,
body.light-mode .notice,
body.light-mode .support-note,
body.light-mode .card {
  background: rgba(255, 255, 255, 0.88) !important;
  border-color: #cbd5e1 !important;
  color: #111827 !important;
}

html[data-theme="light"] body h1,
html[data-theme="light"] body h2,
html[data-theme="light"] body h3,
html[data-theme="light"] body h4,
html[data-theme="light"] body h5,
html[data-theme="light"] body h6,
html[data-theme="light"] body .brand-name,
html[data-theme="light"] body .text-white,
html[data-theme="light"] body .sec-title,
html[data-theme="light"] body .card-value,
html[data-theme="light"] body .chat-header,
body[data-theme="light"] h1,
body[data-theme="light"] h2,
body[data-theme="light"] h3,
body[data-theme="light"] h4,
body[data-theme="light"] h5,
body[data-theme="light"] h6,
body[data-theme="light"] .brand-name,
body[data-theme="light"] .text-white,
body[data-theme="light"] .sec-title,
body[data-theme="light"] .card-value,
body[data-theme="light"] .chat-header,
body.light-mode h1,
body.light-mode h2,
body.light-mode h3,
body.light-mode h4,
body.light-mode h5,
body.light-mode h6,
body.light-mode .brand-name,
body.light-mode .text-white,
body.light-mode .sec-title,
body.light-mode .card-value,
body.light-mode .chat-header {
  color: #111827 !important;
}

html[data-theme="light"] body p,
html[data-theme="light"] body span,
html[data-theme="light"] body li,
html[data-theme="light"] body label,
html[data-theme="light"] body small,
html[data-theme="light"] body .subtitle,
html[data-theme="light"] body .helper-text,
html[data-theme="light"] body .help-text,
html[data-theme="light"] body .text-muted,
html[data-theme="light"] body .field-hint,
html[data-theme="light"] body .sub-text,
html[data-theme="light"] body .card-label,
html[data-theme="light"] body .raw-preview,
html[data-theme="light"] body .chat-content,
html[data-theme="light"] body .chat-label,
html[data-theme="light"] body .result-area,
body[data-theme="light"] p,
body[data-theme="light"] span,
body[data-theme="light"] li,
body[data-theme="light"] label,
body[data-theme="light"] small,
body[data-theme="light"] .subtitle,
body[data-theme="light"] .helper-text,
body[data-theme="light"] .help-text,
body[data-theme="light"] .text-muted,
body[data-theme="light"] .field-hint,
body[data-theme="light"] .sub-text,
body[data-theme="light"] .card-label,
body[data-theme="light"] .raw-preview,
body[data-theme="light"] .chat-content,
body[data-theme="light"] .chat-label,
body[data-theme="light"] .result-area,
body.light-mode p,
body.light-mode span,
body.light-mode li,
body.light-mode label,
body.light-mode small,
body.light-mode .subtitle,
body.light-mode .helper-text,
body.light-mode .help-text,
body.light-mode .text-muted,
body.light-mode .field-hint,
body.light-mode .sub-text,
body.light-mode .card-label,
body.light-mode .raw-preview,
body.light-mode .chat-content,
body.light-mode .chat-label,
body.light-mode .result-area {
  color: #374151 !important;
}

html[data-theme="light"] body input,
html[data-theme="light"] body select,
html[data-theme="light"] body textarea,
html[data-theme="light"] body .form-control,
html[data-theme="light"] body .form-select,
html[data-theme="light"] body .neon-input,
html[data-theme="light"] body .neon-select,
html[data-theme="light"] body .neon-textarea,
body[data-theme="light"] input,
body[data-theme="light"] select,
body[data-theme="light"] textarea,
body[data-theme="light"] .form-control,
body[data-theme="light"] .form-select,
body[data-theme="light"] .neon-input,
body[data-theme="light"] .neon-select,
body[data-theme="light"] .neon-textarea,
body.light-mode input,
body.light-mode select,
body.light-mode textarea,
body.light-mode .form-control,
body.light-mode .form-select,
body.light-mode .neon-input,
body.light-mode .neon-select,
body.light-mode .neon-textarea {
  background: #ffffff !important;
  color: #111827 !important;
  border-color: #94a3b8 !important;
  box-shadow: none !important;
  -webkit-text-fill-color: #111827 !important;
}

html[data-theme="light"] body select option,
html[data-theme="light"] body .neon-select option,
html[data-theme="light"] body .form-select option,
body[data-theme="light"] select option,
body[data-theme="light"] .neon-select option,
body[data-theme="light"] .form-select option,
body.light-mode select option,
body.light-mode .neon-select option,
body.light-mode .form-select option {
  background: #ffffff !important;
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
}

html[data-theme="light"] body select option:checked,
html[data-theme="light"] body select option:hover,
body[data-theme="light"] select option:checked,
body[data-theme="light"] select option:hover,
body.light-mode select option:checked,
body.light-mode select option:hover {
  background: #dff7fb !important;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
}

html[data-theme="light"] body input::placeholder,
html[data-theme="light"] body textarea::placeholder,
body[data-theme="light"] input::placeholder,
body[data-theme="light"] textarea::placeholder,
body.light-mode input::placeholder,
body.light-mode textarea::placeholder {
  color: #4b5563 !important;
  opacity: 1 !important;
  -webkit-text-fill-color: #4b5563 !important;
}

html[data-theme="light"] body button,
html[data-theme="light"] body .btn,
html[data-theme="light"] body .neon-btn,
html[data-theme="light"] body .voice-btn,
html[data-theme="light"] body .download-btn-sm,
html[data-theme="light"] body .copy-btn,
html[data-theme="light"] body .refine-btn,
html[data-theme="light"] body .btn-ghost,
body[data-theme="light"] button,
body[data-theme="light"] .btn,
body[data-theme="light"] .neon-btn,
body[data-theme="light"] .voice-btn,
body[data-theme="light"] .download-btn-sm,
body[data-theme="light"] .copy-btn,
body[data-theme="light"] .refine-btn,
body[data-theme="light"] .btn-ghost,
body.light-mode button,
body.light-mode .btn,
body.light-mode .neon-btn,
body.light-mode .voice-btn,
body.light-mode .download-btn-sm,
body.light-mode .copy-btn,
body.light-mode .refine-btn,
body.light-mode .btn-ghost {
  background: #ffffff !important;
  border-color: #0e7490 !important;
  color: #075985 !important;
  -webkit-text-fill-color: currentColor !important;
}

html[data-theme="light"] body button:hover,
html[data-theme="light"] body .btn:hover,
html[data-theme="light"] body .neon-btn:hover,
html[data-theme="light"] body .voice-btn:hover,
html[data-theme="light"] body .download-btn-sm:hover,
html[data-theme="light"] body .copy-btn:hover,
html[data-theme="light"] body .refine-btn:hover,
body[data-theme="light"] button:hover,
body[data-theme="light"] .btn:hover,
body[data-theme="light"] .neon-btn:hover,
body[data-theme="light"] .voice-btn:hover,
body[data-theme="light"] .download-btn-sm:hover,
body[data-theme="light"] .copy-btn:hover,
body[data-theme="light"] .refine-btn:hover,
body.light-mode button:hover,
body.light-mode .btn:hover,
body.light-mode .neon-btn:hover,
body.light-mode .voice-btn:hover,
body.light-mode .download-btn-sm:hover,
body.light-mode .copy-btn:hover,
body.light-mode .refine-btn:hover {
  background: #0891b2 !important;
  border-color: #0891b2 !important;
  color: #ffffff !important;
}

html[data-theme="light"] body button:disabled,
html[data-theme="light"] body .btn:disabled,
html[data-theme="light"] body .neon-btn:disabled,
html[data-theme="light"] body .voice-btn:disabled,
body[data-theme="light"] button:disabled,
body[data-theme="light"] .btn:disabled,
body[data-theme="light"] .neon-btn:disabled,
body[data-theme="light"] .voice-btn:disabled,
body.light-mode button:disabled,
body.light-mode .btn:disabled,
body.light-mode .neon-btn:disabled,
body.light-mode .voice-btn:disabled {
  background: #e5e7eb !important;
  border-color: #cbd5e1 !important;
  color: #4b5563 !important;
}

html[data-theme="light"] body .result-area,
html[data-theme="light"] body .result-panel,
html[data-theme="light"] body .report-container,
html[data-theme="light"] body .monitor-output,
html[data-theme="light"] body .chat-window,
html[data-theme="light"] body .chat-input-wrap,
html[data-theme="light"] body .chat-bubble.ai,
html[data-theme="light"] body .chat-bubble.system,
html[data-theme="light"] body .script-card,
html[data-theme="light"] body .archive-card,
html[data-theme="light"] body .status-card,
html[data-theme="light"] body .empty,
body[data-theme="light"] .result-area,
body[data-theme="light"] .result-panel,
body[data-theme="light"] .report-container,
body[data-theme="light"] .monitor-output,
body[data-theme="light"] .chat-window,
body[data-theme="light"] .chat-input-wrap,
body[data-theme="light"] .chat-bubble.ai,
body[data-theme="light"] .chat-bubble.system,
body[data-theme="light"] .script-card,
body[data-theme="light"] .archive-card,
body[data-theme="light"] .status-card,
body[data-theme="light"] .empty,
body.light-mode .result-area,
body.light-mode .result-panel,
body.light-mode .report-container,
body.light-mode .monitor-output,
body.light-mode .chat-window,
body.light-mode .chat-input-wrap,
body.light-mode .chat-bubble.ai,
body.light-mode .chat-bubble.system,
body.light-mode .script-card,
body.light-mode .archive-card,
body.light-mode .status-card,
body.light-mode .empty {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #111827 !important;
}

html[data-theme="light"] body .archive-card,
body[data-theme="light"] .archive-card,
body.light-mode .archive-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(241,248,250,0.96)) !important;
  border-color: #94a3b8 !important;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255,255,255,0.9) !important;
}

html[data-theme="light"] body .archive-card h2,
html[data-theme="light"] body .archive-card h2 span,
html[data-theme="light"] body .archive-card h2 i,
body[data-theme="light"] .archive-card h2,
body[data-theme="light"] .archive-card h2 span,
body[data-theme="light"] .archive-card h2 i,
body.light-mode .archive-card h2,
body.light-mode .archive-card h2 span,
body.light-mode .archive-card h2 i {
  color: #0f172a !important;
}

html[data-theme="light"] body .archive-card h2 i,
body[data-theme="light"] .archive-card h2 i,
body.light-mode .archive-card h2 i {
  color: #0891b2 !important;
}

html[data-theme="light"] body .archive-card p,
html[data-theme="light"] body .archive-card li,
html[data-theme="light"] body .archive-card .action-list li,
body[data-theme="light"] .archive-card p,
body[data-theme="light"] .archive-card li,
body[data-theme="light"] .archive-card .action-list li,
body.light-mode .archive-card p,
body.light-mode .archive-card li,
body.light-mode .archive-card .action-list li {
  color: #1f2937 !important;
}

html[data-theme="light"] body .archive-card .action-list li,
body[data-theme="light"] .archive-card .action-list li,
body.light-mode .archive-card .action-list li {
  background: #ecfeff !important;
  border-color: #67e8f9 !important;
}

html[data-theme="light"] body .archive-card .action-list span,
body[data-theme="light"] .archive-card .action-list span,
body.light-mode .archive-card .action-list span {
  background: #0891b2 !important;
  color: #ffffff !important;
}

html[data-theme="light"] body .triage-card,
html[data-theme="light"] body .script-form-header,
html[data-theme="light"] body .form-header,
html[data-theme="light"] body .field-block,
html[data-theme="light"] body .archive-hint,
body[data-theme="light"] .triage-card,
body[data-theme="light"] .script-form-header,
body[data-theme="light"] .form-header,
body[data-theme="light"] .field-block,
body[data-theme="light"] .archive-hint,
body.light-mode .triage-card,
body.light-mode .script-form-header,
body.light-mode .form-header,
body.light-mode .field-block,
body.light-mode .archive-hint {
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: #cbd5e1 !important;
  color: #111827 !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08) !important;
}

html[data-theme="light"] body .triage-card:hover,
body[data-theme="light"] .triage-card:hover,
body.light-mode .triage-card:hover {
  background: #ecfeff !important;
  border-color: #0891b2 !important;
}

html[data-theme="light"] body .triage-heading,
html[data-theme="light"] body .triage-title,
html[data-theme="light"] body .script-form-title,
html[data-theme="light"] body .form-title,
html[data-theme="light"] body .field-block label,
html[data-theme="light"] body .result-head h2,
body[data-theme="light"] .triage-heading,
body[data-theme="light"] .triage-title,
body[data-theme="light"] .script-form-title,
body[data-theme="light"] .form-title,
body[data-theme="light"] .field-block label,
body[data-theme="light"] .result-head h2,
body.light-mode .triage-heading,
body.light-mode .triage-title,
body.light-mode .script-form-title,
body.light-mode .form-title,
body.light-mode .field-block label,
body.light-mode .result-head h2 {
  color: #111827 !important;
}

html[data-theme="light"] body .triage-desc,
html[data-theme="light"] body .triage-note,
html[data-theme="light"] body .script-form-subtitle,
html[data-theme="light"] body .form-subtitle,
html[data-theme="light"] body .empty-state,
body[data-theme="light"] .triage-desc,
body[data-theme="light"] .triage-note,
body[data-theme="light"] .script-form-subtitle,
body[data-theme="light"] .form-subtitle,
body[data-theme="light"] .empty-state,
body.light-mode .triage-desc,
body.light-mode .triage-note,
body.light-mode .script-form-subtitle,
body.light-mode .form-subtitle,
body.light-mode .empty-state {
  color: #374151 !important;
}

html[data-theme="light"] body .triage-heading i,
html[data-theme="light"] body .triage-title i,
body[data-theme="light"] .triage-heading i,
body[data-theme="light"] .triage-title i,
body.light-mode .triage-heading i,
body.light-mode .triage-title i {
  color: #0891b2 !important;
}

html[data-theme="light"] body .back-triage-btn,
body[data-theme="light"] .back-triage-btn,
body.light-mode .back-triage-btn {
  background: #ffffff !important;
  border-color: #0891b2 !important;
  color: #075985 !important;
}

html[data-theme="light"] body .live-brief,
html[data-theme="light"] body .brief-card,
html[data-theme="light"] body .metric-card,
html[data-theme="light"] body .strategy-panel,
html[data-theme="light"] body .strategy-item,
body[data-theme="light"] .live-brief,
body[data-theme="light"] .brief-card,
body[data-theme="light"] .metric-card,
body[data-theme="light"] .strategy-panel,
body[data-theme="light"] .strategy-item,
body.light-mode .live-brief,
body.light-mode .brief-card,
body.light-mode .metric-card,
body.light-mode .strategy-panel,
body.light-mode .strategy-item {
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: #cbd5e1 !important;
  color: #111827 !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08) !important;
}

html[data-theme="light"] body .metric-card.weak,
body[data-theme="light"] .metric-card.weak,
body.light-mode .metric-card.weak {
  border-color: #dc2626 !important;
  box-shadow: 0 14px 34px rgba(220, 38, 38, 0.14) !important;
}

html[data-theme="light"] body .brief-label,
html[data-theme="light"] body .metric-lines,
html[data-theme="light"] body .strategy-label,
body[data-theme="light"] .brief-label,
body[data-theme="light"] .metric-lines,
body[data-theme="light"] .strategy-label,
body.light-mode .brief-label,
body.light-mode .metric-lines,
body.light-mode .strategy-label {
  color: #475569 !important;
}

html[data-theme="light"] body .brief-value,
html[data-theme="light"] body .metric-name,
html[data-theme="light"] body .strategy-text,
html[data-theme="light"] body .strategy-title,
body[data-theme="light"] .brief-value,
body[data-theme="light"] .metric-name,
body[data-theme="light"] .strategy-text,
body[data-theme="light"] .strategy-title,
body.light-mode .brief-value,
body.light-mode .metric-name,
body.light-mode .strategy-text,
body.light-mode .strategy-title {
  color: #111827 !important;
}

html[data-theme="light"] body .metric-score,
body[data-theme="light"] .metric-score,
body.light-mode .metric-score {
  color: #0369a1 !important;
}

html[data-theme="light"] body .metric-bar,
body[data-theme="light"] .metric-bar,
body.light-mode .metric-bar {
  background: #dbeafe !important;
}

html[data-theme="light"] body .strategy-tag,
body[data-theme="light"] .strategy-tag,
body.light-mode .strategy-tag {
  background: #fee2e2 !important;
  border-color: #fca5a5 !important;
  color: #991b1b !important;
}

html[data-theme="light"] body .weak-badge,
body[data-theme="light"] .weak-badge,
body.light-mode .weak-badge {
  background: #dc2626 !important;
  color: #ffffff !important;
}

html[data-theme="light"] body .chat-input-row,
body[data-theme="light"] .chat-input-row,
body.light-mode .chat-input-row {
  background: rgba(255, 255, 255, 0.96) !important;
  border-color: #cbd5e1 !important;
}

html[data-theme="light"] body .panel-left,
html[data-theme="light"] body .panel-right,
body[data-theme="light"] .panel-left,
body[data-theme="light"] .panel-right,
body.light-mode .panel-left,
body.light-mode .panel-right {
  background: rgba(255, 255, 255, 0.78) !important;
  border-color: #cbd5e1 !important;
}

html[data-theme="light"] body .markdown-body,
html[data-theme="light"] body .markdown-body *,
html[data-theme="light"] body .review-report,
html[data-theme="light"] body .review-report *,
html[data-theme="light"] body .bubble-text,
html[data-theme="light"] body .bubble-text *,
body[data-theme="light"] .markdown-body,
body[data-theme="light"] .markdown-body *,
body[data-theme="light"] .review-report,
body[data-theme="light"] .review-report *,
body[data-theme="light"] .bubble-text,
body[data-theme="light"] .bubble-text *,
body.light-mode .markdown-body,
body.light-mode .markdown-body *,
body.light-mode .review-report,
body.light-mode .review-report *,
body.light-mode .bubble-text,
body.light-mode .bubble-text * {
  color: #111827 !important;
}

html[data-theme="light"] body a,
html[data-theme="light"] body .nav-links a,
html[data-theme="light"] body .logout-link,
body[data-theme="light"] a,
body[data-theme="light"] .nav-links a,
body[data-theme="light"] .logout-link,
body.light-mode a,
body.light-mode .nav-links a,
body.light-mode .logout-link {
  color: #075985 !important;
}

html[data-theme="light"] body a:hover,
html[data-theme="light"] body .nav-links a:hover,
html[data-theme="light"] body .nav-links a.active,
body[data-theme="light"] a:hover,
body[data-theme="light"] .nav-links a:hover,
body[data-theme="light"] .nav-links a.active,
body.light-mode a:hover,
body.light-mode .nav-links a:hover,
body.light-mode .nav-links a.active {
  color: #0e7490 !important;
}

.theme-toggle {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(0, 229, 255, 0.36);
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(0, 229, 255, 0.08);
  color: var(--theme-accent);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--theme-accent);
  background: rgba(0, 229, 255, 0.14);
}

.theme-toggle-floating {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 50;
}

.nav-links .logout-link,
.user-meta .logout-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.nav-links {
  align-items: center;
}

.neon-input,
.neon-select,
.neon-textarea,
input[type="text"],
input[type="password"],
input[type="number"],
input[type="datetime-local"],
textarea,
select {
  line-height: 1.45;
}

.neon-btn,
.voice-btn,
button {
  letter-spacing: 0;
}

.neon-btn:hover,
.voice-btn:hover {
  transform: none !important;
}

.markdown-body,
.chat-content,
.chat-bubble,
.result-area {
  line-height: 1.65;
}

@media (max-width: 768px) {
  .glass-card,
  .glass-card-inner {
    border-radius: 9px !important;
  }

  body {
    font-size: 14px;
  }
}
