:root {
  --bg-top: #050b18;
  --bg-bottom: #0b1428;
  --card: rgba(12, 21, 41, 0.88);
  --card-header: rgba(7, 13, 28, 0.72);
  --card-inner: rgba(6, 12, 26, 0.65);
  --input-bg: rgba(7, 13, 28, 0.75);
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.24);
  --text: #f8fafc;
  --text-soft: #cbd5e1;
  --muted: #94a3b8;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: rgba(37, 99, 235, 0.16);
  --primary-ring: rgba(59, 130, 246, 0.28);
  --emerald: #10b981;
  --emerald-soft: rgba(16, 185, 129, 0.16);
  --cyan-soft: rgba(6, 182, 212, 0.16);
  --danger: #ef4444;
  --danger-bg: rgba(127, 29, 29, 0.34);
  --danger-border: rgba(239, 68, 68, 0.45);
  --danger-text: #fecaca;
  --warn-text: #fde68a;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

.ambient {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.ambient-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(90px);
  opacity: 0.22;
}

.ambient-glow-1 {
  width: 340px;
  height: 340px;
  top: -110px;
  left: 50%;
  transform: translateX(-65%);
  background: #2563eb;
}

.ambient-glow-2 {
  width: 280px;
  height: 280px;
  bottom: -90px;
  right: -80px;
  background: #0ea5e9;
}

.page-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px 12px 26px;
  gap: 14px;
}

.shell {
  width: 100%;
  max-width: 500px;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.top {
  padding: 22px 20px 20px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: var(--card-header);
}

.brand-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.07em;
  color: #ffffff;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.16);
  border: 1px solid rgba(96, 165, 250, 0.25);
  color: #60a5fa;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.top-sub {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.stepper {
  padding: 16px 18px 2px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.stepper-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.stepper-bar {
  height: 4px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  transition: background 0.25s ease;
}

.stepper-item.active .stepper-bar {
  background: linear-gradient(90deg, #2563eb, #3b82f6);
}

.stepper-item.done .stepper-bar {
  background: var(--emerald);
}

.stepper-label {
  font-size: 10.5px;
  font-weight: 600;
  color: #64748b;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stepper-item.active .stepper-label {
  color: #93c5fd;
}

.stepper-item.done .stepper-label {
  color: #6ee7b7;
}

.body {
  padding: 22px 16px 24px;
  min-width: 0;
}

@media (min-width: 480px) {
  .page-wrap {
    padding: 32px 16px;
  }
  .body {
    padding: 26px 26px 28px;
  }
  .stepper {
    padding: 18px 26px 2px;
  }
}

.loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 38px 16px;
  color: var(--muted);
  font-size: 13.5px;
}

h1 {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  text-align: center;
  color: #ffffff;
}

h2 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
  color: #ffffff;
}

.lead {
  margin: 0 0 20px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
  text-align: center;
}

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

.step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.step-pill {
  font-size: 11.5px;
  font-weight: 600;
  color: #93c5fd;
  background: rgba(37, 99, 235, 0.14);
  border: 1px solid rgba(59, 130, 246, 0.25);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.checklist {
  background: var(--card-inner);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 4px 16px;
  margin-bottom: 18px;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

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

.check-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.check-icon-blue {
  background: var(--primary-soft);
  color: #60a5fa;
}

.check-icon-emerald {
  background: var(--emerald-soft);
  color: #34d399;
}

.check-icon-cyan {
  background: var(--cyan-soft);
  color: #22d3ee;
}

.check-title {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 3px;
}

.check-desc {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
}

@media (min-width: 480px) {
  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .span-2 {
    grid-column: span 2;
  }
}

.field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.req {
  color: #60a5fa;
}

.input, .textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 12px 13px;
  font-size: 16px;
  line-height: 1.35;
  color: #ffffff;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
  appearance: none;
}

.input::placeholder, .textarea::placeholder {
  color: #64748b;
}

.input:focus, .textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px var(--primary-ring);
  background: rgba(9, 17, 36, 0.95);
}

.input.invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18);
}

.textarea {
  min-height: 82px;
  resize: vertical;
  font-family: inherit;
}

.err {
  font-size: 11.5px;
  color: #fca5a5;
  margin: 0;
}

