/* ============================================
   LITEVM — Visitor Registration Styles
   Mobile-first, no external dependencies
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #F8FAFC;
  color: #1E293B;
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

/* --- Offline Banner --- */
.offline-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #FEF3C7;
  color: #92400E;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.offline-banner.visible {
  transform: translateY(0);
}

.offline-banner.hidden {
  display: none;
}

.offline-banner button {
  margin-left: auto;
  background: none;
  border: none;
  color: #92400E;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 4px 8px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Guard Login Overlay --- */
.guard-login {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15, 23, 42, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.guard-login-card {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 40px 28px 28px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  text-align: center;
  animation: guardFadeIn 0.3s ease;
}

@keyframes guardFadeIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.guard-login-icon {
  margin-bottom: 16px;
}

.guard-login-icon svg {
  display: inline-block;
}

.guard-login-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 4px;
}

.guard-login-subtitle {
  font-size: 0.875rem;
  color: #64748B;
  margin-bottom: 24px;
}

.guard-login-input-wrapper {
  margin-bottom: 16px;
}

.guard-login .form-input {
  text-align: center;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 4px;
  padding: 14px 16px;
  border-radius: 10px;
}

.guard-login .field-error {
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 12px;
}

.guard-login .btn-primary {
  margin-top: 4px;
}

/* --- Step Visibility --- */
.step {
  display: none;
  padding-bottom: 32px;
}

.step.active {
  display: block;
}

.step.hidden {
  display: none;
}

/* --- Page Header --- */
.page-header {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  padding: 20px 20px 16px;
  text-align: center;
}

.header-logo {
  margin-bottom: 4px;
}

.header-title {
  color: #FFFFFF;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
}

.header-subtitle {
  color: #94A3B8;
  font-size: 0.8125rem;
  margin-top: 2px;
}

/* Step header with back button */
.step-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 20px;
  text-align: center;
}

.btn-back {
  position: absolute;
  left: 8px;
  background: none;
  border: none;
  color: #FFFFFF;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.2s;
}

.btn-back:hover,
.btn-back:focus-visible {
  background: rgba(255, 255, 255, 0.1);
}

/* --- Progress Bar --- */
.progress-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 16px 20px 12px;
  background: #FFFFFF;
  border-bottom: 1px solid #E2E8F0;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.step-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: #E2E8F0;
  color: #94A3B8;
  transition: all 0.3s ease;
}

.progress-step.active .active-circle {
  background: #4361ee;
  color: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.progress-step.completed .step-circle {
  background: #16A34A;
  color: #FFFFFF;
  font-size: 0.7rem;
}

.step-label {
  font-size: 0.6875rem;
  color: #94A3B8;
  white-space: nowrap;
}

.step-label.active-label {
  color: #4361ee;
  font-weight: 600;
}

.step-label.completed-label {
  color: #16A34A;
  font-weight: 600;
}

/* --- Language Toggle Button --- */
.lang-toggle {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  z-index: 10;
  min-width: 36px;
  min-height: 28px;
  line-height: 1;
  transition: background 0.2s;
}
.lang-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}
.page-header {
  position: relative;
}

.progress-line {
  width: 40px;
  height: 2px;
  background: #E2E8F0;
  margin: 0 4px;
  margin-bottom: 18px;
  transition: background 0.3s ease;
}

.progress-line.completed-line {
  background: #16A34A;
}

/* --- Card --- */
.card {
  background: #FFFFFF;
  margin: 16px;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  border: 1px solid #E2E8F0;
}

.card-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 2px;
}

.card-subtitle {
  font-size: 0.8125rem;
  color: #64748B;
  margin-bottom: 16px;
}

/* --- Form Fields --- */
.field-group {
  margin-bottom: 16px;
}

.field-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  flex-shrink: 0;
}

.form-input {
  width: 100%;
  padding: 12px 12px 12px 40px;
  font-size: 0.9375rem;
  font-family: 'Inter', -apple-system, sans-serif;
  color: #1E293B;
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.form-input:focus {
  border-color: #4361ee;
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.12);
}

.form-input::placeholder {
  color: #94A3B8;
}

.form-input.error {
  border-color: #e63946;
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

.form-input.valid {
  border-color: #16A34A;
}

/* --- Select input (Destination dropdown) --- */
.form-input--select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='18' height='18' fill='none' stroke='%2364748B' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.form-input--select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: #F1F5F9;
}

.form-input--select option {
  color: #1E293B;
}

.form-input--select option:first-of-type {
  color: #94A3B8;
}

.form-input--select.error {
  border-color: #e63946;
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

.form-input--select.valid {
  border-color: #16A34A;
}

.field-error {
  font-size: 0.75rem;
  color: #e63946;
  margin-top: 4px;
  min-height: 1em;
  display: none;
}

.field-error.visible {
  display: block;
}

.field-hint {
  font-size: 0.75rem;
  color: #64748B;
  margin-top: 4px;
}

/* --- Action Area & Buttons --- */
.action-area {
  padding: 0 16px;
  margin-top: 8px;
}

.btn-primary {
  width: 100%;
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Inter', -apple-system, sans-serif;
  color: #FFFFFF;
  background: #4361ee;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: background 0.2s, transform 0.1s, opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn-primary:hover:not(:disabled) {
  background: #3651d4;
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary:focus-visible {
  outline: 2px solid #4361ee;
  outline-offset: 2px;
}

.btn-subtitle {
  font-size: 0.6875rem;
  font-weight: 500;
  opacity: 0.7;
}

.btn-submit {
  background: #4361ee;
  padding: 16px 20px;
}

/* --- Photo Section --- */
.photo-section {
  margin-bottom: 20px;
}

.photo-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
}

.photo-zone {
  width: 100%;
  min-height: 200px;
  border: 2px dashed #E2E8F0;
  border-radius: 12px;
  background: #F8FAFC;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  transition: border-color 0.2s;
}

.photo-zone.has-photo {
  border-style: solid;
  border-color: #16A34A;
  background: #F0FDF4;
}

.photo-zone.camera-active {
  border-style: solid;
  border-color: #4361ee;
  background: #000;
}

.photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 32px 16px;
  color: #64748B;
}

