/* Custom animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from { 
    opacity: 0; 
    transform: translateY(10px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

/* Custom component classes */
.btn-primary {
  background-color: #2563eb;
  color: white;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: background-color 0.2s;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: #1d4ed8;
}

.btn-secondary {
  background-color: #e5e7eb;
  color: #374151;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: background-color 0.2s;
  border: none;
  cursor: pointer;
}

.btn-secondary:hover {
  background-color: #d1d5db;
}

.btn-success {
  background-color: #16a34a;
  color: white;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: background-color 0.2s;
  border: none;
  cursor: pointer;
}

.btn-success:hover {
  background-color: #15803d;
}

.btn-danger {
  background-color: #dc2626;
  color: white;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: background-color 0.2s;
  border: none;
  cursor: pointer;
}

.btn-danger:hover {
  background-color: #b91c1c;
}

.btn-purple {
  background-color: #7c3aed;
  color: white;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: background-color 0.2s;
  border: none;
  cursor: pointer;
}

.btn-purple:hover {
  background-color: #6d28d9;
}

.card {
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  border: 1px solid #e5e7eb;
  padding: 1.5rem;
}

.screen-container {
  min-height: 100vh;
  background-color: #f9fafb;
  animation: fadeIn 0.3s ease-in-out;
  padding-top: 4rem; /* Account for fixed navigation */
}

.animate-fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

.animate-slide-in {
  animation: slideIn 0.3s ease-in-out;
}

/* Navigation Styles */
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.dropdown-menu {
  top: 100%;
  transform: translateY(0);
  transition: all 0.15s ease-in-out;
  pointer-events: none;
}

.group:hover .dropdown-menu {
  transform: translateY(0);
  pointer-events: auto;
}

/* Dropdown hover delays for better UX */
.group {
  position: relative;
}

.group:hover .dropdown-menu {
  /* Small delay when showing */
  transition-delay: 0.1s;
}

.group .dropdown-menu:hover {
  opacity: 1 !important;
  visibility: visible !important;
  /* No delay when hovering over dropdown */
  transition-delay: 0s;
}

/* Mobile menu transitions */
.mobile-submenu {
  transition: all 0.3s ease-in-out;
  overflow: hidden;
}

.mobile-submenu.hidden {
  max-height: 0;
  opacity: 0;
}

.mobile-submenu:not(.hidden) {
  max-height: 500px;
  opacity: 1;
}

/* Navigation icons */
.rotate-180 {
  transform: rotate(180deg);
}

/* Sticky navigation */
.sticky {
  position: sticky;
  top: 0;
  z-index: 50;
}

/* Primary color variants for navigation */
.text-primary-600 {
  color: #2563eb;
}

.bg-primary-50 {
  background-color: #eff6ff;
}

.hover\:text-primary-600:hover {
  color: #2563eb;
}

/* Toggle switch styles */
.toggle-switch {
  appearance: none;
  width: 3rem;
  height: 1.5rem;
  background-color: #d1d5db;
  border-radius: 0.75rem;
  position: relative;
  cursor: pointer;
  transition: background-color 0.2s;
}

.toggle-switch:checked {
  background-color: #2563eb;
}

.toggle-switch::before {
  content: '';
  position: absolute;
  top: 0.125rem;
  left: 0.125rem;
  width: 1.25rem;
  height: 1.25rem;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.2s;
}

.toggle-switch:checked::before {
  transform: translateX(1.5rem);
}

/* Additional utility classes that might be needed */
.cursor-pointer {
  cursor: pointer;
}

.transition-all {
  transition: all 0.2s ease-in-out;
}

.duration-200 {
  transition-duration: 0.2s;
}

.duration-300 {
  transition-duration: 0.3s;
}

.hover\:scale-105:hover {
  transform: scale(1.05);
}

.hover\:shadow-lg:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.ring-2 {
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

.ring-primary-400 {
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.75);
}

.ring-opacity-75 {
  --tw-ring-opacity: 0.75;
}

/* Custom scrollbar for dropdown menus */
.dropdown-menu::-webkit-scrollbar {
  width: 6px;
}

.dropdown-menu::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.dropdown-menu::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.dropdown-menu::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Ensure content doesn't overlap with fixed navigation */
body {
  padding-top: 0;
}

.main-content {
  padding-top: 1rem;
}

/* Responsive grid */
.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.gap-6 {
  gap: 1.5rem;
}

.gap-8 {
  gap: 2rem;
}

/* Media queries for responsive design */
@media (min-width: 768px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  
  .md\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  
  .lg\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  
  .lg\:col-span-2 {
    grid-column: span 2 / span 2;
  }
  
  .lg\:col-span-3 {
    grid-column: span 3 / span 3;
  }
}

@media (min-width: 1280px) {
  .xl\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Page Header Styles - Ultra Compact Design */
.page-header {
  margin-bottom: 1rem; /* mb-4 equivalent - much less than mb-8 */
}

.page-header-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem; /* gap-2 equivalent - very tight */
}

@media (min-width: 640px) {
  .page-header-container {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem; /* gap-4 for desktop */
  }
}

.page-title {
  font-size: 1.25rem; /* text-xl equivalent - much smaller than text-3xl */
  font-weight: 600; /* font-semibold instead of font-bold */
  color: #111827; /* text-gray-900 equivalent */
  line-height: 1.1;
  margin: 0;
}

.page-description {
  color: #6b7280; /* text-gray-600 equivalent */
  font-size: 0.8125rem; /* smaller than text-sm */
  margin-top: 0.125rem; /* very minimal top margin */
  margin-bottom: 0;
  line-height: 1.3;
}

.page-header-actions {
  flex-shrink: 0;
}

.page-header-actions .btn-primary {
  font-size: 0.875rem; /* text-sm */
  padding: 0.375rem 0.75rem; /* py-1.5 px-3 - more compact button */
}

.page-header-actions .btn-secondary {
  font-size: 0.875rem; /* text-sm */
  padding: 0.375rem 0.75rem; /* py-1.5 px-3 - more compact button */
} 