.hint {
  font-size: 11.5px;
  color: var(--warn-text);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.section-sep {
  margin: 20px 0 14px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  gap: 7px;
}

.section-sep svg {
  color: #60a5fa;
}

.alert {
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

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

.alert-error {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger-text);
}

.upload-card {
  background: var(--card-inner);
  border: 1.5px dashed rgba(148, 163, 184, 0.3);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.upload-card.invalid {
  border-color: var(--danger);
  background: rgba(127, 29, 29, 0.18);
}

.upload-card.done {
  border-style: solid;
  border-color: rgba(16, 185, 129, 0.52);
  background: rgba(6, 78, 59, 0.14);
}

.upload-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.upload-title {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 2px;
}

.upload-sub {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  line-height: 1.4;
}

.upload-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
  flex-shrink: 0;
}

.upload-preview {
  width: 100%;
  max-height: 210px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #020617;
}

.selfie-frame {
  display: flex;
  justify-content: center;
  padding: 6px 0;
}

.selfie-placeholder {
  width: 136px;
  height: 170px;
  border-radius: 999px;
  border: 2px dashed rgba(96, 165, 250, 0.35);
  background: rgba(37, 99, 235, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #60a5fa;
  font-size: 11.5px;
  text-align: center;
  padding: 12px;
}

.selfie-preview {
  width: 152px;
  height: 192px;
  object-fit: cover;
  border-radius: 999px;
  border: 3px solid var(--emerald);
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.2);
  display: block;
}

.upload-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

@media (max-width: 359px) {
  .upload-actions {
    grid-template-columns: 1fr;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  border: none;
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 14.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  color: #ffffff;
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.28);
  transition: transform 0.12s ease, background 0.16s ease, opacity 0.16s ease, box-shadow 0.16s ease;
  text-decoration: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover:not(:disabled) {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.36);
}

.btn:active:not(:disabled) {
  transform: scale(0.99);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-emerald {
  background: linear-gradient(90deg, #2563eb 0%, #059669 100%);
  box-shadow: 0 10px 24px rgba(5, 150, 105, 0.26);
}

.btn-emerald:hover:not(:disabled) {
  background: linear-gradient(90deg, #3b82f6 0%, #10b981 100%);
}

.btn-whatsapp {
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  box-shadow: 0 10px 24px rgba(5, 150, 105, 0.3);
}

.btn-whatsapp:hover:not(:disabled) {
  background: linear-gradient(180deg, #34d399 0%, #10b981 100%);
}

.btn-outline {
  background: rgba(15, 23, 42, 0.72);
  color: #e2e8f0;
  border: 1px solid var(--border-strong);
  box-shadow: none;
}

.btn-outline:hover:not(:disabled) {
  background: rgba(30, 41, 59, 0.9);
  box-shadow: none;
}

.btn-sm {
  padding: 10px 12px;
  font-size: 12.5px;
  border-radius: 10px;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.actions > * {
  flex: 1;
  min-width: 0;
}

.summary-box {
  background: var(--card-inner);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

.summary-item span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 2px;
}

.summary-item strong {
  color: #f8fafc;
  font-weight: 600;
  word-break: break-word;
}

.summary-divider {
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.thumb-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 12px;
  background: var(--card-inner);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 14px;
}

.thumb-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.thumb-col img {
  width: 78px;
  height: 58px;
  object-fit: cover;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
}

.thumb-col img.round {
  width: 58px;
  height: 74px;
  border-radius: 999px;
  border-color: rgba(16, 185, 129, 0.55);
}

.thumb-col span {
  font-size: 10.5px;
  color: var(--muted);
}

.success-wrap {
  text-align: center;
  padding: 12px 4px 6px;
}

.success-badge {
  width: 76px;
  height: 76px;
  border-radius: 999px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 14px 36px rgba(16, 185, 129, 0.34);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.legal {
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
  line-height: 1.55;
  margin: 0 0 18px;
}

.security-footer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #64748b;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2.2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #ffffff;
  border-radius: 999px;
  animation: spin 0.75s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}

.spinner-sm {
  width: 13px;
  height: 13px;
  border-width: 2px;
  border-color: rgba(253, 230, 138, 0.25);
  border-top-color: #fde68a;
}

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

.hidden {
  display: none !important;
}
