/* ════════════════════════════════════════════════════════════════════════════
   DEBUG - FORCE SIDEBAR TO SHOW
   Note: Debug styles moved to base.css (commented out by default)
════════════════════════════════════════════════════════════════════════════ */

/* ────────────────────────────────────────────────────────────────────────────
   ASTRA - CONSOLIDATED CSS STYLES
   All styling for the advanced vehicle inspection system
   Note: Base template styles (sidebar, nav, user menu) are now in base.css
───────────────────────────────────────────────────────────────────────────── */

/* ────────────────────────────────────────────────────────────────────────────
   GLOBAL VARIABLES & RESET
───────────────────────────────────────────────────────────────────────────── */

:root {
  --primary-color: #007bff;
  --primary-hover: #0056b3;
  --primary-light: rgba(0, 123, 255, 0.1);
  --accent-color: #28a745;
  --bg-color: #f8f9fa;
  --bg-gradient: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #dee2e6 100%);
  --card-bg: #ffffff;
  --card-bg-hover: #f8f9ff;
  --text-color: #212529;
  --text-primary: #2c3e50;
  --text-secondary: #6c757d;
  --muted-text: #6c757d;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --error-color: #dc3545;
  --border-color: #dee2e6;
  --background-secondary: #f8f9fa;
  --shadow-light: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --shadow-medium: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --shadow-heavy: 0 1rem 3rem rgba(0, 0, 0, 0.175);
  --shadow-glow: 0 0 20px rgba(0, 123, 255, 0.3);
  --transition-speed: 0.3s;
  --transition-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --border-radius: 0.5rem;
  --border-radius-small: 0.375rem;
  --border-radius-large: 1rem;
  --animation-scale: 1.02;
  --sidebar-width: 280px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;
  background: var(--bg-gradient);
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Bootstrap Integration */
.btn-primary {
  --bs-btn-bg: var(--primary-color);
  --bs-btn-border-color: var(--primary-color);
  --bs-btn-hover-bg: var(--primary-hover);
  --bs-btn-hover-border-color: var(--primary-hover);
  --bs-btn-active-bg: var(--primary-hover);
  --bs-btn-active-border-color: var(--primary-hover);
}

.btn-success {
  --bs-btn-bg: var(--success-color);
  --bs-btn-border-color: var(--success-color);
}

.btn-danger {
  --bs-btn-bg: var(--error-color);
  --bs-btn-border-color: var(--error-color);
}

.btn-warning {
  --bs-btn-bg: var(--warning-color);
  --bs-btn-border-color: var(--warning-color);
}

/* Card Enhancements */
.card {
  border: none;
  box-shadow: var(--shadow-light);
  border-radius: var(--border-radius);
  transition: all var(--transition-speed) ease;
}

.card:hover {
  box-shadow: var(--shadow-medium);
  transform: translateY(-2px);
}

.card-header {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  color: white;
  border-bottom: none;
  font-weight: 600;
}

/* Form Enhancements */
.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem var(--primary-light);
}

.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem var(--primary-light);
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--background-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: var(--border-radius-small);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-hover);
}

/* ────────────────────────────────────────────────────────────────────────────
   ANIMATIONS & KEYFRAMES
───────────────────────────────────────────────────────────────────────────── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes shimmer {
  0% {
    background-position: -468px 0;
  }
  100% {
    background-position: 468px 0;
  }
}

/* Animation classes */
.animate-fadeInUp {
  animation: fadeInUp 0.6s ease-out;
}

.animate-fadeInScale {
  animation: fadeInScale 0.5s var(--transition-bounce);
}

.animate-slideInLeft {
  animation: slideInLeft 0.6s ease-out;
}

.animate-slideInRight {
  animation: slideInRight 0.6s ease-out;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-pulse {
  animation: pulse 2s infinite;
}

/* ────────────────────────────────────────────────────────────────────────────
   LAYOUT & CONTAINERS
───────────────────────────────────────────────────────────────────────────── */
/* ────────────────────────────────────────────────────────────────────────────
   LAYOUT & CONTAINERS - Bootstrap Enhanced
───────────────────────────────────────────────────────────────────────────── */
/* Custom container enhancement - use with Bootstrap container classes */
.container.enhanced {
  background: var(--card-bg);
  border-radius: var(--border-radius-large);
  box-shadow: var(--shadow-medium);
  position: relative;
  overflow: hidden;
  animation: fadeInScale 0.6s ease-out;
}

.container.enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transition: left 0.8s ease;
}

.container.enhanced:hover::before {
  left: 100%;
}

/* Glass effect utility class */
.glass-container {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius-large);
  box-shadow: var(--shadow-heavy);
}

/* Centered section - use with Bootstrap utilities: 
   d-flex flex-column align-items-center text-center mx-auto p-4 */
.centered-section {
  max-width: 800px;
  animation: fadeInUp 0.8s ease-out;
}

.centered-section .form-group {
  width: 100%;
  max-width: 500px;
}

/* Form group styling - use with Bootstrap mb-3 d-flex flex-column align-items-center */
.centered-section .form-group label {
  font-weight: bold;
  color: var(--text-primary);
}

.centered-section .form-group input,
.centered-section .form-group select {
  width: 100%;
  max-width: 400px;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-small);
  font-size: 1rem;
  transition: all var(--transition-speed) ease;
  text-align: center;
}

.registration-section {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  padding: 2rem;
  border-radius: var(--border-radius);
  margin-bottom: 2rem;
  border: 1px solid var(--border-color);
  transition: all var(--transition-speed) ease;
  position: relative;
  overflow: hidden;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  width: 100% !important;
}

.registration-section h2,
.registration-section .registration-method-title {
  text-align: center !important;
  margin-bottom: 2rem !important;
  width: 100% !important;
}

.registration-section form {
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  max-width: 600px !important;
  margin: 0 auto !important;
}

/* Specific styles for registration section buttons and elements */
.registration-section #captureBtn,
.registration-section #submitCaptured {
  width: 100%;
  max-width: 400px;
  margin: 1rem auto;
  display: block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: bold;
  border-radius: var(--border-radius);
  transition: all var(--transition-speed) ease;
  position: relative;
  z-index: 10;
}

.registration-section .frame-counter {
  text-align: center;
  margin: 1.5rem auto;
  padding: 1rem;
  background: rgba(248, 249, 250, 0.9);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  max-width: 400px;
  width: 100%;
  display: block;
}

.registration-section .frame-counter span {
  font-weight: bold;
  color: var(--primary-color);
  font-size: 1.1em;
}

.registration-section .frame-counter small {
  display: block;
  margin-top: 0.5rem;
  color: var(--muted-text);
  font-size: 0.875rem;
}
.registration-section .form-group {
  width: 100% !important;
  max-width: 500px !important;
  margin: 0 auto 1.5rem auto !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
}

.registration-section .form-group label {
  font-weight: bold !important;
  margin-bottom: 0.5rem !important;
  color: var(--text-primary) !important;
  text-align: center !important;
  width: 100% !important;
  display: block !important;
}

.registration-section .form-group input[type="text"],
.registration-section .form-group input[type="file"],
.registration-section .form-group select,
.registration-section .form-group .form-control {
  width: 100% !important;
  max-width: 400px !important;
  padding: 0.75rem !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--border-radius-small) !important;
  font-size: 1rem !important;
  transition: all var(--transition-speed) ease !important;
  text-align: center !important;
  margin: 0 auto !important;
  display: block !important;
  box-sizing: border-box !important;
}

.registration-section .form-group input[type="text"]:focus,
.registration-section .form-group input[type="file"]:focus,
.registration-section .form-group select:focus,
.registration-section .form-group .form-control:focus {
  border-color: var(--primary-color) !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25) !important;
}

.registration-section .form-group .form-text {
  text-align: center !important;
  margin-top: 0.5rem !important;
  color: var(--muted-text) !important;
  font-size: 0.875rem !important;
  width: 100% !important;
  display: block !important;
}

/* Specific overrides for upload form elements */
#upload_ve_id,
#upload_ve_name,
#images {
  width: 100% !important;
  max-width: 400px !important;
  margin: 0 auto !important;
  display: block !important;
  text-align: center !important;
}

.upload-button-container {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

.registration-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.registration-section:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.grid-container {
  display: grid;
  gap: 2rem;
  animation: fadeInUp 0.6s ease-out;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ────────────────────────────────────────────────────────────────────────────
   TYPOGRAPHY
───────────────────────────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-weight: 700;
  letter-spacing: -0.02em;
  position: relative;
}

h1 { 
  font-size: clamp(2rem, 5vw, 3rem);
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 0.8s ease-out;
}

/* Override gradient for page-title h1 elements */
h1.page-title,
.page-title h1 {
  background: none !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: #2d84ff !important;
  background-clip: unset !important;
  color: #2d84ff !important;
}

h2 { 
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  color: var(--text-primary);
}

h3 { 
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  color: var(--text-secondary);
}

h4 { 
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-highlight {
  background: linear-gradient(120deg, transparent 0%, var(--primary-light) 0%);
  background-repeat: no-repeat;
  background-size: 100% 40%;
  background-position: 0 85%;
  transition: background-size 0.6s ease;
}

.text-highlight:hover {
  background-size: 100% 100%;
}

.section-title {
  position: relative;
  display: inline-block;
  margin-bottom: 2rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: 2px;
}

/* ────────────────────────────────────────────────────────────────────────────
   SIDEBAR BASE STYLES - ENHANCED FOR BOOTSTRAP
───────────────────────────────────────────────────────────────────────────── */

/* ────────────────────────────────────────────────────────────────────────────
   SIDEBAR & USER MENU STYLES
   Note: Moved to base.css for better organization
───────────────────────────────────────────────────────────────────────────── */

/* ────────────────────────────────────────────────────────────────────────────
   MISC
───────────────────────────────────────────────────────────────────────────── */

/* ────────────────────────────────────────────────────────────────────────────
   BUTTONS - Bootstrap Enhanced
───────────────────────────────────────────────────────────────────────────── */
/* Custom button enhancements - use with Bootstrap .btn classes */
.btn.enhanced {
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
  transition: all var(--transition-speed) var(--transition-bounce);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.btn.enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.btn.enhanced:hover::before {
  left: 100%;
}

/* Custom primary button enhancement */
.btn-primary.enhanced:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium), var(--shadow-glow);
}

/* Custom secondary button enhancement */
.btn-secondary.enhanced:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.btn-success {
  background: linear-gradient(135deg, var(--success-color), #218838);
  color: white;
  box-shadow: var(--shadow-light);
}

.btn-success:hover {
  background: linear-gradient(135deg, #218838, #1e7e34);
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-medium);
}

.btn-warning {
  background: linear-gradient(135deg, var(--warning-color), #e0a800);
  color: #212529;
  box-shadow: var(--shadow-light);
}

.btn-warning:hover {
  background: linear-gradient(135deg, #e0a800, #d39e00);
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-medium);
}

.btn-danger {
  background: linear-gradient(135deg, var(--error-color), #c82333);
  color: white;
  box-shadow: var(--shadow-light);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #c82333, #bd2130);
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-medium);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-medium);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--primary-color);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px) scale(1.02);
}

button:disabled,
.btn:disabled {
  background: #e9ecef !important;
  color: #6c757d !important;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
  opacity: 0.6;
}

button:active,
.btn:active {
  transform: translateY(-1px) scale(0.98);
}

.btn-floating {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  padding: 0;
  font-size: 1.5rem;
  z-index: 1000;
  animation: float 3s ease-in-out infinite;
}

.btn-icon {
  padding: 0.75rem;
  border-radius: 50%;
  width: 50px;
  height: 50px;
}

.refresh-btn {
  background: linear-gradient(135deg, var(--success-color), #218838);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all var(--transition-speed) var(--transition-bounce);
  padding: 0.75rem 1.25rem;
  margin-top: 1rem;
  position: relative;
  overflow: hidden;
}

.refresh-btn:hover {
  background: linear-gradient(135deg, #218838, #1e7e34);
  transform: translateY(-2px) scale(1.05);
  box-shadow: var(--shadow-medium);
}

.refresh-btn i {
  margin-right: 0.5rem;
  transition: transform var(--transition-speed) ease;
}

.refresh-btn:hover i {
  transform: rotate(180deg);
}

.capture-controls {
  text-align: center;
  margin: 2rem 0;
  animation: fadeInUp 0.8s ease-out;
  position: relative;
  z-index: 10;
  background: rgba(255, 255, 255, 0.9);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
}

.capture-submit-controls {
  text-align: center;
  margin: 2rem 0;
  animation: fadeInUp 0.8s ease-out;
  position: relative;
  z-index: 10;
  background: rgba(255, 255, 255, 0.9);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
}

.captured-frames-container {
  margin: 1.5rem 0;
  padding: 1rem;
  background: rgba(248, 249, 250, 0.9);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  text-align: center;
}

.frame-counter {
  margin: 1rem 0;
  color: var(--muted-text);
  font-size: 1.1em;
  font-weight: bold;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-block;
}

/* ────────────────────────────────────────────────────────────────────────────
   VIDEO & CAMERA COMPONENTS
───────────────────────────────────────────────────────────────────────────── */
.camera-section {
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  animation: fadeInScale 0.8s ease-out;
  position: relative;
  z-index: 1;
  padding: 1rem;
}

.camera-section label {
  font-weight: bold;
  color: #333;
  text-align: center;
  margin-bottom: 0.5rem;
  width: 100%;
}

.camera-section select {
  width: 100%;
  max-width: 400px;
  padding: 0.75rem;
  border-radius: 4px;
  border: 1px solid #ddd;
  background-color: white;
  font-size: 1rem;
  cursor: pointer;
  position: relative;
  z-index: 16;
  margin: 0 auto 1.5rem auto;
  display: block;
  text-align: center;
}

.camera-section select:focus {
  border-color: #007bff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
  z-index: 17;
}

.camera-select-container {
  width: 100%;
  max-width: 640px;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.95);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-light);
  position: relative;
  z-index: 15;
}

