/* Improved Layout CSS for Better UI/UX */

/* Global improvements */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
}

/* Navigation improvements */
.nav-dropdown {
  transition: all 0.2s ease-in-out;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease-in-out;
}

/* Compact card styles */
.compact-card {
  transition: all 0.2s ease-in-out;
}

.compact-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Responsive grid improvements */
.responsive-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

@media (max-width: 640px) {
  .responsive-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
  }
}

/* Better spacing for mobile */
@media (max-width: 768px) {
  .mobile-compact {
    padding: 0.75rem;
  }
  
  .mobile-compact .text-2xl {
    font-size: 1.5rem;
  }
  
  .mobile-compact .text-xl {
    font-size: 1.125rem;
  }
}

/* Improved button styles */
.btn-compact {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border-radius: 0.375rem;
  transition: all 0.2s ease-in-out;
}

.btn-compact:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Better form spacing */
.form-compact .form-group {
  margin-bottom: 1rem;
}

.form-compact .form-label {
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

/* Improved table styles */
.table-compact {
  font-size: 0.875rem;
}

.table-compact th,
.table-compact td {
  padding: 0.5rem 0.75rem;
}

/* Better modal spacing */
.modal-compact .modal-content {
  padding: 1.5rem;
}

.modal-compact .modal-header {
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

/* Improved loading states */
.loading-compact {
  padding: 2rem 1rem;
}

.loading-compact .spinner {
  width: 2rem;
  height: 2rem;
}

/* Better scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Improved focus states */
.focus-improved:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Better spacing utilities */
.space-y-compact > * + * {
  margin-top: 0.75rem;
}

.space-x-compact > * + * {
  margin-left: 0.5rem;
}

/* Improved responsive text */
@media (max-width: 640px) {
  .text-responsive {
    font-size: 0.875rem;
  }
  
  .text-responsive-lg {
    font-size: 1.125rem;
  }
}

/* Better card hover effects */
.card-hover {
  transition: all 0.2s ease-in-out;
}

.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Improved notification styles */
.notification-compact {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  border-radius: 0.5rem;
}

/* Better icon sizing */
.icon-sm {
  width: 1rem;
  height: 1rem;
}

.icon-md {
  width: 1.25rem;
  height: 1.25rem;
}

.icon-lg {
  width: 1.5rem;
  height: 1.5rem;
}

/* Improved status indicators */
.status-indicator {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.status-indicator.success {
  background-color: #dcfce7;
  color: #166534;
}

.status-indicator.warning {
  background-color: #fef3c7;
  color: #92400e;
}

.status-indicator.error {
  background-color: #fee2e2;
  color: #991b1b;
}

/* Better responsive navigation */
@media (max-width: 1024px) {
  .nav-responsive {
    font-size: 0.875rem;
  }
  
  .nav-responsive .nav-item {
    padding: 0.5rem 0.75rem;
  }
}

@media (max-width: 768px) {
  .nav-responsive {
    font-size: 0.8rem;
  }
  
  .nav-responsive .nav-item {
    padding: 0.375rem 0.5rem;
  }
}
