/* ============================================================
   Palette overrides — 5 dark + 5 light. PeerForce Dark is the
   :root default in chat.css; each block below redefines the
   semantic variables. Invariant: --card / --input must clearly
   contrast --bg so wizards and forms float over the chat.
   ============================================================ */

/* ---------- DARK ---------- */

[data-theme="dracula"] {
	--bg: #282a36; --bg-raised: #2f3241; --bg-elev: #343746; --bg-deep: #21222c;
	--card: #3a3d4d; --card-head: #313442; --input: #44475a;
	--border: #3c3f51; --border-strong: #6272a4; --border-card: #555870;
	--text: #f8f8f2; --text-strong: #ffffff; --text-dim: #dcdfd8;
	--text-muted: #b0b8d1; --text-faint: #9ea8c6;
	--accent: #bd93f9; --accent-rgb: 189, 147, 249; --accent-soft: #e9d8fd; --accent-strong: #a679f0; --on-accent: #14161d;
	--link: #8be9fd; --link-soft: #d6f6ff;
	--primary: #6272a4; --primary-bg: #2d3250; --primary-border: #6272a4;
	--ok: #50fa7b; --ok-soft: #8affa8; --ok-bg: #26382b;
	--err: #ff5555; --err-soft: #ff9aa2; --warn: #ffb86c; --warn-soft: #ffd7a8;
}

[data-theme="nord"] {
	--bg: #2e3440; --bg-raised: #353c4a; --bg-elev: #3b4252; --bg-deep: #272c36;
	--card: #434c5e; --card-head: #394150; --input: #4c566a;
	--border: #3b4252; --border-strong: #56617a; --border-card: #5d6a85;
	--text: #eceff4; --text-strong: #ffffff; --text-dim: #d8dee9;
	--text-muted: #b2bccf; --text-faint: #b4bcc9;
	--accent: #88c0d0; --accent-rgb: 136, 192, 208; --accent-soft: #d8eef4; --accent-strong: #6fb0c4; --on-accent: #14161d;
	--link: #a8bed4; --link-soft: #c8d8ea;
	--primary: #5e81ac; --primary-bg: #39465c; --primary-border: #5e81ac;
	--ok: #a3be8c; --ok-soft: #c3deac; --ok-bg: #37402f;
	--err: #bf616a; --err-soft: #e0959c; --warn: #ebcb8b; --warn-soft: #f5e0b2;
}

[data-theme="tokyo-night"] {
	--bg: #1a1b26; --bg-raised: #1f2233; --bg-elev: #24283b; --bg-deep: #16161e;
	--card: #2a2f45; --card-head: #22263a; --input: #343b58;
	--border: #2a2f41; --border-strong: #3b4261; --border-card: #454c6d;
	--text: #c0caf5; --text-strong: #e6ebff; --text-dim: #a9b1d6;
	--text-muted: #9196b4; --text-faint: #8e96b8;
	--accent: #7aa2f7; --accent-rgb: 122, 162, 247; --accent-soft: #c7d6ff; --accent-strong: #5a86e0; --on-accent: #14161d;
	--link: #7dcfff; --link-soft: #c9ecff;
	--primary: #7aa2f7; --primary-bg: #1f2a4d; --primary-border: #3d59a1;
	--ok: #9ece6a; --ok-soft: #c4e6a4; --ok-bg: #26331e;
	--err: #f7768e; --err-soft: #ffb3c1; --warn: #e0af68; --warn-soft: #f0d0a0;
}

[data-theme="catppuccin-mocha"] {
	--bg: #1e1e2e; --bg-raised: #252537; --bg-elev: #313244; --bg-deep: #181825;
	--card: #313244; --card-head: #272740; --input: #45475a;
	--border: #2a2a40; --border-strong: #45475a; --border-card: #585b70;
	--text: #cdd6f4; --text-strong: #f5f7ff; --text-dim: #bac2de;
	--text-muted: #a6adc8; --text-faint: #979aab;
	--accent: #cba6f7; --accent-rgb: 203, 166, 247; --accent-soft: #e8dcff; --accent-strong: #b385f0; --on-accent: #14161d;
	--link: #89b4fa; --link-soft: #cfe0fe;
	--primary: #89b4fa; --primary-bg: #283252; --primary-border: #4a5a87;
	--ok: #a6e3a1; --ok-soft: #c9f0c5; --ok-bg: #2b3a2a;
	--err: #f38ba8; --err-soft: #f8bccb; --warn: #f9e2af; --warn-soft: #fcefd0;
}

