/* Custom styles for the Attendance System */

/* Smooth transitions for all interactive elements */
* {
  transition: all 0.2s ease-in-out;
}

/* Custom button hover effects */
.btn-hover:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Loading animation */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

/* Navigation active state */
.nav-link.active {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 0.375rem;
}

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

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

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

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

/* Form styling */
.form-input {
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  padding: 0.75rem;
  width: 100%;
  font-size: 0.875rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Table styling */
.table-hover tbody tr:hover {
  background-color: #f9fafb;
}

/* QR Code scanner area */
.qr-scanner {
  border: 2px dashed #d1d5db;
  border-radius: 0.5rem;
  padding: 2rem;
  text-align: center;
  background-color: #f9fafb;
  transition: all 0.2s ease-in-out;
}

.qr-scanner:hover {
  border-color: #3b82f6;
  background-color: #eff6ff;
}

/* Photo upload area */
.photo-upload {
  border: 2px dashed #d1d5db;
  border-radius: 0.5rem;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.photo-upload:hover {
  border-color: #10b981;
  background-color: #ecfdf5;
}

.photo-upload.drag-over {
  border-color: #3b82f6;
  background-color: #eff6ff;
}

/* Notification styles */
.notification {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
  max-width: 400px;
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  animation: slideIn 0.3s ease-out;
}

.notification-success {
  background-color: #dcfce7;
  border-left: 4px solid #22c55e;
  color: #166534;
}

.notification-error {
  background-color: #fee2e2;
  border-left: 4px solid #ef4444;
  color: #991b1b;
}

.notification-warning {
  background-color: #fef3c7;
  border-left: 4px solid #f59e0b;
  color: #92400e;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Chart containers */
.chart-container {
  position: relative;
  width: 100%;
  height: 300px;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .nav-links {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .table-responsive {
    overflow-x: auto;
  }
}

/* Print styles for reports */
@media print {
  .no-print {
    display: none !important;
  }
  
  .print-break {
    page-break-after: always;
  }
  
  body {
    font-size: 12pt;
  }
  
  .bg-gray-50 {
    background-color: #f8f9fa !important;
  }
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Face recognition camera preview */
.camera-preview {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  border-radius: 0.5rem;
  overflow: hidden;
  background-color: #1f2937;
}

.camera-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  border: 2px solid #10b981;
  border-radius: 50%;
  pointer-events: none;
}

/* QR Code display */
.qr-code-display {
  text-align: center;
  padding: 2rem;
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.qr-code-display canvas,
.qr-code-display svg {
  margin: 0 auto;
  border: 1px solid #e5e7eb;
  border-radius: 0.25rem;
}

/* Attendance status indicators */
.attendance-indicator {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 0.5rem;
}

.attendance-indicator.present {
  background-color: #22c55e;
}

.attendance-indicator.late {
  background-color: #f59e0b;
}

.attendance-indicator.absent {
  background-color: #ef4444;
}

/* Dashboard stats animation */
.stat-card {
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: scale(1.02);
}

.stat-number {
  animation: countUp 1s ease-out;
}

@keyframes countUp {
  from {
    transform: scale(0.5);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

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

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

/* Focus styles for accessibility */
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Dark mode support (if needed in the future) */
@media (prefers-color-scheme: dark) {
  /* Dark mode styles can be added here */
}