html[data-theme="dark"] body {
  background: #020617 !important;
  color: #e5e7eb !important;
  --bg: #020617;
  --surface: rgba(15, 23, 42, 0.94);
  --surface-muted: #111827;
  --border: rgba(148, 163, 184, 0.26);
  --border-strong: rgba(148, 163, 184, 0.38);
  --brand-primary: #60a5fa;
  --brand-primary-hover: #93c5fd;
  --brand-primary-soft: rgba(96, 165, 250, 0.16);
  --accent: #38bdf8;
  --accent-2: #818cf8;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-placeholder: #64748b;
  --shadow: 0 28px 64px -44px rgba(0, 0, 0, 0.75);
  --shadow-lg: 0 28px 64px -42px rgba(0, 0, 0, 0.78);
  --slate-900: #f8fafc;
  --slate-700: #cbd5e1;
  --slate-600: #94a3b8;
  --slate-500: #94a3b8;
  --slate-400: #64748b;
  --slate-300: #475569;
  --slate-200: rgba(148, 163, 184, 0.26);
  --slate-100: #111827;
  --slate-50: #020617;
}

html[data-theme="dark"] :is(
  .record-shell,
  .page,
  .page-shell,
  main,
  [class~="bg-paper"]
) {
  background: #020617 !important;
}

html[data-theme="dark"] :is(
  header,
  footer,
  .card,
  .auth-card,
  .login-box,
  .record-phone,
  .login-card,
  .record-card,
  .record-bottom-bar,
  .page,
  .fixed-header-group,
  .note-card,
  .transcript-card,
  .detail-card,
  .info-card,
  .upload-card,
  .result-card,
  .topbar,
  .settings-sidebar,
  .status-card,
  .readonly,
  .upload-drop,
  .input-shell,
  .tip-box,
  .panel,
  [class~="bg-white"],
  [class~="bg-slate-50"],
  [class~="bg-slate-50/80"]
) {
  background: #0f172a !important;
  border-color: rgba(148, 163, 184, 0.24) !important;
  color: #e5e7eb !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28) !important;
}

html[data-theme="dark"] :is(
  .record-card.clickable:hover,
  .record-card.clickable:focus,
  .settings-nav-item:hover,
  .settings-nav-item.is-active,
  .icon-btn:hover,
  .round-icon-btn:hover,
  .header-btn:hover
) {
  background: #111c33 !important;
  border-color: rgba(129, 140, 248, 0.38) !important;
}

html[data-theme="dark"] :is(
  .brand-mark,
  .record-card-title,
  .title,
  .record-title,
  .current,
  .card-header-title,
  .sidebar-user-name,
  h1,
  h2,
  h3,
  h4,
  strong
) {
  color: #f8fafc !important;
}

html[data-theme="dark"] :is(
  .subtitle,
  .record-card-sub,
  .footer-note,
  .meta,
  .breadcrumb,
  .sidebar-user-email,
  .section-heading-meta,
  .advanced-copy,
  .muted,
  .hint,
  .note-meta,
  .transcript-meta,
  p,
  small,
  label
) {
  color: #94a3b8 !important;
}

html[data-theme="dark"] :is(
  [class~="text-ink"],
  [class~="text-slate-950"],
  [class~="text-slate-900"],
  [class~="text-slate-800"],
  [class~="text-slate-700"]
) {
  color: #f8fafc !important;
}

html[data-theme="dark"] :is(
  [class~="text-slate-600"],
  [class~="text-slate-500"],
  [class~="text-slate-400"]
) {
  color: #cbd5e1 !important;
}

html[data-theme="dark"] :is(
  [class~="border-slate-200"],
  [class~="border-slate-100"],
  [class~="border-white/60"]
) {
  border-color: rgba(148, 163, 184, 0.24) !important;
}

html[data-theme="dark"] :is(
  input,
  textarea,
  select,
  .input,
  .input-field
) {
  background: #020617 !important;
  border-color: rgba(148, 163, 184, 0.32) !important;
  color: #f8fafc !important;
}

html[data-theme="dark"] :is(input, textarea, .input, .input-field)::placeholder {
  color: #64748b !important;
}

html[data-theme="dark"] :is(
  .btn,
  .header-btn,
  .round-icon-btn,
  .icon-btn,
  .send-btn,
  .secondary-btn,
  .ghost-btn
) {
  background: rgba(15, 23, 42, 0.92) !important;
  border-color: rgba(148, 163, 184, 0.28) !important;
  color: #cbd5e1 !important;
}

