/*
 * Telas de cadastro do portal público — fornecedor (/empresa/cadastro) e
 * órgão público (/orgao/cadastro). As duas usam o mesmo hero, o mesmo cartão
 * de formulário e os mesmos campos `cad-*`; o que muda é só o conteúdo.
 */
/* ── Cadastro: hero mini ──────────────────────────────────── */
.cad-hero {
  background: var(--navy);
  padding: 100px 0 56px;
  position: relative;
  overflow: hidden;
}
.cad-hero::before {
  content: '';
  position: absolute;
  width: 560px; height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(43,197,197,.14) 0%, transparent 65%);
  top: -140px; right: -100px;
  pointer-events: none;
}
.cad-hero::after {
  content: '';
  position: absolute;
  width: 380px; height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59,181,75,.10) 0%, transparent 65%);
  bottom: -120px; left: 40px;
  pointer-events: none;
}

/* ── Painel lateral de steps no hero ───────────────────────── */
.cad-steps-preview {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  z-index: 1;
}
.cad-step-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 14px 18px;
  transition: background .2s;
}
.cad-step-item--active {
  background: rgba(43,197,197,.18);
  border-color: rgba(43,197,197,.35);
}
.cad-step-ico {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  color: var(--teal);
  flex-shrink: 0;
}
.cad-step-item--active .cad-step-ico {
  background: var(--teal);
  color: #fff;
}
.cad-step-title {
  font-family: var(--fh);
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
}
.cad-step-desc {
  font-size: 12px;
  color: rgba(255,255,255,.55);
  margin-top: 1px;
}

/* ── Card do formulário ─────────────────────────────────────── */
.cad-form-card {
  background: #fff;
  border: 1.5px solid var(--bdr);
  border-radius: 20px;
  padding: 40px 36px 32px;
  box-shadow: 0 8px 40px rgba(29,52,97,.07);
}
.cad-form-header { margin-bottom: 28px; }
.cad-form-step-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(43,197,197,.12);
  color: var(--teal);
  font-family: var(--fh);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
}
.cad-form-title {
  font-family: var(--fh);
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 6px;
}
.cad-form-sub {
  font-size: 14px;
  color: var(--txt-muted);
  margin: 0;
}

/* ── Labels de seção interna ────────────────────────────────── */
.cad-section-label {
  font-family: var(--fh);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--txt-muted);
  display: flex;
  align-items: center;
  gap: 7px;
  padding-bottom: 10px;
  border-bottom: 1.5px solid var(--bdr);
  margin-bottom: 16px;
}

/* ── Inputs ─────────────────────────────────────────────────── */
.cad-label {
  display: block;
  font-family: var(--fh);
  font-size: 13px;
  font-weight: 600;
  color: var(--txt);
  margin-bottom: 6px;
}
.cad-req { color: #e53e3e; }
.cad-hint {
  font-size: 11.5px;
  color: var(--txt-light);
  margin-top: 4px;
}
.cad-input, .cad-select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--bdr);
  border-radius: 10px;
  font-family: var(--fb);
  font-size: 14px;
  color: var(--txt);
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
.cad-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath fill='%235A6478' d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.cad-input:focus, .cad-select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(43,197,197,.15);
}
.cad-input::placeholder { color: var(--txt-light); }

/* Input com botão de olho */
.cad-input-group { position: relative; }
.cad-input-group .cad-input { padding-right: 44px; }

/* ── Consulta de CNPJ ───────────────────────────────────────── */
.cad-cnpj-spin {
  position: absolute;
  right: 14px; top: 50%;
  width: 16px; height: 16px;
  margin-top: -8px;
  border: 2px solid var(--bdr);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: cad-spin .7s linear infinite;
}
@keyframes cad-spin { to { transform: rotate(360deg); } }

#cnpjHint.is-erro    { color: #c53030; }
#cnpjHint.is-ok      { color: #2a8c38; }
#cnpjHint.is-alerta  { color: #8a5900; }

.cad-endereco-tag {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: none;
  color: var(--teal);
}

