/**
 * MAPPA Imobiliário — Simulador Habitacional Completo
 * Estilos modulares, responsivos e otimizados para alta conversão.
 */

:root {
  --sim-cor-primaria: #ef4444;
  --sim-cor-primaria-hover: #dc2626;
  --sim-cor-secundaria: #0f172a;
  --sim-cor-verde: #16a34a;
  --sim-cor-verde-hover: #15803d;
  --sim-fundo: #f8fafc;
  --sim-card-bg: #ffffff;
  --sim-borda: #e2e8f0;
  --sim-texto: #0f172a;
  --sim-texto-mutado: #64748b;
  --sim-raio: 16px;
  --sim-sombra: 0 4px 20px rgba(15, 23, 42, 0.06);
}

body.sim-body * {
  box-sizing: border-box;
}

body.sim-body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--sim-fundo);
  color: var(--sim-texto);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   1. CABEÇALHO DO SIMULADOR
   ========================================================================== */
.sim-header {
  background: #ffffff;
  border-bottom: 1px solid var(--sim-borda);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.sim-header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sim-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.sim-logo-icon {
  flex-shrink: 0;
}

.sim-logo-text {
  display: flex;
  flex-direction: column;
}

.sim-logo-title {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #0f172a;
  line-height: 1;
}

.sim-logo-sub {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--sim-cor-primaria);
  margin-top: 2px;
}

.sim-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-voltar-mapa {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #f1f5f9;
  color: #334155;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease;
}

.btn-voltar-mapa:hover {
  background: #e2e8f0;
}

.btn-whats-topo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--sim-cor-verde);
  color: #ffffff;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.25);
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn-whats-topo:hover {
  background: var(--sim-cor-verde-hover);
  transform: translateY(-1px);
}

/* ==========================================================================
   2. CONTAINER PRINCIPAL E TOPOS
   ========================================================================== */
.sim-main {
  padding: 24px 16px 48px;
}

.sim-container {
  max-width: 1240px;
  margin: 0 auto;
}

/* Card de Resumo do Imóvel no Topo */
.card-imovel-resumo {
  background: #ffffff;
  border: 1px solid var(--sim-borda);
  border-radius: var(--sim-raio);
  padding: 16px 20px;
  margin-bottom: 24px;
  box-shadow: var(--sim-sombra);
}

.cir-conteudo {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.cir-foto {
  width: 84px;
  height: 84px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--sim-borda);
}

.cir-info {
  flex: 1;
  min-width: 240px;
}

.cir-linha-topo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.cir-badge-tipo {
  display: inline-block;
  padding: 2px 8px;
  background: #fef2f2;
  color: var(--sim-cor-primaria);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.cir-codigo {
  font-size: 12px;
  color: var(--sim-texto-mutado);
  font-weight: 500;
}

.cir-titulo {
  font-size: 18px;
  font-weight: 800;
  color: var(--sim-texto);
  line-height: 1.3;
  margin-bottom: 2px;
}

.cir-local {
  font-size: 14px;
  color: var(--sim-texto-mutado);
  margin-bottom: 4px;
}

.cir-detalhes {
  font-size: 13px;
  color: #334155;
  font-weight: 600;
}

.cir-preco-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  min-width: 180px;
}

