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

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

:root {
  /* Updated to modern design system with gradients and glassmorphism */
  --background: #f1f5f9; /* Light gray for overall background */
  --foreground: #475569; /* Dark gray for primary text */
  --card: rgba(255, 255, 255, 0.8); /* Glassmorphism effect */
  --card-foreground: #475569; /* Dark gray for card text */
  --popover: rgba(255, 255, 255, 0.9); /* Slightly opaque for popovers */
  --popover-foreground: #475569; /* Dark gray for popover text */
  --primary: #00a1e4; /* EPTCA Blue */
  --primary-foreground: #ffffff; /* White text on primary */
  --secondary: #ee312f; /* EPTCA Red for details */
  --secondary-foreground: #ffffff; /* White text on secondary */
  --muted: #f1f5f9; /* Light gray for muted backgrounds */
  --muted-foreground: #64748b; /* Medium gray for muted text */
  --accent: #ec4899; /* Vibrant pink for accents */
  --accent-foreground: #ffffff; /* White text on accent elements */
  --destructive: #ee312f; /* Red for destructive actions */
  --destructive-foreground: #ffffff; /* White text on destructive buttons */
  --border: #e2e8f0; /* Light gray for borders */
  --input: #ffffff; /* White for input fields */
  --ring: rgba(0, 161, 228, 0.3); /* Light blue ring for focus */
  --chart-1: #00a1e4; /* Blue for charts */
  --chart-2: #ee312f; /* Red for charts */
  --chart-3: #ec4899; /* Pink for charts */
  --chart-4: #10b981; /* Emerald for charts */
  --chart-5: #8b5cf6; /* Purple for charts */
  --radius: 1rem; /* More rounded corners for modern look */
  --sidebar: rgba(255, 255, 255, 0.95); /* Glassmorphism sidebar */
  --sidebar-foreground: #475569; /* Dark gray for sidebar text */
  --sidebar-primary: #00a1e4; /* Blue for primary sidebar elements */
  --sidebar-primary-foreground: #ffffff; /* White text on primary sidebar elements */
  --sidebar-accent: #ec4899; /* Pink for sidebar accent */
  --sidebar-accent-foreground: #ffffff; /* White text on sidebar accent */
  --sidebar-border: rgba(226, 232, 240, 0.5); /* Semi-transparent borders */
  --sidebar-ring: rgba(0, 161, 228, 0.3); /* Light blue ring for sidebar focus */
}

.dark {
  --background: oklch(0.145 0 0);
  --foreground: oklch(0.985 0 0);
  --card: oklch(0.145 0 0);
  --card-foreground: oklch(0.985 0 0);
  --popover: oklch(0.145 0 0);
  --popover-foreground: oklch(0.985 0 0);
  --primary: oklch(0.985 0 0);
  --primary-foreground: oklch(0.205 0 0);
  --secondary: oklch(0.269 0 0);
  --secondary-foreground: oklch(0.985 0 0);
  --muted: oklch(0.269 0 0);
  --muted-foreground: oklch(0.708 0 0);
  --accent: oklch(0.269 0 0);
  --accent-foreground: oklch(0.985 0 0);
  --destructive: oklch(0.396 0.141 25.723);
  --destructive-foreground: oklch(0.637 0.237 25.331);
  --border: oklch(0.269 0 0);
  --input: oklch(0.269 0 0);
  --ring: oklch(0.439 0 0);
  --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: oklch(0.205 0 0);
  --sidebar-foreground: oklch(0.985 0 0);
  --sidebar-primary: oklch(0.488 0.243 264.376);
  --sidebar-primary-foreground: oklch(0.985 0 0);
  --sidebar-accent: oklch(0.269 0 0);
  --sidebar-accent-foreground: oklch(0.985 0 0);
  --sidebar-border: oklch(0.269 0 0);
  --sidebar-ring: oklch(0.439 0 0);
}

/* Updated font configuration for DM Sans */
@theme inline {
  --font-sans: "DM Sans", var(--font-geist-sans);
  --font-mono: var(--font-geist-mono);
  --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-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 {
  * {
    @apply border-border outline-ring/50;
  }
  body {
    @apply bg-background text-foreground;
  }
}

/* Added modern gradient and glassmorphism utilities */
@layer utilities {
  .gradient-primary {
    background: linear-gradient(135deg, #00a1e4 0%, #0284c7 100%);
  }

  .gradient-accent {
    background: linear-gradient(135deg, #00a1e4 0%, #0ea5e9 100%);
  }

  .glass-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
  }

  .glass-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  }

  .floating-card {
    transform: translateY(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .floating-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  }

  .mesh-gradient {
    background: radial-gradient(at 40% 20%, rgba(0, 161, 228, 0.3) 0px, transparent 50%),
      radial-gradient(at 80% 0%, rgba(238, 49, 47, 0.2) 0px, transparent 50%),
      radial-gradient(at 0% 50%, rgba(236, 72, 153, 0.2) 0px, transparent 50%),
      radial-gradient(at 80% 50%, rgba(16, 185, 129, 0.2) 0px, transparent 50%),
      radial-gradient(at 0% 100%, rgba(139, 92, 246, 0.2) 0px, transparent 50%),
      radial-gradient(at 80% 100%, rgba(0, 161, 228, 0.2) 0px, transparent 50%),
      radial-gradient(at 0% 0%, rgba(238, 49, 47, 0.2) 0px, transparent 50%);
  }
}
