/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Nav link active state */
.nav-link.active {
  background-color: #eef2ff;
  color: #4f46e5;
  font-weight: 600;
}
.nav-link.active i {
  color: #4f46e5;
}

/* Toast animations */
.toast-enter {
  animation: toastIn 0.3s ease forwards;
}
.toast-exit {
  animation: toastOut 0.3s ease forwards;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(100%); }
}

/* Stat card hover */
.stat-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Badge styles */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.25rem;
}
.badge-green { background: #dcfce7; color: #166534; }
.badge-yellow { background: #fef9c3; color: #854d0e; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-gray { background: #f3f4f6; color: #374151; }
.badge-purple { background: #f3e8ff; color: #6b21a8; }

/* Table responsive */
.table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* QR scanner container */
#qr-reader {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}
#qr-reader video {
  border-radius: 0.75rem;
}

/* Photo preview */
.photo-preview {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 0.75rem;
  border: 2px solid #e5e7eb;
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 0.5rem;
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Print styles */
@media print {
  #sidebar, header, .no-print { display: none !important; }
  main { margin-left: 0 !important; padding-top: 0 !important; }
}
