@import 'tailwindcss';
@import "tw-animate-css";

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

@theme {
  --color-background: oklch(var(--background));
  --color-foreground: oklch(var(--foreground));
  --color-card: oklch(var(--card));
  --color-card-foreground: oklch(var(--card-foreground));
  --color-popover: oklch(var(--popover));
  --color-popover-foreground: oklch(var(--popover-foreground));
  --color-primary: oklch(var(--primary));
  --color-primary-foreground: oklch(var(--primary-foreground));
  --color-secondary: oklch(var(--secondary));
  --color-secondary-foreground: oklch(var(--secondary-foreground));
  --color-muted: oklch(var(--muted));
  --color-muted-foreground: oklch(var(--muted-foreground));
  --color-accent: oklch(var(--accent));
  --color-accent-foreground: oklch(var(--accent-foreground));
  --color-destructive: oklch(var(--destructive));
  --color-destructive-foreground: oklch(var(--destructive-foreground));
  --color-error: oklch(var(--error));
  --color-error-foreground: oklch(var(--error-foreground));
  --color-success: oklch(var(--success));
  --color-success-foreground: oklch(var(--success-foreground));
  --color-border: oklch(var(--border));
  --color-input: oklch(var(--input));
  --color-ring: oklch(var(--ring));

  /* Sidebar */
  --color-sidebar: oklch(var(--sidebar));
  --color-sidebar-foreground: oklch(var(--sidebar-foreground));
  --color-sidebar-primary: oklch(var(--sidebar-primary));
  --color-sidebar-primary-foreground: oklch(var(--sidebar-primary-foreground));
  --color-sidebar-accent: oklch(var(--sidebar-accent));
  --color-sidebar-accent-foreground: oklch(var(--sidebar-accent-foreground));
  --color-sidebar-border: oklch(var(--sidebar-border));
  --color-sidebar-ring: oklch(var(--sidebar-ring));

  /* Chart */
  --color-chart-1: oklch(var(--chart-1));
  --color-chart-2: oklch(var(--chart-2));
  --color-chart-3: oklch(var(--chart-3));
  --color-chart-4: oklch(var(--chart-4));
  --color-chart-5: oklch(var(--chart-5));

  /* Border radius */
  --radius: 0.625rem;
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);

  /* Typography */
  --font-sans: var(--font-sans), ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji',
    'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';

  /* Animations */
  --animate-accordion-down: accordion-down 0.2s ease-out;
  --animate-accordion-up: accordion-up 0.2s ease-out;
}

/* Keyframes */
@keyframes accordion-down {
  from { height: 0; }
  to { height: var(--radix-accordion-content-height); }
}

@keyframes accordion-up {
  from { height: var(--radix-accordion-content-height); }
  to { height: 0; }
}

@utility container {
  margin-inline: auto;
  padding-inline: 2rem;
  @media (min-width: theme('screens.sm')) {
    max-width: none;
  }
  @media (min-width: 1400px) {
    max-width: 1400px;
  }
}

@layer base {
  *,
  ::after,
  ::before,
  ::backdrop,
  ::file-selector-button {
    border-color: var(--color-gray-200, currentColor);
  }

  :root {
    --background: 1 0 0;
    --foreground: 0.129 0.042 264.695;
    --card: 1 0 0;
    --card-foreground: 0.129 0.042 264.695;
    --popover: 1 0 0;
    --popover-foreground: 0.129 0.042 264.695;
    --primary: 0.208 0.042 265.755;
    --primary-foreground: 0.984 0.003 247.858;
    --secondary: 0.968 0.007 247.896;
    --secondary-foreground: 0.208 0.042 265.755;
    --muted: 0.968 0.007 247.896;
    --muted-foreground: 0.554 0.046 257.417;
    --accent: 0.968 0.007 247.896;
    --accent-foreground: 0.208 0.042 265.755;
    --destructive: 0.577 0.245 27.325;
    --destructive-foreground: 0.984 0.003 247.858;
    --error: 0.577 0.245 27.325;
    --error-foreground: 0.984 0.003 247.858;
    --success: 0.6 0.118 184.704;
    --success-foreground: 0.984 0.003 247.858;
    --border: 0.929 0.013 255.508;
    --input: 0.929 0.013 255.508;
    --ring: 0.704 0.04 256.788;
    
    /* Chart */
    --chart-1: 0.646 0.222 41.116;
    --chart-2: 0.6 0.118 184.704;
    --chart-3: 0.398 0.07 227.392;
    --chart-4: 0.828 0.189 84.429;
    --chart-5: 0.769 0.188 70.08;
    
    /* Sidebar */
    --sidebar: 0.984 0.003 247.858;
    --sidebar-foreground: 0.129 0.042 264.695;
    --sidebar-primary: 0.208 0.042 265.755;
    --sidebar-primary-foreground: 0.984 0.003 247.858;
    --sidebar-accent: 0.968 0.007 247.896;
    --sidebar-accent-foreground: 0.208 0.042 265.755;
    --sidebar-border: 0.929 0.013 255.508;
    --sidebar-ring: 0.704 0.04 256.788;
  }

  /* Dark theme */
  .dark {
    --background: 0.129 0.042 264.695;
    --foreground: 0.984 0.003 247.858;
    --card: 0.208 0.042 265.755;
    --card-foreground: 0.984 0.003 247.858;
    --popover: 0.208 0.042 265.755;
    --popover-foreground: 0.984 0.003 247.858;
    --primary: 0.929 0.013 255.508;
    --primary-foreground: 0.208 0.042 265.755;
    --secondary: 0.279 0.041 260.031;
    --secondary-foreground: 0.984 0.003 247.858;
    --muted: 0.279 0.041 260.031;
    --muted-foreground: 0.704 0.04 256.788;
    --accent: 0.279 0.041 260.031;
    --accent-foreground: 0.984 0.003 247.858;
    --destructive: 0.704 0.191 22.216;
    --destructive-foreground: 0.984 0.003 247.858;
    --error: 0.704 0.191 22.216;
    --error-foreground: 0.984 0.003 247.858;
    --success: 0.696 0.17 162.48;
    --success-foreground: 0.984 0.003 247.858;
    --border: 1 0 0 / 10%;
    --input: 1 0 0 / 15%;
    --ring: 0.551 0.027 264.364;
    
    /* Chart */
    --chart-1: 0.488 0.243 264.376;
    --chart-2: 0.696 0.17 162.48;
    --chart-3: 0.769 0.188 70.08;
    --chart-4: 0.627 0.265 303.9;
    --chart-5: 0.645 0.246 16.439;
    
    /* Sidebar */
    --sidebar: 0.208 0.042 265.755;
    --sidebar-foreground: 0.984 0.003 247.858;
    --sidebar-primary: 0.488 0.243 264.376;
    --sidebar-primary-foreground: 0.984 0.003 247.858;
    --sidebar-accent: 0.279 0.041 260.031;
    --sidebar-accent-foreground: 0.984 0.003 247.858;
    --sidebar-border: 1 0 0 / 10%;
    --sidebar-ring: 0.551 0.027 264.364;
  }

  * {
    @apply border-border outline-ring/50;
  }
  
  body {
    @apply bg-background text-foreground;
  }
}

