@import 'tailwindcss';

@plugin "tailwindcss-animate";

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

/* Montserrat Variable Font */
@font-face {
  font-family: 'Montserrat';
  src: url('./assets/fonts/Montserrat-VariableFont_wght.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@theme inline {
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --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);
  --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: 0.625rem;

  /* Base Colors - Light Mode (oklch format) */
  --background: oklch(1 0 0);
  --foreground: oklch(0.145 0 0);

  --card: oklch(1 0 0);
  --card-foreground: oklch(0.145 0 0);

  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.145 0 0);

  /* Primary - Royal Blue #3f51b5 */
  --primary: oklch(0.488 0.15 264.5);
  --primary-foreground: oklch(0.985 0 0);

  /* Secondary - Soft Purple #9fa8da */
  --secondary: oklch(0.7 0.08 265);
  --secondary-foreground: oklch(0.145 0 0);

  /* Accent - Vibrant Blue #5c6bc0 */
  --accent: oklch(0.58 0.12 265);
  --accent-foreground: oklch(0.985 0 0);

  /* Muted - Neutral Gray */
  --muted: oklch(0.97 0 0);
  --muted-foreground: oklch(0.556 0 0);

  /* Destructive - Soft Red #ef5350 */
  --destructive: oklch(0.63 0.22 27);
  --destructive-foreground: oklch(0.985 0 0);

  /* Border & Input */
  --border: oklch(0.922 0 0);
  --input: oklch(0.922 0 0);
  --ring: oklch(0.488 0.15 264.5);

  /* Chart Colors - Royal Blue variations */
  --chart-1: oklch(0.488 0.15 264.5);
  --chart-2: oklch(0.58 0.12 265);
  --chart-3: oklch(0.64 0.1 265);
  --chart-4: oklch(0.7 0.08 265);
  --chart-5: oklch(0.78 0.06 265);

  /* Sidebar Colors */
  --sidebar: oklch(0.985 0 0);
  --sidebar-foreground: oklch(0.145 0 0);
  --sidebar-primary: oklch(0.488 0.15 264.5);
  --sidebar-primary-foreground: oklch(0.985 0 0);
  --sidebar-accent: oklch(0.97 0 0);
  --sidebar-accent-foreground: oklch(0.145 0 0);
  --sidebar-border: oklch(0.922 0 0);
  --sidebar-ring: oklch(0.488 0.15 264.5);
}

.dark {
  /* Base Colors - Dark Mode (oklch format) - Smooth & Soft */
  --background: oklch(0.17 0.012 265);
  --foreground: oklch(0.94 0.008 265);

  --card: oklch(0.25 0.018 265);
  --card-foreground: oklch(0.93 0.008 265);

  --popover: oklch(0.24 0.018 265);
  --popover-foreground: oklch(0.93 0.008 265);

  /* Primary - Soft Royal Blue for dark mode */
  --primary: oklch(0.67 0.13 267);
  --primary-foreground: oklch(0.96 0.005 265);

  /* Secondary - Gentle Lavender */
  --secondary: oklch(0.62 0.1 268);
  --secondary-foreground: oklch(0.96 0.005 265);

  /* Accent - Muted Purple */
  --accent: oklch(0.72 0.08 270);
  --accent-foreground: oklch(0.18 0.012 265);

  /* Muted - Soft Gray with hint of blue */
  --muted: oklch(0.28 0.012 265);
  --muted-foreground: oklch(0.73 0.01 265);

  /* Destructive - Softer Coral Red */
  --destructive: oklch(0.64 0.19 25);
  --destructive-foreground: oklch(0.96 0.005 265);

  /* Border & Input - Enhanced visibility for dark theme */
  --border: oklch(0.48 0.02 265);
  --input: oklch(0.42 0.02 265);
  --ring: oklch(0.67 0.13 267);

  /* Chart Colors - Harmonious gradient */
  --chart-1: oklch(0.67 0.13 267);
  --chart-2: oklch(0.7 0.11 270);
  --chart-3: oklch(0.74 0.09 273);
  --chart-4: oklch(0.62 0.14 264);
  --chart-5: oklch(0.55 0.16 261);

  /* Sidebar Colors */
  --sidebar: oklch(0.19 0.013 265);
  --sidebar-foreground: oklch(0.93 0.008 265);
  --sidebar-primary: oklch(0.67 0.13 267);
  --sidebar-primary-foreground: oklch(0.96 0.005 265);
  --sidebar-accent: oklch(0.26 0.012 265);
  --sidebar-accent-foreground: oklch(0.93 0.008 265);
  --sidebar-border: oklch(0.32 0.015 265);
  --sidebar-ring: oklch(0.67 0.13 267);
}

@layer base {
  * {
    @apply border-border;
  }

  body {
    @apply bg-background text-foreground;
    font-family:
      'Montserrat',
      -apple-system,
      BlinkMacSystemFont,
      'Segoe UI',
      Roboto,
      sans-serif;
    /* Mobile-first optimizations */
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  /* Hide scrollbar for all browsers */
  * {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
  }

  *::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
  }
}

/* vue-sonner z-index override - ensure toasts appear above header (z-10) and footer (z-10) */
[data-sonner-toaster] {
  z-index: 9999 !important;
}
