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

:root {
  --font-size: 16px;
  --background: #ffffff;
  --foreground: #2E096F;
  --card: #F5F3FF;
  --card-foreground: #2E096F;
  --popover: #F5F3FF;
  --popover-foreground: #2E096F;
  --primary: #401880;
  --primary-foreground: #ffffff;
  --secondary: #F2EFFB;
  --secondary-foreground: #2E096F;
  --muted: #F5F3FF;
  --muted-foreground: #65637A;
  --accent: #7557D3;
  --accent-foreground: #ffffff;
  --destructive: #EF4444;
  --destructive-foreground: #ffffff;
  --border: rgba(46, 9, 111, 0.12);
  --input: rgba(46, 9, 111, 0.08);
  --input-background: rgba(46, 9, 111, 0.05);
  --switch-background: #E9E3F5;
  --font-weight-medium: 500;
  --font-weight-normal: 400;
  --ring: #401880;
  --chart-1: oklch(0.646 0.222 41.116);
  --chart-2: oklch(0.6 0.118 184.704);
  --chart-3: oklch(0.398 0.07 227.392);
  --chart-4: oklch(0.828 0.189 84.429);
  --chart-5: oklch(0.769 0.188 70.08);
  --radius: 0.75rem;
  --sidebar: #F5F3FF;
  --sidebar-foreground: #2E096F;
  --sidebar-primary: #401880;
  --sidebar-primary-foreground: #ffffff;
  --sidebar-accent: #F2EFFB;
  --sidebar-accent-foreground: #2E096F;
  --sidebar-border: rgba(46, 9, 111, 0.12);
  --sidebar-ring: #401880;
}

.dark {
  --background: #220250;
  --foreground: #ffffff;
  --card: #2E096F;
  --card-foreground: #ffffff;
  --popover: #2E096F;
  --popover-foreground: #ffffff;
  --primary: #7557D3;
  --primary-foreground: #ffffff;
  --secondary: #401880;
  --secondary-foreground: #ffffff;
  --muted: #401880;
  --muted-foreground: rgba(255,255,255,0.6);
  --accent: #9781E6;
  --accent-foreground: #ffffff;
  --destructive: #EF4444;
  --destructive-foreground: #ffffff;
  --border: rgba(255, 255, 255, 0.1);
  --input: rgba(255, 255, 255, 0.1);
  --ring: #7557D3;
  --font-weight-medium: 500;
  --font-weight-normal: 400;
  --chart-1: oklch(0.488 0.243 264.376);
  --chart-2: oklch(0.696 0.17 162.48);
  --chart-3: oklch(0.769 0.188 70.08);
  --chart-4: oklch(0.627 0.265 303.9);
  --chart-5: oklch(0.645 0.246 16.439);
  --sidebar: #0F1629;
  --sidebar-foreground: #F1F5F9;
  --sidebar-primary: #7C5CF6;
  --sidebar-primary-foreground: #FFFFFF;
  --sidebar-accent: #1A2340;
  --sidebar-accent-foreground: #F1F5F9;
  --sidebar-border: rgba(255, 255, 255, 0.08);
  --sidebar-ring: #7C5CF6;
}

@theme inline {
  --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-input: var(--input);
  --color-input-background: var(--input-background);
  --color-switch-background: var(--switch-background);
  --color-ring: var(--ring);
  --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);
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --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);
}

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

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

  /**
  * Default typography styles for HTML elements (h1-h4, p, label, button, input).
  * These are in @layer base, so Tailwind utility classes (like text-sm, text-lg) automatically override them.
  */

  html {
    font-size: var(--font-size);
  }

  h1 {
    font-size: var(--text-2xl);
    font-weight: var(--font-weight-medium);
    line-height: 1.5;
  }

  h2 {
    font-size: var(--text-xl);
    font-weight: var(--font-weight-medium);
    line-height: 1.5;
  }

  h3 {
    font-size: var(--text-lg);
    font-weight: var(--font-weight-medium);
    line-height: 1.5;
  }

  h4 {
    font-size: var(--text-base);
    font-weight: var(--font-weight-medium);
    line-height: 1.5;
  }

  label {
    font-size: var(--text-base);
    font-weight: var(--font-weight-medium);
    line-height: 1.5;
  }

  button {
    font-size: var(--text-base);
    font-weight: var(--font-weight-medium);
    line-height: 1.5;
  }

  input {
    font-size: var(--text-base);
    font-weight: var(--font-weight-normal);
    line-height: 1.5;
  }
}