/* ---------- LIGHT ---------- */

[data-theme="peerforce-light"] {
	--bg: #e9ebf0; --bg-raised: #f7f8fa; --bg-elev: #dde0e7; --bg-deep: #d5d9e1;
	--card: #ffffff; --card-head: #f4f5f8; --input: #eef0f4;
	--border: #dfe2e8; --border-strong: #c9cdd6; --border-card: #c4c9d4;
	--text: #1b1e26; --text-strong: #000000; --text-dim: #333a48;
	--text-muted: #5b6472; --text-faint: #566070;
	--accent: #ea580c; --accent-rgb: 234, 88, 12; --accent-soft: #c2410c; --accent-strong: #c2410c; --on-accent: #14161d;
	--link: #1d4ed8; --link-soft: #1e3a8a;
	--primary: #2563eb; --primary-bg: #dbeafe; --primary-border: #93c5fd;
	--ok: #16a34a; --ok-soft: #15803d; --ok-bg: #dcfce7;
	--err: #dc2626; --err-soft: #b91c1c; --warn: #d97706; --warn-soft: #92400e;
}

[data-theme="github-light"] {
	--bg: #ffffff; --bg-raised: #f6f8fa; --bg-elev: #eaeef2; --bg-deep: #f6f8fa;
	--card: #eef1f4; --card-head: #e2e7ec; --input: #ffffff;
	--border: #d1d9e0; --border-strong: #afb8c1; --border-card: #9fa8b2;
	--text: #1f2328; --text-strong: #000000; --text-dim: #424a53;
	--text-muted: #59636e; --text-faint: #636d79;
	--accent: #0969da; --accent-rgb: 9, 105, 218; --accent-soft: #0550ae; --accent-strong: #0550ae; --on-accent: #ffffff;
	--link: #0968d8; --link-soft: #0550ae;
	--primary: #0969da; --primary-bg: #ddf4ff; --primary-border: #80ccff;
	--ok: #1a7f37; --ok-soft: #116329; --ok-bg: #dafbe1;
	--err: #d1242f; --err-soft: #a40e26; --warn: #9a6700; --warn-soft: #7d4e00;
}

[data-theme="solarized-light"] {
	--bg: #fdf6e3; --bg-raised: #f5efdc; --bg-elev: #e8e1cd; --bg-deep: #f5efdc;
	--card: #eee8d5; --card-head: #e4ddc9; --input: #fdf6e3;
	--border: #e0d9c3; --border-strong: #c8c0a8; --border-card: #b8b09a;
	--text: #073642; --text-strong: #002b36; --text-dim: #586e75;
	--text-muted: #586c73; --text-faint: #596767;
	--accent: #cb4b16; --accent-rgb: 203, 75, 22; --accent-soft: #8a3510; --accent-strong: #b13f10; --on-accent: #ffffff;
	--link: #1d699e; --link-soft: #1e6da6;
	--primary: #268bd2; --primary-bg: #d3e6f0; --primary-border: #93bfdd;
	--ok: #859900; --ok-soft: #5c6b00; --ok-bg: #eef0d5;
	--err: #dc322f; --err-soft: #b02724; --warn: #b58900; --warn-soft: #8a6900;
}

[data-theme="catppuccin-latte"] {
	--bg: #eff1f5; --bg-raised: #e6e9ef; --bg-elev: #dce0e8; --bg-deep: #e6e9ef;
	--card: #ffffff; --card-head: #f2f4f8; --input: #eff1f5;
	--border: #dce0e8; --border-strong: #bcc0cc; --border-card: #acb0be;
	--text: #4c4f69; --text-strong: #1e2030; --text-dim: #5c5f77;
	--text-muted: #65687d; --text-faint: #5e6376;
	--accent: #8839ef; --accent-rgb: 136, 57, 239; --accent-soft: #6a24c4; --accent-strong: #6a24c4; --on-accent: #ffffff;
	--link: #0a55ea; --link-soft: #1246b5;
	--primary: #1e66f5; --primary-bg: #d6e0fb; --primary-border: #9cb6f5;
	--ok: #40a02b; --ok-soft: #2e7a1e; --ok-bg: #e2f2dd;
	--err: #d20f39; --err-soft: #a80c2e; --warn: #df8e1d; --warn-soft: #a86a12;
}

