* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  min-height: 100vh;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: #f0f2f5;
  color: #1e293b;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container centralizado com 585px de largura máxima */
.gov-container {
  width: 100%;
  max-width: 585px;
  background-color: #f0f2f5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.04);
}

/* ==========================================================
   CABEÇALHO GOV.BR
   ========================================================== */
.gov-header {
  height: 54px;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid #e5e7eb;
}

.gov-logo-box {
  display: flex;
  align-items: center;
}

.gov-logo-img {
  height: 25px;
  width: auto;
  display: block;
}

/* ==========================================================
   CONTEÚDO PRINCIPAL (CARD CPF)
   ========================================================== */
.cpf-main-content {
  flex: 1;
  padding: 24px 16px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.cpf-card {
  width: 100%;
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  padding: 32px 26px 26px;
  text-align: center;
}

.cpf-logo-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 18px;
}

.cpf-logo-img {
  width: 145px;
  max-width: 100%;
  height: auto;
  display: block;
}

.cpf-instruction {
  color: #4b5563;
  font-size: 13.5px;
  line-height: 1.45;
  margin-bottom: 22px;
  padding: 0 8px;
  font-weight: 400;
}

/* Formulário */
.cpf-form {
  text-align: left;
  margin-bottom: 18px;
}

.cpf-field-group {
  margin-bottom: 16px;
}

.cpf-label {
  display: block;
  color: #0b1b33;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.cpf-input {
  width: 100%;
  height: 48px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-family: inherit;
  font-size: 16px;
  color: #0f172a;
  padding: 0 14px;
  outline: none;
  background-color: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cpf-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.cpf-input:focus {
  border-color: #1351b4;
  box-shadow: 0 0 0 3px rgba(19, 81, 180, 0.15);
}

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

.cpf-error-msg {
  display: block;
  color: #ef4444;
  font-size: 12px;
  font-weight: 600;
  margin-top: 6px;
}

.cpf-btn-continuar {
  width: 100%;
  height: 48px;
  background-color: #1351b4;
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(19, 81, 180, 0.32);
  transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.cpf-btn-continuar:hover {
  background-color: #0f4094;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(19, 81, 180, 0.42);
}

.cpf-btn-continuar:active {
  transform: translateY(0);
}

.cpf-btn-continuar:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  transform: none;
}

/* Spinner no botão durante consulta */
.btn-spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.8s linear infinite;
  margin-left: 8px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================
   BOX INFORMATIVO AZUL
   ========================================================== */
.cpf-info-box {
  background-color: #cfe2ff;
  border: 1px solid #9ec5fe;
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  margin-bottom: 22px;
}

.info-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: #1351b4;
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-icon svg {
  width: 22px;
  height: 22px;
}

.info-text {
  color: #0b1b33;
  font-size: 12.5px;
  line-height: 1.45;
  margin: 0;
  font-weight: 500;
}

/* ==========================================================
   SELOS DE SEGURANÇA
   ========================================================== */
.cpf-security-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding-top: 4px;
}

.badge-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  font-size: 12.5px;
  font-weight: 500;
}

.badge-icon {
  width: 15px;
  height: 15px;
  stroke: #64748b;
}

/* ==========================================================
   RODAPÉ GOV.BR
   ========================================================== */
.gov-footer {
  background-color: #0a2542;
  padding: 22px 16px 20px;
  text-align: center;
  margin-top: auto;
}

.gov-footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.gov-footer-logo img {
  height: 22px;
  width: auto;
  display: block;
}

.gov-footer-text {
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.4;
  margin: 0;
  font-weight: 400;
}

/* ==========================================================
   RESPONSIVIDADE (MOBILE)
   ========================================================== */
@media (max-width: 600px) {
  .gov-container {
    max-width: 100%;
    box-shadow: none;
  }
  .cpf-main-content {
    padding: 16px 12px 28px;
  }
  .cpf-card {
    padding: 24px 16px 20px;
    border-radius: 14px;
  }
  .cpf-security-badges {
    gap: 14px;
    font-size: 11.5px;
  }
}
