/* ==========================================================================
   KYC Verify System — Official Banking & Institutional Light Theme
   Authoritative, Trusted, Clean & Professional
   ========================================================================== */

:root {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-card-muted: #f8fafc;

  /* Official Institutional Green */
  --pak-green: #006633;
  --pak-green-hover: #004d26;
  --pak-green-light: #e6f4ea;
  --pak-green-border: #a3d9b5;

  --accent-blue: #0284c7;
  --accent-blue-light: #e0f2fe;
  --accent-amber: #d97706;
  --accent-amber-light: #fef3c7;
  --accent-red: #dc2626;
  --accent-red-light: #fee2e2;

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --border-color: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-active: #006633;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);

  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Outfit', sans-serif;
  --font-urdu: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', 'Urdu Typesetting', serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Top Header & Navigation (Official Banking White Mode)
   ========================================================================== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--pak-green);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 102, 51, 0.25);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-accent {
  color: var(--pak-green);
}

.brand-tag {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--pak-green);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 4px;
}

.brand-tag::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pak-green);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.nav-btn:hover {
  color: var(--pak-green);
  border-color: var(--pak-green-border);
  background: var(--pak-green-light);
}

/* ==========================================================================
   Main Layout Container
   ========================================================================== */
.main-container {
  flex: 1;
  max-width: 620px;
  width: 100%;
  margin: 0 auto;
  padding: 18px 16px 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ==========================================================================
   Official Trust Banner (Institutional Security)
   ========================================================================== */
.trust-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 14px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
  align-self: center;
}

.trust-banner svg {
  color: var(--pak-green);
}

/* ==========================================================================
   Step Wizard Tracker (Clean Bank-Grade Stepper)
   ========================================================================== */
.step-tracker-container {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step-tracker {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  padding: 0 8px;
}

.step-progress-bar {
  position: absolute;
  top: 16px;
  left: 24px;
  right: 24px;
  height: 2px;
  background: var(--border-color);
  z-index: 1;
}

.step-progress-fill {
  height: 100%;
  width: 25%;
  background: var(--pak-green);
  border-radius: var(--radius-full);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-node {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.step-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  transition: all 0.3s ease;
}

.step-node.active .step-icon {
  border-color: var(--pak-green);
  background: var(--pak-green);
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 102, 51, 0.15);
}

.step-node.completed .step-icon {
  background: var(--pak-green);
  border-color: var(--pak-green);
  color: #ffffff;
}

.step-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.step-node.active .step-label {
  color: var(--pak-green);
  font-weight: 700;
}

.step-node.completed .step-label {
  color: var(--text-primary);
}

.step-summary-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px dashed var(--border-color);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.step-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--pak-green);
  background: var(--pak-green-light);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.72rem;
}

/* ==========================================================================
   Camera Card (Professional White Enclosure with Dark Matte Viewport)
   ========================================================================== */
.camera-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
}

.camera-header {
  padding: 16px 20px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
}

.header-titles {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.step-sub-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--pak-green);
  text-transform: uppercase;
}

.camera-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 4vw, 1.25rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.camera-header p {
  color: var(--text-secondary);
  font-size: clamp(0.82rem, 2.8vw, 0.9rem);
  line-height: 1.45;
}

/* ==========================================================================
   Camera Viewport & Guide Box
   ========================================================================== */
/* ==========================================================================
   Camera Viewport & Guide Box (Ported from universal_kyc standard)
   ========================================================================== */
