@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Colors */
  --bg-primary: #0f111a;
  --bg-secondary: #1a1d2d;
  --text-primary: #ffffff;
  --text-secondary: #a0aec0;
  
  --accent-primary: #6366f1; /* Indigo */
  --accent-secondary: #ec4899; /* Pink */
  --accent-tertiary: #10b981; /* Emerald */
  
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  
  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Spacing */
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  /* Add subtle background gradient mesh */
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(236, 72, 153, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.15) 0px, transparent 50%);
  background-attachment: fixed;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
}

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

a:hover {
  color: var(--accent-secondary);
}

/* Glassmorphism Utilities */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--glass-shadow);
  padding: var(--spacing-lg);
}

.glass-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.glass-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.08);
}

/* Modern Layout */
.dashboard-layout {\n  max-width: 100vw;\n  overflow-x: hidden;
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.sidebar {
  border-right: 1px solid var(--glass-border);
  padding: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
  height: 100vh;
  position: sticky;
  top: 0;
  background: rgba(15, 17, 26, 0.8);
  backdrop-filter: blur(16px);
  z-index: 40;
}

.main-content {
  padding: var(--spacing-xl);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl);
}

/* Buttons */
.btn-modern {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
  color: white;
}

.btn-secondary {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Gradients text */
.text-gradient {
  background: linear-gradient(to right, #6366f1, #ec4899, #10b981);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

/* Animations */
@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }

/* Responsive adjustments */
@media (max-width: 1024px) {
  .dashboard-layout {\n  max-width: 100vw;\n  overflow-x: hidden;
    grid-template-columns: 240px 1fr;
  }
}

@media (max-width: 768px) {
  .dashboard-layout {\n  max-width: 100vw;\n  overflow-x: hidden;
    grid-template-columns: 1fr;
    padding-bottom: 80px; /* For mobile bottom nav */
  }
  
  .sidebar {
    display: none; /* Hide sidebar on mobile, show bottom nav instead */
  }
  
  .main-content {
    padding: var(--spacing-md);
  }
  
  .mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(15, 17, 26, 0.9);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-around;
    padding: var(--spacing-sm);
    z-index: 50;
  }
  
  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.75rem;
    gap: 4px;
  }
  
  .mobile-nav-item.active {
    color: var(--accent-primary);
  }
}

/* Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.w-full { width: 100%; }

/* Critical Mobile Layout Overrides */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  width: 100vw !important;
}

select, .btn, .btn2, .btn3, .btn4, input {
  max-width: 100% !important;
}

.workorder-card, .container {
  max-width: 100vw !important;
  box-sizing: border-box !important;
}

/* Mobile Nav Text Color Fix */
.mobile-nav-item span, .mobile-nav-item .material-icons {
  color: #a0aec0 !important; /* Force light gray */
}

.mobile-nav-item:hover span, .mobile-nav-item.active span,
.mobile-nav-item:hover .material-icons, .mobile-nav-item.active .material-icons {
  color: #6366f1 !important; /* Accent primary */
}

.mobile-nav-item {
  padding: 8px 12px;
  background: transparent !important;
}

/* Mobile Header */
.mobile-header {
  display: none;
  padding: 1rem 1.5rem;
  background: rgba(15, 17, 26, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 40;
  text-align: center;
}

@media (max-width: 768px) {
  .mobile-header {
    display: block;
  }
}