.camera-select-container label {
  font-weight: bold;
  color: #333;
  text-align: center;
  margin-bottom: 0.5rem;
}

.camera-select-container select {
  width: 100%;
  padding: 0.75rem;
  border-radius: 4px;
  border: 1px solid #ddd;
  background-color: white;
  font-size: 1rem;
  cursor: pointer;
  position: relative;
  z-index: 16;
}

.camera-select-container select:focus {
  border-color: #007bff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
  z-index: 17;
}

/* Webcam video specific styles */
#webcam {
  width: 100%;
  max-width: 640px;
  height: 480px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
  display: block;
  margin: 1rem auto 2rem auto;
  position: relative;
  z-index: 2;
  background: #000;
}

.video-container {
  position: relative;
  display: inline-block;
  margin: 0 auto;
  background: #000000;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-medium);
  width: 640px;
  height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--primary-color);
  transition: all var(--transition-speed) ease;
  z-index: 2;
}

.video-container:hover {
  transform: scale(1.01);
  box-shadow: var(--shadow-heavy);
  border-color: var(--accent-color);
}

#liveVideo,
#webcam {
  position: relative;
  z-index: 2;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--border-radius-small);
  transition: all var(--transition-speed) ease;
}

#overlayCanvas {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 10;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Enhanced fullscreen video styles */
.video-container.fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  z-index: 9999 !important;
  background: #000 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  border: none !important;
}

.video-container.fullscreen #liveVideo,
.video-container.fullscreen #overlayCanvas {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  max-width: none !important;
  max-height: none !important;
}

.fullscreen-btn {
  position: absolute;
  bottom: 15px;
  right: 15px;
  z-index: 1000;
  background: rgba(0, 123, 255, 0.9);
  color: white;
  border: none;
  border-radius: var(--border-radius-small);
  padding: 10px;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  font-size: 1rem;
}

.fullscreen-btn:hover {
  background: var(--primary-hover);
  transform: scale(1.1);
  box-shadow: var(--shadow-medium);
}

.video-status {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 1000;
  background: rgba(0, 123, 255, 0.9);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius-small);
  font-size: 0.9rem;
  font-weight: 600;
}

.video-status.recording {
  background: rgba(220, 53, 69, 0.9);
  animation: pulse 1.5s infinite;
}

.video-status.live {
  background: rgba(40, 167, 69, 0.9);
}

/* ────────────────────────────────────────────────────────────────────────────
   FILTERS & CONTROLS
───────────────────────────────────────────────────────────────────────────── */
.filters-container {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 1rem;
  width: 100%;
  max-width: 640px;
  margin: 0 auto 1rem auto;
  background: rgba(255, 255, 255, 0.95);
  padding: 1rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  border: 1px solid var(--border-color);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.input-mode-selector {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.mode-btn {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background: white;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
}

.mode-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.input-mode {
  display: none;
}

.input-mode.active {
  display: block;
}

/* ────────────────────────────────────────────────────────────────────────────
   RECOGNITION RESULTS & FACES
───────────────────────────────────────────────────────────────────────────── */
.recognition-results {
  margin-top: 20px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--border-radius);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: var(--shadow-light);
  border: 1px solid var(--border-color);
}

.detection-section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #ffffff;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  border: 1px solid var(--border-color);
}

.face-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  margin-bottom: 10px;
  background: #ffffff;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  border-left: 4px solid var(--primary-color);
  border: 1px solid var(--border-color);
  transition: all var(--transition-speed) ease;
}

.face-entry:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-medium);
  background: var(--card-bg-hover);
}

.face-entry .face-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  color: var(--text-color);
}

/* Legacy confidence badges - deprecated, use Bootstrap .badge with confidence classes */

/* ────────────────────────────────────────────────────────────────────────────
   TABLES
───────────────────────────────────────────────────────────────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-light);
  margin: 1rem 0;
  border: 1px solid var(--border-color);
}

thead {
  background: var(--background-secondary);
}

th, td {
  padding: 0.75rem;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-color);
}

th {
  font-weight: 600;
  border-bottom: 2px solid var(--border-color);
  color: var(--text-primary);
  background: var(--background-secondary);
}

tr:hover {
  background-color: rgba(0, 123, 255, 0.05);
}

.face-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  text-align: center;
  background: #ffffff;
  border: 1px solid var(--border-color);
}

.face-table th,
.face-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  text-align: center;
  vertical-align: middle;
  color: var(--text-color);
}

.face-table th {
  background-color: var(--background-secondary);
  color: var(--text-primary);
  font-weight: 600;
}

/* Table column widths */
.face-table th.col-no { width: 5%; }
.face-table th.col-id { width: 15%; }
.face-table th.col-name { width: 50%; }
.face-table th.col-actions { width: 30%; }

/* Action cell styles */
.face-table td.actions-cell {
    text-align: center;
}

.action-buttons {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.action-form {
    display: inline;
    margin: 0;
}

.btn-icon.view { color: #ccb42e; }
.btn-icon.edit { color: #3498db; }
.btn-icon.delete {
    color: #e74c3c;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
}

.delete-button {
  background-color: var(--error-color);
  color: white;
  border: none;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: var(--border-radius);
  font-size: 0.95rem;
  transition: all var(--transition-speed) ease;
}

.delete-button:hover {
  background-color: #c82333;
  transform: translateY(-1px);
}

/* ────────────────────────────────────────────────────────────────────────────
   UPLOAD COMPONENTS
───────────────────────────────────────────────────────────────────────────── */

/* Modern Animated Upload Area */
.upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  background: var(--card-bg);
  border: 2.5px dashed var(--primary-color);
  border-radius: var(--border-radius-large);
  box-shadow: var(--shadow-light);
  cursor: pointer;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
  position: relative;
  overflow: hidden;
  animation: fadeInScale 0.5s var(--transition-bounce);
  margin: 1rem 0;
}
.upload-area:hover,
.upload-area:focus {
  border-color: var(--primary-hover);
  background: var(--primary-light);
  box-shadow: var(--shadow-glow);
}
.upload-area.drag-over {
  border-color: var(--accent-color);
  background: rgba(40, 167, 69, 0.08);
  box-shadow: 0 0 0 4px rgba(40, 167, 69, 0.12);
  animation: pulse 0.8s;
}
.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--primary-color);
  opacity: 0.85;
  font-size: 1.1rem;
  pointer-events: none;
  transition: color 0.3s, opacity 0.3s;
}
.upload-placeholder i {
  font-size: 2.8rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
  animation: float 2.5s ease-in-out infinite;
}
.upload-area.drag-over .upload-placeholder {
  color: var(--accent-color);
  opacity: 1;
}

/* Video Preview with Animated Reveal */
.video-preview {
  display: none;
  width: 100%;
  margin-top: 1.2rem;
  animation: fadeInUp 0.5s;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  background: var(--card-bg);
  transition: box-shadow 0.3s, background 0.3s;
}
.video-preview.active {
  display: block;
  animation: fadeInScale 0.5s var(--transition-bounce);
}
.video-preview video {
  width: 100%;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  background: #000;
  transition: box-shadow 0.3s;
}
.video-info {
  margin-top: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.98rem;
  text-align: center;
  opacity: 0.92;
  animation: fadeInUp 0.4s;
}

/* Animated Progress Bar for Processing */
.progress-bar {
  width: 100%;
  height: 18px;
  background: var(--background-secondary);
  border-radius: var(--border-radius);
  overflow: hidden;
  margin-top: 1.2rem;
  box-shadow: var(--shadow-light);
  position: relative;
  animation: fadeInUp 0.5s;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-color) 100%);
  border-radius: var(--border-radius);
  width: 0%;
  transition: width 0.5s var(--transition-bounce);
  box-shadow: var(--shadow-glow);
  animation: progress-bar-stripes 1.2s linear infinite;
}
.progress-bar.processing .progress-fill {
  background: repeating-linear-gradient(90deg, var(--primary-color), var(--primary-color) 20px, var(--accent-color) 40px, var(--primary-color) 60px);
  animation: progress-bar-stripes 1.2s linear infinite;
}
.progress-bar.complete .progress-fill {
  background: var(--success-color);
  box-shadow: 0 0 10px var(--success-color);
}

/* Animated transitions for upload/process/result sections */
.upload-section, .process-progress, .result-section {
  transition: opacity 0.4s, transform 0.4s;
  opacity: 1;
}
.upload-section.hide, .process-progress.hide, .result-section.hide {
  opacity: 0;
  pointer-events: none;
  transform: translateY(30px) scale(0.98);
}
.upload-section.show, .process-progress.show, .result-section.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* Download button animation */
.download-btn {
  margin-top: 1.2rem;
  animation: fadeInScale 0.5s var(--transition-bounce);
  transition: background 0.3s, box-shadow 0.3s;
}
.download-btn:active {
  transform: scale(0.97);
}

/* Supported formats text */
.supported-formats {
  font-size: 0.92rem;
  color: var(--muted-text);
  margin-top: 0.3rem;
  text-align: center;
  opacity: 0.8;
}

/* Vehicle upload area (reuse styles, override if needed) */
.vehicle-upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  background: var(--card-bg);
  border: 2.5px dashed var(--primary-color);
  border-radius: var(--border-radius-large);
  box-shadow: var(--shadow-light);
  cursor: pointer;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
  position: relative;
  overflow: hidden;
  animation: fadeInScale 0.5s var(--transition-bounce);
  margin: 1rem 0;
}
.vehicle-upload-area:hover,
.vehicle-upload-area:focus {
  border-color: var(--primary-hover);
  background: var(--primary-light);
  box-shadow: var(--shadow-glow);
}
.vehicle-upload-area.dragover {
  border-color: var(--accent-color);
  background: rgba(40, 167, 69, 0.08);
  box-shadow: 0 0 0 4px rgba(40, 167, 69, 0.12);
  animation: pulse 0.8s;
}
.vehicle-upload-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  animation: float 2.5s ease-in-out infinite;
}
.vehicle-upload-text {
  color: var(--primary-color);
  font-size: 1.1rem;
}
.vehicle-upload-hint {
  color: var(--muted-text);
  font-size: 0.92rem;
  margin-top: 0.2rem;
}

/* Animated transitions for vehicle upload/process/result */
.vehicle-upload-section, .vehicle-process-progress, .vehicle-result-section {
  transition: opacity 0.4s, transform 0.4s;
  opacity: 1;
}
.vehicle-upload-section.hide, .vehicle-process-progress.hide, .vehicle-result-section.hide {
  opacity: 0;
  pointer-events: none;
  transform: translateY(30px) scale(0.98);
}
.vehicle-upload-section.show, .vehicle-process-progress.show, .vehicle-result-section.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* ────────────────────────────────────────────────────────────────────────────
   ALERTS & STATUS
───────────────────────────────────────────────────────────────────────────── */
.alert {
  padding: 15px;
  border-radius: var(--border-radius);
  margin: 15px 0;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all var(--transition-speed) ease;
}

.alert.success {
  background-color: #d4edda;
  color: #155724;
  border-color: #c3e6cb;
}

.alert.error {
  background-color: #f8d7da;
  color: #721c24;
  border-color: #f5c6cb;
}

#status.success {
  color: var(--success-color);
}

#status.error {
  color: var(--error-color);
}

/* ────────────────────────────────────────────────────────────────────────────
   MODAL & IMAGE MODAL
───────────────────────────────────────────────────────────────────────────── */
#imageModal,
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  transition: opacity var(--transition-speed) ease;
  padding-top: 60px;
}

.modal-content {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  max-height: 80%;
  object-fit: contain;
  animation: zoom 0.6s;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

@keyframes zoom {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

.close,
.modal-close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
}

.close:hover,
.close:focus,
.modal-close:hover {
  color: #ff6b6b;
}

/* ────────────────────────────────────────────────────────────────────────────
   CARDS & DASHBOARD
───────────────────────────────────────────────────────────────────────────── */
.card,
.card-summary {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
  border-radius: var(--border-radius-large);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-light);
  transition: all var(--transition-speed) var(--transition-bounce);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.card::before,
.card-summary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-speed) ease;
}

.card:hover,
.card-summary:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-heavy);
}

.card:hover::before,
.card-summary:hover::before {
  transform: scaleX(1);
}

.card-title {
  font-size: 1.2rem;
  color: #ffffff;
  margin-bottom: 1rem;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.card-value {
  font-size: 3rem;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all var(--transition-speed) ease;
}

.card:hover .card-value {
  transform: scale(1.1);
}

.card-blue {
  background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 50%, #93c5fd 100%);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.3);
}

.card-blue:hover {
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.4);
}