.viewport-wrapper {
  position: relative;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000000;
  margin: 0 auto 14px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Card Mode (Steps 1 & 2): Official ID-1 Aspect Ratio */
.viewport-wrapper.card-mode {
  aspect-ratio: 85.6 / 53.98;
  width: 100%;
  min-height: 220px;
  max-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Face Mode (Steps 3 & 4): Clean 240px Full Round Circular Biometric Lens */
.viewport-wrapper.face-mode {
  position: relative;
  width: 240px;
  height: 240px;
  min-height: 240px;
  max-width: 240px;
  max-height: 240px;
  border-radius: 50% !important;
  border: 4px solid #2563EB;
  box-shadow: 0 0 0 6px #EFF6FF, var(--shadow-lg);
  margin: 12px auto 16px;
  overflow: hidden !important;
  display: block !important;
  background: #000000;
}

video#videoStream {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.viewport-wrapper.face-mode video#videoStream {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

video#videoStream.mirror-mode {
  transform: scaleX(-1);
  -webkit-transform: scaleX(-1);
}

canvas#captureCanvas {
  display: none;
}

/* Flash Feedback Effect */
.shutter-flash {
  position: absolute;
  inset: 0;
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
  z-index: 50;
  transition: opacity 0.25s ease-out;
}

.shutter-flash.flash-active {
  opacity: 0.95;
  transition: none;
}

/* Clean Professional Scanner Line */
.scan-laser {
  position: absolute;
  left: 6%;
  right: 6%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ffffff, #00d084, #ffffff, transparent);
  box-shadow: 0 0 10px rgba(0, 208, 132, 0.8);
  z-index: 15;
  pointer-events: none;
  animation: cleanLaserScan 2.6s ease-in-out infinite alternate;
}

@keyframes cleanLaserScan {
  0% { top: 10%; opacity: 0.3; }
  50% { opacity: 0.9; }
  100% { top: 90%; opacity: 0.3; }
}

/* Overlay Guides */
.overlay-guide {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

/* Card Shape Guide (Authentic ID Card 85.6mm x 54mm Ratio) */
.guide-card-box {
  width: 88%;
  aspect-ratio: 1.586 / 1;
  max-width: 440px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-md);
  position: relative;
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.65);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.guide-card-box.ready {
  border-color: #ffffff;
}

.guide-card-watermark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.45);
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

/* Professional Card Corner Brackets */
.corner-marker {
  position: absolute;
  width: 22px;
  height: 22px;
}

.corner-tl { top: -2px; left: -2px; border-top: 4px solid var(--pak-green); border-left: 4px solid var(--pak-green); border-top-left-radius: 12px; }
.corner-tr { top: -2px; right: -2px; border-top: 4px solid var(--pak-green); border-right: 4px solid var(--pak-green); border-top-right-radius: 12px; }
.corner-bl { bottom: -2px; left: -2px; border-bottom: 4px solid var(--pak-green); border-left: 4px solid var(--pak-green); border-bottom-left-radius: 12px; }
.corner-br { bottom: -2px; right: -2px; border-bottom: 4px solid var(--pak-green); border-right: 4px solid var(--pak-green); border-bottom-right-radius: 12px; }

/* Dynamic SVG Circular Progress Ring (universal_kyc standard) */
.face-progress-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 25;
  transform: rotate(-90deg); /* Start at 12 o'clock clockwise */
  border-radius: 50%;
}

.face-progress-ring .ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.25);
  stroke-width: 5;
}

.face-progress-ring .ring-bar {
  fill: none;
  stroke: #2563EB;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 716.28;
  stroke-dashoffset: 716.28;
  transition: stroke-dashoffset 0.12s linear, stroke 0.25s ease;
}

.face-progress-ring.completed .ring-bar {
  stroke: #10B981;
  filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.7));
}

.viewport-wrapper.card-mode .face-progress-ring {
  display: none !important;
}

.viewport-wrapper.face-mode .face-progress-ring {
  display: block !important;
}

