/* 
  =========================================
  AIPRODGEN - PREMIUM DESIGN SYSTEM
  =========================================
*/

:root {
  /* Colors */
  --bg-dark: #0a0a0a;
  --bg-darker: #050505;
  --bg-card: #121212;
  --bg-card-hover: #1e1e1e;
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  
  /* Brand Gradients & Colors */
  --brand-primary: #6366f1; /* Indigo */
  --brand-secondary: #a855f7; /* Purple */
  --brand-accent: #ec4899; /* Pink */
  
  --gradient-brand: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
  --gradient-glow: linear-gradient(135deg, rgba(99, 102, 241, 0.5) 0%, rgba(168, 85, 247, 0.5) 100%);

  /* Borders & Glassmorphism */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --glass-bg: rgba(18, 18, 18, 0.6);
  --glass-blur: blur(12px);

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  
  /* Animations */
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* =========================================
   BASE
   ========================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

/* =========================================
   TYPOGRAPHY
   ========================================= */
.h1, .h2, .h3, .h4 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); margin-bottom: var(--space-md); }
.h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: var(--space-sm); }
.h3 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: var(--space-sm); }

.text-gradient {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }

/* =========================================
   LAYOUT UTILITIES
   ========================================= */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-sm);
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }

.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.section { padding: var(--space-xl) 0; }
.py-md { padding-top: var(--space-md); padding-bottom: var(--space-md); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

/* =========================================
   COMPONENTS
   ========================================= */
   
/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-smooth);
  border: none;
  outline: none;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--gradient-brand);
  color: white;
  position: relative;
  z-index: 1;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 9999px;
  background: var(--gradient-brand);
  z-index: -1;
  transition: opacity var(--transition-smooth);
  opacity: 0;
  filter: blur(8px);
}

.btn-primary:hover::before {
  opacity: 0.7;
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-hover);
}

/* Glass Panels & Cards */
.glass-panel, .card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: 1.5rem;
  padding: var(--space-md);
  transition: all var(--transition-smooth);
}

.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
}

/* Header/Nav */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 80px;
  display: flex;
  align-items: center;
  z-index: 100;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-links {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

.nav-link {
  color: var(--text-muted);
  font-weight: 500;
}

.nav-link:hover {
  color: var(--text-main);
}

/* Inputs & Forms */
.input-field {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--transition-fast);
}

.input-field:focus {
  outline: none;
  border-color: var(--brand-primary);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.1);
  color: var(--brand-primary);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

/* =========================================
   ANIMATIONS
   ========================================= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-up {
  opacity: 0;
  animation: fadeUp 0.8s var(--transition-smooth) forwards;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }

/* Dashboard Specific Layout */
.dashboard-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--bg-card);
  border-right: 1px solid var(--border-subtle);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  margin-bottom: 0.25rem;
}

.sidebar-link:hover, .sidebar-link.active {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.sidebar-link.active {
  background: rgba(99, 102, 241, 0.1);
  color: var(--brand-primary);
}

.main-content {
  padding: var(--space-md) var(--space-lg);
}

@media (max-width: 768px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: none;
  }
  .main-content {
    padding: var(--space-md) var(--space-sm);
  }
  .nav-links {
    display: none;
  }
}