.card-orange {
  background: linear-gradient(135deg, #f97316 0%, #fb923c 50%, #fdba74 100%);
  box-shadow: 0 8px 32px rgba(249, 115, 22, 0.3);
}

.card-orange:hover {
  box-shadow: 0 12px 40px rgba(249, 115, 22, 0.4);
}

.card-green {
  background: linear-gradient(135deg, #10b981 0%, #34d399 50%, #6ee7b7 100%);
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.3);
}

.card-green:hover {
  box-shadow: 0 12px 40px rgba(16, 185, 129, 0.4);
}

.card-purple {
  background: linear-gradient(135deg, #9333ea 0%, #a855f7 50%, #c084fc 100%);
  box-shadow: 0 8px 32px rgba(147, 51, 234, 0.3);
}

.card-purple:hover {
  box-shadow: 0 12px 40px rgba(147, 51, 234, 0.4);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
  animation: fadeInUp 0.8s ease-out;
}

.stat-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--border-radius-large);
  padding: 2rem;
  text-align: center;
  transition: all var(--transition-speed) var(--transition-bounce);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.stat-card:hover::after {
  transform: translateX(100%);
}

.stat-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: var(--shadow-heavy);
}

.stat-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
  transition: all var(--transition-speed) ease;
}

.stat-card:hover .stat-icon {
  transform: scale(1.2) rotate(10deg);
  color: var(--accent-color);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  transition: all var(--transition-speed) ease;
}

.stat-card:hover .stat-number {
  transform: scale(1.1);
}

.stat-label {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ────────────────────────────────────────────────────────────────────────────
   UTILITY CLASSES
───────────────────────────────────────────────────────────────────────────── */

/* Shared icon button styles */
.icon-btn,
.examiner-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 50%;
  text-decoration: none;
  color: #495057;
  transition: all 0.2s ease;
  font-size: 16px;
  margin-bottom: 20px;
  line-height: 1;
  padding: 0;
}

.icon-btn i,
.examiner-icon-btn i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  line-height: 1;
  margin: 0;
  padding: 0;
}

.icon-btn:hover,
.examiner-icon-btn:hover {
  background-color: #e9ecef;
  transform: translateY(-1px);
  color: var(--primary-color);
}

/* Shared section description styles */
.section-description {
  color: var(--muted-text);
  font-size: 1.1em;
  margin-bottom: 20px;
}

/* Shared image source styles */
.image-source {
  display: block;
  color: var(--muted-text);
  margin-top: 0.5rem;
  font-size: 0.9rem;
  text-align: center;
}

/* Shared back link styles */
.back-link {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background-color: var(--muted-text);
  color: white;
  text-decoration: none;
  border-radius: var(--border-radius);
  transition: all var(--transition-speed) ease;
}

.back-link:hover {
  background-color: #5a6268;
  transform: translateY(-2px);
}

hr {
  margin: 30px 0;
  border: none;
  border-top: 2px solid var(--border-color);
}

/* ────────────────────────────────────────────────────────────────────────────
   LANDING PAGE STYLES
───────────────────────────────────────────────────────────────────────────── */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 4rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  position: sticky;
  top: 0;
  z-index: 100;
  animation: slideInLeft 0.8s ease-out;
}

.hero {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 6rem 4rem;
  gap: 8rem;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(120, 180, 255, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(70, 155, 229, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(0, 170, 255, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.hero-text {
  max-width: 600px;
  z-index: 2;
  animation: slideInLeft 1s ease-out;
}

.hero-text h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin: 0 0 1.5rem 0;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero-text h1 span {
  color: #f37021;
  position: relative;
}

.hero-text h1 span::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #f37021, #ff8c42);
  border-radius: 2px;
  animation: slideInRight 1.2s ease-out;
}

.hero-text h1 span.blue {
  color: #00aaff;
}

.hero-text h1 span.blue::after {
  background: linear-gradient(90deg, #00aaff, #007bff);
}

.hero-text p {
  font-size: 1.3rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.hero-image {
  width: 350px;
  height: 350px;
  background: linear-gradient(135deg, #00aaff, #007bff);
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: slideInRight 1s ease-out;
  box-shadow: 0 20px 60px rgba(0, 170, 255, 0.3);
}

.hero-image::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.2) 50%, transparent 70%);
  animation: float 4s ease-in-out infinite;
}

.hero-image img {
  width: 70%;
  height: auto;
  z-index: 2;
  filter: brightness(1.1);
}

.features-section {
  padding: 6rem 4rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  margin-top: 3rem;
}

.feature-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--border-radius-large);
  padding: 2.5rem;
  text-align: center;
  transition: all var(--transition-speed) var(--transition-bounce);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-speed) ease;
}

.feature-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-heavy);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  transition: all var(--transition-speed) ease;
}

.feature-card:hover .feature-icon {
  transform: scale(1.2) rotate(10deg);
  color: var(--accent-color);
}

.feature-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.feature-description {
  color: var(--text-secondary);
  line-height: 1.6;
}

footer {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 4rem;
  padding: 4rem 4rem 2rem 4rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease-out;
}

footer .column {
  text-align: left;
  min-width: 200px;
}

footer h4 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  position: relative;
}

footer h4::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--primary-color);
  border-radius: 1px;
}

footer a {
  display: block;
  text-decoration: none;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  transition: all var(--transition-speed) ease;
  position: relative;
}

footer a::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width var(--transition-speed) ease;
}

footer a:hover {
  color: var(--primary-color);
  transform: translateX(5px);
}

footer a:hover::before {
  width: 100%;
}

.footer-bottom {
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted-text);
  margin: 2rem 0 1rem 0;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
  transition: all var(--transition-speed) ease;
}

.logo:hover {
  transform: scale(1.05);
}

.logo img {
  height: 45px;
  filter: brightness(1.1);
}

/* ────────────────────────────────────────────────────────────────────────────
   RESPONSIVE DESIGN
───────────────────────────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .main-content {
    margin-left: 0;
    padding: 1rem;
  }
  
  /* Sidebar styles moved to base.css */
  
  .hero {
    gap: 4rem;
    padding: 4rem 2rem;
  }
  
  .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 1.5rem;
    border-radius: var(--border-radius);
  }

  h1 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
  }
  
  h2 {
    font-size: clamp(1.4rem, 4vw, 2rem);
  }

  nav {
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
  }
  
  nav a {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }

  .filters-container {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .video-container {
    width: 100%;
    height: auto;
    max-width: 100%;
    aspect-ratio: 4/3;
  }

  .face-entry {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    padding: 1rem;
  }

  .input-mode-selector {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .mode-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }

  table, .face-table {
    font-size: 0.85rem;
  }

  th, td {
    padding: 0.6rem 0.4rem;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  /* Landing page responsive */
  header {
    padding: 1rem 2rem;
    flex-direction: column;
    gap: 1rem;
  }
  
  .hero {
    flex-direction: column;
    gap: 3rem;
    padding: 3rem 2rem;
    text-align: center;
  }
  
  .hero-text {
    max-width: 100%;
  }
  
  .hero-image {
    width: 280px;
    height: 280px;
  }
  
  .hero-cta {
    justify-content: center;
  }
  
  .features-section {
    padding: 4rem 2rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 3rem 2rem 2rem 2rem;
    gap: 2rem;
  }
  
  footer .column {
    margin-bottom: 1rem;
    text-align: center;
  }
  
  /* Sidebar styles moved to base.css */
}

@media (max-width: 480px) {
  .container {
    padding: 1rem;
    margin: 0.5rem;
  }

  button, .btn {
    width: 100%;
    margin: 0.25rem 0;
    padding: 0.75rem;
  }

  .video-container {
    width: 100%;
    max-width: 100%;
  }
  
  .camera-select-container {
    padding: 1rem;
  }
  
  .form-group {
    margin-bottom: 1rem;
  }
  
  input[type="text"],
  input[type="file"],
  select,
  .form-control {
    max-width: 100%;
    margin: 0.5rem 0 1rem 0;
  }
  
  .hero {
    padding: 2rem 1rem;
  }
  
  .hero-text h1 {
    font-size: clamp(2rem, 8vw, 2.5rem);
  }
  
  .hero-text p {
    font-size: 1.1rem;
  }
  
  .hero-image {
    width: 220px;
    height: 220px;
  }
  
  .features-section {
    padding: 3rem 1rem;
  }
  
  .feature-card {
    padding: 1.5rem;
  }
  
  footer {
    padding: 2rem 1rem;
  }
  
  header {
    padding: 1rem;
  }
}

/* Dark mode support - Remove problematic dark mode */
/* @media (prefers-color-scheme: dark) {
  :root {
    --card-bg: #1a1a1a;
    --text-color: #e0e0e0;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --muted-text: #888888;
    --border-color: #333333;
    --background-secondary: #2a2a2a;
  }
} */

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #0066cc;
    --border-color: #000000;
    --text-color: #000000;
  }
  
  .btn {
    border: 2px solid currentColor;
  }
}

/* ────────────────────────────────────────────────────────────────────────────
   INTERACTIVE ELEMENTS & MICRO-INTERACTIONS
───────────────────────────────────────────────────────────────────────────── */

/* Loading states */
.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.loading::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 1000;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* Tooltip */
.tooltip {
  position: relative;
  cursor: help;
}

.tooltip::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius-small);
  font-size: 0.875rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-speed) ease;
  z-index: 1000;
}

.tooltip::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.8);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-speed) ease;
}

.tooltip:hover::before,
.tooltip:hover::after {
  opacity: 1;
}

/* ────────────────────────────────────────────────────────────────────────────
   BADGES - Bootstrap Standardized
───────────────────────────────────────────────────────────────────────────── */

