@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

/* ═══════════════════════════════════════════
   DESIGN TOKENS
   Inherited from Registro Lite + extended
   ═══════════════════════════════════════════ */
:root {
  --bg-deep: #0f1923;
  --bg-card: #ffffff;
  --tealca-blue: #0693e3;
  --tealca-blue-hover: #0580c8;
  --tealca-blue-glow: rgba(6, 147, 227, 0.15);
  --tealca-blue-subtle: rgba(6, 147, 227, 0.08);
  --tealca-dark: #2d3940;
  --text-primary: #1a2332;
  --text-secondary: #6b7c8d;
  --text-light: #9aa8b5;
  --border-subtle: #e8edf1;
  --border-focus: var(--tealca-blue);
  --success: #10b981;
  --success-bg: #ecfdf5;
  --error: #ef4444;
  --error-bg: #fef2f2;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --shadow-card: 0 4px 60px rgba(0,0,0,0.12);
  --shadow-input: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-elevated: 0 12px 40px rgba(0,0,0,0.15);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ═══════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  position: relative;
  overflow-x: hidden;
}

/* Subtle background glow */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(6, 147, 227, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(6, 147, 227, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ═══════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════ */
.app {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.card-wrapper {
  width: 100%;
  max-width: 440px;
  animation: slideUp 0.5s ease-out;
}

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

.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 0 28px 32px;
  position: relative;
  overflow: hidden;
}

.card-bar {
  height: 4px;
  background: linear-gradient(90deg, var(--tealca-blue), #38bdf8);
  margin: 0 -28px;
}

/* ═══════════════════════════════════════════
   PROGRESS TRACK
   ═══════════════════════════════════════════ */
.progress-track {
  padding: 24px 0 8px;
}

.progress-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0 8px;
}

.progress-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border-subtle);
  background: var(--bg-card);
  cursor: default;
  transition: all var(--transition);
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-dot.active {
  border-color: var(--tealca-blue);
  background: var(--tealca-blue);
  box-shadow: 0 0 0 4px var(--tealca-blue-glow);
}

.progress-dot.active::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}

.progress-dot.done {
  border-color: var(--success);
  background: var(--success);
}

.progress-dot.done::after {
  content: '';
  width: 10px;
  height: 6px;
  border: 2px solid #fff;
  border-top: none;
  border-right: none;
  transform: rotate(-45deg);
  margin-top: -2px;
}

.progress-line {
  flex: 1;
  height: 2px;
  background: var(--border-subtle);
  position: relative;
  overflow: hidden;
}

.progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--success);
  transition: width 0.5s ease;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  padding: 8px 0 0;
}

.progress-labels span {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-light);
  text-align: center;
  flex: 1;
}

/* ═══════════════════════════════════════════
   STEPS
   ═══════════════════════════════════════════ */
.step {
  display: none;
  animation: fadeSlideIn 0.35s ease;
}

.step.active {
  display: block;
}

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

.step-header {
  text-align: center;
  padding: 28px 0 24px;
}

.step-header.compact {
  padding: 20px 0 16px;
}

.step-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s both;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.6); }
  to   { opacity: 1; transform: scale(1); }
}

.step-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--tealca-blue);
}

.step-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 6px;
}

.step-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 320px;
  margin: 0 auto;
}

/* ═══════════════════════════════════════════
   CLIENT PREVIEW (Step 0)
   ═══════════════════════════════════════════ */
.client-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #f8fafc;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  animation: fadeSlideIn 0.3s ease 0.2s both;
}

.client-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--tealca-blue), #38bdf8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.client-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.client-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-email {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ═══════════════════════════════════════════
   FORM FIELDS
   ═══════════════════════════════════════════ */
.field-group {
  margin-bottom: 18px;
}

.field-row {
  display: flex;
  gap: 12px;
}

.flex-1 { flex: 1; min-width: 0; }

.field-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

.field-label .required {
  color: var(--tealca-blue);
}

.field-input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--text-primary);
  background: #fafbfc;
  transition: all var(--transition);
  box-shadow: var(--shadow-input);
  -webkit-appearance: none;
  appearance: none;
}