.placeholder-text {
  font-size: 0.8125rem;
  color: #94A3B8;
}

.photo-video {
  width: 100%;
  height: 100%;
  min-height: 200px;
  object-fit: cover;
  border-radius: 10px;
  background: #000;
}

.photo-captured {
  width: 100%;
  height: 100%;
  min-height: 200px;
  max-height: 260px;
  object-fit: contain;
  border-radius: 10px;
  background: #F8FAFC;
}

.photo-canvas {
  display: none;
}

.photo-zone-spinner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.03);
  color: #64748B;
  font-size: 0.8125rem;
  border-radius: 10px;
}

/* --- Photo Action Buttons --- */
.photo-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.photo-actions.hidden {
  display: none;
}

.btn-camera,
.btn-upload,
.btn-capture,
.btn-retake,
.btn-cancel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: 'Inter', -apple-system, sans-serif;
  border-radius: 8px;
  cursor: pointer;
  min-height: 44px;
  transition: background 0.2s, border-color 0.2s, opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn-camera {
  background: #4361ee;
  color: #FFFFFF;
  border: none;
}

.btn-camera:hover {
  background: #3651d4;
}

.btn-camera:active {
  transform: scale(0.97);
}

.btn-upload {
  background: #FFFFFF;
  color: #475569;
  border: 1.5px solid #E2E8F0;
}

.btn-upload:hover {
  border-color: #4361ee;
  color: #4361ee;
}

.btn-capture {
  background: #16A34A;
  color: #FFFFFF;
  border: none;
}

.btn-capture:hover {
  background: #15803d;
}

.btn-retake {
  background: #FFFFFF;
  color: #475569;
  border: 1.5px solid #E2E8F0;
}

.btn-retake:hover {
  border-color: #475569;
}

.btn-cancel {
  background: transparent;
  color: #64748B;
  border: 1.5px solid #E2E8F0;
  flex: 0 1 auto;
  min-width: 80px;
}

.btn-cancel:hover {
  border-color: #e63946;
  color: #e63946;
}

/* Warning banner */
.warning-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #FEF3C7;
  border: 1px solid #FBBF24;
  border-radius: 8px;
  font-size: 0.8125rem;
  color: #92400E;
  margin-bottom: 16px;
}

.warning-banner.hidden {
  display: none;
}

/* --- Review Card --- */
.review-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.review-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.review-card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1E293B;
}

.btn-edit {
  background: none;
  border: none;
  color: #4361ee;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.2s;
}

.btn-edit:hover {
  background: rgba(67, 97, 238, 0.08);
}

.review-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 6px 0;
}

.review-label {
  font-size: 0.75rem;
  color: #64748B;
  flex-shrink: 0;
  width: 90px;
}

.review-value {
  font-size: 0.875rem;
  font-weight: 500;
  color: #1E293B;
  text-align: right;
  word-break: break-word;
}

.review-divider {
  height: 1px;
  background: #E2E8F0;
  margin: 4px 0;
}

/* Review Photos */
.section-label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1E293B;
  margin-bottom: 10px;
}

.review-photos {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.review-photo-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.review-photo-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748B;
}

.review-photo-thumb {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  background: #F1F5F9;
  border: 1.5px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

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

.review-photo-badge {
  font-size: 0.6875rem;
  color: #94A3B8;
  font-weight: 500;
}

.review-photo-badge.captured {
  color: #16A34A;
  font-weight: 600;
}

/* Consent Notice */
.consent-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px;
  background: #FFF7ED;
  border: 1px solid #FED7AA;
  border-radius: 10px;
  font-size: 0.75rem;
  color: #9A3412;
  line-height: 1.4;
}

.consent-notice svg {
  flex-shrink: 0;
  margin-top: 1px;
}

