:root {
  --blue: #2563eb;
  --blue-hover: #1d4ed8;
  --blue-soft: #eff4ff;
  --green: #16a34a;
  --amber: #d97706;
  --red: #dc2626;
  --dark-bg: #05070b;
  --dark-card: #0d1017;
  --dark-card-right: #0b1224;
  --dark-border: rgba(255, 255, 255, 0.09);
  --txt-dark-1: #f8fafc;
  --txt-dark-2: #94a3b8;
  --txt-light-1: #0f172a;
  --txt-light-2: #64748b;
  --light-border: #e5e7eb;
  --light-surface: #f4f6f9;
}

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

html, body {
  width: 100%;
  min-height: 100dvh;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.mode-dark, body.mode-loading {
  background: var(--dark-bg);
  color: var(--txt-dark-1);
}

body.mode-light {
  background: #ffffff;
  color: var(--txt-light-1);
}

.screen {
  display: none;
}
.screen.active {
  display: flex;
}

/* ─── Kavro Emblem (Sleek glowing ring matching Didit's geometric minimalism) ── */
.kavro-emblem {
  display: inline-block;
  width: 24px;
  height: 28px;
  border-radius: 999px;
  border: 3px solid transparent;
  background:
    linear-gradient(#05070b, #05070b) padding-box,
    linear-gradient(135deg, #38bdf8, #3b82f6, #818cf8) border-box;
  flex-shrink: 0;
}
.mode-light .kavro-emblem,
.mobile-shell .kavro-emblem,
.qr-center-badge .kavro-emblem {
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(135deg, #38bdf8, #2563eb, #6366f1) border-box;
}
.kavro-emblem.lg { width: 28px; height: 34px; border-width: 3.5px; }
.kavro-emblem.sm { width: 18px; height: 22px; border-width: 2.5px; }
.kavro-emblem.xs { width: 14px; height: 17px; border-width: 2.2px; }

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 9px;
}
.brand-wordmark {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.4px;
}
.brand-wordmark.light {
  font-size: 26px;
  color: #0f172a;
}

/* ─── Loader & Error ──────────────────────────────────── */
.screen-center-dark {
  min-height: 100dvh;
  width: 100%;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--dark-bg);
}

.loader-card, .error-card {
  max-width: 400px;
  width: 100%;
  text-align: center;
  padding: 36px 28px;
  border-radius: 20px;
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
}

.kavro-ring-loader {
  width: 44px;
  height: 44px;
  margin: 0 auto 18px;
  border-radius: 50%;
  border: 3.5px solid rgba(59, 130, 246, 0.2);
  border-top-color: #3b82f6;
  animation: spin 0.85s linear infinite;
}
.kavro-ring-loader.light {
  width: 52px;
  height: 52px;
  border-color: #dbeafe;
  border-top-color: var(--blue);
}
@keyframes spin { to { transform: rotate(360deg); } }

.loader-title { font-size: 16px; font-weight: 600; color: #f8fafc; }
.loader-sub { font-size: 13px; color: var(--txt-dark-2); margin-top: 6px; }

.error-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.14);
  color: #f87171;
  font-size: 24px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.error-card h1 { font-size: 20px; margin-bottom: 10px; }
.error-card p { font-size: 14px; color: var(--txt-dark-2); line-height: 1.5; margin-bottom: 22px; }

/* ─── Desktop Handoff Screen (Print 4 Exact Style) ────── */
.desktop-shell {
  min-height: 100dvh;
  width: 100%;
  flex-direction: column;
  justify-content: space-between;
  background: radial-gradient(circle at 70% 25%, rgba(37, 99, 235, 0.08), transparent 45%), var(--dark-bg);
  padding: 20px 28px;
}

.desktop-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}

.lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
}
.lang-pill.dark {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
}
.lang-pill.light {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  color: #1e293b;
}
.lang-pill.light.sm {
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 600;
}

.desktop-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 0;
}

.handoff-card {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  max-width: 860px;
  width: 100%;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--dark-border);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.65);
}

.handoff-left {
  background: var(--dark-card);
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.handoff-left h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}
.handoff-sub {
  font-size: 14px;
  line-height: 1.55;
  color: var(--txt-dark-2);
  margin-bottom: 20px;
}

.meta-pills {
  display: flex;
  gap: 10px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}
