/* ==========================================================================
   RepoScroller Multi-Theme Engine
   Inspired by Swiss banking modern & classic day/night palettes (anonymised):
   - 'default'   : Obsidian Slate & Indigo (Night - RepoScroller Core)
   - 'petrol-dark': Alpine Night / Deep Petrol & Solar Gold (Night)
   - 'glacier'   : Glacier Mist / Clean Ice Petrol & Deep Forest (Day)
   - 'azure-day' : Alpine Azure / Cantonal Sky Blue & Silver Slate (Day)
   ========================================================================== */


:root,
[data-theme="azure-day"],
[data-theme="alpine-azure"] {
  --theme-id: "azure-day";
  --bg-base: #f5f7fa;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #edeeee;
  --bg-hover: #e2e8f0;
  --border-color: rgba(32, 74, 119, 0.15);
  --border-focus: rgba(0, 133, 202, 0.5);

  --text-main: #204a77;
  --text-muted: #4c575a;
  --text-faint: #7f8789;

  --accent-primary: #0085ca;
  --accent-primary-hover: #0091d3;
  --accent-cyan: #0091d3;
  --accent-emerald: #23783c;
  --accent-amber: #fe7c39;
  --accent-rose: #b72f33;
}

/* --------------------------------------------------------------------------
   THEME 1: Obsidian Slate (Default Night)
   Retains 100% of the authentic RepoScroller dark cyber design system
   -------------------------------------------------------------------------- */
[data-theme="default"],
[data-theme="obsidian"] {
  --theme-id: "default";
  --bg-base: #090d16;
  --bg-surface: #101726;
  --bg-surface-elevated: #162035;
  --bg-hover: #1e2b45;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.5);

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-faint: #64748b;

  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
}

/* --------------------------------------------------------------------------
   THEME 2: Alpine Night (Petrol & Solar Gold - Night)
   Insp.: Deep petrol surfaces (#001b1f / #00292e) with warm solar gold (#ffcc00)
   -------------------------------------------------------------------------- */
[data-theme="petrol-dark"],
[data-theme="alpine-night"] {
  --theme-id: "petrol-dark";
  --bg-base: #001b1f;
  --bg-surface: #033b42;
  --bg-surface-elevated: #09565f;
  --bg-hover: #004b5a;
  --border-color: rgba(166, 216, 217, 0.18);
  --border-focus: rgba(255, 204, 0, 0.6);

  --text-main: #eef6f6;
  --text-muted: #a6d8d9;
  --text-faint: #70bfc2;

  --accent-primary: #ffcc00;
  --accent-primary-hover: #ffd633;
  --accent-cyan: #70bfc2;
  --accent-emerald: #93edae;
  --accent-amber: #ffcc00;
  --accent-rose: #ff9396;
}

[data-theme="petrol-dark"] body,
[data-theme="alpine-night"] body {
  background-color: #001b1f;
  color: #eef6f6;
}

/* Base Navigation & Header */
[data-theme="petrol-dark"] .navbar,
[data-theme="alpine-night"] .navbar {
  background: rgba(0, 41, 46, 0.95);
  border-bottom-color: rgba(166, 216, 217, 0.2);
}

[data-theme="petrol-dark"] .btn-primary,
[data-theme="alpine-night"] .btn-primary {
  background: #ffcc00;
  color: #001b1f;
  font-weight: 700;
  box-shadow: 0 0 14px rgba(255, 204, 0, 0.35);
}

[data-theme="petrol-dark"] .btn-primary:hover,
[data-theme="alpine-night"] .btn-primary:hover {
  background: #ffd633;
  color: #001b1f;
}

[data-theme="petrol-dark"] .logo-icon,
[data-theme="alpine-night"] .logo-icon {
  background: linear-gradient(135deg, #004b5a, #ffcc00);
  color: #001b1f;
}

[data-theme="petrol-dark"] .ledger-table th,
[data-theme="alpine-night"] .ledger-table th {
  background: #002428;
  color: #a6d8d9;
  border-bottom: 2px solid #004b5a;
}

[data-theme="petrol-dark"] .glass-modal-dialog,
[data-theme="alpine-night"] .glass-modal-dialog {
  background: #00292e;
  border-color: rgba(166, 216, 217, 0.3);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(255, 204, 0, 0.1);
}

/* Brand Text & Badges (Alpine Night) */
[data-theme="petrol-dark"] .brand-text h1,
[data-theme="alpine-night"] .brand-text h1 {
  background: linear-gradient(to right, #ffffff, #a6d8d9);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="petrol-dark"] .alcoa-badge,
[data-theme="alpine-night"] .alcoa-badge {
  background: rgba(255, 204, 0, 0.12);
  color: #ffcc00;
  border-color: rgba(255, 204, 0, 0.3);
}

/* Universe Canvas & 3D Background (Alpine Night) */
[data-theme="petrol-dark"] .universe-canvas-wrapper,
[data-theme="alpine-night"] .universe-canvas-wrapper {
  background: radial-gradient(circle at 50% 30%, #00292e 0%, #001417 100%) !important;
  border-color: rgba(166, 216, 217, 0.25);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.75), inset 0 0 0 1px rgba(255, 204, 0, 0.08);
}

[data-theme="petrol-dark"] .author-graph-canvas,
[data-theme="alpine-night"] .author-graph-canvas {
  background: #00171a !important;
  border-color: rgba(166, 216, 217, 0.22);
}

/* Universe Toolbar & Controls (Alpine Night) */
[data-theme="petrol-dark"] .universe-toolbar,
[data-theme="alpine-night"] .universe-toolbar {
  background: rgba(0, 41, 46, 0.92);
  border: 1px solid rgba(166, 216, 217, 0.25);
  backdrop-filter: blur(10px);
}

[data-theme="petrol-dark"] .universe-view-segmented,
[data-theme="alpine-night"] .universe-view-segmented {
  background: rgba(0, 27, 31, 0.8);
  border: 1px solid rgba(166, 216, 217, 0.2);
}

[data-theme="petrol-dark"] .universe-toolbar .hud-glsl-btn,
[data-theme="alpine-night"] .universe-toolbar .hud-glsl-btn {
  color: #a6d8d9;
}

[data-theme="petrol-dark"] .universe-toolbar .hud-glsl-btn:hover,
[data-theme="alpine-night"] .universe-toolbar .hud-glsl-btn:hover {
  background: rgba(0, 75, 90, 0.4);
  color: #ffffff;
}

[data-theme="petrol-dark"] .universe-toolbar .hud-glsl-btn.active,
[data-theme="alpine-night"] .universe-toolbar .hud-glsl-btn.active {
  background: rgba(255, 204, 0, 0.18);
  color: #ffcc00;
  border-color: rgba(255, 204, 0, 0.5);
  box-shadow: 0 0 10px rgba(255, 204, 0, 0.25);
}

[data-theme="petrol-dark"] .universe-toolbar .select-glsl,
[data-theme="alpine-night"] .universe-toolbar .select-glsl {
  background: rgba(0, 27, 31, 0.9);
  color: #eef6f6;
  border-color: rgba(166, 216, 217, 0.25);
}

[data-theme="petrol-dark"] .universe-search-wrap input,
[data-theme="alpine-night"] .universe-search-wrap input,
[data-theme="petrol-dark"] .universe-query-filter-wrap input,
[data-theme="alpine-night"] .universe-query-filter-wrap input {
  background: rgba(0, 27, 31, 0.9);
  color: #eef6f6;
  border-color: rgba(166, 216, 217, 0.25);
}

[data-theme="petrol-dark"] .universe-search-wrap input:focus,
[data-theme="alpine-night"] .universe-search-wrap input:focus,
[data-theme="petrol-dark"] .universe-query-filter-wrap input:focus,
[data-theme="alpine-night"] .universe-query-filter-wrap input:focus {
  border-color: #ffcc00;
  box-shadow: 0 0 10px rgba(255, 204, 0, 0.3);
}

[data-theme="petrol-dark"] .toolbar-sep,
[data-theme="alpine-night"] .toolbar-sep {
  background: rgba(165, 212, 201, 0.877);
}

[data-theme="petrol-dark"] .toolbar-val-pill,
[data-theme="alpine-night"] .toolbar-val-pill {
  color: #ffcc00;
}

[data-theme="petrol-dark"] .universe-badge-pill,
[data-theme="alpine-night"] .universe-badge-pill {
  background: rgba(0, 41, 46, 0.9);
  border-color: rgba(166, 216, 217, 0.2);
  color: #a6d8d9;
}

/* 1. workspace-nav-bar & workspace-tabs-group */
[data-theme="petrol-dark"] .workspace-nav-bar,
[data-theme="alpine-night"] .workspace-nav-bar {
  background: rgba(0, 32, 37, 0.96);
  border-bottom-color: rgba(166, 216, 217, 0.2);
}

[data-theme="petrol-dark"] .workspace-tabs-group,
[data-theme="alpine-night"] .workspace-tabs-group {
  background: rgba(0, 27, 31, 0.85);
  border: 1px solid rgba(166, 216, 217, 0.15);
}

[data-theme="petrol-dark"] .ws-tab-btn,
[data-theme="alpine-night"] .ws-tab-btn {
  color: #a6d8d9;
}

[data-theme="petrol-dark"] .ws-tab-btn:hover,
[data-theme="alpine-night"] .ws-tab-btn:hover {
  background: rgba(0, 75, 90, 0.35);
  color: #eef6f6;
}

[data-theme="petrol-dark"] .ws-tab-btn.active,
[data-theme="alpine-night"] .ws-tab-btn.active {
  background: rgba(255, 204, 0, 0.14);
  color: #ffcc00;
  border-bottom: 2px solid #ffcc00;
}

[data-theme="petrol-dark"] .ws-tab-pill,
[data-theme="alpine-night"] .ws-tab-pill {
  background: rgba(0, 75, 90, 0.5);
  color: #a6d8d9;
}

/* 2. workload-hud-bar */
[data-theme="petrol-dark"] .workload-hud-bar,
[data-theme="alpine-night"] .workload-hud-bar {
  background: linear-gradient(135deg, rgba(0, 41, 46, 0.95) 0%, rgba(0, 55, 61, 0.85) 100%);
  border: 1px solid rgba(166, 216, 217, 0.2);
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.6);
}

/* 3. ws0-log-msg */
[data-theme="petrol-dark"] .ws0-log-msg,
[data-theme="alpine-night"] .ws0-log-msg {
  color: #eef6f6;
}

/* 4. telemetry-pulse-hero-bar */
[data-theme="petrol-dark"] .telemetry-pulse-hero-bar,
[data-theme="alpine-night"] .telemetry-pulse-hero-bar {
  background: linear-gradient(135deg, rgba(0, 41, 46, 0.95) 0%, rgba(0, 55, 61, 0.9) 100%);
  border: 1px solid rgba(255, 204, 0, 0.3);
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.5), 0 0 15px -3px rgba(255, 204, 0, 0.15);
}

/* 5. kinship-persona-inspector, kinship-glsl-viewport, kinship-bottom-legend-bar */
[data-theme="petrol-dark"] .kinship-persona-inspector,
[data-theme="petrol-dark"] .kindship-persona-inspector,
[data-theme="alpine-night"] .kinship-persona-inspector,
[data-theme="alpine-night"] .kindship-persona-inspector {
  background: rgba(0, 41, 46, 0.92);
  border: 1px solid rgba(166, 216, 217, 0.22);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
}

[data-theme="petrol-dark"] .kinship-glsl-viewport,
[data-theme="alpine-night"] .kinship-glsl-viewport {
  background: radial-gradient(circle at center, #00292e, #001417) !important;
  border-color: rgba(166, 216, 217, 0.25);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 204, 0, 0.08);
}

[data-theme="petrol-dark"] .kinship-bottom-legend-bar,
[data-theme="alpine-night"] .kinship-bottom-legend-bar {
  background: rgba(0, 41, 46, 0.9);
  border-color: rgba(166, 216, 217, 0.25);
}

[data-theme="petrol-dark"] .kinship-filter-pill,
[data-theme="alpine-night"] .kinship-filter-pill {
  background: rgba(0, 27, 31, 0.7);
  border: 1px solid rgba(166, 216, 217, 0.2);
  color: #a6d8d9;
}

/* 6. authors-subnav-bar */
[data-theme="petrol-dark"] .authors-subnav-bar,
[data-theme="alpine-night"] .authors-subnav-bar {
  background: rgba(0, 41, 46, 0.92);
  border: 1px solid rgba(166, 216, 217, 0.2);
}

/* 7. drag-stepper & dag-stepper */
[data-theme="petrol-dark"] .dag-stepper,
[data-theme="petrol-dark"] .drag-stepper,
[data-theme="alpine-night"] .dag-stepper,
[data-theme="alpine-night"] .drag-stepper {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
}

/* 8. glass-panel */
[data-theme="petrol-dark"] .glass-panel,
[data-theme="alpine-night"] .glass-panel {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* 9. dag-template-picker & dag-qa-table */
[data-theme="petrol-dark"] .dag-template-picker label,
[data-theme="alpine-night"] .dag-template-picker label {
  color: var(--text-color);
}

[data-theme="petrol-dark"] .dag-qa-table th,
[data-theme="alpine-night"] .dag-qa-table th {
  background: var(--bg-surface-elevated);
  color: var(--text-faint);
  border-bottom: 2px solid var(--border-color);
}

[data-theme="petrol-dark"] .dag-qa-table td,
[data-theme="alpine-night"] .dag-qa-table td {
  border-bottom: 1px solid var(--border-color);
  color: #eef6f6;
}

[data-theme="petrol-dark"] .dag-qa-table tr:hover,
[data-theme="alpine-night"] .dag-qa-table tr:hover {
  background: rgba(255, 204, 0, 0.05);
}

/* field-table & table.field-table */
[data-theme="petrol-dark"] .field-table th,
[data-theme="alpine-night"] .field-table th {
  background: #002428;
  color: #a6d8d9;
  border-bottom: 1px solid rgba(166, 216, 217, 0.2);
}

[data-theme="petrol-dark"] .field-table td,
[data-theme="alpine-night"] .field-table td {
  border-bottom: 1px solid rgba(166, 216, 217, 0.1);
  color: #eef6f6;
}

[data-theme="petrol-dark"] .field-table tr:hover,
[data-theme="alpine-night"] .field-table tr:hover {
  background: rgba(255, 204, 0, 0.05);
}

/* 10. dag-panel-header & dag-panel */
[data-theme="petrol-dark"] .dag-panel,
[data-theme="alpine-night"] .dag-panel {
  background: rgba(0, 41, 46, 0.92);
  border-color: rgba(166, 216, 217, 0.2);
}

[data-theme="petrol-dark"] .dag-panel-header,
[data-theme="alpine-night"] .dag-panel-header {
  background: rgba(0, 27, 31, 0.5);
  border-bottom-color: rgba(166, 216, 217, 0.2);
}

[data-theme="petrol-dark"] .dag-panel-title,
[data-theme="alpine-night"] .dag-panel-title {
  color: #eef6f6;
}

/* 11. studio-title & studio-hero-search-card */
[data-theme="petrol-dark"] .studio-title,
[data-theme="alpine-night"] .studio-title {
  color: #eef6f6;
}

[data-theme="petrol-dark"] .studio-hero-search-card,
[data-theme="alpine-night"] .studio-hero-search-card {
  background: linear-gradient(135deg, rgba(0, 41, 46, 0.95) 0%, rgba(0, 55, 61, 0.88) 100%);
  border: 1px solid rgba(255, 204, 0, 0.3);
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.6), 0 0 25px -5px rgba(255, 204, 0, 0.15);
}

[data-theme="petrol-dark"] #studio-rag-input,
[data-theme="petrol-dark"] .studio-search-input-wrap input,
[data-theme="alpine-night"] #studio-rag-input,
[data-theme="alpine-night"] .studio-search-input-wrap input {
  background: rgba(0, 27, 31, 0.9);
  border: 1.5px solid rgba(255, 204, 0, 0.4);
  color: #eef6f6;
}

[data-theme="petrol-dark"] #studio-rag-input:focus,
[data-theme="petrol-dark"] .studio-search-input-wrap input:focus,
[data-theme="alpine-night"] #studio-rag-input:focus,
[data-theme="alpine-night"] .studio-search-input-wrap input:focus {
  border-color: #ffcc00;
  box-shadow: 0 0 12px rgba(255, 204, 0, 0.35);
}

/* 12. studio-card */
[data-theme="petrol-dark"] .studio-card,
[data-theme="alpine-night"] .studio-card {
  background: rgba(0, 41, 46, 0.85);
  border: 1px solid rgba(166, 216, 217, 0.2);
  box-shadow: 0 4px 18px -4px rgba(0, 0, 0, 0.5);
}

[data-theme="petrol-dark"] .studio-card-title,
[data-theme="alpine-night"] .studio-card-title {
  color: #eef6f6;
}

/* 13. ai-chat-header-bar & chat-workspace-switcher */
[data-theme="petrol-dark"] .ai-chat-header-bar,
[data-theme="alpine-night"] .ai-chat-header-bar {
  background: rgba(0, 27, 31, 0.6);
  border-bottom-color: rgba(166, 216, 217, 0.2);
}

[data-theme="petrol-dark"] .chat-workspace-switcher,
[data-theme="alpine-night"] .chat-workspace-switcher {
  background: rgba(0, 27, 31, 0.8);
  border: 1px solid rgba(166, 216, 217, 0.2);
}

[data-theme="petrol-dark"] .chat-pill-toggle,
[data-theme="alpine-night"] .chat-pill-toggle {
  color: #a6d8d9;
}

[data-theme="petrol-dark"] .chat-pill-toggle.active,
[data-theme="alpine-night"] .chat-pill-toggle.active {
  background: rgba(255, 204, 0, 0.18);
  color: #ffcc00;
  border-color: rgba(255, 204, 0, 0.4);
}

/* 14. chat-messages */
[data-theme="petrol-dark"] .chat-messages,
[data-theme="alpine-night"] .chat-messages {
  background: rgba(0, 27, 31, 0.35);
}

[data-theme="petrol-dark"] .chat-msg.bot .msg-bubble,
[data-theme="alpine-night"] .chat-msg.bot .msg-bubble {
  background: #00292e;
  border-color: rgba(166, 216, 217, 0.25);
  color: #eef6f6;
}

[data-theme="petrol-dark"] .chat-msg.user .msg-bubble,
[data-theme="alpine-night"] .chat-msg.user .msg-bubble {
  background: #ffcc00;
  color: #001b1f;
  font-weight: 600;
}

/* 15. ai-chat-input-container & #chat-input */
[data-theme="petrol-dark"] .ai-chat-input-container,
[data-theme="alpine-night"] .ai-chat-input-container {
  background: rgba(0, 27, 31, 0.6);
  border-top-color: rgba(166, 216, 217, 0.2);
}

[data-theme="petrol-dark"] #chat-input,
[data-theme="petrol-dark"] .ai-chat-input-wrap textarea,
[data-theme="petrol-dark"] .chat-input-row input,
[data-theme="alpine-night"] #chat-input,
[data-theme="alpine-night"] .ai-chat-input-wrap textarea,
[data-theme="alpine-night"] .chat-input-row input {
  background: rgba(0, 41, 46, 0.95);
  border: 1.5px solid rgba(166, 216, 217, 0.25);
  color: #eef6f6;
}

[data-theme="petrol-dark"] #chat-input:focus,
[data-theme="petrol-dark"] .ai-chat-input-wrap textarea:focus,
[data-theme="petrol-dark"] .chat-input-row input:focus,
[data-theme="alpine-night"] #chat-input:focus,
[data-theme="alpine-night"] .ai-chat-input-wrap textarea:focus,
[data-theme="alpine-night"] .chat-input-row input:focus {
  border-color: #ffcc00;
  box-shadow: 0 0 12px rgba(255, 204, 0, 0.3);
}

/* 16. legend-header & axes-legend-overlay */
[data-theme="petrol-dark"] .axes-legend-overlay,
[data-theme="alpine-night"] .axes-legend-overlay {
  background: rgba(0, 41, 46, 0.95);
  border-color: rgba(166, 216, 217, 0.25);
}

[data-theme="petrol-dark"] .axes-legend-overlay.collapsed,
[data-theme="alpine-night"] .axes-legend-overlay.collapsed {
  background: rgba(0, 41, 46, 0.92);
  border-color: rgba(255, 204, 0, 0.5);
}

[data-theme="petrol-dark"] .legend-header,
[data-theme="alpine-night"] .legend-header {
  border-bottom-color: rgba(166, 216, 217, 0.2);
}

[data-theme="petrol-dark"] .legend-title,
[data-theme="alpine-night"] .legend-title {
  color: #eef6f6;
}

/* 17. legend-body */
[data-theme="petrol-dark"] .legend-body,
[data-theme="alpine-night"] .legend-body {
  color: #a6d8d9;
}

[data-theme="petrol-dark"] .cluster-legend-title,
[data-theme="alpine-night"] .cluster-legend-title {
  color: #a6d8d9;
}

/* 18. universe-hero-left & universe-hero-bar */
[data-theme="petrol-dark"] .universe-hero-bar,
[data-theme="alpine-night"] .universe-hero-bar {
  background: linear-gradient(135deg, rgba(0, 41, 46, 0.95) 0%, rgba(0, 55, 61, 0.85) 100%);
  border-color: rgba(166, 216, 217, 0.2);
}

[data-theme="petrol-dark"] .universe-hero-title,
[data-theme="alpine-night"] .universe-hero-title {
  background: linear-gradient(135deg, #ffffff 50%, #ffcc00 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="petrol-dark"] .universe-hero-desc,
[data-theme="alpine-night"] .universe-hero-desc {
  color: #a6d8d9;
}

/* 19. inspector-header & glsl-node-inspector */
[data-theme="petrol-dark"] .glsl-node-inspector,
[data-theme="alpine-night"] .glsl-node-inspector {
  background: rgba(0, 41, 46, 0.95);
  border-color: rgba(166, 216, 217, 0.3);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 204, 0, 0.15);
}

[data-theme="petrol-dark"] .inspector-header,
[data-theme="alpine-night"] .inspector-header {
  background: rgba(0, 32, 37, 0.96) !important;
  border-bottom-color: rgba(166, 216, 217, 0.2);
  color: #eef6f6;
}

/* 20. inspector-body */
[data-theme="petrol-dark"] .inspector-body,
[data-theme="alpine-night"] .inspector-body {
  color: #eef6f6;
}


/* --------------------------------------------------------------------------
   THEME 3: Glacier Mist (Ice Petrol & Deep Forest - Day)
   Insp.: Crisp Swiss ice petrol (#eef6f6) and white cards with dark petrol text
   -------------------------------------------------------------------------- */
[data-theme="glacier"],
[data-theme="glacier-day"] {
  --theme-id: "glacier";
  --bg-base: #b9c0c0;
  --bg-surface: #8f7462;
  --bg-surface-elevated: #d6ebeb;
  --bg-hover: #c4e4e5;
  --border-color: rgba(0, 75, 90, 0.15);
  --border-focus: rgba(0, 75, 90, 0.5);

  --text-main: #001b1f;
  --text-muted: #004b5a;
  --text-faint: #49a6ab;

  --accent-primary: #004b5a;
  --accent-primary-hover: #067079;
  --accent-cyan: #067079;
  --accent-emerald: #2b8469;
  --accent-amber: #b12e02;
  --accent-rose: #d80909;
}

[data-theme="glacier"] body,
[data-theme="glacier-day"] body {
  background-color: #eef6f6;
  color: #001b1f;
}

[data-theme="glacier"] .navbar,
[data-theme="glacier-day"] .navbar {
  background: rgba(255, 255, 255, 0.95);
  border-bottom-color: rgba(0, 75, 90, 0.15);
  box-shadow: 0 2px 10px rgba(0, 75, 90, 0.05);
}

[data-theme="glacier"] .metric-card,
[data-theme="glacier"] .kb-card,
[data-theme="glacier"] .admin-card,
[data-theme="glacier"] .dropzone,
[data-theme="glacier"] .panel-container,
[data-theme="glacier"] .ledger-container,
[data-theme="glacier"] .kinship-container {
  background: #ffffff;
  border-color: rgba(0, 75, 90, 0.15);
  box-shadow: 0 4px 16px rgba(0, 75, 90, 0.06);
}

[data-theme="glacier"] .ledger-table th,
[data-theme="glacier-day"] .ledger-table th {
  background: #e3f1f1;
  color: #004b5a;
  border-bottom: 2px solid #70bfc2;
}

[data-theme="glacier"] .ledger-table tbody tr:hover,
[data-theme="glacier-day"] .ledger-table tbody tr:hover {
  background: rgba(0, 75, 90, 0.05);
}

[data-theme="glacier"] .btn-primary,
[data-theme="glacier-day"] .btn-primary {
  background: #004b5a;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 75, 90, 0.25);
}

[data-theme="glacier"] .btn-primary:hover,
[data-theme="glacier-day"] .btn-primary:hover {
  background: #067079;
}

[data-theme="glacier"] .btn-outline,
[data-theme="glacier-day"] .btn-outline {
  background: #ffffff;
  color: #004b5a;
  border-color: rgba(0, 75, 90, 0.25);
}

[data-theme="glacier"] .btn-outline:hover,
[data-theme="glacier-day"] .btn-outline:hover {
  background: #d6ebeb;
  color: #001b1f;
}

[data-theme="glacier"] .logo-icon,
[data-theme="glacier-day"] .logo-icon {
  background: linear-gradient(135deg, #004b5a, #49a6ab);
  color: #ffffff;
}

[data-theme="glacier"] .glass-modal-dialog,
[data-theme="glacier-day"] .glass-modal-dialog {
  background: #ffffff;
  border-color: rgba(0, 75, 90, 0.2);
  color: #001b1f;
  box-shadow: 0 25px 60px rgba(0, 75, 90, 0.18);
}

/* Brand Text & Badges (Glacier Day) */
[data-theme="glacier"] .brand-text h1,
[data-theme="glacier-day"] .brand-text h1 {
  background: linear-gradient(to right, #001b1f, #004b5a);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="glacier"] .alcoa-badge,
[data-theme="glacier-day"] .alcoa-badge {
  background: rgba(0, 75, 90, 0.08);
  color: #004b5a;
  border-color: rgba(0, 75, 90, 0.25);
}

/* Universe Canvas & 3D Background (Glacier Day) */
[data-theme="glacier"] .universe-canvas-wrapper,
[data-theme="glacier-day"] .universe-canvas-wrapper {
  background: radial-gradient(circle at 50% 30%, #e2f0f0 0%, #d1e7e7 100%) !important;
  border-color: rgba(0, 75, 90, 0.2);
  box-shadow: 0 12px 40px rgba(0, 75, 90, 0.08), inset 0 0 0 1px rgba(0, 75, 90, 0.05);
}

[data-theme="glacier"] .author-graph-canvas,
[data-theme="glacier-day"] .author-graph-canvas {
  background: #eef6f6 !important;
  border-color: rgba(0, 75, 90, 0.2);
}

/* Universe Toolbar & Controls (Glacier Day) */
[data-theme="glacier"] .universe-toolbar,
[data-theme="glacier-day"] .universe-toolbar {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(0, 75, 90, 0.18);
  box-shadow: 0 2px 10px rgba(0, 75, 90, 0.06);
}

[data-theme="glacier"] .universe-view-segmented,
[data-theme="glacier-day"] .universe-view-segmented {
  background: #eef6f6;
  border: 1px solid rgba(0, 75, 90, 0.15);
}

[data-theme="glacier"] .universe-toolbar .hud-glsl-btn,
[data-theme="glacier-day"] .universe-toolbar .hud-glsl-btn {
  color: #004b5a;
}

[data-theme="glacier"] .universe-toolbar .hud-glsl-btn:hover,
[data-theme="glacier-day"] .universe-toolbar .hud-glsl-btn:hover {
  background: rgba(0, 75, 90, 0.08);
  color: #001b1f;
}

[data-theme="glacier"] .universe-toolbar .hud-glsl-btn.active,
[data-theme="glacier-day"] .universe-toolbar .hud-glsl-btn.active {
  background: #ffffff;
  color: #004b5a;
  border-color: #004b5a;
  box-shadow: 0 2px 8px rgba(0, 75, 90, 0.15);
}

[data-theme="glacier"] .universe-toolbar .select-glsl,
[data-theme="glacier-day"] .universe-toolbar .select-glsl {
  background: #ffffff;
  color: #001b1f;
  border-color: rgba(0, 75, 90, 0.2);
}

[data-theme="glacier"] .universe-search-wrap input,
[data-theme="glacier-day"] .universe-search-wrap input,
[data-theme="glacier"] .universe-query-filter-wrap input,
[data-theme="glacier-day"] .universe-query-filter-wrap input {
  background: #ffffff;
  color: #001b1f;
  border-color: rgba(0, 75, 90, 0.22);
}

[data-theme="glacier"] .universe-search-wrap input:focus,
[data-theme="glacier-day"] .universe-search-wrap input:focus,
[data-theme="glacier"] .universe-query-filter-wrap input:focus,
[data-theme="glacier-day"] .universe-query-filter-wrap input:focus {
  border-color: #004b5a;
  box-shadow: 0 0 10px rgba(0, 75, 90, 0.2);
}

[data-theme="glacier"] .toolbar-sep,
[data-theme="glacier-day"] .toolbar-sep {
  background: rgba(0, 75, 90, 0.15);
}

[data-theme="glacier"] .toolbar-val-pill,
[data-theme="glacier-day"] .toolbar-val-pill {
  color: #004b5a;
}

[data-theme="glacier"] .universe-badge-pill,
[data-theme="glacier-day"] .universe-badge-pill {
  background: #ffffff;
  border-color: rgba(0, 75, 90, 0.16);
  color: #004b5a;
}

/* 1. workspace-nav-bar & workspace-tabs-group */
[data-theme="glacier"] .workspace-nav-bar,
[data-theme="glacier-day"] .workspace-nav-bar {
  background: rgba(226, 240, 240, 0.96);
  border-bottom-color: rgba(0, 75, 90, 0.15);
}

[data-theme="glacier"] .workspace-tabs-group,
[data-theme="glacier-day"] .workspace-tabs-group {
  background: #ffffff;
  border: 1px solid rgba(0, 75, 90, 0.15);
  box-shadow: 0 2px 6px rgba(0, 75, 90, 0.05);
}

[data-theme="glacier"] .ws-tab-btn,
[data-theme="glacier-day"] .ws-tab-btn {
  color: #004b5a;
}

[data-theme="glacier"] .ws-tab-btn:hover,
[data-theme="glacier-day"] .ws-tab-btn:hover {
  background: rgba(0, 75, 90, 0.08);
  color: #001b1f;
}

[data-theme="glacier"] .ws-tab-btn.active,
[data-theme="glacier-day"] .ws-tab-btn.active {
  background: #ffffff;
  color: #004b5a;
  border-bottom: 2px solid #004b5a;
  box-shadow: 0 2px 8px rgba(0, 75, 90, 0.08);
}

[data-theme="glacier"] .ws-tab-pill,
[data-theme="glacier-day"] .ws-tab-pill {
  background: rgba(0, 75, 90, 0.1);
  color: #004b5a;
}

/* 2. workload-hud-bar */
[data-theme="glacier"] .workload-hud-bar,
[data-theme="glacier-day"] .workload-hud-bar {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(238, 246, 246, 0.9) 100%);
  border: 1px solid rgba(0, 75, 90, 0.15);
  box-shadow: 0 8px 24px -6px rgba(0, 75, 90, 0.08);
}

/* 3. ws0-log-msg */
[data-theme="glacier"] .ws0-log-msg,
[data-theme="glacier-day"] .ws0-log-msg {
  color: #001b1f;
}

/* 4. telemetry-pulse-hero-bar */
[data-theme="glacier"] .telemetry-pulse-hero-bar,
[data-theme="glacier-day"] .telemetry-pulse-hero-bar {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(238, 246, 246, 0.92) 100%);
  border: 1px solid rgba(0, 75, 90, 0.2);
  box-shadow: 0 8px 24px -6px rgba(0, 75, 90, 0.08), 0 0 15px -3px rgba(6, 112, 121, 0.08);
}

/* 5. kinship-persona-inspector, kinship-glsl-viewport, kinship-bottom-legend-bar */
[data-theme="tecan"] .kindship-persona-inspector,
[data-theme="glacier"] .kinship-persona-inspector,
[data-theme="glacier"] .kindship-persona-inspector,
[data-theme="tecan-day"] .kindship-persona-inspector,
[data-theme="glacier-day"] .kinship-persona-inspector,
[data-theme="glacier-day"] .kindship-persona-inspector {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 75, 90, 0.16);
  box-shadow: 0 10px 28px rgba(0, 75, 90, 0.1);
  color: #001b1f;
}

[data-theme="glacier"] .kinship-glsl-viewport,
[data-theme="glacier-day"] .kinship-glsl-viewport {
  background: radial-gradient(circle at center, #ffffff, #e2f0f0) !important;
  border-color: rgba(0, 75, 90, 0.2);
  box-shadow: 0 12px 32px rgba(0, 75, 90, 0.1), inset 0 1px 0 rgba(0, 75, 90, 0.06);
}

[data-theme="glacier"] .kinship-bottom-legend-bar,
[data-theme="glacier-day"] .kinship-bottom-legend-bar {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 75, 90, 0.18);
  box-shadow: 0 4px 16px rgba(0, 75, 90, 0.08);
}

[data-theme="glacier"] .kinship-filter-pill,
[data-theme="glacier-day"] .kinship-filter-pill {
  background: #eef6f6;
  border: 1px solid rgba(0, 75, 90, 0.16);
  color: #004b5a;
}

/* 6. authors-subnav-bar */
[data-theme="glacier"] .authors-subnav-bar,
[data-theme="glacier-day"] .authors-subnav-bar {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 75, 90, 0.15);
  box-shadow: 0 4px 14px rgba(0, 75, 90, 0.05);
}

/* 7. drag-stepper & dag-stepper */
[data-theme="tecan"] .dag-stepper,
[data-theme="tecan-day"] .dag-stepper,
[data-theme="glacier"] .dag-stepper,
[data-theme="glacier"] .drag-stepper,
[data-theme="glacier-day"] .dag-stepper,
[data-theme="glacier-day"] .drag-stepper {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(0, 75, 90, 0.16);
  box-shadow: 0 4px 14px rgba(0, 75, 90, 0.05);
}

/* 8. glass-panel */
[data-theme="tecan"] .glass-panel,
[data-theme="tecan-day"] .glass-panel,
[data-theme="glacier"] .glass-panel,
[data-theme="glacier-day"] .glass-panel {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(0, 75, 90, 0.15);
  box-shadow: 0 6px 20px rgba(0, 75, 90, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* 9. dag-template-picker & dag-qa-table */
[data-theme="glacier"] .dag-template-picker label,
[data-theme="glacier-day"] .dag-template-picker label {
  color: #004b5a;
}

[data-theme="glacier"] .dag-qa-table th,
[data-theme="glacier-day"] .dag-qa-table th {
  background: #e3f1f1;
  color: #004b5a;
  border-bottom: 2px solid #70bfc2;
}

[data-theme="glacier"] .dag-qa-table td,
[data-theme="glacier-day"] .dag-qa-table td {
  border-bottom: 1px solid rgba(0, 75, 90, 0.08);
  color: #001b1f;
}

[data-theme="glacier"] .dag-qa-table tr:hover,
[data-theme="glacier-day"] .dag-qa-table tr:hover {
  background: rgba(0, 75, 90, 0.04);
}

/* field-table & table.field-table */
[data-theme="glacier"] .field-table th,
[data-theme="glacier-day"] .field-table th {
  background: #e3f1f1;
  color: #004b5a;
  border-bottom: 2px solid #70bfc2;
}

[data-theme="glacier"] .field-table td,
[data-theme="glacier-day"] .field-table td {
  border-bottom: 1px solid rgba(0, 75, 90, 0.08);
  color: #001b1f;
}

[data-theme="glacier"] .field-table tr:hover,
[data-theme="glacier-day"] .field-table tr:hover {
  background: rgba(0, 75, 90, 0.04);
}

/* 10. dag-panel-header & dag-panel */
[data-theme="glacier"] .dag-panel,
[data-theme="glacier-day"] .dag-panel {
  background: #ffffff;
  border-color: rgba(0, 75, 90, 0.15);
  box-shadow: 0 4px 16px rgba(0, 75, 90, 0.06);
}

[data-theme="glacier"] .dag-panel-header,
[data-theme="glacier-day"] .dag-panel-header {
  background: rgba(238, 246, 246, 0.85);
  border-bottom-color: rgba(0, 75, 90, 0.15);
}

[data-theme="glacier"] .dag-panel-title,
[data-theme="glacier-day"] .dag-panel-title {
  color: #001b1f;
}

/* 11. studio-title & studio-hero-search-card */
[data-theme="glacier"] .studio-title,
[data-theme="glacier-day"] .studio-title {
  color: #001b1f;
}

[data-theme="tecan"] .studio-hero-search-card,
[data-theme="tecan-day"] .studio-hero-search-card,
[data-theme="glacier"] .studio-hero-search-card,
[data-theme="glacier-day"] .studio-hero-search-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(238, 246, 246, 0.92) 100%);
  border: 1px solid rgba(0, 75, 90, 0.2);
  box-shadow: 0 10px 30px -8px rgba(0, 75, 90, 0.12), 0 0 25px -5px rgba(6, 112, 121, 0.08);
}

[data-theme="glacier"] #studio-rag-input,
[data-theme="glacier"] .studio-search-input-wrap input,
[data-theme="glacier-day"] #studio-rag-input,
[data-theme="glacier-day"] .studio-search-input-wrap input {
  background: #ffffff;
  border: 1.5px solid rgba(0, 75, 90, 0.25);
  color: #001b1f;
}

[data-theme="glacier"] #studio-rag-input:focus,
[data-theme="glacier"] .studio-search-input-wrap input:focus,
[data-theme="glacier-day"] #studio-rag-input:focus,
[data-theme="glacier-day"] .studio-search-input-wrap input:focus {
  border-color: #004b5a;
  box-shadow: 0 0 12px rgba(0, 75, 90, 0.25);
}

/* 12. studio-card */
[data-theme="glacier"] .studio-card,
[data-theme="glacier-day"] .studio-card {
  background: #ffffff;
  border: 1px solid rgba(0, 75, 90, 0.15);
  box-shadow: 0 4px 18px -4px rgba(0, 75, 90, 0.08);
}

[data-theme="glacier"] .studio-card-title,
[data-theme="glacier-day"] .studio-card-title {
  color: #001b1f;
}

/* 13. ai-chat-header-bar & chat-workspace-switcher */
[data-theme="glacier"] .ai-chat-header-bar,
[data-theme="glacier-day"] .ai-chat-header-bar {
  background: rgba(238, 246, 246, 0.9);
  border-bottom-color: rgba(0, 75, 90, 0.15);
}

[data-theme="glacier"] .chat-workspace-switcher,
[data-theme="glacier-day"] .chat-workspace-switcher {
  background: #eef6f6;
  border: 1px solid rgba(0, 75, 90, 0.16);
}

[data-theme="glacier"] .chat-pill-toggle,
[data-theme="glacier-day"] .chat-pill-toggle {
  color: #004b5a;
}

[data-theme="glacier"] .chat-pill-toggle.active,
[data-theme="glacier-day"] .chat-pill-toggle.active {
  background: #ffffff;
  color: #004b5a;
  border-color: #004b5a;
  box-shadow: 0 1px 4px rgba(0, 75, 90, 0.12);
}

/* 14. chat-messages */
[data-theme="glacier"] .chat-messages,
[data-theme="glacier-day"] .chat-messages {
  background: #f8fbfb;
}

[data-theme="glacier"] .chat-msg.bot .msg-bubble,
[data-theme="glacier-day"] .chat-msg.bot .msg-bubble {
  background: #ffffff;
  border-color: rgba(0, 75, 90, 0.18);
  color: #001b1f;
  box-shadow: 0 2px 8px rgba(0, 75, 90, 0.05);
}

[data-theme="glacier"] .chat-msg.bot .msg-bubble strong,
[data-theme="glacier-day"] .chat-msg.bot .msg-bubble strong {
  color: #001b1f;
}

[data-theme="glacier"] .chat-msg.bot .msg-bubble .chat-inline-code,
[data-theme="glacier-day"] .chat-msg.bot .msg-bubble .chat-inline-code {
  background: #eef6f6;
  color: #004b5a;
  border-color: rgba(0, 75, 90, 0.2);
}

[data-theme="glacier"] .chat-msg.bot .msg-bubble .chat-pre,
[data-theme="glacier-day"] .chat-msg.bot .msg-bubble .chat-pre {
  background: #eef6f6;
  border-color: rgba(0, 75, 90, 0.2);
}

[data-theme="glacier"] .chat-msg.bot .msg-bubble .chat-code-block,
[data-theme="glacier-day"] .chat-msg.bot .msg-bubble .chat-code-block {
  color: #001b1f;
}

[data-theme="glacier"] .chat-msg.user .msg-bubble,
[data-theme="glacier-day"] .chat-msg.user .msg-bubble {
  background: #004b5a;
  color: #ffffff;
}

/* 15. ai-chat-input-container & #chat-input */
[data-theme="glacier"] .ai-chat-input-container,
[data-theme="glacier-day"] .ai-chat-input-container {
  background: rgba(238, 246, 246, 0.9);
  border-top-color: rgba(0, 75, 90, 0.15);
}

[data-theme="glacier"] #chat-input,
[data-theme="glacier"] .ai-chat-input-wrap textarea,
[data-theme="glacier"] .chat-input-row input,
[data-theme="glacier-day"] #chat-input,
[data-theme="glacier-day"] .ai-chat-input-wrap textarea,
[data-theme="glacier-day"] .chat-input-row input {
  background: #ffffff;
  border: 1.5px solid rgba(0, 75, 90, 0.22);
  color: #001b1f;
}

[data-theme="glacier"] #chat-input:focus,
[data-theme="glacier"] .ai-chat-input-wrap textarea:focus,
[data-theme="glacier"] .chat-input-row input:focus,
[data-theme="glacier-day"] #chat-input:focus,
[data-theme="glacier-day"] .ai-chat-input-wrap textarea:focus,
[data-theme="glacier-day"] .chat-input-row input:focus {
  border-color: #004b5a;
  box-shadow: 0 0 12px rgba(0, 75, 90, 0.25);
}

/* 16. legend-header & axes-legend-overlay */
[data-theme="glacier"] .axes-legend-overlay,
[data-theme="glacier-day"] .axes-legend-overlay {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 75, 90, 0.2);
  box-shadow: 0 8px 30px rgba(0, 75, 90, 0.15);
}

[data-theme="glacier"] .axes-legend-overlay.collapsed,
[data-theme="glacier-day"] .axes-legend-overlay.collapsed {
  background: rgba(255, 255, 255, 0.92);
  border-color: #004b5a;
}

[data-theme="glacier"] .legend-header,
[data-theme="glacier-day"] .legend-header {
  border-bottom-color: rgba(0, 75, 90, 0.15);
}

[data-theme="glacier"] .legend-title,
[data-theme="glacier-day"] .legend-title {
  color: #001b1f;
}

/* 17. legend-body */
[data-theme="glacier"] .legend-body,
[data-theme="glacier-day"] .legend-body {
  color: #004b5a;
}

[data-theme="glacier"] .cluster-legend-title,
[data-theme="glacier-day"] .cluster-legend-title {
  color: #004b5a;
}

/* 18. universe-hero-left & universe-hero-bar */
[data-theme="glacier"] .universe-hero-bar,
[data-theme="glacier-day"] .universe-hero-bar {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(238, 246, 246, 0.9) 100%);
  border-color: rgba(0, 75, 90, 0.15);
  box-shadow: 0 4px 16px rgba(0, 75, 90, 0.08);
}

