/* Nexora design tokens — Linear-inspired, indigo identity.
   Dark is the default. Light is a full parallel theme via html[data-theme="light"]. */

:root {
  --tf-primary: #6366f1;
  --tf-primary-dark: #818cf8;
  --tf-primary-light: #a5b4fc;
  --tf-accent: #8b5cf6;
  --tf-success: #10b981;
  --tf-danger: #ef4444;
  --tf-warning: #f59e0b;
  --tf-radius: 10px;
  --tf-radius-lg: 12px;
  --tf-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --tf-sidebar: #0e1422;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
}

html[data-theme="dark"],
:root {
  color-scheme: dark;
  --tf-bg: #0b1020;
  --tf-bg-elevated: #1c263a;
  --tf-surface: #151c2e;
  --tf-border: #29344a;
  --tf-text: #f8fafc;
  --tf-text-muted: #94a3b8;
  --tf-primary-dark: #a5b4fc;
  --tf-gradient-subtle: linear-gradient(135deg, rgba(99, 102, 241, 0.14) 0%, rgba(139, 92, 246, 0.08) 100%);
  --tf-shadow-sm: 0 1px 2px rgba(2, 6, 23, 0.28);
  --tf-shadow: 0 8px 20px -14px rgba(2, 6, 23, 0.55);
  --tf-shadow-lg: 0 16px 32px -24px rgba(2, 6, 23, 0.65);

  --tf-canvas: #0b1020;
  --tf-glow-a: rgba(99, 102, 241, 0.07);
  --tf-glow-b: rgba(139, 92, 246, 0.04);
  --tf-chrome: #0e1422;
  --tf-chrome-top: rgba(14, 20, 34, 0.92);
  --tf-chrome-glow: rgba(129, 140, 248, 0.12);
  --tf-line: #29344a;
  --tf-ink: #e2e8f0;
  --tf-ink-strong: #f8fafc;
  --tf-ink-soft: #94a3b8;
  --tf-hud: #94a3b8;
  --tf-hud-accent: #a5b4fc;
  --tf-fill: #151c2e;
  --tf-fill-2: #1c263a;
  --tf-fill-hover: rgba(99, 102, 241, 0.1);
  --tf-fill-active: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.08));
  --tf-input: #0e1422;
  --tf-input-line: #29344a;
  --tf-hero: #151c2e;
  --tf-hero-ink: #f8fafc;
  --tf-console: #151c2e;
  --tf-panel: #151c2e;
  --tf-panel-solid: #151c2e;
  --tf-bubble: #1c263a;
  --tf-bubble-ink: #e2e8f0;
  --tf-chat-list: #0e1422;
  --tf-chat-thread: #0b1020;
  --tf-user-chip: #1c263a;
  --tf-hover-row: rgba(255, 255, 255, 0.04);
  --tf-chip-bg: rgba(129, 140, 248, 0.16);
  --tf-chip-ink: #c7d2fe;
  --tf-composer-fade: linear-gradient(180deg, transparent, rgba(11, 16, 32, 0.92) 28%);
  --tf-thread-header: #151c2e;
  --tf-shadow-card: 0 8px 18px rgba(2, 6, 23, 0.22);
  --tf-shadow-card-hover: 0 10px 22px rgba(2, 6, 23, 0.32);
  --tf-pulse: #1c263a;
  --tf-pulse-halo: #151c2e;
  --tf-success-ink: #6ee7b7;
  --tf-modal: #151c2e;
  --tf-modal-shadow: 0 24px 48px rgba(2, 6, 23, 0.55);
  --tf-backdrop: rgba(2, 6, 23, 0.62);
  --tf-info-ink: #93c5fd;
}

html[data-theme="light"] {
  color-scheme: light;
  --tf-bg: #f7f8fc;
  --tf-bg-elevated: #ffffff;
  --tf-surface: #ffffff;
  --tf-border: #e5e7ef;
  --tf-text: #111827;
  --tf-text-muted: #64748b;
  --tf-primary-dark: #4f46e5;
  --tf-accent: #7c3aed;
  --tf-sidebar: #ffffff;
  --tf-gradient-subtle: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(124, 58, 237, 0.05) 100%);
  --tf-shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.05);
  --tf-shadow: 0 4px 10px -6px rgba(17, 24, 39, 0.08);
  --tf-shadow-lg: 0 12px 24px -16px rgba(17, 24, 39, 0.12);

  --tf-canvas: #f7f8fc;
  --tf-glow-a: rgba(99, 102, 241, 0.06);
  --tf-glow-b: rgba(124, 58, 237, 0.04);
  --tf-chrome: #ffffff;
  --tf-chrome-top: rgba(255, 255, 255, 0.92);
  --tf-chrome-glow: rgba(99, 102, 241, 0.1);
  --tf-line: #e5e7ef;
  --tf-ink: #334155;
  --tf-ink-strong: #111827;
  --tf-ink-soft: #64748b;
  --tf-hud: #64748b;
  --tf-hud-accent: #4f46e5;
  --tf-fill: #ffffff;
  --tf-fill-2: #f1f3f9;
  --tf-fill-hover: rgba(99, 102, 241, 0.06);
  --tf-fill-active: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(124, 58, 237, 0.06));
  --tf-input: #ffffff;
  --tf-input-line: #e5e7ef;
  --tf-hero: #ffffff;
  --tf-hero-ink: #111827;
  --tf-console: #ffffff;
  --tf-panel: #ffffff;
  --tf-panel-solid: #ffffff;
  --tf-bubble: #ffffff;
  --tf-bubble-ink: #1e293b;
  --tf-chat-list: #f7f8fc;
  --tf-chat-thread: #ffffff;
  --tf-user-chip: #ffffff;
  --tf-hover-row: rgba(17, 24, 39, 0.035);
  --tf-chip-bg: rgba(99, 102, 241, 0.1);
  --tf-chip-ink: #4338ca;
  --tf-composer-fade: linear-gradient(180deg, transparent, rgba(247, 248, 252, 0.96) 28%);
  --tf-thread-header: #ffffff;
  --tf-shadow-card: 0 8px 18px rgba(17, 24, 39, 0.06);
  --tf-shadow-card-hover: 0 10px 22px rgba(17, 24, 39, 0.1);
  --tf-pulse: #ffffff;
  --tf-pulse-halo: #fffbeb;
  --tf-success-ink: #059669;
  --tf-modal: #ffffff;
  --tf-modal-shadow: 0 24px 48px rgba(17, 24, 39, 0.14);
  --tf-backdrop: rgba(17, 24, 39, 0.36);
  --tf-info-ink: #1e40af;
}

html[data-theme="dark"] .tf-theme-icon-sun,
html[data-theme="light"] .tf-theme-icon-moon {
  display: none;
}
