/* FAB buttons */
.mobile-fab-button {
  display: none;
  position: fixed;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  font-size: 18px;
  z-index: 99999;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  color: white;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* Show passport FAB on desktop only */
@media (min-width: 769px) {
  #mobile-fab-passport {
    display: flex !important;
    bottom: 30px;
    background: #1E3676;
    box-shadow: 0 6px 20px rgba(30,54,118,0.3);
  }

  #mobile-fab-passport:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(30,54,118,0.4);
  }

  /* Hide other FAB buttons on desktop */
  #mobile-fab-checkout,
  #mobile-fab-checkin {
    display: none !important;
  }
}

/* Show all FAB buttons on mobile */
@media (max-width: 768px) {
  .mobile-fab-button {
    display: flex !important;
  }
}

:root {
  --primary-blue: #203775;
  --secondary-blue: #2E4A8B;
  --accent-gold: #D4AF37;
  --success-green: #10B981;
  --warning-yellow: #F59E0B;
  --danger-red: #EF4444;
  --text-dark: #1F2937;
  --text-light: #6B7280;
  --bg-light: #F8FAFC;
  --bg-white: #FFFFFF;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --gradient-primary: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
  --gradient-gold: linear-gradient(135deg, #FFD700 0%, var(--accent-gold) 100%);
  --gradient-success: linear-gradient(135deg, #22C55E 0%, var(--success-green) 100%);
  --border-radius: 12px;
  --border-radius-lg: 16px;
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  margin: 0;
  padding: 0;
  background: #FFFFFF;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  position: relative;
}

/* =================== LANDING PAGE =================== */
.landing-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #FFFFFF;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.landing-page.hidden {
  opacity: 0;
  pointer-events: none;
}

.animated-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.gradient-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.3;
  animation: float 20s infinite ease-in-out;
}

.blob-1 {
  width: 600px;
  height: 600px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  top: -200px;
  left: -200px;
  animation-delay: 0s;
}

.blob-2 {
  width: 500px;
  height: 500px;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  bottom: -150px;
  right: -150px;
  animation-delay: 5s;
}

.blob-3 {
  width: 450px;
  height: 450px;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 10s;
}

.blob-4 {
  width: 350px;
  height: 350px;
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  bottom: 20%;
  left: 10%;
  animation-delay: 15s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(100px, -100px) scale(1.1); }
  50% { transform: translate(-100px, 100px) scale(0.9); }
  75% { transform: translate(50px, 50px) scale(1.05); }
}