[data-theme="glacier"] .universe-hero-title,
[data-theme="glacier-day"] .universe-hero-title {
  background: linear-gradient(135deg, #001b1f 50%, #067079 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="glacier"] .universe-hero-desc,
[data-theme="glacier-day"] .universe-hero-desc {
  color: #004b5a;
}

/* 19. inspector-header & glsl-node-inspector */
[data-theme="glacier"] .glsl-node-inspector,
[data-theme="glacier-day"] .glsl-node-inspector {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(0, 75, 90, 0.25);
  box-shadow: 0 12px 35px rgba(0, 75, 90, 0.2);
  color: #001b1f;
}

[data-theme="glacier"] .inspector-header,
[data-theme="glacier-day"] .inspector-header {
  background: rgba(238, 246, 246, 0.96) !important;
  border-bottom-color: rgba(0, 75, 90, 0.15);
  color: #001b1f;
}

/* 20. inspector-body */
[data-theme="glacier"] .inspector-body,
[data-theme="glacier-day"] .inspector-body {
  color: #001b1f;
}


/* --------------------------------------------------------------------------
   THEME 4: Alpine Azure (Clean Cantonal Sky Blue & Slate Silver - Day)
   Insp.: Signature Cantonalbank azure blue (#0085ca) and crisp white/slate
   -------------------------------------------------------------------------- */
[data-theme="azure-day"],
[data-theme="alpine-azure"] {
  --theme-id: "azure-day";
  --bg-base: #f5f7fa;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #edeeee;
  --bg-hover: #e2e8f0;
  --border-color: rgba(32, 74, 119, 0.15);
  --border-focus: rgba(0, 133, 202, 0.5);

  --text-main: #204a77;
  --text-muted: #4c575a;
  --text-faint: #7f8789;

  --accent-primary: #0085ca;
  --accent-primary-hover: #0091d3;
  --accent-cyan: #0091d3;
  --accent-emerald: #23783c;
  --accent-amber: #fe7c39;
  --accent-rose: #b72f33;
}

[data-theme="azure-day"] body,
[data-theme="alpine-azure"] body {
  background-color: #f5f7fa;
  color: #204a77;
}

[data-theme="azure-day"] .navbar,
[data-theme="alpine-azure"] .navbar {
  background: rgba(255, 255, 255, 0.95);
  border-bottom-color: rgba(32, 74, 119, 0.15);
  box-shadow: 0 2px 10px rgba(0, 133, 202, 0.06);
}

[data-theme="azure-day"] .metric-card,
[data-theme="azure-day"] .kb-card,
[data-theme="azure-day"] .admin-card,
[data-theme="azure-day"] .dropzone,
[data-theme="azure-day"] .panel-container,
[data-theme="azure-day"] .ledger-container,
[data-theme="azure-day"] .kinship-container {
  background: #ffffff;
  border-color: rgba(32, 74, 119, 0.14);
  box-shadow: 0 4px 16px rgba(0, 133, 202, 0.06);
}

[data-theme="azure-day"] .ledger-table th,
[data-theme="alpine-azure"] .ledger-table th {
  background: #edeeee;
  color: #204a77;
  border-bottom: 2px solid #0085ca;
}

[data-theme="azure-day"] .ledger-table tbody tr:hover,
[data-theme="alpine-azure"] .ledger-table tbody tr:hover {
  background: rgba(0, 133, 202, 0.04);
}

[data-theme="azure-day"] .btn-primary,
[data-theme="alpine-azure"] .btn-primary {
  background: #0085ca;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 133, 202, 0.3);
}

[data-theme="azure-day"] .btn-primary:hover,
[data-theme="alpine-azure"] .btn-primary:hover {
  background: #0091d3;
}

[data-theme="azure-day"] .btn-outline,
[data-theme="alpine-azure"] .btn-outline {
  background: #ffffff;
  color: #204a77;
  border-color: rgba(32, 74, 119, 0.22);
}

[data-theme="azure-day"] .btn-outline:hover,
[data-theme="alpine-azure"] .btn-outline:hover {
  background: #edeeee;
  color: #0085ca;
}

[data-theme="azure-day"] .logo-icon,
[data-theme="alpine-azure"] .logo-icon {
  background: linear-gradient(135deg, #0085ca, #005a9a);
  color: #ffffff;
}

[data-theme="azure-day"] .glass-modal-dialog,
[data-theme="alpine-azure"] .glass-modal-dialog {
  background: #ffffff;
  border-color: rgba(32, 74, 119, 0.2);
  color: #204a77;
  box-shadow: 0 25px 60px rgba(0, 133, 202, 0.18);
}

/* Brand Text & Badges (Alpine Azure Day) */
[data-theme="azure-day"] .brand-text h1,
[data-theme="alpine-azure"] .brand-text h1 {
  background: linear-gradient(to right, #204a77, #0085ca);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="azure-day"] .alcoa-badge,
[data-theme="alpine-azure"] .alcoa-badge {
  background: rgba(0, 133, 202, 0.08);
  color: #0085ca;
  border-color: rgba(0, 133, 202, 0.25);
}

/* Universe Canvas & 3D Background (Alpine Azure Day) */
[data-theme="azure-day"] .universe-canvas-wrapper,
[data-theme="alpine-azure"] .universe-canvas-wrapper {
  background: radial-gradient(circle at 50% 30%, #eef3f8 0%, #e1e9f2 100%) !important;
  border-color: rgba(0, 133, 202, 0.2);
  box-shadow: 0 12px 40px rgba(0, 133, 202, 0.08), inset 0 0 0 1px rgba(0, 133, 202, 0.05);
}

[data-theme="azure-day"] .author-graph-canvas,
[data-theme="alpine-azure"] .author-graph-canvas {
  background: #f5f7fa !important;
  border-color: rgba(0, 133, 202, 0.2);
}

/* Universe Toolbar & Controls (Alpine Azure Day) */
[data-theme="azure-day"] .universe-toolbar,
[data-theme="alpine-azure"] .universe-toolbar {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(32, 74, 119, 0.18);
  box-shadow: 0 2px 10px rgba(0, 133, 202, 0.06);
}

[data-theme="azure-day"] .universe-view-segmented,
[data-theme="alpine-azure"] .universe-view-segmented {
  background: #edeeee;
  border: 1px solid rgba(32, 74, 119, 0.15);
}

[data-theme="azure-day"] .universe-toolbar .hud-glsl-btn,
[data-theme="alpine-azure"] .universe-toolbar .hud-glsl-btn {
  color: #4c575a;
}

[data-theme="azure-day"] .universe-toolbar .hud-glsl-btn:hover,
[data-theme="alpine-azure"] .universe-toolbar .hud-glsl-btn:hover {
  background: rgba(0, 133, 202, 0.08);
  color: #204a77;
}

[data-theme="azure-day"] .universe-toolbar .hud-glsl-btn.active,
[data-theme="alpine-azure"] .universe-toolbar .hud-glsl-btn.active {
  background: #ffffff;
  color: #0085ca;
  border-color: #0085ca;
  box-shadow: 0 2px 8px rgba(0, 133, 202, 0.15);
}

[data-theme="azure-day"] .universe-toolbar .select-glsl,
[data-theme="alpine-azure"] .universe-toolbar .select-glsl {
  background: #ffffff;
  color: #204a77;
  border-color: rgba(32, 74, 119, 0.2);
}

[data-theme="azure-day"] .universe-search-wrap input,
[data-theme="alpine-azure"] .universe-search-wrap input,
[data-theme="azure-day"] .universe-query-filter-wrap input,
[data-theme="alpine-azure"] .universe-query-filter-wrap input {
  background: #ffffff;
  color: #204a77;
  border-color: rgba(32, 74, 119, 0.22);
}

[data-theme="azure-day"] .universe-search-wrap input:focus,
[data-theme="alpine-azure"] .universe-search-wrap input:focus,
[data-theme="azure-day"] .universe-query-filter-wrap input:focus,
[data-theme="alpine-azure"] .universe-query-filter-wrap input:focus {
  border-color: #0085ca;
  box-shadow: 0 0 10px rgba(0, 133, 202, 0.25);
}

[data-theme="azure-day"] .toolbar-sep,
[data-theme="alpine-azure"] .toolbar-sep {
  background: rgba(32, 74, 119, 0.15);
}

[data-theme="azure-day"] .toolbar-val-pill,
[data-theme="alpine-azure"] .toolbar-val-pill {
  color: #0085ca;
}

[data-theme="azure-day"] .universe-badge-pill,
[data-theme="alpine-azure"] .universe-badge-pill {
  background: #ffffff;
  border-color: rgba(32, 74, 119, 0.16);
  color: #204a77;
}

/* 1. workspace-nav-bar & workspace-tabs-group */
[data-theme="azure-day"] .workspace-nav-bar,
[data-theme="alpine-azure"] .workspace-nav-bar {
  background: rgba(237, 238, 238, 0.96);
  border-bottom-color: rgba(32, 74, 119, 0.15);
}

[data-theme="azure-day"] .workspace-tabs-group,
[data-theme="alpine-azure"] .workspace-tabs-group {
  background: #ffffff;
  border: 1px solid rgba(32, 74, 119, 0.15);
  box-shadow: 0 2px 6px rgba(0, 133, 202, 0.05);
}

[data-theme="azure-day"] .ws-tab-btn,
[data-theme="alpine-azure"] .ws-tab-btn {
  color: #4c575a;
}

[data-theme="azure-day"] .ws-tab-btn:hover,
[data-theme="alpine-azure"] .ws-tab-btn:hover {
  background: rgba(0, 133, 202, 0.08);
  color: #204a77;
}

[data-theme="azure-day"] .ws-tab-btn.active,
[data-theme="alpine-azure"] .ws-tab-btn.active {
  background: #ffffff;
  color: #0085ca;
  border-bottom: 2px solid #0085ca;
  box-shadow: 0 2px 8px rgba(0, 133, 202, 0.08);
}

[data-theme="azure-day"] .ws-tab-pill,
[data-theme="alpine-azure"] .ws-tab-pill {
  background: rgba(0, 133, 202, 0.1);
  color: #0085ca;
}

/* 2. workload-hud-bar */
[data-theme="azure-day"] .workload-hud-bar,
[data-theme="alpine-azure"] .workload-hud-bar {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(245, 247, 250, 0.9) 100%);
  border: 1px solid rgba(32, 74, 119, 0.15);
  box-shadow: 0 8px 24px -6px rgba(0, 133, 202, 0.08);
}

/* 3. ws0-log-msg */
[data-theme="azure-day"] .ws0-log-msg,
[data-theme="alpine-azure"] .ws0-log-msg {
  color: #204a77;
}

/* 4. telemetry-pulse-hero-bar */
[data-theme="azure-day"] .telemetry-pulse-hero-bar,
[data-theme="alpine-azure"] .telemetry-pulse-hero-bar {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 247, 250, 0.92) 100%);
  border: 1px solid rgba(0, 133, 202, 0.25);
  box-shadow: 0 8px 24px -6px rgba(0, 133, 202, 0.08), 0 0 15px -3px rgba(0, 133, 202, 0.1);
}

/* 5. kinship-persona-inspector, kinship-glsl-viewport, kinship-bottom-legend-bar */
[data-theme="azure-day"] .kinship-persona-inspector,
[data-theme="azure-day"] .kindship-persona-inspector,
[data-theme="alpine-azure"] .kinship-persona-inspector,
[data-theme="alpine-azure"] .kindship-persona-inspector {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(32, 74, 119, 0.16);
  box-shadow: 0 10px 28px rgba(0, 133, 202, 0.1);
  color: #204a77;
}

[data-theme="azure-day"] .kinship-glsl-viewport,
[data-theme="alpine-azure"] .kinship-glsl-viewport {
  background: radial-gradient(circle at center, #ffffff, #e1e9f2) !important;
  border-color: rgba(32, 74, 119, 0.2);
  box-shadow: 0 12px 32px rgba(0, 133, 202, 0.1), inset 0 1px 0 rgba(0, 133, 202, 0.06);
}

[data-theme="azure-day"] .kinship-bottom-legend-bar,
[data-theme="alpine-azure"] .kinship-bottom-legend-bar {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(32, 74, 119, 0.18);
  box-shadow: 0 4px 16px rgba(0, 133, 202, 0.08);
}

[data-theme="azure-day"] .kinship-filter-pill,
[data-theme="alpine-azure"] .kinship-filter-pill {
  background: #edeeee;
  border: 1px solid rgba(32, 74, 119, 0.16);
  color: #204a77;
}

/* 6. authors-subnav-bar */
[data-theme="azure-day"] .authors-subnav-bar,
[data-theme="alpine-azure"] .authors-subnav-bar {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(32, 74, 119, 0.15);
  box-shadow: 0 4px 14px rgba(0, 133, 202, 0.05);
}

/* 7. drag-stepper & dag-stepper */
[data-theme="azure-day"] .dag-stepper,
[data-theme="azure-day"] .drag-stepper,
[data-theme="alpine-azure"] .dag-stepper,
[data-theme="alpine-azure"] .drag-stepper {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(32, 74, 119, 0.16);
  box-shadow: 0 4px 14px rgba(0, 133, 202, 0.05);
}

/* 8. glass-panel */
[data-theme="azure-day"] .glass-panel,
[data-theme="alpine-azure"] .glass-panel {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(32, 74, 119, 0.15);
  box-shadow: 0 6px 20px rgba(0, 133, 202, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* 9. dag-template-picker & dag-qa-table */
[data-theme="azure-day"] .dag-template-picker label,
[data-theme="alpine-azure"] .dag-template-picker label {
  color: #204a77;
}

[data-theme="azure-day"] .dag-qa-table th,
[data-theme="alpine-azure"] .dag-qa-table th {
  background: #edeeee;
  color: #204a77;
  border-bottom: 2px solid #0085ca;
}

[data-theme="azure-day"] .dag-qa-table td,
[data-theme="alpine-azure"] .dag-qa-table td {
  border-bottom: 1px solid rgba(32, 74, 119, 0.08);
  color: #204a77;
}

[data-theme="azure-day"] .dag-qa-table tr:hover,
[data-theme="alpine-azure"] .dag-qa-table tr:hover {
  background: rgba(0, 133, 202, 0.04);
}

/* field-table & table.field-table */
[data-theme="azure-day"] .field-table th,
[data-theme="alpine-azure"] .field-table th {
  background: #edeeee;
  color: #204a77;
  border-bottom: 2px solid #0085ca;
}

[data-theme="azure-day"] .field-table td,
[data-theme="alpine-azure"] .field-table td {
  border-bottom: 1px solid rgba(32, 74, 119, 0.08);
  color: #204a77;
}

[data-theme="azure-day"] .field-table tr:hover,
[data-theme="alpine-azure"] .field-table tr:hover {
  background: rgba(0, 133, 202, 0.04);
}

/* 10. dag-panel-header & dag-panel */
[data-theme="azure-day"] .dag-panel,
[data-theme="alpine-azure"] .dag-panel {
  background: #ffffff;
  border-color: rgba(32, 74, 119, 0.15);
  box-shadow: 0 4px 16px rgba(0, 133, 202, 0.06);
}

[data-theme="azure-day"] .dag-panel-header,
[data-theme="alpine-azure"] .dag-panel-header {
  background: rgba(245, 247, 250, 0.85);
  border-bottom-color: rgba(32, 74, 119, 0.15);
}

[data-theme="azure-day"] .dag-panel-title,
[data-theme="alpine-azure"] .dag-panel-title {
  color: #204a77;
}

/* 11. studio-title & studio-hero-search-card */
[data-theme="azure-day"] .studio-title,
[data-theme="alpine-azure"] .studio-title {
  color: #204a77;
}

[data-theme="azure-day"] .studio-hero-search-card,
[data-theme="alpine-azure"] .studio-hero-search-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.68) 0%, rgba(250, 210, 245, 0.72) 100%);
  border: 1px solid rgba(0, 133, 202, 0.25);
  box-shadow: 0 10px 30px -8px rgba(0, 133, 202, 0.1), 0 0 25px -5px rgba(0, 133, 202, 0.08);
}

[data-theme="azure-day"] #studio-rag-input,
[data-theme="azure-day"] .studio-search-input-wrap input,
[data-theme="alpine-azure"] #studio-rag-input,
[data-theme="alpine-azure"] .studio-search-input-wrap input {
  background: #ffffff;
  border: 1.5px solid rgba(0, 133, 202, 0.25);
  color: #204a77;
}

[data-theme="azure-day"] #studio-rag-input:focus,
[data-theme="azure-day"] .studio-search-input-wrap input:focus,
[data-theme="alpine-azure"] #studio-rag-input:focus,
[data-theme="alpine-azure"] .studio-search-input-wrap input:focus {
  border-color: #0085ca;
  box-shadow: 0 0 12px rgba(0, 133, 202, 0.25);
}

/* 12. studio-card */
[data-theme="azure-day"] .studio-card,
[data-theme="alpine-azure"] .studio-card {
  background: #ffffff;
  border: 1px solid rgba(32, 74, 119, 0.15);
  box-shadow: 0 4px 18px -4px rgba(0, 133, 202, 0.08);
}

[data-theme="azure-day"] .studio-card-title,
[data-theme="alpine-azure"] .studio-card-title {
  color: #204a77;
}

/* 13. ai-chat-header-bar & chat-workspace-switcher */
[data-theme="azure-day"] .ai-chat-header-bar,
[data-theme="alpine-azure"] .ai-chat-header-bar {
  background: rgba(245, 247, 250, 0.9);
  border-bottom-color: rgba(32, 74, 119, 0.15);
}

[data-theme="azure-day"] .chat-workspace-switcher,
[data-theme="alpine-azure"] .chat-workspace-switcher {
  background: #edeeee;
  border: 1px solid rgba(32, 74, 119, 0.16);
}

[data-theme="azure-day"] .chat-pill-toggle,
[data-theme="alpine-azure"] .chat-pill-toggle {
  color: #4c575a;
}

[data-theme="azure-day"] .chat-pill-toggle.active,
[data-theme="alpine-azure"] .chat-pill-toggle.active {
  background: #ffffff;
  color: #0085ca;
  border-color: #0085ca;
  box-shadow: 0 1px 4px rgba(0, 133, 202, 0.12);
}

/* 14. chat-messages */
[data-theme="azure-day"] .chat-messages,
[data-theme="alpine-azure"] .chat-messages {
  background: #f8fafc;
}

[data-theme="azure-day"] .chat-msg.bot .msg-bubble,
[data-theme="alpine-azure"] .chat-msg.bot .msg-bubble {
  background: #ffffff;
  border-color: rgba(32, 74, 119, 0.18);
  color: #204a77;
  box-shadow: 0 2px 8px rgba(0, 133, 202, 0.05);
}

[data-theme="azure-day"] .chat-msg.bot .msg-bubble strong,
[data-theme="alpine-azure"] .chat-msg.bot .msg-bubble strong {
  color: #204a77;
}

[data-theme="azure-day"] .chat-msg.bot .msg-bubble .chat-inline-code,
[data-theme="alpine-azure"] .chat-msg.bot .msg-bubble .chat-inline-code {
  background: #f1f5f9;
  color: #0085ca;
  border-color: rgba(0, 133, 202, 0.2);
}

[data-theme="azure-day"] .chat-msg.bot .msg-bubble .chat-pre,
[data-theme="alpine-azure"] .chat-msg.bot .msg-bubble .chat-pre {
  background: #f1f5f9;
  border-color: rgba(32, 74, 119, 0.18);
}

[data-theme="azure-day"] .chat-msg.bot .msg-bubble .chat-code-block,
[data-theme="alpine-azure"] .chat-msg.bot .msg-bubble .chat-code-block {
  color: #204a77;
}

[data-theme="azure-day"] .chat-msg.user .msg-bubble,
[data-theme="alpine-azure"] .chat-msg.user .msg-bubble {
  background: #0085ca;
  color: #ffffff;
}

/* 15. ai-chat-input-container & #chat-input */
[data-theme="azure-day"] .ai-chat-input-container,
[data-theme="alpine-azure"] .ai-chat-input-container {
  background: rgba(245, 247, 250, 0.9);
  border-top-color: rgba(32, 74, 119, 0.15);
}

[data-theme="azure-day"] #chat-input,
[data-theme="azure-day"] .ai-chat-input-wrap textarea,
[data-theme="azure-day"] .chat-input-row input,
[data-theme="alpine-azure"] #chat-input,
[data-theme="alpine-azure"] .ai-chat-input-wrap textarea,
[data-theme="alpine-azure"] .chat-input-row input {
  background: #ffffff;
  border: 1.5px solid rgba(32, 74, 119, 0.22);
  color: #204a77;
}

[data-theme="azure-day"] #chat-input:focus,
[data-theme="azure-day"] .ai-chat-input-wrap textarea:focus,
[data-theme="azure-day"] .chat-input-row input:focus,
[data-theme="alpine-azure"] #chat-input:focus,
[data-theme="alpine-azure"] .ai-chat-input-wrap textarea:focus,
[data-theme="alpine-azure"] .chat-input-row input:focus {
  border-color: #0085ca;
  box-shadow: 0 0 12px rgba(0, 133, 202, 0.25);
}

/* 16. legend-header & axes-legend-overlay */
[data-theme="azure-day"] .axes-legend-overlay,
[data-theme="alpine-azure"] .axes-legend-overlay {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(32, 74, 119, 0.2);
  box-shadow: 0 8px 30px rgba(0, 133, 202, 0.15);
}

[data-theme="azure-day"] .axes-legend-overlay.collapsed,
[data-theme="alpine-azure"] .axes-legend-overlay.collapsed {
  background: rgba(255, 255, 255, 0.92);
  border-color: #0085ca;
}

[data-theme="azure-day"] .legend-header,
[data-theme="alpine-azure"] .legend-header {
  border-bottom-color: rgba(32, 74, 119, 0.15);
}

[data-theme="azure-day"] .legend-title,
[data-theme="alpine-azure"] .legend-title {
  color: #204a77;
}

/* 17. legend-body */
[data-theme="azure-day"] .legend-body,
[data-theme="alpine-azure"] .legend-body {
  color: #4c575a;
}

[data-theme="azure-day"] .cluster-legend-title,
[data-theme="alpine-azure"] .cluster-legend-title {
  color: #204a77;
}

/* 18. universe-hero-left & universe-hero-bar */
[data-theme="azure-day"] .universe-hero-bar,
[data-theme="alpine-azure"] .universe-hero-bar {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(245, 247, 250, 0.9) 100%);
  border-color: rgba(32, 74, 119, 0.15);
  box-shadow: 0 4px 16px rgba(0, 133, 202, 0.08);
}

[data-theme="azure-day"] .universe-hero-title,
[data-theme="alpine-azure"] .universe-hero-title {
  background: linear-gradient(135deg, #204a77 50%, #0085ca 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="azure-day"] .universe-hero-desc,
[data-theme="alpine-azure"] .universe-hero-desc {
  color: #4c575a;
}

/* 19. inspector-header & glsl-node-inspector */
[data-theme="azure-day"] .glsl-node-inspector,
[data-theme="alpine-azure"] .glsl-node-inspector {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(32, 74, 119, 0.25);
  box-shadow: 0 12px 35px rgba(0, 133, 202, 0.2);
  color: #204a77;
}

[data-theme="azure-day"] .inspector-header,
[data-theme="alpine-azure"] .inspector-header {
  background: rgba(245, 247, 250, 0.96) !important;
  border-bottom-color: rgba(32, 74, 119, 0.15);
  color: #204a77;
}

/* 20. inspector-body */
[data-theme="azure-day"] .inspector-body,
[data-theme="alpine-azure"] .inspector-body {
  color: #204a77;
}


/* ==========================================================================
   EXTENDED KINSHIP, AUTHORS & WORKSPACE TABS THEME OVERRIDES
   Covers:
   - workspace-tabs-group (.ws-tab-btn, .ws-tab-pill, .pill-ai, .pill-chat, .pill-glsl)
   - kinship-glsl-canvas (#kinship-glsl-canvas, .kinship-hud-*, .kinship-tooltip)
   - kinship-bottom-legend-bar (.kinship-filter-pill, .kinship-legend-meta)
   - kinship-inspector-name (#kinship-inspector-name, .inspector-title-group h4, .inspector-facts-list, .kinship-conn-pill)
   - authors-tab-kinship (#authors-tab-kinship, #authors-tab-review, .authors-subnav-btn)
   - author-graph-section (.author-graph-section, .author-graph-header, .author-graph-tooltip, .author-review-note)
   ========================================================================== */

/* --- ALPINE NIGHT (petrol-dark / alpine-night) --- */
[data-theme="petrol-dark"] .ws-tab-btn.active .ws-tab-pill,
[data-theme="alpine-night"] .ws-tab-btn.active .ws-tab-pill {
  background: rgba(255, 204, 0, 0.25);
  color: #ffcc00;
  border-color: rgba(255, 204, 0, 0.45);
}

[data-theme="petrol-dark"] .ws-tab-pill.pill-ai,
[data-theme="alpine-night"] .ws-tab-pill.pill-ai {
  background: rgba(255, 204, 0, 0.14);
  color: #ffcc00;
  border-color: rgba(255, 204, 0, 0.35);
}

[data-theme="petrol-dark"] .ws-tab-pill.pill-chat,
[data-theme="alpine-night"] .ws-tab-pill.pill-chat {
  background: rgba(147, 237, 174, 0.14);
  color: #93edae;
  border-color: rgba(147, 237, 174, 0.35);
}

[data-theme="petrol-dark"] .ws-tab-pill.pill-glsl,
[data-theme="alpine-night"] .ws-tab-pill.pill-glsl {
  background: rgba(112, 191, 194, 0.18);
  color: #a6d8d9;
  border-color: rgba(112, 191, 194, 0.4);
}

[data-theme="petrol-dark"] #kinship-glsl-canvas,
[data-theme="alpine-night"] #kinship-glsl-canvas {
  background: transparent;
}

[data-theme="petrol-dark"] .kinship-hud-badge-group,
[data-theme="alpine-night"] .kinship-hud-badge-group,
[data-theme="petrol-dark"] .kinship-hud-actions,
[data-theme="alpine-night"] .kinship-hud-actions {
  background: rgba(0, 27, 31, 0.9);
  border-color: rgba(166, 216, 217, 0.24);
}

[data-theme="petrol-dark"] .kinship-hud-title,
[data-theme="alpine-night"] .kinship-hud-title {
  color: #eef6f6;
}

[data-theme="petrol-dark"] .kinship-hud-pill,
[data-theme="alpine-night"] .kinship-hud-pill {
  background: rgba(255, 204, 0, 0.15);
  color: #ffcc00;
  border-color: rgba(255, 204, 0, 0.35);
}

[data-theme="petrol-dark"] .kinship-hud-btn,
[data-theme="alpine-night"] .kinship-hud-btn {
  color: #a6d8d9;
}

[data-theme="petrol-dark"] .kinship-hud-btn:hover,
[data-theme="alpine-night"] .kinship-hud-btn:hover {
  background: rgba(0, 75, 90, 0.45);
  color: #ffffff;
}

[data-theme="petrol-dark"] .kinship-hud-btn.active,
[data-theme="alpine-night"] .kinship-hud-btn.active {
  background: rgba(255, 204, 0, 0.2);
  color: #ffcc00;
  border: 1px solid rgba(255, 204, 0, 0.45);
}

[data-theme="petrol-dark"] .kinship-filter-pill:hover,
[data-theme="alpine-night"] .kinship-filter-pill:hover {
  background: rgba(0, 75, 90, 0.5);
  color: #ffffff;
}

[data-theme="petrol-dark"] .kinship-filter-pill.active,
[data-theme="alpine-night"] .kinship-filter-pill.active {
  background: rgba(255, 204, 0, 0.18);
  border-color: #ffcc00;
  color: #ffcc00;
  box-shadow: 0 0 12px rgba(255, 204, 0, 0.25);
}

[data-theme="petrol-dark"] #kinship-inspector-name,
[data-theme="alpine-night"] #kinship-inspector-name,
[data-theme="petrol-dark"] .inspector-title-group h4,
[data-theme="alpine-night"] .inspector-title-group h4 {
  color: #eef6f6;
}

[data-theme="petrol-dark"] .inspector-avatar,
[data-theme="alpine-night"] .inspector-avatar {
  background: rgba(0, 27, 31, 0.9);
  border-color: #ffcc00;
  color: #ffcc00;
}

[data-theme="petrol-dark"] .inspector-card-header,
[data-theme="alpine-night"] .inspector-card-header {
  border-bottom-color: rgba(166, 216, 217, 0.2);
}

[data-theme="petrol-dark"] .inspector-facts-list li,
[data-theme="alpine-night"] .inspector-facts-list li {
  background: rgba(0, 27, 31, 0.55);
  border-color: rgba(166, 216, 217, 0.14);
}

[data-theme="petrol-dark"] .inspector-facts-list li strong,
[data-theme="alpine-night"] .inspector-facts-list li strong {
  color: #eef6f6;
}

[data-theme="petrol-dark"] .kinship-conn-pill,
[data-theme="alpine-night"] .kinship-conn-pill {
  background: rgba(0, 27, 31, 0.55);
  border-color: rgba(166, 216, 217, 0.16);
}

[data-theme="petrol-dark"] .kinship-conn-pill:hover,
[data-theme="alpine-night"] .kinship-conn-pill:hover {
  background: rgba(255, 204, 0, 0.12);
  border-color: rgba(255, 204, 0, 0.4);
}

[data-theme="petrol-dark"] .kinship-conn-pill .conn-name,
[data-theme="alpine-night"] .kinship-conn-pill .conn-name {
  color: #eef6f6;
}

[data-theme="petrol-dark"] #authors-tab-kinship,
[data-theme="alpine-night"] #authors-tab-kinship,
[data-theme="petrol-dark"] .authors-subnav-btn,
[data-theme="alpine-night"] .authors-subnav-btn {
  background: rgba(0, 27, 31, 0.7);
  border-color: rgba(166, 216, 217, 0.2);
  color: #a6d8d9;
}

[data-theme="petrol-dark"] #authors-tab-kinship:hover,
[data-theme="alpine-night"] #authors-tab-kinship:hover,
[data-theme="petrol-dark"] .authors-subnav-btn:hover,
[data-theme="alpine-night"] .authors-subnav-btn:hover {
  background: rgba(0, 75, 90, 0.5);
  color: #ffffff;
}

[data-theme="petrol-dark"] #authors-tab-kinship.active,
[data-theme="alpine-night"] #authors-tab-kinship.active,
[data-theme="petrol-dark"] .authors-subnav-btn.active,
[data-theme="alpine-night"] .authors-subnav-btn.active {
  background: linear-gradient(135deg, rgba(255, 204, 0, 0.22), rgba(0, 75, 90, 0.6));
  border-color: #ffcc00;
  color: #ffcc00;
  box-shadow: 0 0 15px rgba(255, 204, 0, 0.25);
}

[data-theme="petrol-dark"] .author-graph-section,
[data-theme="alpine-night"] .author-graph-section {
  background: linear-gradient(145deg, rgba(0, 41, 46, 0.98), rgba(0, 27, 31, 0.98));
  border-color: rgba(166, 216, 217, 0.22);
}

[data-theme="petrol-dark"] .author-graph-tooltip,
[data-theme="alpine-night"] .author-graph-tooltip,
[data-theme="petrol-dark"] .kinship-tooltip,
[data-theme="alpine-night"] .kinship-tooltip {
  background: rgba(0, 27, 31, 0.96);
  border-color: rgba(255, 204, 0, 0.45);
  color: #eef6f6;
}

[data-theme="petrol-dark"] .author-review-note,
[data-theme="alpine-night"] .author-review-note {
  background: rgba(0, 27, 31, 0.78);
  border-color: rgba(166, 216, 217, 0.2);
}


/* --- GLACIER MIST DAY (glacier / glacier-day) --- */
[data-theme="glacier"] .ws-tab-btn.active,
[data-theme="glacier-day"] .ws-tab-btn.active {
  background: #004b5a;
  color: #ffffff;
  border-bottom: 2px solid #067079;
  box-shadow: 0 2px 8px rgba(0, 75, 90, 0.2);
}

[data-theme="glacier"] .ws-tab-btn.active .ws-tab-pill,
[data-theme="glacier-day"] .ws-tab-btn.active .ws-tab-pill {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
}

[data-theme="glacier"] .ws-tab-pill.pill-ai,
[data-theme="glacier-day"] .ws-tab-pill.pill-ai {
  background: rgba(0, 75, 90, 0.12);
  color: #004b5a;
  border-color: rgba(0, 75, 90, 0.28);
}

[data-theme="glacier"] .ws-tab-pill.pill-chat,
[data-theme="glacier-day"] .ws-tab-pill.pill-chat {
  background: rgba(43, 132, 105, 0.14);
  color: #1f6b53;
  border-color: rgba(43, 132, 105, 0.3);
}

[data-theme="glacier"] .ws-tab-pill.pill-glsl,
[data-theme="glacier-day"] .ws-tab-pill.pill-glsl {
  background: rgba(6, 112, 121, 0.14);
  color: #067079;
  border-color: rgba(6, 112, 121, 0.3);
}

[data-theme="glacier"] #kinship-glsl-canvas,
[data-theme="glacier-day"] #kinship-glsl-canvas {
  background: transparent;
}

[data-theme="glacier"] .kinship-hud-badge-group,
[data-theme="glacier-day"] .kinship-hud-badge-group,
[data-theme="glacier"] .kinship-hud-actions,
[data-theme="glacier-day"] .kinship-hud-actions {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(0, 75, 90, 0.2);
  box-shadow: 0 4px 12px rgba(0, 75, 90, 0.08);
}

[data-theme="glacier"] .kinship-hud-title,
[data-theme="glacier-day"] .kinship-hud-title {
  color: #001b1f;
}

[data-theme="glacier"] .kinship-hud-pill,
[data-theme="glacier-day"] .kinship-hud-pill {
  background: rgba(0, 75, 90, 0.1);
  color: #004b5a;
  border-color: rgba(0, 75, 90, 0.25);
}

[data-theme="glacier"] .kinship-hud-btn,
[data-theme="glacier-day"] .kinship-hud-btn {
  color: #004b5a;
}

[data-theme="glacier"] .kinship-hud-btn:hover,
[data-theme="glacier-day"] .kinship-hud-btn:hover {
  background: rgba(0, 75, 90, 0.1);
  color: #001b1f;
}

[data-theme="glacier"] .kinship-hud-btn.active,
[data-theme="glacier-day"] .kinship-hud-btn.active {
  background: #004b5a;
  color: #ffffff;
  border: 1px solid #004b5a;
}

[data-theme="glacier"] .kinship-filter-pill:hover,
[data-theme="glacier-day"] .kinship-filter-pill:hover {
  background: #d6ebeb;
  color: #001b1f;
}

[data-theme="glacier"] .kinship-filter-pill.active,
[data-theme="glacier-day"] .kinship-filter-pill.active {
  background: #004b5a;
  border-color: #004b5a;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 75, 90, 0.2);
}

[data-theme="glacier"] #kinship-inspector-name,
[data-theme="glacier-day"] #kinship-inspector-name,
[data-theme="glacier"] .inspector-title-group h4,
[data-theme="glacier-day"] .inspector-title-group h4 {
  color: #001b1f !important;
}

[data-theme="glacier"] .inspector-avatar,
[data-theme="glacier-day"] .inspector-avatar {
  background: #eef6f6;
  border-color: #004b5a;
  color: #004b5a;
  box-shadow: 0 2px 8px rgba(0, 75, 90, 0.12);
}

[data-theme="glacier"] .inspector-card-header,
[data-theme="glacier-day"] .inspector-card-header {
  border-bottom-color: rgba(0, 75, 90, 0.15);
}

[data-theme="glacier"] .inspector-facts-list li,
[data-theme="glacier-day"] .inspector-facts-list li {
  background: #eef6f6;
  border-color: rgba(0, 75, 90, 0.12);
}

[data-theme="glacier"] .inspector-facts-list li strong,
[data-theme="glacier-day"] .inspector-facts-list li strong {
  color: #001b1f;
}

[data-theme="glacier"] .inspector-facts-list li code,
[data-theme="glacier-day"] .inspector-facts-list li code {
  color: #067079;
}

[data-theme="glacier"] .kinship-conn-pill,
[data-theme="glacier-day"] .kinship-conn-pill {
  background: #eef6f6;
  border-color: rgba(0, 75, 90, 0.14);
}

[data-theme="glacier"] .kinship-conn-pill:hover,
[data-theme="glacier-day"] .kinship-conn-pill:hover {
  background: #d6ebeb;
  border-color: #004b5a;
}

[data-theme="glacier"] .kinship-conn-pill .conn-name,
[data-theme="glacier-day"] .kinship-conn-pill .conn-name {
  color: #001b1f;
}

[data-theme="glacier"] #authors-tab-kinship,
[data-theme="glacier-day"] #authors-tab-kinship,
[data-theme="glacier"] .authors-subnav-btn,
[data-theme="glacier-day"] .authors-subnav-btn {
  background: #eef6f6;
  border-color: rgba(0, 75, 90, 0.18);
  color: #004b5a;
}

[data-theme="glacier"] #authors-tab-kinship:hover,
[data-theme="glacier-day"] #authors-tab-kinship:hover,
[data-theme="glacier"] .authors-subnav-btn:hover,
[data-theme="glacier-day"] .authors-subnav-btn:hover {
  background: #d6ebeb;
  color: #001b1f;
}

[data-theme="glacier"] #authors-tab-kinship.active,
[data-theme="glacier-day"] #authors-tab-kinship.active,
[data-theme="glacier"] .authors-subnav-btn.active,
[data-theme="glacier-day"] .authors-subnav-btn.active {
  background: linear-gradient(135deg, #004b5a, #067079);
  border-color: #004b5a;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 75, 90, 0.22);
}

[data-theme="glacier"] .author-graph-section,
[data-theme="glacier-day"] .author-graph-section {
  background: linear-gradient(145deg, #ffffff, #eef6f6);
  border-color: rgba(0, 75, 90, 0.18);
  box-shadow: 0 6px 20px rgba(0, 75, 90, 0.06);
}

[data-theme="glacier"] .author-graph-header h3,
[data-theme="glacier-day"] .author-graph-header h3 {
  color: #001b1f;
}

[data-theme="glacier"] .author-graph-tooltip,
[data-theme="glacier-day"] .author-graph-tooltip,
[data-theme="glacier"] .kinship-tooltip,
[data-theme="glacier-day"] .kinship-tooltip {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(0, 75, 90, 0.35);
  color: #001b1f;
  box-shadow: 0 8px 24px rgba(0, 75, 90, 0.16);
}

[data-theme="glacier"] .kinship-tooltip .tt-title,
[data-theme="glacier-day"] .kinship-tooltip .tt-title {
  color: #001b1f;
}

[data-theme="glacier"] .kinship-tooltip .tt-sub,
[data-theme="glacier-day"] .kinship-tooltip .tt-sub {
  color: #004b5a;
}

[data-theme="glacier"] .author-review-note,
[data-theme="glacier-day"] .author-review-note {
  background: #eef6f6;
  border-color: rgba(0, 75, 90, 0.18);
  color: #004b5a;
}


/* --- ALPINE AZURE DAY (azure-day / alpine-azure) --- */
[data-theme="azure-day"] .ws-tab-btn.active,
[data-theme="alpine-azure"] .ws-tab-btn.active {
  background: #0085ca;
  color: #ffffff;
  border-bottom: 2px solid #204a77;
  box-shadow: 0 2px 8px rgba(0, 133, 202, 0.22);
}

[data-theme="azure-day"] .ws-tab-btn.active .ws-tab-pill,
[data-theme="alpine-azure"] .ws-tab-btn.active .ws-tab-pill {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
}

[data-theme="azure-day"] .ws-tab-pill.pill-ai,
[data-theme="alpine-azure"] .ws-tab-pill.pill-ai {
  background: rgba(0, 133, 202, 0.12);
  color: #0085ca;
  border-color: rgba(0, 133, 202, 0.28);
}

[data-theme="azure-day"] .ws-tab-pill.pill-chat,
[data-theme="alpine-azure"] .ws-tab-pill.pill-chat {
  background: rgba(35, 120, 60, 0.12);
  color: #23783c;
  border-color: rgba(35, 120, 60, 0.28);
}

[data-theme="azure-day"] .ws-tab-pill.pill-glsl,
[data-theme="alpine-azure"] .ws-tab-pill.pill-glsl {
  background: rgba(32, 74, 119, 0.12);
  color: #204a77;
  border-color: rgba(32, 74, 119, 0.28);
}

[data-theme="azure-day"] #kinship-glsl-canvas,
[data-theme="alpine-azure"] #kinship-glsl-canvas {
  background: transparent;
}

[data-theme="azure-day"] .kinship-hud-badge-group,
[data-theme="alpine-azure"] .kinship-hud-badge-group,
[data-theme="azure-day"] .kinship-hud-actions,
[data-theme="alpine-azure"] .kinship-hud-actions {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(32, 74, 119, 0.2);
  box-shadow: 0 4px 12px rgba(0, 133, 202, 0.08);
}

[data-theme="azure-day"] .kinship-hud-title,
[data-theme="alpine-azure"] .kinship-hud-title {
  color: #204a77;
}

[data-theme="azure-day"] .kinship-hud-pill,
[data-theme="alpine-azure"] .kinship-hud-pill {
  background: rgba(0, 133, 202, 0.1);
  color: #0085ca;
  border-color: rgba(0, 133, 202, 0.25);
}

[data-theme="azure-day"] .kinship-hud-btn,
[data-theme="alpine-azure"] .kinship-hud-btn {
  color: #4c575a;
}

[data-theme="azure-day"] .kinship-hud-btn:hover,
[data-theme="alpine-azure"] .kinship-hud-btn:hover {
  background: rgba(0, 133, 202, 0.1);
  color: #204a77;
}

[data-theme="azure-day"] .kinship-hud-btn.active,
[data-theme="alpine-azure"] .kinship-hud-btn.active {
  background: #0085ca;
  color: #ffffff;
  border: 1px solid #0085ca;
}

[data-theme="azure-day"] .kinship-filter-pill:hover,
[data-theme="alpine-azure"] .kinship-filter-pill:hover {
  background: #e2e8f0;
  color: #204a77;
}

[data-theme="azure-day"] .kinship-filter-pill.active,
[data-theme="alpine-azure"] .kinship-filter-pill.active {
  background: #0085ca;
  border-color: #0085ca;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 133, 202, 0.22);
}

[data-theme="azure-day"] #kinship-inspector-name,
[data-theme="alpine-azure"] #kinship-inspector-name,
[data-theme="azure-day"] .inspector-title-group h4,
[data-theme="alpine-azure"] .inspector-title-group h4 {
  color: #204a77 !important;
}

[data-theme="azure-day"] .inspector-avatar,
[data-theme="alpine-azure"] .inspector-avatar {
  background: #f5f7fa;
  border-color: #0085ca;
  color: #0085ca;
  box-shadow: 0 2px 8px rgba(0, 133, 202, 0.12);
}

[data-theme="azure-day"] .inspector-card-header,
[data-theme="alpine-azure"] .inspector-card-header {
  border-bottom-color: rgba(32, 74, 119, 0.15);
}

[data-theme="azure-day"] .inspector-facts-list li,
[data-theme="alpine-azure"] .inspector-facts-list li {
  background: #f5f7fa;
  border-color: rgba(32, 74, 119, 0.12);
}

[data-theme="azure-day"] .inspector-facts-list li strong,
[data-theme="alpine-azure"] .inspector-facts-list li strong {
  color: #204a77;
}

[data-theme="azure-day"] .inspector-facts-list li code,
[data-theme="alpine-azure"] .inspector-facts-list li code {
  color: #0085ca;
}

[data-theme="azure-day"] .kinship-conn-pill,
[data-theme="alpine-azure"] .kinship-conn-pill {
  background: #f5f7fa;
  border-color: rgba(32, 74, 119, 0.14);
}

[data-theme="azure-day"] .kinship-conn-pill:hover,
[data-theme="alpine-azure"] .kinship-conn-pill:hover {
  background: #e2e8f0;
  border-color: #0085ca;
}

[data-theme="azure-day"] .kinship-conn-pill .conn-name,
[data-theme="alpine-azure"] .kinship-conn-pill .conn-name {
  color: #204a77;
}

[data-theme="azure-day"] #authors-tab-kinship,
[data-theme="alpine-azure"] #authors-tab-kinship,
[data-theme="azure-day"] .authors-subnav-btn,
[data-theme="alpine-azure"] .authors-subnav-btn {
  background: #edeeee;
  border-color: rgba(32, 74, 119, 0.18);
  color: #4c575a;
}

[data-theme="azure-day"] #authors-tab-kinship:hover,
[data-theme="alpine-azure"] #authors-tab-kinship:hover,
[data-theme="azure-day"] .authors-subnav-btn:hover,
[data-theme="alpine-azure"] .authors-subnav-btn:hover {
  background: #e2e8f0;
  color: #204a77;
}

[data-theme="azure-day"] #authors-tab-kinship.active,
[data-theme="alpine-azure"] #authors-tab-kinship.active,
[data-theme="azure-day"] .authors-subnav-btn.active,
[data-theme="alpine-azure"] .authors-subnav-btn.active {
  background: linear-gradient(135deg, #0085ca, #204a77);
  border-color: #0085ca;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 133, 202, 0.22);
}

[data-theme="azure-day"] .author-graph-section,
[data-theme="alpine-azure"] .author-graph-section {
  background: linear-gradient(145deg, #ffffff, #f5f7fa);
  border-color: rgba(32, 74, 119, 0.18);
  box-shadow: 0 6px 20px rgba(0, 133, 202, 0.06);
}

[data-theme="azure-day"] .author-graph-header h3,
[data-theme="alpine-azure"] .author-graph-header h3 {
  color: #204a77;
}

[data-theme="azure-day"] .author-graph-tooltip,
[data-theme="alpine-azure"] .author-graph-tooltip,
[data-theme="azure-day"] .kinship-tooltip,
[data-theme="alpine-azure"] .kinship-tooltip {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(0, 133, 202, 0.35);
  color: #204a77;
  box-shadow: 0 8px 24px rgba(0, 133, 202, 0.16);
}

[data-theme="azure-day"] .kinship-tooltip .tt-title,
[data-theme="alpine-azure"] .kinship-tooltip .tt-title {
  color: #204a77;
}

[data-theme="azure-day"] .kinship-tooltip .tt-sub,
[data-theme="alpine-azure"] .kinship-tooltip .tt-sub {
  color: #4c575a;
}

[data-theme="azure-day"] .author-review-note,
[data-theme="alpine-azure"] .author-review-note {
  background: #f5f7fa;
  border-color: rgba(32, 74, 119, 0.18);
  color: #4c575a;
}


/* ==========================================================================
   EXTENDED DIAGNOSTICS, INSPECTOR & HARDWARE GAUGES OVERRIDES
   Covers:
   - insp-rel-col
   - insp-stat-card
   - cluster-macro-summary
   - glsl-brightness-val & brightness-control-group
   - pipeline-stage-card & stage-card-cuda
   - hud-glsl-btn btn-reload, btn-glsl-zenith, btn-glsl-orbital, btn-34-top, btn-90-rotate
   - pc2-vram-gauge-banner
   - ws0-diag-log-list & ws0-diag-log-container
   - diag-floating-pill, diag-console-window, diag-toolbar, diag-log-container
   ========================================================================== */

/* --- ALPINE NIGHT (petrol-dark / alpine-night) --- */
[data-theme="petrol-dark"] .insp-rel-col-header,
[data-theme="alpine-night"] .insp-rel-col-header {
  border-bottom-color: rgba(166, 216, 217, 0.10);
}

[data-theme="petrol-dark"] .insp-rel-col-title,
[data-theme="alpine-night"] .insp-rel-col-title {
  color: #a6d8d9;
}

[data-theme="petrol-dark"] .insp-rel-badge,
[data-theme="alpine-night"] .insp-rel-badge {
  background: rgba(0, 27, 31, 0.7);
  color: #ffcc00;
  border: 1px solid rgba(255, 204, 0, 0.25);
}

[data-theme="petrol-dark"] .insp-stat-card,
[data-theme="alpine-night"] .insp-stat-card {
  background: rgba(0, 27, 31, 0.75);
  border: 1px solid rgba(166, 216, 217, 0.18);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

[data-theme="petrol-dark"] .insp-stat-lbl,
[data-theme="alpine-night"] .insp-stat-lbl {
  color: #a6d8d9;
}

[data-theme="petrol-dark"] .insp-stat-val,
[data-theme="alpine-night"] .insp-stat-val {
  color: #eef6f6;
}

[data-theme="petrol-dark"] .cluster-macro-summary,
[data-theme="alpine-night"] .cluster-macro-summary {
  background: rgba(0, 27, 31, 0.85);
  border: 1px dashed rgba(255, 204, 0, 0.35);
}

[data-theme="petrol-dark"] .macro-badge,
[data-theme="alpine-night"] .macro-badge {
  background: rgba(255, 204, 0, 0.18);
  color: #ffcc00;
  border: 1px solid rgba(255, 204, 0, 0.4);
}

[data-theme="petrol-dark"] .macro-text,
[data-theme="alpine-night"] .macro-text {
  color: #a6d8d9;
}

[data-theme="petrol-dark"] .macro-pct,
[data-theme="alpine-night"] .macro-pct {
  color: #ffcc00;
}

[data-theme="petrol-dark"] .brightness-control-group .slider-glsl,
[data-theme="alpine-night"] .brightness-control-group .slider-glsl {
  background: rgba(166, 216, 217, 0.2);
}

[data-theme="petrol-dark"] .brightness-control-group .slider-glsl:hover,
[data-theme="alpine-night"] .brightness-control-group .slider-glsl:hover {
  background: rgba(166, 216, 217, 0.35);
}

[data-theme="petrol-dark"] .brightness-control-group .slider-glsl::-webkit-slider-thumb,
[data-theme="alpine-night"] .brightness-control-group .slider-glsl::-webkit-slider-thumb {
  background: #ffcc00;
  box-shadow: 0 0 8px rgba(255, 204, 0, 0.6);
}

[data-theme="petrol-dark"] #glsl-brightness-val,
[data-theme="alpine-night"] #glsl-brightness-val {
  color: #ffcc00;
  background: rgba(0, 27, 31, 0.7);
  border: 1px solid rgba(255, 204, 0, 0.3);
}

[data-theme="petrol-dark"] .pipeline-stage-card,
[data-theme="alpine-night"] .pipeline-stage-card {
  background: rgba(0, 36, 40, 0.9);
  border: 1px solid rgba(166, 216, 217, 0.18);
}

[data-theme="petrol-dark"] .pipeline-stage-card:hover,
[data-theme="alpine-night"] .pipeline-stage-card:hover {
  border-color: #ffcc00;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), 0 0 12px rgba(255, 204, 0, 0.15);
}

[data-theme="petrol-dark"] .pipeline-stage-card.stage-card-cuda,
[data-theme="alpine-night"] .pipeline-stage-card.stage-card-cuda {
  background: linear-gradient(180deg, rgba(0, 45, 52, 0.95) 0%, rgba(255, 204, 0, 0.08) 100%);
  border-color: rgba(255, 204, 0, 0.4);
}

[data-theme="petrol-dark"] .hud-glsl-btn.btn-reload:hover,
[data-theme="alpine-night"] .hud-glsl-btn.btn-reload:hover,
[data-theme="petrol-dark"] #btn-glsl-zenith:hover,
[data-theme="alpine-night"] #btn-glsl-zenith:hover,
[data-theme="petrol-dark"] #btn-glsl-orbital:hover,
[data-theme="alpine-night"] #btn-glsl-orbital:hover,
[data-theme="petrol-dark"] #btn-34-top:hover,
[data-theme="alpine-night"] #btn-34-top:hover,
[data-theme="petrol-dark"] #btn-90-rotate:hover,
[data-theme="alpine-night"] #btn-90-rotate:hover {
  background: rgba(0, 75, 90, 0.5);
  color: #ffffff;
  border-color: rgba(166, 216, 217, 0.35);
}

[data-theme="petrol-dark"] #btn-glsl-zenith.active,
[data-theme="alpine-night"] #btn-glsl-zenith.active,
[data-theme="petrol-dark"] #btn-glsl-orbital.active,
[data-theme="alpine-night"] #btn-glsl-orbital.active,
[data-theme="petrol-dark"] #btn-34-top.active,
[data-theme="alpine-night"] #btn-34-top.active {
  background: rgba(255, 204, 0, 0.2);
  color: #ffcc00;
  border-color: #ffcc00;
  box-shadow: 0 0 10px rgba(255, 204, 0, 0.3);
}

[data-theme="petrol-dark"] .pc2-vram-gauge-banner,
[data-theme="alpine-night"] .pc2-vram-gauge-banner {
  background: rgba(0, 36, 40, 0.9);
  border: 1px solid rgba(255, 204, 0, 0.3);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

[data-theme="petrol-dark"] .ws0-diag-log-container,
[data-theme="alpine-night"] .ws0-diag-log-container {
  background: #00171a;
  border-color: rgba(166, 216, 217, 0.2);
}

[data-theme="petrol-dark"] .ws0-log-item:hover,
[data-theme="alpine-night"] .ws0-log-item:hover {
  background: rgba(0, 41, 46, 0.6);
}

[data-theme="petrol-dark"] .diag-floating-pill,
[data-theme="alpine-night"] .diag-floating-pill {
  background: rgba(0, 32, 37, 0.92);
  border: 1px solid rgba(255, 204, 0, 0.35);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 204, 0, 0.15);
  color: #eef6f6;
}

[data-theme="petrol-dark"] .diag-floating-pill:hover,
[data-theme="alpine-night"] .diag-floating-pill:hover {
  border-color: #ffcc00;
  box-shadow: 0 14px 30px -5px rgba(0, 0, 0, 0.85), 0 0 25px rgba(255, 204, 0, 0.3);
}

[data-theme="petrol-dark"] .diag-console-window,
[data-theme="alpine-night"] .diag-console-window {
  background: rgba(0, 27, 31, 0.98);
  border: 1px solid rgba(255, 204, 0, 0.35);
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.9), 0 0 35px rgba(255, 204, 0, 0.12);
}

[data-theme="petrol-dark"] .diag-header,
[data-theme="alpine-night"] .diag-header {
  background: rgba(0, 41, 46, 0.7);
  border-bottom-color: rgba(166, 216, 217, 0.2);
}

[data-theme="petrol-dark"] .diag-toolbar,
[data-theme="alpine-night"] .diag-toolbar {
  background: rgba(0, 32, 37, 0.6);
  border-bottom-color: rgba(166, 216, 217, 0.15);
}

[data-theme="petrol-dark"] .diag-filter-btn,
[data-theme="alpine-night"] .diag-filter-btn {
  border-color: rgba(166, 216, 217, 0.2);
  color: #a6d8d9;
}

[data-theme="petrol-dark"] .diag-filter-btn:hover,
[data-theme="alpine-night"] .diag-filter-btn:hover {
  background: rgba(0, 75, 90, 0.4);
  color: #ffffff;
}

[data-theme="petrol-dark"] .diag-filter-btn.active,
[data-theme="alpine-night"] .diag-filter-btn.active {
  background: rgba(255, 204, 0, 0.18);
  color: #ffcc00;
  border-color: #ffcc00;
}

[data-theme="petrol-dark"] #diag-search-input,
[data-theme="alpine-night"] #diag-search-input {
  background: rgba(0, 17, 20, 0.85);
  border-color: rgba(166, 216, 217, 0.25);
  color: #eef6f6;
}

[data-theme="petrol-dark"] #diag-search-input:focus,
[data-theme="alpine-night"] #diag-search-input:focus {
  border-color: #ffcc00;
}

