/* ===== CADASTRO ===== */

.cadastro-page-publica {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 60vh;
  padding: 3rem 1rem 4rem;
  background: var(--light-gray, #f4f6f9);
}

.cadastro-card {
  width: 100%;
  max-width: 620px;
  background: var(--white, #ffffff);
  border-radius: 16px;
  padding: 40px 44px;
  border: 1px solid var(--border, #e2e8f0);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.3s ease;
}

.cadastro-card:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.10);
}

/* ===== CABEÇALHO ===== */
.cad-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 6px;
}

.cad-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

/* ===== ALERTAS ===== */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 8px;
  border: 1px solid transparent;
}

.alert-success {
  background: #f0fdf4;
  border-color: #86efac;
  color: #166534;
}

.alert-error,
.alert-danger {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
}

.alert-warning {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #92400e;
}

.alert-info {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1e40af;
}

/* ===== FORMULÁRIO ===== */
.cad-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cad-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
}

.field-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.field-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  pointer-events: none;
}

.field-input {
  width: 100%;
  padding: 11px 38px 11px 38px;
  border: 1.5px solid var(--primary, #00b4b4);
  border-radius: 8px;
  font-size: 14px;
  color: var(--dark);
  background: var(--white);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  appearance: none;
}

.field-input::placeholder { color: #b0bac6; }

.field-input:focus {
  border-color: var(--primary-dark, #008f8f);
  box-shadow: 0 0 0 3px rgba(0,180,180,.15);
}

.field-input.error { border-color: #ef4444; }
.field-input.error:focus { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.12); }

/* Select customizado */
.select-wrap { position: relative; }

.field-select {
  cursor: pointer;
  padding-right: 36px;
}

.field-select:disabled {
  background: #f0f2f5;
  color: #b0bac6;
  cursor: not-allowed;
}

.select-chevron {
  position: absolute;
  right: 12px;
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
}

/* Toggle senha */
.toggle-senha {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  padding: 4px;
  transition: color .2s;
}

.toggle-senha:hover { color: var(--primary); }

/* Indicador de força da senha */
.senha-strength {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 16px;
}

.strength-bar {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.strength-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 4px;
  transition: width .3s, background .3s;
}

.strength-fill.fraca  { width: 33%; background: #ef4444; }
.strength-fill.media  { width: 66%; background: #f59e0b; }
.strength-fill.forte  { width: 100%; background: #22c55e; }

.strength-label {
  font-size: 11px;
  font-weight: 600;
  min-width: 44px;
  color: var(--text-muted);
}

.strength-label.fraca  { color: #ef4444; }
.strength-label.media  { color: #f59e0b; }
.strength-label.forte  { color: #22c55e; }

/* Erros */
.field-error {
  font-size: 12px;
  color: #ef4444;
  min-height: 16px;
}

/* Checkbox de termos */
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.checkbox-input { display: none; }

.checkbox-custom {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--primary, #00b4b4);
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 1px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .2s, background .2s;
}

.checkbox-input:checked + .checkbox-custom {
  background: var(--primary);
  border-color: var(--primary);
}

.checkbox-input:checked + .checkbox-custom::after {
  content: '';
  display: block;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  transform: rotate(-45deg) translate(1px, -1px);
}

.checkbox-text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.link-termos {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.link-termos:hover { text-decoration: underline; }

/* Botão cadastrar */
.btn-cadastrar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, transform .1s;
  margin-top: 4px;
}

.btn-cadastrar:hover { background: #009999; }
.btn-cadastrar:active { transform: scale(.98); }

/* Link já tem conta */
.cad-login-link {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.cad-login-link a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  margin-left: 4px;
}

.cad-login-link a:hover { text-decoration: underline; }

/* ===== RESPONSIVO ===== */
@media (max-width: 680px) {
  .cadastro-card {
    padding: 28px 20px;
  }

  .cad-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .cadastro-page-publica {
    padding: 2rem 0.75rem 3rem;
  }
}