.landing-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 20px;
  max-width: 800px;
  animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.welcome-title {
  font-size: 56px;
  font-weight: 700;
  color: #1d1d1f;
  margin: 0 0 20px 0;
  line-height: 1.1;
  letter-spacing: -0.02em;
  animation: titleReveal 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes titleReveal {
  from { opacity: 0; transform: translateY(40px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.welcome-subtitle {
  font-size: 28px;
  font-weight: 400;
  color: #424245;
  margin: 0 0 60px 0;
  line-height: 1.3;
  animation: subtitleReveal 1.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes subtitleReveal {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.choice-buttons {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  /* Animation removed */
}

/* Animation removed */

.choice-button {
  min-width: 200px;
  padding: 20px 40px;
  border: none;
  border-radius: 980px;
  font-size: 19px;
  font-weight: 500;
  cursor: pointer;
  /* Transition removed */
  position: relative;
  overflow: hidden;
  letter-spacing: -0.01em;
  text-transform: none;
  font-family: inherit;
}

.choice-button.primary {
  background: #0071e3;
  color: white;
  box-shadow: 0 4px 20px rgba(0, 113, 227, 0.3);
}

.choice-button.primary:hover {
  background: #0077ed;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 113, 227, 0.4);
}

.choice-button.primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(0, 113, 227, 0.3);
}

.choice-button.secondary {
  background: #f5f5f7;
  color: #86868b;
  cursor: not-allowed;
  position: relative;
}

.choice-button.secondary::after {
  content: 'Coming Soon';
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: #1d1d1f;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

.choice-button.secondary:hover::after {
  opacity: 1;
}

/* =================== BROWSER NOTICE =================== */
.browser-notice {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
  color: white;
  padding: 12px 20px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  z-index: 10001;
  display: none;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.3);
}

.browser-notice.show {
  display: block;
  animation: slideInRight 0.3s ease-out;
}

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

/* =================== MAIN APPLICATION =================== */
.main-application {
  display: none;
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
}

.main-application.active {
  display: block;
  opacity: 1;
}

.back-button {
  position: fixed;
  top: 15px;
  right: 30px;
  left: auto;
  z-index: 2500;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 10px 20px;
  border-radius: 980px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  color: #0071e3;
  display: none;
  align-items: center;
  gap: 6px;
  /* Transition removed */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.back-button.visible {
  display: flex;
}

.back-button:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.back-button i {
  font-size: 14px;
}

.container {
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  bottom: 0;
  display: block;
  overflow: hidden;
}

.viewer-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#smplr-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.header {
  background: rgb(32,55,116);
  color: white;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  height: 80px;
  display: flex;
  align-items: center;
  padding: 0 30px;
  box-shadow: var(--shadow-lg);
  touch-action: manipulation;
  user-select: none;
}

.header img {
  max-height: 60px;
  transition: var(--transition-smooth);
}

.header img:hover {
  transform: scale(1.05);
}

/* =================== STATUS OVERLAY =================== */
.status-overlay {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: 25px;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 1600; /* Higher than viewer controls (900) */
  min-width: 320px;
  max-width: 380px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transform: translateY(0);
  transition: var(--transition-smooth);
}

.status-overlay:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 40px -10px rgba(0, 0, 0, 0.15);
}

.color-legend {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}

.legend-item {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
  padding: 8px;
  border-radius: 8px;
  transition: var(--transition-fast);
}

.legend-item:hover {
  background: rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

.legend-color {
  width: 18px;
  height: 18px;
  margin-right: 10px;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.legend-color::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: inherit;
  filter: brightness(1.1);
}

.controls {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.controls button {
  flex: 1;
  min-height: 48px;
  padding: 12px 20px;
  border: none;
  border-radius: var(--border-radius);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.controls button::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: var(--transition-smooth);
}

.controls button:hover::before {
  left: 100%;
}

#add-horse-btn {
  background: var(--gradient-success);
  color: white;
  box-shadow: var(--shadow-md);
}

#add-horse-btn:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

#add-horse-btn:disabled {
  background: linear-gradient(135deg, #9CA3AF 0%, #6B7280 100%);
  cursor: not-allowed;
  transform: none;
  box-shadow: var(--shadow-sm);
}

#refresh-btn {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-md);
}

#refresh-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.status-text {
  font-size: 14px;
  color: var(--text-light);
  text-align: center;
  padding: 10px;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 8px;
  border-left: 4px solid var(--accent-gold);
}

/* =================== MODAL STYLES - FIXED VERSION =================== */
#checkin-modal, #checkout-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  z-index: 3000;
  justify-content: center;
  align-items: center;
  padding: 20px;
  animation: modalFadeIn 0.3s ease-out;
  overflow-y: auto;
}

@keyframes modalFadeIn {
  from { opacity: 0; backdrop-filter: blur(0px); }
  to { opacity: 1; backdrop-filter: blur(10px); }
}

.modal-content {
  background: var(--bg-white);
  border-radius: 25px;
  width: 100%;
  max-width: 500px; /* Reduced from 700px */
  max-height: 85vh; /* Reduced from 90vh */
  box-shadow: var(--shadow-xl);
  position: relative;
  animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Dynamic height - let content determine size */
  display: flex;
  flex-direction: column;
  overflow: visible;
}

@keyframes modalSlideIn {
  from { transform: translateY(50px) scale(0.95); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-content h2 {
  background: var(--gradient-primary);
  color: white;
  margin: 0;
  padding: 25px 30px;
  border-radius: 25px 25px 0 0;
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 15px;
  flex-shrink: 0;
}

.modal-content h2::before {
  content: '🐎';
  font-size: 28px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

.tab-group {
  display: flex;
  margin: 0;
  background: var(--bg-light);
  border-radius: 0;
  flex-shrink: 0;
}

.tab {
  flex: 1;
  padding: 20px 15px;
  cursor: pointer;
  background: transparent;
  border: none;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-light);
  transition: var(--transition-smooth);
  position: relative;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tab::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: var(--gradient-gold);
  transition: var(--transition-smooth);
  transform: translateX(-50%);
}

.tab.active {
  color: var(--primary-blue);
  background: rgba(212, 175, 55, 0.1);
}

.tab.active::after {
  width: 80%;
}

.tab:hover:not(.active) {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-dark);
}

/* Tab content - default styles for owner and horse tabs */
.tab-content {
  display: none;
  padding: 30px;
  animation: tabFadeIn 0.3s ease-out;
}

@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.tab-content.active {
  display: block;
}

/* Special handling for transport tab ONLY */
#transport-tab {
  padding: 0;
  position: relative;
}

.transport-scrollable {
  padding: 30px;
  overflow-y: auto;
  overflow-x: hidden;
  /* Height will be set dynamically by JavaScript */
}

/* Scrollbar styling for transport tab */
.transport-scrollable::-webkit-scrollbar {
  width: 8px;
}

.transport-scrollable::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

.transport-scrollable::-webkit-scrollbar-thumb {
  background: var(--gradient-primary);
  border-radius: 4px;
}

.transport-scrollable::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-blue);
}