[data-theme="petrol-dark"] .diag-log-container,
[data-theme="alpine-night"] .diag-log-container {
  background: rgba(0, 17, 20, 0.75);
}


/* --- GLACIER MIST DAY (glacier / glacier-day) --- */
[data-theme="glacier"] .insp-rel-col-header,
[data-theme="glacier-day"] .insp-rel-col-header {
  border-bottom-color: rgba(0, 75, 90, 0.15);
}

[data-theme="glacier"] .insp-rel-col-title,
[data-theme="glacier-day"] .insp-rel-col-title {
  color: #004b5a;
}

[data-theme="glacier"] .insp-rel-badge,
[data-theme="glacier-day"] .insp-rel-badge {
  background: #eef6f6;
  color: #004b5a;
  border: 1px solid rgba(0, 75, 90, 0.2);
}

[data-theme="glacier"] .insp-stat-card,
[data-theme="glacier-day"] .insp-stat-card {
  background: #ffffff;
  border: 1px solid rgba(0, 75, 90, 0.16);
  box-shadow: 0 2px 8px rgba(0, 75, 90, 0.06);
}

[data-theme="glacier"] .insp-stat-lbl,
[data-theme="glacier-day"] .insp-stat-lbl {
  color: #004b5a;
}

[data-theme="glacier"] .insp-stat-val,
[data-theme="glacier-day"] .insp-stat-val {
  color: #001b1f;
}

