:root {
  --dialogos-bg: #f8fafc;
  --dialogos-surface: #ffffff;
  --dialogos-surface-muted: #f8fafc;
  --dialogos-surface-soft: #f1f5f9;
  --dialogos-border: #e5e7eb;
  --dialogos-border-strong: #d1d5db;
  --dialogos-text: #111827;
  --dialogos-text-muted: #6b7280;
  --dialogos-text-soft: #9ca3af;
  --dialogos-primary: #2563eb;
  --dialogos-primary-soft: #eff6ff;
  --dialogos-primary-border: rgba(37, 99, 235, 0.18);
  --dialogos-code-bg: #0f172a;
  --dialogos-code-text: #e2e8f0;
  --dialogos-success: #15803d;
  --dialogos-success-bg: #dcfce7;
  --dialogos-danger: #dc2626;
  --dialogos-danger-bg: #fee2e2;
  --dialogos-warning: #c2410c;
  --dialogos-warning-bg: #fff7ed;
  color-scheme: light;
}

html.dark,
html[data-theme="dark"],
body.dark,
body[data-theme="dark"] {
  --dialogos-bg: #0f172a;
  --dialogos-surface: #111827;
  --dialogos-surface-muted: #1f2937;
  --dialogos-surface-soft: #0b1220;
  --dialogos-border: rgba(148, 163, 184, 0.22);
  --dialogos-border-strong: rgba(148, 163, 184, 0.34);
  --dialogos-text: #e5e7eb;
  --dialogos-text-muted: #cbd5e1;
  --dialogos-text-soft: #94a3b8;
  --dialogos-primary: #93c5fd;
  --dialogos-primary-soft: rgba(37, 99, 235, 0.18);
  --dialogos-primary-border: rgba(147, 197, 253, 0.3);
  --dialogos-code-bg: #020617;
  --dialogos-code-text: #dbeafe;
  --dialogos-success: #86efac;
  --dialogos-success-bg: rgba(22, 101, 52, 0.28);
  --dialogos-danger: #fca5a5;
  --dialogos-danger-bg: rgba(127, 29, 29, 0.34);
  --dialogos-warning: #fdba74;
  --dialogos-warning-bg: rgba(124, 45, 18, 0.3);
  color-scheme: dark;
}

:is(html.dark, html[data-theme="dark"]) body,
body.dark,
body[data-theme="dark"] {
  background: var(--dialogos-bg);
}

:is(html.dark, html[data-theme="dark"], body.dark, body[data-theme="dark"])
:is(.prompt-textarea-frame, .dialogos-tabbed-fieldsets__nav) {
  background: var(--dialogos-surface-muted);
  border-color: var(--dialogos-border);
}

:is(html.dark, html[data-theme="dark"], body.dark, body[data-theme="dark"])
.prompt-textarea-readonly {
  color: var(--dialogos-text);
}

:is(html.dark, html[data-theme="dark"], body.dark, body[data-theme="dark"])
:is(.prompt-webhook-resend-button, .dialogos-tabbed-fieldsets__tab.is-active) {
  background: var(--dialogos-surface);
  border-color: var(--dialogos-border);
  color: var(--dialogos-text);
}

:is(html.dark, html[data-theme="dark"], body.dark, body[data-theme="dark"])
.dialogos-tabbed-fieldsets__tab {
  color: var(--dialogos-text-muted);
}

:is(html.dark, html[data-theme="dark"], body.dark, body[data-theme="dark"])
.dialogos-tabbed-fieldsets__tab:hover {
  background: var(--dialogos-surface);
  color: var(--dialogos-text);
}

:is(html.dark, html[data-theme="dark"], body.dark, body[data-theme="dark"])
[data-llm-node-template] {
  background: var(--dialogos-surface) !important;
  border-color: var(--dialogos-border) !important;
  color: var(--dialogos-text) !important;
}

:is(html.dark, html[data-theme="dark"], body.dark, body[data-theme="dark"])
[data-llm-node-template] div {
  color: inherit !important;
}

:is(html.dark, html[data-theme="dark"], body.dark, body[data-theme="dark"])
[data-llm-node-template] code {
  color: var(--dialogos-code-text);
}

:is(html.dark, html[data-theme="dark"], body.dark, body[data-theme="dark"])
[data-llm-node-template] [style*="background:#f8fafc"] {
  background: var(--dialogos-surface-muted) !important;
  color: var(--dialogos-text-muted) !important;
}

:is(html.dark, html[data-theme="dark"], body.dark, body[data-theme="dark"])
:is([data-llm-node-apply-template], [data-llm-node-post-action], .prompt-row-open-button) {
  background: var(--dialogos-primary-soft) !important;
  border-color: var(--dialogos-primary-border) !important;
  color: var(--dialogos-primary) !important;
}

:is(html.dark, html[data-theme="dark"], body.dark, body[data-theme="dark"])
[data-llm-node-copy-template] {
  background: var(--dialogos-surface-muted) !important;
  border-color: var(--dialogos-border) !important;
  color: var(--dialogos-text-muted) !important;
}

:is(html.dark, html[data-theme="dark"], body.dark, body[data-theme="dark"])
:is(.docs-section-title, .docs-subsection-title, .docs-path, .docs-toc-title) {
  color: var(--dialogos-text) !important;
}

