/* ============================================================
   TiParaElas — Cadastro
   ============================================================ */

.cadastro-wrap {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 56px 24px 72px;
  background: var(--grad-soft);
  position: relative;
  overflow: hidden;
}

.cadastro-wrap::before,
.cadastro-wrap::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}
.cadastro-wrap::before {
  width: 500px; height: 500px;
  background: radial-gradient(circle at 30% 30%, rgba(184,117,95,.25), transparent 70%);
  top: -180px; right: -140px;
}
.cadastro-wrap::after {
  width: 400px; height: 400px;
  background: radial-gradient(circle at 70% 60%, rgba(92,74,107,.2), transparent 70%);
  bottom: -160px; left: -100px;
}

/* Card */
.cadastro-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 620px;
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 44px 44px 40px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--c-line);
}

/* Topo */
.cadastro-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  text-align: center;
}
.cadastro-brand .brand-mark {
  width: 46px;
  height: 46px;
}
.cadastro-brand .brand-mark svg {
  width: 100%;
  height: 100%;
}
.cadastro-brand .brand-text {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cadastro-heading {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--c-ink);
  text-align: center;
  margin-bottom: 4px;
}
.cadastro-sub {
  font-size: 14.5px;
  color: var(--c-muted);
  text-align: center;
  margin-bottom: 28px;
}

/* Formulário */
.cadastro-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Grid de 2 colunas */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-row.cols-1 {
  grid-template-columns: 1fr;
}

/* Campo */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--c-ink-2);
}
.form-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.form-input-icon {
  position: absolute;
  left: 13px;
  color: var(--c-muted);
  display: flex;
  align-items: center;
  pointer-events: none;
}
.form-input,
.form-select {
  width: 100%;
  padding: 11px 13px 11px 40px;
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--c-ink);
  background: var(--c-bg);
  border: 1.5px solid var(--c-line);
  border-radius: var(--radius);
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
  appearance: none;
  -webkit-appearance: none;
}
.form-input::placeholder { color: var(--c-muted); }
.form-input:focus,
.form-select:focus {
  background: #fff;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(92,74,107,.12);
}
.form-input:disabled,
.form-select:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* Select com seta */
.form-select-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.form-select-wrap .form-input-icon {
  z-index: 1;
}
.select-arrow {
  position: absolute;
  right: 13px;
  color: var(--c-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
}
.form-select {
  padding-right: 36px;
  cursor: pointer;
}

/* Campo senha com toggle */
.form-input.has-suffix { padding-right: 46px; }
.form-input-suffix {
  position: absolute;
  right: 10px;
}
.toggle-senha {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--c-muted);
  background: transparent;
  transition: color .2s, background .2s;
}
.toggle-senha:hover {
  color: var(--c-primary);
  background: var(--c-primary-50);
}

/* Indicador de força de senha */
.senha-strength {
  display: flex;
  gap: 5px;
  margin-top: 6px;
}
.strength-bar {
  flex: 1;
  height: 3px;
  border-radius: 999px;
  background: var(--c-line);
  transition: background .3s;
}
.strength-bar.active-weak   { background: #EF4444; }
.strength-bar.active-medium { background: var(--c-accent-2); }
.strength-bar.active-strong { background: #22C55E; }

.strength-label {
  font-size: 12px;
  color: var(--c-muted);
  margin-top: 4px;
}

/* Botão enviar */
.btn-cadastro {
  width: 100%;
  padding: 13px 20px;
  background: var(--c-primary);
  color: #fff;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 16px -8px rgba(92,74,107,.5), 0 2px 6px -2px rgba(31,27,45,.15);
  transition: background .2s, transform .15s, box-shadow .2s;
  margin-top: 6px;
}
.btn-cadastro:hover {
  background: var(--c-primary-700);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -10px rgba(92,74,107,.55), 0 4px 10px -4px rgba(31,27,45,.2);
}
.btn-cadastro:active { transform: translateY(0); }

/* Termos */
.cadastro-termos {
  font-size: 13px;
  color: var(--c-muted);
  text-align: center;
  line-height: 1.55;
}
.cadastro-termos a {
  color: var(--c-primary);
  font-weight: 600;
  transition: color .15s;
}
.cadastro-termos a:hover { color: var(--c-accent); text-decoration: underline; }

/* Rodapé do card */
.cadastro-card-footer {
  margin-top: 18px;
  text-align: center;
  font-size: 14px;
  color: var(--c-muted);
}
.cadastro-card-footer a {
  font-weight: 700;
  color: var(--c-primary);
  transition: color .15s;
}
.cadastro-card-footer a:hover { color: var(--c-accent); text-decoration: underline; }

/* Erro de campo */
.form-error {
  font-size: 12.5px;
  color: #b00020;
  margin-top: 2px;
}

/* Alerta de formulário */
.login-alert {
  padding: .75rem 1rem;
  border-radius: 8px;
  background: #ffeaea;
  color: #b00020;
  font-size: .9rem;
  margin-bottom: 1rem;
  border-left: 3px solid #EF4444;
}
.login-alert p { margin: 0; }

/* Responsivo */
@media (max-width: 640px) {
  .cadastro-wrap { padding: 32px 16px 56px; }
  .cadastro-card { padding: 36px 22px 32px; border-radius: var(--radius-lg); }
  .form-row { grid-template-columns: 1fr; }
}