/* --- Loading Overlay --- */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(255, 255, 255, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-overlay.hidden {
  display: none;
}

.loading-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.icon-spinner {
  animation: spin 1.2s linear infinite;
  transform-origin: center;
}

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

.loading-text {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1E293B;
  margin-top: 8px;
}

.loading-subtext {
  font-size: 0.8125rem;
  color: #64748B;
}

/* --- Error Overlay --- */
.error-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.error-overlay.hidden {
  display: none;
}

/* --- Success Toast --- */
.toast-overlay {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  background: #16A34A;
  color: #FFFFFF;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(22, 163, 74, 0.3);
  max-width: 90vw;
  text-align: center;
  animation: toastSlideIn 0.3s ease;
}

.toast-overlay.hidden {
  display: none;
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.error-content {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  max-width: 340px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.error-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #e63946;
  margin: 12px 0 4px;
}

.error-message {
  font-size: 0.875rem;
  color: #64748B;
  margin-bottom: 20px;
}

.error-actions {
  display: flex;
  gap: 12px;
}

.btn-retry {
  flex: 1;
  padding: 12px;
  background: #4361ee;
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: 'Inter', -apple-system, sans-serif;
  cursor: pointer;
  min-height: 44px;
  transition: background 0.2s;
}

.btn-retry:hover {
  background: #3651d4;
}

.btn-cancel-error {
  flex: 1;
  padding: 12px;
  background: #FFFFFF;
  color: #64748B;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: 'Inter', -apple-system, sans-serif;
  cursor: pointer;
  min-height: 44px;
  transition: border-color 0.2s;
}

.btn-cancel-error:hover {
  border-color: #e63946;
  color: #e63946;
}

/* --- Confirmation Screen --- */
.confirmation-screen {
  min-height: 100vh;
  min-height: 100dvh;
  background: linear-gradient(180deg, #d4edda 0%, #c3e6cb 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 20px 32px;
  text-align: center;
}

/* Checkmark Animation */
.checkmark-container {
  margin-bottom: 16px;
}

.checkmark-svg {
  filter: drop-shadow(0 4px 8px rgba(22, 163, 74, 0.2));
}

.checkmark-path {
  stroke-dasharray: 20;
  stroke-dashoffset: 20;
  animation: drawCheck 0.6s ease forwards;
}

@keyframes drawCheck {
  to { stroke-dashoffset: 0; }
}

.confirmation-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 4px;
}

.confirmation-subtitle {
  font-size: 0.9375rem;
  color: #475569;
  margin-bottom: 24px;
}

/* Visitor Number Card */
.visitor-number-card {
  width: 100%;
  max-width: 320px;
  background: #FFFFFF;
  border: 2px solid #16A34A;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.1);
}

.visitor-number-label {
  display: block;
  font-size: 0.8125rem;
  color: #64748B;
  margin-bottom: 6px;
}

.visitor-number-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: #1E293B;
  letter-spacing: 2px;
}

/* WhatsApp Badge */
.whatsapp-badge {
  width: 100%;
  max-width: 320px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #F0FDF4;
  border: 1.5px solid #25D366;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  text-align: left;
}

.whatsapp-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.whatsapp-text strong {
  font-size: 0.875rem;
  color: #065F46;
}

.whatsapp-text span {
  font-size: 0.8125rem;
  color: #475569;
}

/* Next Steps */
.next-steps {
  width: 100%;
  max-width: 320px;
  background: #FFFFFF;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  text-align: left;
}

.next-steps-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1E293B;
  margin-bottom: 8px;
}

.next-steps-list {
  list-style: none;
  counter-reset: step-counter;
  padding: 0;
}

.next-steps-list li {
  position: relative;
  padding: 4px 0 4px 28px;
  font-size: 0.8125rem;
  color: #475569;
  counter-increment: step-counter;
  line-height: 1.4;
}

.next-steps-list li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #E2E8F0;
  color: #64748B;
  font-size: 0.6875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Confirmation Footer */
.confirmation-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: #64748B;
  margin-bottom: 20px;
}

/* Done Button */
.btn-done {
  width: 100%;
  max-width: 320px;
  padding: 16px;
  background: #16A34A;
  color: #FFFFFF;
  border: none;
  border-radius: 12px;
  font-size: 1.0625rem;
  font-weight: 700;
  font-family: 'Inter', -apple-system, sans-serif;
  cursor: pointer;
  min-height: 52px;
  transition: background 0.2s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn-done:hover {
  background: #15803d;
}

.btn-done:active {
  transform: scale(0.98);
}

/* --- Page Footer --- */
.page-footer {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 16px;
  font-size: 0.75rem;
  color: #64748B;
  line-height: 1.4;
}

.page-footer svg {
  flex-shrink: 0;
  margin-top: 1px;
}

/* --- Hidden Utility --- */
.hidden {
  display: none !important;
}

/* --- File Input --- */
.file-input {
  display: none;
}

/* --- Responsive --- */

/* Mobile (<480px) - default, already mobile-first */

/* Tablet (480-768px) */
@media (min-width: 480px) {
  body {
    padding: 20px;
    background: #E2E8F0;
  }

  .step {
    max-width: 440px;
    margin: 0 auto;
    background: #F8FAFC;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
  }

  .page-header {
    border-radius: 0;
  }

  .card {
    margin: 16px 16px;
  }

  .action-area {
    padding: 0 16px;
  }

  .confirmation-screen {
    max-width: 440px;
    margin: 0 auto;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  }
}

/* Desktop (>768px) */
@media (min-width: 768px) {
  body {
    background: linear-gradient(135deg, #E2E8F0 0%, #F1F5F9 100%);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px;
  }

  .step {
    max-width: 440px;
  }

  .confirmation-screen {
    max-width: 440px;
    border-radius: 20px;
  }

  .progress-line {
    width: 56px;
  }
}

/* --- Verification Page Styles --- */

/* Verify page container */

/* Search input wrapper */
.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  flex-shrink: 0;
  z-index: 1;
}

.search-input {
  padding-left: 40px !important;
}

/* Lookup button */
.lookup-btn {
  margin-bottom: 8px;
}



/* Search hint */
.search-hint {
  font-size: 0.75rem;
  color: #64748B;
  text-align: center;
}

/* Header nav link */
.header-nav-link {
  display: inline-block;
  margin-top: 8px;
  color: #94A3B8;
  font-size: 0.75rem;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.header-nav-link:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.1);
}