[data-theme="glacier"] .cluster-macro-summary,
[data-theme="glacier-day"] .cluster-macro-summary {
  background: #ffffff;
  border: 1px dashed rgba(0, 75, 90, 0.25);
  box-shadow: 0 2px 6px rgba(0, 75, 90, 0.05);
}

[data-theme="glacier"] .macro-badge,
[data-theme="glacier-day"] .macro-badge {
  background: rgba(0, 75, 90, 0.12);
  color: #004b5a;
  border: 1px solid rgba(0, 75, 90, 0.25);
}

[data-theme="glacier"] .macro-text,
[data-theme="glacier-day"] .macro-text {
  color: #004b5a;
}

[data-theme="glacier"] .macro-pct,
[data-theme="glacier-day"] .macro-pct {
  color: #001b1f;
}

[data-theme="glacier"] .brightness-control-group .slider-glsl,
[data-theme="glacier-day"] .brightness-control-group .slider-glsl {
  background: rgba(0, 75, 90, 0.18);
}

[data-theme="glacier"] .brightness-control-group .slider-glsl:hover,
[data-theme="glacier-day"] .brightness-control-group .slider-glsl:hover {
  background: rgba(0, 75, 90, 0.28);
}

[data-theme="glacier"] .brightness-control-group .slider-glsl::-webkit-slider-thumb,
[data-theme="glacier-day"] .brightness-control-group .slider-glsl::-webkit-slider-thumb {
  background: #004b5a;
  box-shadow: 0 0 6px rgba(0, 75, 90, 0.4);
}

[data-theme="glacier"] #glsl-brightness-val,
[data-theme="glacier-day"] #glsl-brightness-val {
  color: #004b5a;
  background: #ffffff;
  border: 1px solid rgba(0, 75, 90, 0.2);
}

[data-theme="glacier"] .pipeline-stage-card,
[data-theme="glacier-day"] .pipeline-stage-card {
  background: #ffffff;
  border: 1px solid rgba(0, 75, 90, 0.16);
  box-shadow: 0 4px 14px rgba(0, 75, 90, 0.06);
}

[data-theme="glacier"] .pipeline-stage-card:hover,
[data-theme="glacier-day"] .pipeline-stage-card:hover {
  border-color: #004b5a;
  box-shadow: 0 6px 18px rgba(0, 75, 90, 0.14);
}

[data-theme="glacier"] .pipeline-stage-card.stage-card-cuda,
[data-theme="glacier-day"] .pipeline-stage-card.stage-card-cuda {
  background: linear-gradient(180deg, #ffffff 0%, rgba(0, 75, 90, 0.08) 100%);
  border-color: rgba(0, 75, 90, 0.35);
}

[data-theme="glacier"] .hud-glsl-btn.btn-reload:hover,
[data-theme="glacier-day"] .hud-glsl-btn.btn-reload:hover,
[data-theme="glacier"] #btn-glsl-zenith:hover,
[data-theme="glacier-day"] #btn-glsl-zenith:hover,
[data-theme="glacier"] #btn-glsl-orbital:hover,
[data-theme="glacier-day"] #btn-glsl-orbital:hover,
[data-theme="glacier"] #btn-34-top:hover,
[data-theme="glacier-day"] #btn-34-top:hover,
[data-theme="glacier"] #btn-90-rotate:hover,
[data-theme="glacier-day"] #btn-90-rotate:hover {
  background: rgba(0, 75, 90, 0.1);
  color: #001b1f;
  border-color: rgba(0, 75, 90, 0.25);
}

