/* Novartis-inspired palettes. Original peach UI is unchanged unless html[data-nv-theme] is set. */

html[data-nv-theme="blue"] {
  --bg: #eef3f8;
  --bg-2: #f5f8fb;
  --orange: #0460a9;
  --orange-hover: #034e8a;
  --red: #0460a9;
  --gold: #5ba3d9;
  --amber: #3d7eb8;
  --teal: #1a8a9c;
  --blue: #1a7a8c;
  --ink: #0b1f33;
  --muted: #5b6b7c;
  --line: #d5e0ea;
  --card: #ffffff;
  --shadow: 0 8px 30px rgba(4, 96, 169, 0.10);
  --high: #0460a9;
  --mid: #3d7eb8;
  --lang: #1a8a9c;
  --high-bg: #e3eef8;
  --mid-bg: #eaf3fa;
  --lang-bg: #e4f4f6;
  --card-shadow: 0 8px 30px rgba(4, 96, 169, 0.10);
  --nv-canvas: #e8f0f7;
  --nv-canvas-image: linear-gradient(160deg, #f7fafc 0%, #e4eef7 48%, #d5e6f4 100%);
  --nv-grad: linear-gradient(90deg, #3d8fd1 0%, #0460a9 58%, #034e8a 100%);
  --nv-grad-shadow: 0 8px 18px rgba(4, 96, 169, 0.28);
  --nv-file-grad: linear-gradient(160deg, #5ba3d9, #0460a9);
  --nv-mint-bg: #e6f3f8;
  --nv-mint-bd: #b7d4e3;
  --nv-mint-fg: #1a5578;
  --nv-mint-hover: #d8ebf3;
  --nv-soft: #eef4fa;
  --nv-chip: #e4edf5;
  --nv-island: rgba(4, 96, 169, 0.08);
}

html[data-nv-theme="flame"] {
  --bg: #fff4ee;
  --bg-2: #fff8f4;
  --orange: #e74a21;
  --orange-hover: #cf3f1b;
  --red: #e74a21;
  --gold: #ec961d;
  --amber: #e65124;
  --teal: #0460a9;
  --blue: #0460a9;
  --ink: #1c1613;
  --muted: #8a7b72;
  --line: #f0ddd4;
  --card: #ffffff;
  --shadow: 0 8px 30px rgba(231, 74, 33, 0.10);
  --high: #e74a21;
  --mid: #ec7f22;
  --lang: #0460a9;
  --high-bg: #fde8e1;
  --mid-bg: #fff0e0;
  --lang-bg: #e3eef8;
  --card-shadow: 0 8px 30px rgba(231, 74, 33, 0.10);
  --nv-canvas: #fff3ec;
  --nv-canvas-image: linear-gradient(135deg, #ffffff 0%, #ffe8dc 42%, #f7b089 100%);
  --nv-grad: linear-gradient(90deg, #f07a4a 0%, #e74a21 58%, #c83d1c 100%);
  --nv-grad-shadow: 0 8px 18px rgba(231, 74, 33, 0.30);
  --nv-file-grad: linear-gradient(160deg, #f08a58, #e74a21);
  --nv-mint-bg: #fdece6;
  --nv-mint-bd: #f3c4b4;
  --nv-mint-fg: #9a3218;
  --nv-mint-hover: #f9e0d7;
  --nv-soft: #fbefea;
  --nv-chip: #f6e6de;
  --nv-island: rgba(231, 74, 33, 0.10);
}

html[data-nv-theme="amber"] {
  --bg: #f6f1dc;
  --bg-2: #fbf6e3;
  --orange: #d89b14;
  --orange-hover: #c48a0e;
  --red: #a67c12;
  --gold: #f8b22a;
  --amber: #f8b22a;
  --teal: #0460a9;
  --blue: #0460a9;
  --ink: #2c2416;
  --muted: #8a7d64;
  --line: #e6d9a8;
  --card: #ffffff;
  --shadow: 0 8px 30px rgba(118, 84, 56, 0.10);
  --high: #765438;
  --mid: #ec961d;
  --lang: #0460a9;
  --high-bg: #f3e6d8;
  --mid-bg: #fff4dc;
  --lang-bg: #e3eef8;
  --card-shadow: 0 8px 30px rgba(118, 84, 56, 0.10);
  --nv-canvas: #f3ead0;
  --nv-canvas-image: linear-gradient(160deg, #fbf6e4 0%, #f0e19a 48%, #e4c44a 100%);
  --nv-grad: linear-gradient(90deg, #ffd430 0%, #f8b22a 52%, #ec961d 100%);
  --nv-grad-shadow: 0 8px 18px rgba(248, 178, 42, 0.36);
  --nv-file-grad: linear-gradient(160deg, #ffd430, #ec961d);
  --nv-mint-bg: #f6edd4;
  --nv-mint-bd: #e4d09a;
  --nv-mint-fg: #6a5218;
  --nv-mint-hover: #f0e4c4;
  --nv-soft: #f5eedc;
  --nv-chip: #efe6cf;
  --nv-island: rgba(212, 164, 30, 0.14);
}

html[data-nv-theme]:has(body.chat-page),
html[data-nv-theme]:has(body[data-v="1"]) {
  background: var(--nv-canvas);
}
html[data-nv-theme] body.chat-page,
html[data-nv-theme] body[data-v="1"] {
  background-color: var(--nv-canvas);
  background-image: var(--nv-canvas-image);
}
html[data-nv-theme] body.chat-page .sidebar,
html[data-nv-theme] body[data-v="1"] .sidebar,
html[data-nv-theme] body.chat-page .main,
html[data-nv-theme] body[data-v="1"] .main {
  box-shadow: 0 8px 30px var(--nv-island);
}
html[data-nv-theme] body.chat-page .icon-btn,
html[data-nv-theme] body[data-v="1"] .icon-btn {
  border-color: var(--line);
  color: var(--muted);
}
html[data-nv-theme] body.chat-page .new-task-btn,
html[data-nv-theme] body[data-v="1"] .new-task-btn {
  background: var(--nv-grad);
  box-shadow: var(--nv-grad-shadow);
}
html[data-nv-theme] body.chat-page .tasklog-head,
html[data-nv-theme] body[data-v="1"] .tasklog-head {
  color: var(--muted);
}
html[data-nv-theme] body.chat-page .tasklog-list li,
html[data-nv-theme] body[data-v="1"] .tasklog-list li {
  border-color: var(--line);
  color: var(--muted);
  box-shadow: 0 1px 4px var(--nv-island);
}
html[data-nv-theme] body.chat-page .tasklog-list li.active,
html[data-nv-theme] body[data-v="1"] .tasklog-list li.active {
  box-shadow: 0 2px 8px var(--nv-island);
}
html[data-nv-theme] body.chat-page .tasklog-list li .t-ico,
html[data-nv-theme] body[data-v="1"] .tasklog-list li .t-ico {
  color: var(--muted);
}
html[data-nv-theme] body.chat-page .logout-btn:hover,
html[data-nv-theme] body[data-v="1"] .logout-btn:hover {
  background: var(--nv-soft);
}

html[data-nv-theme] mark.lv-high {
  background: color-mix(in srgb, var(--high) 16%, transparent);
}
html[data-nv-theme] mark.lv-mid {
  background: color-mix(in srgb, var(--mid) 22%, transparent);
}
html[data-nv-theme] mark.lv-lang {
  background: color-mix(in srgb, var(--lang) 16%, transparent);
}
html[data-nv-theme] mark[data-ann].is-active {
  box-shadow: inset 0 -2px 0 currentColor, 0 0 0 3px color-mix(in srgb, var(--orange) 22%, transparent);
}
html[data-nv-theme] .summary {
  background: #fff;
}
html[data-nv-theme] .findings-title::before {
  background: var(--red);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 18%, transparent);
}

html[data-nv-theme] .file-card,
html[data-nv-theme] .report-file,
html[data-nv-theme] .meta-tag {
  background: var(--nv-soft);
  border-color: var(--line);
  color: var(--muted);
}
html[data-nv-theme] .file-card .f-ico,
html[data-nv-theme] .report-file .file-ico {
  background: var(--nv-file-grad);
}
html[data-nv-theme] .meta-tag b,
html[data-nv-theme] .meta-fold-btn {
  color: var(--muted);
}
html[data-nv-theme] .suggest-chip {
  background: var(--nv-chip);
  color: var(--ink);
}
html[data-nv-theme] .suggest-chip:hover {
  background: var(--nv-soft);
}
html[data-nv-theme] .doc-toggle,
html[data-nv-theme] .thinking-collapse-toggle {
  background: var(--nv-mint-bg);
  border-color: var(--nv-mint-bd);
  color: var(--nv-mint-fg);
}
html[data-nv-theme] .doc-toggle:hover,
html[data-nv-theme] .doc-toggle:focus-visible,
html[data-nv-theme] .thinking-collapse-toggle:hover {
  background: var(--nv-mint-hover);
  border-color: var(--nv-mint-bd);
  color: var(--nv-mint-fg);
}
html[data-nv-theme] .thinking-logo {
  background: var(--nv-soft) url("assets/logo.svg") center / 22px 22px no-repeat;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--orange) 35%, transparent);
}
html[data-nv-theme] .thinking-track-bar {
  background: linear-gradient(90deg, color-mix(in srgb, var(--orange) 55%, #fff), var(--orange));
}
html[data-nv-theme] .composer {
  border-color: color-mix(in srgb, var(--orange) 45%, transparent);
  box-shadow: 0 10px 36px var(--nv-island);
}
html[data-nv-theme] .composer.dragover {
  background: var(--nv-soft);
}
html[data-nv-theme] .pane-resizer:hover,
html[data-nv-theme] .pane-resizer.is-dragging {
  background: color-mix(in srgb, var(--orange) 22%, transparent);
}

.nv-theme-bar {
  position: fixed;
  left: 18px;
  bottom: 16px;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(20, 20, 20, 0.10);
  font-size: 11px;
  font-weight: 650;
}
.nv-theme-bar span {
  padding: 0 8px 0 10px;
  color: #8a8178;
  white-space: nowrap;
}
.nv-theme-bar a {
  color: #5a524b;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 999px;
}
.nv-theme-bar a.is-on {
  background: #1f1a17;
  color: #fff;
}
html[data-nv-theme="blue"] .nv-theme-bar a.is-on { background: #0460a9; }
html[data-nv-theme="flame"] .nv-theme-bar a.is-on { background: #e74a21; }
html[data-nv-theme="amber"] .nv-theme-bar a.is-on { background: #ec961d; color: #2c2416; }