/* Lookup result section */
.lookup-result-section[data-state="empty"] .result-state {
  display: none;
}

.result-state {
  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Loading card */
.lookup-loading-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px;
  gap: 12px;
}

.lookup-loading-text {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1E293B;
}

.lookup-loading-subtext {
  font-size: 0.75rem;
  color: #64748B;
}

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-badge.pending {
  background: #FEF3C7;
  color: #92400E;
}

.status-badge.checked-in {
  background: #F0FDF4;
  color: #16A34A;
}

.status-badge.rejected {
  background: #FEF2F2;
  color: #e63946;
}

.status-badge.signed-out {
  background: #FFFBEB;
  color: #D97706;
}

/* Result card */
.result-card {
  margin: 0;
}

.result-status-bar {
  margin-bottom: 12px;
}

.result-visitor-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #E2E8F0;
}

.result-visitor-number {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.5px;
}

.result-timestamp {
  font-size: 0.8125rem;
  color: #64748B;
}

.result-meta-label {
  font-size: 0.75rem;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Identity card inside result */
.identity-card {
  margin-bottom: 12px;
}

/* Photos in result */
.result-photos {
  display: flex;
  gap: 12px;
  margin-bottom: 4px;
}

.result-photo-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.photo-item-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748B;
}

.result-photo-thumb {
  width: 100%;
  max-width: 140px;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  border: 1.5px solid #E2E8F0;
  background: #F1F5F9;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-photo-thumb:hover {
  border-color: #4361ee;
  transform: scale(1.02);
}

.result-photo-thumb:active {
  transform: scale(0.98);
}

.result-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.result-photo-img.photo-error {
  object-fit: contain;
  padding: 20px;
  opacity: 0.4;
}

.photo-tap-hint {
  font-size: 0.6875rem;
  color: #94A3B8;
  text-align: center;
  margin-bottom: 16px;
}

/* Action buttons */
.result-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.btn-verify,
.btn-reject {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 12px;
  font-size: 0.875rem;
  font-weight: 700;
  font-family: 'Inter', -apple-system, sans-serif;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  min-height: 52px;
  transition: background 0.2s, transform 0.1s, opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn-verify {
  background: #16A34A;
  color: #FFFFFF;
}

.btn-verify:hover:not(:disabled) {
  background: #15803d;
}

.btn-verify:active:not(:disabled) {
  transform: scale(0.97);
}

.btn-verify:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-reject {
  background: #e63946;
  color: #FFFFFF;
}

.btn-reject:hover:not(:disabled) {
  background: #c1121f;
}

.btn-reject:active:not(:disabled) {
  transform: scale(0.97);
}

.btn-reject:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Sign-out button (amber) */
.btn-signout {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 12px;
  font-size: 0.875rem;
  font-weight: 700;
  font-family: 'Inter', -apple-system, sans-serif;
  border: 2px solid #F59E0B;
  border-radius: 12px;
  background: #F59E0B;
  color: #FFFFFF;
  cursor: pointer;
  min-height: 52px;
  transition: background 0.2s, border-color 0.2s, transform 0.1s, opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn-signout:hover:not(:disabled) {
  background: #D97706;
  border-color: #D97706;
}

.btn-signout:active:not(:disabled) {
  transform: scale(0.97);
}

.btn-signout:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-signout.hidden {
  display: none;
}

/* Already processed info */
.already-processed {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  font-size: 0.8125rem;
  color: #64748B;
  margin-top: 12px;
}

.already-processed.hidden {
  display: none;
}

/* Not found card */
.not-found-card {
  text-align: center;
  padding: 32px 20px;
}

.not-found-icon {
  margin-bottom: 12px;
}

.not-found-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.not-found-message {
  font-size: 0.875rem;
  color: #991B1B;
  margin-bottom: 4px;
}

.not-found-hint {
  font-size: 0.8125rem;
  color: #64748B;
  margin-bottom: 20px;
}

.btn-secondary {
  padding: 12px 24px;
  background: #4361ee;
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: 'Inter', -apple-system, sans-serif;
  cursor: pointer;
  min-height: 44px;
  transition: background 0.2s;
}

.btn-secondary:hover {
  background: #3651d4;
}

/* Verified Success */
.result-success-card {
  background: #F0FDF4;
  border: 2px solid #16A34A;
  border-radius: 14px;
  padding: 32px 20px;
  text-align: center;
  margin: 0;
}

@keyframes successPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.success-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin: 12px 0 4px;
}

.success-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: #16A34A;
  margin-bottom: 2px;
}

.success-subtitle {
  font-size: 0.9375rem;
  color: #475569;
  margin-bottom: 20px;
}

.success-timestamp-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #FFFFFF;
  border: 1px solid #16A34A;
  border-radius: 10px;
  font-size: 0.8125rem;
  color: #475569;
  margin-bottom: 8px;
}

.success-timestamp-card strong {
  color: #16A34A;
}

.success-visitor-badge {
  font-size: 0.75rem;
  color: #64748B;
  margin-bottom: 20px;
}

.btn-check-another {
  margin-top: 4px;
}

.btn-check-another span {
  font-size: 1rem;
}

/* --- Card Assignment (success screen) --- */
.success-card-assignment {
  text-align: center;
  margin-top: 8px;
}

.success-card-divider {
  height: 1px;
  background: #BBF7D0;
  margin: 16px 0;
}