.form-group {
  margin-bottom: 25px;
  position: relative;
}

.form-group.hidden {
  display: none;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-dark);
  font-size: 15px;
}

.form-group input, .form-group select {
  width: 100%;
  min-height: 52px;
  padding: 16px 18px;
  border: 2px solid #E5E7EB;
  border-radius: var(--border-radius);
  font-size: 16px;
  transition: var(--transition-smooth);
  background: var(--bg-white);
  -webkit-appearance: none;
  appearance: none;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 40px;
  cursor: pointer;
}

.form-group input:focus, .form-group select:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(32, 55, 117, 0.1);
  transform: translateY(-2px);
}

.form-group input:hover, .form-group select:hover {
  border-color: var(--secondary-blue);
}

.form-group input[required]:invalid {
  border-color: var(--danger-red);
}

.form-group input[required]:valid {
  border-color: var(--success-green);
}

.form-group input:disabled, .form-group select:disabled {
  background: #F3F4F6;
  cursor: not-allowed;
  opacity: 0.7;
}

.loading-indicator {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border: 2px solid #E5E7EB;
  border-top: 2px solid var(--primary-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: none;
}

.loading-indicator.active {
  display: block;
}

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

.profile-confirmation {
  background: rgba(16, 185, 129, 0.1);
  border: 2px solid var(--success-green);
  border-radius: var(--border-radius);
  padding: 20px;
  margin-bottom: 20px;
  display: none;
}

.profile-confirmation.active {
  display: block;
  animation: fadeInScale 0.3s ease-out;
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.profile-confirmation h4 {
  color: var(--success-green);
  margin: 0 0 15px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-confirmation .profile-details {
  background: white;
  padding: 15px;
  border-radius: 8px;
  margin: 15px 0;
}

.profile-confirmation .confirm-buttons {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.profile-confirmation button {
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition-fast);
  min-height: 44px;
}

.confirm-profile {
  background: var(--success-green);
  color: white;
}

.edit-profile {
  background: var(--warning-yellow);
  color: white;
}

.modal-actions {
  padding: 20px 30px 30px;
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  background: var(--bg-light);
  border-radius: 0 0 20px 20px;
  border-top: 1px solid #E5E7EB;
  flex-shrink: 0;
  margin: 0;
}

.modal-actions button {
  min-height: 52px;
  padding: 14px 28px;
  border: none;
  border-radius: var(--border-radius);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  min-width: 120px;
  position: relative;
  overflow: hidden;
}

.modal-actions .cancel {
  background: #F3F4F6;
  color: var(--text-dark);
  border: 2px solid #E5E7EB;
}

.modal-actions .cancel:hover {
  background: #E5E7EB;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.modal-actions .primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-md);
}

.modal-actions .primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.modal-actions .primary:active {
  transform: translateY(-1px);
}

.gender-male {
  color: var(--primary-blue);
}

.gender-female {
  color: #EC4899;
}

/* =================== SCANNING COMPONENTS =================== */
.chip-input-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.chip-input-container input {
  flex: 1;
}

.scan-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}

.scan-btn {
  min-width: 48px;
  min-height: 48px;
  padding: 12px;
  border: 2px solid #E5E7EB;
  border-radius: var(--border-radius);
  background: var(--bg-white);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-dark);
}

.scan-btn:hover:not(:disabled) {
  border-color: var(--primary-blue);
  background: rgba(32, 55, 117, 0.05);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.scan-btn:disabled {
  background: #F3F4F6;
  color: #9CA3AF;
  cursor: not-allowed;
  opacity: 0.6;
}

.scan-btn.active {
  background: var(--gradient-primary);
  color: white;
  border-color: var(--primary-blue);
}

.scan-btn.barcode-btn {
  color: var(--success-green);
}

.scan-btn.omnimax-btn {
  color: #EF4444;
  transition: all 0.3s ease;
}

.scan-btn.omnimax-btn:disabled {
  color: #9ca3af;
  background: #f3f4f6;
  cursor: not-allowed;
  opacity: 0.6;
}

.scan-btn.omnimax-btn.connected {
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  border-color: #10b981;
}

.scan-btn.omnimax-btn.connected:hover {
  background: rgba(16, 185, 129, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* =================== BARCODE SCANNER MODAL =================== */
#barcode-scanner-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  z-index: 3500;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

/* Ensure modal displays as flex when shown */
#barcode-scanner-modal[style*="display: flex"],
#barcode-scanner-modal.show,
#barcode-scanner-modal.active {
  display: flex !important;
}

/* Mobile specific adjustments */
@media (max-width: 768px) {
  #barcode-scanner-modal {
    padding: 0;
  }
}

.scanner-content {
  background: var(--bg-white);
  border-radius: 25px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Mobile full screen scanner */
@media (max-width: 768px) {
  .scanner-content {
    max-width: 100%;
    max-height: 100%;
    height: 100%;
    border-radius: 0;
  }
}

.scanner-header {
  background: var(--gradient-primary);
  color: white;
  padding: 20px;
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 25px 25px 0 0;
}

.scanner-body {
  padding: 20px;
  text-align: center;
}

.camera-container {
  position: relative;
  width: 100%;
  height: 300px;
  background: #000;
  border-radius: var(--border-radius);
  margin: 20px 0;
  overflow: hidden;
  border: 3px solid var(--success-green);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

#scanner-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--border-radius) - 3px);
}

#scanner-status {
  margin: 15px 0;
  padding: 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.05);
  font-weight: 500;
  transition: var(--transition-fast);
  text-align: center;
  font-size: 14px;
}

.scanner-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

.scanner-actions button {
  padding: 12px 24px;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  font-size: 14px;
  min-width: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.scanner-actions button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.start-camera-btn {
  background: var(--gradient-primary);
  color: white;
  font-size: 16px;
}

.start-camera-btn:hover:not(:disabled) {
  background: var(--secondary-blue);
  transform: translateY(-2px);
}

.close-scanner {
  background: var(--danger-red);
  color: white;
}

.close-scanner:hover {
  background: #DC2626;
  transform: translateY(-2px);
}

/* =================== OMNIMAX SCANNER OVERLAY =================== */
.scanner-overlay {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 300px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  z-index: 1200;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-left: 4px solid #6B7280;
  transition: all 0.3s ease;
}

.scanner-overlay.connected {
  border-left-color: #10B981;
  background: rgba(240, 253, 244, 0.98);
}

.scanner-overlay:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
}

.scanner-overlay-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-weight: 700;
  font-size: 16px;
  color: #374151;
}