.cir-preco-rotulo {
  font-size: 12px;
  color: var(--sim-texto-mutado);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cir-preco {
  font-size: 26px;
  font-weight: 800;
  color: var(--sim-cor-primaria);
  line-height: 1.1;
  margin-bottom: 6px;
}

.cir-link-voltar {
  font-size: 13px;
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

.cir-link-voltar:hover {
  text-decoration: underline;
}

/* Topo Genérico (quando acessado sem parâmetros) */
.sim-topo-generico {
  text-align: center;
  margin-bottom: 32px;
  padding: 10px 0;
}

.stg-badge {
  display: inline-block;
  padding: 6px 14px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
}

.stg-titulo {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 800;
  color: var(--sim-texto);
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 8px;
}

.stg-sub {
  font-size: 16px;
  color: var(--sim-texto-mutado);
  max-width: 680px;
  margin: 0 auto;
}

/* ==========================================================================
   3. GRID PRINCIPAL (2 COLUNAS NO DESKTOP / 1 NO MOBILE)
   ========================================================================== */
.sim-grid {
  display: grid;
  grid-template-columns: 440px 1fr;
  gap: 28px;
  align-items: start;
}

@media (max-width: 1024px) {
  .sim-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   4. COLUNA ESQUERDA — FORMULÁRIO DE SIMULAÇÃO
   ========================================================================== */
.sim-col-form {
  position: sticky;
  top: 80px;
}

@media (max-width: 1024px) {
  .sim-col-form {
    position: static;
  }
}

.sim-card {
  background: var(--sim-card-bg);
  border: 1px solid var(--sim-borda);
  border-radius: var(--sim-raio);
  padding: 24px;
  box-shadow: var(--sim-sombra);
  margin-bottom: 24px;
}

.sim-card-form {
  padding: 24px 20px;
}

.scf-cabecalho {
  margin-bottom: 20px;
  border-bottom: 1px solid var(--sim-borda);
  padding-bottom: 14px;
}

.scf-titulo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 800;
  color: var(--sim-texto);
}

.scf-titulo svg {
  color: var(--sim-cor-primaria);
}

.scf-sub {
  font-size: 13px;
  color: var(--sim-texto-mutado);
  margin-top: 4px;
}

.form-secao {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--sim-borda);
}

.form-secao:last-of-type {
  border-bottom: none;
}

.form-secao-contato {
  background: #f8fafc;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.secao-titulo-mini {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #475569;
  margin-bottom: 12px;
}

.campo-grupo {
  margin-bottom: 12px;
}

.campo-grupo label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
}

.campo-grupo .obrigatorio {
  color: var(--sim-cor-primaria);
}

.campo-grupo input,
.campo-grupo select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--sim-texto);
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
}