.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #cbd5e1;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.step-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 26px;
}
.step-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.step-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.step-icon-box.dark {
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
}
.step-icon-box.light {
  background: #f3f4f6;
  color: #1e293b;
}
.step-title {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
}
.step-desc {
  font-size: 13px;
  margin-top: 3px;
  line-height: 1.4;
}
.step-list.dark .step-title { color: #f1f5f9; }
.step-list.dark .step-desc { color: #94a3b8; }
.step-list.light .step-title { color: #0f172a; }
.step-list.light .step-desc { color: #64748b; }

.privacy-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px 16px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.48;
}
.privacy-box.dark {
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.22);
  color: #cbd5e1;
}
.privacy-box.light {
  background: #f3f6ff;
  border: 1px solid #e2ebff;
  color: #1e293b;
}
.shield-ico { flex-shrink: 0; margin-top: 2px; color: #3b82f6; }
.privacy-link {
  display: block;
  margin-top: 4px;
  color: #3b82f6;
  font-weight: 500;
  text-decoration: none;
}
.privacy-link:hover { text-decoration: underline; }

.handoff-right {
  background: linear-gradient(160deg, #0d162c 0%, #091020 100%);
  padding: 40px 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-left: 1px solid var(--dark-border);
}

.qr-wrapper {
  position: relative;
  background: #ffffff;
  padding: 14px;
  border-radius: 20px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  margin-bottom: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#desktop-qr-canvas {
  display: block;
  width: 200px;
  height: 200px;
}
.qr-center-badge {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.16);
}

.qr-heading {
  font-size: 16px;
  font-weight: 600;
  color: #f8fafc;
  margin-bottom: 8px;
}
.qr-domain {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: #64748b;
  margin-bottom: 18px;
}
.live-sync-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 500;
  color: #e2e8f0;
  margin-bottom: 20px;
}
.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
  animation: pulseBlue 1.8s infinite;
  flex-shrink: 0;
}
.pulse-dot.green {
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
}
@keyframes pulseBlue {
  0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.65); }
  70% { box-shadow: 0 0 0 9px rgba(59, 130, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

.handoff-divider {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #64748b;
  font-size: 12px;
  margin-bottom: 14px;
}
.handoff-divider::before, .handoff-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.btn-outline-dark {
  width: 100%;
  max-width: 300px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f8fafc;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.btn-outline-dark:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.28);
}
.keep-tab-note {
  margin-top: 12px;
  font-size: 12px;
  color: #64748b;
}

.powered-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 13px;
}
.powered-footer.dark { color: #94a3b8; }
.powered-footer.dark strong { color: #f8fafc; font-weight: 700; }
.powered-footer.light { color: #64748b; }
.powered-footer.light strong { color: #0f172a; font-weight: 700; }

/* ─── Mobile Shell (Light Mode — Prints 1, 2, 3 Exact Style) ── */
.mobile-shell {
  width: 100%;
  min-height: 100dvh;
  background: #ffffff;
  color: var(--txt-light-1);
  flex-direction: column;
}

.m-view {
  display: none;
  flex-direction: column;
  min-height: 100dvh;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 16px 22px 24px;
  justify-content: space-between;
}
.m-view.active {
  display: flex;
}
.m-view.m-centered {
  justify-content: center;
  align-items: center;
}

.m-top-right-only {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
}

.m-brand-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 22px 0 24px;
}

.m-step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}
.icon-back-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.icon-back-btn:active { background: #f1f5f9; }

.m-progress-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.m-progress-bars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
  max-width: 190px;
}
.bar-seg {
  height: 4px;
  border-radius: 99px;
  background: #e5e7eb;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: #0f172a;
  border-radius: 99px;
  transition: width 0.3s ease;
}
.m-progress-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.9px;
  color: #64748b;
  text-transform: uppercase;
}

.m-content {
  flex: 1;
}

.m-title {
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.6px;
  line-height: 1.2;
  color: #0f172a;
  margin-bottom: 10px;
}
.m-subtitle {
  font-size: 15px;
  line-height: 1.5;
  color: var(--txt-light-2);
  margin-bottom: 26px;
}

.country-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--light-border);
  background: #ffffff;
  margin-bottom: 16px;
}
.country-caption { font-size: 12.5px; color: #64748b; }
.country-name { font-size: 16px; font-weight: 600; color: #0f172a; margin-top: 2px; }

.doc-choice-list {
  border-radius: 16px;
  border: 1px solid var(--light-border);
  background: #ffffff;
  overflow: hidden;
}
.doc-choice-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 16px;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}
.doc-choice-item:active { background: #f8fafc; }
.doc-choice-label {
  flex: 1;
  font-size: 15.5px;
  font-weight: 500;
  color: #0f172a;
  line-height: 1.35;
}
.doc-choice-item .chevron { color: #94a3b8; flex-shrink: 0; }
.doc-choice-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 0 16px;
}

.prep-illustration-card {
  background: #f4f7fc;
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.m-bottom-cta {
  padding-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-primary-pill {
  width: 100%;
  height: 54px;
  border-radius: 999px;
  border: none;
  background: var(--blue);
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.12s ease, opacity 0.18s ease;
}
.btn-primary-pill:hover { background: var(--blue-hover); }
.btn-primary-pill:active { transform: scale(0.985); }
.btn-primary-pill:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-secondary-link {
  background: transparent;
  border: none;
  color: var(--blue);
  font-size: 14px;
  font-weight: 600;
  padding: 8px;
  cursor: pointer;
  text-align: center;
}

.btn-outline-light {
  width: 100%;
  height: 50px;
  border-radius: 999px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.legal-fineprint {
  font-size: 11.5px;
  color: #64748b;
  text-align: center;
  line-height: 1.45;
  padding: 0 4px;
}

/* ─── Document Upload Mode ────────────────────────────── */
.upload-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 18px;
}
.mode-tab {
  border: none;
  background: transparent;
  padding: 10px 8px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
}
.mode-tab.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.upload-pane { display: none; }
.upload-pane.active { display: block; }

.file-drop-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 28px 18px;
  border-radius: 16px;
  border: 2px dashed #cbd5e1;
  background: #f8fafc;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.file-drop-box.compact {
  flex-direction: row;
  text-align: left;
  justify-content: flex-start;
  padding: 16px;
  gap: 14px;
}
.file-drop-box.selected {
  border-style: solid;
  border-color: var(--green);
  background: #f0fdf4;
}
.drop-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #dbeafe;
  color: var(--blue);
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.drop-icon.sm { width: 38px; height: 38px; font-size: 15px; }
.drop-title { font-size: 14.5px; font-weight: 600; color: #0f172a; }
.drop-sub { font-size: 12.5px; color: #64748b; }

.inline-alert {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.4;
}
.inline-alert.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

/* ─── Fullscreen Rear Camera (Document) ───────────────── */
.camera-fullscreen {
  max-width: 100% !important;
  padding: 0 !important;
  background: #000000;
  color: #ffffff;
  position: relative;
}
.cam-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.75), transparent);
}
.cam-close-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.16);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}
.cam-step-pill {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
}
.cam-upload-switch {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.cam-stage {
  position: relative;
  flex: 1;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
#doc-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.doc-frame-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  pointer-events: none;
}
.doc-frame-box {
  width: min(88vw, 390px);
  aspect-ratio: 1.586 / 1;
  position: relative;
  border-radius: 16px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.52);
  transition: transform 0.2s ease;
}
.doc-frame-box .corner {
  position: absolute;
  width: 30px;
  height: 30px;
  border-color: #ffffff;
  border-style: solid;
  border-width: 0;
  transition: border-color 0.2s ease;
}
.doc-frame-box.ready .corner { border-color: #22c55e; }
.doc-frame-box.warn .corner { border-color: #f59e0b; }
.corner.tl { top: -2px; left: -2px; border-top-width: 4px; border-left-width: 4px; border-top-left-radius: 14px; }
.corner.tr { top: -2px; right: -2px; border-top-width: 4px; border-right-width: 4px; border-top-right-radius: 14px; }
.corner.bl { bottom: -2px; left: -2px; border-bottom-width: 4px; border-left-width: 4px; border-bottom-left-radius: 14px; }
.corner.br { bottom: -2px; right: -2px; border-bottom-width: 4px; border-right-width: 4px; border-bottom-right-radius: 14px; }

.doc-scan-line {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #38bdf8, transparent);
  top: 15%;
  animation: scanLine 2.4s ease-in-out infinite;
}
@keyframes scanLine {
  0%, 100% { top: 12%; opacity: 0.4; }
  50% { top: 86%; opacity: 0.95; }
}

.cam-hint-pill {
  margin-top: 22px;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  color: #f8fafc;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  max-width: 320px;
}

.cam-controls {
  padding: 20px 16px 28px;
  background: #000000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.shutter-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 4px solid #ffffff;
  background: transparent;
  padding: 5px;
  cursor: pointer;
}
.shutter-inner {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 0.12s;
}
.shutter-btn:active .shutter-inner { transform: scale(0.9); }
.cam-sub-note { font-size: 12px; color: #94a3b8; }

/* Review Sheet */
.review-sheet {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.78);
  align-items: flex-end;
  justify-content: center;
}
.review-sheet.open { display: flex; }
.review-sheet-card {
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  color: #0f172a;
  border-radius: 24px 24px 0 0;
  padding: 24px 20px 28px;
  text-align: center;
}
.review-sheet-card h3 { font-size: 19px; font-weight: 700; margin-bottom: 6px; }
.review-sheet-card p { font-size: 13.5px; color: #64748b; margin-bottom: 16px; }
#doc-review-img {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  border-radius: 12px;
  background: #0f172a;
  margin-bottom: 18px;
}
.review-actions {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 10px;
}

/* ─── Face Liveness 3D Screen ─────────────────────────── */
.face-prep-visual {
  display: flex;
  justify-content: center;
  margin: 12px 0 24px;
}
.face-oval-demo {
  width: 164px;
  height: 164px;
  border-radius: 28px;
  background: #f4f7fc;
  display: flex;
  align-items: center;
  justify-content: center;
}

.face-liveness-screen {
  position: relative;
  transition: background-color 0.2s ease;
}
.face-flash-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 30;
  transition: opacity 0.12s ease;
}

.face-stage-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px 0 18px;
}
.face-instruction-title {
  font-size: 23px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}