.scanner-overlay-header i {
  color: #6B7280;
  font-size: 18px;
}

.scanner-overlay.connected .scanner-overlay-header i {
  color: #10B981;
}

.scanner-overlay-status {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #374151;
}

.scanner-overlay-details {
  font-size: 12px;
  color: #6B7280;
  margin-bottom: 16px;
  line-height: 1.4;
}

.scanner-setup-btn {
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.scanner-setup-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* =================== OMNIMAX SETUP MODAL =================== */
#scanner-setup-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  z-index: 4000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.scanner-setup-content {
  background: white;
  border-radius: 20px;
  width: 90%;
  max-width: 700px !important;
  max-height: 85vh;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.scanner-setup-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 24px 30px;
  border-radius: 25px 25px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.scanner-setup-header i {
  margin-right: 12px;
}

.close-scanner-setup {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  padding: 8px;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-scanner-setup:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.scanner-setup-body {
  padding: 30px;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.compatibility-section {
  margin-bottom: 30px;
  text-align: center;
}

.compatibility-status {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
}

.compatibility-status.compatible {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  color: #059669;
  border: 2px solid #10b981;
}

.compatibility-status.incompatible {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  color: #dc2626;
  border: 2px solid #ef4444;
}

.instructions-section {
  margin-bottom: 30px;
  padding: 20px;
  background: #f8fafc;
  border-radius: 12px;
  border-left: 4px solid #3b82f6;
}

.instructions-section h4 {
  margin-bottom: 16px;
  color: #1e40af;
  font-size: 16px;
  font-weight: 700;
}

.instructions-section ol {
  margin-left: 20px;
  line-height: 1.6;
  color: #374151;
}

.instructions-section li {
  margin-bottom: 8px;
  font-size: 14px;
}

.connect-section {
  margin-bottom: 30px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.connect-scanner-btn,
.test-scan-btn {
  flex: 1;
  min-width: 200px;
  padding: 16px 24px;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.connect-scanner-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.connect-scanner-btn:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.connect-scanner-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
}

.test-scan-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

.test-scan-btn:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

.device-info-section {
  margin-bottom: 30px;
  padding: 20px;
  background: #f8fafc;
  border-radius: 12px;
  border: 2px solid #e5e7eb;
}

.device-info-section h4 {
  margin-bottom: 16px;
  color: #374151;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.device-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.device-info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.device-info-label {
  font-weight: 600;
  color: #6b7280;
  font-size: 14px;
}

.device-info-value {
  font-weight: 700;
  color: #374151;
  font-size: 14px;
}

.scanner-terminal {
  border-top: 2px solid #e5e7eb;
  background: #1e1e1e;
  border-radius: 0 0 20px 20px;
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
}

.scanner-terminal-header {
  background: #2d2d30;
  color: white;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 14px;
  border-bottom: 1px solid #3e3e42;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.scanner-terminal-output {
  height: 120px; /* Reduced from 200px */
  overflow-y: auto;
  padding: 12px; /* Reduced from 16px */
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 12px; /* Reduced from 13px */
  line-height: 1.4;
  color: #ffffff;
  flex-shrink: 0;
}

.terminal-log-entry {
  margin-bottom: 4px;
  display: flex;
  gap: 12px;
}

.terminal-timestamp {
  color: #888;
  font-size: 11px;
  min-width: 60px;
}

.terminal-message {
  color: #ffffff;
}

.terminal-info { color: #4fc3f7; }
.terminal-success { color: #81c784; }
.terminal-warn { color: #ffb74d; }
.terminal-error { color: #e57373; }

/* =================== OMNIMAX SCANNING MODAL =================== */
#omnimax-scanning-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(15px);
  z-index: 5000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.omnimax-scanning-content {
  background: white;
  border-radius: 24px;
  width: 100%;
  max-width: 500px;
  text-align: center;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
  animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.omnimax-scanning-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.omnimax-scanning-body {
  padding: 40px 30px 30px;
}

.scanning-animation {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scanning-pulse {
  position: absolute;
  width: 120px;
  height: 120px;
  border: 3px solid #667eea;
  border-radius: 50%;
  animation: pulse-ring 2s infinite ease-out;
}

.scanning-pulse::before {
  content: '';
  position: absolute;
  width: 140px;
  height: 140px;
  border: 2px solid #667eea;
  border-radius: 50%;
  top: -13px;
  left: -13px;
  animation: pulse-ring 2s infinite ease-out 0.5s;
  opacity: 0.7;
}

.scanning-icon {
  font-size: 48px;
  color: #667eea;
  animation: bounce 2s infinite;
  z-index: 1;
}

@keyframes pulse-ring {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}

#scanning-status {
  font-size: 24px;
  font-weight: 700;
  color: #374151;
  margin-bottom: 12px;
}

#scanning-instruction {
  font-size: 16px;
  color: #6b7280;
  margin-bottom: 30px;
  line-height: 1.5;
}

.scanning-progress {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 30px;
}

.progress-bar {
  flex: 1;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  transition: width 0.3s ease;
  border-radius: 4px;
}

#scanning-timer {
  font-weight: 700;
  color: #374151;
  font-size: 16px;
  min-width: 35px;
}

.omnimax-scanning-actions {
  padding: 0 30px 30px;
}

.cancel-scan-btn {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.cancel-scan-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

/* =================== NOTIFICATIONS =================== */
.notification-success {
  position: fixed;
  top: 100px;
  right: 30px;
  background: var(--gradient-success);
  color: white;
  padding: 15px 20px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  z-index: 4000;
  animation: slideInRight 0.3s ease-out;
  font-weight: 600;
}

.notification-popup {
  position: fixed;
  top: 100px;
  right: 30px;
  padding: 16px 20px;
  border-radius: 12px;
  color: white;
  font-weight: 600;
  z-index: 6000;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 400px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.notification-popup.show {
  opacity: 1;
  transform: translateX(0);
}

.notification-popup.success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.notification-popup.error {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.notification-popup.info {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

/* =================== MODAL SHOW CLASSES =================== */
#scanner-setup-modal.modal-show,
#omnimax-scanning-modal.modal-show,
#barcode-scanner-modal.modal-show,
#checkin-modal.modal-show,
#checkout-modal.modal-show {
  display: flex !important;
}

/* =================== CUSTOM SCROLLBARS =================== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-blue);
}

.scanner-setup-body::-webkit-scrollbar {
  width: 8px;
}

.scanner-setup-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

.scanner-setup-body::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 4px;
}

.scanner-terminal-output::-webkit-scrollbar {
  width: 6px;
}

.scanner-terminal-output::-webkit-scrollbar-track {
  background: #2d2d30;
  border-radius: 3px;
}

.scanner-terminal-output::-webkit-scrollbar-thumb {
  background: #4a4a4d;
  border-radius: 3px;
}

/* =================== HIDE SMPLR BRANDING =================== */
#powered-by,
div[id*="powered-by"],
div[class*="powered-by"],
[id*="powered-by"],
[class*="powered-by"] {
  display: none !important;
}

/* Smplr viewer controls - move to bottom-left */
div[class*="sc-bczRLJ"][class*="sc-gsnTZi"][class*="sc-jOrMOR"] {
  position: fixed !important;
  bottom: 20px !important;
  left: 20px !important;
  top: auto !important;
  right: auto !important;
  z-index: 900 !important; /* Lower than status overlay */
  border-radius: var(--border-radius) !important;
  box-shadow: var(--shadow-lg) !important;
  backdrop-filter: blur(10px) !important;
}

/* =================== RESPONSIVE DESIGN =================== */
@media (hover: none) and (pointer: coarse) {
  .controls button { min-height: 60px; }
  .form-group input, .form-group select { min-height: 56px; font-size: 18px; }
  .tab { min-height: 72px; font-size: 18px; }
  .modal-actions button { min-height: 56px; font-size: 18px; }
  .profile-confirmation button { min-height: 48px; font-size: 16px; }
  .scan-btn { min-width: 56px; min-height: 56px; }
  .scanner-actions button { min-height: 50px; font-size: 16px; }
}

@media (max-width: 768px) {
  .welcome-title { font-size: 40px; }
  .welcome-subtitle { font-size: 22px; }
  .choice-buttons { flex-direction: column; width: 100%; }
  .choice-button { width: 100%; }
  .header { padding: 0 20px; height: 70px; }
  .container { top: 70px; }
  .back-button { top: 80px; }
  
  .status-overlay {
    bottom: 10px;
    right: 10px;
    left: 10px;
    min-width: auto;
    max-height: calc(100vh - 100px);
  }
  
  .color-legend { grid-template-columns: 1fr; gap: 10px; }
  .controls { flex-direction: column; }
  
  .modal-content {
    margin: 10px;
    max-height: calc(100vh - 40px);
  }
  
  .tab-content { padding: 20px; }
  .transport-scrollable { padding: 20px; }
  .modal-actions { flex-direction: column-reverse; gap: 10px; }
  .modal-actions button { width: 100%; }
  
  .chip-input-container { flex-direction: column; align-items: stretch; }
  .scan-buttons { justify-content: center; margin-top: 10px; }
  .scan-btn { flex: 1; max-width: 120px; }
  
  .camera-container { height: 250px; margin: 15px 0; }
  .scanner-actions { flex-direction: column; gap: 10px; }
  .scanner-actions button { width: 100%; min-height: 50px; font-size: 16px; }
  
  .scanner-overlay {
    left: 10px;
    bottom: 10px;
    width: calc(100vw - 20px);
    max-width: 350px;
  }
  
  .scanner-setup-content { margin: 10px; max-height: calc(100vh - 40px); }
  .connect-section { flex-direction: column; }
  .device-info-grid { grid-template-columns: 1fr; }
  .scanning-progress { flex-direction: column; gap: 12px; }
  .notification-popup { right: 10px; left: 10px; max-width: none; }
  
  div[class*="sc-bczRLJ"][class*="sc-gsnTZi"][class*="sc-jOrMOR"] {
    bottom: 10px !important;
    left: 10px !important;
    top: auto !important;
    right: auto !important;
  }
}

@media (max-width: 480px) {
  .modal-content {
    max-height: calc(100vh - 20px);
    margin: 10px 5px;
  }
  
  .tab-content { padding: 16px; }
  .transport-scrollable { padding: 16px; }
  
  .scanner-overlay {
    bottom: 80px;
    left: 10px;
    width: calc(100vw - 20px);
    max-width: none;
  }
  
  .omnimax-scanning-content { margin: 20px 10px; }
  .scanning-animation { width: 100px; height: 100px; }
  .scanning-pulse { width: 100px; height: 100px; }
  .scanning-pulse::before { width: 120px; height: 120px; top: -10px; left: -10px; }
  
  .scanner-setup-content { max-height: calc(100vh - 20px); margin: 5px; }
  .scanner-setup-header { padding: 16px; font-size: 16px; }
  .scanner-setup-body { padding: 16px; }
  .scanner-terminal-output { height: 120px; padding: 10px; font-size: 11px; }
  .scanner-terminal-header { padding: 8px 16px; font-size: 13px; }
  
  div[class*="sc-bczRLJ"][class*="sc-gsnTZi"][class*="sc-jOrMOR"] { 
    bottom: 10px !important; 
    left: 10px !important; 
    top: auto !important; 
    right: auto !important; 
  }
  .back-button { 
    top: 10px !important; 
    right: 15px !important; 
    padding: 8px 16px; 
    font-size: 14px; 
  }
}

/* =================== REMOVE STABLE SELECTION =================== */
.stable-selection {
  display: none !important;
}

/* =================== PASSPORT VISION INTEGRATION =================== */

.passport-upload-section {
  margin: 20px 0;
  padding: 20px;
  border: 2px dashed var(--text-light);
  border-radius: var(--border-radius);
  background: var(--bg-light);
  transition: var(--transition-smooth);
}

.passport-upload-section.hidden {
  display: none;
}

.passport-upload-header {
  text-align: center;
  margin-bottom: 20px;
}

.passport-upload-header h4 {
  color: var(--text-dark);
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 600;
}

.passport-upload-header h4 i {
  color: var(--primary-blue);
  margin-right: 8px;
}

.passport-upload-header p {
  color: var(--text-light);
  margin: 0;
  font-size: 14px;
}

.passport-upload-area {
  margin-bottom: 20px;
}

.upload-dropzone {
  border: 2px dashed var(--text-light);
  border-radius: var(--border-radius);
  padding: 40px 20px;
  text-align: center;
  background: var(--bg-white);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.upload-dropzone:hover {
  border-color: var(--primary-blue);
  background: rgba(32, 55, 117, 0.02);
}

.upload-dropzone.dragover {
  border-color: var(--primary-blue);
  background: rgba(32, 55, 117, 0.05);
  transform: scale(1.02);
}

.upload-dropzone i {
  font-size: 48px;
  color: var(--text-light);
  margin-bottom: 16px;
  display: block;
}

.upload-dropzone p {
  font-size: 16px;
  color: var(--text-dark);
  margin: 0 0 8px 0;
  font-weight: 500;
}

.upload-subtitle {
  font-size: 14px;
  color: var(--text-light);
}

.uploaded-photos {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.uploaded-photo {
  position: relative;
  width: 120px;
  height: 90px;
  border-radius: var(--border-radius);
  overflow: hidden;
  border: 2px solid var(--text-light);
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
}

.uploaded-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: white;
  padding: 8px;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.remove-photo {
  background: rgba(239, 68, 68, 0.8);
  border: none;
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  transition: var(--transition-fast);
}

.remove-photo:hover {
  background: var(--danger-red);
  transform: scale(1.1);
}

.passport-analysis-status {
  text-align: center;
  padding: 30px;
  background: var(--bg-white);
  border-radius: var(--border-radius);
  border: 1px solid var(--text-light);
  box-shadow: var(--shadow-sm);
}

.analysis-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--primary-blue);
  font-weight: 500;
}

.analysis-progress i {
  font-size: 20px;
}

.passport-results {
  background: var(--bg-white);
  border-radius: var(--border-radius);
  border: 1px solid var(--text-light);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.passport-results h5 {
  color: var(--success-green);
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 600;
}

.passport-results h5 i {
  margin-right: 8px;
}

.extracted-fields {
  margin-bottom: 20px;
}

.extracted-field {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-bottom: 8px;
  border-radius: 6px;
  border: 1px solid var(--text-light);
  transition: var(--transition-fast);
}

.extracted-field.found {
  background: rgba(16, 185, 129, 0.1);
  border-color: var(--success-green);
}

.extracted-field.missing-required {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--danger-red);
}

.extracted-field.missing-optional {
  background: rgba(245, 158, 11, 0.1);
  border-color: var(--warning-yellow);
}

.extracted-field label {
  font-weight: 600;
  color: var(--text-dark);
  min-width: 100px;
  font-size: 14px;
}

.extracted-field .value {
  flex: 1;
  color: var(--text-light);
  font-size: 14px;
}

.extracted-field.found .value {
  color: var(--success-green);
  font-weight: 500;
}

.extracted-field i {
  color: var(--text-light);
}

.extracted-field.found i {
  color: var(--success-green);
}

.extracted-field.missing-required i {
  color: var(--danger-red);
}

.extracted-field.missing-optional i {
  color: var(--warning-yellow);
}

.missing-fields-warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid var(--warning-yellow);
  border-radius: 6px;
  padding: 12px;
  margin-top: 16px;
  text-align: center;
}

.missing-fields-warning i {
  color: var(--warning-yellow);
  margin-right: 8px;
}

.missing-fields-warning span {
  color: var(--text-dark);
  font-weight: 600;
}

.missing-fields-warning p {
  color: var(--text-dark);
  margin: 4px 0 0 0;
  font-size: 14px;
}

.missing-fields-info {
  background: rgba(32, 55, 117, 0.05);
  border: 1px solid var(--primary-blue);
  border-radius: 6px;
  padding: 12px;
  margin-top: 16px;
  text-align: center;
}

.missing-fields-info i {
  color: var(--primary-blue);
  margin-right: 8px;
}

.missing-fields-info span {
  color: var(--primary-blue);
  font-weight: 500;
}

.passport-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.passport-actions button {
  padding: 10px 20px;
  border-radius: var(--border-radius);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: none;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--text-light) 0%, var(--text-dark) 100%);
  color: white;
}

.btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: var(--bg-white);
  color: var(--text-light);
  border: 2px solid var(--text-light);
}

.btn-outline:hover {
  border-color: var(--primary-blue);
  color: var(--primary-blue);
  transform: translateY(-1px);
}

.passport-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid var(--danger-red);
  border-radius: var(--border-radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.error-content {
  color: var(--danger-red);
  margin-bottom: 16px;
}

.error-content i {
  font-size: 20px;
  margin-right: 8px;
}

.error-content strong {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
}

/* =================== PASSPORT VISION NOTIFICATIONS =================== */
.passport-notification-popup {
  position: fixed;
  top: 100px;
  right: 30px;
  z-index: 4000;
  padding: 15px 20px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  font-weight: 600;
  animation: slideInRight 0.3s ease-out;
  max-width: 350px;
  word-wrap: break-word;
  display: flex;
  align-items: center;
  gap: 12px;
}

.passport-notification-popup.success {
  background: var(--gradient-success);
  color: white;
}

.passport-notification-popup.error {
  background: linear-gradient(135deg, var(--danger-red) 0%, #DC2626 100%);
  color: white;
}

.passport-notification-popup.info {
  background: var(--gradient-primary);
  color: white;
}

.passport-notification-popup i {
  font-size: 16px;
}

.passport-notification-popup.show {
  opacity: 1;
}

/* =================== INTEGRATION WITH EXISTING FORM STYLES =================== */
.form-group .passport-upload-section {
  margin-top: 10px;
  border-color: var(--text-light);
}

.form-group.has-passport .passport-upload-section {
  border-color: var(--success-green);
  background: rgba(16, 185, 129, 0.05);
}

.form-group.error .passport-upload-section {
  border-color: var(--danger-red);
  background: rgba(239, 68, 68, 0.05);
}

/* Hide manual horse fields when passport upload is active */
.passport-upload-active .horse-name-group,
.passport-upload-active .ueln-group,
.passport-upload-active .gender-group,
.passport-upload-active .birthdate-group {
  display: none;
}

/* =================== RESPONSIVE DESIGN =================== */
@media (max-width: 768px) {
  .passport-upload-section {
    margin: 15px 0;
    padding: 15px;
  }
  
  .upload-dropzone {
    padding: 30px 15px;
  }
  
  .upload-dropzone i {
    font-size: 36px;
  }
  
  .uploaded-photos {
    justify-content: center;
  }
  
  .uploaded-photo {
    width: 100px;
    height: 75px;
  }
  
  .passport-actions {
    flex-direction: column;
  }
  
  .passport-actions button {
    width: 100%;
    justify-content: center;
  }
  
  .passport-notification-popup {
    right: 15px;
    left: 15px;
    max-width: none;
  }
}

@media (max-width: 480px) {
  .passport-upload-section {
    margin: 10px 0;
    padding: 12px;
  }
  
  .upload-dropzone {
    padding: 25px 12px;
  }
  
  .upload-dropzone i {
    font-size: 32px;
  }
  
  .passport-upload-header h4 {
    font-size: 16px;
  }
  
  .passport-upload-header p {
    font-size: 13px;
  }
  
  .uploaded-photos {
    gap: 10px;
  }
  
  .uploaded-photo {
    width: 80px;
    height: 60px;
  }
  
  .passport-analysis-status {
    padding: 20px;
  }
  
  .passport-results {
    padding: 15px;
  }
  
  .extracted-field {
    padding: 10px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .extracted-field label {
    min-width: auto;
    font-size: 13px;
  }
  
  .extracted-field .value {
    font-size: 13px;
  }
  
  .passport-actions button {
    padding: 12px 16px;
    font-size: 13px;
  }
}