.cadastro-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(20px + var(--safe-top)) 16px calc(24px + var(--safe-bottom));
}

.cadastro-card {
  width: min(100%, 430px);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 28px;
  padding: 30px 22px 24px;
  box-shadow: 0 22px 48px rgba(18, 46, 76, 0.14);
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  overflow: hidden;
}

.cadastro-back-button {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #f2f8fd;
  color: var(--primary-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 20px rgba(18, 46, 76, 0.08);
}

.cadastro-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

.cadastro-logo {
  width: min(100%, 190px);
  height: auto;
}

.cadastro-highlight {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #fff;
  font-size: 0.92rem;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(62, 182, 251, 0.24);
}

.cadastro-brand p {
  color: #63758a;
  font-size: 0.95rem;
  line-height: 1.5;
}

.cadastro-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cadastro-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cadastro-field > span:first-child {
  color: #5b6470;
  font-size: 0.84rem;
  font-weight: 700;
}

.cadastro-field .field-control input {
  min-height: 54px;
  border-radius: 16px;
  background: #f9fbfd;
}

.cadastro-email-trigger {
  width: 100%;
  min-height: 52px;
  border-radius: 16px;
  font-size: 0.98rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.cadastro-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #90a0b3;
  font-size: 0.82rem;
  font-weight: 700;
}

.cadastro-divider::before,
.cadastro-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e3ebf4;
}

.cadastro-divider span {
  padding: 0 12px;
}

.cadastro-email-trigger {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  box-shadow: 0 16px 30px rgba(62, 182, 251, 0.26);
}

.cadastro-social-inline {
  margin: 4px 0 0;
}

.cadastro-social-inline.is-hidden,
.cadastro-divider.is-hidden,
.cadastro-email-trigger.is-hidden {
  display: none !important;
}

.cadastro-email-panel {
  display: none;
  flex-direction: column;
  gap: 14px;
}

.cadastro-email-panel.is-active {
  display: flex;
}

.cadastro-provider-state {
  min-height: 48px;
  border-radius: 16px;
  padding: 0 16px;
  background: #f4fbff;
  border: 1px solid #bfe8fb;
  color: #2779b8;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 700;
}

.cadastro-warning-feedback {
  display: none;
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #f5d48f;
  background: #fff6df;
  color: #8a6116;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.45;
}

.cadastro-warning-feedback.is-visible {
  display: block;
}

.cadastro-check-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid #e2ebf4;
  background: #f9fbfd;
}

.cadastro-check-card input,
.cadastro-terms input {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: var(--primary);
}

.cadastro-check-card strong {
  display: block;
  color: #334155;
  font-size: 0.95rem;
}

.cadastro-check-card small {
  display: block;
  margin-top: 4px;
  color: #6b7280;
  line-height: 1.4;
}

.cadastro-terms {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: #5b6470;
  font-size: 0.88rem;
  line-height: 1.45;
}

.cadastro-terms a {
  color: var(--primary);
  font-weight: 700;
}

.cadastro-submit-wrap {
  display: none;
}

.cadastro-submit-wrap.is-visible {
  display: block;
}

.cadastro-submit-wrap .login-submit {
  width: 100%;
  min-height: 54px;
  border-radius: 16px;
}

.cadastro-secondary-link {
  display: none;
  background: none;
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 700;
}

.cadastro-secondary-link.is-hidden {
  display: none !important;
}

.cadastro-secondary-link.is-visible {
  display: block;
}

.cadastro-footnote {
  margin-top: 0;
}

.cadastro-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(255, 255, 255, 0.96);
  text-align: center;
}

.cadastro-loading-overlay.active {
  display: flex;
}

.cadastro-loading-content {
  max-width: 320px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 12px;
}

.cadastro-loading-logo {
  width: min(46vw, 150px);
  max-width: 150px;
  margin-bottom: 32px;
}

.cadastro-loading-title {
  margin: 14px 0 0;
  color: var(--primary);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
}

.cadastro-loading-loader {
  position: relative;
  width: 50px;
  height: 50px;
  text-align: center;
}

.cadastro-loading-box {
  position: absolute;
  inset: 0;
  border-radius: 5px;
  background: var(--primary);
  animation: cadastro-preloader-box-rotate 0.5s linear infinite;
}

.cadastro-loading-shadow {
  position: absolute;
  top: 59px;
  left: 0;
  width: 50px;
  height: 5px;
  opacity: 0.1;
  border-radius: 50%;
  background: #000;
  animation: cadastro-preloader-shadow-scale 0.5s linear infinite;
}

@keyframes cadastro-preloader-box-rotate {
  17% {
    border-bottom-right-radius: 3px;
  }

  25% {
    transform: translateY(9px) rotate(22.5deg);
  }

  50% {
    border-bottom-right-radius: 40px;
    transform: translateY(18px) scale(1, 0.9) rotate(45deg);
  }

  75% {
    transform: translateY(9px) rotate(67.5deg);
  }

  100% {
    transform: translateY(0) rotate(90deg);
  }
}

@keyframes cadastro-preloader-shadow-scale {
  50% {
    transform: scale(1.2, 1);
  }
}

@media (min-width: 481px) {
  .cadastro-card {
    padding-left: 26px;
    padding-right: 26px;
  }
}