:is(html.dark, html[data-theme="dark"], body.dark, body[data-theme="dark"])
:is(.docs-text a, .dashboard-id-link) {
  color: var(--dialogos-primary) !important;
}

:is(html.dark, html[data-theme="dark"], body.dark, body[data-theme="dark"])
:is(.docs-text, .docs-toc-desc) {
  color: var(--dialogos-text-muted) !important;
}

:is(html.dark, html[data-theme="dark"], body.dark, body[data-theme="dark"])
.docs-inline {
  background: var(--dialogos-surface-muted) !important;
  border-color: var(--dialogos-border) !important;
  color: var(--dialogos-text) !important;
}

:is(html.dark, html[data-theme="dark"], body.dark, body[data-theme="dark"])
.docs-toc-item {
  background: var(--dialogos-surface) !important;
  border-color: var(--dialogos-border) !important;
}

:is(html.dark, html[data-theme="dark"], body.dark, body[data-theme="dark"])
.docs-note {
  background: var(--dialogos-primary-soft) !important;
  border-color: var(--dialogos-primary-border) !important;
  color: var(--dialogos-primary) !important;
}

:is(html.dark, html[data-theme="dark"], body.dark, body[data-theme="dark"])
.docs-warn {
  background: var(--dialogos-warning-bg) !important;
  border-color: rgba(251, 191, 36, 0.28) !important;
  color: var(--dialogos-warning) !important;
}

:is(html.dark, html[data-theme="dark"], body.dark, body[data-theme="dark"])
.docs-method.post {
  background: var(--dialogos-success-bg) !important;
  color: var(--dialogos-success) !important;
}

:is(html.dark, html[data-theme="dark"], body.dark, body[data-theme="dark"])
.docs-method.get {
  background: var(--dialogos-primary-soft) !important;
  color: var(--dialogos-primary) !important;
}

:is(html.dark, html[data-theme="dark"], body.dark, body[data-theme="dark"])
#swagger-ui {
  background: var(--dialogos-surface);
  color: var(--dialogos-text);
}

:is(html.dark, html[data-theme="dark"], body.dark, body[data-theme="dark"])
:is(.comparator-card, .comparator-checkbox, .comparator-segment, .comparator-meta-list div, .comparator-empty, .comparator-pill) {
  background: var(--dialogos-surface) !important;
  border-color: var(--dialogos-border) !important;
  color: var(--dialogos-text-muted) !important;
}

:is(html.dark, html[data-theme="dark"], body.dark, body[data-theme="dark"])
:is(.comparator-segment, .comparator-meta-list div, .comparator-empty, .comparator-pill) {
  background: var(--dialogos-surface-muted) !important;
}

:is(html.dark, html[data-theme="dark"], body.dark, body[data-theme="dark"])
:is(.comparator-lead, .comparator-time, .comparator-note) {
  color: var(--dialogos-text-muted) !important;
}

:is(html.dark, html[data-theme="dark"], body.dark, body[data-theme="dark"])
:is(.comparator-label, .comparator-text) {
  color: var(--dialogos-text) !important;
}

:is(html.dark, html[data-theme="dark"], body.dark, body[data-theme="dark"])
:is(.comparator-input, .comparator-select, .comparator-textarea) {
  background: var(--dialogos-surface-muted) !important;
  border-color: var(--dialogos-border-strong) !important;
  color: var(--dialogos-text) !important;
}

:is(html.dark, html[data-theme="dark"], body.dark, body[data-theme="dark"])
.comparator-button-secondary {
  background: var(--dialogos-surface-muted) !important;
  border-color: var(--dialogos-border-strong) !important;
  color: var(--dialogos-text-muted) !important;
}

:is(html.dark, html[data-theme="dark"], body.dark, body[data-theme="dark"])
.comparator-status {
  background: var(--dialogos-surface-muted) !important;
  border-color: var(--dialogos-border) !important;
  color: var(--dialogos-text-muted) !important;
}

:is(html.dark, html[data-theme="dark"], body.dark, body[data-theme="dark"])
.comparator-status.ok {
  background: var(--dialogos-success-bg) !important;
  border-color: rgba(74, 222, 128, 0.26) !important;
  color: var(--dialogos-success) !important;
}

:is(html.dark, html[data-theme="dark"], body.dark, body[data-theme="dark"])
.comparator-status.warn {
  background: var(--dialogos-warning-bg) !important;
  border-color: rgba(251, 191, 36, 0.28) !important;
  color: var(--dialogos-warning) !important;
}

:is(html.dark, html[data-theme="dark"], body.dark, body[data-theme="dark"])
:is(.comparator-status.info, .comparator-side-badge) {
  background: var(--dialogos-primary-soft) !important;
  border-color: var(--dialogos-primary-border) !important;
  color: var(--dialogos-primary) !important;
}

:is(html.dark, html[data-theme="dark"], body.dark, body[data-theme="dark"])
.comparator-side-badge.tone-b {
  background: rgba(124, 58, 237, 0.22) !important;
  color: #c4b5fd !important;
}

:is(html.dark, html[data-theme="dark"], body.dark, body[data-theme="dark"])
.comparator-speaker {
  background: var(--dialogos-surface-soft) !important;
  color: var(--dialogos-text-muted) !important;
}
