/* ============================================================
   PedeFi — Cadastro premium (UI · identidade oficial)
   Estende login.css — não altera lógica
   ============================================================ */

/* ---- Página sem rolagem (desktop) ---- */

body.cadastro-body {
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
}

body.cadastro-body .login-page.cadastro-page {
  grid-template-columns: 46% 54%;
  width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

body.cadastro-body .cadastro-institutional {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding: clamp(20px, 3vh, 36px) clamp(24px, 3.5vw, 44px);
}

body.cadastro-body .cadastro-institutional-inner {
  width: min(500px, 100%);
  height: auto;
  max-height: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0;
  margin: 0 auto;
}

body.cadastro-body .login-institutional-logo {
  width: min(260px, 78%) !important;
  margin: 0 auto 24px;
}

body.cadastro-body .login-institutional-title {
  font-size: clamp(1.9rem, 3.4vw, 2.55rem);
  line-height: 1.12;
  margin-bottom: 14px;
  text-align: center;
  width: 100%;
  letter-spacing: -0.02em;
}

body.cadastro-body .login-institutional-subtitle {
  font-size: clamp(1rem, 1.7vw, 1.18rem);
  line-height: 1.55;
  margin-bottom: 24px;
  text-align: center;
  width: 100%;
  max-width: 460px;
  color: rgba(242, 244, 247, 0.84);
}

.cadastro-benefits {
  list-style: none;
  width: 100%;
  max-width: 460px;
  margin: 0 auto 20px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.cadastro-benefits li {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 13px;
  background: rgba(242, 244, 247, 0.06);
  border: 1px solid rgba(242, 244, 247, 0.12);
  font-size: 0.98rem;
  font-weight: 700;
  color: rgba(242, 244, 247, 0.95);
  text-align: left;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.cadastro-benefits li:hover {
  border-color: rgba(255, 90, 61, 0.35);
  background: rgba(242, 244, 247, 0.09);
  transform: translateY(-1px);
}

.cadastro-benefits svg,
.cadastro-benefits i {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: #ff5a3d;
}

.cadastro-benefit-highlight {
  background: linear-gradient(135deg, rgba(255, 90, 61, 0.14), rgba(255, 30, 86, 0.1)) !important;
  border-color: rgba(255, 90, 61, 0.38) !important;
  color: #fff !important;
  box-shadow: 0 8px 24px rgba(255, 30, 86, 0.12);
}

.cadastro-benefit-highlight svg,
.cadastro-benefit-highlight i {
  color: #ff7a5c;
}

.cadastro-founder-side {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  max-width: 460px;
  margin: 0 auto 18px;
  padding: 20px 22px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 90, 61, 0.22), rgba(255, 30, 86, 0.14)),
    rgba(13, 17, 23, 0.35);
  border: 2px solid rgba(255, 90, 61, 0.45);
  box-shadow:
    0 16px 48px rgba(255, 30, 86, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  text-align: left;
}

.cadastro-founder-emoji {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

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

.cadastro-founder-badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 30, 86, 0.22);
  border: 1px solid rgba(255, 90, 61, 0.45);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffb4a8;
}

.cadastro-founder-side strong {
  display: block;
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  font-weight: 900;
  line-height: 1.2;
  color: #fff;
  letter-spacing: -0.01em;
}

.cadastro-founder-side p {
  margin: 0 !important;
  font-size: clamp(0.92rem, 1.4vw, 1.05rem) !important;
  line-height: 1.5 !important;
  color: rgba(242, 244, 247, 0.9) !important;
  text-align: left !important;
}

.cadastro-preview {
  width: 100%;
  max-width: 460px;
  margin: 6px auto 0;
  display: flex;
  justify-content: center;
}

.cadastro-preview .login-preview-frame {
  width: 100%;
  margin: 0 auto;
  transform: perspective(900px) rotateY(-2deg) rotateX(1deg) scale(1.04);
  animation: login-preview-float 7s ease-in-out infinite;
}

@media (max-height: 900px) {
  .cadastro-preview {
    display: none;
  }
}

@media (max-height: 780px) {
  body.cadastro-body .login-institutional-subtitle {
    display: none;
  }

  body.cadastro-body .login-institutional-logo {
    width: min(220px, 72%) !important;
    margin-bottom: 16px;
  }

  body.cadastro-body .login-institutional-title {
    font-size: clamp(1.55rem, 2.8vw, 2rem);
  }
}

body.cadastro-body .cadastro-panel {
  overflow: hidden;
  padding: clamp(6px, 1vh, 14px) clamp(12px, 2vw, 24px);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* Card do formulário */

body.cadastro-body .login-card.cadastro-card {
  width: min(640px, 100%) !important;
  max-width: none !important;
  max-height: calc(100dvh - 20px);
  padding: 14px 26px 12px !important;
  display: flex;
  flex-direction: column;
}

.cadastro-card-header {
  text-align: center;
  margin-bottom: 0;
}

.cadastro-logo-mobile {
  display: none !important;
}

body.cadastro-body .cadastro-card > p,
body.cadastro-body .cadastro-card-lead {
  margin: 0 0 10px !important;
  text-align: center;
  font-size: 0.82rem !important;
  line-height: 1.35 !important;
  color: var(--login-brand-muted) !important;
}

body.cadastro-body .cadastro-card .login-card-title {
  margin: 0 0 2px;
  font-size: 1.35rem;
}

@media (max-height: 860px) {
  body.cadastro-body .cadastro-card-lead {
    display: none;
  }
}

/* Inputs compactos — exceto checkbox */

body.cadastro-body .login-card input:not([type="checkbox"]) {
  height: 42px !important;
  padding: 0 12px 0 40px !important;
  border-radius: 11px !important;
  font-size: 0.88rem !important;
}

body.cadastro-body .cadastro-field .login-label {
  margin-bottom: 4px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

/* Grid do formulário — 6 colunas para pares + trio na última linha */

.cadastro-form-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0 10px;
}

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

.cadastro-form-grid > .cadastro-field:not(.cadastro-field--full) {
  grid-column: span 3;
}

.cadastro-form-row3 {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 10px;
}

.cadastro-form-row3 > .cadastro-field {
  grid-column: auto;
  min-width: 0;
}

body.cadastro-body .cadastro-form-row3 .cadastro-field {
  margin-bottom: 6px;
}

/* Select premium */

.cadastro-select-wrap .login-input-icon {
  z-index: 2;
  left: 14px;
  width: 16px;
  height: 16px;
}

body.cadastro-body .cadastro-select,
body.cadastro-body .cadastro-card select.cadastro-select {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 42px !important;
  margin: 0 !important;
  padding: 0 28px 0 38px !important;
  border: 1px solid rgba(13, 17, 23, 0.09) !important;
  border-radius: 11px !important;
  background: rgba(242, 244, 247, 0.55) !important;
  color: var(--login-brand-dark) !important;
  font-size: 0.9rem;
  font-weight: 500;
  outline: none;
  appearance: none;
  cursor: pointer;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

body.cadastro-body .cadastro-select:hover {
  border-color: rgba(255, 90, 61, 0.28) !important;
  background: rgba(255, 255, 255, 0.9) !important;
}

body.cadastro-body .cadastro-select:focus {
  border-color: rgba(255, 30, 86, 0.5) !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(255, 30, 86, 0.12) !important;
  transform: none;
}

.cadastro-select-wrap::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid rgba(107, 114, 128, 0.8);
  border-bottom: 2px solid rgba(107, 114, 128, 0.8);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
  z-index: 2;
}

/* Checkbox termos — reset dos estilos globais de input */

.cadastro-terms {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(13, 17, 23, 0.07);
  background: rgba(242, 244, 247, 0.4);
  font-size: 0.82rem;
  line-height: 1.45;
  color: rgba(13, 17, 23, 0.72);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.cadastro-terms:hover {
  border-color: rgba(255, 90, 61, 0.2);
  background: rgba(255, 255, 255, 0.85);
}

.cadastro-terms span {
  flex: 1;
  min-width: 0;
}

body.cadastro-body .cadastro-terms input[type="checkbox"] {
  appearance: auto !important;
  -webkit-appearance: checkbox !important;
  position: static !important;
  z-index: auto !important;
  width: 16px !important;
  height: 16px !important;
  min-height: 16px !important;
  max-height: 16px !important;
  margin: 2px 0 0 !important;
  padding: 0 !important;
  border: 1px solid rgba(13, 17, 23, 0.25) !important;
  border-radius: 3px !important;
  background: #fff !important;
  box-shadow: none !important;
  transform: none !important;
  flex-shrink: 0;
  accent-color: #ff1e56;
  cursor: pointer;
}

body.cadastro-body .cadastro-terms input[type="checkbox"]:focus {
  box-shadow: 0 0 0 2px rgba(255, 30, 86, 0.2) !important;
  transform: none !important;
}

.cadastro-terms a {
  color: #ff6a00;
  font-weight: 700;
  text-decoration: none;
}

.cadastro-terms a:hover {
  text-decoration: underline;
}

.cadastro-terms-link {
  cursor: pointer;
}

/* Rodapé do formulário: termos + botão */

.cadastro-form-footer {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin-top: 4px;
}

.cadastro-submit-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

body.cadastro-body .login-card button#botaoCadastro.login-panel-btn {
  margin: 0 !important;
  min-height: 42px !important;
  height: auto !important;
}

body.cadastro-body .login-card button#botaoCadastro.login-panel-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.cadastro-submit-note {
  margin: 0;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 106, 0, 0.8);
}