.liveness-checkmark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 35;
  animation: popCheck 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popCheck {
  0% { transform: scale(0.3); opacity: 0; }
  70% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.circle-status-indicator, .oval-status-indicator {
  position: absolute;
  bottom: -40px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  transition: all 0.2s ease;
}

.face-target-reticle {
  width: 72%;
  height: 72%;
  border: 1px dashed rgba(255, 255, 255, 0.5);
  border-radius: 50%;
}

/* Live Guidance Hint Pill (Centered below camera viewfinder) */
.guide-hint-pill {
  margin: 10px auto 14px;
  background: #F8FAFC;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: clamp(0.76rem, 2.6vw, 0.86rem);
  font-weight: 600;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 90%;
  width: fit-content;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2563EB;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
  animation: pulseBlue 1.6s infinite ease-in-out;
}

@keyframes pulseBlue {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

/* Camera Error Dialog */
.camera-error-dialog {
  position: absolute;
  background: #ffffff;
  border: 1px solid var(--accent-red-light);
  padding: 24px;
  border-radius: var(--radius-md);
  text-align: center;
  max-width: 88%;
  z-index: 30;
  box-shadow: var(--shadow-xl);
}

.error-icon {
  margin-bottom: 8px;
}

.camera-error-dialog h4 {
  color: var(--accent-red);
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.camera-error-dialog p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.45;
}

/* ==========================================================================
   Camera Actions Toolbar (Clean Institutional Banking Bar)
   ========================================================================== */
.camera-actions {
  padding: 16px 24px;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.action-slot {
  display: flex;
  align-items: center;
}

.slot-left {
  justify-content: flex-start;
}

.slot-center {
  justify-content: center;
}

.slot-right {
  justify-content: flex-end;
  gap: 12px;
}

/* Upload Button */
.upload-btn-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.upload-btn-label:hover {
  color: var(--pak-green);
}

.action-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.upload-btn-label:hover .action-icon-circle,
.btn-switch-cam:hover .action-icon-circle {
  background: var(--pak-green-light);
  border-color: var(--pak-green-border);
  color: var(--pak-green);
  transform: translateY(-1px);
}

.action-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Shutter Button (Bank-grade tactile button with Circular Progress) */
.btn-capture {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--pak-green);
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 102, 51, 0.22);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.shutter-progress-ring {
  position: absolute;
  inset: -7px;
  width: calc(100% + 14px);
  height: calc(100% + 14px);
  pointer-events: none;
  transform: rotate(-90deg);
}

.shutter-progress-track {
  fill: none;
  stroke: rgba(0, 102, 51, 0.14);
  stroke-width: 4;
}

.shutter-progress-fill {
  fill: none;
  stroke: #00d084;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 226;
  stroke-dashoffset: 226;
  transition: stroke-dashoffset 0.1s linear;
}

.capture-inner-ring {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--pak-green);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 102, 51, 0.3);
}

.capture-core-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
}

.btn-capture:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 18px rgba(0, 102, 51, 0.32);
}

.btn-capture:active {
  transform: scale(0.94);
}

/* Switch Camera Button */
.btn-switch-cam {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-switch-cam:hover {
  color: var(--pak-green);
}

/* Flashlight / Torch Action Button */
.btn-torch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-torch:hover {
  color: #d97706;
}

.btn-torch:hover .action-icon-circle {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.4);
  color: #d97706;
  transform: translateY(-1px);
}

.btn-torch.active .action-icon-circle {
  background: #f59e0b;
  border-color: #d97706;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.55);
}

.btn-torch.active {
  color: #d97706;
}

/* Floating Torch Button inside Camera Viewport */
.floating-torch-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.floating-torch-btn:hover {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.floating-torch-btn.active {
  background: #f59e0b;
  border-color: #fbbf24;
  color: #0f172a;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.6);
}

.floating-torch-btn.active .torch-bolt-svg {
  fill: #0f172a;
}

/* Soft Screen Illumination Layer (Front Camera or Night Mode Lighting) */
.screen-torch-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0.35) 60%, transparent 100%);
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 10;
}

.screen-torch-overlay.active {
  opacity: 1;
}

/* ==========================================================================
   Buttons & Common Controls
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--pak-green);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 102, 51, 0.25);
}

.btn-primary:hover {
  background: var(--pak-green-hover);
  box-shadow: 0 4px 12px rgba(0, 102, 51, 0.35);
  transform: translateY(-1px);
}

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

.btn-secondary:hover {
  background: #e2e8f0;
}

/* ==========================================================================
   Processing View Radar & Diagnostics (Clean Institutional White)
   ========================================================================== */