.campo-grupo input:focus,
.campo-grupo select:focus {
  border-color: var(--sim-cor-primaria);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

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

.prefixo-moeda {
  position: absolute;
  left: 12px;
  font-size: 14px;
  font-weight: 700;
  color: #64748b;
  pointer-events: none;
}

.input-moeda-wrap input {
  padding-left: 38px;
  font-weight: 700;
}

.dica-campo {
  display: block;
  font-size: 11.5px;
  color: #64748b;
  margin-top: 4px;
  line-height: 1.35;
}

.campo-linha-dupla {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.aviso-teto-verde {
  padding: 8px 12px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  border-radius: 8px;
  font-size: 12px;
  margin: 6px 0 12px;
}

.form-secao-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checkbox-rotulo {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.checkbox-rotulo input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--sim-cor-primaria);
  cursor: pointer;
}

.checkbox-txt {
  font-size: 12.5px;
  color: #334155;
  line-height: 1.35;
  font-weight: 500;
}

.accordion-mais-opcoes {
  margin-bottom: 20px;
  border: 1px solid var(--sim-borda);
  border-radius: 10px;
  padding: 10px 14px;
  background: #f8fafc;
}

.accordion-mais-opcoes summary {
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
}

.accordion-mais-opcoes summary::-webkit-details-marker {
  display: none;
}

.accordion-conteudo {
  padding-top: 14px;
}

.btn-calcular-agora {
  width: 100%;
  min-height: 52px;
  padding: 14px 20px;
  background: var(--sim-cor-primaria);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 800;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.btn-calcular-agora:hover {
  background: var(--sim-cor-primaria-hover);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45);
  transform: translateY(-1px);
}

.btn-calcular-agora:active {
  transform: scale(0.98);
}

/* ==========================================================================
   5. COLUNA DIREITA — RESULTADOS COMPLETOS & CARDS
   ========================================================================== */
.sim-col-results {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Card Escuro de Destaque (Enquadramento na Caixa) */
.card-enquadramento-escuro {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  border-radius: var(--sim-raio);
  padding: 24px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.cee-topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 14px;
}

.cee-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cee-local {
  font-size: 13px;
  color: #94a3b8;
  font-weight: 600;
}

.cee-corpo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.cee-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cee-item-label {
  font-size: 12px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.cee-item-val {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
}

.cee-item-val.cee-taxa {
  color: #38bdf8;
}

/* Aviso de Modalidade (Lote Isolado vs. Terreno + Construção) */
.cee-aviso-modalidade {
  margin-bottom: 18px;
}

.aviso-modalidade-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
}

.aviso-modalidade-box .amb-icone {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}

.aviso-modalidade-box .amb-corpo strong {
  display: block;
  font-size: 13.5px;
  margin-bottom: 3px;
}

.aviso-modalidade-box .amb-corpo p {
  margin: 0;
}

.aviso-box-lote {
  background: rgba(245, 158, 11, 0.15);
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  color: #fef08a;
}

.aviso-box-lote strong {
  color: #fde047;
}

.aviso-box-obra {
  background: rgba(14, 165, 233, 0.15);
  border: 1.5px solid rgba(14, 165, 233, 0.4);
  color: #e0f2fe;
}

.aviso-box-obra strong {
  color: #38bdf8;
}

/* Box de Destaque do Subsídio */
.cee-box-subsidio {
  background: rgba(22, 163, 74, 0.15);
  border: 1.5px solid rgba(34, 197, 94, 0.4);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.cbs-icone {
  font-size: 32px;
  line-height: 1;
}

.cbs-texto {
  flex: 1;
}

.cbs-titulo-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.cbs-titulo {
  font-size: 14px;
  font-weight: 700;
  color: #86efac;
}

.cbs-tag-verde {
  padding: 2px 8px;
  background: #16a34a;
  color: #ffffff;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.cbs-valor {
  font-size: 30px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.1;
  margin-bottom: 4px;
  letter-spacing: -0.5px;
}

.cbs-desc {
  font-size: 12.5px;
  color: #dcfce7;
  line-height: 1.4;
  opacity: 0.9;
}

/* ==========================================================================
   6. CARDS COMPARATIVOS (SAC vs PRICE)
   ========================================================================== */
.grid-comparativo-sistemas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (max-width: 640px) {
  .grid-comparativo-sistemas {
    grid-template-columns: 1fr;
  }
}

.card-sistema {
  background: #ffffff;
  border: 1.5px solid var(--sim-borda);
  border-radius: var(--sim-raio);
  padding: 20px;
  box-shadow: var(--sim-sombra);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card-sistema:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
}

.card-sistema-sac {
  border-top: 4px solid #2563eb;
}

.card-sistema-price {
  border-top: 4px solid #16a34a;
}

.cs-topo {
  margin-bottom: 14px;
}

.cs-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.cs-badge-sac {
  background: #eff6ff;
  color: #1d4ed8;
}

.cs-badge-price {
  background: #f0fdf4;
  color: #15803d;
}

.cs-titulo {
  font-size: 20px;
  font-weight: 800;
  color: var(--sim-texto);
}

.cs-sub {
  font-size: 12px;
  color: var(--sim-texto-mutado);
}

.cs-corpo {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.cs-linha {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  color: #475569;
  border-bottom: 1px dashed #f1f5f9;
  padding-bottom: 6px;
}

.cs-linha strong {
  color: #0f172a;
}

.cs-linha strong.txt-entrada {
  color: var(--sim-cor-primaria);
  font-size: 15px;
}

.cs-destaque-parcela {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  margin: 8px 0;
}

.cs-parc-rotulo {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
}

.cs-parc-valor {
  font-size: 28px;
  font-weight: 900;
  color: #2563eb;
  line-height: 1.1;
  margin: 4px 0 2px;
}

.cs-parc-valor.cs-parc-price {
  color: #16a34a;
}

.cs-parc-ultima {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}

.cs-detalhes-taxa {
  font-size: 12px;
  color: #64748b;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cs-detalhes-taxa b {
  color: #1e293b;
}

/* ==========================================================================
   7. GATILHO DE VENDA INTELIGENTE
   ========================================================================== */
.alerta-gatilho-venda {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.08);
}

.agv-icone {
  font-size: 26px;
  line-height: 1;
}

.agv-texto strong {
  display: block;
  font-size: 14.5px;
  color: #92400e;
  margin-bottom: 2px;
}

.agv-texto p {
  font-size: 13px;
  color: #b45309;
  line-height: 1.4;
}

/* ==========================================================================
   8. CARD RENDA IDEAL & TABELAS
   ========================================================================== */
.cri-cabecalho {
  margin-bottom: 16px;
}

.cri-titulo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 800;
  color: var(--sim-texto);
}

.cri-titulo svg {
  color: #2563eb;
}

.cri-sub {
  font-size: 13px;
  color: var(--sim-texto-mutado);
  margin-top: 2px;
}

.tabela-responsiva-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

body.sim-body table.tabela-renda-ideal,
body.sim-body table.tabela-bancos {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

body.sim-body .tabela-responsiva-wrap th {
  padding: 10px 14px;
  background: #f1f5f9;
  color: #475569;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1.5px solid var(--sim-borda);
  white-space: nowrap;
}

body.sim-body .tabela-responsiva-wrap td {
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
  vertical-align: middle;
}

body.sim-body .tabela-responsiva-wrap tr:hover td {
  background: #f8fafc;
}

.tag-diferenca-sobra {
  display: inline-block;
  padding: 2px 8px;
  background: #ecfdf5;
  color: #065f46;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
}

.tag-diferenca-falta {
  display: inline-block;
  padding: 2px 8px;
  background: #fef2f2;
  color: #991b1b;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
}

/* ==========================================================================
   9. COMPARATIVO ENTRE 10 BANCOS & GRÁFICO
   ========================================================================== */
.ccb-cabecalho {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.ccb-titulo {
  font-size: 18px;
  font-weight: 800;
  color: var(--sim-texto);
}

.ccb-sub {
  font-size: 13px;
  color: var(--sim-texto-mutado);
}

.selo-melhor-opcao {
  padding: 6px 12px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
}

.grafico-barras-bancos {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
}

.item-barra-banco {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ibb-nome {
  width: 140px;
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  flex-shrink: 0;
  white-space: nowrap;
}

.ibb-trilho {
  flex: 1;
  height: 22px;
  background: #f1f5f9;
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.ibb-preenchimento {
  height: 100%;
  border-radius: 9999px;
  background: #94a3b8;
  transition: width 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
}

.ibb-preenchimento.destaque-caixa {
  background: linear-gradient(90deg, #2563eb 0%, #1d4ed8 100%);
}

.ibb-valor {
  width: 110px;
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  text-align: right;
  flex-shrink: 0;
}

.selo-tabela-banco {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  margin-left: 6px;
}

.selo-tabela-banco.selo-caixa {
  background: #16a34a;
  color: #ffffff;
}

/* ==========================================================================
   10. BARRA FINAL DE CONVERSÃO / AÇÕES
   ========================================================================== */
.card-conversao-final {
  background: #ffffff;
  border: 1.5px solid #bbf7d0;
  border-radius: var(--sim-raio);
  padding: 26px 22px;
  box-shadow: 0 8px 30px rgba(22, 163, 74, 0.12);
  text-align: center;
}

.ccf-chamada {
  max-width: 620px;
  margin: 0 auto 20px;
}

.ccf-titulo {
  font-size: clamp(20px, 3.5vw, 24px);
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
}

.ccf-sub {
  font-size: 14.5px;
  color: #475569;
}

.ccf-botoes-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 600px;
  margin: 0 auto;
}

.btn-conversao-whats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 16px 24px;
  background: var(--sim-cor-verde);
  color: #ffffff;
  border-radius: 14px;
  font-size: 17.5px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 4px 18px rgba(22, 163, 74, 0.35);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-conversao-whats:hover {
  background: var(--sim-cor-verde-hover);
  box-shadow: 0 6px 22px rgba(22, 163, 74, 0.45);
  transform: translateY(-2px);
}

.btn-conversao-whats:active {
  transform: scale(0.98);
}

.ccf-secundarios {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

@media (max-width: 640px) {
  .ccf-secundarios {
    grid-template-columns: 1fr;
  }
}

.btn-secundario {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 14px;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-secundario:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

/* ==========================================================================
   11. RODAPÉ E TOAST
   ========================================================================== */
.sim-footer {
  background: #ffffff;
  border-top: 1px solid var(--sim-borda);
  padding: 32px 20px;
  margin-top: 48px;
}

.sim-footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sfi-col-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.sim-body .sim-footer .sim-logo {
  gap: 12px !important;
}

body.sim-body .sim-footer .sim-logo-icon {
  width: 44px !important;
  height: 44px !important;
}

body.sim-body .sim-footer .sim-logo-title {
  font-size: 24px !important;
  letter-spacing: -0.5px !important;
}

body.sim-body .sim-footer .sim-logo-sub {
  font-size: 11px !important;
  letter-spacing: 1.5px !important;
}

.sfi-creci {
  font-size: 13px;
  color: #475569;
  font-weight: 600;
}

.sfi-col-aviso {
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.5;
  border-top: 1px solid #f1f5f9;
  padding-top: 14px;
}

/* Toast de Notificação */
.sim-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #ffffff;
  padding: 12px 22px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
}

.sim-toast.visivel {
  transform: translateY(0);
  opacity: 1;
}

/* Cabeçalho da Proposta em Impressão (Oculto na tela normal) */
.proposta-print-header {
  display: none;
}

/* ==========================================================================
   12. ESTILOS DE IMPRESSÃO (PDF DE PROPOSTA OFICIAL DO MAPPA)
   ========================================================================== */
@media print {
  .sim-header,
  .sim-header-actions,
  .sim-col-form,
  .ccf-chamada,
  .ccf-secundarios,
  .btn-voltar-mapa,
  .btn-whats-topo,
  .cir-link-voltar,
  .sim-toast,
  .sim-footer {
    display: none !important;
  }

  body.sim-body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .sim-main {
    padding: 0 !important;
  }

  .sim-grid {
    display: block !important;
  }

  .sim-col-results {
    width: 100% !important;
  }

  .proposta-print-header {
    display: block !important;
    border-bottom: 2px solid #0f172a;
    padding-bottom: 14px;
    margin-bottom: 18px;
  }

  .pph-topo {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
  }

  .pph-marca {
    font-size: 22px;
    font-weight: 900;
    color: #ef4444;
    display: block;
    letter-spacing: -0.5px;
  }

  .pph-sub {
    font-size: 11px;
    color: #475569;
    font-weight: 700;
    text-transform: uppercase;
  }

  .pph-corretor {
    text-align: right;
    font-size: 12px;
    color: #1e293b;
    line-height: 1.4;
  }

  .pph-grid-resumo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 18px;
    font-size: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 12px;
  }

  .pph-grid-resumo .pph-label {
    color: #64748b;
    margin-right: 4px;
  }

  .pph-grid-resumo strong {
    color: #0f172a;
  }

  .pph-aviso-legal {
    font-size: 10px;
    line-height: 1.45;
    color: #475569;
    background: #f1f5f9;
    border-left: 3px solid #64748b;
    padding: 8px 12px;
    border-radius: 4px;
  }

  .card-enquadramento-escuro {
    background: #1e293b !important;
    color: #ffffff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .btn-conversao-whats {
    border: 2px solid #16a34a !important;
    color: #065f46 !important;
    background: #ecfdf5 !important;
  }
}

/* ==========================================================================
   13. RESPONSIVIDADE COMPLETA PARA DISPOSITIVOS MÓVEIS (320px a 768px)
   ========================================================================== */
@media (max-width: 768px) {
  html, body.sim-body {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
  }

  body.sim-body * {
    box-sizing: border-box !important;
  }

  /* Topo / Header no Mobile */
  body.sim-body .sim-header {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  body.sim-body .sim-header-inner {
    width: 100% !important;
    max-width: 100% !important;
    padding: 8px 10px !important;
    gap: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  body.sim-body .sim-logo {
    gap: 6px !important;
    flex-shrink: 0 !important;
  }

  body.sim-body .sim-logo-icon {
    width: 28px !important;
    height: 28px !important;
  }

  body.sim-body .sim-logo-title {
    font-size: 15px !important;
  }

  body.sim-body .sim-logo-sub {
    font-size: 7.5px !important;
    letter-spacing: 1px !important;
  }

  body.sim-body .sim-header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 1 !important;
  }

  body.sim-body .btn-voltar-mapa {
    padding: 6px 8px !important;
    font-size: 11px !important;
    gap: 4px !important;
    white-space: nowrap !important;
  }

  body.sim-body .btn-voltar-mapa span {
    display: none !important;
  }

  body.sim-body .btn-voltar-mapa::after {
    content: "Mapa" !important;
    font-size: 11px !important;
    font-weight: 700 !important;
  }

  body.sim-body .btn-whats-topo {
    padding: 6px 10px !important;
    font-size: 11px !important;
    gap: 4px !important;
    white-space: nowrap !important;
  }

  body.sim-body .btn-whats-topo span {
    display: none !important;
  }

  body.sim-body .btn-whats-topo::after {
    content: "Corretor" !important;
    font-size: 11px !important;
    font-weight: 700 !important;
  }

  /* Main & Container */
  body.sim-body .sim-main {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 10px 36px !important;
    overflow-x: hidden !important;
  }

  body.sim-body .sim-container {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
  }

  /* Grid Principal: 1 Coluna Fluida Estrita */
  body.sim-body .sim-grid {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    gap: 16px !important;
  }

  body.sim-body .sim-col-form,
  body.sim-body .sim-col-results {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
    position: static !important;
  }

  /* Todos os Cards no Mobile */
  body.sim-body .sim-card,
  body.sim-body .sim-card-form,
  body.sim-body .card-imovel-resumo,
  body.sim-body .card-enquadramento-escuro,
  body.sim-body .card-renda-ideal,
  body.sim-body .card-comparativo-bancos,
  body.sim-body .card-conversao-final {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    padding: 16px 12px !important;
    margin-bottom: 16px !important;
    border-radius: 14px !important;
    overflow: hidden !important;
  }

  /* Card Resumo do Imóvel */
  body.sim-body .cir-conteudo {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  body.sim-body .cir-foto {
    width: 72px !important;
    height: 72px !important;
    border-radius: 10px !important;
    flex-shrink: 0 !important;
  }

  body.sim-body .cir-info {
    flex: 1 1 calc(100% - 86px) !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
  }

  body.sim-body .cir-titulo {
    font-size: 14.5px !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    color: var(--sim-texto) !important;
    margin: 0 !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
  }

  body.sim-body .cir-local {
    font-size: 12px !important;
    color: var(--sim-texto-mutado) !important;
    margin: 0 !important;
  }

  body.sim-body .cir-detalhes {
    font-size: 11.5px !important;
    color: #475569 !important;
  }

  body.sim-body .cir-preco-wrap {
    width: 100% !important;
    flex: 1 1 100% !important;
    min-width: 100% !important;
    margin-top: 8px !important;
    padding-top: 8px !important;
    border-top: 1px dashed #e2e8f0 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    text-align: left !important;
    gap: 8px !important;
  }

  body.sim-body .cir-preco-rotulo {
    display: none !important;
  }

  body.sim-body .cir-preco {
    font-size: 20px !important;
    font-weight: 900 !important;
    color: var(--sim-cor-primaria) !important;
    margin: 0 !important;
    white-space: nowrap !important;
  }

  body.sim-body .cir-link-voltar {
    display: inline-flex !important;
    align-items: center !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    color: #2563eb !important;
    background: #eff6ff !important;
    border: 1px solid #bfdbfe !important;
    padding: 5px 10px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    white-space: nowrap !important;
  }

  /* Formulário e Campos no Mobile */
  body.sim-body .form-secao {
    margin-bottom: 16px !important;
  }

  body.sim-body .campo-linha-dupla {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
    width: 100% !important;
  }

  body.sim-body .campo-grupo {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-bottom: 10px !important;
  }

  body.sim-body .campo-grupo input,
  body.sim-body .campo-grupo select {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 44px !important;
    font-size: 14.5px !important;
    box-sizing: border-box !important;
  }

  body.sim-body .input-moeda-wrap {
    width: 100% !important;
    max-width: 100% !important;
  }

  body.sim-body .btn-calcular-agora {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 48px !important;
    font-size: 14.5px !important;
    padding: 10px 14px !important;
    white-space: normal !important;
    text-align: center !important;
    justify-content: center !important;
  }

  /* Card Escuro de Enquadramento */
  body.sim-body .cee-topo {
    margin-bottom: 12px !important;
    padding-bottom: 8px !important;
  }

  body.sim-body .cee-badge {
    font-size: 10.5px !important;
    padding: 4px 8px !important;
  }

  body.sim-body .cee-local {
    font-size: 11px !important;
  }

  body.sim-body .cee-corpo-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 14px !important;
    width: 100% !important;
  }

  body.sim-body .cee-item {
    min-width: 0 !important;
    overflow: hidden !important;
  }

  body.sim-body .cee-item-label {
    font-size: 10px !important;
  }

  body.sim-body .cee-item-val {
    font-size: 17px !important;
    white-space: nowrap !important;
  }

  body.sim-body .aviso-modalidade-box {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    padding: 10px 12px !important;
    font-size: 11.5px !important;
  }

  body.sim-body .aviso-modalidade-box .amb-corpo {
    min-width: 0 !important;
    flex: 1 !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
  }

  body.sim-body .cee-box-subsidio {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 10px 12px !important;
    gap: 8px !important;
  }

  body.sim-body .cbs-icone {
    font-size: 22px !important;
  }

  body.sim-body .cbs-titulo {
    font-size: 12.5px !important;
  }

  body.sim-body .cbs-valor {
    font-size: 22px !important;
    white-space: nowrap !important;
  }

  body.sim-body .cbs-desc {
    font-size: 11px !important;
  }

  /* Cards SAC e PRICE */
  body.sim-body .grid-comparativo-sistemas {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    gap: 14px !important;
  }

  body.sim-body .card-sistema {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    padding: 14px 12px !important;
  }

  body.sim-body .cs-titulo {
    font-size: 17px !important;
  }

  body.sim-body .cs-linha {
    font-size: 12.5px !important;
  }

  body.sim-body .cs-linha strong {
    white-space: nowrap !important;
  }

  body.sim-body .cs-destaque-parcela {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 8px 10px !important;
    margin: 6px 0 !important;
  }

  body.sim-body .cs-parc-valor {
    font-size: 24px !important;
    white-space: nowrap !important;
  }

  /* Alerta Gatilho Entrada */
  body.sim-body .alerta-gatilho-venda {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 10px !important;
  }

  body.sim-body .agv-texto {
    min-width: 0 !important;
    flex: 1 !important;
  }

  /* Tabelas Responsivas com Rolagem Horizontal Independente */
  body.sim-body .tabela-responsiva-wrap {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    display: block !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    background: #ffffff !important;
  }

  body.sim-body .tabela-responsiva-wrap table.tabela-renda-ideal,
  body.sim-body .tabela-responsiva-wrap table.tabela-bancos {
    min-width: 480px !important;
    width: 100% !important;
    font-size: 12px !important;
  }

  body.sim-body .tabela-responsiva-wrap th {
    padding: 8px 10px !important;
    font-size: 11px !important;
    white-space: nowrap !important;
  }

  body.sim-body .tabela-responsiva-wrap td {
    padding: 8px 10px !important;
    white-space: nowrap !important;
  }

  /* Gráfico 10 Bancos no Mobile */
  body.sim-body .grafico-barras-bancos {
    width: 100% !important;
    max-width: 100% !important;
  }

  body.sim-body .item-barra-banco {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 4px !important;
    padding: 6px 0 !important;
    border-bottom: 1px solid #f1f5f9 !important;
    width: 100% !important;
  }

  body.sim-body .item-barra-banco:last-child {
    border-bottom: none !important;
  }

  body.sim-body .ibb-nome {
    width: auto !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    white-space: nowrap !important;
  }

  body.sim-body .ibb-valor {
    width: auto !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    text-align: right !important;
    white-space: nowrap !important;
  }

  body.sim-body .ibb-trilho {
    width: 100% !important;
    flex: 1 1 100% !important;
    height: 12px !important;
    margin-top: 2px !important;
    background: #f1f5f9 !important;
    border-radius: 9999px !important;
  }

  /* Barra de Conversão Final */
  body.sim-body .card-conversao-final {
    padding: 18px 12px !important;
  }

  body.sim-body .ccf-titulo {
    font-size: 18px !important;
  }

  body.sim-body .ccf-sub {
    font-size: 12.5px !important;
  }

  body.sim-body .btn-conversao-whats {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 48px !important;
    font-size: 14px !important;
    padding: 10px 12px !important;
    white-space: normal !important;
    text-align: center !important;
    justify-content: center !important;
  }

  body.sim-body .ccf-secundarios {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 8px !important;
  }

  body.sim-body .btn-secundario {
    width: 100% !important;
    min-height: 40px !important;
    font-size: 12px !important;
  }

  /* Footer */
  body.sim-body .sim-footer {
    width: 100% !important;
    max-width: 100% !important;
    padding: 24px 12px !important;
    overflow: hidden !important;
  }
}

@media (max-width: 380px) {
  body.sim-body .cee-corpo-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.sim-body .ibb-nome {
    font-size: 11.5px !important;
  }

  body.sim-body .ibb-valor {
    font-size: 12px !important;
  }

  body.sim-body .btn-conversao-whats {
    font-size: 13px !important;
  }
}
