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

.wizard-shell {
  min-height: 100vh;
  display: grid;
  align-items: start !important;
  justify-items: center;
  place-items: unset;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 16px 12px 32px;
}

.wizard-panel {
  width: min(100%, 720px);
  min-height: min(820px, calc(100dvh - 180px));
  box-sizing: border-box;
  align-self: start;
  margin: 0 auto;
  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 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));
  }
}

.cadastro-term-open {
  width: 100%;
}

.cadastro-term-modal {
  width: min(680px, calc(100% - 28px));
  max-height: min(760px, calc(100% - 28px));
  padding: 0;
  border: 0;
  border-radius: 16px;
  color: #18353d;
  box-shadow: 0 24px 80px rgba(18, 51, 58, 0.28);
}

.cadastro-term-modal::backdrop {
  background: rgba(8, 30, 35, 0.62);
}

.cadastro-term-modal-head {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  background: #fff;
  border-bottom: 1px solid #dce4e7;
}

.cadastro-term-modal-head h2 {
  margin: 0;
  font-size: 1.35rem;
}

.cadastro-term-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: #eef3f4;
  color: #18353d;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.cadastro-term-content {
  max-height: min(560px, calc(100vh - 190px));
  overflow: auto;
  padding: 20px;
  line-height: 1.6;
}

.cadastro-term-content p:first-child {
  margin-top: 0;
}

.cadastro-term-content p:last-child {
  margin-bottom: 0;
}

.cadastro-term-content ul {
  padding-left: 22px;
}

.cadastro-term-close-action {
  display: block;
  margin: 0 20px 20px auto;
}