/* Enhanced badge animations - use with Bootstrap .badge classes */
.badge.enhanced {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.badge.enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.badge.enhanced:hover::before {
  left: 100%;
}

.badge.enhanced:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Confidence badges - use with Bootstrap .badge classes */
.badge.confidence-high {
  background: #d4edda !important;
  color: #155724 !important;
  border: 1px solid #c3e6cb;
}

.badge.confidence-medium {
  background: #fff3cd !important;
  color: #856404 !important;
  border: 1px solid #ffeaa7;
}

.badge.confidence-low {
  background: #f8d7da !important;
  color: #721c24 !important;
  border: 1px solid #f5c6cb;
}

.badge.confidence-unknown {
  background: #e2e3e5 !important;
  color: #6c757d !important;
  border: 1px solid #d1d3d4;
}

/* Status badges - use with Bootstrap .badge classes */
.badge.status-present {
  background: #28a745 !important;
}

.badge.status-absent {
  background: #dc3545 !important;
}

.badge.status-late {
  background: #ffc107 !important;
  color: #212529 !important;
}

/* Large badges for examiner details visibility */
.badge.badge-lg {
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 25px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Role-specific badge colors */
.badge.bg-danger.badge-lg {
  background: linear-gradient(135deg, #dc3545, #c82333) !important;
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.badge.bg-warning.text-dark {
  background: linear-gradient(135deg, #ffc107 0%, #ffb300 100%) !important;
  color: #000 !important;
  font-weight: 600;
  border: 1px solid #ffb300;
  box-shadow: 0 2px 4px rgba(255, 193, 7, 0.3);
}

.badge.bg-warning.badge-lg {
  background: linear-gradient(135deg, #fd7e14, #e55a00) !important;
  color: white !important;
  box-shadow: 0 2px 8px rgba(253, 126, 20, 0.3);
}

.badge.bg-success.badge-lg {
  background: linear-gradient(135deg, #20c997, #17a085) !important;
  box-shadow: 0 2px 8px rgba(32, 201, 151, 0.3);
}

.badge.bg-secondary.badge-lg {
  background: linear-gradient(135deg, #6c757d, #5a6268) !important;
  box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

.badge.bg-danger {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
  box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.badge.bg-primary {
  background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%) !important;
  box-shadow: 0 2px 4px rgba(13, 110, 253, 0.3);
}

.badge.bg-success {
  background: linear-gradient(135deg, #198754 0%, #146c43 100%) !important;
  box-shadow: 0 2px 4px rgba(25, 135, 84, 0.3);
}

/* Progress indicator */
.progress {
  width: 100%;
  height: 8px;
  background: var(--background-secondary);
  border-radius: var(--border-radius-small);
  overflow: hidden;
  position: relative;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: var(--border-radius-small);
  transition: width 0.6s ease;
  position: relative;
  overflow: hidden;
}

.progress-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background-image: linear-gradient(
    -45deg,
    rgba(255, 255, 255, .2) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, .2) 50%,
    rgba(255, 255, 255, .2) 75%,
    transparent 75%,
    transparent
  );
  background-size: 50px 50px;
  animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
  0% { background-position: 50px 0; }
  100% { background-position: 0 0; }
}

/* ────────────────────────────────────────────────────────────────────────────
   UNIFIED NOTIFICATIONS, ALERTS & MODALS - Bootstrap Enhanced
───────────────────────────────────────────────────────────────────────────── */

/* Toast-style notifications - use with Bootstrap toast classes */
.toast.enhanced {
  border-left: 4px solid var(--primary-color);
  box-shadow: var(--shadow-heavy);
  transform: translateX(100%);
  transition: transform var(--transition-speed) var(--transition-bounce);
}

.toast.enhanced.show {
  transform: translateX(0);
}

.toast.enhanced.toast-success {
  border-left-color: var(--success-color);
}

.toast.enhanced.toast-error {
  border-left-color: var(--error-color);
}

.toast.enhanced.toast-warning {
  border-left-color: var(--warning-color);
}

/* Alert enhancements - use with Bootstrap alert classes */
.alert.enhanced {
  border-left: 4px solid;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
}

.alert-success.enhanced {
  border-left-color: var(--success-color);
}

.alert-danger.enhanced {
  border-left-color: var(--error-color);
}

.alert-warning.enhanced {
  border-left-color: var(--warning-color);
}

/* Modal enhancements - use with Bootstrap modal classes */
.modal.enhanced .modal-content {
  border-radius: 15px;
  box-shadow: var(--shadow-heavy);
  animation: modalZoom 0.3s ease-out;
}

@keyframes modalZoom {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Image modal specific styling */
.modal.image-modal {
  background-color: rgba(0, 0, 0, 0.9);
}

.modal.image-modal .modal-content {
  background: transparent;
  border: none;
  box-shadow: none;
  max-width: 90%;
  max-height: 90%;
}

.modal.image-modal img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Focus states for accessibility */
button:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Smooth page transitions */
.page-transition {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.page-transition.loaded {
  opacity: 1;
  transform: translateY(0);
}

/* Interactive hover effects */
.interactive-hover {
  transition: all var(--transition-speed) ease;
  position: relative;
  overflow: hidden;
}

.interactive-hover::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

.interactive-hover:hover::before {
  left: 100%;
}

.interactive-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

/* Parallax effect */
.parallax {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* Smooth reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Enhanced focus indicator */
.focus-ring {
  position: relative;
}

.focus-ring:focus-visible {
  outline: none;
}

.focus-ring:focus-visible::before {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border: 2px solid var(--primary-color);
  border-radius: calc(var(--border-radius) + 4px);
  animation: pulse 1.5s infinite;
}

/* ────────────────────────────────────────────────────────────────────────────
   ATTENDANCE PAGE SPECIFIC STYLES
───────────────────────────────────────────────────────────────────────────── */

/* Summary Cards */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.summary-card {
  background: white;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: var(--shadow-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-left: 4px solid var(--primary-color);
  transition: all var(--transition-speed) ease;
}

.summary-card:hover {
  box-shadow: var(--shadow-medium);
  transform: translateY(-2px);
}

.summary-card.accent-success {
  border-left-color: var(--success-color);
}

.summary-card.accent-warning {
  border-left-color: var(--warning-color);
}

.card-title {
  font-size: 0.9rem;
  color: var(--muted-text);
  margin-bottom: 0.5rem;
}

.card-value {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card-icon {
  font-size: 2rem;
  color: rgba(0, 0, 0, 0.1);
}

/* Filter Bar */
.filter-bar {
  background: white;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
}

.filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 1.5rem;
  align-items: flex-end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-group label {
  font-size: 0.9rem;
  color: var(--muted-text);
  font-weight: 500;
}

.filter-actions {
  display: flex;
  gap: 0.75rem;
  align-self: flex-end;
  margin-bottom: 0.3rem;
}

/* Table Styles */
.table-container {
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-light);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  background: var(--background-secondary);
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table td {
  padding: 1rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.data-table tr:hover td {
  background-color: var(--background-secondary);
}

.employee-photo img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
  transition: all var(--transition-speed) ease;
}

.employee-photo img:hover {
  border-color: var(--primary-color);
  transform: scale(1.05);
}

.status-badge {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all var(--transition-speed) ease;
}

.status-badge.present {
  background-color: #d5f5e3;
  color: var(--success-color);
}

.status-badge.absent {
  background-color: #fadbd8;
  color: var(--error-color);
}

.status-badge.late {
  background-color: #fdeaa7;
  color: var(--warning-color);
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  color: var(--muted-text);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state h3 {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.empty-state p {
  margin: 0;
  font-size: 0.9rem;
}

/* ────────────────────────────────────────────────────────────────────────────
   TAB NAVIGATION STYLES
───────────────────────────────────────────────────────────────────────────── */

.tab-navigation {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 1rem;
}

.tab-btn {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-small);
  background: var(--card-bg);
  color: var(--text-color);
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  font-weight: 500;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.tab-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.tab-btn.active {
  color: white !important;
  background: rgba(255, 255, 255, 0.15) !important;
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: white;
}

.tab-content {
  display: none;
  animation: fadeInUp 0.6s ease-out;
}

.tab-content.active {
  display: block;
}

/* ────────────────────────────────────────────────────────────────────────────
   USER DETAILS PAGE STYLES
───────────────────────────────────────────────────────────────────────────── */

/* Main container for user details page */
.user-details-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header section with title and back button */
.header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
}

.page-title {
    color: #2c3e50;
    font-size: 2rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
    padding-right: 2rem;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.back-button:hover {
    background: linear-gradient(135deg, #5a6268, #495057);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
    color: white;
    text-decoration: none;
}

/* Enhanced examiner card for user details */
.user-details-container .examiner-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.user-details-container .examiner-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* Profile section layout - Profile image on left, info on right */
.user-details-container .profile-section {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    align-items: start;
}

/* Profile image section - left column */
.profile-image-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    order: 1;
}

/* User information section - right column */
.user-info {
    flex: 1;
    order: 2;
}

/* User name styling */
.user-name {
    color: #2c3e50;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #2c3e50, #3498db);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Details grid layout */
.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Detail cards */
.detail-card {
    background: rgba(248, 249, 250, 0.8);
    border-radius: 15px;
    padding: 1.5rem;
    border-left: 4px solid #3498db;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.detail-card:hover {
    background: rgba(241, 243, 245, 0.9);
    transform: translateX(5px);
}

/* Detail labels and values */
.detail-label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    text-align: center;
}

.detail-value {
    font-size: 1.25rem;
    color: #2c3e50;
    font-weight: 600;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Enhanced profile image container */
.user-details-container .profile-image-container {
    position: relative;
    width: 250px;
    height: 250px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-details-container .profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.user-details-container .profile-image:hover {
    transform: scale(1.05);
}

/* Enhanced no-image placeholder - consistent across application */
.no-image-placeholder {
    text-align: center;
    color: #6c757d;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    min-height: 200px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: inherit;
}

.no-image-placeholder i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
    color: inherit;
}

.no-image-placeholder p {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
}

/* Embeddings badge */
.embeddings-badge {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1.1rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

/* Enhanced role badges - extend existing badge system */
.examiner-role-badge {
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    transition: all 0.3s ease;
}

.examiner-role-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.examiner-role-badge.superadmin {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.examiner-role-badge.admin {
    background: linear-gradient(135deg, #fd7e14, #e55a00);
    color: white;
    box-shadow: 0 2px 8px rgba(253, 126, 20, 0.3);
}

.examiner-role-badge.examiner {
    background: linear-gradient(135deg, #20c997, #17a085);
    color: white;
    box-shadow: 0 2px 8px rgba(32, 201, 151, 0.3);
}

.examiner-role-badge.unknown {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

/* Status indicators */
.status-active {
    color: #28a745;
    font-weight: 600;
}

.status-inactive {
    color: #dc3545;
    font-weight: 600;
}

/* Enhanced action buttons */
.user-details-container .action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

/* Enhanced button styles */
.user-details-container .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.user-details-container .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.user-details-container .btn-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.user-details-container .btn-primary:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    color: white;
}

.user-details-container .btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.user-details-container .btn-danger:hover {
    background: linear-gradient(135deg, #c82333, #a71e2a);
    color: white;
}

.user-details-container .btn-secondary {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
}

.user-details-container .btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268, #495057);
    color: white;
}

/* Loading states */
.examiner-loading-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6c757d;
}

.examiner-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

/* Enhanced error card */
.user-details-container .error-card {
    background: rgba(248, 215, 218, 0.8);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    color: #721c24;
}

.user-details-container .error-card i {
    font-size: 3rem;
    color: #dc3545;
    margin-bottom: 1rem;
}

/* Responsive design for user details */
@media (max-width: 768px) {
    .user-details-container .profile-section {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .profile-image-section {
        order: 1;
    }
    
    .user-info {
        order: 2;
    }
    
    .details-grid {
        grid-template-columns: 1fr;
    }
    
    .user-details-container .action-buttons {
        flex-direction: column;
    }
    
    .header-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .user-details-container {
        padding: 1rem;
    }

    .user-name {
        font-size: 2rem;
    }

    .user-details-container .profile-image-container {
        width: 200px;
        height: 200px;
    }
}

/* ────────────────────────────────────────────────────────────────────────────
   FACES LIST STYLES
───────────────────────────────────────────────────────────────────────────── */

.faces-list {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faces-list .face-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  transition: all var(--transition-speed) ease;
}

.faces-list .face-entry:hover {
  box-shadow: var(--shadow-medium);
  transform: translateY(-2px);
}

.faces-list .face-entry .name {
  font-weight: 600;
  color: var(--text-primary);
}

/* Dashboard specific styles */

.chart-container {
  background: #fff;
  border-radius: 1.25rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  padding: 2rem 1.5rem;
  margin-bottom: 2rem;
}

.chart-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .chart-header {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  }
}

.download-btn {
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(106, 17, 203, 0.3);
  margin-top: 1.5rem;
}
.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(106, 17, 203, 0.4);
}

.chart-wrapper {
  position: relative;
  height: 400px;
  width: 100%;
}

/* Utility classes */
.hidden {
    display: none;
}

/* Attendance page styles */
.attendance-title {
    margin-bottom: 1rem;
}

.summary-cards-center {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.summary-card-wide {
    min-width: 300px;
}

.summary-card-large-value {
    font-size: 3rem;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.name-date-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.form-group-column {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.filter-control {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
}

.filter-control-wide {
    min-width: 300px;
}

.filter-right {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.download-btn-blue {
    background: #007bff;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.download-btn-green {
    background: #28a745;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.filter-info {
    margin-top: -0.5rem;
}

.table-wrapper {
    overflow-x: auto;
    margin-top: 1.5rem;
}

.attendance-table {
    width: 100%;
    border-collapse: collapse;
}

.attendance-table thead {
    background: #f8f9fa;
}

.attendance-table th,
.attendance-table td {
    padding: 0.75rem;
    text-align: center;
    border-bottom: 2px solid #dee2e6;
}

/* Attendance table specific styles */
.attendance-image-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.attendance-image {
    border-radius: 8px;
    cursor: zoom-in;
}

.similarity-score {
    font-size: 0.85rem;
}

.similarity-high { color: #28a745; }
.similarity-medium { color: #ffc107; }
.similarity-low { color: #dc3545; }

.no-image { color: #ccc; }

.status-badge {
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.status-present { background: #28a745; }
.status-absent { background: #dc3545; }

.no-records {
    text-align: center;
    padding: 1rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
}

.modal-content {
    display: block;
    margin: auto;
    max-width: 80%;
    max-height: 80%;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 36px;
    font-weight: bold;
    cursor: pointer;
}

.modal-close:hover {
    color: #ff6b6b;
}

/* Edit Examiner page styles */
.section-description {
    color: #666;
    font-size: 1.1em;
    margin-bottom: 20px;
}

.edit-title-centered {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    width: 100%;
}

.edit-section-title {
    font-size: 1.8em;
    padding-top: 20px;
    text-align: center;
    width: 100%;
}

.edit-subsection-title {
    font-size: 1.5em;
    margin-top: 0;
    text-align: center;
    width: 100%;
}

.icon-btn {
    font-size: 24px;
    color: #007bff;
    text-decoration: none;
    margin-bottom: 20px;
    display: inline-block;
}

.icon-btn:hover {
    color: #0056b3;
}

/* Examiner Details page styles */
.examiner-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 2rem;
    margin-top: 2rem;
}

.profile-section {
    text-align: center;
}

.profile-image-container {
    margin: 2rem 0;
    position: relative;
}

.profile-image {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #007bff;
}

.image-source {
    display: block;
    color: #666;
    margin-top: 0.5rem;
}

.no-image-placeholder {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    background: #f8f9fa;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
}

.no-image-placeholder i {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.details-section {
    max-width: 400px;
    margin: 2rem auto;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.detail-row .label {
    font-weight: 600;
    color: #495057;
}

.detail-row .value {
    color: #212529;
}

.error-card {
    text-align: center;
    padding: 3rem;
    background: #f8f9fa;
    border-radius: 12px;
    margin-top: 2rem;
}

.error-card i {
    font-size: 3rem;
    color: #dc3545;
    margin-bottom: 1rem;
}

.examiner-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 50%;
    text-decoration: none;
    color: #495057;
    transition: all 0.2s ease;
}

.examiner-icon-btn:hover {
    background-color: #e9ecef;
    transform: translateY(-1px);
}

/* Registration page specific styles */
.registration-title {
    text-align: center;
    color: #333;
    margin-bottom: 2rem;
    width: 100%;
}

.registration-method-title {
    text-align: center;
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.form-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.capture-submit-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    position: relative;
    z-index: 5;
    background: rgba(255, 255, 255, 0.9);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.upload-button-container {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.faces-list .face-entry .confidence {
  padding: 0.25rem 0.75rem;
  border-radius: var(--border-radius-small);
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Attendance Responsive Adjustments */
@media (max-width: 768px) {
  .filter-grid {
    grid-template-columns: 1fr;
  }
  
  .filter-actions {
    justify-content: flex-end;
  }
  
  .summary-cards {
    grid-template-columns: 1fr;
  }
  
  .data-table {
    font-size: 0.85rem;
  }
  
  .data-table th,
  .data-table td {
    padding: 0.75rem 0.5rem;
  }
}

/* ========================================================================
   Page title icon color - central rule
   This rule targets font-awesome icons and any inline SVG placed inside
   a `.page-title`. It is intentionally specific and placed near the end
   of the main stylesheet so it consistently wins over earlier rules.
   Remove inline styles from templates and maintain a single source of truth here.
========================================================================= */
.page-title > i.fas,
.page-title > i.far,
.page-title > i.fab,
.page-title > .fa,
.page-title svg,
.page-title svg *,
.page-title .svg-inline--fa,
.page-title .svg-inline--fa * {
  /* Force the same color for webfont icons and any SVG injected by
     a kit/extension. Use !important to override inline SVG attributes
     or higher-specificity rules coming from extensions. */
  color: #2d84ff !important;
  fill: #2d84ff !important;
  stroke: #2d84ff !important;
}

/* Normalize icon sizing and alignment inside page titles so
   FontAwesome webfont icons and SVG-injected icons match visually. */
.page-title > i,
.page-title .fa,
.page-title svg,
.page-title .svg-inline--fa {
  font-size: 2rem; /* match the headline size used elsewhere */
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  vertical-align: middle;
}
.page-title svg,
.page-title .svg-inline--fa { pointer-events: none; }

/* Vehicle Recognition Styles */
.vehicle-entry {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.vehicle-entry:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  border-color: #007bff;
}

.vehicle-license-plate {
  font-weight: bold;
  color: #dc3545;
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.vehicle-info {
  color: #6c757d;
  font-size: 0.9rem;
  line-height: 1.4;
}

.vehicle-timestamp {
  font-style: italic;
  color: #868e96;
  margin-top: 8px;
  font-size: 0.85rem;
}

.vehicle-results {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 10px;
  background: white;
}

.vehicle-count {
  background: #28a745;
  color: white;
  padding: 8px 15px;
  border-radius: 20px;
  font-weight: bold;
  display: inline-block;
  margin-bottom: 15px;
  box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.vehicle-no-results {
  text-align: center;
  color: #6c757d;
  font-style: italic;
  padding: 20px;
}

/* Vehicle Camera View Styles */
.vehicle-camera-view {
  position: relative;
  display: inline-block;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

#vehicleVideo {
  border-radius: 8px;
  max-width: 100%;
  height: auto;
}

#vehicleCanvas {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  border-radius: 8px;
}

/* Vehicle Upload Styles */
.vehicle-upload-area {
  border: 2px dashed #007bff;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  background: #f8f9fa;
  transition: all 0.3s ease;
  cursor: pointer;
}

.vehicle-upload-area:hover {
  background: #e9ecef;
  border-color: #0056b3;
}

.vehicle-upload-area.dragover {
  background: #cce5ff;
  border-color: #0056b3;
  transform: scale(1.02);
}

.vehicle-upload-icon {
  font-size: 3rem;
  color: #007bff;
  margin-bottom: 15px;
}

.vehicle-upload-text {
  color: #495057;
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.vehicle-upload-hint {
  color: #6c757d;
  font-size: 0.9rem;
}

/* Vehicle Processing Status */
.vehicle-processing {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
  padding: 15px;
  border-radius: 8px;
  margin: 15px 0;
  text-align: center;
}

.vehicle-processing .spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #856404;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s ease-in-out infinite;
  margin-right: 10px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Vehicle Button Styles */
.vehicle-btn {
  background: #28a745;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
  margin: 5px;
}

.vehicle-btn:hover {
  background: #218838;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.vehicle-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.vehicle-btn-secondary {
  background: #6c757d;
}

.vehicle-btn-secondary:hover {
  background: #5a6268;
}

.vehicle-btn-danger {
  background: #dc3545;
}

.vehicle-btn-danger:hover {
  background: #c82333;
}

/* Responsive Vehicle Styles */
@media (max-width: 768px) {
  .vehicle-entry {
    padding: 10px;
    margin-bottom: 10px;
  }
  
  .vehicle-license-plate {
    font-size: 1rem;
  }
  
  .vehicle-upload-area {
    padding: 20px;
  }
  
  .vehicle-upload-icon {
    font-size: 2rem;
  }
  
  .vehicle-upload-text {
    font-size: 1rem;
  }
  
  .vehicle-camera-view {
    width: 100%;
  }
  
  #vehicleVideo, #vehicleCanvas {
    width: 100%;
    height: auto;
  }
}

/* ────────────────────────────────────────────────────────────────────────────
   ENHANCED LIVE PAGE SPECIFIC STYLES
───────────────────────────────────────────────────────────────────────────── */

/* Detection item styling */
.detection-item {
  transition: all 0.3s ease;
}

.detection-item.border-success {
  border-color: #28a745 !important;
  border-width: 2px !important;
}

/* Upload area styling */
.upload-area {
  border: 2px dashed #ccc;
  border-radius: 8px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.upload-area:hover,
.upload-area.drag-over {
  border-color: #007bff;
  background-color: rgba(0, 123, 255, 0.05);
}

.upload-placeholder i {
  font-size: 48px;
  color: #6c757d;
  margin-bottom: 20px;
}

.video-preview {
  display: none;
}

/* Legend styling */
.detection-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 1rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 500;
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 3px;
  border: 1px solid #ddd;
}


/* Enhanced Statistics */
.enhanced-stats-row {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.enhanced-stats-row strong {
  color: var(--text-primary);
}

#processing-fps,
#buffer-status,
#total-frames {
  font-weight: 600;
  color: var(--primary-color);
}

/* Enhanced Detections Container */
.enhanced-detections-container {
  max-height: 400px;
  overflow-y: auto;
}

.enhanced-detections-container::-webkit-scrollbar {
  width: 6px;
}

.enhanced-detections-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.enhanced-detections-container::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 3px;
}

/* Badge Variations for Enhanced Live */
.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: var(--border-radius-small);
}

.badge-info {
  background: linear-gradient(135deg, #17a2b8, #138496);
  color: white;
}

.badge-warning {
  background: linear-gradient(135deg, #ffc107, #e0a800);
  color: #212529;
}

.badge-success {
  background: linear-gradient(135deg, #28a745, #218838);
  color: white;
}

.badge-secondary {
  background: linear-gradient(135deg, #6c757d, #545b62);
  color: white;
}

/* Bootstrap 5 badge classes compatibility */
.bg-info {
  background: linear-gradient(135deg, #17a2b8, #138496) !important;
  color: white !important;
}

.bg-warning {
  background: linear-gradient(135deg, #ffc107, #e0a800) !important;
  color: #212529 !important;
}

.bg-success {
  background: linear-gradient(135deg, #28a745, #218838) !important;
  color: white !important;
}

.bg-secondary {
  background: linear-gradient(135deg, #6c757d, #545b62) !important;
  color: white !important;
}

.bg-danger {
  background: linear-gradient(135deg, #dc3545, #c82333) !important;
  color: white !important;
}

.badge-danger {
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: white;
}

/* Process Button */
.process-btn {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  color: white;
  border: none;
  padding: 0.875rem 1.75rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition-speed) ease;
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.process-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4);
}

.process-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Download button */
.download-btn {
  background: linear-gradient(135deg, #28a745, #218838);
  color: white;
  border: none;
  padding: 0.875rem 1.75rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition-speed) ease;
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
  margin-top: 1.2rem;
  animation: fadeInScale 0.5s var(--transition-bounce);
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

.download-btn:active {
  transform: scale(0.97);
}

/* Upload section styles */
.upload-section {
  transition: opacity 0.4s, transform 0.4s;
  opacity: 1;
}

.upload-section.hide {
  opacity: 0;
  pointer-events: none;
  transform: translateY(30px) scale(0.98);
}

.upload-section.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* Process progress styles */
.process-progress {
  transition: opacity 0.4s, transform 0.4s;
  opacity: 1;
}

.process-progress.hide {
  opacity: 0;
  pointer-events: none;
  transform: translateY(30px) scale(0.98);
}

.process-progress.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* Result section styles */
.result-section {
  transition: opacity 0.4s, transform 0.4s;
  opacity: 1;
}

.result-section.hide {
  opacity: 0;
  pointer-events: none;
  transform: translateY(30px) scale(0.98);
}

.result-section.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* Supported formats text */
.supported-formats {
  font-size: 0.92rem;
  color: var(--muted-text);
  margin-top: 0.3rem;
  text-align: center;
  opacity: 0.8;
}

/* Video info styles */
.video-info {
  margin-top: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.98rem;
  text-align: center;
  opacity: 0.92;
  animation: fadeInUp 0.4s;
}

/* Main card for enhanced live */
.main-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

/* Stat card */
.stat-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--border-radius-large);
  padding: 2rem;
  text-align: center;
  transition: all var(--transition-speed) var(--transition-bounce);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: var(--shadow-heavy);
}

/* Card value */
.card-value {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text-primary);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all var(--transition-speed) ease;
}

/* Card summary */
.card-summary {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
  border-radius: var(--border-radius-large);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-light);
  transition: all var(--transition-speed) var(--transition-bounce);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

/* Section title */
.section-title {
  position: relative;
  display: inline-block;
  margin-bottom: 2rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: 2px;
}

/* Card blue */
.card-blue {
  background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 50%, #93c5fd 100%);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.3);
}

.card-blue:hover {
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.4);
}

/* Faces list */
.faces-list {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Responsive adjustments for Enhanced Live */
@media (max-width: 768px) {
  .detection-legend {
    justify-content: center;
  }
  
  #live-stream {
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
  }
  
}

@media (max-width: 480px) {
  .enhanced-stats-row {
    font-size: 0.85rem;
  }
  
  .legend-item {
    font-size: 0.85rem;
  }
  
  .upload-area {
    padding: 20px;
  }
  
  .upload-placeholder i {
    font-size: 32px;
  }
}

/* ────────────────────────────────────────────────────────────────────────────
   LOGIN PAGE SPECIFIC STYLES

/* Login page body - Use Bootstrap 5 utilities for most styling */
html body.login-page {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif !important;
    background: url('../images/bg-login.jpg') center center / cover no-repeat !important;
    min-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Left panel backdrop effect for better readability over background image */
.login-panel {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
}

/* Main container uses Bootstrap grid system */
.login-main-container {
    min-height: 100vh;
}

/* Minimal custom overrides - let Bootstrap handle most styling */
.login-form-input:focus {
    border-color: #4f46e5 !important;
    box-shadow: 0 0 0 0.25rem rgba(79, 70, 229, 0.15) !important;
}

.login-form-input.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.15) !important;
}

/* Enhanced button hover effects */
.login-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.3) !important;
}

.login-button:active {
    transform: translateY(0) !important;
}

/* Toast container positioning */
.toast-container {
    z-index: 9999;
}

/* Loading animation for login button */
.login-button.loading {
    opacity: 0.8;
    cursor: not-allowed;
    position: relative;
}

.login-button.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: login-spin 1s linear infinite;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

@keyframes login-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Smooth animations for form elements */
.login-form-group {
    animation: fadeInUp 0.6s ease-out;
}

.login-form-group:nth-child(1) { animation-delay: 0.1s; }
.login-form-group:nth-child(2) { animation-delay: 0.2s; }
.login-form-group:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Password toggle button enhancement */
.password-toggle-btn {
    border: none !important;
    background: transparent !important;
    color: #6c757d !important;
    transition: color 0.3s ease;
}

.password-toggle-btn:hover,
.password-toggle-btn:focus {
    color: #4f46e5 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Responsive design for login page */
@media (max-width: 768px) {
    .login-main-container {
        padding: 1rem;
    }
}

/* ────────────────────────────────────────────────────────────────────────────
   ENHANCED LIVE PAGE SPECIFIC STYLES
───────────────────────────────────────────────────────────────────────────── */

/* Enhanced Live Page Layout */
.enhanced-live-container {
  padding: 0;
}

.enhanced-live-container .card {
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-light);
  transition: all 0.3s ease;
}

.enhanced-live-container .card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

/* Video Container Enhancements */
.enhanced-live-container .video-container {
  position: relative;
  display: inline-block;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-medium);
  background: #000;
  max-width: 100%;
  /* Remove fixed dimensions to allow native aspect ratio */
  width: auto !important;
  height: auto !important;
  /* Center the container */
  margin: 0 auto;
  /* Override any flex layout that might stretch the video */
  display: inline-block !important;
  align-items: initial !important;
  justify-content: initial !important;
}

.enhanced-live-container .video-container video {
  display: block;
  max-width: 100%;
  max-height: 70vh; /* Limit height to prevent oversized display */
  width: auto;
  height: auto;
  /* Maintain aspect ratio without stretching */
  object-fit: contain;
  /* Remove any transforms that might cause stretching */
  transform: none !important;
  /* Ensure no flex stretching */
  flex: none !important;
}

/* Canvas overlay positioning for enhanced live */
.enhanced-live-container .video-container canvas {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 10;
  /* Canvas will be sized by JavaScript to match video exactly */
}

/* Specific styling for enhanced live video element */
.enhanced-live-video {
  display: block !important;
  max-width: 100% !important;
  max-height: 70vh !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  transform: none !important;
  flex: none !important;
  /* Ensure proper aspect ratio is maintained */
  aspect-ratio: attr(width) / attr(height);
}

/* Status Badges Enhancement */
.enhanced-live-container .badge {
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Enhanced Statistics */
.enhanced-stats {
  font-size: 0.9rem;
}

.enhanced-stats .text-info,
.enhanced-stats .text-success,
.enhanced-stats .text-secondary {
  font-weight: 600;
}

/* Detection Legend Styling */
.detection-legend .legend-item {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

.detection-legend .legend-color {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  margin-right: 0.75rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Enhanced Form Controls */
.enhanced-live-container .form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.enhanced-live-container .form-select:focus,
.enhanced-live-container .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Recent Detections Container */
.enhanced-detections-container {
  max-height: 400px;
  overflow-y: auto;
}

.enhanced-detections-container::-webkit-scrollbar {
  width: 6px;
}

.enhanced-detections-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.enhanced-detections-container::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.enhanced-detections-container::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Upload Area Enhancement */
.enhanced-live-container .upload-area {
  border: 2px dashed var(--border-color);
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
  cursor: pointer;
}

.enhanced-live-container .upload-area:hover {
  border-color: var(--primary-color);
  background: rgba(0, 123, 255, 0.05);
}

.enhanced-live-container .upload-area.drag-over {
  border-color: var(--primary-color);
  background: rgba(0, 123, 255, 0.1);
  transform: scale(1.02);
}

/* ────────────────────────────────────────────────────────────────────────────
   MAIN CONTAINER LAYOUT - TWO PRIMARY SECTIONS
───────────────────────────────────────────────────────────────────────────── */

/* Main Container Styling */
.enhanced-live-container .main-container {
  border: none;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 2rem;
}

/* Disable hover effect for main-container */
.enhanced-live-container .main-container:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  transform: none;
}

.enhanced-live-container .main-container .card-header {
  padding: 1.5rem 2rem;
  border-bottom: 2px solid rgba(255,255,255,0.1);
}

.enhanced-live-container .main-container .card-header h5 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Gradient Headers */
.enhanced-live-container .bg-gradient-primary {
  background: #2d84ff !important;
}

.enhanced-live-container .bg-gradient-dark {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
}

/* Live Camera Container - Pure White Layout */
.enhanced-live-container .main-container .card-body {
  background: white !important;
  border: none !important;
  min-height: 600px; /* Ensure sufficient height for vertical centering */
}

/* Video Stream Wrapper */
.video-stream-wrapper {
  background: white;
  padding: 2rem 1rem;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

/* Camera Controls Section - Under Video */
.camera-controls-section {
  margin-top: 1rem;
}

.camera-controls-section .control-section {
  background: #f1f8ff;
  border: 1px solid #c3e3ff;
  border-radius: 8px;
  padding: 1.5rem;
}

.camera-controls-section .control-header h6 {
  color: #0066cc !important;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Live Controls Panel - Vertical Centering */
.live-controls-panel {
  background: white;
  padding: 1rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Control Sections (No more cards, just sections) */
.control-section {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1.5rem;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
}

.control-section:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.control-header h6 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0;
}

/* Enhanced Statistics Cards */
.enhanced-live-container .bg-light {
  background-color: #f8f9fa !important;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
}

.enhanced-live-container .bg-light:hover {
  background-color: #e9ecef !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Performance Metrics Sizing */
.performance-metrics {
  font-size: 1rem;
}

.performance-metrics .badge {
  font-size: 0.9rem !important;
  padding: 0.5rem 0.75rem;
}

/* Detection Feed Enhancement */
.detection-feed {
  border: 2px solid #e9ecef;
  border-radius: 8px;
  background: white !important;
}

.detection-feed::-webkit-scrollbar {
  width: 8px;
}

.detection-feed::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.detection-feed::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.detection-feed::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Responsive Height Adjustments */
@media (min-width: 992px) {
  .enhanced-live-container .main-container .card-body {
    min-height: 700px;
  }
  
  .live-controls-panel {
    min-height: 600px;
  }
}

/* Remove old control card styles that create double containers */
.live-stream-section,
.live-controls-section {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}

.control-card {
  display: none; /* Hide old control cards */
}

/* Processing Controls Enhancement */
.processing-controls {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  border: 1px solid #e9ecef;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  height: fit-content;
}

.processing-options {
  background: #f8f9fa;
  border-radius: 6px;
  padding: 1rem;
  border: 1px solid #e9ecef;
}

.processing-options h6 {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Enhanced Upload Area */
.enhanced-live-container .upload-placeholder {
  transition: all 0.3s ease;
  cursor: pointer;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.enhanced-live-container .upload-placeholder:hover {
  background-color: #e3f2fd !important;
  border-color: #2196f3 !important;
  transform: scale(1.02);
}

/* Responsive Adjustments for Main Containers */
@media (max-width: 992px) {
  .video-stream-wrapper {
    margin-bottom: 2rem;
  }
  
  .live-controls-panel {
    padding: 0;
  }
  
  .control-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
  }
  
  .enhanced-live-container .main-container .card-header {
    padding: 1rem 1.5rem;
  }
  
  .enhanced-live-container .main-container .card-header h5 {
    font-size: 1.1rem;
  }
}

@media (max-width: 768px) {
  .video-stream-wrapper {
    padding: 1rem;
  }
  
  .control-section {
    padding: 1rem;
    margin-bottom: 1rem;
  }
  
  .processing-controls {
    padding: 1rem;
  }
  
  .enhanced-live-container .main-container .card-body {
    padding: 1.5rem !important;
  }
}

/* ────────────────────────────────────────────────────────────────────────────
   MODERN CONTROL PANEL LAYOUT
───────────────────────────────────────────────────────────────────────────── */

/* Modern Card Headers with Color Coding */
.enhanced-live-container .card-header.bg-primary {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
  border: none;
  padding: 1rem 1.25rem;
}

.enhanced-live-container .card-header.bg-info {
  background: linear-gradient(135deg, #17a2b8 0%, #117a8b 100%) !important;
  border: none;
  padding: 1rem 1.25rem;
}

.enhanced-live-container .card-header.bg-success {
  background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%) !important;
  border: none;
  padding: 1rem 1.25rem;
}

.enhanced-live-container .card-header.bg-dark {
  background: linear-gradient(135deg, #343a40 0%, #23272b 100%) !important;
  border: none;
  padding: 1rem 1.25rem;
}

/* Modern Form Controls */
.enhanced-live-container .form-check-switch .form-check-input {
  width: 2.5rem;
  height: 1.25rem;
  background-color: #6c757d;
  border: none;
  border-radius: 2rem;
  transition: all 0.3s ease;
}

.enhanced-live-container .form-check-switch .form-check-input:checked {
  background-color: #28a745;
  transform: none;
}

.enhanced-live-container .form-check-switch .form-check-input:focus {
  box-shadow: 0 0 0 0.25rem rgba(40, 167, 69, 0.25);
}

/* Performance Metrics Styling */
.performance-metrics {
  font-size: 0.9rem;
}

.performance-metrics .border-bottom {
  border-color: rgba(0,0,0,0.1) !important;
}

/* Detection Feed Styling */
.detection-feed {
  padding: 0;
}

.detection-feed .text-center {
  background: #f8f9fa;
  margin: 0;
  border-radius: 0;
}

/* Enhanced Upload Section */
.enhanced-live-container .upload-placeholder {
  transition: all 0.3s ease;
  cursor: pointer;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.enhanced-live-container .upload-placeholder:hover {
  background-color: #e3f2fd !important;
  border-color: #2196f3 !important;
}

/* Statistics Cards Enhancement */
.enhanced-live-container .bg-light {
  background-color: #f8f9fa !important;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
}

.enhanced-live-container .bg-light:hover {
  background-color: #e9ecef !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
  .enhanced-live-container .col-xl-4 {
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 768px) {
  .enhanced-live-container .card-header {
    padding: 0.75rem 1rem;
  }
  
  .enhanced-live-container .card-header h6 {
    font-size: 0.9rem;
  }
  
  .enhanced-live-container .performance-metrics {
    font-size: 0.85rem;
  }
}

/* ────────────────────────────────────────────────────────────────────────────
   MODERN BULK ACTIONS OVERLAY - INDUSTRY STANDARD (GITHUB/NOTION/LINEAR STYLE)
───────────────────────────────────────────────────────────────────────────── */

/* Modern Bulk Actions Card - Industry Standard Design */
.bulk-actions-card {
  background: rgb(255, 255, 255);
  border: 1px solid rgb(208, 215, 222);
  border-radius: 12px;
  box-shadow: 
    0 16px 70px rgba(0, 0, 0, 0.12),
    0 4px 25px rgba(0, 0, 0, 0.07),
    0 2px 10px rgba(0, 0, 0, 0.04);
  padding: 0;
  min-width: 240px;
  max-width: 280px;
  animation: slideUpFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
}

/* Modern subtle entrance animation - GitHub/Linear style */
@keyframes slideUpFadeIn {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Legacy animation for backward compatibility */
@keyframes overlayFadeInScale {
  0% {
    opacity: 0;
    transform: translateX(2rem) scale(0.8);
    filter: blur(4px);
  }
  60% {
    opacity: 0.8;
    transform: translateX(-0.25rem) scale(1.05);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: blur(0);
  }
}

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Header with count - Clean, minimal industry style */
.bulk-actions-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgb(232, 236, 241);
  background: rgb(250, 251, 252);
  margin: 0;
}

.selected-count-badge {
  color: rgb(26, 32, 40);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  margin: 0;
  text-align: center;
  display: block;
}

/* Button container - Industry standard spacing */
.bulk-actions-buttons {
  padding: 12px;
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  background: white;
}

/* Individual action buttons - GitHub/Linear inspired */
.bulk-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgb(208, 215, 222);
  border-radius: 6px;
  background: white;
  color: rgb(26, 32, 40);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.12s cubic-bezier(0.02, 1.505, 0.745, 1.235);
  position: relative;
  overflow: hidden;
}

.bulk-action-btn:hover {
  background: rgb(246, 248, 250);
  border-color: rgb(176, 184, 193);
  transform: translateY(-1px);
}

.bulk-action-btn:active {
  background: rgb(238, 242, 246);
  transform: translateY(0);
  transition: all 0.06s;
}

/* Delete button styling - GitHub danger style */
.bulk-action-delete {
  background: rgb(218, 54, 51);
  border-color: rgba(218, 54, 51, 0.4);
  color: white;
}

.bulk-action-delete:hover {
  background: rgb(196, 49, 46);
  border-color: rgb(196, 49, 46);
  box-shadow: 0 3px 8px rgba(218, 54, 51, 0.12), 0 1px 3px rgba(218, 54, 51, 0.08);
}

.bulk-action-delete:active {
  background: rgb(179, 45, 42);
}

/* Clear button styling - Neutral GitHub style */
.bulk-action-clear {
  background: rgb(246, 248, 250);
  border-color: rgb(208, 215, 222);
  color: rgb(26, 32, 40);
}

.bulk-action-clear:hover {
  background: rgb(238, 242, 246);
  border-color: rgb(176, 184, 193);
}

.bulk-action-clear:active {
  background: rgb(230, 235, 241);
}

/* Focus states for accessibility - GitHub style */
.bulk-action-btn:focus {
  outline: 2px solid rgb(9, 105, 218);
  outline-offset: -2px;
  box-shadow: none;
}

.bulk-action-delete:focus {
  outline: 2px solid rgb(218, 54, 51);
  outline-offset: -2px;
}

/* Responsive adjustments - Mobile first approach */
@media (max-width: 768px) {
  .bulk-actions-card {
    min-width: 220px;
    max-width: 260px;
  }
  
  .bulk-actions-header {
    padding: 14px 16px;
  }
  
  .selected-count-badge {
    font-size: 13px;
  }
  
  .bulk-action-btn {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }
  
  .bulk-actions-buttons {
    padding: 10px;
    gap: 6px;
  }
}

@media (max-width: 576px) {
  .bulk-actions-card {
    min-width: 200px;
    max-width: 240px;
  }
  
  .bulk-actions-header {
    padding: 12px 14px;
  }
  
  .selected-count-badge {
    font-size: 12px;
  }
  
  .bulk-action-btn {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
}

/* Dark mode support for modern applications */
@media (prefers-color-scheme: dark) {
  .bulk-actions-card {
    background: rgb(32, 34, 37);
    border-color: rgb(56, 60, 66);
    box-shadow: 
      0 16px 70px rgba(0, 0, 0, 0.4),
      0 4px 25px rgba(0, 0, 0, 0.25),
      0 2px 10px rgba(0, 0, 0, 0.15);
  }
  
  .bulk-actions-header {
    background: rgb(28, 30, 33);
    border-color: rgb(56, 60, 66);
  }
  
  .selected-count-badge {
    color: rgb(230, 237, 243);
  }
  
  .bulk-actions-buttons {
    background: rgb(32, 34, 37);
  }
  
  .bulk-action-btn {
    background: rgb(32, 34, 37);
    border-color: rgb(56, 60, 66);
    color: rgb(230, 237, 243);
  }
  
  .bulk-action-btn:hover {
    background: rgb(40, 42, 46);
    border-color: rgb(70, 74, 80);
  }
  
  .bulk-action-clear {
    background: rgb(40, 42, 46);
    border-color: rgb(56, 60, 66);
    color: rgb(230, 237, 243);
  }
  
  .bulk-action-clear:hover {
    background: rgb(48, 50, 54);
    border-color: rgb(70, 74, 80);
  }
}

/* ────────────────────────────────────────────────────────────────────────────
   REGISTRATION PAGES STYLES
───────────────────────────────────────────────────────────────────────────── */

/* Registration Title */
.registration-title {
  color: var(--text-primary);
  font-size: 2rem;
  font-weight: 600;
  margin: 0 0 2rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
}

/* Registration Method Titles */
.registration-method-title {
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* User Info Section */
.user-info-section {
  text-align: center;
  margin-bottom: 2rem;
  padding: 2rem;
  background: var(--bg-color);
  border-radius: var(--border-radius-large);
  border-bottom: 2px solid var(--border-color);
}

.user-info-section h2 {
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-size: 1.8rem;
}

.user-details {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.detail-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.detail-item .label {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-item .value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Role Badges */
.badge.role-superadmin {
  background-color: var(--error-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
}

.badge.role-admin {
  background-color: var(--primary-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
}

.badge.role-vehicle_examiner {
  background-color: var(--success-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
}

/* Camera Section */
.camera-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin: 20px 0;
}

.camera-select-container {
  width: 100%;
  max-width: 640px;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.camera-select-container label {
  font-weight: bold;
  color: var(--text-color);
  text-align: center;
}

#cameraSelect {
  width: 100%;
  padding: 0.75rem;
  border-radius: var(--border-radius-small);
  border: 1px solid var(--border-color);
  background-color: var(--card-bg);
  font-size: 1rem;
  cursor: pointer;
}

#cameraSelect:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 2px var(--primary-light);
}

#liveVideo {
  width: 100%;
  max-width: 640px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
}

/* Capture Controls */
.capture-controls {
  text-align: center;
  margin: 20px 0;
}

.frame-counter {
  margin: 15px 0;
  color: var(--text-secondary);
  font-size: 1.1em;
  font-weight: bold;
}

/* Upload Button Container */
.upload-button-container {
  text-align: center;
  margin-top: 1.5rem;
}

/* Image Preview */
.image-preview-container {
  margin-top: 10px;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-small);
  padding: 10px;
  background-color: var(--bg-color);
  display: none;
}

.image-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  background: var(--card-bg);
  border-radius: var(--border-radius-large);
  padding: 2rem;
  text-align: center;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-light);
}

.image-preview h4 {
  color: var(--text-primary);
  margin-bottom: 1rem;
  width: 100%;
}

.image-preview img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--border-radius-small);
  border: 1px solid var(--border-color);
  max-width: 300px;
  max-height: 300px;
  box-shadow: var(--shadow-medium);
}

.preview-actions {
  margin-top: 1rem;
  width: 100%;
}

/* ────────────────────────────────────────────────────────────────────────────
   ADMIN PROFILE UPLOAD STYLES
───────────────────────────────────────────────────────────────────────────── */

/* Profile Upload Container */
.profile-upload-container {
  background: var(--bg-color);
  border-radius: var(--border-radius-large);
  padding: 2rem;
  box-shadow: var(--shadow-medium);
}

/* Upload Section */
.upload-section {
  margin-top: 2rem;
}

/* Upload Area */
.upload-area {
  border: 3px dashed var(--border-color);
  border-radius: var(--border-radius-large);
  padding: 3rem 2rem;
  text-align: center;
  background: var(--card-bg);
  transition: all var(--transition-speed) ease;
  cursor: pointer;
  position: relative;
  margin-bottom: 2rem;
}

.upload-area:hover {
  border-color: var(--primary-color);
  background: var(--card-bg-hover);
}

.upload-area.dragover {
  border-color: var(--success-color);
  background: var(--primary-light);
}

.upload-content i {
  font-size: 3rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.upload-content h3 {
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.upload-content p {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.file-info {
  font-size: 0.85rem;
  color: var(--muted-text);
}

/* Form Actions */
.form-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loading-content {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: var(--border-radius-large);
  text-align: center;
  box-shadow: var(--shadow-heavy);
}

.loading-content i {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.loading-content p {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text-color);
}

/* Password Info Display */
.password-info {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--primary-light);
  border: 1px solid var(--primary-color);
  border-radius: var(--border-radius);
}

.password-display {
  margin: 2rem 0;
  padding: 2rem;
  background: var(--success-color);
  color: white;
  border-radius: var(--border-radius-large);
}

.credential-info {
  margin: 1rem 0;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
}

.password-value {
  font-family: 'Courier New', monospace;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.25rem 0.5rem;
  border-radius: var(--border-radius-small);
  margin: 0 0.5rem;
}

/* Responsive Styles for Registration Pages */
@media (max-width: 768px) {
  .user-details {
    flex-direction: column;
    gap: 1rem;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
  
  .upload-area {
    padding: 2rem 1rem;
  }
  
  .upload-content i {
    font-size: 2rem;
  }
  
  .camera-select-container {
    padding: 0 1rem;
  }
  
  #liveVideo {
    max-width: 100%;
  }
}

/* === Face Recognition & Upload Specific Styles === */

/* Upload area hover and drag states */
.upload-area:hover {
    border-color: #007bff !important;
    background: #f8f9ff !important;
}

.upload-area.dragover {
    border-color: #28a745 !important;
    background: #f8fff8 !important;
}

/* Image preview container for face registration */
.image-preview-container {
    max-height: 200px;
    overflow-y: auto;
}

.image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.image-preview img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
}

/* Letter spacing utility class */
.ls-1 {
    letter-spacing: 0.05em;
}

/* === Base Layout Styles === */
body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
}

/* ────────────────────────────────────────────────────────────────────────────
   SIDEBAR & NAVIGATION STYLES
   Note: Moved to base.css for better organization
───────────────────────────────────────────────────────────────────────────── */

/* ────────────────────────────────────────────────────────────────────────────
   RESPONSIVE DESIGN
───────────────────────────────────────────────────────────────────────────── */

/* Mobile First Responsive Design */
   /* Note: Moved to base.css for better organization
───────────────────────────────────────────────────────────────────────────── */ */

/* ────────────────────────────────────────────────────────────────────────────
   DROPDOWN POSITIONING & OVERFLOW FIXES
───────────────────────────────────────────────────────────────────────────── */

/* Enhanced dropdown positioning */
.dropdown-menu {
    /* Ensure dropdown is positioned relative to viewport */
    position: absolute !important;
    z-index: 1055 !important;
    max-height: 80vh;
    overflow-y: auto;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Fix for dropdowns being cut off by parent containers */
.dropdown {
    position: static;
}

/* Force dropdown to always expand below the button and center-align */
.dropdown.position-relative .dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    margin-top: 8px !important;
    z-index: 1055 !important;
}

/* Ensure dropdown shows below the button on all screen sizes */
.dropdown.position-relative .dropdown-menu[data-bs-popper] {
    top: 100% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translateX(-50%) !important;
    margin: 8px 0 0 0 !important;
}

/* Ensure table container doesn't create stacking context issues */
.table-controls-section {
    overflow: visible !important;
    position: relative;
    z-index: 10;
}

/* Modern dropdown animations */
.dropdown-menu {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px) scale(0.95) !important;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.dropdown-menu.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1) !important;
    pointer-events: all;
}

/* Ensure dropdown stays in viewport */
@supports (position: fixed) {
    .dropdown.position-relative .dropdown-menu[data-bs-popper] {
        position: absolute !important;
        inset: auto auto auto auto !important;
        margin: 8px 0 0 0 !important;
        transform: translateX(-50%) !important;
    }
}

/* ────────────────────────────────────────────────────────────────────────────
   PAGINATION STYLING FIXES
───────────────────────────────────────────────────────────────────────────── */

/* Fix pagination button visibility and styling */
.pagination .page-link {
    color: var(--primary-color) !important;
    background-color: #fff !important;
    border: 1px solid #dee2e6 !important;
    padding: 0.375rem 0.75rem !important;
    font-size: 0.875rem !important;
    line-height: 1.25 !important;
    border-radius: 0.375rem !important;
    transition: all 0.15s ease-in-out !important;
}

.pagination .page-link:hover {
    color: var(--primary-hover) !important;
    background-color: #e9ecef !important;
    border-color: #adb5bd !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

.pagination .page-item.active .page-link {
    color: #fff !important;
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 2px 4px rgba(0,123,255,0.3) !important;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d !important;
    background-color: #fff !important;
    border-color: #dee2e6 !important;
    opacity: 0.6 !important;
}

/* Fix form control borders to match Bootstrap 5 styling */
.form-select,
.form-control {
    border: 1px solid #ced4da !important;
    border-radius: 0.375rem !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
}

.form-select:focus,
.form-control:focus {
    border-color: #86b7fe !important;
    outline: 0 !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

/* Ensure pagination controls have proper spacing and alignment */
#paginationContainer {
    margin-top: 1.5rem !important;
    padding-top: 1rem !important;
    border-top: 1px solid #dee2e6;
}

/* Fix jump to page input width and alignment */
#jumpToPageInput {
    width: 80px !important;
    min-width: 80px !important;
    text-align: center !important;
}

/* Items per page dropdown styling */
#itemsPerPageSelect {
    min-width: 60px !important;
    width: auto !important;
}

/* Pagination info styling */
#paginationInfo {
    white-space: nowrap;
}

/* Responsive adjustments for pagination */
@media (max-width: 768px) {
    #paginationContainer .col-md-6 {
        margin-bottom: 0.5rem;
    }
    
    #paginationInfo {
        font-size: 0.8rem;
    }
    
    .pagination .page-link {
        padding: 0.25rem 0.5rem !important;
        font-size: 0.8rem !important;
    }
}

/* ────────────────────────────────────────────────────────────────────────────
   LOGIN PAGE STYLES - HIGHEST PRIORITY (END OF FILE)
───────────────────────────────────────────────────────────────────────────── */

/* Login page body - Higher specificity */
html body.login-page {
    font-family: 'Inter', sans-serif !important;
    background: url('../images/bg-login.jpg') center center / cover no-repeat !important;
    min-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Main container */
.login-main-container {
    width: 100%;
    max-width: 1200px;
    min-height: 600px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

/* Login panel */
.login-panel {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
}

.login-panel::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(70, 155, 229, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

/* Hero panel */
.login-hero-panel {
    flex: 1;
    background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #0f172a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.login-hero-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(70, 155, 229, 0.1) 0%, transparent 50%);
    animation: login-rotate 20s linear infinite;
}

@keyframes login-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Brand section */
.login-brand-section {
    text-align: center;
    z-index: 2;
    position: relative;
}

.login-logo img {
    max-width: none;
    max-height: 180px;
    height: auto;
    width: auto;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.login-brand-tagline {
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 500;
}

/* Form section */
.login-form-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 2;
    position: relative;
}

.login-welcome-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-welcome-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.login-welcome-header p {
    color: #64748b;
    font-size: 1rem;
}

.login-form {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.login-form-group {
    margin-bottom: 1.5rem;
}

.login-form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #374151;
    font-weight: 600;
    font-size: 0.875rem;
}

.login-input-wrapper {
    position: relative;
}

.login-form-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    background: #fafafa;
    transition: all 0.3s ease;
    font-family: inherit;
}

.login-form-input:focus {
    outline: none;
    border-color: #469be5;
    background: white;
    box-shadow: 0 0 0 4px rgba(70, 155, 229, 0.1);
}

.login-input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    transition: color 0.3s ease;
}

.login-input-wrapper.focused .login-input-icon {
    color: #469be5;
}

/* Password toggle button */
.login-password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    z-index: 10;
    transition: color 0.3s ease;
}

.login-password-toggle:hover {
    color: #469be5;
}

.login-password-toggle:focus {
    outline: none;
    color: #469be5;
}

/* Adjust input padding when password toggle is present */
.login-input-wrapper:has(.login-password-toggle) .login-form-input {
    padding-right: 3.5rem;
}

/* Login button with enhanced states */

.login-button {
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(135deg, #469be5 0%, #3b82f6 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(70, 155, 229, 0.3);
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(70, 155, 229, 0.4);
}

.login-button:active {
    transform: translateY(0);
}

.login-button.login-btn-loading {
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
    pointer-events: none;
}

.login-button.login-btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: login-spin 1s linear infinite;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

@keyframes login-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.login-additional-options {
    text-align: center;
}

.login-forgot-password {
    color: #469be5;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.login-forgot-password:hover {
    color: #3b82f6;
}

/* Footer section */
.login-footer-section {
    text-align: center;
    z-index: 2;
    position: relative;
}

.login-copyright {
    color: #9ca3af;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Hero content */
.login-hero-content {
    text-align: center;
    z-index: 2;
    position: relative;
    padding: 2rem;
}

.login-hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #e2e8f0 0%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-highlight {
    color: #469be5;
}

.login-accent {
    color: #60a5fa;
}

.login-hero-description {
    font-size: 1.25rem;
    color: #cbd5e1;
    font-weight: 400;
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto;
}

/* Flash messages */
.login-flash-messages {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.login-flash-messages .alert {
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Additional styles for enhanced login form */
.login-role-info {
    background: rgba(70, 155, 229, 0.1);
    border: 1px solid rgba(70, 155, 229, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1.5rem;
    font-size: 0.85rem;
}

.login-hero-features {
    font-size: 0.95rem;
    color: #cbd5e1;
}

.login-hero-features i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.login-loading-spinner {
    display: inline-block;
}

.login-loading-spinner i {
    animation: fa-spin 1s infinite linear;
}

/* Form validation improvements */
.login-form-input.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1) !important;
    background-color: rgba(220, 53, 69, 0.05);
}

.login-invalid-feedback {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
    font-weight: 500;
}

.login-invalid-feedback.show {
    display: block;
}

/* Enhanced button loading state */
.login-button.login-btn-loading {
    opacity: 0.8;
    cursor: not-allowed;
    position: relative;
}

/* Responsive design */
@media (max-width: 768px) {
    .login-main-container {
        flex-direction: column;
        margin: 10px;
    }

    .login-hero-panel {
        order: -1;
        min-height: 200px;
    }

    .login-hero-title {
        font-size: 2rem;
    }

    .login-panel {
        padding: 2rem;
    }
}

/* ────────────────────────────────────────────────────────────────────────────
   SIDEBAR NOTIFICATION BELL STYLES
───────────────────────────────────────────────────────────────────────────── */

/* Notification Bell Link Styles */
.notification-bell-btn {
  display: block;
  transition: all 0.3s ease;
}

.notification-bell-btn:hover {
  background: rgba(102, 126, 234, 0.25) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.notification-bell-btn:active {
  transform: translateY(0);
}

.user-info-display {
    background: linear-gradient(135deg, #2d84ff 0%, #1e5fcc 100%);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.user-info-display .section-title {
    color: white;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    font-weight: 600;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.info-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.info-value {
    font-size: 1.2rem;
    color: #333;
    font-weight: 700;
}

.permissions-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.permissions-list .badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.profile-preview {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.profile-preview h3 {
    color: #333;
    margin-bottom: 1rem;
}

.current-profile-img {
    max-width: 250px;
    max-height: 250px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    object-fit: cover;
}

/* Edit Form Styles */
.registration-section {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.edit-section-title {
    color: #2d84ff;
    font-size: 1.4rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #2d84ff;
}

.edit-subsection-title {
    color: #1e5fcc;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.75rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.form-control {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.75rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: #2d84ff;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.camera-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.camera-section video {
    width: 100%;
    max-width: 640px;
    border-radius: 8px;
    margin: 1rem 0;
}

.capture-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.frame-counter {
    font-weight: 600;
    color: #2d84ff;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #e0e0e0;
}

.btn {
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-success {
    background: linear-gradient(135deg, #2d84ff 0%, #1e5fcc 100%);
    border: none;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    border: none;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .user-info-display {
        padding: 1.5rem;
    }
    
    .registration-section {
        padding: 1.5rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* ==================================================================
   UPDATED CSS FOR DELETED USERS SECTION
   WITH: Bulk selection and pagination before deleted section
   ================================================================== */

/* Deleted user row styling */
.deleted-user-row {
    background-color: #fef2f2 !important;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.deleted-user-row:hover {
    background-color: #fee2e2 !important;
    opacity: 0.9;
    transform: translateX(4px);
}

.deleted-user-row.selected {
    background-color: #fecaca !important;
    opacity: 1;
    border-left: 4px solid #dc2626;
}

/* Deleted section header */
.deleted-section-header th {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    padding: 16px;
    border-top: 3px solid #d1d5db;
    border-bottom: 2px solid #d1d5db;
    font-weight: 600;
    color: #6b7280;
}

/* Deleted table spacing */
#deletedUsersTable {
    margin-top: 2rem;
    border-top: 3px solid #d1d5db;
}

/* Bulk actions for deleted users */
#deletedBulkActions {
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

#deletedBulkActions .btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#deletedBulkActions .btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
}

#deletedBulkActions .btn-danger:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 38, 38, 0.3);
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 500px;
    width: 90%;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 1.5rem;
    border-radius: 12px 12px 0 0;
    color: white;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
}

.modal-body {
    padding: 1.5rem;
}

.modal-body ul {
    max-height: 200px;
    overflow-y: auto;
    margin: 0;
    padding-left: 1.5rem;
}

.modal-body ul::-webkit-scrollbar {
    width: 8px;
}

.modal-body ul::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-body ul::-webkit-scrollbar-thumb {
    background: #dc2626;
    border-radius: 4px;
}

.modal-body ul::-webkit-scrollbar-thumb:hover {
    background: #b91c1c;
}

.modal-footer {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 0 0 12px 12px;
}

/* Button styles for modal */
.modal-footer .btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-footer .btn-secondary {
    background: #6b7280;
    color: white;
}

.modal-footer .btn-secondary:hover {
    background: #4b5563;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.modal-footer .btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.modal-footer .btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.modal-footer .btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
}

.modal-footer .btn-danger:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Deleted user specific button styling */

#selectAllDeletedCheckbox:indeterminate {
    opacity: 0.6;
}

/* Pagination spacing before deleted section */
.pagination {
    margin-bottom: 2rem;
}

/* Deleted section animation on load */
#deletedUsersTable {
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Badge counter styling */
#deletedSelectedCount {
    font-weight: 700;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

/* ============================================================================
   AUTOMATED SNAPSHOT NOTIFICATIONS
   ============================================================================ */

.snapshot-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #2d84ff 0%, #1e5fcc 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 9999;
    max-width: 350px;
}

.snapshot-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.snapshot-notification i {
    font-size: 24px;
    animation: pulse 2s infinite;
}

.snapshot-notification span {
    font-weight: 600;
    font-size: 14px;
}

.snapshot-notification small {
    display: block;
    opacity: 0.9;
    font-size: 12px;
    margin-top: 2px;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ============================================================================
   INSPECTION PAGE - SNAPSHOT DISPLAY
   ============================================================================ */

.inspection-snapshot-grid {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.face-snapshots-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.face-snapshot-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.camera-eye-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.camera-eye-icon.has-snapshot {
    background: linear-gradient(135deg, #2d84ff 0%, #1e5fcc 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.camera-eye-icon.no-snapshot {
    background: #e9ecef;
    color: #6c757d;
}

.camera-eye-icon i {
    font-size: 20px;
}

.camera-eye-icon:hover.has-snapshot {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

.camera-eye-icon .camera-label {
    position: absolute;
    bottom: -20px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.snapshot-preview {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid #dee2e6;
    cursor: pointer;
    transition: all 0.3s ease;
}

.snapshot-preview:hover {
    transform: scale(1.05);
    border-color: #2d84ff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.snapshot-status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.snapshot-status-badge.match {
    background: #d4edda;
    color: #155724;
}

.snapshot-status-badge.mismatch {
    background: #f8d7da;
    color: #721c24;
}

.plate-snapshot-container {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.plate-snapshot-image {
    width: 120px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    border: 2px solid #dee2e6;
}

.plate-number-display {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: bold;
    color: #212529;
    letter-spacing: 2px;
}

.plate-confidence {
    font-size: 12px;
    color: #6c757d;
}

/* ============================================================================
   INSPECTION TABLE - Enhanced Display
   ============================================================================ */

.inspection-row {
    transition: all 0.3s ease;
}

.inspection-row:hover {
    background: #f8f9fa;
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.face-column-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.face-thumbnail {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #dee2e6;
}

.camera-indicators {
    display: flex;
    gap: 4px;
}

.camera-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e9ecef;
}

.camera-indicator.active-green {
    background: #28a745;
    animation: blink 1s infinite;
}

.camera-indicator.active-red {
    background: #dc3545;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ============================================================================
   INSPECTION DETAIL MODAL
   ============================================================================ */

.inspection-detail-modal .modal-body {
    padding: 30px;
}

.detail-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.detail-section:last-child {
    border-bottom: none;
}

.detail-section h5 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-section h5 i {
    color: #2d84ff;
}

.face-snapshots-detail {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.camera-snapshot-card {
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.camera-snapshot-card:hover {
    border-color: #2d84ff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.camera-snapshot-card.has-snapshot {
    border-color: #2d84ff;
}

.camera-snapshot-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 8px;
}

.camera-snapshot-card .camera-name {
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 5px;
}

.camera-snapshot-card .no-snapshot-text {
    padding: 60px 10px;
    color: #adb5bd;
    font-size: 14px;
}

.plate-detail-display {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.plate-detail-display img {
    width: 180px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #dee2e6;
}

.plate-info {
    flex: 1;
}

.plate-info .plate-number {
    font-family: 'Courier New', monospace;
    font-size: 28px;
    font-weight: bold;
    color: #212529;
    letter-spacing: 3px;
    margin-bottom: 8px;
}

.plate-info .confidence-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}

.plate-info .confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    transition: width 0.3s ease;
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 768px) {
    .inspection-snapshot-grid {
        flex-direction: column;
    }
    
    .face-snapshots-detail {
        grid-template-columns: 1fr;
    }
    
    .snapshot-notification {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .plate-detail-display {
        flex-direction: column;
        text-align: center;
    }
}

/* Camera indicators */
.camera-indicators {
    display: flex;
    gap: 4px;
}

.camera-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e9ecef;
}

.camera-indicator.active-green {
    background: #28a745;
    animation: blink 1s infinite;
}

.camera-indicator.active-red {
    background: #dc3545;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.face-column-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.face-info {
    flex: 1;
}

.plate-column-content {
    text-align: left;
}

/* Modal styles */
.detail-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.detail-section:last-child {
    border-bottom: none;
}

.detail-section h5 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.camera-snapshot-card {
    background: white;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.camera-snapshot-card:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.camera-snapshot-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 8px;
    cursor: pointer;
}

.plate-detail-display {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.confidence-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}

.confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    transition: width 0.3s ease;
}
/* ════════════════════════════════════════════════════════════════════════════
   STYLES.CSS - GLOBAL RESPONSIVE ENHANCEMENTS
   Supplements existing media queries with additional breakpoints
════════════════════════════════════════════════════════════════════════════ */

/* ── 1200px–1399px: Large laptop ─────────────────────────────────────────── */
@media (max-width: 1399px) {
  :root {
    --sidebar-width: 260px;
  }
}

/* ── 992px–1199px: Tablet landscape / small laptop ──────────────────────── */
@media (max-width: 1199px) {
  .card {
    border-radius: calc(var(--border-radius) - 2px);
  }

  /* Modal sizing */
  .modal-dialog.modal-xl {
    max-width: 96vw;
  }

  .modal-dialog.modal-lg {
    max-width: 90vw;
  }
}

/* ── 768px–991px: Tablet portrait ───────────────────────────────────────── */
@media (max-width: 991px) {
  body {
    font-size: 0.95rem;
  }

  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }

  /* Table base improvements */
  .table {
    font-size: 0.875rem;
  }

  .table th,
  .table td {
    padding: 0.625rem 0.5rem;
  }

  /* Form controls */
  .form-control,
  .form-select {
    font-size: 0.9rem;
  }

  /* Buttons */
  .btn {
    font-size: 0.875rem;
  }

  /* Modals */
  .modal-dialog {
    margin: 0.5rem auto;
  }

  .modal-body {
    max-height: 70vh;
    overflow-y: auto;
  }

  /* Cards */
  .card-body {
    padding: 1rem;
  }
}

/* ── Max 768px: Mobile ───────────────────────────────────────────────────── */
@media (max-width: 768px) {
  body {
    font-size: 0.9rem;
  }

  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1.1rem; }

  /* Touch-friendly tap targets */
  .btn,
  .nav-link,
  .form-check-label {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
  }

  /* Better table handling */
  .table-responsive {
    -webkit-overflow-scrolling: touch;
    border: none;
  }

  .table {
    font-size: 0.82rem;
    min-width: 560px;
  }

  .table th,
  .table td {
    padding: 0.5rem 0.375rem;
    white-space: nowrap;
  }

  /* Form controls full width */
  .form-control,
  .form-select {
    font-size: 16px; /* Prevent iOS zoom */
  }

  /* Card improvements */
  .card {
    border-radius: 0.5rem;
  }

  .card-header {
    padding: 0.875rem 1rem;
  }

  .card-body {
    padding: 0.875rem;
  }

  /* Modal improvements */
  .modal-dialog {
    margin: 0.25rem;
    max-width: calc(100vw - 0.5rem);
  }

  .modal-content {
    border-radius: 10px;
  }

  .modal-header {
    padding: 1rem;
  }

  .modal-body {
    padding: 1rem;
    max-height: 65vh;
  }

  .modal-footer {
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .modal-footer .btn {
    flex: 1 1 auto;
    text-align: center;
    justify-content: center;
  }

  /* Alert components */
  .alert {
    font-size: 0.875rem;
    padding: 0.75rem;
  }

  /* Badge */
  .badge {
    font-size: 0.7rem;
  }

  /* Input groups */
  .input-group > .form-control {
    font-size: 16px; /* Prevent iOS zoom */
  }

  /* Dropdown menus */
  .dropdown-menu {
    font-size: 0.875rem;
  }

  /* Grid row gaps */
  .row {
    --bs-gutter-x: 0.875rem;
    --bs-gutter-y: 0.875rem;
  }

  /* Hide non-essential decorative elements */
  .d-sm-none {
    display: none !important;
  }

  /* Toasts */
  .toast {
    max-width: calc(100vw - 2rem);
  }
}

/* ── Max 576px: Small phones ─────────────────────────────────────────────── */
@media (max-width: 576px) {
  body {
    font-size: 0.875rem;
  }

  h1 { font-size: 1.3rem; }
  h2 { font-size: 1.15rem; }

  .card-body {
    padding: 0.75rem;
  }

  .card-header {
    padding: 0.75rem;
  }

  .btn {
    font-size: 0.82rem;
    padding: 0.4rem 0.875rem;
  }

  .btn-sm {
    font-size: 0.75rem;
    padding: 0.3rem 0.625rem;
  }

  .table {
    font-size: 0.78rem;
  }

  .row {
    --bs-gutter-x: 0.625rem;
    --bs-gutter-y: 0.625rem;
  }

  /* Full-width modals on tiny screens */
  .modal-dialog {
    margin: 0;
    max-width: 100vw;
    min-height: 100%;
  }

  .modal-content {
    border-radius: 0;
    min-height: 100%;
  }

  .modal-body {
    max-height: calc(100vh - 120px);
  }
}

/* ── Max 480px: Extra small ──────────────────────────────────────────────── */
@media (max-width: 480px) {
  .row {
    --bs-gutter-x: 0.5rem;
    --bs-gutter-y: 0.5rem;
  }

  .btn {
    font-size: 0.8rem;
  }

  /* Stack flex containers */
  .d-flex.gap-2,
  .d-flex.gap-3 {
    flex-wrap: wrap;
  }
}

/* ── Touch device hover fix ──────────────────────────────────────────────── */
@media (hover: none) and (pointer: coarse) {
  .btn:hover {
    transform: none;
    box-shadow: none;
  }

  .card:hover {
    transform: none;
  }

  .nav-link:hover i {
    transform: none;
  }
}

/* ── Landscape phones ────────────────────────────────────────────────────── */
@media (max-height: 500px) and (orientation: landscape) {
  .modal-body {
    max-height: 50vh;
  }

  .modal-dialog {
    margin: 0.25rem auto;
  }
}