.face-instruction-sub {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 22px;
  min-height: 20px;
}

.oval-camera-wrap {
  position: relative;
  width: 260px;
  height: 330px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}
#face-video {
  width: 232px;
  height: 300px;
  object-fit: cover;
  border-radius: 50% / 50%;
  transform: scaleX(-1);
  background: #0f172a;
}
.oval-progress-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
#oval-progress-ring {
  transition: stroke-dashoffset 0.28s ease, stroke 0.25s ease;
}

.face-dir-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 32px;
  font-weight: 800;
  color: var(--blue);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.face-dir-arrow.left { left: -24px; opacity: 1; animation: bounceLeft 0.9s infinite; }
.face-dir-arrow.right { right: -24px; opacity: 1; animation: bounceRight 0.9s infinite; }
@keyframes bounceLeft { 0%, 100% { transform: translate(0, -50%); } 50% { transform: translate(-8px, -50%); } }
@keyframes bounceRight { 0%, 100% { transform: translate(0, -50%); } 50% { transform: translate(8px, -50%); } }

.face-status-badge {
  padding: 8px 16px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
}
.face-status-badge.ok {
  background: #dcfce7;
  color: #15803d;
}

/* ─── Processing & Result ─────────────────────────────── */
.processing-wrap, .result-wrap {
  width: 100%;
  max-width: 380px;
  text-align: center;
}
.processing-checklist {
  margin-top: 24px;
  text-align: left;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.p-check {
  font-size: 13.5px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 10px;
}
.p-check.active { color: #0f172a; font-weight: 600; }
.p-check.done { color: var(--green); font-weight: 600; }

.result-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  font-weight: 800;
}
.result-icon.approved { background: #dcfce7; color: #16a34a; }
.result-icon.manual { background: #fef3c7; color: #d97706; }

/* ─── Modal Privacy ───────────────────────────────────── */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.6);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal-sheet {
  max-width: 420px;
  width: 100%;
  background: #ffffff;
  color: #0f172a;
  border-radius: 20px;
  padding: 24px;
}
.modal-sheet h3 { font-size: 18px; margin-bottom: 12px; }
.modal-sheet p { font-size: 14px; color: #475569; line-height: 1.55; margin-bottom: 14px; }

@media (max-width: 820px) {
  .handoff-card {
    grid-template-columns: 1fr;
  }
  .handoff-right {
    border-left: none;
    border-top: 1px solid var(--dark-border);
  }
}