[data-theme="glacier"] #btn-glsl-zenith.active,
[data-theme="glacier-day"] #btn-glsl-zenith.active,
[data-theme="glacier"] #btn-glsl-orbital.active,
[data-theme="glacier-day"] #btn-glsl-orbital.active,
[data-theme="glacier"] #btn-34-top.active,
[data-theme="glacier-day"] #btn-34-top.active {
  background: #004b5a;
  color: #ffffff;
  border-color: #004b5a;
  box-shadow: 0 2px 8px rgba(0, 75, 90, 0.2);
}

[data-theme="glacier"] .pc2-vram-gauge-banner,
[data-theme="glacier-day"] .pc2-vram-gauge-banner {
  background: #ffffff;
  border: 1px solid rgba(0, 75, 90, 0.2);
  box-shadow: 0 4px 14px rgba(0, 75, 90, 0.06);
}

[data-theme="tecam"] .ws0-diag-log-container,
[data-theme="tecan-day"] .ws0-diag-log-container,
[data-theme="glacier"] .ws0-diag-log-container,
[data-theme="glacier-day"] .ws0-diag-log-container {
  background: #ffffff;
  border-color: rgba(0, 75, 90, 0.18);
  box-shadow: 0 2px 8px rgba(0, 75, 90, 0.05);
}

[data-theme="glacier"] .ws0-log-item:hover,
[data-theme="glacier-day"] .ws0-log-item:hover {
  background: rgba(0, 75, 90, 0.06);
}

[data-theme="glacier"] .diag-floating-pill,
[data-theme="glacier-day"] .diag-floating-pill {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 75, 90, 0.25);
  box-shadow: 0 10px 25px -5px rgba(0, 75, 90, 0.15), 0 0 20px rgba(0, 75, 90, 0.08);
  color: #001b1f;
}

[data-theme="glacier"] .diag-floating-pill:hover,
[data-theme="glacier-day"] .diag-floating-pill:hover {
  border-color: #004b5a;
  box-shadow: 0 14px 30px -5px rgba(0, 75, 90, 0.22);
}

[data-theme="tecan"] .diag-console-window,
[data-theme="tecan-day"] .diag-console-window,
[data-theme="glacier"] .diag-console-window,
[data-theme="glacier-day"] .diag-console-window {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(0, 75, 90, 0.25);
  box-shadow: 0 25px 60px -10px rgba(0, 75, 90, 0.2), 0 0 35px rgba(0, 75, 90, 0.1);
  color: #001b1f;
}

[data-theme="glacier"] .diag-header,
[data-theme="glacier-day"] .diag-header {
  background: #eef6f6;
  border-bottom-color: rgba(0, 75, 90, 0.15);
}

[data-theme="glacier"] .diag-toolbar,
[data-theme="glacier-day"] .diag-toolbar {
  background: #f8fbfb;
  border-bottom-color: rgba(0, 75, 90, 0.12);
}

[data-theme="glacier"] .diag-filter-btn,
[data-theme="glacier-day"] .diag-filter-btn {
  border-color: rgba(0, 75, 90, 0.18);
  color: #004b5a;
}

[data-theme="glacier"] .diag-filter-btn:hover,
[data-theme="glacier-day"] .diag-filter-btn:hover {
  background: rgba(0, 75, 90, 0.08);
  color: #001b1f;
}

[data-theme="glacier"] .diag-filter-btn.active,
[data-theme="glacier-day"] .diag-filter-btn.active {
  background: #004b5a;
  color: #ffffff;
  border-color: #004b5a;
}

[data-theme="glacier"] #diag-search-input,
[data-theme="glacier-day"] #diag-search-input {
  background: #ffffff;
  border-color: rgba(0, 75, 90, 0.2);
  color: #001b1f;
}

[data-theme="glacier"] #diag-search-input:focus,
[data-theme="glacier-day"] #diag-search-input:focus {
  border-color: #004b5a;
}

[data-theme="tecan"] .diag-log-container,
[data-theme="tecan-day"] .diag-log-container,
[data-theme="glacier"] .diag-log-container,
[data-theme="glacier-day"] .diag-log-container {
  background: #f8fbfb;
}


/* --- ALPINE AZURE DAY (azure-day / alpine-azure) --- */
[data-theme="azure-day"] .insp-rel-col-header,
[data-theme="alpine-azure"] .insp-rel-col-header {
  border-bottom-color: rgba(32, 74, 119, 0.15);
}

[data-theme="azure-day"] .insp-rel-col-title,
[data-theme="alpine-azure"] .insp-rel-col-title {
  color: #204a77;
}

[data-theme="azure-day"] .insp-rel-badge,
[data-theme="alpine-azure"] .insp-rel-badge {
  background: #edeeee;
  color: #204a77;
  border: 1px solid rgba(32, 74, 119, 0.2);
}

[data-theme="azure-day"] .insp-stat-card,
[data-theme="alpine-azure"] .insp-stat-card {
  background: #ffffff;
  border: 1px solid rgba(32, 74, 119, 0.16);
  box-shadow: 0 2px 8px rgba(0, 133, 202, 0.06);
}

[data-theme="azure-day"] .insp-stat-lbl,
[data-theme="alpine-azure"] .insp-stat-lbl {
  color: #4c575a;
}

[data-theme="azure-day"] .insp-stat-val,
[data-theme="alpine-azure"] .insp-stat-val {
  color: #204a77;
}

[data-theme="azure-day"] .cluster-macro-summary,
[data-theme="alpine-azure"] .cluster-macro-summary {
  background: #ffffff;
  border: 1px dashed rgba(0, 133, 202, 0.3);
  box-shadow: 0 2px 6px rgba(0, 133, 202, 0.05);
}

[data-theme="azure-day"] .macro-badge,
[data-theme="alpine-azure"] .macro-badge {
  background: rgba(0, 133, 202, 0.12);
  color: #0085ca;
  border: 1px solid rgba(0, 133, 202, 0.28);
}

[data-theme="azure-day"] .macro-text,
[data-theme="alpine-azure"] .macro-text {
  color: #4c575a;
}

[data-theme="azure-day"] .macro-pct,
[data-theme="alpine-azure"] .macro-pct {
  color: #204a77;
}

[data-theme="azure-day"] .brightness-control-group .slider-glsl,
[data-theme="alpine-azure"] .brightness-control-group .slider-glsl {
  background: rgba(32, 74, 119, 0.16);
}

[data-theme="azure-day"] .brightness-control-group .slider-glsl:hover,
[data-theme="alpine-azure"] .brightness-control-group .slider-glsl:hover {
  background: rgba(32, 74, 119, 0.26);
}

[data-theme="azure-day"] .brightness-control-group .slider-glsl::-webkit-slider-thumb,
[data-theme="alpine-azure"] .brightness-control-group .slider-glsl::-webkit-slider-thumb {
  background: #0085ca;
  box-shadow: 0 0 6px rgba(0, 133, 202, 0.45);
}

[data-theme="azure-day"] #glsl-brightness-val,
[data-theme="alpine-azure"] #glsl-brightness-val {
  color: #0085ca;
  background: #ffffff;
  border: 1px solid rgba(32, 74, 119, 0.2);
}

[data-theme="azure-day"] .pipeline-stage-card,
[data-theme="alpine-azure"] .pipeline-stage-card {
  background: #ffffff;
  border: 1px solid rgba(32, 74, 119, 0.16);
  box-shadow: 0 4px 14px rgba(0, 133, 202, 0.06);
}

[data-theme="azure-day"] .pipeline-stage-card:hover,
[data-theme="alpine-azure"] .pipeline-stage-card:hover {
  border-color: #0085ca;
  box-shadow: 0 6px 18px rgba(0, 133, 202, 0.14);
}

[data-theme="azure-day"] .pipeline-stage-card.stage-card-cuda,
[data-theme="alpine-azure"] .pipeline-stage-card.stage-card-cuda {
  background: linear-gradient(180deg, #ffffff 0%, rgba(0, 133, 202, 0.08) 100%);
  border-color: rgba(0, 133, 202, 0.35);
}

[data-theme="azure-day"] .hud-glsl-btn.btn-reload:hover,
[data-theme="alpine-azure"] .hud-glsl-btn.btn-reload:hover,
[data-theme="azure-day"] #btn-glsl-zenith:hover,
[data-theme="alpine-azure"] #btn-glsl-zenith:hover,
[data-theme="azure-day"] #btn-glsl-orbital:hover,
[data-theme="alpine-azure"] #btn-glsl-orbital:hover,
[data-theme="azure-day"] #btn-34-top:hover,
[data-theme="alpine-azure"] #btn-34-top:hover,
[data-theme="azure-day"] #btn-90-rotate:hover,
[data-theme="alpine-azure"] #btn-90-rotate:hover {
  background: rgba(0, 133, 202, 0.1);
  color: #204a77;
  border-color: rgba(32, 74, 119, 0.25);
}

[data-theme="azure-day"] #btn-glsl-zenith.active,
[data-theme="alpine-azure"] #btn-glsl-zenith.active,
[data-theme="azure-day"] #btn-glsl-orbital.active,
[data-theme="alpine-azure"] #btn-glsl-orbital.active,
[data-theme="azure-day"] #btn-34-top.active,
[data-theme="alpine-azure"] #btn-34-top.active {
  background: #0085ca;
  color: #ffffff;
  border-color: #0085ca;
  box-shadow: 0 2px 8px rgba(0, 133, 202, 0.22);
}

[data-theme="azure-day"] .pc2-vram-gauge-banner,
[data-theme="alpine-azure"] .pc2-vram-gauge-banner {
  background: #ffffff;
  border: 1px solid rgba(0, 133, 202, 0.25);
  box-shadow: 0 4px 14px rgba(0, 133, 202, 0.06);
}

[data-theme="azure-day"] .ws0-diag-log-container,
[data-theme="alpine-azure"] .ws0-diag-log-container {
  background: #ffffff;
  border-color: rgba(32, 74, 119, 0.18);
  box-shadow: 0 2px 8px rgba(0, 133, 202, 0.05);
}

[data-theme="azure-day"] .ws0-log-item:hover,
[data-theme="alpine-azure"] .ws0-log-item:hover {
  background: rgba(0, 133, 202, 0.06);
}

[data-theme="azure-day"] .diag-floating-pill,
[data-theme="alpine-azure"] .diag-floating-pill {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 133, 202, 0.3);
  box-shadow: 0 10px 25px -5px rgba(0, 133, 202, 0.15), 0 0 20px rgba(0, 133, 202, 0.08);
  color: #204a77;
}

[data-theme="azure-day"] .diag-floating-pill:hover,
[data-theme="alpine-azure"] .diag-floating-pill:hover {
  border-color: #0085ca;
  box-shadow: 0 14px 30px -5px rgba(0, 133, 202, 0.25);
}

[data-theme="azure-day"] .diag-console-window,
[data-theme="alpine-azure"] .diag-console-window {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(0, 133, 202, 0.3);
  box-shadow: 0 25px 60px -10px rgba(0, 133, 202, 0.2), 0 0 35px rgba(0, 133, 202, 0.1);
  color: #204a77;
}

[data-theme="azure-day"] .diag-header,
[data-theme="alpine-azure"] .diag-header {
  background: #edeeee;
  border-bottom-color: rgba(32, 74, 119, 0.15);
}

[data-theme="azure-day"] .diag-toolbar,
[data-theme="alpine-azure"] .diag-toolbar {
  background: #f8fafc;
  border-bottom-color: rgba(32, 74, 119, 0.12);
}

[data-theme="azure-day"] .diag-filter-btn,
[data-theme="alpine-azure"] .diag-filter-btn {
  border-color: rgba(32, 74, 119, 0.18);
  color: #4c575a;
}

[data-theme="azure-day"] .diag-filter-btn:hover,
[data-theme="alpine-azure"] .diag-filter-btn:hover {
  background: rgba(0, 133, 202, 0.08);
  color: #204a77;
}

[data-theme="azure-day"] .diag-filter-btn.active,
[data-theme="alpine-azure"] .diag-filter-btn.active {
  background: #0085ca;
  color: #ffffff;
  border-color: #0085ca;
}

[data-theme="azure-day"] #diag-search-input,
[data-theme="alpine-azure"] #diag-search-input {
  background: #ffffff;
  border-color: rgba(32, 74, 119, 0.2);
  color: #204a77;
}

[data-theme="azure-day"] #diag-search-input:focus,
[data-theme="alpine-azure"] #diag-search-input:focus {
  border-color: #0085ca;
}

[data-theme="azure-day"] .diag-log-container,
[data-theme="alpine-azure"] .diag-log-container {
  background: #f8fafc;
}


/* ==========================================================================
   UNIVERSAL FONT TITLE COLORS (WHITE ON NIGHT / BLACK ON DAY)
   Ensures all primary headers & section titles are crisp white in Night modes
   and pure crisp black (#000000) in Day Light modes.
   ========================================================================== */

/* --- NIGHT DARK MODES: Pure White Titles --- */
:root,
[data-theme="default"] h1,
[data-theme="default"] h2,
[data-theme="default"] h3,
[data-theme="default"] h4,
[data-theme="default"] h5,
[data-theme="default"] h6,
[data-theme="obsidian"] h1,
[data-theme="obsidian"] h2,
[data-theme="obsidian"] h3,
[data-theme="obsidian"] h4,
[data-theme="obsidian"] h5,
[data-theme="obsidian"] h6,
[data-theme="petrol-dark"] h1,
[data-theme="petrol-dark"] h2,
[data-theme="petrol-dark"] h3,
[data-theme="petrol-dark"] h4,
[data-theme="petrol-dark"] h5,
[data-theme="petrol-dark"] h6,
[data-theme="alpine-night"] h1,
[data-theme="alpine-night"] h2,
[data-theme="alpine-night"] h3,
[data-theme="alpine-night"] h4,
[data-theme="alpine-night"] h5,
[data-theme="alpine-night"] h6,
[data-theme="default"] .brand-text h1,
[data-theme="obsidian"] .brand-text h1,
[data-theme="petrol-dark"] .brand-text h1,
[data-theme="alpine-night"] .brand-text h1,
[data-theme="default"] .studio-title,
[data-theme="obsidian"] .studio-title,
[data-theme="petrol-dark"] .studio-title,
[data-theme="alpine-night"] .studio-title,
[data-theme="default"] .studio-card-title,
[data-theme="obsidian"] .studio-card-title,
[data-theme="petrol-dark"] .studio-card-title,
[data-theme="alpine-night"] .studio-card-title,
[data-theme="default"] .dag-panel-title,
[data-theme="obsidian"] .dag-panel-title,
[data-theme="petrol-dark"] .dag-panel-title,
[data-theme="alpine-night"] .dag-panel-title,
[data-theme="default"] .dag-panel-header h3,
[data-theme="obsidian"] .dag-panel-header h3,
[data-theme="petrol-dark"] .dag-panel-header h3,
[data-theme="alpine-night"] .dag-panel-header h3,
[data-theme="default"] .statute-art-heading,
[data-theme="obsidian"] .statute-art-heading,
[data-theme="petrol-dark"] .statute-art-heading,
[data-theme="alpine-night"] .statute-art-heading,
[data-theme="default"] #kinship-inspector-name,
[data-theme="obsidian"] #kinship-inspector-name,
[data-theme="petrol-dark"] #kinship-inspector-name,
[data-theme="alpine-night"] #kinship-inspector-name,
[data-theme="default"] .inspector-title-group h4,
[data-theme="obsidian"] .inspector-title-group h4,
[data-theme="petrol-dark"] .inspector-title-group h4,
[data-theme="alpine-night"] .inspector-title-group h4,
[data-theme="default"] .ai-chat-header-bar h3,
[data-theme="obsidian"] .ai-chat-header-bar h3,
[data-theme="petrol-dark"] .ai-chat-header-bar h3,
[data-theme="alpine-night"] .ai-chat-header-bar h3,
[data-theme="default"] .author-graph-header h3,
[data-theme="obsidian"] .author-graph-header h3,
[data-theme="petrol-dark"] .author-graph-header h3,
[data-theme="alpine-night"] .author-graph-header h3,
[data-theme="default"] .legend-title,
[data-theme="obsidian"] .legend-title,
[data-theme="petrol-dark"] .legend-title,
[data-theme="alpine-night"] .legend-title {
  color: #ffffff;
}

/* --- DAY LIGHT MODES: Pure Black Titles --- */
[data-theme="glacier"] h1,
[data-theme="glacier"] h2,
[data-theme="glacier"] h3,
[data-theme="glacier"] h4,
[data-theme="glacier"] h5,
[data-theme="glacier"] h6,
[data-theme="glacier-day"] h1,
[data-theme="glacier-day"] h2,
[data-theme="glacier-day"] h3,
[data-theme="glacier-day"] h4,
[data-theme="glacier-day"] h5,
[data-theme="glacier-day"] h6,
[data-theme="azure-day"] h1,
[data-theme="azure-day"] h2,
[data-theme="azure-day"] h3,
[data-theme="azure-day"] h4,
[data-theme="azure-day"] h5,
[data-theme="azure-day"] h6,
[data-theme="alpine-azure"] h1,
[data-theme="alpine-azure"] h2,
[data-theme="alpine-azure"] h3,
[data-theme="alpine-azure"] h4,
[data-theme="alpine-azure"] h5,
[data-theme="alpine-azure"] h6,
[data-theme="glacier"] .brand-text h1,
[data-theme="glacier-day"] .brand-text h1,
[data-theme="azure-day"] .brand-text h1,
[data-theme="alpine-azure"] .brand-text h1,
[data-theme="glacier"] .studio-title,
[data-theme="glacier-day"] .studio-title,
[data-theme="azure-day"] .studio-title,
[data-theme="alpine-azure"] .studio-title,
[data-theme="glacier"] .studio-card-title,
[data-theme="glacier-day"] .studio-card-title,
[data-theme="azure-day"] .studio-card-title,
[data-theme="alpine-azure"] .studio-card-title,
[data-theme="glacier"] .universe-hero-title,
[data-theme="glacier-day"] .universe-hero-title,
[data-theme="azure-day"] .universe-hero-title,
[data-theme="alpine-azure"] .universe-hero-title,
[data-theme="glacier"] .dag-panel-title,
[data-theme="glacier-day"] .dag-panel-title,
[data-theme="azure-day"] .dag-panel-title,
[data-theme="alpine-azure"] .dag-panel-title,
[data-theme="glacier"] .dag-panel-header h3,
[data-theme="glacier-day"] .dag-panel-header h3,
[data-theme="azure-day"] .dag-panel-header h3,
[data-theme="alpine-azure"] .dag-panel-header h3,
[data-theme="glacier"] .inspector-header h3,
[data-theme="glacier-day"] .inspector-header h3,
[data-theme="azure-day"] .inspector-header h3,
[data-theme="alpine-azure"] .inspector-header h3,
[data-theme="glacier"] .inspector-title-group h4,
[data-theme="glacier-day"] .inspector-title-group h4,
[data-theme="azure-day"] .inspector-title-group h4,
[data-theme="alpine-azure"] .inspector-title-group h4,
[data-theme="glacier"] #kinship-inspector-name,
[data-theme="glacier-day"] #kinship-inspector-name,
[data-theme="azure-day"] #kinship-inspector-name,
[data-theme="alpine-azure"] #kinship-inspector-name,
[data-theme="glacier"] .statute-art-heading,
[data-theme="glacier-day"] .statute-art-heading,
[data-theme="azure-day"] .statute-art-heading,
[data-theme="alpine-azure"] .statute-art-heading,
[data-theme="glacier"] .author-graph-header h3,
[data-theme="glacier-day"] .author-graph-header h3,
[data-theme="azure-day"] .author-graph-header h3,
[data-theme="alpine-azure"] .author-graph-header h3,
[data-theme="glacier"] .ai-chat-header-bar h3,
[data-theme="glacier-day"] .ai-chat-header-bar h3,
[data-theme="azure-day"] .ai-chat-header-bar h3,
[data-theme="alpine-azure"] .ai-chat-header-bar h3,
[data-theme="glacier"] .card-title,
[data-theme="glacier-day"] .card-title,
[data-theme="azure-day"] .card-title,
[data-theme="alpine-azure"] .card-title,
[data-theme="glacier"] .panel-title,
[data-theme="glacier-day"] .panel-title,
[data-theme="azure-day"] .panel-title,
[data-theme="alpine-azure"] .panel-title,
[data-theme="glacier"] .section-title,
[data-theme="glacier-day"] .section-title,
[data-theme="azure-day"] .section-title,
[data-theme="alpine-azure"] .section-title,
[data-theme="glacier"] .legend-title,
[data-theme="glacier-day"] .legend-title,
[data-theme="azure-day"] .legend-title,
[data-theme="alpine-azure"] .legend-title {
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
}


/* ==========================================================================
   STATUTE INSPECTOR, PARAGRAPHS, LINKS SLIDER & SPIN BUTTON OVERRIDES
   Covers:
   - inspector-statute-container (.statute-card, .statute-para-item, etc.)
   - btn-statute-tool
   - statute-paragraphs-list
   - glsl-links-brightness-slider
   - btn-glsl-spin
   ========================================================================== */

/* --- ALPINE NIGHT (petrol-dark / alpine-night) --- */
[data-theme="petrol-dark"] .statute-card,
[data-theme="alpine-night"] .statute-card {
  background: linear-gradient(135deg, rgba(0, 36, 40, 0.95) 0%, rgba(0, 27, 31, 0.9) 100%);
  border: 1px solid rgba(255, 204, 0, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 204, 0, 0.1);
}

[data-theme="petrol-dark"] .statute-law-pill,
[data-theme="alpine-night"] .statute-law-pill {
  background: rgba(255, 204, 0, 0.15);
  color: #ffcc00;
  border-color: rgba(255, 204, 0, 0.4);
}

[data-theme="petrol-dark"] .statute-art-number,
[data-theme="alpine-night"] .statute-art-number {
  color: #ffcc00;
}

[data-theme="petrol-dark"] .statute-art-heading,
[data-theme="alpine-night"] .statute-art-heading {
  color: #ffffff;
}

[data-theme="petrol-dark"] .statute-topic-trail,
[data-theme="alpine-night"] .statute-topic-trail {
  background: rgba(0, 20, 23, 0.85);
  color: #a6d8d9;
  border-left-color: #ffcc00;
}

[data-theme="petrol-dark"] .statute-lang-bar,
[data-theme="alpine-night"] .statute-lang-bar {
  border-top-color: rgba(166, 216, 217, 0.18);
  border-bottom-color: rgba(166, 216, 217, 0.18);
}

[data-theme="petrol-dark"] .statute-lang-btn,
[data-theme="alpine-night"] .statute-lang-btn {
  background: rgba(0, 27, 31, 0.7);
  border-color: rgba(166, 216, 217, 0.2);
  color: #a6d8d9;
}

[data-theme="petrol-dark"] .statute-lang-btn:hover,
[data-theme="alpine-night"] .statute-lang-btn:hover {
  background: rgba(0, 75, 90, 0.4);
  color: #ffffff;
  border-color: #ffcc00;
}

[data-theme="petrol-dark"] .statute-lang-btn.active,
[data-theme="alpine-night"] .statute-lang-btn.active {
  background: rgba(255, 204, 0, 0.22);
  border-color: #ffcc00;
  color: #ffcc00;
  box-shadow: 0 0 10px rgba(255, 204, 0, 0.3);
}

[data-theme="petrol-dark"] .statute-paragraphs-list::-webkit-scrollbar-thumb,
[data-theme="alpine-night"] .statute-paragraphs-list::-webkit-scrollbar-thumb {
  background: rgba(255, 204, 0, 0.4);
}

[data-theme="petrol-dark"] .statute-para-item,
[data-theme="alpine-night"] .statute-para-item {
  background: rgba(0, 27, 31, 0.75);
  border: 1px solid rgba(166, 216, 217, 0.16);
}

[data-theme="petrol-dark"] .statute-para-item:hover,
[data-theme="alpine-night"] .statute-para-item:hover {
  background: rgba(0, 41, 46, 0.9);
  border-color: #ffcc00;
}

[data-theme="petrol-dark"] .statute-para-badge,
[data-theme="alpine-night"] .statute-para-badge {
  background: rgba(255, 204, 0, 0.16);
  border-color: rgba(255, 204, 0, 0.4);
  color: #ffcc00;
}

[data-theme="petrol-dark"] .statute-para-text,
[data-theme="alpine-night"] .statute-para-text {
  color: #eef6f6;
}

[data-theme="petrol-dark"] .btn-statute-tool,
[data-theme="alpine-night"] .btn-statute-tool {
  background: rgba(0, 27, 31, 0.85);
  border: 1px solid rgba(166, 216, 217, 0.22);
  color: #eef6f6;
}

[data-theme="petrol-dark"] .btn-statute-tool:hover,
[data-theme="alpine-night"] .btn-statute-tool:hover {
  background: rgba(255, 204, 0, 0.18);
  border-color: #ffcc00;
  color: #ffcc00;
}

[data-theme="petrol-dark"] #glsl-links-brightness-slider,
[data-theme="petrol-dark"] .slider-glsl-links,
[data-theme="alpine-night"] #glsl-links-brightness-slider,
[data-theme="alpine-night"] .slider-glsl-links {
  background: rgba(166, 216, 217, 0.22);
}

[data-theme="petrol-dark"] #glsl-links-brightness-slider:hover,
[data-theme="petrol-dark"] .slider-glsl-links:hover,
[data-theme="alpine-night"] #glsl-links-brightness-slider:hover,
[data-theme="alpine-night"] .slider-glsl-links:hover {
  background: rgba(166, 216, 217, 0.35);
}

