/*
 * Tailwind v4 entry: config lives here, with no tailwind.config.js or PostCSS plugin.
 * - Keep every @import in this top block, above @theme and the rest of the file. Install an
 *   npm package before @importing its CSS. Never @import a remote URL (web fonts, CDN CSS): the
 *   build resolves @import from the filesystem. Load those with a <link> in the head() of
 *   src/routes/__root.tsx and name the family in a --font-* token in @theme inline below.
 */
@import "tailwindcss" source(none);
@source "../src";
@import "tw-animate-css";

@custom-variant dark (&:is(.dark *));

/*
 * Design system definition.
 *
 * The design lives in this file: oklch color tokens on the shadcn variables
 * (--background, --foreground, --primary, --secondary, --muted, --accent, ...) plus
 * new tokens as needed, font tokens, and custom styles and animations.
 *
 * The @theme inline block maps CSS custom properties to Tailwind utility
 * classes (e.g. --color-primary -> bg-primary, text-primary).
 *
 * The :root and .dark blocks define the actual color values using oklch.
 * All colors MUST use oklch format.
 *
 * To add a new semantic color:
 * 1. Add the variable to :root (light value) and .dark (dark value)
 * 2. Register it in @theme inline as --color-<name>: var(--<name>)
 */

@theme inline {
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --radius-2xl: calc(var(--radius) + 8px);
  --radius-3xl: calc(var(--radius) + 12px);
  --radius-4xl: calc(var(--radius) + 16px);
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-card: var(--card);
  --color-card-foreground: var(--card-foreground);
  --color-popover: var(--popover);
  --color-popover-foreground: var(--popover-foreground);
  --color-primary: var(--primary);
  --color-primary-foreground: var(--primary-foreground);
  --color-secondary: var(--secondary);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-muted: var(--muted);
  --color-muted-foreground: var(--muted-foreground);
  --color-accent: var(--accent);
  --color-accent-foreground: var(--accent-foreground);
  --color-destructive: var(--destructive);
  --color-destructive-foreground: var(--destructive-foreground);
  --color-border: var(--border);
  --color-success: var(--success);
  --color-warning: var(--warning);
  --color-info: var(--info);
  --color-primary-glow: var(--primary-glow);
  --color-soft: var(--soft);
  --color-nav-inactive: var(--nav-inactive);
  --font-display: "Sora", sans-serif;
  --font-sans: "Manrope", sans-serif;
  --color-input: var(--input);
  --color-ring: var(--ring);
  --color-ring-offset-background: var(--background);
  --color-chart-1: var(--chart-1);
  --color-chart-2: var(--chart-2);
  --color-chart-3: var(--chart-3);
  --color-chart-4: var(--chart-4);
  --color-chart-5: var(--chart-5);
  --color-sidebar: var(--sidebar);
  --color-sidebar-foreground: var(--sidebar-foreground);
  --color-sidebar-primary: var(--sidebar-primary);
  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
  --color-sidebar-accent: var(--sidebar-accent);
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
  --color-sidebar-border: var(--sidebar-border);
  --color-sidebar-ring: var(--sidebar-ring);
}

:root {
  --radius: 1rem;
  --background: #F5F9FF;
  --foreground: #0F172A;
  --card: #FFFFFF;
  --card-foreground: #0F172A;
  --popover: #FFFFFF;
  --popover-foreground: #0F172A;
  --primary: #0066FF;
  --primary-foreground: #FFFFFF;
  --primary-glow: #0099FF;
  --soft: #BDE3FF;
  --secondary: #EAF2FF;
  --secondary-foreground: #0F172A;
  --muted: #EAF2FF;
  --muted-foreground: #475569;
  --accent: #00C6CF;
  --accent-foreground: #FFFFFF;
  --destructive: #E5484D;
  --destructive-foreground: #FFFFFF;
  --success: #00C653;
  --warning: #E59A00;
  --info: #0099FF;
  --border: #D6E4FF;
  --input: #D6E4FF;
  --ring: #0066FF;
  --nav-inactive: #64748B;
  --chart-1: #0066FF;
  --chart-2: #0099FF;
  --chart-3: #00C6CF;
  --chart-4: #00C653;
  --chart-5: #BDE3FF;
  --sidebar: #FFFFFF;
  --sidebar-foreground: #0F172A;
  --sidebar-primary: #0066FF;
  --sidebar-primary-foreground: #FFFFFF;
  --sidebar-accent: #EAF2FF;
  --sidebar-accent-foreground: #0F172A;
  --sidebar-border: #D6E4FF;
  --sidebar-ring: #0066FF;
  --gradient-primary: linear-gradient(135deg, #0066FF, #0099FF);
  --gradient-gold: linear-gradient(135deg, #0099FF, #00C6CF);
  --gradient-curve: linear-gradient(135deg, #0066FF, #0099FF 55%, #BDE3FF);
  --gradient-hero: radial-gradient(ellipse at top, rgb(0 102 255 / 7%), transparent 60%);
  --shadow-glow: 0 10px 28px -10px rgb(0 102 255 / 45%);
  --shadow-card: 0 8px 24px -14px rgb(0 102 255 / 28%);
}

@layer base {
  * {
    border-color: var(--color-border);
  }

  body {
    background-color: var(--color-background);
    color: var(--color-foreground);
  }
}

@layer base {
  body { font-family: var(--font-sans); background-image: var(--gradient-hero); background-attachment: fixed; min-height: 100vh; }
  h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.02em; }
}

@utility glass-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow-card);
}
@utility bg-gradient-primary { background-image: var(--gradient-primary); }
@utility bg-gradient-gold { background-image: var(--gradient-gold); }
@utility text-gradient {
  background-image: var(--gradient-primary);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
@utility shadow-glow { box-shadow: var(--shadow-glow); }
@utility animate-rise { animation: rise 0.45s ease-out both; }

@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@utility bg-gradient-curve { background-image: var(--gradient-curve); }