/* Mensagens */

body.cadastro-body #mensagemCadastro {
  min-height: 0;
  margin-top: 8px;
  padding: 0;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  color: var(--login-brand-muted);
}

body.cadastro-body #mensagemCadastro.mensagem-form.sucesso {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.22);
  color: #166534;
}

body.cadastro-body #mensagemCadastro.mensagem-form.erro {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(255, 90, 61, 0.07);
  border: 1px solid rgba(255, 90, 61, 0.18);
  color: rgba(13, 17, 23, 0.78);
}

/* Rodapé do card: links + trust */

.cadastro-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(13, 17, 23, 0.07);
}

body.cadastro-body .login-links.cadastro-links {
  display: flex !important;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0 !important;
  font-size: 0.84rem;
  color: var(--login-brand-muted);
}

body.cadastro-body .cadastro-links-lead {
  font-weight: 600;
  color: var(--login-brand-muted);
}

body.cadastro-body .cadastro-login-link {
  margin: 0;
}

.cadastro-footer-trust {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(13, 17, 23, 0.5);
  flex-shrink: 0;
}

.cadastro-footer-trust svg,
.cadastro-footer-trust i {
  width: 14px;
  height: 14px;
  color: #22c55e;
}

/* Painel sessão ativa */

body.cadastro-body .cadastro-sessao-ativa {
  margin: 0 0 12px;
  padding: 14px 12px;
  border-radius: 14px;
  background: rgba(255, 90, 61, 0.06);
  border: 1px solid rgba(255, 30, 86, 0.16);
  text-align: center;
}