.field-input::placeholder { color: var(--text-light); }

.field-input:focus {
  outline: none;
  border-color: var(--tealca-blue);
  box-shadow: 0 0 0 3px var(--tealca-blue-glow);
  background: #fff;
}

.field-input.readonly {
  background: #f1f5f9;
  color: var(--text-secondary);
  cursor: default;
}

.field-input.error {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.field-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239aa8b5' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.field-textarea {
  height: auto;
  padding: 12px 16px;
  resize: vertical;
  min-height: 60px;
}

.field-error {
  font-size: 0.75rem;
  color: var(--error);
  margin-top: 4px;
  display: none;
}

/* ═══════════════════════════════════════════
   OTP INPUT (Step 0)
   ═══════════════════════════════════════════ */
.otp-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.otp-cell {
  width: 48px;
  height: 56px;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  text-align: center;
  font-family: inherit;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  background: #fafbfc;
  transition: all var(--transition);
  -webkit-appearance: none;
  caret-color: var(--tealca-blue);
}

.otp-cell:focus {
  outline: none;
  border-color: var(--tealca-blue);
  box-shadow: 0 0 0 3px var(--tealca-blue-glow);
  background: #fff;
  transform: scale(1.05);
}

.otp-cell.filled {
  border-color: var(--tealca-blue);
  background: #f0f9ff;
}

.otp-cell.success {
  border-color: var(--success);
  background: var(--success-bg);
  color: var(--success);
}

.otp-cell.error {
  border-color: var(--error);
  background: var(--error-bg);
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.otp-separator {
  color: var(--text-light);
  font-size: 1.25rem;
  font-weight: 300;
  margin: 0 2px;
}

/* ═══════════════════════════════════════════
   STATUS MESSAGES
   ═══════════════════════════════════════════ */
.status-msg {
  font-size: 0.8125rem;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  text-align: center;
  display: none;
  animation: fadeSlideIn 0.2s ease;
}

.status-msg.visible { display: block; }
.status-msg.success { color: #065f46; background: var(--success-bg); }
.status-msg.error { color: #991b1b; background: var(--error-bg); }

.btn-resend {
  display: block;
  margin: 16px auto 0;
  border: none;
  background: none;
  color: var(--tealca-blue);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all var(--transition);
}

.btn-resend:hover { background: var(--tealca-blue-subtle); }
.btn-resend:disabled { color: var(--text-light); cursor: not-allowed; }

/* ═══════════════════════════════════════════
   DOCUMENT UPLOAD (Step 2)
   ═══════════════════════════════════════════ */
.upload-zone {
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition);
  cursor: pointer;
  overflow: hidden;
  position: relative;
  min-height: 200px;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--tealca-blue);
  background: var(--tealca-blue-subtle);
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.upload-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  color: var(--text-light);
  transition: color var(--transition);
}

.upload-zone:hover .upload-icon { color: var(--tealca-blue); }

.upload-icon svg { width: 100%; height: 100%; }

.upload-text {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.upload-hint {
  font-size: 0.75rem;
  color: var(--text-light);
}

.upload-preview {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  background: #f8fafc;
}

.upload-preview img {
  max-width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 4px;
}

.upload-remove {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.6);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.upload-remove:hover { background: var(--error); }
.upload-remove svg { width: 16px; height: 16px; }

/* ─── OCR Result ─── */
.ocr-result {
  margin-top: 16px;
  animation: fadeSlideIn 0.3s ease;
}

.ocr-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--success-bg);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: #065f46;
  margin-bottom: 10px;
}

.ocr-badge svg {
  width: 14px;
  height: 14px;
  stroke: var(--success);
}

.ocr-fields {
  display: grid;
  gap: 8px;
}

.ocr-field {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
}

.ocr-field-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.ocr-field-value {
  color: var(--text-primary);
  font-weight: 600;
}

/* ═══════════════════════════════════════════
   CAMERA / SELFIE (Step 3)
   ═══════════════════════════════════════════ */
.camera-zone {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #0a1218;
  position: relative;
}