.success-card-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #4361EE;
  margin-bottom: 12px;
}

.success-card-number-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748B;
  margin-bottom: 4px;
}

.success-card-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1E293B;
  letter-spacing: 2px;
  font-family: 'Courier New', Courier, monospace;
  margin-bottom: 12px;
}

.success-card-qr-wrapper {
  display: inline-block;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
}

.success-card-qr-wrapper.hidden {
  display: none;
}

.success-card-qr {
  display: block;
  width: 160px;
  height: 160px;
  border-radius: 8px;
}

.success-card-hint {
  font-size: 0.75rem;
  color: #64748B;
  margin-bottom: 0;
}

/* --- Card Depleted Warning --- */
.success-card-depleted {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 10px;
  margin-top: 16px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #991B1B;
}

.success-card-depleted svg {
  flex-shrink: 0;
}

/* Rejected Card */
.result-rejected-card {
  background: #FEF2F2;
  border: 2px solid #FECACA;
  border-radius: 14px;
  padding: 32px 20px;
  text-align: center;
  margin: 0;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-2px); }
  80% { transform: translateX(2px); }
}

.rejected-icon {
  margin-bottom: 12px;
}

.rejected-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin: 12px 0 4px;
}

.rejected-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: #e63946;
  margin-bottom: 2px;
}

.rejected-subtitle {
  font-size: 0.9375rem;
  color: #475569;
  margin-bottom: 20px;
}

.rejected-timestamp-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #FFFFFF;
  border: 1px solid #FECACA;
  border-radius: 10px;
  font-size: 0.8125rem;
  color: #64748B;
  margin-bottom: 20px;
}

.rejected-timestamp-card strong {
  color: #e63946;
}

/* Signed Out Success Card */
.result-signedout-card {
  background: #FFFBEB;
  border: 2px solid #F59E0B;
  border-radius: 14px;
  padding: 32px 20px;
  text-align: center;
  margin: 0;
}

.signedout-icon {
  margin-bottom: 12px;
}

.signedout-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin: 12px 0 4px;
}

.signedout-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: #D97706;
  margin-bottom: 2px;
}

.signedout-subtitle {
  font-size: 0.9375rem;
  color: #475569;
  margin-bottom: 20px;
}

.signedout-timestamp-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #FFFFFF;
  border: 1px solid #F59E0B;
  border-radius: 10px;
  font-size: 0.8125rem;
  color: #475569;
  margin-bottom: 20px;
}

.signedout-timestamp-card strong {
  color: #D97706;
}

/* Today's list signed-out badge */
.signed-out-badge {
  background: #FFFBEB;
  color: #D97706;
}

/* Section Divider */
.section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  margin: 8px 0;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: #E2E8F0;
}

.divider-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Today's Visitors */
.todays-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.todays-header .card-title {
  margin-bottom: 0;
}

.todays-header-left {
  display: flex;
  align-items: center;
  gap: 4px;
}

.todays-count-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  background: #4361ee;
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 12px;
}

/* Filter tabs */
.todays-filter-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  background: #F1F5F9;
  border-radius: 10px;
  padding: 3px;
}

