
/* =========================================================
   GABINETE DIGITAL — CADASTRO DE FAMÍLIA + GPS NO ENDEREÇO (V10)
   ========================================================= */

/* 1) Correção de sobreposição: o mapa não pode passar por cima dos modais. */
.territory-map-canvas,#territoryMap{position:relative;z-index:0;isolation:isolate}
.modal{z-index:1200}

/* 2) Bloco de localização dentro da etapa de endereço. */
.geo-confirm-box{padding:14px;border:1px solid var(--border);border-left:4px solid var(--blue);border-radius:14px;background:var(--soft)}
.geo-confirm-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;margin-bottom:9px}
.geo-confirm-head strong{color:var(--navy-dark);font-size:12px}
.geo-optional-badge{display:inline-flex;margin-left:6px;padding:3px 7px;border-radius:999px;background:#e5f3ff;color:#075fa8;font-size:8px;font-weight:900;vertical-align:middle}
.geo-confirm-head p{margin:3px 0 0;color:var(--muted);font-size:10px;line-height:1.5;max-width:640px}
.geo-confirm-state{display:inline-flex;align-items:center;gap:6px;padding:6px 11px;border-radius:999px;font-size:9px;font-weight:900;white-space:nowrap}
.geo-confirm-state.ok{color:#067647;background:#dcfae6}
.geo-confirm-state.pending{color:#7a4d00;background:#fff4d6}
.geo-confirm-state.busy{color:#075fa8;background:#e5f3ff}
.geo-confirm-state.fail{color:#b42318;background:#fef3f2}
.geo-confirm-actions{display:flex;flex-wrap:wrap;gap:8px}
.geo-confirm-actions [hidden]{display:none!important}
.geo-confirm-actions .btn{min-height:40px}
.geo-confirm-detail{margin-top:9px;color:var(--muted);font-size:10px;line-height:1.55}
.geo-confirm-detail b{color:var(--navy-dark)}

/* 3) Modal do cadastro de residência/família. */
.household-modal-box{width:min(1260px,100%)}
.household-shared-grid{padding:15px;border:1px solid var(--border);border-radius:14px;background:var(--soft)}
.household-address-grid{align-items:start}
.household-region-compat{display:none!important}
.household-cep-primary{padding:12px;border:1px solid #98d5f8;border-radius:12px;background:#f4fbff}
.household-cep-primary label{color:#075fa8}
.household-cep-primary input{border-color:#7cc8f3;background:#fff;font-size:14px;font-weight:800;letter-spacing:.04em}
.household-cep-primary .small{display:block;margin-top:6px}
.household-postal-feedback .address-lookup-status{min-height:52px;margin-top:0;display:flex;align-items:center;gap:6px;flex-wrap:wrap;font-size:10px}
.household-postal-feedback .address-lookup-status strong{color:inherit}
.household-postal-feedback .address-lookup-status span{color:inherit}
.household-residents-head{margin:18px 0 10px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.household-residents-head>div{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.household-residents-head strong{color:var(--navy-dark);font-size:12px}
.household-residents-head span{color:var(--muted);font-size:10px}
.household-residents{display:grid;gap:11px}
.household-resident-card{position:relative;padding:14px;border:1px solid var(--border);border-left:4px solid var(--blue);border-radius:14px;background:#fff}
.household-resident-title{margin-bottom:11px;display:flex;align-items:center;justify-content:space-between;gap:10px}
.household-resident-title strong{color:var(--navy-dark);font-size:12px}
.household-age-info{display:inline-flex;padding:5px 8px;border-radius:999px;background:#eef6ff;color:var(--blue);font-size:8px;font-weight:900}
.household-resident-remove{min-height:31px!important;padding:5px 8px!important}
.household-resident-photo-field{margin-top:2px}
.household-resident-photo-control{padding:11px;background:#f8fbfd}
.household-resident-photo-control .person-photo-preview{width:72px;height:72px;border-radius:14px}
.household-resident-photo-control .person-photo-preview svg{width:28px;height:28px}
.household-status{min-height:20px;margin-top:10px;font-size:10px;font-weight:800}
.household-status.loading{color:var(--blue)}
.household-status.success{color:var(--green)}
.household-status.warning{color:#9a6200}
.household-status.error{color:var(--red)}
.household-mini-badge{display:inline-flex;padding:3px 6px;border-radius:999px;background:#eef6ff;color:#075fa8;font-size:7px;font-weight:900}
.household-mini-badge.responsible{color:#9a6200;background:#fff4d6}
#householdRegistryModal .modal-body{max-height:78vh;overflow:auto}

@media(max-width:900px){
  .household-resident-card .grid>div{grid-column:span 12!important}
  .household-address-grid>div:not(.household-region-compat){grid-column:span 12!important}
  .geo-confirm-actions .btn{flex:1 1 100%}
}
@media(max-width:620px){
  .household-residents-head{align-items:flex-start;flex-direction:column}
  .household-residents-head .btn{width:100%}
}
/* =========================================================
   v25: WIZARD DE ETAPAS — RESIDÊNCIA/FAMÍLIA
   ========================================================= */

.hh-wizard-bar {
  margin-bottom: 18px;
}
.hh-wizard-track {
  height: 4px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 14px;
}
.hh-wizard-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--green));
  border-radius: 99px;
  transition: width 0.35s ease;
  width: 0%;
}
.hh-wizard-stepper {
  display: flex;
  justify-content: space-between;
  gap: 4px;
}
.hh-step-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  padding: 4px 6px;
  border-radius: 8px;
  transition: all 0.2s;
  min-width: 55px;
  text-align: center;
}
.hh-step-dot span {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  background: var(--border);
  color: var(--muted);
  transition: all 0.2s;
}
.hh-step-dot.active { color: var(--blue); }
.hh-step-dot.active span { background: var(--blue); color: #fff; }
.hh-step-dot.done { color: var(--green); }
.hh-step-dot.done span { background: var(--green); color: #fff; }
.hh-step-dot:hover { background: rgba(0,0,0,0.03); }

.hh-step-container {
  animation: hhFadeIn 0.25s ease;
}
.hh-step-container.hidden { display: none !important; }
@keyframes hhFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.hh-wizard-actions {
  flex: none;
  z-index: 4;
  align-items: center;
  margin: 0 !important;
  padding: 13px 20px;
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,.97);
  box-shadow: 0 -10px 18px rgba(3,25,59,.06);
  backdrop-filter: blur(10px);
}
.hh-wizard-navigation {
  display: flex;
  align-items: center;
  gap: 10px;
}
#householdRegistryModal .hh-wizard-actions #saveHouseholdRegistry {
  display: inline-flex !important;
}
.hh-step-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.hh-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 800;
  flex-shrink: 0;
}
.hh-step-header h3 {
  margin: 0;
  font-size: 17px;
  color: var(--navy-dark);
}
.hh-step-header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

@media(max-width:620px){
  .hh-wizard-stepper { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .hh-step-dot { min-width: 45px; font-size: 9px; padding: 3px 5px; flex-shrink: 0; }
  .hh-step-dot span { width: 22px; height: 22px; font-size: 10px; }
  .hh-step-header h3 { font-size: 15px; }
  .hh-step-num { width: 28px; height: 28px; font-size: 13px; }
  .hh-wizard-actions { align-items: stretch; padding: 11px 14px; }
  .hh-wizard-actions .btn { flex: 1 1 auto; justify-content: center; }
  .hh-wizard-navigation { flex: 1 1 100%; }
  .hh-wizard-navigation .btn { flex: 1; }
}

/* =========================================================
   v26: RESUMO DO CADASTRO (ETAPA 4)
   ========================================================= */
.hh-summary {
  margin-bottom: 14px;
}
.hh-summary-grid {
  display: grid;
  gap: 14px;
}
.hh-summary-block {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fafbfc;
}
.hh-summary-block h4 {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--navy-dark);
}
.hh-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  font-size: 13px;
}
.hh-summary-row:last-child { border-bottom: none; }
.hh-summary-row span { color: var(--muted); }
.hh-summary-row strong { color: var(--navy-dark); font-weight: 650; }
.hh-summary-empty {
  color: var(--muted);
  font-size: 12px;
  font-style: italic;
  margin: 0;
  padding: 8px 0;
}