[data-theme="petrol-dark"] #glsl-links-brightness-slider::-webkit-slider-thumb,
[data-theme="petrol-dark"] .slider-glsl-links::-webkit-slider-thumb,
[data-theme="alpine-night"] #glsl-links-brightness-slider::-webkit-slider-thumb,
[data-theme="alpine-night"] .slider-glsl-links::-webkit-slider-thumb {
  background: #ffcc00;
  box-shadow: 0 0 8px rgba(255, 204, 0, 0.6);
}

[data-theme="petrol-dark"] #btn-glsl-spin,
[data-theme="alpine-night"] #btn-glsl-spin {
  color: #a6d8d9;
}

[data-theme="petrol-dark"] #btn-glsl-spin:hover,
[data-theme="alpine-night"] #btn-glsl-spin:hover {
  background: rgba(0, 75, 90, 0.5);
  color: #ffffff;
  border-color: rgba(166, 216, 217, 0.35);
}

[data-theme="petrol-dark"] #btn-glsl-spin.active,
[data-theme="alpine-night"] #btn-glsl-spin.active {
  background: rgba(255, 204, 0, 0.2);
  color: #ffcc00;
  border-color: #ffcc00;
  box-shadow: 0 0 10px rgba(255, 204, 0, 0.3);
}


/* --- GLACIER MIST DAY (glacier / glacier-day) --- */
[data-theme="glacier"] .statute-card,
[data-theme="glacier-day"] .statute-card {
  background: #ffffff;
  border: 1px solid rgba(0, 75, 90, 0.2);
  box-shadow: 0 8px 24px rgba(0, 75, 90, 0.08);
}

[data-theme="glacier"] .statute-law-pill,
[data-theme="glacier-day"] .statute-law-pill {
  background: rgba(0, 75, 90, 0.1);
  color: #004b5a;
  border-color: rgba(0, 75, 90, 0.3);
}

[data-theme="glacier"] .statute-art-number,
[data-theme="glacier-day"] .statute-art-number {
  color: #004b5a;
}

[data-theme="glacier"] .statute-art-heading,
[data-theme="glacier-day"] .statute-art-heading {
  color: #000000 !important;
}

[data-theme="glacier"] .statute-topic-trail,
[data-theme="glacier-day"] .statute-topic-trail {
  background: #eef6f6;
  color: #004b5a;
  border-left-color: #004b5a;
}

[data-theme="glacier"] .statute-lang-bar,
[data-theme="glacier-day"] .statute-lang-bar {
  border-top-color: rgba(0, 75, 90, 0.15);
  border-bottom-color: rgba(0, 75, 90, 0.15);
}

[data-theme="glacier"] .statute-lang-btn,
[data-theme="glacier-day"] .statute-lang-btn {
  background: #eef6f6;
  border-color: rgba(0, 75, 90, 0.18);
  color: #004b5a;
}

[data-theme="glacier"] .statute-lang-btn:hover,
[data-theme="glacier-day"] .statute-lang-btn:hover {
  background: #d6ebeb;
  color: #001b1f;
  border-color: #004b5a;
}

[data-theme="glacier"] .statute-lang-btn.active,
[data-theme="glacier-day"] .statute-lang-btn.active {
  background: #004b5a;
  border-color: #004b5a;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 75, 90, 0.2);
}

[data-theme="glacier"] .statute-paragraphs-list::-webkit-scrollbar-thumb,
[data-theme="glacier-day"] .statute-paragraphs-list::-webkit-scrollbar-thumb {
  background: rgba(0, 75, 90, 0.35);
}

[data-theme="glacier"] .statute-para-item,
[data-theme="glacier-day"] .statute-para-item {
  background: #eef6f6;
  border: 1px solid rgba(0, 75, 90, 0.14);
}

[data-theme="glacier"] .statute-para-item:hover,
[data-theme="glacier-day"] .statute-para-item:hover {
  background: #e2f0f0;
  border-color: #004b5a;
}

[data-theme="glacier"] .statute-para-badge,
[data-theme="glacier-day"] .statute-para-badge {
  background: rgba(0, 75, 90, 0.12);
  border-color: rgba(0, 75, 90, 0.28);
  color: #004b5a;
}

[data-theme="glacier"] .statute-para-text,
[data-theme="glacier-day"] .statute-para-text {
  color: #001b1f;
}

[data-theme="glacier"] .btn-statute-tool,
[data-theme="glacier-day"] .btn-statute-tool {
  background: #eef6f6;
  border: 1px solid rgba(0, 75, 90, 0.2);
  color: #004b5a;
}

[data-theme="glacier"] .btn-statute-tool:hover,
[data-theme="glacier-day"] .btn-statute-tool:hover {
  background: #004b5a;
  border-color: #004b5a;
  color: #ffffff;
}

[data-theme="glacier"] #glsl-links-brightness-slider,
[data-theme="glacier"] .slider-glsl-links,
[data-theme="glacier-day"] #glsl-links-brightness-slider,
[data-theme="glacier-day"] .slider-glsl-links {
  background: rgba(0, 75, 90, 0.2);
}

[data-theme="glacier"] #glsl-links-brightness-slider:hover,
[data-theme="glacier"] .slider-glsl-links:hover,
[data-theme="glacier-day"] #glsl-links-brightness-slider:hover,
[data-theme="glacier-day"] .slider-glsl-links:hover {
  background: rgba(0, 75, 90, 0.3);
}

[data-theme="glacier"] #glsl-links-brightness-slider::-webkit-slider-thumb,
[data-theme="glacier"] .slider-glsl-links::-webkit-slider-thumb,
[data-theme="glacier-day"] #glsl-links-brightness-slider::-webkit-slider-thumb,
[data-theme="glacier-day"] .slider-glsl-links::-webkit-slider-thumb {
  background: #004b5a;
  box-shadow: 0 0 6px rgba(0, 75, 90, 0.4);
}

[data-theme="glacier"] #btn-glsl-spin,
[data-theme="glacier-day"] #btn-glsl-spin {
  color: #004b5a;
}

[data-theme="glacier"] #btn-glsl-spin:hover,
[data-theme="glacier-day"] #btn-glsl-spin:hover {
  background: rgba(0, 75, 90, 0.1);
  color: #001b1f;
  border-color: rgba(0, 75, 90, 0.25);
}

[data-theme="glacier"] #btn-glsl-spin.active,
[data-theme="glacier-day"] #btn-glsl-spin.active {
  background: #004b5a;
  color: #ffffff;
  border-color: #004b5a;
  box-shadow: 0 2px 8px rgba(0, 75, 90, 0.2);
}


/* --- ALPINE AZURE DAY (azure-day / alpine-azure) --- */
[data-theme="azure-day"] .statute-card,
[data-theme="alpine-azure"] .statute-card {
  background: #ffffff;
  border: 1px solid rgba(32, 74, 119, 0.2);
  box-shadow: 0 8px 24px rgba(0, 133, 202, 0.08);
}

[data-theme="azure-day"] .statute-law-pill,
[data-theme="alpine-azure"] .statute-law-pill {
  background: rgba(0, 133, 202, 0.1);
  color: #0085ca;
  border-color: rgba(0, 133, 202, 0.3);
}

[data-theme="azure-day"] .statute-art-number,
[data-theme="alpine-azure"] .statute-art-number {
  color: #0085ca;
}

[data-theme="azure-day"] .statute-art-heading,
[data-theme="alpine-azure"] .statute-art-heading {
  color: #000000 !important;
}

[data-theme="azure-day"] .statute-topic-trail,
[data-theme="alpine-azure"] .statute-topic-trail {
  background: #f5f7fa;
  color: #204a77;
  border-left-color: #0085ca;
}

[data-theme="azure-day"] .statute-lang-bar,
[data-theme="alpine-azure"] .statute-lang-bar {
  border-top-color: rgba(32, 74, 119, 0.15);
  border-bottom-color: rgba(32, 74, 119, 0.15);
}

[data-theme="azure-day"] .statute-lang-btn,
[data-theme="alpine-azure"] .statute-lang-btn {
  background: #edeeee;
  border-color: rgba(32, 74, 119, 0.18);
  color: #4c575a;
}

[data-theme="azure-day"] .statute-lang-btn:hover,
[data-theme="alpine-azure"] .statute-lang-btn:hover {
  background: #e2e8f0;
  color: #204a77;
  border-color: #0085ca;
}

[data-theme="azure-day"] .statute-lang-btn.active,
[data-theme="alpine-azure"] .statute-lang-btn.active {
  background: #0085ca;
  border-color: #0085ca;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 133, 202, 0.22);
}

[data-theme="azure-day"] .statute-paragraphs-list::-webkit-scrollbar-thumb,
[data-theme="alpine-azure"] .statute-paragraphs-list::-webkit-scrollbar-thumb {
  background: rgba(0, 133, 202, 0.35);
}

[data-theme="azure-day"] .statute-para-item,
[data-theme="alpine-azure"] .statute-para-item {
  background: #f5f7fa;
  border: 1px solid rgba(32, 74, 119, 0.14);
}

[data-theme="azure-day"] .statute-para-item:hover,
[data-theme="alpine-azure"] .statute-para-item:hover {
  background: #edeeee;
  border-color: #0085ca;
}

[data-theme="azure-day"] .statute-para-badge,
[data-theme="alpine-azure"] .statute-para-badge {
  background: rgba(0, 133, 202, 0.12);
  border-color: rgba(0, 133, 202, 0.28);
  color: #0085ca;
}

[data-theme="azure-day"] .statute-para-text,
[data-theme="alpine-azure"] .statute-para-text {
  color: #204a77;
}

[data-theme="azure-day"] .btn-statute-tool,
[data-theme="alpine-azure"] .btn-statute-tool {
  background: #edeeee;
  border: 1px solid rgba(32, 74, 119, 0.2);
  color: #204a77;
}

[data-theme="azure-day"] .btn-statute-tool:hover,
[data-theme="alpine-azure"] .btn-statute-tool:hover {
  background: #0085ca;
  border-color: #0085ca;
  color: #ffffff;
}

[data-theme="azure-day"] #glsl-links-brightness-slider,
[data-theme="azure-day"] .slider-glsl-links,
[data-theme="alpine-azure"] #glsl-links-brightness-slider,
[data-theme="alpine-azure"] .slider-glsl-links {
  background: rgba(32, 74, 119, 0.18);
}

[data-theme="azure-day"] #glsl-links-brightness-slider:hover,
[data-theme="azure-day"] .slider-glsl-links:hover,
[data-theme="alpine-azure"] #glsl-links-brightness-slider:hover,
[data-theme="alpine-azure"] .slider-glsl-links:hover {
  background: rgba(32, 74, 119, 0.28);
}

[data-theme="azure-day"] #glsl-links-brightness-slider::-webkit-slider-thumb,
[data-theme="azure-day"] .slider-glsl-links::-webkit-slider-thumb,
[data-theme="alpine-azure"] #glsl-links-brightness-slider::-webkit-slider-thumb,
[data-theme="alpine-azure"] .slider-glsl-links::-webkit-slider-thumb {
  background: #0085ca;
  box-shadow: 0 0 6px rgba(0, 133, 202, 0.45);
}

[data-theme="azure-day"] #btn-glsl-spin,
[data-theme="alpine-azure"] #btn-glsl-spin {
  color: #4c575a;
}

[data-theme="azure-day"] #btn-glsl-spin:hover,
[data-theme="alpine-azure"] #btn-glsl-spin:hover {
  background: rgba(0, 133, 202, 0.1);
  color: #204a77;
  border-color: rgba(32, 74, 119, 0.25);
}

[data-theme="azure-day"] #btn-glsl-spin.active,
[data-theme="alpine-azure"] #btn-glsl-spin.active {
  background: #0085ca;
  color: #ffffff;
  border-color: #0085ca;
  box-shadow: 0 2px 8px rgba(0, 133, 202, 0.22);
}


/* ==========================================================================
   AXES-LEGEND-OVERLAY HIGH-CONTRAST TYPOGRAPHY & SUB-COMPONENTS
   Guarantees NO white/light fonts on white or light-grey backgrounds in Day modes.
   All names, descriptions, fractions, PCA metrics, and badges are made dark & sharp.
   ========================================================================== */

/* --- DAY MODES (glacier & azure-day) --- */
[data-theme="glacier"] .axes-legend-overlay,
[data-theme="glacier-day"] .axes-legend-overlay,
[data-theme="azure-day"] .axes-legend-overlay,
[data-theme="alpine-azure"] .axes-legend-overlay {
  color: #0f172a !important;
}

[data-theme="glacier"] .axes-legend-overlay .legend-title,
[data-theme="glacier-day"] .axes-legend-overlay .legend-title,
[data-theme="azure-day"] .axes-legend-overlay .legend-title,
[data-theme="alpine-azure"] .axes-legend-overlay .legend-title {
  color: #000000 !important;
  font-weight: 700;
}

[data-theme="glacier"] .axes-legend-overlay .btn-legend-collapse,
[data-theme="glacier-day"] .axes-legend-overlay .btn-legend-collapse,
[data-theme="azure-day"] .axes-legend-overlay .btn-legend-collapse,
[data-theme="alpine-azure"] .axes-legend-overlay .btn-legend-collapse {
  color: #475569 !important;
}

[data-theme="glacier"] .axes-legend-overlay .btn-legend-collapse:hover,
[data-theme="glacier-day"] .axes-legend-overlay .btn-legend-collapse:hover,
[data-theme="azure-day"] .axes-legend-overlay .btn-legend-collapse:hover,
[data-theme="alpine-azure"] .axes-legend-overlay .btn-legend-collapse:hover {
  color: #000000 !important;
}

[data-theme="glacier"] .axes-legend-overlay .axis-name,
[data-theme="glacier-day"] .axes-legend-overlay .axis-name,
[data-theme="azure-day"] .axes-legend-overlay .axis-name,
[data-theme="alpine-azure"] .axes-legend-overlay .axis-name {
  color: #0f172a !important;
  font-weight: 600;
}

[data-theme="glacier"] .axes-legend-overlay .axis-pca,
[data-theme="glacier-day"] .axes-legend-overlay .axis-pca,
[data-theme="azure-day"] .axes-legend-overlay .axis-pca,
[data-theme="alpine-azure"] .axes-legend-overlay .axis-pca {
  color: #475569 !important;
  font-weight: 500;
}

[data-theme="glacier"] .axes-legend-overlay .legend-divider,
[data-theme="glacier-day"] .axes-legend-overlay .legend-divider,
[data-theme="azure-day"] .axes-legend-overlay .legend-divider,
[data-theme="alpine-azure"] .axes-legend-overlay .legend-divider {
  background: rgba(0, 0, 0, 0.12) !important;
}

[data-theme="glacier"] .axes-legend-overlay .cluster-legend-title,
[data-theme="glacier-day"] .axes-legend-overlay .cluster-legend-title,
[data-theme="azure-day"] .axes-legend-overlay .cluster-legend-title,
[data-theme="alpine-azure"] .axes-legend-overlay .cluster-legend-title {
  color: #0f172a !important;
  font-weight: 700;
}

[data-theme="glacier"] .axes-legend-overlay .cluster-legend-quota-pill,
[data-theme="glacier-day"] .axes-legend-overlay .cluster-legend-quota-pill,
[data-theme="azure-day"] .axes-legend-overlay .cluster-legend-quota-pill,
[data-theme="alpine-azure"] .axes-legend-overlay .cluster-legend-quota-pill {
  color: #0f172a !important;
  background: #e2e8f0 !important;
  border-color: #cbd5e1 !important;
}

[data-theme="glacier"] .axes-legend-overlay .cluster-item,
[data-theme="glacier-day"] .axes-legend-overlay .cluster-item,
[data-theme="azure-day"] .axes-legend-overlay .cluster-item,
[data-theme="alpine-azure"] .axes-legend-overlay .cluster-item {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

[data-theme="glacier"] .axes-legend-overlay .cluster-item:hover,
[data-theme="glacier-day"] .axes-legend-overlay .cluster-item:hover,
[data-theme="azure-day"] .axes-legend-overlay .cluster-item:hover,
[data-theme="alpine-azure"] .axes-legend-overlay .cluster-item:hover {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}

[data-theme="glacier"] .axes-legend-overlay .cluster-name,
[data-theme="glacier-day"] .axes-legend-overlay .cluster-name,
[data-theme="azure-day"] .axes-legend-overlay .cluster-name,
[data-theme="alpine-azure"] .axes-legend-overlay .cluster-name {
  color: #0f172a !important;
  font-weight: 600;
}

[data-theme="glacier"] .axes-legend-overlay .cluster-desc,
[data-theme="glacier-day"] .axes-legend-overlay .cluster-desc,
[data-theme="azure-day"] .axes-legend-overlay .cluster-desc,
[data-theme="alpine-azure"] .axes-legend-overlay .cluster-desc {
  color: #475569 !important;
}

[data-theme="glacier"] .axes-legend-overlay .cluster-fraction,
[data-theme="glacier-day"] .axes-legend-overlay .cluster-fraction,
[data-theme="azure-day"] .axes-legend-overlay .cluster-fraction,
[data-theme="alpine-azure"] .axes-legend-overlay .cluster-fraction {
  color: #0f172a !important;
}

[data-theme="glacier"] .axes-legend-overlay .cluster-rendered,
[data-theme="glacier-day"] .axes-legend-overlay .cluster-rendered,
[data-theme="azure-day"] .axes-legend-overlay .cluster-rendered,
[data-theme="alpine-azure"] .axes-legend-overlay .cluster-rendered {
  color: #000000 !important;
  font-weight: 700;
}

[data-theme="glacier"] .axes-legend-overlay .cluster-db-total,
[data-theme="glacier-day"] .axes-legend-overlay .cluster-db-total,
[data-theme="azure-day"] .axes-legend-overlay .cluster-db-total,
[data-theme="alpine-azure"] .axes-legend-overlay .cluster-db-total {
  color: #64748b !important;
}

[data-theme="glacier"] .axes-legend-overlay .cluster-macro-summary,
[data-theme="glacier-day"] .axes-legend-overlay .cluster-macro-summary,
[data-theme="azure-day"] .axes-legend-overlay .cluster-macro-summary,
[data-theme="alpine-azure"] .axes-legend-overlay .cluster-macro-summary {
  background: #f1f5f9 !important;
  border: 1px dashed #cbd5e1 !important;
}

[data-theme="glacier"] .axes-legend-overlay .cluster-macro-summary strong,
[data-theme="glacier-day"] .axes-legend-overlay .cluster-macro-summary strong,
[data-theme="azure-day"] .axes-legend-overlay .cluster-macro-summary strong,
[data-theme="alpine-azure"] .axes-legend-overlay .cluster-macro-summary strong {
  color: #000000 !important;
}

[data-theme="glacier"] .axes-legend-overlay .macro-badge,
[data-theme="glacier-day"] .axes-legend-overlay .macro-badge,
[data-theme="azure-day"] .axes-legend-overlay .macro-badge,
[data-theme="alpine-azure"] .axes-legend-overlay .macro-badge {
  color: #0f172a !important;
  background: #e2e8f0 !important;
  border: 1px solid #cbd5e1 !important;
}

[data-theme="glacier"] .axes-legend-overlay .macro-text,
[data-theme="glacier-day"] .axes-legend-overlay .macro-text,
[data-theme="azure-day"] .axes-legend-overlay .macro-text,
[data-theme="alpine-azure"] .axes-legend-overlay .macro-text {
  color: #334155 !important;
}

[data-theme="glacier"] .axes-legend-overlay .macro-pct,
[data-theme="glacier-day"] .axes-legend-overlay .macro-pct,
[data-theme="azure-day"] .axes-legend-overlay .macro-pct,
[data-theme="alpine-azure"] .axes-legend-overlay .macro-pct {
  color: #000000 !important;
  font-weight: 700;
}

[data-theme="glacier"] .axes-legend-overlay .legend-footer-tip,
[data-theme="glacier-day"] .axes-legend-overlay .legend-footer-tip,
[data-theme="azure-day"] .axes-legend-overlay .legend-footer-tip,
[data-theme="alpine-azure"] .axes-legend-overlay .legend-footer-tip {
  color: #475569 !important;
}

[data-theme="glacier"] .axes-legend-overlay .legend-footer-tip strong,
[data-theme="glacier-day"] .axes-legend-overlay .legend-footer-tip strong,
[data-theme="azure-day"] .axes-legend-overlay .legend-footer-tip strong,
[data-theme="alpine-azure"] .axes-legend-overlay .legend-footer-tip strong {
  color: #000000 !important;
}

[data-theme="glacier"] .axes-legend-overlay .universe-cluster-entity-pill,
[data-theme="glacier-day"] .axes-legend-overlay .universe-cluster-entity-pill,
[data-theme="azure-day"] .axes-legend-overlay .universe-cluster-entity-pill,
[data-theme="alpine-azure"] .axes-legend-overlay .universe-cluster-entity-pill {
  background: #f8fafc !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

[data-theme="glacier"] .axes-legend-overlay .universe-cluster-entity-pill:hover,
[data-theme="glacier-day"] .axes-legend-overlay .universe-cluster-entity-pill:hover,
[data-theme="azure-day"] .axes-legend-overlay .universe-cluster-entity-pill:hover,
[data-theme="alpine-azure"] .axes-legend-overlay .universe-cluster-entity-pill:hover {
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
}

/* --- ALPINE NIGHT (petrol-dark / alpine-night) --- */
[data-theme="petrol-dark"] .axes-legend-overlay,
[data-theme="alpine-night"] .axes-legend-overlay {
  background: rgba(0, 36, 40, 0.96) !important;
  border-color: rgba(166, 216, 217, 0.28) !important;
  color: #eef6f6 !important;
}

[data-theme="petrol-dark"] .axes-legend-overlay .axis-name,
[data-theme="alpine-night"] .axes-legend-overlay .axis-name {
  color: #eef6f6 !important;
}

[data-theme="petrol-dark"] .axes-legend-overlay .axis-pca,
[data-theme="alpine-night"] .axes-legend-overlay .axis-pca {
  color: #a6d8d9 !important;
}

[data-theme="petrol-dark"] .axes-legend-overlay .cluster-name,
[data-theme="alpine-night"] .axes-legend-overlay .cluster-name {
  color: #eef6f6 !important;
}

[data-theme="petrol-dark"] .axes-legend-overlay .cluster-desc,
[data-theme="alpine-night"] .axes-legend-overlay .cluster-desc {
  color: #a6d8d9 !important;
}

[data-theme="petrol-dark"] .axes-legend-overlay .cluster-rendered,
[data-theme="alpine-night"] .axes-legend-overlay .cluster-rendered {
  color: #ffffff !important;
}

[data-theme="petrol-dark"] .axes-legend-overlay .cluster-db-total,
[data-theme="alpine-night"] .axes-legend-overlay .cluster-db-total {
  color: #70bfc2 !important;
}

[data-theme="petrol-dark"] .axes-legend-overlay .macro-pct,
[data-theme="alpine-night"] .axes-legend-overlay .macro-pct {
  color: #ffcc00 !important;
}

[data-theme="petrol-dark"] .axes-legend-overlay .macro-text,
[data-theme="alpine-night"] .axes-legend-overlay .macro-text {
  color: #a6d8d9 !important;
}

[data-theme="petrol-dark"] .axes-legend-overlay .legend-footer-tip,
[data-theme="alpine-night"] .axes-legend-overlay .legend-footer-tip {
  color: #a6d8d9 !important;
}

[data-theme="petrol-dark"] .axes-legend-overlay .legend-footer-tip strong,
[data-theme="alpine-night"] .axes-legend-overlay .legend-footer-tip strong {
  color: #ffcc00 !important;
}


/* ==========================================================================
   UNIVERSE DEMO PILL THEME STYLING
   ========================================================================== */
[data-theme="petrol-dark"] .universe-demo-pill,
[data-theme="alpine-night"] .universe-demo-pill {
  background: rgba(0, 36, 40, 0.92);
  border: 1px solid rgba(255, 204, 0, 0.4);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6), 0 0 12px rgba(255, 204, 0, 0.2);
  color: #eef6f6;
}

[data-theme="petrol-dark"] .universe-demo-pill .demo-tag,
[data-theme="alpine-night"] .universe-demo-pill .demo-tag {
  background: #ffcc00;
  color: #001b1f;
}

[data-theme="petrol-dark"] .universe-demo-pill .demo-caption,
[data-theme="alpine-night"] .universe-demo-pill .demo-caption {
  color: #eef6f6;
}

[data-theme="petrol-dark"] .universe-demo-pill .demo-caption .macro-pct,
[data-theme="alpine-night"] .universe-demo-pill .demo-caption .macro-pct {
  color: #ffcc00;
}

[data-theme="glacier"] .universe-demo-pill,
[data-theme="glacier-day"] .universe-demo-pill {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 75, 90, 0.25);
  box-shadow: 0 4px 18px rgba(0, 75, 90, 0.12);
  color: #001b1f;
}

[data-theme="glacier"] .universe-demo-pill .demo-tag,
[data-theme="glacier-day"] .universe-demo-pill .demo-tag {
  background: #004b5a;
  color: #ffffff;
  box-shadow: 0 0 6px rgba(0, 75, 90, 0.3);
}

[data-theme="glacier"] .universe-demo-pill .demo-caption,
[data-theme="glacier-day"] .universe-demo-pill .demo-caption {
  color: #001b1f;
}

[data-theme="glacier"] .universe-demo-pill .demo-caption .macro-pct,
[data-theme="glacier-day"] .universe-demo-pill .demo-caption .macro-pct {
  color: #004b5a;
  font-weight: 700;
}

[data-theme="azure-day"] .universe-demo-pill,
[data-theme="alpine-azure"] .universe-demo-pill {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 133, 202, 0.3);
  box-shadow: 0 4px 18px rgba(0, 133, 202, 0.12);
  color: #204a77;
}

[data-theme="azure-day"] .universe-demo-pill .demo-tag,
[data-theme="alpine-azure"] .universe-demo-pill .demo-tag {
  background: #0085ca;
  color: #ffffff;
  box-shadow: 0 0 6px rgba(0, 133, 202, 0.35);
}