[data-theme="rose-pine-dawn"] {
	--bg: #faf4ed; --bg-raised: #fffaf3; --bg-elev: #f2e9e1; --bg-deep: #f4ede4;
	--card: #f2e9e1; --card-head: #e9dfd6; --input: #faf4ed;
	--border: #e4dcd4; --border-strong: #cecacd; --border-card: #b8b2b8;
	--text: #575279; --text-strong: #26233a; --text-dim: #6e6a86;
	--text-muted: #6a6683; --text-faint: #6d677b;
	--accent: #b4637a; --accent-rgb: 180, 99, 122; --accent-soft: #8f4a5e; --accent-strong: #8f4a5e; --on-accent: #0f0d15;
	--link: #286983; --link-soft: #1d4f63;
	--primary: #56949f; --primary-bg: #dde9ec; --primary-border: #a3c4cb;
	--ok: #56949f; --ok-soft: #3e7079; --ok-bg: #e3edee;
	--err: #c34e63; --err-soft: #9c3a4d; --warn: #ea9d34; --warn-soft: #b57728;
}

/* Light-mode fine-tuning: hardcoded dark leftovers that must stay legible.
   Chips/badges keep their dark tints (they read as tags); shadows soften. */
[data-theme="peerforce-light"] .ingest-modal-card,
[data-theme="github-light"] .ingest-modal-card,
[data-theme="solarized-light"] .ingest-modal-card,
[data-theme="catppuccin-latte"] .ingest-modal-card,
[data-theme="rose-pine-dawn"] .ingest-modal-card,
[data-theme="peerforce-light"] .ds-modal-card,
[data-theme="github-light"] .ds-modal-card,
[data-theme="solarized-light"] .ds-modal-card,
[data-theme="catppuccin-latte"] .ds-modal-card,
[data-theme="rose-pine-dawn"] .ds-modal-card,
[data-theme="peerforce-light"] .etl-progress,
[data-theme="github-light"] .etl-progress,
[data-theme="solarized-light"] .etl-progress,
[data-theme="catppuccin-latte"] .etl-progress,
[data-theme="rose-pine-dawn"] .etl-progress {
	box-shadow: 0 18px 48px rgba(40, 40, 60, 0.22);
}

/* Workflow traffic-light on light backgrounds: same orange/green semantic,
   darkened so the node text stays legible on a pale card. */
[data-theme="peerforce-light"] .etl-progress,
[data-theme="github-light"] .etl-progress,
[data-theme="solarized-light"] .etl-progress,
[data-theme="catppuccin-latte"] .etl-progress,
[data-theme="rose-pine-dawn"] .etl-progress,
[data-theme="peerforce-light"] #mcp-wizard .ingest-modal-card,
[data-theme="github-light"] #mcp-wizard .ingest-modal-card,
[data-theme="solarized-light"] #mcp-wizard .ingest-modal-card,
[data-theme="catppuccin-latte"] #mcp-wizard .ingest-modal-card,
[data-theme="rose-pine-dawn"] #mcp-wizard .ingest-modal-card,
[data-theme="peerforce-light"] #settings-menu,
[data-theme="github-light"] #settings-menu,
[data-theme="solarized-light"] #settings-menu,
[data-theme="catppuccin-latte"] #settings-menu,
[data-theme="rose-pine-dawn"] #settings-menu {
	--etl-active: #ea580c;  --etl-active-rgb: 234, 88, 12;  --etl-active-text: #c2410c;
	--etl-done: #16a34a;    --etl-done-text: #15803d;       --etl-done-bg: rgba(22, 163, 74, 0.12);
	--etl-idle: #6b7280;
}