.camera-start {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px 32px;
}

.camera-frame {
  width: 160px;
  height: 160px;
  margin-bottom: 20px;
  position: relative;
}

.camera-oval {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px dashed rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.camera-oval svg {
  width: 48px;
  height: 48px;
  stroke: rgba(255,255,255,0.3);
}

.btn-camera {
  padding: 12px 32px;
  border: none;
  border-radius: var(--radius-full);
  background: var(--tealca-blue);
  color: #fff;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-camera:hover {
  background: var(--tealca-blue-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(6, 147, 227, 0.4);
}

.camera-hint {
  margin-top: 12px;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  text-align: center;
}

/* Live camera */
.camera-live {
  position: relative;
  aspect-ratio: 3/4;
  max-height: 400px;
  margin: 0 auto;
}

.camera-live video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.camera-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.face-guide {
  width: 65%;
  aspect-ratio: 3/4;
  border: 3px solid rgba(255,255,255,0.5);
  border-radius: 50%;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.4);
}

.camera-controls {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
}

.btn-capture {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 4px solid #fff;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
}

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

.capture-ring {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transition: background 0.15s;
}

.btn-capture:hover .capture-ring {
  background: rgba(255,255,255,0.5);
}

/* Captured */
.camera-captured {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  background: #0a1218;
}

.camera-captured img {
  max-width: 100%;
  max-height: 320px;
  object-fit: contain;
  transform: scaleX(-1);
  border-radius: 4px;
}

.selfie-actions {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
}

.btn-retake {
  padding: 8px 24px;
  border: 1.5px solid rgba(255,255,255,0.6);
  border-radius: var(--radius-full);
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  backdrop-filter: blur(8px);
}

.btn-retake:hover {
  background: rgba(0,0,0,0.7);
  border-color: #fff;
}

/* ═══════════════════════════════════════════
   DELIVERY OPTIONS (Step 4)
   ═══════════════════════════════════════════ */
.delivery-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.delivery-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.delivery-card:hover {
  border-color: rgba(6, 147, 227, 0.3);
  background: var(--tealca-blue-subtle);
}

.delivery-card:has(input:checked) {
  border-color: var(--tealca-blue);
  background: #f0f9ff;
  box-shadow: 0 0 0 3px var(--tealca-blue-glow);
}

.delivery-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: #f0f9ff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--tealca-blue);
}

.delivery-icon svg { width: 22px; height: 22px; }

.delivery-text {
  flex: 1;
  min-width: 0;
}

.delivery-text strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.delivery-text span {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.delivery-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border-subtle);
  flex-shrink: 0;
  position: relative;
  transition: all var(--transition);
}

.delivery-card:has(input:checked) .delivery-check {
  border-color: var(--tealca-blue);
  background: var(--tealca-blue);
}

.delivery-card:has(input:checked) .delivery-check::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 6px;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

/* Office cascade */
.office-cascade {
  animation: fadeSlideIn 0.3s ease;
}

