/* 内嵌页暗色主题 — 与主站 slate 色系对齐 */
html.theme-dark {
  color-scheme: dark;
}

html.theme-dark body.legacy-embed {
  background: #0f172a !important;
  color: #e2e8f0 !important;
}

html.theme-dark body.legacy-embed .content-wrapper {
  background: transparent !important;
}

html.theme-dark .card {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

html.theme-dark .card-body,
html.theme-dark .card-title,
html.theme-dark h1,
html.theme-dark h2,
html.theme-dark h3,
html.theme-dark h4,
html.theme-dark h5,
html.theme-dark h6,
html.theme-dark label,
html.theme-dark p,
html.theme-dark li,
html.theme-dark td,
html.theme-dark th {
  color: #e2e8f0 !important;
}

html.theme-dark .text-muted,
html.theme-dark .text-secondary {
  color: #94a3b8 !important;
}

html.theme-dark .form-control,
html.theme-dark select.form-control,
html.theme-dark textarea.form-control,
html.theme-dark input.form-control {
  background: #0f172a !important;
  border-color: #475569 !important;
  color: #f1f5f9 !important;
}

html.theme-dark .form-control:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25) !important;
}

html.theme-dark .form-control::placeholder {
  color: #64748b !important;
}

html.theme-dark .input-group-text {
  background: #1e293b !important;
  border-color: #475569 !important;
  color: #cbd5e1 !important;
}

html.theme-dark .table {
  color: #e2e8f0 !important;
}

html.theme-dark .table thead th {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}

html.theme-dark .table td,
html.theme-dark .table th {
  border-color: #334155 !important;
}

html.theme-dark .table-striped tbody tr:nth-of-type(odd) {
  background: rgba(30, 41, 59, 0.5) !important;
}

html.theme-dark .table-hover tbody tr:hover {
  background: #334155 !important;
}

html.theme-dark .btn-secondary {
  background: #334155 !important;
  border-color: #475569 !important;
  color: #f1f5f9 !important;
}

html.theme-dark .alert-info {
  background: rgba(59, 130, 246, 0.15) !important;
  color: #bfdbfe !important;
}

html.theme-dark .alert-warning {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #fde68a !important;
}

html.theme-dark .steps-container {
  background: #1e293b !important;
  border-color: #334155 !important;
}

html.theme-dark .steps::before {
  background: #334155 !important;
}

html.theme-dark .step.active span:first-child {
  background: #2563eb !important;
  color: #fff !important;
}

html.theme-dark .type-card {
  background: #1e293b !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
}

html.theme-dark .type-card.selected {
  border-color: #3b82f6 !important;
  background: rgba(59, 130, 246, 0.15) !important;
}

html.theme-dark .help-layout {
  background: #0f172a !important;
}

html.theme-dark .help-sidebar {
  background: #1e293b !important;
  border-color: #334155 !important;
}

html.theme-dark .help-nav a:hover,
html.theme-dark .help-nav a.active {
  background: #334155 !important;
  color: #93c5fd !important;
}

html.theme-dark body.legacy-embed.theme-dark {
  --bg: #0f172a;
  --surface: #1e293b;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --line: #334155;
  --accent: #60a5fa;
}