/* Realce breve nos campos que a consulta preencheu */
.cad-input.cad-preenchido {
  animation: cad-flash 1.1s ease-out;
}
@keyframes cad-flash {
  from { background: rgba(43,197,197,.16); border-color: var(--teal); }
  to   { background: #fff; }
}
.cad-eye {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  color: var(--txt-light);
  cursor: pointer; padding: 4px;
  font-size: 16px;
  transition: color .2s;
}
.cad-eye:hover { color: var(--navy); }

/* Barra de força da senha */
.cad-password-strength {
  height: 3px;
  background: var(--bdr);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}
.cad-password-fill {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transition: width .3s, background .3s;
}

/* ── Termos ─────────────────────────────────────────────────── */
.cad-terms {
  padding: 14px 16px;
  background: var(--bg-alt);
  border-radius: 10px;
  border: 1.5px solid var(--bdr);
}
.cad-check-label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--txt-muted);
  cursor: pointer;
}
.cad-check {
  width: 16px; height: 16px;
  flex-shrink: 0;
  margin-top: 1px;
  accent-color: var(--teal);
}
.cad-link {
  color: var(--teal);
  text-decoration: none;
  font-weight: 600;
}
.cad-link:hover { text-decoration: underline; }

/* ── Botão principal ────────────────────────────────────────── */
.cad-submit {
  width: 100%;
  height: 52px;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: var(--fh);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, transform .15s, box-shadow .2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cad-submit:hover {
  background: var(--teal);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(43,197,197,.3);
}
.cad-submit:active { transform: translateY(0); }

/* ── Rodapé do card ─────────────────────────────────────────── */
.cad-login-link {
  text-align: center;
  margin-top: 20px;
  font-size: 13.5px;
  color: var(--txt-muted);
}

/* ── Cards laterais ─────────────────────────────────────────── */
.cad-side-card {
  background: #fff;
  border: 1.5px solid var(--bdr);
  border-radius: 16px;
  padding: 24px;
}
.cad-side-title {
  font-family: var(--fh);
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
}
.text-teal { color: var(--teal); }
.cad-side-sub {
  font-size: 13px;
  color: var(--txt-muted);
  margin-bottom: 14px;
}
.cad-side-link {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
  margin-top: 14px;
}
.cad-side-link:hover { text-decoration: underline; }

/* ── Timeline lateral ───────────────────────────────────────── */
.cad-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.cad-tl-item {
  display: flex;
  gap: 14px;
  padding-bottom: 18px;
  position: relative;
}
.cad-tl-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 9px; top: 22px;
  width: 2px;
  height: calc(100% - 14px);
  background: var(--bdr);
}
.cad-tl-dot {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--bdr);
  background: #fff;
  flex-shrink: 0;
  margin-top: 1px;
  position: relative;
  z-index: 1;
}
.cad-tl-active .cad-tl-dot {
  border-color: var(--teal);
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(43,197,197,.15);
}
.cad-tl-label {
  font-family: var(--fh);
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}
.cad-tl-active .cad-tl-label { color: var(--teal); }
.cad-tl-desc {
  font-size: 12.5px;
  color: var(--txt-muted);
  margin-top: 2px;
  line-height: 1.5;
}

/* ── Lista de documentos ────────────────────────────────────── */
.cad-doc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cad-doc-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--txt);
}
.cad-doc-list li i {
  font-size: 16px;
  color: var(--teal);
  flex-shrink: 0;
  margin-top: 1px;
}
.cad-doc-req {
  display: inline-block;
  background: rgba(229,62,62,.09);
  color: #c53030;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 1px 7px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}
.cad-doc-opt {
  display: inline-block;
  background: rgba(90,100,120,.09);
  color: var(--txt-muted);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 1px 7px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ── Responsivo mobile ──────────────────────────────────────── */
@media (max-width: 767px) {
  .cad-form-card { padding: 28px 20px 24px; }
  .cad-hero { padding: 90px 0 40px; }
}

/* ── Campos extras da adesão de órgão público ───────────────── */
textarea.cad-input {
  min-height: 92px;
  resize: vertical;
  line-height: 1.5;
}

/* Lista de erros devolvidos pela validação do servidor */
.cad-errors {
  background: rgba(220,53,69,.07);
  border: 1px solid rgba(220,53,69,.28);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 22px;
}
.cad-errors-title {
  font-family: var(--fh);
  font-size: 13.5px;
  font-weight: 700;
  color: #b02a37;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cad-errors ul {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  color: #842029;
}
.cad-errors li + li { margin-top: 3px; }

/* Selo de "adesão gratuita" no painel lateral */
.cad-free-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(59,181,75,.12);
  border: 1px solid rgba(59,181,75,.3);
  color: #2f7d3c;
  border-radius: 999px;
  padding: 6px 14px;
  font-family: var(--fh);
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 14px;
}
