/* Smooth animations */
.fade-enter { 
  opacity: 0; 
  transform: translateY(8px); 
}

.fade-enter-active { 
  opacity: 1; 
  transform: translateY(0); 
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
}

.fade-exit { 
  opacity: 1; 
  transform: translateY(0); 
}

.fade-exit-active { 
  opacity: 0; 
  transform: translateY(-8px); 
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); 
}

.modal-enter { 
  opacity: 0; 
  backdrop-filter: blur(0px);
}

.modal-enter-active { 
  opacity: 1; 
  backdrop-filter: blur(8px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
}

.sheet-enter { 
  transform: translateY(100%); 
  opacity: 0; 
}

.sheet-enter-active { 
  transform: translateY(0); 
  opacity: 1; 
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); 
}

.sheet-exit { 
  transform: translateY(0); 
  opacity: 1; 
}

.sheet-exit-active { 
  transform: translateY(100%); 
  opacity: 0; 
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
}

/* Text utilities */
.line-clamp-2 { 
  display: -webkit-box; 
  -webkit-line-clamp: 2; 
  -webkit-box-orient: vertical; 
  overflow: hidden; 
}

.line-clamp-3 { 
  display: -webkit-box; 
  -webkit-line-clamp: 3; 
  -webkit-box-orient: vertical; 
  overflow: hidden; 
}

/* Enhanced chips and badges */
.chip { 
  font-size: 11px; 
  font-weight: 500;
  padding: 4px 10px; 
  border-radius: 12px; 
  color: white;
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.badge { 
  font-size: 10px; 
  font-weight: 600;
  padding: 3px 8px; 
  border-radius: 8px; 
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

/* Enhanced tab styling */
.tab-btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
}

.tab-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.2);
}

.tab-btn.active {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  border-color: transparent;
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
  transform: translateY(-2px);
}

.tab-btn.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
  pointer-events: none;
}

/* Enhanced loading states */
.loading {
  opacity: 0.7;
  pointer-events: none;
  position: relative;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #e5e7eb;
  border-top: 2px solid #6366f1;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Enhanced focus states */
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Card hover effects */
.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Button enhancements */
.btn-primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: white;
  color: #374151;
  border: 2px solid #e5e7eb;
  padding: 8px 16px;
  border-radius: 10px;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary:hover {
  border-color: #6366f1;
  color: #6366f1;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

/* Search input enhancements */
.search-input {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid #e5e7eb;
}

.search-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
  transform: translateY(-1px);
}

/* Timeline enhancements */
.timeline-btn {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-btn:hover .timeline-icon {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.timeline-icon {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Modal enhancements */
.modal-backdrop {
  backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.4);
}

.modal-content {
  border-radius: 24px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive improvements */
@media (max-width: 768px) {
  .grid-cols-auto-fit {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  
  .tab-btn {
    padding: 12px 8px;
    font-size: 14px;
  }
  
  .modal-content {
    border-radius: 20px 20px 0 0;
    margin: 0;
    max-height: 90vh;
  }
}

@media (max-width: 640px) {
  .timeline-mini {
    display: none !important;
  }
  
  .search-mobile {
    margin-bottom: 16px;
  }
}

/* Scroll improvements */
.smooth-scroll {
  scroll-behavior: smooth;
}

.custom-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f5f9;
}

.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

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

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