/* Campos ocultos (usuário já logado) */

body.cadastro-body #senhaCadastro[hidden],
body.cadastro-body #confirmarSenhaCadastro[hidden] {
  display: none !important;
}

body.cadastro-body .cadastro-field:has(#senhaCadastro[hidden]),
body.cadastro-body .cadastro-field:has(#confirmarSenhaCadastro[hidden]) {
  display: none;
}

/* ---- Responsive ---- */

@media (max-width: 1100px) {
  body.cadastro-body .login-page.cadastro-page {
    grid-template-columns: 40% 60%;
  }

  body.cadastro-body .login-card.cadastro-card {
    width: min(580px, 100%) !important;
    padding: 16px 22px 12px !important;
  }
}

@media (max-width: 960px) {
  body.cadastro-body {
    overflow: auto;
    height: auto;
  }

  body.cadastro-body .login-page.cadastro-page {
    grid-template-columns: 1fr !important;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  body.cadastro-body .cadastro-institutional {
    display: none;
  }

  .cadastro-logo-mobile {
    display: block !important;
    margin: 0 auto 8px !important;
    width: auto !important;
    height: 48px !important;
    max-width: 140px !important;
  }

  body.cadastro-body .cadastro-panel {
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible;
    align-items: flex-start;
    padding-top: 20px;
    padding-bottom: 24px;
  }

  body.cadastro-body .login-card.cadastro-card {
    width: min(560px, 100%) !important;
    max-height: none;
  }

  .cadastro-card-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .cadastro-form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .cadastro-form-grid > .cadastro-field:not(.cadastro-field--full) {
    grid-column: auto;
  }

  .cadastro-form-row3 {
    grid-template-columns: 1fr;
  }

  body.cadastro-body .login-card.cadastro-card {
    padding: 18px 18px 14px !important;
  }

  body.cadastro-body .cadastro-card .login-card-title {
    font-size: 1.28rem;
  }

  .cadastro-benefits {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  body.cadastro-body .cadastro-panel {
    padding: 14px 12px 20px;
  }

  .cadastro-terms {
    font-size: 0.74rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cadastro-benefits li,
  body.cadastro-body .cadastro-select,
  body.cadastro-body .login-card input:not([type="checkbox"]) {
    transition: none;
  }
}
