:root {
  /* Color Palette - Corporate Theme */
  --primary-color: #1b3764;
  /* Deep Blue - Headers, Primary Actions */
  --accent-color: #73caf1;
  /* Light Blue - Accents, Highlights */

  --bg-page: #f5f7fa;
  /* Light Grey - Page Background */
  --bg-card: #ffffff;
  /* White - Card Background */

  --text-primary: #1b3764;
  /* Deep Blue for main text */
  --text-secondary: #5a6b85;
  /* Grey Blue for secondary */
  --text-muted: #94a3b8;

  --border-color: #e2e8f0;
  --shadow-card: 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);

  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Background - Clean Light */
.app-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: var(--bg-page);
}

.app-background::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 400px;
  background: linear-gradient(135deg, #1b3764 0%, #2c5294 100%);
  clip-path: polygon(0 0, 100% 0, 100% 70%, 0 100%);
}

/* Main Container */
.kiosk-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--spacing-lg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Glass Card -> Clean Card */
.glass-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  padding: var(--spacing-xl);
  width: 100%;
  max-width: 600px;
  animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Typography */
.title {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: var(--spacing-sm);
  color: var(--primary-color);
  text-align: center;
  letter-spacing: -0.02em;
}

.subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: var(--spacing-lg);
  font-weight: 500;
}

.description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: var(--spacing-md);
}

/* Buttons */
.button-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-lg);
}

.btn {
  padding: 1rem 2rem;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  font-family: 'Inter', sans-serif;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Buttons */
.button-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-lg);
}

.btn {
  padding: 1rem 2rem;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  font-family: 'Inter', sans-serif;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: left var(--transition-normal);
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 4px 12px rgba(27, 55, 100, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  background: #2c5294;
  /* Slightly lighter blue */
  box-shadow: 0 6px 16px rgba(27, 55, 100, 0.4);
}

.btn-secondary {
  background: white;
  color: var(--primary-color);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: #f8fafc;
  transform: translateY(-2px);
  border-color: var(--primary-color);
}

.btn-success {
  background: #10b981;
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
  transform: translateY(-2px);
  background: #059669;
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.btn-error {
  background: #ef4444;
  color: white;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-error:hover {
  transform: translateY(-2px);
  background: #dc2626;
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Camera View */
.camera-container {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: var(--spacing-lg) 0;
  background: #000;
  box-shadow: var(--shadow-card);
}

.camera-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 60%;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-md);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6);
  animation: none;
}

/* Re-add active scan border animation specifically */
.camera-overlay::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: var(--radius-md);
  border: 4px solid var(--accent-color);
  opacity: 0.8;
}

.camera-overlay::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--accent-color);
  box-shadow: 0 0 15px var(--accent-color);
  animation: scanLine 2s linear infinite;
}

@keyframes scanLine {
  0% {
    transform: translateY(0);
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  90% {
    opacity: 1;
  }

  100% {
    transform: translateY(calc(100% * 20));
    opacity: 0;
  }

  /* Adjusted based on previous aspect ratio, approximate */
}

.camera-hint {
  position: absolute;
  bottom: var(--spacing-md);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.9);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-color);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Form Styles */
.form-container {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.required-mark {
  color: #ef4444;
}

.confidence-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
  margin-left: auto;
}

.confidence-high {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.confidence-medium {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

.confidence-low {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.form-input {
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: #f8fafc;
  color: var(--primary-color);
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  transition: all var(--transition-normal);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-color);
  background: white;
  box-shadow: 0 0 0 3px rgba(115, 202, 241, 0.2);
}

.form-input.error {
  border-color: #ef4444;
  background: #fef2f2;
}

.form-input.success {
  border-color: #10b981;
}

.error-message {
  font-size: 0.75rem;
  color: #ef4444;
  margin-top: 4px;
}

/* Loading Spinner */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-xl);
}

.spinner {
  width: 60px;
  height: 60px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-text {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--primary-color);
}

/* Progress Bar */
.progress-bar {
  width: 100%;
  max-width: 300px;
  height: 8px;
  background: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  margin: var(--spacing-md) 0;
}

.progress-fill {
  height: 100%;
  background: var(--primary-color);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Success/Error Icons */
.status-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--spacing-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 3rem;
  animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
  from {
    transform: scale(0);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.status-icon.success {
  background: #d1fae5;
  color: #059669;
}

.status-icon.error {
  background: #fee2e2;
  color: #dc2626;
}

/* Responsive Design */
@media (max-width: 768px) {
  .kiosk-container {
    padding: var(--spacing-md);
  }

  .glass-card {
    padding: var(--spacing-lg);
  }

  .title {
    font-size: 2rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .btn {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mt-sm {
  margin-top: var(--spacing-sm);
}

.mt-md {
  margin-top: var(--spacing-md);
}

.mt-lg {
  margin-top: var(--spacing-lg);
}

.mb-sm {
  margin-bottom: var(--spacing-sm);
}

.mb-md {
  margin-bottom: var(--spacing-md);
}

.mb-lg {
  margin-bottom: var(--spacing-lg);
}

.fade-in {
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}