.processing-container {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.radar-spinner {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid var(--border-color);
  border-top-color: var(--pak-green);
  animation: bankingSpin 1s cubic-bezier(0.5, 0.1, 0.5, 0.9) infinite;
  margin-bottom: 24px;
  position: relative;
}

@keyframes bankingSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.processing-checklist {
  margin-top: 28px;
  width: 100%;
  max-width: 440px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  text-align: left;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.checklist-item:last-child {
  border-bottom: none;
}

.checklist-item.active {
  color: var(--pak-green);
  font-weight: 700;
}

.checklist-item.active svg {
  color: var(--pak-green);
}

/* ==========================================================================
   Official Government / Bank Verification Certificate (Status View)
   ========================================================================== */
.verification-header-banner {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.badge-verified {
  background: var(--pak-green-light);
  color: var(--pak-green);
  border: 1px solid var(--pak-green-border);
}

.badge-review {
  background: var(--accent-amber-light);
  color: var(--accent-amber);
  border: 1px solid #fcd34d;
}

.badge-rejected {
  background: var(--accent-red-light);
  color: var(--accent-red);
  border: 1px solid #fca5a5;
}

/* Authentic Pakistani CNIC Digital Card UI (Authentic White/Green) */
.cnic-card-mock {
  background: #ffffff;
  border: 2px solid var(--pak-green-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 16px 0;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.cnic-card-mock::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--pak-green) 0%, #10b981 100%);
}

.cnic-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.cnic-logo-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cnic-logo-title h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.cnic-logo-title span {
  font-size: 0.75rem;
  color: var(--pak-green);
  font-weight: 600;
}

.cnic-data-grid {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 20px;
}

.cnic-photo-slot {
  width: 130px;
  height: 160px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

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

.cnic-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 18px;
  margin-bottom: 10px;
}

.cnic-field-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.cnic-field-val {
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
}

.cnic-field-val.urdu-text {
  font-family: var(--font-urdu);
  direction: rtl;
  font-size: 1.15rem;
  color: #1e293b;
  line-height: 1.7;
}

/* Biometric Score Box */
.score-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  margin: 16px 0;
  box-shadow: var(--shadow-sm);
}

.score-progress-wrap {
  height: 8px;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 10px;
}

.score-progress-fill {
  height: 100%;
  background: var(--pak-green);
  border-radius: var(--radius-full);
  transition: width 0.8s ease;
}

/* Lightbox Modal */
.lightbox-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox-modal.active {
  display: flex;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: var(--shadow-xl);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   Ultra-Small Mobile Breakpoints (<= 480px & <= 360px)
   ========================================================================== */
@media (max-width: 480px) {
  .navbar {
    padding: 10px 14px;
  }

  .main-container {
    padding: 10px 10px 24px;
    gap: 12px;
  }

  .step-label {
    display: none;
  }

  .step-progress-bar {
    left: 18px;
    right: 18px;
  }

  .camera-header {
    padding: 12px 14px;
  }

  .viewport-wrapper {
    aspect-ratio: 1 / 1.18;
    min-height: 320px;
  }

  .guide-card-box {
    width: 90%;
  }

  .camera-actions {
    padding: 12px 16px;
    gap: 8px;
  }

  .btn-capture {
    width: 66px;
    height: 66px;
  }

  .action-icon-circle {
    width: 40px;
    height: 40px;
  }

  .cnic-data-grid {
    grid-template-columns: 1fr;
  }

  .cnic-photo-slot {
    margin: 0 auto 12px;
  }

  .cnic-field-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 340px) {
  .brand-title {
    font-size: 0.95rem;
  }

  .nav-btn span {
    display: none;
  }

  .viewport-wrapper {
    min-height: 290px;
  }

  .btn-capture {
    width: 60px;
    height: 60px;
  }
}