.filter-tab {
  flex: 1;
  padding: 6px 4px;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-size: 0.6875rem;
  font-weight: 600;
  font-family: 'Inter', -apple-system, sans-serif;
  color: #64748B;
  cursor: pointer;
  min-height: 30px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.filter-tab.active {
  background: #FFFFFF;
  color: #1E293B;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.filter-tab:hover:not(.active) {
  color: #4361ee;
}

/* Inline filter */
.todays-inline-filter {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.filter-input-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.todays-filter-input {
  width: 100%;
  padding: 8px 12px 8px 30px;
  font-size: 0.8125rem;
  font-family: 'Inter', -apple-system, sans-serif;
  color: #1E293B;
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.todays-filter-input:focus {
  border-color: #4361ee;
}

.todays-filter-input::placeholder {
  color: #94A3B8;
}

/* Today's visitor cards */
.todays-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.today-category-header {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748B;
  padding: 8px 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.today-visitor-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  transition: background 0.3s, border-color 0.3s;
}

.today-card-row {
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.today-visitor-card.highlighted {
  border-color: #4361ee;
  background: #EEF2FF;
}

.today-card-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.today-card-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.today-vn {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #0f172a;
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-time {
  font-size: 0.6875rem;
  color: #64748B;
  flex-shrink: 0;
  white-space: nowrap;
}

.today-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1E293B;
}

.today-company {
  font-size: 0.75rem;
  color: #64748B;
}

.today-card-actions {
  display: flex;
  gap: 8px;
}

.btn-today-view,
.btn-today-checkin {
  flex: 1;
  padding: 8px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: 'Inter', -apple-system, sans-serif;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  min-height: 36px;
  transition: background 0.2s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn-today-view {
  background: #FFFFFF;
  color: #475569;
  border: 1.5px solid #E2E8F0;
}

.btn-today-view:hover {
  border-color: #4361ee;
  color: #4361ee;
}

.btn-today-checkin {
  background: #16A34A;
  color: #FFFFFF;
  border: none;
}

.btn-today-checkin:hover {
  background: #15803d;
}

.btn-today-checkin:active {
  transform: scale(0.97);
}

/* Sign Out button in today's checked-in card */
.btn-today-signout {
  background: transparent;
  border: 1.5px solid #F59E0B;
  color: #F59E0B;
  border-radius: 8px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.btn-today-signout:hover {
  background: #F59E0B;
  color: #FFFFFF;
}

/* Card number display in today's checked-in card */
.today-cardno {
  font-size: 0.6875rem;
  font-family: monospace;
  color: #4361EE;
  background: #EEF2FF;
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-block;
  align-self: center;
}

.today-status-badge {
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.6875rem;
  font-weight: 600;
}

.checked-in-badge {
  background: #F0FDF4;
  color: #16A34A;
}

.rejected-badge {
  background: #FEF2F2;
  color: #e63946;
}

/* Today's empty state */
.todays-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 32px 16px;
  text-align: center;
}

.todays-empty.hidden {
  display: none;
}

.todays-empty-text {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #64748B;
}

.todays-empty-subtext {
  font-size: 0.8125rem;
  color: #94A3B8;
}

/* Today's loading */
.todays-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  color: #64748B;
  font-size: 0.8125rem;
}

.todays-loading.hidden {
  display: none;
}

/* Photo Lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.lightbox-overlay.hidden {
  display: none;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: #FFFFFF;
  font-size: 1.5rem;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-image-container {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 70vh;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.lightbox-caption {
  font-size: 0.8125rem;
  color: #94A3B8;
  text-align: center;
}

.lightbox-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lightbox-nav-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #FFFFFF;
  font-size: 1.25rem;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.lightbox-nav-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-counter {
  font-size: 0.8125rem;
  color: #94A3B8;
  font-weight: 500;
}

/* Confirm Dialog Overlay */
.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.confirm-overlay.hidden {
  display: none;
}

.confirm-dialog-content {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 28px 24px;
  max-width: 340px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.confirm-icon {
  margin-bottom: 12px;
}

.confirm-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.confirm-message {
  font-size: 0.875rem;
  color: #475569;
  margin-bottom: 4px;
  line-height: 1.4;
}

.confirm-message strong {
  color: #1E293B;
}

.confirm-vn {
  font-size: 0.8125rem;
  color: #64748B;
  margin-bottom: 16px;
}

.confirm-reason {
  text-align: left;
  margin-bottom: 16px;
}

.confirm-reason.hidden {
  display: none;
}

.confirm-textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 0.8125rem;
  font-family: 'Inter', -apple-system, sans-serif;
  color: #1E293B;
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 8px;
  outline: none;
  resize: vertical;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.confirm-textarea:focus {
  border-color: #e63946;
}

.confirm-actions {
  display: flex;
  gap: 12px;
}

.btn-confirm-cancel {
  flex: 1;
  padding: 12px;
  background: #FFFFFF;
  color: #64748B;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: 'Inter', -apple-system, sans-serif;
  cursor: pointer;
  min-height: 44px;
  transition: border-color 0.2s, color 0.2s;
}

.btn-confirm-cancel:hover {
  border-color: #e63946;
  color: #e63946;
}

.btn-confirm-action {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 700;
  font-family: 'Inter', -apple-system, sans-serif;
  cursor: pointer;
  min-height: 44px;
  transition: background 0.2s;
}

.btn-confirm-verify {
  background: #16A34A;
  color: #FFFFFF;
}

.btn-confirm-verify:hover {
  background: #15803d;
}

.btn-confirm-reject {
  background: #e63946;
  color: #FFFFFF;
}

.btn-confirm-reject:hover {
  background: #c1121f;
}

.btn-confirm-signout {
  background: #F59E0B;
  color: #FFFFFF;
}

.btn-confirm-signout:hover {
  background: #D97706;
}

/* Inline Confirm Bar */
.inline-confirm-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 900;
  background: #FFFFFF;
  border-top: 1px solid #E2E8F0;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
  animation: slideUpBar 0.25s ease;
}

@keyframes slideUpBar {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.inline-confirm-bar.hidden {
  display: none;
}

.inline-confirm-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1E293B;
  flex: 1;
}

.inline-confirm-actions {
  display: flex;
  gap: 8px;
}

.btn-inline-cancel {
  padding: 8px 16px;
  background: #FFFFFF;
  color: #64748B;
  border: 1.5px solid #E2E8F0;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: 'Inter', -apple-system, sans-serif;
  cursor: pointer;
  min-height: 40px;
  transition: border-color 0.2s;
}

.btn-inline-cancel:hover {
  border-color: #e63946;
  color: #e63946;
}

.btn-inline-confirm {
  padding: 8px 16px;
  background: #16A34A;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 700;
  font-family: 'Inter', -apple-system, sans-serif;
  cursor: pointer;
  min-height: 40px;
  transition: background 0.2s;
}

.btn-inline-confirm:hover {
  background: #15803d;
}

/* Responsive: wrap verify page in container like registration */
@media (min-width: 480px) {
  .verify-page {
    max-width: 540px;
    margin: 0 auto;
    background: #F8FAFC;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
  }

  .verify-page .page-header {
    border-radius: 0;
  }

  .verify-page .card {
    margin: 16px;
  }

  .result-photo-thumb {
    max-width: 150px;
  }

  .verify-page .page-footer {
    padding: 16px;
  }
}

/* Verification page touch device hover fix */
@media (hover: none) {
  .btn-verify:hover {
    background: #16A34A;
  }
  .btn-reject:hover {
    background: #e63946;
  }
  .btn-signout:hover {
    background: #F59E0B;
  }
  .result-photo-thumb:hover {
    border-color: #E2E8F0;
    transform: none;
  }
}

/* Reduced motion for verification animations */
@media (prefers-reduced-motion: reduce) {
  .result-state {
    transition: none !important;
  }
  .result-success-card {
    animation: none !important;
  }
  .result-rejected-card {
    animation: none !important;
  }
  .result-signedout-card {
    animation: none !important;
  }
  .inline-confirm-bar {
    animation: none !important;
  }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  .checkmark-path {
    animation: none;
    stroke-dasharray: 0;
    stroke-dashoffset: 0;
  }

  .icon-spinner {
    animation: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* --- Touch devices: remove hover sticky states --- */
@media (hover: none) {
  .btn-primary:hover:not(:disabled) {
    background: #4361ee;
  }

  .btn-camera:hover {
    background: #4361ee;
  }

  .btn-done:hover {
    background: #16A34A;
  }
}
.today-action-time {
  display: block;
  font-size: 0.6875rem;
  color: #94A3B8;
  margin-top: 4px;
  padding: 0 12px 8px;
}

/* --- QR Code --- */
.qrcode-section {
  display: flex;
  justify-content: center;
  margin: 24px 0;
}

.qrcode-card {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

#qrcode-container canvas {
  display: block;
  margin: 0 auto;
  border-radius: 8px;
}

.qrcode-label {
  margin-top: 12px;
  font-size: 12px;
  color: #64748B;
  line-height: 1.4;
}

/* Dark mode / contrast for the QR card text */
.qrcode-card .qrcode-label {
  color: #64748B;
}

/* ============================================
   Responsive: Desktop & Tablet
   ============================================ */
@media (min-width: 768px) {
  body {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
  }

  .page-header {
    max-width: calc((100vw - 40px) * 5 / 7);
    width: 100%;
    border-radius: 16px 16px 0 0;
    margin-top: 0;
  }

  .step {
    max-width: calc((100vw - 40px) * 5 / 7);
    width: 100%;
    padding-bottom: 40px;
  }

  .card {
    margin: 16px 0;
  }

  .action-area {
    margin: 20px 0 0;
  }

  .page-footer {
    max-width: calc((100vw - 40px) * 5 / 7);
    width: 100%;
    margin: 16px 0 0;
    border-radius: 0 0 16px 16px;
  }

  /* Confirmation screen */
  .confirmation-screen {
    max-width: calc((100vw - 40px) * 5 / 7);
    width: 100%;
  }

  /* ── Verify / Guard Portal page ───────────────── */
  .verify-page {
    max-width: calc((100vw - 40px) * 5 / 7);
    width: 100%;
    margin: 0 auto;
  }

  .verify-page .card {
    margin-left: 0;
    margin-right: 0;
  }

  /* Result state cards (found, loading, not-found) */
  .result-state .card {
    margin-left: 0;
    margin-right: 0;
  }

  /* Verified success card */
  .result-success-card {
    margin: 0;
  }

  /* Rejected card */
  .result-rejected-card {
    margin: 0;
  }

  /* Section divider "OR" */
  .section-divider {
    max-width: calc((100vw - 40px) * 5 / 7);
    margin-left: auto;
    margin-right: auto;
    padding: 8px 0;
  }

  /* Today's visitors card */
  #todays-visitors-section.card {
    margin-left: 0;
    margin-right: 0;
  }

  /* loading/error overlays on desktop */
  .loading-content,
  .error-content {
    max-width: 420px;
  }
}

/* ============================================
   BULK SIGN-OUT STYLES
   ============================================ */

/* Bulk sign-out sticky bar */
.bulk-signout-bar {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  background: #FFFFFF;
  border-top: 2px solid #F59E0B;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
  z-index: 100;
}
.bulk-signout-bar.hidden { display: none; }
.bulk-label { font-size: 15px; font-weight: 600; color: #1E293B; }
.btn-bulk-signout {
  background: #F59E0B;
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Inter', -apple-system, sans-serif;
  min-height: 44px;
  transition: background 0.2s;
}
.btn-bulk-signout:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-bulk-signout:hover:not(:disabled) { background: #D97706; }

/* Checkbox styles */
.today-checkbox {
  display: flex;
  align-items: center;
  margin-right: 8px;
  min-width: 20px;
}
.today-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #4361EE;
}
.today-checkbox-placeholder {
  width: 26px;
  min-width: 26px;
  margin-right: 8px;
}

/* Progress overlay */
#bulk-progress {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
#bulk-progress.hidden { display: none; }
.bulk-progress-content {
  text-align: center;
  padding: 24px;
}
.bulk-progress-content .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #E2E8F0;
  border-top-color: #4361EE;
  border-radius: 50%;
  animation: bulkSpin 0.8s linear infinite;
  margin: 0 auto 12px;
}
@keyframes bulkSpin { to { transform: rotate(360deg); } }
.bulk-progress-content span {
  font-size: 16px;
  font-weight: 600;
  color: #1E293B;
}

/* Today header checkbox */
.today-header-checkbox {
  margin-right: 4px;
  min-width: 18px;
}
.today-header-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #4361EE;
}

/* Override verify page bottom padding for sticky bar */
.verify-page {
  padding-bottom: 0;
}

/* ========== Report Page ========== */
.header {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  padding: 16px 20px;
  color: #FFFFFF;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1000px;
  margin: 0 auto;
}
.header-inner h1 {
  font-size: 1.15rem;
  font-weight: 700;
}
.header-links {
  display: flex;
  gap: 12px;
  align-items: center;
}
.header-link {
  color: white;
  opacity: 0.8;
  font-size: 13px;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.15s;
}
.header-link:hover {
  opacity: 1;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 12px 16px 40px;
}

.report-filters {
  margin-bottom: 16px;
}
.filter-row {
  margin-bottom: 12px;
}
.filter-row:last-child {
  margin-bottom: 0;
}

.date-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}
.date-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.date-group label {
  font-size: 12px;
  color: #6B7280;
  font-weight: 500;
}
.date-group input[type="date"] {
  padding: 8px 12px;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  background: white;
}
.preset-group {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.preset-btn {
  padding: 6px 14px;
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  background: white;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  color: #374151;
}
.preset-btn:hover {
  background: #F3F4F6;
}
.preset-btn.active {
  background: #2563EB;
  color: white;
  border-color: #2563EB;
}

.search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.search-group {
  flex: 1;
  min-width: 200px;
}
.search-group input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}
.search-group input:focus {
  outline: none;
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filter-group select {
  padding: 10px 14px;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: white;
  cursor: pointer;
  min-width: 140px;
}
.filter-group select:focus {
  outline: none;
  border-color: #2563EB;
}

.report-filters .btn-primary {
  padding: 10px 20px;
  font-size: 14px;
  min-height: auto;
  width: auto;
  border-radius: 8px;
  font-weight: 600;
}
.btn-secondary {
  padding: 10px 20px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 600;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  background: white;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s;
  min-height: auto;
}
.btn-secondary:hover:not(:disabled) {
  background: #F3F4F6;
}
.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.report-table-container {
  overflow-x: auto;
}
.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.report-table th {
  background: #F9FAFB;
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: #374151;
  border-bottom: 2px solid #E5E7EB;
  white-space: nowrap;
}
.report-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #F3F4F6;
  vertical-align: middle;
}
.report-table tr:hover {
  background: #F9FAFB;
}

.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.status-badge.badge-pending {
  background: #FEF9C3;
  color: #854D0E;
}
.status-badge.badge-checked-in {
  background: #DCFCE7;
  color: #166534;
}
.status-badge.badge-signed-out {
  background: #F3F4F6;
  color: #4B5563;
}

.summary-bar {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 12px;
  font-size: 14px;
  color: #1E40AF;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px 0;
}
.page-btn {
  padding: 6px 14px;
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  background: white;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  color: #374151;
  transition: all 0.15s;
}
.page-btn:hover:not(:disabled) {
  background: #F3F4F6;
}
.page-btn:disabled {
  opacity: 0.5;
  cursor: default;
}
.page-info {
  font-size: 13px;
  color: #6B7280;
}

.empty-state {
  text-align: center;
  padding: 40px;
  color: #9CA3AF;
  font-size: 15px;
}

/* Loading overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 500;
}
.loading-overlay.hidden {
  display: none;
}
.loading-overlay .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #E2E8F0;
  border-top-color: #2563EB;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 12px;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.loading-overlay p {
  font-size: 15px;
  font-weight: 600;
  color: #374151;
}

/* Error toast */
.error-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #B91C1C;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  z-index: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  max-width: 90%;
  text-align: center;
  transition: opacity 0.3s;
}
.error-toast.hidden {
  display: none;
}

/* Pin overlay */
.pin-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.pin-overlay.hidden {
  display: none;
}
.pin-card {
  background: white;
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  max-width: 320px;
  width: 90%;
}
.pin-card h2 {
  font-size: 1.25rem;
  margin-bottom: 4px;
}
.pin-card p {
  font-size: 14px;
  color: #6B7280;
  margin-bottom: 8px;
}
.pin-input-row {
  margin: 16px 0;
}
.pin-input-row input {
  width: 120px;
  padding: 12px;
  font-size: 24px;
  text-align: center;
  border: 2px solid #D1D5DB;
  border-radius: 8px;
  letter-spacing: 8px;
  font-family: inherit;
}
.pin-input-row input:focus {
  outline: none;
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.pin-error {
  color: #EF4444;
  font-size: 13px;
}
.pin-error.hidden {
  display: none;
}

/* Hidden utility */
.hidden {
  display: none !important;
}

/* Mobile cards */
.mobile-cards {
  display: none;
}
@media (max-width: 768px) {
  .report-table,
  .report-table thead {
    display: none;
  }
  .report-table-container {
    overflow: visible;
  }
  .mobile-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .report-card {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  }
  .report-card .rc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
  }
  .report-card .rc-row:last-child {
    margin-bottom: 0;
  }
  .report-card .rc-label {
    font-size: 11px;
    color: #9CA3AF;
  }
  .report-card .rc-value {
    font-size: 14px;
    font-weight: 500;
  }
  .container {
    padding: 8px 10px 32px;
  }
}

/* Print styles */
@media print {
  body {
    background: white;
  }
  .header,
  .report-filters,
  .pagination,
  .no-print {
    display: none !important;
  }
  .report-table-container {
    overflow: visible;
  }
  .report-table th {
    background: #F3F4F6 !important;
  }
  .summary-bar {
    border: 1px solid #ccc;
    background: none;
    color: black;
  }
  .mobile-cards {
    display: none !important;
  }
  .report-table,
  .report-table thead {
    display: table-header-group !important;
  }
  @page {
    size: A4 landscape;
    margin: 12mm;
  }
}
