.cadastro-wizard-page {
  background: #f5f7f8;
}

.wizard-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px 12px 32px;
}

.wizard-panel {
  width: min(100%, 720px);
  background: #fff;
  border: 1px solid #dce4e7;
  border-radius: 16px;
  box-shadow: 0 22px 56px rgba(18, 51, 58, 0.08);
  padding: 20px;
  display: grid;
  gap: 18px;
}

.wizard-brand {
  justify-self: center;
}

.wizard-progress {
  display: grid;
  gap: 8px;
}

.wizard-progress-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.wizard-progress-label {
  color: #45616a;
  font-size: 0.92rem;
  font-weight: 800;
}

.wizard-progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #e9eff1;
  overflow: hidden;
}

.wizard-progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: #0f766e;
  transition: width 0.25s ease;
}

.wizard-step {
  display: none;
  gap: 16px;
}

.wizard-step.is-active {
  display: grid;
}

.wizard-step h1 {
  margin: 0;
  font-size: clamp(1.7rem, 5vw, 2.35rem);
  line-height: 1.1;
}

.wizard-copy {
  margin: 0;
  color: #45616a;
  line-height: 1.6;
  font-size: 1rem;
}

.wizard-list {
  margin: 0;
  padding-left: 20px;
  color: #18353d;
  display: grid;
  gap: 8px;
}

.wizard-field-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.wizard-field {
  display: grid;
  gap: 8px;
}

.wizard-field span,
.wizard-upload span {
  color: #18353d;
  font-weight: 800;
}

.wizard-field input,
.wizard-field select {
  min-height: 56px;
  border: 1px solid #cdd8dc;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 1rem;
  color: #18353d;
  background: #fff;
}

.wizard-field input:focus,
.wizard-field select:focus {
  outline: none;
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.wizard-field small {
  color: #617980;
  font-size: 0.86rem;
}

.wizard-actions {
  display: flex;
  gap: 12px;
  flex-direction: column-reverse;
}

.wizard-button {
  min-height: 56px;
  border: 0;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 1rem;
  font-weight: 800;
  background: #0f766e;
  color: #fff;
}

.wizard-button.secondary {
  background: #eaf2f3;
  color: #18353d;
  border: 1px solid #cdd8dc;
}

.wizard-button.small {
  min-height: 46px;
  font-size: 0.95rem;
}

.upload-card,
.review-card,
.review-media-card {
  border: 1px solid #dce4e7;
  border-radius: 14px;
  background: #f9fbfb;
  padding: 14px;
}

.wizard-upload {
  display: grid;
  gap: 8px;
}

.wizard-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(100%);
}

.file-trigger {
  width: 100%;
}

.upload-preview {
  margin-top: 12px;
  min-height: 180px;
  border: 1px dashed #cdd8dc;
  border-radius: 12px;
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.upload-preview.selfie {
  min-height: 240px;
}

.selfie-camera-panel {
  margin-top: 12px;
  display: grid;
  gap: 12px;
}

.selfie-camera-panel[hidden] {
  display: none;
}

.upload-card[hidden] {
  display: none;
}

.selfie-camera-viewport {
  position: relative;
  min-height: 240px;
  max-height: 360px;
  border: 1px solid #dce4e7;
  border-radius: 12px;
  overflow: hidden;
  background: #0f1720;
}

.selfie-camera-panel video {
  display: block;
  width: 100%;
  min-height: 240px;
  max-height: 360px;
  object-fit: cover;
}

.selfie-face-guide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  pointer-events: none;
}

.selfie-face-guide::before {
  content: "";
  width: min(58%, 220px);
  aspect-ratio: 3 / 4;
  border: 3px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  box-shadow: 0 0 0 999px rgba(3, 12, 18, 0.48);
}

.selfie-face-guide span {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(3, 12, 18, 0.72);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.selfie-camera-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.upload-preview span {
  color: #617980;
  padding: 18px;
  text-align: center;
}

.upload-preview img,
.review-media-card img {
  width: 100%;
  height: 100%;
  max-height: 320px;
  object-fit: contain;
  display: block;
}

.password-match-note {
  font-size: 0.92rem;
  font-weight: 700;
}

.password-match-note.is-valid {
  color: #0f766e;
}

.password-match-note.is-invalid {
  color: #b42318;
}

.wizard-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid #dce4e7;
  border-radius: 14px;
  padding: 14px;
  background: #fff;
}

.wizard-check input {
  margin-top: 4px;
}

.wizard-check span {
  color: #18353d;
  line-height: 1.5;
}

.review-card {
  display: grid;
  gap: 10px;
}

.review-row {
  display: grid;
  gap: 4px;
}

.review-row strong {
  color: #18353d;
}

.review-row span {
  color: #45616a;
}

.review-media {
  display: grid;
  gap: 12px;
}

.review-media-card {
  display: grid;
  gap: 10px;
}

.review-media-card strong {
  color: #18353d;
}

.wizard-loading {
  position: fixed;
  inset: 0;
  background: rgba(245, 247, 248, 0.82);
  display: grid;
  place-items: center;
  gap: 12px;
  z-index: 95;
  text-align: center;
  padding: 24px;
}

.wizard-loading[hidden] {
  display: none !important;
}

.wizard-spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 4px solid #dce4e7;
  border-top-color: #0f766e;
  animation: wizard-spin 0.9s linear infinite;
}

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

@media (min-width: 700px) {
  .wizard-panel {
    padding: 28px;
  }

  .wizard-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wizard-field.full-width {
    grid-column: 1 / -1;
  }

  .wizard-actions {
    flex-direction: row;
    justify-content: space-between;
  }

  .wizard-button {
    min-width: 180px;
  }

  .review-media {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .selfie-camera-actions {
    flex-direction: row;
  }
}