html[data-theme="dark"] :is(.btn.primary, button[type="submit"], .submit-btn) {
  background: linear-gradient(135deg, #22d3ee, #3b82f6) !important;
  border-color: transparent !important;
  color: #020617 !important;
}

html[data-theme="dark"] :is(.message, .success, [data-success-box]) {
  background: rgba(16, 185, 129, 0.14) !important;
  border-color: rgba(52, 211, 153, 0.32) !important;
  color: #86efac !important;
}

html[data-theme="dark"] :is(.error, .danger, .flash.error, [data-error-box]) {
  background: rgba(239, 68, 68, 0.14) !important;
  border-color: rgba(248, 113, 113, 0.32) !important;
  color: #fca5a5 !important;
}

html[data-theme="dark"] :is(
  [style*="color:#0f172a"],
  [style*="color: #0f172a"],
  [style*="color:#1f2937"],
  [style*="color: #1f2937"],
  [style*="color:#334155"],
  [style*="color: #334155"],
  [style*="color:#475569"],
  [style*="color: #475569"]
) {
  color: #cbd5e1 !important;
}

html[data-theme="dark"] :is(
  [style*="color:#64748b"],
  [style*="color: #64748b"],
  [style*="color:#6b7280"],
  [style*="color: #6b7280"],
  [style*="color:#94a3b8"],
  [style*="color: #94a3b8"]
) {
  color: #94a3b8 !important;
}

html[data-theme="dark"] :is(
  [style*="background:#fff"],
  [style*="background: #fff"],
  [style*="background:#ffffff"],
  [style*="background: #ffffff"],
  [style*="background:#f8fafc"],
  [style*="background: #f8fafc"],
  [style*="background:#fcfcfd"],
  [style*="background: #fcfcfd"],
  [style*="background:#eef2ff"],
  [style*="background: #eef2ff"],
  [style*="background:#eff6ff"],
  [style*="background: #eff6ff"],
  [style*="background:#f0fdf4"],
  [style*="background: #f0fdf4"],
  [style*="background:#fff7ed"],
  [style*="background: #fff7ed"],
  [style*="background:#fef2f2"],
  [style*="background: #fef2f2"],
  [style*="background:#f5f3ff"],
  [style*="background: #f5f3ff"],
  [style*="background:rgba(255,255,255"],
  [style*="background: rgba(255,255,255"],
  [style*="background:linear-gradient(180deg,#ffffff"],
  [style*="background: linear-gradient(180deg,#ffffff"],
  [style*="background:linear-gradient(180deg, #ffffff"],
  [style*="background: linear-gradient(180deg, #ffffff"],
  [style*="background-color:#fff"],
  [style*="background-color: #fff"],
  [style*="background-color:#ffffff"],
  [style*="background-color: #ffffff"],
  [style*="background-color:#f8fafc"],
  [style*="background-color: #f8fafc"],
  [style*="background-color:#fcfcfd"],
  [style*="background-color: #fcfcfd"]
) {
  background: #0f172a !important;
  background-image: linear-gradient(#0f172a, #0f172a) !important;
  border-color: rgba(148, 163, 184, 0.24) !important;
}

html[data-theme="dark"] :is(
  .notice,
  .tip,
  .tips,
  .result,
  .status,
  .toolbar,
  .summary,
  .empty,
  .badge,
  .tag,
  .chip,
  .step,
  .item,
  .list-item,
  .template-card,
  .output-card,
  .file-card,
  .progress-card,
  .error-info
) {
  background: rgba(15, 23, 42, 0.92) !important;
  border-color: rgba(148, 163, 184, 0.24) !important;
  color: #cbd5e1 !important;
}

html[data-theme="dark"] :is(
  table,
  thead,
  tbody,
  tr,
  th,
  td,
  pre,
  code,
  .code,
  .preview,
  .output,
  .result-text,
  .transcript,
  .markdown-body
) {
  background-color: #0f172a !important;
  border-color: rgba(148, 163, 184, 0.24) !important;
  color: #e5e7eb !important;
}

html[data-theme="dark"] :is(
  .bg-cyan-50,
  .bg-blue-50,
  .bg-indigo-50,
  .bg-emerald-50,
  .bg-amber-50,
  .bg-red-50,
  .bg-slate-100,
  .bg-slate-200,
  .bg-white\/5,
  .bg-slate-900\/70
) {
  background-color: rgba(15, 23, 42, 0.92) !important;
  border-color: rgba(148, 163, 184, 0.24) !important;
}

html[data-theme="dark"] :is(
  .text-cyan-700,
  .text-blue-700,
  .text-indigo-700,
  .text-emerald-700,
  .text-amber-700,
  .text-red-700
) {
  color: #93c5fd !important;
}

html[data-theme="dark"] :is(
  .prose,
  .article-body,
  .article-body h1,
  .article-body h2,
  .article-body h3,
  .article-body h4,
  .article-body strong
) {
  color: #f8fafc !important;
}

html[data-theme="dark"] :is(.article-body p, .article-body li, .article-body figcaption) {
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .article-body img {
  border-color: rgba(148, 163, 184, 0.28) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32) !important;
}

html[data-theme="light"] body.theme-adaptive-page {
  background: #f8fafc !important;
  color: #0f172a !important;
}

html[data-theme="light"] .theme-adaptive-page :is(
  .bg-slate-950,
  .bg-slate-900\/70,
  .bg-white\/5
) {
  background-color: #ffffff !important;
  border-color: rgba(203, 213, 225, 0.9) !important;
  color: #0f172a !important;
}

html[data-theme="light"] .theme-adaptive-page :is(
  .text-white,
  .text-slate-100
) {
  color: #0f172a !important;
}

html[data-theme="light"] .theme-adaptive-page :is(
  .text-slate-300,
  .text-cyan-50
) {
  color: #475569 !important;
}

html[data-theme="light"] .theme-adaptive-page :is(
  .border-white\/10,
  .border-cyan-300\/20,
  .border-cyan-400\/30
) {
  border-color: rgba(203, 213, 225, 0.9) !important;
}

html[data-theme="light"] .theme-adaptive-page :is(
  .bg-cyan-300\/10,
  .bg-cyan-400\/10
) {
  background-color: #ecfeff !important;
  color: #0f172a !important;
}

html[data-theme="light"] .theme-adaptive-page a {
  color: #0e7490 !important;
}

html[data-theme="dark"] .theme-adaptive-page {
  background: #020617 !important;
  color: #e5e7eb !important;
}