/* ═══════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════ */
.btn-primary-action {
  width: 100%;
  height: 52px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--tealca-blue);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.btn-primary-action:hover:not(:disabled) {
  background: var(--tealca-blue-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(6, 147, 227, 0.35);
}

.btn-primary-action:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary-action:disabled {
  background: var(--border-subtle);
  color: var(--text-light);
  cursor: not-allowed;
}

/* Spinner inside button */
.btn-primary-action.loading {
  color: transparent;
  pointer-events: none;
}

.btn-primary-action.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

.step-nav {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.step-nav .btn-primary-action {
  flex: 1;
}

.btn-back {
  height: 52px;
  padding: 0 20px;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-back:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

/* ═══════════════════════════════════════════
   SUCCESS (Step 5)
   ═══════════════════════════════════════════ */
.success-container {
  text-align: center;
  padding: 24px 0 0;
}

.success-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--success-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

.success-icon svg {
  width: 32px;
  height: 32px;
  stroke: var(--success);
}

.locker-box {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1.5px solid #bae6fd;
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-align: center;
  margin: 24px 0;
}

.locker-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.locker-code {
  font-size: 2rem;
  font-weight: 700;
  color: var(--tealca-blue);
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
}

.next-steps {
  text-align: left;
  margin: 20px 0 24px;
}

.next-steps h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.next-step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.next-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f0f9ff;
  color: var(--tealca-blue);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.next-step-item p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.btn-outline-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 24px;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-outline-action:hover {
  border-color: var(--tealca-blue);
  color: var(--tealca-blue);
}

/* ═══════════════════════════════════════════
   ERROR STATE
   ═══════════════════════════════════════════ */
.error-container {
  text-align: center;
  padding: 40px 0 20px;
}

.error-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--error-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-icon svg {
  width: 32px;
  height: 32px;
  stroke: var(--error);
}

/* ═══════════════════════════════════════════
   LOADING OVERLAY
   ═══════════════════════════════════════════ */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 25, 35, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255,255,255,0.2);
  border-top-color: var(--tealca-blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-bottom: 12px;
}

.loading-text {
  color: rgba(255,255,255,0.7);
  font-size: 0.875rem;
  font-weight: 500;
}

/* ═══════════════════════════════════════════
   LANG TOGGLE & FOOTER
   ═══════════════════════════════════════════ */
.lang-toggle {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 16px;
}

.lang-btn {
  padding: 4px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: rgba(255,255,255,0.4);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.lang-btn:hover { color: rgba(255,255,255,0.7); }

.lang-btn.active {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.9);
}

.footer {
  text-align: center;
  margin-top: 16px;
}

.footer p {
  font-size: 0.6875rem;
  color: rgba(255,255,255,0.25);
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 480px) {
  body {
    padding: 10px;
    align-items: flex-start;
    padding-top: 12px;
  }

  .card {
    padding: 0 16px 20px;
    border-radius: var(--radius-md);
  }

  .card-bar { margin: 0 -16px; }

  .step-header { padding: 20px 0 16px; }
  .step-header.compact { padding: 16px 0 12px; }
  .step-title { font-size: 1.15rem; }
  .step-desc { font-size: 0.8125rem; }

  .otp-cell {
    width: 42px;
    height: 50px;
    font-size: 1.3rem;
  }

  .otp-grid { gap: 6px; }
  .otp-separator { margin: 0; }

  .field-input {
    height: 44px;
    font-size: 1rem;
    padding: 0 12px;
  }

  .field-row { flex-direction: column; gap: 0; }

  .btn-primary-action { height: 48px; font-size: 0.9375rem; }
  .btn-back { height: 48px; font-size: 0.875rem; }

  .delivery-card { padding: 14px 12px; gap: 10px; }

  .progress-dot { width: 24px; height: 24px; }
  .progress-labels span { font-size: 0.625rem; }

  .camera-live { max-height: 360px; }

  .locker-code { font-size: 1.75rem; }
}

@media (min-width: 481px) and (max-width: 768px) {
  body { padding: 20px; }
  .card { padding: 0 24px 28px; }
  .card-bar { margin: 0 -24px; }
}

/* ═══════════════════════════════════════════
   PRINT: HIDE UNNECESSARY
   ═══════════════════════════════════════════ */
@media print {
  body { background: #fff; }
  body::before { display: none; }
  .lang-toggle, .footer, .btn-primary-action, .btn-back, .progress-track { display: none !important; }
  .card { box-shadow: none; border: 1px solid #ddd; }
}

/* [spark-executor] generado vía nvidia-coder (tier quick) e integrado por Claude */
/* ─── Loader de escaneo del documento (paso 2) ─── */
.doc-scan-overlay {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.doc-scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--tealca-blue) 18%, #8ed0f7 50%, var(--tealca-blue) 82%, transparent);
  box-shadow: 0 0 14px 3px var(--tealca-blue-glow), 0 0 6px 1px rgba(6, 147, 227, 0.6);
  animation: docScan 2.2s ease-in-out infinite alternate;
}

@keyframes docScan {
  from { top: 4%; }
  to { top: calc(96% - 3px); }
}
