/**
 * TaskCore design tokens — Premium task focus: green primary, calm neutrals, soft depth.
 * Extends variables already used by the built bundle.
 */

:root {
  --tc-radius-sm: 12px;
  --tc-radius-md: 14px;
  --tc-radius-lg: 16px;
  /* 8px spacing scale */
  --tc-space-1: 8px;
  --tc-space-2: 16px;
  --tc-space-3: 24px;
  --tc-space-4: 32px;
  --tc-space-5: 40px;
  --tc-space-6: 48px;
  --tc-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --tc-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --tc-duration: 180ms;
  --tc-highlight: #facc15;
}

body {
  font-family: var(--font-sans, 'Inter', system-ui, sans-serif);
}

/* Default: dark + green primary (focused, not enterprise-heavy) */
html[data-theme='blue'],
:root {
  color-scheme: dark;
  --bg-base: #0c1117;
  --bg-card: #151c24;
  --bg-elevated: #1a222d;
  --border: rgba(148, 163, 184, 0.12);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --accent: #22c55e;
  --accent-muted: rgba(34, 197, 94, 0.18);
  --on-accent: #052e16;
  --radius-layout: 16px;
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 8px 32px rgba(0, 0, 0, 0.32);
  --shadow-card-hover: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 14px 40px rgba(0, 0, 0, 0.38),
    0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
  --motion-duration: 180ms;
  --sidebar-bg: linear-gradient(180deg, #0f1419 0%, #0c1117 100%);
  --sidebar-border: rgba(34, 197, 94, 0.08);
  --sidebar-link: #cbd5e1;
  --sidebar-link-hover: #f8fafc;
  --sidebar-hover: rgba(34, 197, 94, 0.1);
  --header-bg: rgba(12, 17, 23, 0.92);
  --header-ui-border: rgba(148, 163, 184, 0.14);
  --header-ui-bg: rgba(21, 28, 36, 0.95);
  --header-fg: #f1f5f9;
  --header-fg-muted: #94a3b8;
}

html[data-theme='pastel'] {
  color-scheme: light;
  --bg-base: #f6faf7;
  --bg-card: #ffffff;
  --bg-elevated: #ecfdf5;
  --border: rgba(16, 185, 129, 0.12);
  --text: #0f172a;
  --text-muted: #64748b;
  --accent: #16a34a;
  --accent-muted: rgba(22, 163, 74, 0.12);
  --on-accent: #ffffff;
  --shadow-card: 0 1px 0 rgba(15, 23, 42, 0.04) inset, 0 8px 28px rgba(22, 163, 74, 0.07);
  --shadow-card-hover: 0 1px 0 rgba(15, 23, 42, 0.05) inset, 0 14px 36px rgba(22, 163, 74, 0.1),
    0 0 0 1px rgba(22, 163, 74, 0.15);
  --sidebar-bg: linear-gradient(180deg, #ffffff 0%, #f6faf7 100%);
  --sidebar-border: rgba(22, 163, 74, 0.12);
  --sidebar-link: #475569;
  --sidebar-link-hover: #0f172a;
  --sidebar-hover: rgba(22, 163, 74, 0.08);
  --header-bg: rgba(255, 255, 255, 0.96);
  --header-ui-border: rgba(15, 23, 42, 0.08);
  --header-ui-bg: #ffffff;
  --header-fg: #0f172a;
  --header-fg-muted: #64748b;
}

html[data-ui-font='dm-sans'] {
  --font-sans: 'DM Sans', var(--font-sans), system-ui, sans-serif;
  --font-display: 'DM Sans', var(--font-display), system-ui, sans-serif;
}

html[data-ui-font='system'] {
  --font-sans: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: system-ui, -apple-system, 'Segoe UI', sans-serif;
}

html[data-ui-font='inter'] {
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-display: 'Inter', system-ui, sans-serif;
}

html[data-ui-font='source-sans-3'] {
  --font-sans: 'Source Sans 3', system-ui, sans-serif;
  --font-display: 'Source Sans 3', system-ui, sans-serif;
}

html[data-ui-font='open-sans'] {
  --font-sans: 'Open Sans', system-ui, sans-serif;
  --font-display: 'Open Sans', system-ui, sans-serif;
}

html[data-ui-font='nunito'] {
  --font-sans: 'Nunito', system-ui, sans-serif;
  --font-display: 'Nunito', system-ui, sans-serif;
}

html[data-ui-font='lato'] {
  --font-sans: 'Lato', system-ui, sans-serif;
  --font-display: 'Lato', system-ui, sans-serif;
}

html[data-ui-font='merriweather'] {
  --font-sans: 'Merriweather', Georgia, serif;
  --font-display: 'Merriweather', Georgia, serif;
}

html[data-ui-font='ibm-plex-sans'] {
  --font-sans: 'IBM Plex Sans', system-ui, sans-serif;
  --font-display: 'IBM Plex Sans', system-ui, sans-serif;
}

html[data-ui-font='jetbrains-mono'] {
  --font-sans: 'JetBrains Mono', ui-monospace, monospace;
  --font-display: 'JetBrains Mono', ui-monospace, monospace;
}

/* Root text size (dropdown). Inter default = md (15px). */
html[data-ui-font-size='sm'] {
  font-size: 14px;
}
html[data-ui-font-size='md'] {
  font-size: 15px;
}
html[data-ui-font-size='lg'] {
  font-size: 16px;
}
html[data-ui-font-size='xl'] {
  font-size: 17px;
}
html[data-ui-font-size='2xl'] {
  font-size: 18px;
}

/* Extra colour themes (dark professional variants). */
html[data-theme='slate'] {
  color-scheme: dark;
  --bg-base: #0f172a;
  --bg-card: #1e293b;
  --bg-elevated: #334155;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #38bdf8;
  --accent-muted: rgba(56, 189, 248, 0.2);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 10px 40px rgba(0, 0, 0, 0.35);
}
html[data-theme='rose'] {
  color-scheme: dark;
  --bg-base: #1a0f14;
  --bg-card: #2d1520;
  --bg-elevated: #3f1729;
  --text: #fce7f3;
  --text-muted: #f9a8d4;
  --accent: #fb7185;
  --accent-muted: rgba(251, 113, 133, 0.22);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 10px 40px rgba(0, 0, 0, 0.4);
}
html[data-theme='amber'] {
  color-scheme: dark;
  --bg-base: #1c1410;
  --bg-card: #292018;
  --bg-elevated: #3a2a18;
  --text: #fffbeb;
  --text-muted: #fcd34d;
  --accent: #f59e0b;
  --accent-muted: rgba(245, 158, 11, 0.25);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 10px 40px rgba(0, 0, 0, 0.4);
}
html[data-theme='teal'] {
  color-scheme: dark;
  --bg-base: #042f2e;
  --bg-card: #0f3d3a;
  --bg-elevated: #115e59;
  --text: #ccfbf1;
  --text-muted: #5eead4;
  --accent: #14b8a6;
  --accent-muted: rgba(20, 184, 166, 0.22);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 10px 40px rgba(0, 0, 0, 0.38);
}
html[data-theme='violet'] {
  color-scheme: dark;
  --bg-base: #1e1b4b;
  --bg-card: #312e81;
  --bg-elevated: #3730a3;
  --text: #ede9fe;
  --text-muted: #c4b5fd;
  --accent: #8b5cf6;
  --accent-muted: rgba(139, 92, 246, 0.25);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 10px 40px rgba(0, 0, 0, 0.4);
}
html[data-theme='cyan'] {
  color-scheme: dark;
  --bg-base: #083344;
  --bg-card: #0c4a6e;
  --bg-elevated: #155e75;
  --text: #ecfeff;
  --text-muted: #67e8f9;
  --accent: #06b6d4;
  --accent-muted: rgba(6, 182, 212, 0.25);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 10px 40px rgba(0, 0, 0, 0.38);
}
html[data-theme='emerald'] {
  color-scheme: dark;
  --bg-base: #022c22;
  --bg-card: #064e3b;
  --bg-elevated: #065f46;
  --text: #ecfdf5;
  --text-muted: #6ee7b7;
  --accent: #10b981;
  --accent-muted: rgba(16, 185, 129, 0.22);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 10px 40px rgba(0, 0, 0, 0.38);
}
html[data-theme='crimson'] {
  color-scheme: dark;
  --bg-base: #1c0a0e;
  --bg-card: #3f0f18;
  --bg-elevated: #5c1220;
  --text: #ffe4e6;
  --text-muted: #fda4af;
  --accent: #e11d48;
  --accent-muted: rgba(225, 29, 72, 0.25);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 10px 40px rgba(0, 0, 0, 0.42);
}
html[data-theme='navy'] {
  color-scheme: dark;
  --bg-base: #020617;
  --bg-card: #0f172a;
  --bg-elevated: #1e3a8a;
  --text: #e0e7ff;
  --text-muted: #a5b4fc;
  --accent: #4f46e5;
  --accent-muted: rgba(79, 70, 229, 0.25);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 10px 40px rgba(0, 0, 0, 0.45);
}
html[data-theme='stone'] {
  color-scheme: dark;
  --bg-base: #1c1917;
  --bg-card: #292524;
  --bg-elevated: #44403c;
  --text: #fafaf9;
  --text-muted: #a8a29e;
  --accent: #d6d3d1;
  --accent-muted: rgba(214, 211, 209, 0.15);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 10px 40px rgba(0, 0, 0, 0.4);
}

html[data-ui-density='compact'] {
  --tc-density-pad: 0.75rem;
  --tc-density-gap: 0.5rem;
}

html[data-ui-density='comfortable'] {
  --tc-density-pad: 1.25rem;
  --tc-density-gap: 1rem;
}