[data-theme="azure-day"] .universe-demo-pill .demo-caption,
[data-theme="alpine-azure"] .universe-demo-pill .demo-caption {
  color: #204a77;
}

[data-theme="azure-day"] .universe-demo-pill .demo-caption .macro-pct,
[data-theme="alpine-azure"] .universe-demo-pill .demo-caption .macro-pct {
  color: #0085ca;
  font-weight: 700;
}


/* --------------------------------------------------------------------------
   THEME SELECTOR DROPDOWN UI COMPONENT
   -------------------------------------------------------------------------- */
.theme-dropdown-container {
  position: relative;
  display: inline-block;
  user-select: none;
}

.theme-btn-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  transition: all 0.18s ease;
  line-height: 1.2;
}

.theme-btn-toggle .theme-icon {
  font-size: 0.88rem;
  line-height: 1;
}

.theme-btn-toggle .theme-chevron {
  font-size: 0.65rem;
  opacity: 0.7;
  transition: transform 0.2s ease;
}

.theme-dropdown-container.open .theme-chevron {
  transform: rotate(180deg);
}

.theme-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 260px;
  background: var(--bg-surface-elevated, #162035);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.12));
  border-radius: var(--radius-md, 10px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45), 0 0 1px rgba(255, 255, 255, 0.1);
  padding: 0.4rem;
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  z-index: 1000;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: themeMenuIn 0.15s ease-out;
}

@keyframes themeMenuIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.theme-dropdown-container.open .theme-dropdown-menu {
  display: flex;
}

.theme-menu-header {
  padding: 0.35rem 0.5rem 0.35rem 0.5rem;
  border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  margin-bottom: 0.2rem;
}

.theme-menu-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--text-muted, #94a3b8);
}

