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

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

:root {
  /* Modern dark theme with black/gray accents */
  --background: oklch(0.08 0 0); /* Dark background */
  --foreground: oklch(0.95 0 0); /* Light text */
  --card: oklch(0.12 0 0); /* Dark cards */
  --card-foreground: oklch(0.95 0 0);
  --popover: oklch(0.12 0 0);
  --popover-foreground: oklch(0.95 0 0);
  --primary: oklch(0.2 0 0); /* Dark gray primary */
  --primary-foreground: oklch(0.98 0 0);
  --secondary: oklch(0.15 0 0); /* Darker gray */
  --secondary-foreground: oklch(0.95 0 0);
  --muted: oklch(0.15 0 0);
  --muted-foreground: oklch(0.65 0 0);
  --accent: oklch(0.18 0 0);
  --accent-foreground: oklch(0.95 0 0);
  --destructive: oklch(0.577 0.245 27.325);
  --destructive-foreground: oklch(0.98 0 0);
  --border: oklch(0.2 0 0); /* Dark borders */
  --input: oklch(0.15 0 0); /* Dark input backgrounds */
  --ring: oklch(0.3 0 0); /* Dark focus ring */
  --chart-1: oklch(0.3 0 0);
  --chart-2: oklch(0.35 0 0);
  --chart-3: oklch(0.4 0 0);
  --chart-4: oklch(0.45 0 0);
  --chart-5: oklch(0.5 0 0);
  --radius: 0.75rem;
  --sidebar: oklch(0.1 0 0);
  --sidebar-foreground: oklch(0.95 0 0);
  --sidebar-primary: oklch(0.2 0 0);
  --sidebar-primary-foreground: oklch(0.98 0 0);
  --sidebar-accent: oklch(0.15 0 0);
  --sidebar-accent-foreground: oklch(0.95 0 0);
  --sidebar-border: oklch(0.2 0 0);
  --sidebar-ring: oklch(0.3 0 0);
}

.dark {
  /* Same as root for consistency */
  --background: oklch(0.08 0 0);
  --foreground: oklch(0.95 0 0);
  --card: oklch(0.12 0 0);
  --card-foreground: oklch(0.95 0 0);
  --popover: oklch(0.12 0 0);
  --popover-foreground: oklch(0.95 0 0);
  --primary: oklch(0.2 0 0);
  --primary-foreground: oklch(0.98 0 0);
  --secondary: oklch(0.15 0 0);
  --secondary-foreground: oklch(0.95 0 0);
  --muted: oklch(0.15 0 0);
  --muted-foreground: oklch(0.65 0 0);
  --accent: oklch(0.18 0 0);
  --accent-foreground: oklch(0.95 0 0);
  --destructive: oklch(0.55 0.25 15);
  --destructive-foreground: oklch(0.98 0 0);
  --border: oklch(0.2 0 0);
  --input: oklch(0.15 0 0);
  --ring: oklch(0.3 0 0);
  --chart-1: oklch(0.3 0 0);
  --chart-2: oklch(0.35 0 0);
  --chart-3: oklch(0.4 0 0);
  --chart-4: oklch(0.45 0 0);
  --chart-5: oklch(0.5 0 0);
  --sidebar: oklch(0.1 0 0);
  --sidebar-foreground: oklch(0.95 0 0);
  --sidebar-primary: oklch(0.2 0 0);
  --sidebar-primary-foreground: oklch(0.98 0 0);
  --sidebar-accent: oklch(0.15 0 0);
  --sidebar-accent-foreground: oklch(0.95 0 0);
  --sidebar-border: oklch(0.2 0 0);
  --sidebar-ring: oklch(0.3 0 0);
}

@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-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);

  --font-sans: ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Monaco", "Cascadia Code", "Roboto Mono", monospace;
}

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

/* Updated utility classes to use dark theme with black/gray colors */
@layer utilities {
  .modern-container {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    min-height: 100vh;
  }

  .modern-sidebar {
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
  }

  .modern-card {
    background: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-radius: 16px;
  }

  .modern-logo {
    background: linear-gradient(135deg, #333333 0%, #555555 100%);
    border-radius: 12px;
    color: white;
  }

  .modern-gradient-text {
    background: linear-gradient(135deg, #ffffff 0%, #cccccc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .modern-text-primary {
    color: #ffffff;
  }

  .modern-text-secondary {
    color: #a0a0a0;
  }

  .modern-nav-item {
    border-radius: 12px;
    transition: all 0.2s ease;
    color: #a0a0a0;
  }

  .modern-nav-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
  }

  .modern-nav-item.active {
    background: linear-gradient(135deg, #333333 0%, #555555 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }

  .modern-button-primary {
    background: linear-gradient(135deg, #333333 0%, #555555 100%);
    color: white;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
  }

  .modern-button-primary:hover {
    background: linear-gradient(135deg, #444444 0%, #666666 100%);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    transform: translateY(-1px);
  }

  .modern-badge {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-weight: 500;
  }

  .modern-input {
    background: rgba(40, 40, 40, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.2s ease;
    color: #ffffff;
  }

  .modern-input:focus {
    border-color: #666666;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
  }

  .modern-select {
    background: rgba(40, 40, 40, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #ffffff;
  }

  .modern-form-section {
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 24px;
  }
}