.theme-menu-subtitle {
  font-size: 0.68rem;
  color: var(--text-faint, #64748b);
  margin-top: 0.1rem;
}

.theme-option-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  transition: all 0.15s ease;
  color: var(--text-main, #f1f5f9);
}

.theme-option-item:hover {
  background: var(--bg-hover, rgba(255, 255, 255, 0.08));
}

.theme-option-item.active {
  background: rgba(99, 102, 241, 0.15);
  outline: 1px solid var(--accent-primary, #6366f1);
}

[data-theme="petrol-dark"] .theme-option-item.active,
[data-theme="alpine-night"] .theme-option-item.active {
  background: rgba(255, 204, 0, 0.15);
  outline-color: #ffcc00;
}

[data-theme="glacier"] .theme-option-item.active,
[data-theme="glacier-day"] .theme-option-item.active {
  background: rgba(0, 75, 90, 0.1);
  outline-color: #004b5a;
}

[data-theme="azure-day"] .theme-option-item.active,
[data-theme="alpine-azure"] .theme-option-item.active {
  background: rgba(0, 133, 202, 0.12);
  outline-color: #0085ca;
}

.theme-option-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.theme-option-icon {
  font-size: 1rem;
  line-height: 1;
}

.theme-option-texts {
  display: flex;
  flex-direction: column;
}

.theme-option-name {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
}

.theme-option-desc {
  font-size: 0.66rem;
  color: var(--text-faint, #64748b);
  line-height: 1.1;
  margin-top: 0.1rem;
}

.theme-option-swatches {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.theme-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.2);
}


/* ==========================================================================
   THEME: Authentic Tecan Global (Red-Orange, Digital Blue, Charcoal & White)
   Directly extracted from Tecan-Dec2015-style.css
   ========================================================================== */


/* Ensure Tecan day headings match the high contrast black title rule */
[data-theme="tecan"] h1,
[data-theme="tecan"] h2,
[data-theme="tecan"] h3,
[data-theme="tecan"] h4,
[data-theme="tecan"] h5,
[data-theme="tecan"] h6,
[data-theme="tecan-day"] h1,
[data-theme="tecan-day"] h2,
[data-theme="tecan-day"] h3,
[data-theme="tecan-day"] h4,
[data-theme="tecan-day"] h5,
[data-theme="tecan-day"] h6,
[data-theme="tecan"] .brand-text h1,
[data-theme="tecan-day"] .brand-text h1,
[data-theme="tecan"] .studio-title,
[data-theme="tecan-day"] .studio-title,
[data-theme="tecan"] .studio-card-title,
[data-theme="tecan-day"] .studio-card-title,
[data-theme="tecan"] .dag-panel-title,
[data-theme="tecan-day"] .dag-panel-title,
[data-theme="tecan"] .inspector-header h3,
[data-theme="tecan-day"] .inspector-header h3,
[data-theme="tecan"] .demo-caption,
.glass-panel,
.dag-stepper,
.universe-hero-bar,
.universe-hero-left,
.legend-title,
.axis-name,
.cluster-name,
[data-theme="tecan-day"] .demo-caption,
.glass-panel,
.dag-stepper,
.universe-hero-bar,
.universe-hero-left,
.legend-title,
.axis-name,
.cluster-name,
[data-theme="tecan"] #kinship-inspector-name,
[data-theme="tecan-day"] #kinship-inspector-name {
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
}

/* ==========================================================================
   THEME: Tecan Day (Aligned with Alpine-day Architecture)
   Adapted for contracted cards, sharp input forms, and crisp slate typography
   with signature Tecan red-orange & digital blue highlights.
   ========================================================================== */
/* --------------------------------------------------------------------------
   Tecan Day (Clean White & Slate with Signature Red-Orange & Digital Blue)
   -------------------------------------------------------------------------- */
[data-theme="tecan"],
[data-theme="tecan-day"] {
  --theme-id: "tecan";
  --bg-base: #f5f7fa;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #edeeee;
  --bg-hover: #e2e8f0;
  --border-color: rgba(32, 74, 119, 0.16);
  --border-focus: #00acff;

  --text-main: #204a77;
  --text-muted: #5c5f5f;
  --text-faint: #7f8789;

  --accent-primary: #00acff;
  /* Tecan Digital Blue */
  --accent-primary-hover: #008df1;
  --accent-cyan: #00acff;
  --accent-emerald: #10b981;
  --accent-amber: #e84e0e;
  /* Tecan Signature Red-Orange */
  --accent-rose: #e84e0b;

  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

[data-theme="tecan"] body,
[data-theme="tecan-day"] body {
  background-color: #f5f7fa;
  color: #204a77;
}

/* Navbar */
[data-theme="tecan"] .navbar,
.diag-floating-pill,
[data-theme="tecan-day"] .navbar,
.diag-floating-pill {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 2px solid #e84e0e;
  box-shadow: 0 2px 10px rgba(0, 172, 255, 0.08);
}

[data-theme="tecan"] .brand-text h1,
[data-theme="tecan-day"] .brand-text h1 {
  background: linear-gradient(to right, #111111, #204a77);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  letter-spacing: -0.01em;
  display: inline-block;
}

[data-theme="tecan"] .brand-text h1::after,
[data-theme="tecan-day"] .brand-text h1::after {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  background-color: #e84e0e;
  border-radius: 50%;
  margin-left: 5px;
  vertical-align: baseline;
}

[data-theme="tecan"] .alcoa-badge,
[data-theme="tecan-day"] .alcoa-badge {
  background: rgba(232, 78, 14, 0.08);
  color: #e84e0e;
  border: 1px solid rgba(232, 78, 14, 0.28);
}

[data-theme="tecan"] .logo-icon,
[data-theme="tecan-day"] .logo-icon {
  background: linear-gradient(135deg, #00acff, #e84e0e);
  color: #ffffff;
}

/* Contracted Cards & Containers (matches Alpine-day .metric-card, .admin-card, etc.) */
[data-theme="tecan"] .metric-card,
[data-theme="tecan"] .kb-card,
[data-theme="tecan"] .admin-card,
[data-theme="tecan"] .dropzone,
[data-theme="tecan"] .panel-container,
[data-theme="tecan"] .ledger-container,
[data-theme="tecan"] .kinship-container,
[data-theme="tecan"] .fact-card,
[data-theme="tecan"] .studio-card,
[data-theme="tecan"] .dag-panel,
[data-theme="tecan"] .field-review-studio,
[data-theme="tecan"] .evidence-inspector {
  background: #ffffff;
  border: 1px solid rgba(32, 74, 119, 0.16);
  box-shadow: 0 4px 16px rgba(0, 172, 255, 0.06);
}

/* Ledger & Tables */
[data-theme="tecan"] .ledger-table th,
[data-theme="tecan-day"] .ledger-table th,
[data-theme="tecan"] .field-table th,
[data-theme="tecan"] .dag-qa-table th {
  background: #edeeee;
  color: #204a77;
  border-bottom: 2px solid #00acff;
}

[data-theme="tecan"] .ledger-table tbody tr:hover,
[data-theme="tecan-day"] .ledger-table tbody tr:hover,
[data-theme="tecan"] .field-table tr:hover,
[data-theme="tecan"] .dag-qa-table tr:hover {
  background: rgba(0, 172, 255, 0.05);
}

[data-theme="tecan"] .ledger-table td,
[data-theme="tecan"] .field-table td,
[data-theme="tecan"] .dag-qa-table td {
  border-bottom: 1px solid rgba(32, 74, 119, 0.08);
  color: #204a77;
}

/* Buttons */
[data-theme="tecan"] .btn-primary,
[data-theme="tecan-day"] .btn-primary {
  background: #00acff;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 172, 255, 0.28);
}

[data-theme="tecan"] .btn-primary:hover,
[data-theme="tecan-day"] .btn-primary:hover {
  background: #e84e0b !important;
  box-shadow: 0 2px 10px rgba(232, 78, 11, 0.35);
}

[data-theme="tecan"] .btn-outline,
[data-theme="tecan-day"] .btn-outline {
  background: #ffffff;
  color: #204a77;
  border: 1px solid rgba(32, 74, 119, 0.22);
}

[data-theme="tecan"] .btn-outline:hover,
[data-theme="tecan-day"] .btn-outline:hover {
  background: #edeeee;
  color: #e84e0e;
  border-color: #e84e0e;
}

/* Input Forms & Select Elements */
[data-theme="tecan"] input,
[data-theme="tecan"] select,
[data-theme="tecan"] textarea,
[data-theme="tecan"] .filter-controls input,
[data-theme="tecan"] .filter-controls select,
[data-theme="tecan"] #chat-input,
[data-theme="tecan"] #studio-rag-input,
[data-theme="tecan"] .studio-search-input-wrap input,
[data-theme="tecan"] .universe-search-wrap input,
[data-theme="tecan"] .universe-query-filter-wrap input,
[data-theme="tecan"] .wb-form-select,
[data-theme="tecan"] #diag-search-input {
  background: #ffffff !important;
  border: 1.5px solid rgba(32, 74, 119, 0.24) !important;
  color: #204a77 !important;
}

[data-theme="tecan"] input:focus,
[data-theme="tecan"] select:focus,
[data-theme="tecan"] textarea:focus,
[data-theme="tecan"] #chat-input:focus,
[data-theme="tecan"] #studio-rag-input:focus,
[data-theme="tecan"] .studio-search-input-wrap input:focus,
[data-theme="tecan"] .universe-search-wrap input:focus,
[data-theme="tecan"] .universe-query-filter-wrap input:focus,
[data-theme="tecan"] .wb-form-select:focus,
[data-theme="tecan"] #diag-search-input:focus {
  border-color: #00acff !important;
  box-shadow: 0 0 10px rgba(0, 172, 255, 0.25) !important;
}

/* Workspace Navigation Bar & Tabs */
[data-theme="tecan"] .workspace-nav-bar,
[data-theme="tecan-day"] .workspace-nav-bar {
  background: rgba(237, 238, 238, 0.96);
  border-bottom: 1px solid rgba(32, 74, 119, 0.15);
}

[data-theme="tecan"] .workspace-tabs-group,
[data-theme="tecan-day"] .workspace-tabs-group {
  background: #ffffff;
  border: 1px solid rgba(32, 74, 119, 0.15);
  box-shadow: 0 2px 6px rgba(0, 172, 255, 0.05);
}

[data-theme="tecan"] .ws-tab-btn,
[data-theme="tecan-day"] .ws-tab-btn {
  color: #4c575a;
}

[data-theme="tecan"] .ws-tab-btn:hover,
[data-theme="tecan-day"] .ws-tab-btn:hover {
  background: rgba(0, 172, 255, 0.08);
  color: #204a77;
}

[data-theme="tecan"] .ws-tab-btn.active,
[data-theme="tecan-day"] .ws-tab-btn.active {
  background: #ffffff;
  color: #e84e0e;
  border-bottom: 3px solid #e84e0e;
  box-shadow: 0 2px 8px rgba(232, 78, 14, 0.12);
}

[data-theme="tecan"] .ws-tab-pill,
[data-theme="tecan-day"] .ws-tab-pill {
  background: rgba(0, 172, 255, 0.1);
  color: #00acff;
}

[data-theme="tecan"] .ws-tab-btn.active .ws-tab-pill,
[data-theme="tecan-day"] .ws-tab-btn.active .ws-tab-pill {
  background: #e84e0e;
  color: #ffffff;
  border-color: #e84e0e;
}

/* 3D Knowledge Universe Viewport & Toolbars */
[data-theme="tecan"] .universe-canvas-wrapper,
[data-theme="tecan-day"] .universe-canvas-wrapper {
  background: radial-gradient(circle at 50% 30%, #eef3f8 0%, #e1e9f2 100%) !important;
  border-color: rgba(0, 172, 255, 0.2);
  box-shadow: 0 12px 40px rgba(0, 172, 255, 0.08);
}

[data-theme="tecan"] .universe-toolbar,
[data-theme="tecan-day"] .universe-toolbar {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(32, 74, 119, 0.18);
  box-shadow: 0 2px 10px rgba(0, 172, 255, 0.06);
}

[data-theme="tecan"] .universe-view-segmented,
[data-theme="tecan-day"] .universe-view-segmented {
  background: #edeeee;
  border: 1px solid rgba(32, 74, 119, 0.15);
}

[data-theme="tecan"] .universe-toolbar .hud-glsl-btn,
[data-theme="tecan-day"] .universe-toolbar .hud-glsl-btn {
  color: #4c575a;
}

[data-theme="tecan"] .universe-toolbar .hud-glsl-btn.active,
[data-theme="tecan-day"] .universe-toolbar .hud-glsl-btn.active {
  background: #ffffff;
  color: #e84e0e;
  border-color: #e84e0e;
  box-shadow: 0 0 8px rgba(232, 78, 14, 0.25);
}

[data-theme="tecan"] .universe-demo-pill,
[data-theme="tecan-day"] .universe-demo-pill {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(232, 78, 14, 0.4);
  box-shadow: 0 4px 18px rgba(0, 172, 255, 0.12);
  color: #204a77;
}

[data-theme="tecan"] .universe-demo-pill .demo-tag .mount-chip,
[data-theme="tecan-day"] .universe-demo-pill .demo-tag .mount-chip {
  background: #e84e0e;
  color: #ffffff;
}

/* Chat Room & Messages */
[data-theme="tecan"] .chat-messages {
  background: #f8fafc;
}

[data-theme="tecan"] .chat-msg.bot .msg-bubble {
  background: #ffffff;
  border-color: rgba(32, 74, 119, 0.18);
  color: #204a77;
  box-shadow: 0 2px 8px rgba(0, 172, 255, 0.05);
}

[data-theme="tecan"] .chat-msg.user .msg-bubble {
  background: #00acff;
  color: #ffffff;
}

[data-theme="tecan"] .btn-chat-tool {
  background: #ffffff !important;
  color: #1e293b !important;
  border: 1px solid #cbd5e1 !important;
}

[data-theme="tecan"] .btn-chat-tool:hover {
  background: #f1f5f9 !important;
  border-color: #00acff !important;
  color: #00acff !important;
}

/* --- Tecan Day: High-Contrast Light Overlays --- */

[data-theme="tecan"] .axes-legend-overlay,
[data-theme="tecan-day"] .axes-legend-overlay {
  background: rgba(255, 255, 255, 0.96) !important;
  border: 1px solid rgba(0, 172, 255, 0.3) !important;
  box-shadow: 0 8px 30px rgba(0, 172, 255, 0.15) !important;
  color: #204a77 !important;
}

[data-theme="tecan"] .axes-legend-overlay.collapsed,
[data-theme="tecan-day"] .axes-legend-overlay.collapsed {
  background: rgba(255, 255, 255, 0.94) !important;
  border-color: #00acff !important;
}

[data-theme="tecan"] .glsl-node-inspector,
[data-theme="tecan-day"] .glsl-node-inspector {
  background: rgba(255, 255, 255, 0.98) !important;
  border: 1px solid rgba(0, 172, 255, 0.3) !important;
  box-shadow: 0 12px 35px rgba(0, 172, 255, 0.2) !important;
  color: #204a77 !important;
}

[data-theme="tecan"] .glsl-node-inspector .inspector-header,
[data-theme="tecan-day"] .glsl-node-inspector .inspector-header {
  background: rgba(245, 247, 250, 0.96) !important;
  border-bottom: 1px solid rgba(0, 172, 255, 0.2) !important;
}

[data-theme="tecan"] .glsl-node-inspector .insp-stat-card,
[data-theme="tecan-day"] .glsl-node-inspector .insp-stat-card {
  background: #f8fafc !important;
  border: 1px solid rgba(0, 172, 255, 0.15) !important;
}

[data-theme="tecan"] .glsl-node-inspector .insp-rel-col,
[data-theme="tecan-day"] .glsl-node-inspector .insp-rel-col {
  background: #f8fafc !important;
  border: 1px solid rgba(0, 172, 255, 0.12) !important;
}

[data-theme="tecan"] .glsl-node-inspector .insp-rel-item,
[data-theme="tecan"] .glsl-node-inspector .insp-doc-item,
[data-theme="tecan-day"] .glsl-node-inspector .insp-rel-item,
[data-theme="tecan-day"] .glsl-node-inspector .insp-doc-item {
  background: #ffffff !important;
  border: 1px solid rgba(0, 172, 255, 0.1) !important;
}

[data-theme="tecan"] .glsl-node-inspector .insp-rel-item:hover,
[data-theme="tecan"] .glsl-node-inspector .insp-doc-item:hover,
[data-theme="tecan-day"] .glsl-node-inspector .insp-rel-item:hover,
[data-theme="tecan-day"] .glsl-node-inspector .insp-doc-item:hover {
  background: rgba(0, 172, 255, 0.1) !important;
  border-color: #00acff !important;
}


/* --------------------------------------------------------------------------
   Tecan Night (Black & Charcoal with Signature Red-Orange & Digital Blue)
   -------------------------------------------------------------------------- */
[data-theme="tecan-dark"] {
  --theme-id: "tecan-dark";
  --bg-base: #111111;
  /* Tecan Charcoal Black */
  --bg-surface: #1e1e1e;
  --bg-surface-elevated: #282828;
  --bg-hover: #333333;
  --border-color: rgba(255, 255, 255, 0.14);
  --border-focus: #e84e0e;

  --text-main: #ffffff;
  --text-muted: #b0b0b0;
  --text-faint: #777777;

  --accent-primary: #e84e0e;
  /* Signature Tecan Red-Orange */
  --accent-primary-hover: #ff6022;
  --accent-cyan: #00acff;
  /* Tecan Cyan */
  --accent-emerald: #10b981;
  --accent-amber: #e84e0e;
  --accent-rose: #e84e0b;

  --radius-sm: 4px;
  --radius-md: 4px;
}

[data-theme="tecan-dark"] body {
  background-color: var(--bg-base);
  color: var(--text-main);
}

[data-theme="tecan-dark"] .navbar {
  background: #181818;
  border-bottom: 2px solid #e84e0e;
}

[data-theme="tecan-dark"] .btn-primary {
  background: #e84e0e;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(232, 78, 14, 0.4);
}

[data-theme="tecan-dark"] .btn-primary:hover {
  background: #ff6022;
}

[data-theme="tecan-dark"] .universe-canvas-wrapper {
  background: radial-gradient(circle at 50% 30%, #1e1e1e 0%, #0d0d0d 100%) !important;
  border-color: rgba(232, 78, 14, 0.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(232, 78, 14, 0.15);
}

/* Chat Interrogation Toolbar Tool Buttons across Themes */
[data-theme="azure-day"] .btn-chat-tool {
  background: #ffffff !important;
  color: #1e293b !important;
  border: 1px solid #cbd5e1 !important;
}

[data-theme="azure-day"] .btn-chat-tool:hover {
  background: #f1f5f9 !important;
  border-color: #0284c7 !important;
  color: #0369a1 !important;
}

[data-theme="glacier"] .btn-chat-tool {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #d1d5db !important;
}

[data-theme="glacier"] .btn-chat-tool:hover {
  background: #f3f4f6 !important;
  border-color: #0d9488 !important;
  color: #0f766e !important;
}

[data-theme="petrol-dark"] .btn-chat-tool {
  background: rgba(15, 23, 42, 0.75) !important;
  color: #e2e8f0 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

[data-theme="petrol-dark"] .btn-chat-tool:hover {
  background: rgba(30, 41, 59, 0.9) !important;
  border-color: #14b8a6 !important;
}

/* ==========================================================================
   THEME 5: Antique Walnut (Archival Walnut, Parchment & Gilt Gold)
   Inspired by classic European library ledgers, polished burl walnut & brass
   ========================================================================== */
[data-theme="antique-walnut"] {
  --theme-id: "antique-walnut";
  --bg-base: #140e0b;
  --bg-surface: #221712;
  --bg-surface-elevated: #2d1f18;
  --bg-hover: #3e2b21;
  --border-color: rgba(224, 185, 99, 0.22);
  --border-focus: rgba(224, 185, 99, 0.65);

  --text-main: #f5eedb;
  --text-muted: #bdae9c;
  --text-faint: #8a7c6c;

  --accent-primary: #e0b963;
  --accent-primary-hover: #f0cb77;
  --accent-cyan: #62b0d9;
  --accent-emerald: #48a66e;
  --accent-amber: #e0b963;
  --accent-rose: #cf4f58;
}

[data-theme="antique-walnut"] body {
  background-color: #140e0b;
  color: #f5eedb;
  background-image: radial-gradient(circle at 50% 20%, #201510 0%, #140e0b 80%);
}

[data-theme="antique-walnut"] .navbar {
  background: rgba(26, 18, 14, 0.96);
  border-bottom: 1px solid rgba(224, 185, 99, 0.28);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.55);
}

[data-theme="antique-walnut"] .btn-primary {
  background: linear-gradient(135deg, #d4af37, #a47e27);
  color: #16110a;
  border: 1px solid rgba(255, 230, 150, 0.4);
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(164, 126, 39, 0.35);
}

[data-theme="antique-walnut"] .btn-primary:hover {
  background: linear-gradient(135deg, #e6c24e, #b88e33);
  color: #0e0a05;
}

[data-theme="antique-walnut"] .btn-outline {
  border-color: rgba(224, 185, 99, 0.35);
  color: #f5eedb;
  background: rgba(34, 23, 18, 0.6);
}

[data-theme="antique-walnut"] .btn-outline:hover {
  border-color: #e0b963;
  background: rgba(224, 185, 99, 0.15);
  color: #fceecb;
}

[data-theme="antique-walnut"] .workspace-nav-bar {
  background: rgba(20, 14, 11, 0.95);
  border-bottom: 1px solid rgba(224, 185, 99, 0.22);
}

[data-theme="antique-walnut"] .ws-tab-btn {
  color: #bdae9c;
}

[data-theme="antique-walnut"] .ws-tab-btn:hover {
  color: #f5eedb;
  background: rgba(224, 185, 99, 0.08);
}

[data-theme="antique-walnut"] .ws-tab-btn.active {
  color: #f7ecd2;
  border-bottom: 2px solid #e0b963;
  background: linear-gradient(180deg, rgba(224, 185, 99, 0.05) 0%, rgba(224, 185, 99, 0.15) 100%);
}

[data-theme="antique-walnut"] .universe-canvas-wrapper {
  background: radial-gradient(circle at 50% 30%, #2b1d16 0%, #130d0a 100%) !important;
  border: 1px solid rgba(224, 185, 99, 0.25) !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(224, 185, 99, 0.12);
}

[data-theme="antique-walnut"] .glass-panel,
[data-theme="antique-walnut"] .stat-card,
[data-theme="antique-walnut"] .pipeline-stage-card,
[data-theme="antique-walnut"] .crawler-status-box,
[data-theme="antique-walnut"] .crawler-config-card {
  background: rgba(34, 23, 18, 0.88);
  border: 1px solid rgba(224, 185, 99, 0.22);
  color: #f5eedb;
}

[data-theme="antique-walnut"] .ledger-table th {
  background: rgba(45, 31, 24, 0.95);
  color: #e0b963;
  border-bottom: 1px solid rgba(224, 185, 99, 0.3);
}

[data-theme="antique-walnut"] .ledger-table td {
  border-bottom: 1px solid rgba(224, 185, 99, 0.12);
  color: #f5eedb;
}

[data-theme="antique-walnut"] .ledger-table tr:hover td {
  background: rgba(224, 185, 99, 0.07);
}

[data-theme="antique-walnut"] .btn-chat-tool {
  background: rgba(40, 27, 21, 0.85) !important;
  color: #f5eedb !important;
  border: 1px solid rgba(224, 185, 99, 0.28) !important;
}

[data-theme="antique-walnut"] .btn-chat-tool:hover {
  background: rgba(64, 43, 33, 0.95) !important;
  border-color: #e0b963 !important;
  color: #fceecb !important;
}

[data-theme="antique-walnut"] .theme-dropdown-menu {
  background: #201511;
  border: 1px solid rgba(224, 185, 99, 0.35);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.8);
}

[data-theme="antique-walnut"] .theme-option-item:hover,
[data-theme="antique-walnut"] .theme-option-item.active {
  background: rgba(224, 185, 99, 0.12);
}

/* ==========================================================================
   KNOWLEDGE LIBRARY WORKSPACE (#ws-pane-library) — FULL MULTI-THEME TRANSPOSITION
   Adapts 2D/3D shelves, topbar, rail, inspector, canister drawer & desk
   across all 7 Multi-Theme Selector Dropdown choices.
   ========================================================================== */

/* --- 1. Antique Walnut (Classic Burled Walnut, Leather & Gilt Gold) --- */
[data-theme="antique-walnut"] .lib-shell {
  --lib-bg: radial-gradient(circle at 45% 25%, #1d1613 0%, #0d0f14 68%, #090b0f 100%);
  --lib-topbar-bg: linear-gradient(180deg, rgba(28, 20, 16, 0.98) 0%, rgba(18, 13, 10, 0.96) 100%);
  --lib-rail-bg: rgba(16, 12, 10, 0.95);
  --lib-panel: rgba(24, 17, 14, 0.94);
  --lib-panel-elevated: rgba(34, 24, 19, 0.98);
  --lib-inset-bg: rgba(12, 9, 7, 0.68);
  --lib-border: rgba(212, 175, 55, 0.28);
  --lib-border-subtle: rgba(224, 185, 99, 0.12);
  --lib-accent: #e0b963;
  --lib-gold: #e0b963;
  --lib-accent-soft: rgba(224, 185, 99, 0.18);
  --lib-accent-contrast: #120e08;
  --lib-accent-btn-bg: linear-gradient(135deg, #d4af37, #a47e27);
  --lib-text: #f3efe6;
  --lib-text-muted: #bdae9c;
  --lib-heading-font: Georgia, "Times New Roman", serif;
  --lib-viewport-bg: radial-gradient(ellipse at 50% 42%, rgba(86, 52, 28, 0.3) 0%, rgba(14, 11, 9, 0.98) 72%);
  --lib-shelf-2d-bg:
    radial-gradient(circle at 50% 25%, rgba(164, 114, 58, 0.16), transparent 65%),
    linear-gradient(180deg, rgba(20, 17, 15, 0.65) 0%, rgba(36, 22, 14, 0.94) 92%, #4e3120 92%, #2b1a10 100%);
  --lib-strip-bg: linear-gradient(180deg, rgba(46, 28, 18, 0.94), rgba(28, 17, 11, 0.98));
  --lib-strip-border: #8a6b32;
  --lib-strip-pill-bg: rgba(16, 12, 10, 0.78);
  --lib-spine-bg: linear-gradient(135deg, var(--spine-leather, #3d2316), #131114);
  --lib-spine-border: rgba(224, 185, 99, 0.68);
  --lib-spine-shadow: inset 0 0 18px rgba(0, 0, 0, 0.55), 4px 8px 18px rgba(0, 0, 0, 0.55);
  --lib-spine-text: #f5dda2;
  --lib-spine-subtext: #f8f1e0;
  --lib-bar-fill: linear-gradient(180deg, #e5c36c 0%, #8b6d31 100%);
  --lib-drawer-bg: linear-gradient(160deg, #4b151e 0%, #2a1214 55%, #1c1010 100%);
  --lib-drawer-header-bg: rgba(15, 8, 10, 0.68);
  --lib-drawer-rubrics-bg: rgba(20, 10, 12, 0.5);
  --lib-drawer-list-bg: linear-gradient(180deg, rgba(28, 19, 17, 0.95), rgba(20, 14, 13, 0.98));
  --lib-drawer-divider-bg: #171922;
  --lib-card-paper: #f6f1e6;
  --lib-card-ink: #1e232d;
  --lib-card-muted: #5a6375;
  --lib-card-btn-bg: #ffffff;
  --lib-card-btn-hover: #e9e2d2;
  --lib-card-btn-primary-bg: #551822;
  --lib-card-btn-primary-hover: #6d1f2c;
  --lib-card-btn-primary-text: #f8f2e4;
  --lib-tooltip-bg: rgba(18, 13, 11, 0.96);
  --lib-activity-bg: rgba(14, 10, 8, 0.98);
}

/* --- 2. Obsidian Slate (Default Night — Deep Slate & Indigo Cyber) --- */
[data-theme="default"] .lib-shell,
[data-theme="obsidian"] .lib-shell {
  --lib-bg: radial-gradient(circle at 50% 25%, #131c31 0%, #090d16 75%);
  --lib-topbar-bg: linear-gradient(180deg, rgba(16, 23, 38, 0.98) 0%, rgba(11, 16, 28, 0.96) 100%);
  --lib-rail-bg: rgba(12, 18, 30, 0.96);
  --lib-panel: rgba(16, 23, 38, 0.94);
  --lib-panel-elevated: rgba(22, 32, 53, 0.98);
  --lib-inset-bg: rgba(9, 13, 22, 0.72);
  --lib-border: rgba(99, 102, 241, 0.25);
  --lib-border-subtle: rgba(255, 255, 255, 0.08);
  --lib-accent: #818cf8;
  --lib-gold: #818cf8;
  --lib-accent-soft: rgba(99, 102, 241, 0.18);
  --lib-accent-contrast: #ffffff;
  --lib-accent-btn-bg: linear-gradient(135deg, #6366f1, #4f46e5);
  --lib-text: #f1f5f9;
  --lib-text-muted: #94a3b8;
  --lib-heading-font: 'Outfit', system-ui, sans-serif;
  --lib-viewport-bg: radial-gradient(ellipse at 50% 42%, rgba(99, 102, 241, 0.16) 0%, #090d16 74%);
  --lib-shelf-2d-bg:
    radial-gradient(circle at 50% 20%, rgba(99, 102, 241, 0.12), transparent 60%),
    linear-gradient(180deg, rgba(11, 16, 28, 0.7) 0%, rgba(16, 23, 38, 0.95) 92%, #243352 92%, #0f172a 100%);
  --lib-strip-bg: linear-gradient(180deg, #162035, #0e1525);
  --lib-strip-border: #6366f1;
  --lib-strip-pill-bg: rgba(15, 23, 42, 0.85);
  --lib-spine-bg: linear-gradient(160deg, #1e293b 0%, #0f172a 100%);
  --lib-spine-border: rgba(129, 140, 248, 0.45);
  --lib-spine-shadow: inset 0 0 14px rgba(0, 0, 0, 0.45), 4px 8px 18px rgba(0, 0, 0, 0.5);
  --lib-spine-text: #f1f5f9;
  --lib-spine-subtext: #a5b4fc;
  --lib-bar-fill: linear-gradient(180deg, #818cf8 0%, #4338ca 100%);
  --lib-drawer-bg: linear-gradient(160deg, #162035 0%, #101726 60%, #090d16 100%);
  --lib-drawer-header-bg: rgba(15, 23, 42, 0.85);
  --lib-drawer-rubrics-bg: rgba(15, 23, 42, 0.6);
  --lib-drawer-list-bg: #0b101d;
  --lib-drawer-divider-bg: #1e293b;
  --lib-card-paper: #f8fafc;
  --lib-card-ink: #0f172a;
  --lib-card-muted: #475569;
  --lib-card-btn-bg: #ffffff;
  --lib-card-btn-hover: #e2e8f0;
  --lib-card-btn-primary-bg: #4f46e5;
  --lib-card-btn-primary-hover: #4338ca;
  --lib-card-btn-primary-text: #ffffff;
  --lib-tooltip-bg: rgba(15, 23, 42, 0.96);
  --lib-activity-bg: rgba(11, 16, 28, 0.98);
}

/* --- 3. Alpine Night (Deep Petrol & Warm Solar Gold) --- */
[data-theme="petrol-dark"] .lib-shell,
[data-theme="alpine-night"] .lib-shell {
  --lib-bg: radial-gradient(circle at 50% 25%, #003138 0%, #001b1f 75%);
  --lib-topbar-bg: linear-gradient(180deg, rgba(0, 41, 46, 0.98) 0%, rgba(0, 27, 31, 0.96) 100%);
  --lib-rail-bg: rgba(0, 32, 37, 0.96);
  --lib-panel: rgba(0, 41, 46, 0.94);
  --lib-panel-elevated: rgba(0, 55, 61, 0.98);
  --lib-inset-bg: rgba(0, 22, 26, 0.72);
  --lib-border: rgba(166, 216, 217, 0.22);
  --lib-border-subtle: rgba(166, 216, 217, 0.12);
  --lib-accent: #ffcc00;
  --lib-gold: #ffcc00;
  --lib-accent-soft: rgba(255, 204, 0, 0.16);
  --lib-accent-contrast: #001b1f;
  --lib-accent-btn-bg: linear-gradient(135deg, #ffcc00, #e6b800);
  --lib-text: #eef6f6;
  --lib-text-muted: #a6d8d9;
  --lib-heading-font: 'Outfit', system-ui, sans-serif;
  --lib-viewport-bg: radial-gradient(ellipse at 50% 42%, rgba(0, 75, 90, 0.35) 0%, #00171a 74%);
  --lib-shelf-2d-bg:
    radial-gradient(circle at 50% 20%, rgba(255, 204, 0, 0.08), transparent 60%),
    linear-gradient(180deg, rgba(0, 27, 31, 0.72) 0%, rgba(0, 41, 46, 0.96) 92%, #004b5a 92%, #001f24 100%);
  --lib-strip-bg: linear-gradient(180deg, #00373d, #002328);
  --lib-strip-border: #ffcc00;
  --lib-strip-pill-bg: rgba(0, 27, 31, 0.86);
  --lib-spine-bg: linear-gradient(160deg, #003b42 0%, #001f24 100%);
  --lib-spine-border: rgba(255, 204, 0, 0.5);
  --lib-spine-shadow: inset 0 0 14px rgba(0, 0, 0, 0.45), 4px 8px 18px rgba(0, 0, 0, 0.5);
  --lib-spine-text: #eef6f6;
  --lib-spine-subtext: #ffcc00;
  --lib-bar-fill: linear-gradient(180deg, #ffcc00 0%, #70bfc2 100%);
  --lib-drawer-bg: linear-gradient(160deg, #00373d 0%, #00292e 60%, #001b1f 100%);
  --lib-drawer-header-bg: rgba(0, 27, 31, 0.85);
  --lib-drawer-rubrics-bg: rgba(0, 35, 40, 0.65);
  --lib-drawer-list-bg: #00191d;
  --lib-drawer-divider-bg: #00373d;
  --lib-card-paper: #f6fbfb;
  --lib-card-ink: #001b1f;
  --lib-card-muted: #3b5d62;
  --lib-card-btn-bg: #ffffff;
  --lib-card-btn-hover: #d8ecec;
  --lib-card-btn-primary-bg: #004b5a;
  --lib-card-btn-primary-hover: #006275;
  --lib-card-btn-primary-text: #ffffff;
  --lib-tooltip-bg: rgba(0, 27, 31, 0.96);
  --lib-activity-bg: rgba(0, 24, 28, 0.98);
}

/* --- 4. Glacier Mist (Day — Crisp Ice Petrol & Deep Forest, Coherent with Global Theme) --- */
[data-theme="glacier"] .lib-shell,
[data-theme="glacier-day"] .lib-shell {
  --lib-bg: #eef6f6;
  --lib-topbar-bg: rgba(255, 255, 255, 0.96);
  --lib-rail-bg: #ffffff;
  --lib-panel: #ffffff;
  --lib-panel-elevated: #ffffff;
  --lib-inset-bg: #eef6f6;
  --lib-border: rgba(0, 75, 90, 0.15);
  --lib-border-subtle: rgba(0, 75, 90, 0.1);
  --lib-accent: #004b5a;
  --lib-gold: #004b5a;
  --lib-accent-soft: rgba(0, 75, 90, 0.09);
  --lib-accent-contrast: #ffffff;
  --lib-accent-btn-bg: #004b5a;
  --lib-text: #001b1f;
  --lib-text-muted: #004b5a;
  --lib-heading-font: 'Outfit', system-ui, sans-serif;
  --lib-viewport-bg: linear-gradient(180deg, #dfecec 0%, #eef6f6 100%);
  --lib-shelf-2d-bg:
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.7), transparent 62%),
    linear-gradient(180deg, #d7e7e8 0%, #e6f2f2 89%, #b8d3d5 89%, #f5fafa 90.5%, #d6ebeb 97%, #b5cfd1 100%);
  --lib-strip-bg: #ffffff;
  --lib-strip-border: #004b5a;
  --lib-strip-pill-bg: #eef6f6;
  --lib-spine-bg: linear-gradient(90deg, #d3e2e3 0%, #f5fbfb 11%, #ffffff 50%, #f4fafa 89%, #c9dbdd 100%);
  --lib-spine-border: rgba(0, 75, 90, 0.2);
  --lib-spine-shadow: 0 8px 18px rgba(0, 41, 46, 0.14), 2px 2px 5px rgba(0, 27, 31, 0.08), inset 0 1px 0 #ffffff;
  --lib-spine-text: #001b1f;
  --lib-spine-subtext: #004b5a;
  --lib-grommet-hole: #072227;
  --lib-bar-fill: linear-gradient(180deg, #067079 0%, #004b5a 100%);
  --lib-drawer-bg: #ffffff;
  --lib-drawer-header-bg: #eef6f6;
  --lib-drawer-rubrics-bg: #e3f0f0;
  --lib-drawer-list-bg: #f6fbfb;
  --lib-drawer-divider-bg: #ffffff;
  --lib-card-paper: #ffffff;
  --lib-card-ink: #001b1f;
  --lib-card-muted: #004b5a;
  --lib-card-btn-bg: #f4fafa;
  --lib-card-btn-hover: #d6ebeb;
  --lib-card-btn-primary-bg: #004b5a;
  --lib-card-btn-primary-hover: #067079;
  --lib-card-btn-primary-text: #ffffff;
  --lib-tooltip-bg: rgba(255, 255, 255, 0.98);
  --lib-activity-bg: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 75, 90, 0.06);
}

/* --- 5. Alpine Azure (Day — Cantonal Sky Blue & Silver Slate, Coherent with Global Theme) --- */
[data-theme="azure-day"] .lib-shell,
[data-theme="alpine-azure"] .lib-shell {
  --lib-bg: #f5f7fa;
  --lib-topbar-bg: rgba(255, 255, 255, 0.96);
  --lib-rail-bg: #ffffff;
  --lib-panel: #ffffff;
  --lib-panel-elevated: #ffffff;
  --lib-inset-bg: #f5f7fa;
  --lib-border: rgba(32, 74, 119, 0.15);
  --lib-border-subtle: rgba(32, 74, 119, 0.1);
  --lib-accent: #0085ca;
  --lib-gold: #0085ca;
  --lib-accent-soft: rgba(0, 133, 202, 0.1);
  --lib-accent-contrast: #ffffff;
  --lib-accent-btn-bg: #0085ca;
  --lib-text: #204a77;
  --lib-text-muted: #4c575a;
  --lib-heading-font: 'Outfit', system-ui, sans-serif;
  --lib-viewport-bg: linear-gradient(180deg, #e2eaf3 0%, #f5f7fa 100%);
  --lib-shelf-2d-bg:
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.78), transparent 62%),
    linear-gradient(180deg, #dae4f0 0%, #edf2f8 89%, #bccbe0 89%, #f8fafc 90.5%, #e2eaf3 97%, #c3d2e4 100%);
  --lib-strip-bg: #ffffff;
  --lib-strip-border: #0085ca;
  --lib-strip-pill-bg: #f5f7fa;
  --lib-spine-bg: linear-gradient(90deg, #d4dfec 0%, #f7f9fc 11%, #ffffff 50%, #f5f8fb 89%, #ccd8e6 100%);
  --lib-spine-border: rgba(32, 74, 119, 0.2);
  --lib-spine-shadow: 0 8px 18px rgba(32, 74, 119, 0.14), 2px 2px 5px rgba(32, 74, 119, 0.08), inset 0 1px 0 #ffffff;
  --lib-spine-text: #204a77;
  --lib-spine-subtext: #0085ca;
  --lib-grommet-hole: #0b1e38;
  --lib-bar-fill: linear-gradient(180deg, #0091d3 0%, #204a77 100%);
  --lib-drawer-bg: #ffffff;
  --lib-drawer-header-bg: #f5f7fa;
  --lib-drawer-rubrics-bg: #edeeee;
  --lib-drawer-list-bg: #f5f7fa;
  --lib-drawer-divider-bg: #ffffff;
  --lib-card-paper: #ffffff;
  --lib-card-ink: #204a77;
  --lib-card-muted: #4c575a;
  --lib-card-btn-bg: #f8fafc;
  --lib-card-btn-hover: #e2e8f0;
  --lib-card-btn-primary-bg: #0085ca;
  --lib-card-btn-primary-hover: #0091d3;
  --lib-card-btn-primary-text: #ffffff;
  --lib-tooltip-bg: rgba(255, 255, 255, 0.98);
  --lib-activity-bg: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 133, 202, 0.06);
}

/* --- 6. Red Clinical (Day — Crisp White Clinical Touch, Signature #e84e0e & #00acff) --- */
[data-theme="tecan"] .lib-shell,
[data-theme="tecan-day"] .lib-shell {
  --lib-bg: #f5f7fa;
  --lib-topbar-bg: rgba(255, 255, 255, 0.97);
  --lib-rail-bg: #ffffff;
  --lib-panel: #ffffff;
  --lib-panel-elevated: #ffffff;
  --lib-inset-bg: #f5f7fa;
  --lib-border: rgba(32, 74, 119, 0.16);
  --lib-border-subtle: #e5e9ef;
  --lib-accent: #e84e0e;
  --lib-gold: #e84e0e;
  --lib-accent-soft: rgba(0, 172, 255, 0.1);
  --lib-accent-contrast: #ffffff;
  --lib-accent-btn-bg: #00acff;
  --lib-text: #204a77;
  --lib-text-muted: #5c5f5f;
  --lib-heading-font: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --lib-viewport-bg: linear-gradient(180deg, #e5e9ef 0%, #f5f7fa 100%);
  --lib-shelf-2d-bg:
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.85), transparent 62%),
    linear-gradient(180deg, #dfe4ec 0%, #eff2f6 89%, #c7cfd9 89%, #ffffff 90.5%, #e8ecf1 97%, #cdd5df 100%);
  --lib-strip-bg: #ffffff;
  --lib-strip-border: #e84e0e;
  --lib-strip-pill-bg: #f5f7fa;
  --lib-spine-bg: linear-gradient(90deg, #d7dde5 0%, #f8fafc 10%, #ffffff 50%, #f8fafc 90%, #cfd6e0 100%);
  --lib-spine-border: #cfd6df;
  --lib-spine-shadow: 0 8px 18px rgba(17, 24, 39, 0.13), 2px 2px 5px rgba(17, 24, 39, 0.07), inset 0 1px 0 #ffffff;
  --lib-spine-text: #1e293b;
  --lib-spine-subtext: #e84e0e;
  --lib-grommet-hole: #0c1528;
  --lib-bar-fill: linear-gradient(180deg, #00acff 0%, #e84e0e 100%);
  --lib-drawer-bg: #ffffff;
  --lib-drawer-header-bg: #ffffff;
  --lib-drawer-rubrics-bg: #f5f7fa;
  --lib-drawer-list-bg: #f5f7fa;
  --lib-drawer-divider-bg: #ffffff;
  --lib-card-paper: #ffffff;
  --lib-card-ink: #204a77;
  --lib-card-muted: #5c5f5f;
  --lib-card-btn-bg: #f8fafc;
  --lib-card-btn-hover: #e2e8f0;
  --lib-card-btn-primary-bg: #00acff;
  --lib-card-btn-primary-hover: #008df1;
  --lib-card-btn-primary-text: #ffffff;
  --lib-tooltip-bg: rgba(255, 255, 255, 0.99);
  --lib-activity-bg: #ffffff;
  border-radius: var(--radius-lg, 14px);
  box-shadow: 0 4px 16px rgba(0, 172, 255, 0.08);
}

/* Signature Red Clinical 2px topbar accent matching global .navbar */
[data-theme="tecan"] .lib-topbar,
[data-theme="tecan-day"] .lib-topbar {
  border-bottom: 2px solid #e84e0e;
}

[data-theme="tecan"] .lib-search-input:focus,
[data-theme="tecan-day"] .lib-search-input:focus {
  border-color: #00acff;
  box-shadow: 0 0 0 3px rgba(0, 172, 255, 0.16);
}

[data-theme="tecan"] .lib-rail-btn.active,
[data-theme="tecan-day"] .lib-rail-btn.active {
  background: rgba(0, 172, 255, 0.1);
  border-color: #00acff;
  color: #204a77;
}

/* Enforced 3D Studio Shelf Gradient Backdrop for Glacier Mist, Alpine Azure & Red Clinical */
[data-theme="glacier"] .lib-shelf-canvas-wrap,
[data-theme="glacier-day"] .lib-shelf-canvas-wrap,
[data-theme="azure-day"] .lib-shelf-canvas-wrap,
[data-theme="alpine-azure"] .lib-shelf-canvas-wrap,
[data-theme="tecan"] .lib-shelf-canvas-wrap,
[data-theme="tecan-day"] .lib-shelf-canvas-wrap {
  background: linear-gradient(180deg, #dae4f0 0%, #edf2f8 89%, #bccbe0 89%, #f8fafc 90.5%, #e2eaf3 97%, #c3d2e4 100%);
}

/* Photorealistic White Lever-Arch Binders for ALL 3 Day Themes (2D Shelf) */
[data-theme="glacier"] .lib-spine-2d,
[data-theme="glacier-day"] .lib-spine-2d,
[data-theme="azure-day"] .lib-spine-2d,
[data-theme="alpine-azure"] .lib-spine-2d,
[data-theme="tecan"] .lib-spine-2d,
[data-theme="tecan-day"] .lib-spine-2d {
  border-radius: 4px 4px 2px 2px;
  border-width: 1px;
  border-top: none;
  border-bottom: 6px solid #cbd5e1;
  padding: 0.5rem 0.35rem 0.4rem 0.35rem;
}

[data-theme="glacier"] .lib-spine-2d-pocket,
[data-theme="glacier-day"] .lib-spine-2d-pocket,
[data-theme="azure-day"] .lib-spine-2d-pocket,
[data-theme="alpine-azure"] .lib-spine-2d-pocket,
[data-theme="tecan"] .lib-spine-2d-pocket,
[data-theme="tecan-day"] .lib-spine-2d-pocket {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(148, 163, 184, 0.55);
  border-top: 4px solid var(--spine-accent, var(--lib-accent));
  border-radius: 3px;
  padding: 0.55rem 0.3rem 0.45rem 0.3rem;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

[data-theme="glacier"] .lib-spine-2d-grommet,
[data-theme="glacier-day"] .lib-spine-2d-grommet,
[data-theme="azure-day"] .lib-spine-2d-grommet,
[data-theme="alpine-azure"] .lib-spine-2d-grommet,
[data-theme="tecan"] .lib-spine-2d-grommet,
[data-theme="tecan-day"] .lib-spine-2d-grommet {
  display: block;
}

[data-theme="glacier"] .lib-kpi-trio,
[data-theme="glacier"] .lib-bars-box,
[data-theme="glacier"] .lib-status-box,
[data-theme="azure-day"] .lib-kpi-trio,
[data-theme="azure-day"] .lib-bars-box,
[data-theme="azure-day"] .lib-status-box,
[data-theme="alpine-azure"] .lib-kpi-trio,
[data-theme="alpine-azure"] .lib-bars-box,
[data-theme="alpine-azure"] .lib-status-box,
[data-theme="tecan"] .lib-kpi-trio,
[data-theme="tecan"] .lib-bars-box,
[data-theme="tecan"] .lib-status-box,
[data-theme="tecan-day"] .lib-kpi-trio,
[data-theme="tecan-day"] .lib-bars-box,
[data-theme="tecan-day"] .lib-status-box {
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

/* --- 7. High Precision (Night — Charcoal Black with Red-Orange & Digital Blue) --- */
[data-theme="tecan-dark"] .lib-shell {
  --lib-bg: #111111;
  --lib-topbar-bg: #181818;
  --lib-rail-bg: #151515;
  --lib-panel: #1a1a1a;
  --lib-panel-elevated: #222222;
  --lib-inset-bg: #121212;
  --lib-border: rgba(255, 255, 255, 0.14);
  --lib-border-subtle: rgba(255, 255, 255, 0.08);
  --lib-accent: #e84e0e;
  --lib-gold: #e84e0e;
  --lib-accent-soft: rgba(232, 78, 14, 0.18);
  --lib-accent-contrast: #ffffff;
  --lib-accent-btn-bg: #e84e0e;
  --lib-text: #ffffff;
  --lib-text-muted: #b0b0b0;
  --lib-heading-font: 'Outfit', system-ui, sans-serif;
  --lib-viewport-bg: radial-gradient(ellipse at 50% 42%, #242424 0%, #111111 75%);
  --lib-shelf-2d-bg: linear-gradient(180deg, #161616 0%, #1b1b1b 91%, #2c2c2c 91%, #141414 100%);
  --lib-strip-bg: #181818;
  --lib-strip-border: #e84e0e;
  --lib-strip-pill-bg: #202020;
  --lib-spine-bg: linear-gradient(180deg, #242426 0%, #161618 100%);
  --lib-spine-border: rgba(232, 78, 14, 0.55);
  --lib-spine-shadow: inset 0 0 14px rgba(0, 0, 0, 0.55), 4px 8px 18px rgba(0, 0, 0, 0.65);
  --lib-spine-text: #ffffff;
  --lib-spine-subtext: #ff7a45;
  --lib-bar-fill: linear-gradient(180deg, #e84e0e 0%, #00acff 100%);
  --lib-drawer-bg: #181818;
  --lib-drawer-header-bg: #1f1f1f;
  --lib-drawer-rubrics-bg: #161616;
  --lib-drawer-list-bg: #121212;
  --lib-drawer-divider-bg: #222222;
  --lib-card-paper: #f8fafc;
  --lib-card-ink: #111827;
  --lib-card-muted: #4b5563;
  --lib-card-btn-bg: #ffffff;
  --lib-card-btn-hover: #e5e7eb;
  --lib-card-btn-primary-bg: #e84e0e;
  --lib-card-btn-primary-hover: #ff6022;
  --lib-card-btn-primary-text: #ffffff;
  --lib-tooltip-bg: rgba(20, 20, 20, 0.96);
  --lib-activity-bg: #161616;
  border-radius: 6px;
}