/* ====================================================================
   Estilos de TODOS os componentes do sistema (Premium Imobiliária).
   Cada bloco corresponde a um Componente JS em /compartilhado/js/componentes/.
   ==================================================================== */

/* === FAIXA TOPO (selo da marca) ====================================== */
.faixa-topo {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--topstrip-h);
  background: var(--brand-strip);
  z-index: 60;
}

/* Placeholder visual enquanto o JS do cabecalho/rodape nao terminou de
   montar. Reserva o espaco exato pra evitar "saltos" de layout (CLS) e
   pinta o fundo com a cor certa pra que o usuario nao veja o flash. */
#faixa-topo:empty {
  display: block;
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--topstrip-h);
  background: var(--brand-strip);
  z-index: 60;
}
#cabecalho:empty {
  display: block;
  position: fixed; inset: var(--topstrip-h) 0 auto 0;
  height: var(--header-h);
  background: transparent;
  z-index: 50;
  pointer-events: none;
}
/* Em paginas com hero escuro o cabecalho fica transparente sobre o hero.
   Em paginas sem hero, o cabecalho tem fundo branco. Detectamos pelo
   primeiro elemento dentro do <main>: se for .hero, fica transparente;
   caso contrario, branco. */
body:not(.tem-hero) #cabecalho:empty {
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: saturate(150%) blur(16px);
          backdrop-filter: saturate(150%) blur(16px);
  border-bottom: 1px solid var(--line);
}
#rodape:empty {
  display: block;
  min-height: 320px;
  background: var(--navy);
}

/* === PAGINAÇÃO ======================================================
   Componente reutilizável (Paginacao.js). Pílulas com hover navy,
   ativa em fundo navy + número amarelo. Em mobile compacta pra "X de Y". */
.paginacao {
  display: flex; align-items: center; justify-content: center;
  gap: var(--sp-2);
  margin-top: var(--sp-5);
  font-size: var(--fs-sm);
  user-select: none; flex-wrap: wrap;
}
.paginacao--vazia { display: none; }
.paginacao__btn, .paginacao__num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 10px;
  border: 1.5px solid var(--line); background: #fff;
  color: var(--ink-2); font-weight: 600;
  border-radius: var(--r-sm); cursor: pointer;
  transition: background .15s var(--ease), border-color .15s var(--ease),
              color .15s var(--ease), transform .1s var(--ease),
              box-shadow .15s var(--ease);
}
.paginacao__btn:hover:not(.paginacao__btn--off),
.paginacao__num:hover:not(.paginacao__num--ativa) {
  border-color: var(--navy); color: var(--navy);
  background: var(--bg-soft);
}
.paginacao__btn:active, .paginacao__num:active { transform: scale(.96); }
.paginacao__btn svg { width: 16px; height: 16px; }
.paginacao__btn--off {
  opacity: .35; cursor: not-allowed; pointer-events: none;
}
.paginacao__num--ativa {
  background: var(--navy); color: var(--yellow);
  border-color: var(--navy);
  box-shadow: 0 4px 12px rgba(13,43,107,.2);
}
.paginacao__elipse {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; height: 36px;
  color: var(--muted); font-weight: 700; letter-spacing: 2px;
  padding: 0 4px;
}
.paginacao__nums { display: flex; gap: var(--sp-1); align-items: center; }
.paginacao__contador {
  display: none;
  color: var(--muted); font-size: var(--fs-xs); font-weight: 600;
  padding: 0 var(--sp-3);
  min-width: 60px; text-align: center;
}
@media (max-width: 480px) {
  /* No mobile, mostra só setas + "X de Y", esconde os números */
  .paginacao__nums { display: none; }
  .paginacao__contador { display: inline-flex; align-items: center; }
}

/* === SURGIR (anima entrada na viewport) ============================== */
[data-surgir] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  will-change: opacity, transform;
}
[data-surgir].surgiu {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  [data-surgir] { opacity: 1; transform: none; transition: none; }
}

/* === BOTÕES ========================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  padding: 12px 22px; border-radius: var(--r-pill);
  font-weight: 600; font-size: var(--fs-base); line-height: 1;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform .15s var(--ease), background .15s var(--ease),
              color .15s var(--ease), box-shadow .15s var(--ease);
}
.btn.lg { padding: 16px 28px; font-size: var(--fs-md); }
.btn.sm { padding: 10px 18px; font-size: var(--fs-sm); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.btn--primary { background: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--navy-2); box-shadow: 0 8px 24px rgba(13,43,107,.32); }

.btn--yellow { background: var(--yellow); color: var(--navy); font-weight: 700; }
.btn--yellow:hover { background: var(--yellow-2); box-shadow: 0 8px 24px rgba(247,199,61,.45); }

.btn--ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--navy); }
.btn--ghost:hover { background: var(--navy); color: #fff; }

.btn--ghost-light { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.4); }
.btn--ghost-light:hover { background: #fff; color: var(--navy); }

.btn--whatsapp { background: var(--green); color: #fff; font-weight: 700; }
.btn--whatsapp:hover { background: #248F3F; box-shadow: 0 8px 24px rgba(43,168,74,.32); }

.btn--text { color: var(--navy); padding: 0; gap: 6px; font-weight: 600; }
.btn--text::after { content: "→"; transition: transform .15s var(--ease); }
.btn--text:hover { color: var(--pink); }
.btn--text:hover::after { transform: translateX(4px); }

/* === CABEÇALHO ======================================================= */
.cabecalho {
  position: fixed; inset: var(--topstrip-h) 0 auto 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: saturate(150%) blur(16px);
          backdrop-filter: saturate(150%) blur(16px);
  border-bottom: 1px solid transparent;
  height: var(--header-h);
  display: flex; align-items: center;
  transition: background .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.cabecalho.rolado {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: var(--line);
  box-shadow: 0 4px 24px rgba(13, 43, 107, 0.06);
}
.cabecalho--hero {
  background: transparent;
  -webkit-backdrop-filter: none;
          backdrop-filter: none;
  border-bottom: 0;
}
.cabecalho--hero.rolado {
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: saturate(150%) blur(16px);
          backdrop-filter: saturate(150%) blur(16px);
  border-bottom-color: var(--line);
  box-shadow: 0 4px 24px rgba(13, 43, 107, 0.06);
}
.cabecalho--hero.rolado .cabecalho__brand,
.cabecalho--hero.rolado .cabecalho__nav { color: var(--navy); }
/* O burger continua amarelo sempre — sem override no estado rolado */
.cabecalho--hero.rolado .btn--ghost-light { color: var(--navy); border-color: var(--navy); }
.cabecalho--hero.rolado .btn--ghost-light:hover { background: var(--navy); color: #fff; }
.cabecalho--hero.rolado .cabecalho__nav a.ativo { color: var(--navy); }
.cabecalho__row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-5); width: 100%; }

.cabecalho__brand {
  display: flex; align-items: center; gap: var(--sp-3);
  color: var(--navy); font-weight: 700; letter-spacing: -.01em; font-size: var(--fs-md);
}
.cabecalho--hero .cabecalho__brand { color: #fff; }
.cabecalho__brand .mark {
  width: 48px; height: 48px; background: var(--yellow); border-radius: 12px;
  display: grid; place-items: center; padding: 4px;
  box-shadow: 0 4px 16px rgba(247,199,61,.4);
}
.cabecalho__brand .mark img { width: 100%; height: 100%; object-fit: contain; }

.cabecalho__nav { display: none; align-items: center; gap: var(--sp-6); font-weight: 500; }
.cabecalho__nav a { position: relative; color: inherit; }
.cabecalho__nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 2px; background: var(--yellow);
  transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease);
}
.cabecalho__nav a:hover::after, .cabecalho__nav a.ativo::after { transform: scaleX(1); }
.cabecalho__nav a.ativo { color: var(--navy); }
.cabecalho--hero .cabecalho__nav { color: #fff; }
.cabecalho--hero .cabecalho__nav a.ativo { color: var(--yellow); }
.cabecalho__cta { display: flex; gap: var(--sp-2); align-items: center; }
.cabecalho__usuario { font-size: var(--fs-sm); color: var(--ink-2); font-weight: 600; padding: 0 var(--sp-2); }

/* === Botão de mensagens estilo Facebook (ícone + badge + popover) === */
.mensagens-pop { position: relative; display: inline-block; }
.mensagens-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-soft); border: 1px solid transparent;
  cursor: pointer; display: inline-grid; place-items: center;
  position: relative; transition: background .15s ease, transform .15s ease;
}
.mensagens-btn:hover { background: #E1E8F2; transform: scale(1.04); }
.mensagens-btn__icon { font-size: 18px; line-height: 1; }
.mensagens-btn__badge {
  position: absolute; top: -2px; right: -2px;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--pink); color: #fff; border-radius: 999px;
  font-size: 10px; font-weight: 800; display: grid; place-items: center;
  border: 2px solid #fff;
}
.cabecalho--hero .mensagens-btn { background: rgba(255,255,255,.15); }
.cabecalho--hero .mensagens-btn:hover { background: rgba(255,255,255,.25); }
.cabecalho--hero.rolado .mensagens-btn { background: var(--bg-soft); }

.mensagens-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 320px; max-height: 480px; overflow-y: auto;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: 0 12px 32px rgba(13,43,107,.16);
  z-index: 50; padding: var(--sp-2);
}
.mensagens-dropdown__item {
  display: grid; grid-template-columns: 36px 1fr auto;
  gap: var(--sp-3); align-items: center;
  padding: var(--sp-3); text-decoration: none;
  border-radius: var(--r-sm); transition: background .15s ease;
}
.mensagens-dropdown__item:hover { background: var(--bg-soft); }
.mensagens-dropdown__item.naolida { background: #FFFBEA; }
.mensagens-dropdown__item.naolida:hover { background: #FFF7D6; }
.mensagens-dropdown__av {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--navy); color: var(--yellow);
  display: grid; place-items: center; font-weight: 700; font-size: var(--fs-sm);
}
.mensagens-dropdown__txt { min-width: 0; }
.mensagens-dropdown__txt b { display: block; color: var(--navy); font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mensagens-dropdown__txt small { display: block; color: var(--muted); font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mensagens-dropdown__b {
  background: var(--pink); color: #fff; min-width: 18px; padding: 1px 6px;
  border-radius: 999px; font-size: 10px; font-weight: 800; text-align: center;
}
.mensagens-dropdown__vazio { padding: var(--sp-4); text-align: center; color: var(--muted); font-size: var(--fs-sm); }
.mensagens-dropdown__todas {
  display: block; padding: var(--sp-3); text-align: center;
  background: var(--bg-soft); border-radius: var(--r-sm);
  margin-top: var(--sp-2); color: var(--navy); font-weight: 700;
  text-decoration: none; font-size: var(--fs-sm);
}
.mensagens-dropdown__todas:hover { background: #E1E8F2; }

/* === Avatar com dropdown (Meu perfil / Configurações / Sair) === */
.avatar-pop { position: relative; display: inline-block; }
.avatar-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--navy); color: var(--yellow);
  border: 2px solid transparent; cursor: pointer;
  display: inline-grid; place-items: center;
  font-weight: 800; font-size: var(--fs-sm);
  overflow: hidden; transition: transform .15s ease, border-color .15s ease;
  padding: 0;
}
.avatar-btn:hover { transform: scale(1.06); border-color: var(--yellow); }
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; }

.avatar-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 240px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: 0 12px 32px rgba(13,43,107,.16);
  z-index: 60; padding: 4px;
  display: flex; flex-direction: column;
}
.avatar-dropdown__head {
  padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--bg-soft);
  margin-bottom: 4px;
}
.avatar-dropdown__head b { display: block; color: var(--navy); font-size: var(--fs-sm); }
.avatar-dropdown__head small { color: var(--muted); font-size: var(--fs-xs); }
.avatar-dropdown__item {
  display: block; padding: 10px 14px; font-size: var(--fs-sm);
  color: var(--navy); text-decoration: none; border: 0; background: transparent;
  text-align: left; cursor: pointer; border-radius: 6px;
  font-family: inherit; font-weight: 600;
}
.avatar-dropdown__item:hover { background: var(--bg-soft); }
.avatar-dropdown__danger { color: var(--danger); }
.cabecalho__badge {
  display: inline-grid; place-items: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  margin-left: 6px; vertical-align: 1px;
  background: var(--pink); color: #fff;
  border-radius: 999px;
  font-size: 11px; font-weight: 800; line-height: 1;
}
.cabecalho--hero .cabecalho__usuario { color: #fff; }
.cabecalho--hero.rolado .cabecalho__usuario { color: var(--ink-2); }
.drawer__cta { display: flex; flex-direction: column; gap: var(--sp-2); padding-top: var(--sp-3); margin-top: var(--sp-3); border-top: 1px solid var(--line); }
.drawer__cta .btn { width: 100%; justify-content: center; }
.drawer__cta .cabecalho__usuario { color: var(--muted); padding: 0; text-align: center; margin-bottom: var(--sp-2); }

.cabecalho__burger {
  width: 44px; height: 44px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: var(--yellow); color: var(--navy);
  box-shadow: 0 4px 12px rgba(247,199,61,.4);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.cabecalho__burger:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(247,199,61,.55); }
.cabecalho--hero .cabecalho__burger { background: var(--yellow); color: var(--navy); }
.cabecalho__burger svg { width: 22px; height: 22px; }

@media (min-width: 960px) { .cabecalho__nav { display: flex; } .cabecalho__burger { display: none; } }

/* Drawer mobile */
.drawer {
  position: fixed; inset: calc(var(--topstrip-h) + var(--header-h)) 0 0 0;
  background: var(--bg); padding: var(--sp-5);
  display: none; flex-direction: column; gap: var(--sp-3);
  z-index: 49; border-top: 1px solid var(--line);
}
.drawer.aberto { display: flex; }
.drawer a {
  font-size: var(--fs-md); font-weight: 600;
  padding: var(--sp-3) var(--sp-3); border-radius: var(--r-sm);
  border-bottom: 1px solid var(--line);
  color: var(--navy);
  display: flex; align-items: center; gap: var(--sp-3);
}
.drawer a.ativo {
  background: var(--yellow); color: var(--navy);
  border-bottom-color: transparent;
}
.drawer a.ativo::before {
  content: ""; width: 6px; height: 22px; border-radius: 99px; background: var(--navy);
}
.drawer .btn { margin-top: var(--sp-3); }

/* === HERO compartilhado ============================================== */
.hero {
  position: relative; color: #fff;
  background: var(--navy);
}
.hero--foto {
  background:
    linear-gradient(180deg, rgba(13,43,107,.55) 0%, rgba(13,43,107,.92) 100%),
    var(--hero-bg, url('https://images.unsplash.com/photo-1564013799919-ab600027ffc6?w=1920&q=80')) center/cover no-repeat;
  min-height: 760px;
}
.hero__inner { padding: 200px 0 100px; position: relative; z-index: 1; }
.hero h1 { color: #fff; max-width: 22ch; margin-bottom: var(--sp-5); }
.hero p { color: rgba(255,255,255,.88); font-size: var(--fs-md); max-width: 48ch; margin-bottom: var(--sp-7); }

.hero--curto { min-height: 380px; padding: calc(var(--topstrip-h) + var(--header-h) + var(--sp-7)) 0 var(--sp-7); background: var(--navy); }
.hero--curto h1 { font-size: clamp(32px, 4vw, 52px); margin-bottom: var(--sp-3); }

/* === SEARCH CARD (Home / Simulador) ================================== */
.search {
  background: #fff; color: var(--ink);
  border-radius: var(--r-md); padding: 10px;
  box-shadow: 0 30px 80px -20px rgba(13,43,107,.55);
  max-width: 780px;
  display: grid; grid-template-columns: 1.2fr 1fr 1fr auto; gap: 1px;
  overflow: hidden;
}
.search > div { padding: 14px 18px; background: #fff; }
.search label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.search select, .search input { width: 100%; border: 0; outline: 0; font: inherit; font-weight: 600; font-size: var(--fs-base); color: var(--ink); background: transparent; }
.search .go { padding: 0; }
.search .go .btn {
  margin: 0; height: 100%; padding: 0 26px; border-radius: var(--r);
  background: var(--navy); color: #fff; font-weight: 700;
}
.search .go .btn:hover { background: var(--navy-2); }
@media (max-width: 720px) {
  .search { grid-template-columns: 1fr; gap: 0; }
  .search .go { padding: 10px; }
  .search .go .btn { width: 100%; height: 48px; border-radius: var(--r); }
}

/* === PROOF BAR (estatísticas) ======================================== */
.proof {
  background: var(--navy-2); color: #fff; padding: var(--sp-5) 0;
  display: flex; gap: var(--sp-7); justify-content: center; flex-wrap: wrap;
  font-size: var(--fs-sm); letter-spacing: .04em;
}
.proof b { color: var(--yellow); font-weight: 700; margin-right: 6px; font-size: var(--fs-md); }

/* === FEATURE / CARD genérico ========================================= */
.feat {
  padding: var(--sp-6) var(--sp-5); background: var(--bg-soft); border-radius: var(--r);
  position: relative; overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
}
.feat::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--yellow);
  transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.feat:hover::before { transform: scaleX(1); }
.feat:hover { transform: translateY(-4px); box-shadow: var(--sh-3); background: #fff; }
.feat__num {
  display: flex; align-items: center; gap: var(--sp-2);
  font-weight: 700; font-size: var(--fs-sm); color: var(--navy);
  letter-spacing: .18em; margin-bottom: var(--sp-4);
}
.feat__num span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; background: var(--yellow); color: var(--navy);
  border-radius: 50%; font-size: 12px; font-weight: 800;
}
.feat h3 { margin-bottom: var(--sp-2); }
.feat p { color: var(--muted); font-size: var(--fs-base); }

/* === CARD de modelo (catálogo) ======================================= */
.card-modelo {
  background: #fff; border-radius: var(--r); overflow: hidden;
  box-shadow: var(--sh-1);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.card-modelo:hover { transform: translateY(-6px); box-shadow: var(--sh-4); }
.card-modelo__img { aspect-ratio: 4/3; background: #ddd center/cover no-repeat; position: relative; }
.card-modelo__badge {
  position: absolute; top: 14px; left: 14px;
  padding: 5px 12px; background: var(--yellow); color: var(--navy);
  border-radius: var(--r-pill); font-size: 11px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
}
.card-modelo__body { padding: var(--sp-5); }
.card-modelo__tag {
  font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase;
  color: var(--pink); font-weight: 700; margin-bottom: var(--sp-2);
}
.card-modelo h4 { margin-bottom: var(--sp-2); color: var(--navy); }
.card-modelo .meta { display: flex; gap: var(--sp-4); color: var(--muted); font-size: var(--fs-sm); margin-bottom: var(--sp-4); }
.card-modelo .price { font-size: var(--fs-sm); color: var(--muted); }
.card-modelo .price b { display: block; font-size: var(--fs-xl); font-weight: 700; color: var(--navy); margin-top: 2px; }
.card-modelo__nota {
  margin: var(--sp-4) 0 0;
  padding-top: var(--sp-3);
  border-top: 1px dashed var(--line);
  font-size: var(--fs-xs); letter-spacing: .04em;
  color: var(--pink); font-weight: 600;
}

/* === EM BREVE — modal central para links ainda nao implementados ===== */
.em-breve {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  padding: var(--sp-5);
  background: rgba(13, 43, 107, .55);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity .2s var(--ease);
}
.em-breve--aberto { opacity: 1; }
.em-breve__cartao {
  background: #fff;
  border-radius: var(--r-lg);
  padding: var(--sp-7) var(--sp-6);
  max-width: 460px; width: 100%;
  text-align: center;
  box-shadow: var(--sh-4);
  transform: translateY(12px) scale(.98);
  transition: transform .25s var(--ease);
  position: relative;
}
.em-breve--aberto .em-breve__cartao { transform: translateY(0) scale(1); }
.em-breve__selo {
  width: 72px; height: 72px;
  margin: 0 auto var(--sp-5);
  background: var(--yellow);
  color: var(--navy);
  border-radius: 50%;
  display: grid; place-items: center;
  box-shadow: 0 12px 32px rgba(247,199,61,.4);
}
.em-breve__selo svg { width: 36px; height: 36px; }
.em-breve__eyebrow {
  display: inline-block;
  font-size: var(--fs-xs); font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--pink);
  margin-bottom: var(--sp-2);
}
.em-breve h3 {
  font-size: var(--fs-2xl);
  color: var(--navy);
  margin: 0 0 var(--sp-3);
  letter-spacing: -.01em;
}
.em-breve p {
  color: var(--muted);
  font-size: var(--fs-md);
  line-height: 1.55;
  margin: 0 auto var(--sp-6);
  max-width: 38ch;
}
.em-breve__acoes {
  display: flex; gap: var(--sp-3);
  justify-content: center;
  flex-wrap: wrap;
}
.em-breve__acoes .btn { min-width: 0; }
@media (max-width: 480px) {
  .em-breve__cartao { padding: var(--sp-6) var(--sp-5); }
  .em-breve h3 { font-size: var(--fs-xl); }
  .em-breve__acoes { flex-direction: column; }
  .em-breve__acoes .btn { width: 100%; }
}

/* === BADGES ========================================================== */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; font-size: var(--fs-xs); font-weight: 700; border-radius: var(--r-pill); background: var(--line); color: var(--navy); }
.badge--yellow { background: var(--yellow); color: var(--navy); }
.badge--sky    { background: #D6F3FC; color: #07597A; }
.badge--pink   { background: #FCE0E8; color: #9E1D44; }
.badge--green  { background: #DCF3E2; color: #186E2F; }
.badge--navy   { background: var(--navy); color: #fff; }

/* === STEPPER (jornada do cliente) ==================================== */
.stepper { display: flex; flex-direction: column; gap: 0; }
.stepper__item {
  display: grid; grid-template-columns: 44px 1fr auto; gap: var(--sp-4);
  padding: var(--sp-4) 0; position: relative; align-items: start;
}
.stepper__item + .stepper__item::before {
  content: ""; position: absolute; left: 21px; top: -8px;
  width: 2px; height: 24px; background: var(--line);
}
.stepper__dot {
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid var(--line); background: var(--bg);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--muted);
}
.stepper__item--feito .stepper__dot { background: var(--green); color: #fff; border-color: var(--green); }
.stepper__item--feito + .stepper__item::before { background: var(--green); }
.stepper__item--atual .stepper__dot { background: var(--yellow); color: var(--navy); border-color: var(--yellow); animation: pulse 1.8s ease-in-out infinite; }
.stepper__item--atual .stepper__titulo { color: var(--pink); }
.stepper__titulo { font-size: var(--fs-md); font-weight: 700; color: var(--navy); margin-bottom: 2px; }
.stepper__desc { color: var(--muted); font-size: var(--fs-sm); }
.stepper__meta { font-size: var(--fs-xs); color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(247,199,61,.7); }
  50%      { box-shadow: 0 0 0 10px rgba(247,199,61,0); }
}

/* === SLIDER (simulador) ============================================== */
.slider { display: flex; flex-direction: column; gap: var(--sp-2); }
.slider__head { display: flex; justify-content: space-between; align-items: baseline; }
.slider__label { font-weight: 600; color: var(--muted); font-size: var(--fs-sm); letter-spacing: .04em; text-transform: uppercase; }
.slider__valor { font-size: var(--fs-2xl); font-weight: 700; color: var(--navy); letter-spacing: -.01em; }
.slider input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 8px; border-radius: var(--r-pill);
  background: linear-gradient(to right, var(--navy) var(--p, 0%), var(--line) var(--p, 0%));
  outline: 0;
}
.slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--yellow); border: 3px solid var(--navy);
  cursor: grab;
}
.slider input[type="range"]::-moz-range-thumb {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--yellow); border: 3px solid var(--navy);
  cursor: grab;
}
.slider__hint { display: flex; justify-content: space-between; color: var(--muted); font-size: var(--fs-xs); }

/* === FORM FIELDS ===================================================== */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-weight: 600; color: var(--ink-2); font-size: var(--fs-sm); }
.field > .hint  { color: var(--muted); font-size: var(--fs-xs); }
.field > .erro  { color: var(--danger); font-size: var(--fs-xs); font-weight: 600; }

.input, .select, .textarea {
  width: 100%; padding: 14px 16px;
  background: #fff;
  border: 1.5px solid var(--line); border-radius: var(--r);
  color: var(--ink); font-size: var(--fs-base);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, .select:focus, .textarea:focus {
  outline: 0; border-color: var(--navy);
  box-shadow: 0 0 0 4px rgba(13,43,107,.1);
}
.input::placeholder { color: var(--muted); }
.textarea { min-height: 120px; resize: vertical; }

.check, .radio {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 500; cursor: pointer;
}
.check input, .radio input { width: 18px; height: 18px; accent-color: var(--navy); }

/* === INPUT FILE (anexar documentos) ================================== */
/* O input nativo (.input[type=file]) e estilizado por inteiro: o campo
   parece um input comum e o botao "Escolher arquivos" vira um botao
   amarelo da marca via ::file-selector-button. */
.input[type="file"] {
  padding: 10px 12px;
  cursor: pointer;
  font-family: var(--font-body);
  color: var(--muted);
  display: flex; align-items: center;
}
.input[type="file"]:hover { border-color: var(--navy); }
.input[type="file"]::file-selector-button {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  margin-right: var(--sp-4);
  padding: 10px 18px;
  border-radius: var(--r-pill);
  background: var(--yellow);
  color: var(--navy);
  font: inherit;
  font-weight: 700;
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: background .15s var(--ease), box-shadow .15s var(--ease), transform .15s var(--ease);
}
.input[type="file"]::file-selector-button:hover {
  background: var(--yellow-2);
  box-shadow: 0 6px 18px rgba(247,199,61,.45);
  transform: translateY(-1px);
}
/* Fallback para Safari antigo (webkit). */
.input[type="file"]::-webkit-file-upload-button {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  margin-right: var(--sp-4);
  padding: 10px 18px;
  border-radius: var(--r-pill);
  background: var(--yellow);
  color: var(--navy);
  font: inherit;
  font-weight: 700;
  font-size: var(--fs-sm);
  cursor: pointer;
}

/* === MODAL =========================================================== */
.modal-fundo {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(13, 43, 107, 0.6);
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-4);
}
.modal {
  background: #fff; border-radius: var(--r-lg); padding: var(--sp-6);
  width: 100%; max-width: 520px; box-shadow: 0 40px 100px rgba(0,0,0,.4);
}
.modal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-4); }
.modal__fechar { width: 36px; height: 36px; border-radius: 50%; background: var(--bg-soft); display: grid; place-items: center; font-size: 18px; }

/* === TOAST =========================================================== */
.toast-host {
  position: fixed; bottom: var(--sp-5); left: 50%; transform: translateX(-50%);
  z-index: 300; display: flex; flex-direction: column; gap: var(--sp-2);
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: var(--navy); color: #fff;
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-pill); box-shadow: var(--sh-3);
  font-weight: 600; animation: toast-in .25s var(--ease);
}
.toast--success { background: var(--green); }
.toast--erro    { background: var(--danger); }
@keyframes toast-in { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }

/* === BOTÃO WHATSAPP FLUTUANTE (FAB) ================================== */
.whatsapp-fab {
  position: fixed; bottom: var(--sp-6); right: var(--sp-6);
  z-index: 40;
  width: 60px; height: 60px; border-radius: 50%;
  background: #25D366; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.45);
  transition: transform .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}
.whatsapp-fab svg { width: 34px; height: 34px; display: block; }
.whatsapp-fab:hover { transform: scale(1.08); background: #1FB855; box-shadow: 0 14px 32px rgba(37, 211, 102, 0.55); }
/* anel pulsante atrás (sutil) */
.whatsapp-fab::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  border: 2px solid #25D366; opacity: .6;
  animation: pulse-fab 2.4s ease-out infinite;
  pointer-events: none;
}
body.com-bottomnav .whatsapp-fab { bottom: calc(var(--bottomnav-h) + var(--sp-4)); }
@media (min-width: 720px) { body.com-bottomnav .whatsapp-fab { bottom: var(--sp-6); } }
@keyframes pulse-fab {
  0%   { transform: scale(1);    opacity: .6; }
  100% { transform: scale(1.55); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .whatsapp-fab::before { animation: none; } }

/* === BOTTOM NAV (cliente mobile) ===================================== */
.bottom-nav {
  position: fixed; inset: auto 0 0 0; z-index: 50;
  background: #fff; border-top: 1px solid var(--line);
  height: var(--bottomnav-h);
  display: flex; align-items: stretch; justify-content: space-around;
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; color: var(--muted); font-size: var(--fs-xs); font-weight: 600;
}
.bottom-nav a.ativo { color: var(--navy); }
.bottom-nav a.ativo svg { color: var(--yellow); }
.bottom-nav a svg { width: 22px; height: 22px; }
@media (min-width: 720px) { .bottom-nav { display: none; } }

/* === RODAPÉ ========================================================== */
.rodape {
  background: var(--navy-2); color: #fff;
  padding: var(--sp-8) 0 var(--sp-6);
  position: relative;
}
.rodape::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--brand-strip);
}
.rodape__top {
  display: grid; gap: var(--sp-7);
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: var(--sp-7);
}
.rodape__brand { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-4); color: #fff; font-weight: 700; font-size: var(--fs-md); }
.rodape__brand .mark { width: 44px; height: 44px; background: var(--yellow); border-radius: 10px; display: grid; place-items: center; padding: 4px; }
.rodape__brand .mark img { width: 100%; height: 100%; object-fit: contain; }
.rodape__sobre { color: #A6B0C8; font-size: var(--fs-sm); max-width: 30ch; }
.rodape h6 { color: var(--yellow); margin-bottom: var(--sp-4); }
.rodape a { display: block; color: #C4CCDE; padding: 6px 0; font-size: var(--fs-base); }
.rodape a:hover { color: var(--yellow); }
.rodape__base {
  border-top: 1px solid #1F305A; padding-top: var(--sp-5);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--sp-3);
  font-size: var(--fs-sm); color: #8590A8;
}
.rodape__base .ms { display: inline-flex; align-items: center; gap: var(--sp-2); }
.rodape__base .dotline { display: inline-flex; gap: 2px; }
.rodape__base .dotline i {
  width: 6px; height: 6px; border-radius: 50%; display: inline-block;
  background: var(--yellow);
}
.rodape__base .dotline i:nth-child(2) { background: var(--sky); }
.rodape__base .dotline i:nth-child(3) { background: var(--pink); }

/* === LINK TEXTO COM SETA ============================================= */
.link-seta { display: inline-flex; align-items: center; gap: 8px; color: var(--navy); font-weight: 600; }
.link-seta::after { content: "→"; transition: transform .15s var(--ease); }
.link-seta:hover { color: var(--pink); }
.link-seta:hover::after { transform: translateX(4px); }

/* === SEÇÃO HEAD (eyebrow + título) =================================== */
.sec-head { max-width: 640px; margin-bottom: var(--sp-7); }
.sec-head.center { margin-inline: auto; text-align: center; }
.sec-head .eyebrow { margin-bottom: var(--sp-3); }
.sec-head h2 { margin-bottom: var(--sp-3); }
.sec-head p { color: var(--muted); font-size: var(--fs-md); }

/* === DASHBOARD GRID =================================================
   Grid de 12 colunas com cards de diferentes tamanhos.
   Use .dash + .dash-card--cN onde N = quantas colunas (de 12).
*/
.dash {
  display: grid; gap: var(--sp-5);
  grid-template-columns: repeat(12, 1fr);
  padding-top: calc(var(--topstrip-h) + var(--header-h) + var(--sp-6));
  padding-bottom: var(--sp-7);
}
.dash-card {
  background: #fff;
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  box-shadow: 0 1px 0 var(--line), 0 4px 24px rgba(13,43,107,.04);
  grid-column: span 12;
  display: flex; flex-direction: column; gap: var(--sp-4);
}
.dash-card__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.dash-card__head h3 { margin: 0; }
.dash-card__sub { color: var(--muted); font-size: var(--fs-sm); }
.dash-card--padless { padding: 0; overflow: hidden; }
.dash-card--navy {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-3) 100%);
  color: #fff;
}
.dash-card--navy h3, .dash-card--navy h2, .dash-card--navy h1 { color: #fff; }
.dash-card--navy p, .dash-card--navy span, .dash-card--navy small { color: rgba(255,255,255,.88); }
.dash-card--navy .muted { color: rgba(255,255,255,.7); }
.dash-card--navy .dash-card__sub { color: rgba(255,255,255,.7); }
.dash-card--navy b { color: var(--yellow); }
.dash-card--yellow { background: var(--yellow); color: var(--navy); }
.dash-card--yellow h3 { color: var(--navy); }

@media (min-width: 720px) {
  .dash-card--c4 { grid-column: span 6; }
  .dash-card--c6 { grid-column: span 6; }
}
@media (min-width: 1024px) {
  .dash-card--c3 { grid-column: span 3; }
  .dash-card--c4 { grid-column: span 4; }
  .dash-card--c6 { grid-column: span 6; }
  .dash-card--c8 { grid-column: span 8; }
  .dash-card--c9 { grid-column: span 9; }
  .dash-card--c12{ grid-column: span 12; }
}

/* KPI compacto (usado nos cards do dashboard) */
.dash-kpi { display: flex; flex-direction: column; gap: var(--sp-2); }
.dash-kpi__rotulo { color: var(--muted); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.dash-kpi__valor  { font-size: clamp(28px, 3vw, 40px); font-weight: 800; color: var(--navy); letter-spacing: -.02em; line-height: 1; }
.dash-kpi__delta  { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.dash-kpi__delta--up { color: var(--green); }
.dash-kpi__delta--down { color: var(--danger); }
.dash-kpi__icone {
  width: 44px; height: 44px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-soft); font-size: 22px;
  margin-bottom: var(--sp-2);
}
.dash-kpi--yellow .dash-kpi__icone { background: var(--yellow); }
.dash-kpi--sky .dash-kpi__icone    { background: #D6F3FC; }
.dash-kpi--pink .dash-kpi__icone   { background: #FCE0E8; }
.dash-kpi--green .dash-kpi__icone  { background: #DCF3E2; }

/* ====================================================================
   RESPONSIVO MOBILE — ajustes para telas < 720px
   ==================================================================== */
@media (max-width: 720px) {
  /* Container com padding menor pra ganhar área útil */
  .container { padding-inline: var(--sp-4); }

  /* Seções: 120px vira ~56px de cada lado */
  .section { padding-block: var(--sp-7); }

  /* Hero foto: encurta a tela e reduz o padding interno */
  .hero--foto { min-height: auto; }
  .hero--foto .hero__inner { padding: calc(var(--topstrip-h) + var(--header-h) + var(--sp-6)) 0 var(--sp-7); }
  .hero h1 { max-width: 100%; }
  .hero p { font-size: var(--fs-base); }

  /* Hero curto (páginas internas) */
  .hero--curto { min-height: auto; padding: calc(var(--topstrip-h) + var(--header-h) + var(--sp-5)) 0 var(--sp-5); }

  /* Cabeçalho: pílula da marca menor, esconde texto se faltar espaço */
  .cabecalho__brand .mark { width: 36px; height: 36px; border-radius: 10px; }
  .cabecalho__brand { font-size: var(--fs-base); gap: var(--sp-2); }
  .cabecalho__row { gap: var(--sp-3); }
  /* CTAs no header só aparecem no drawer em telas pequenas (Entrar/Criar conta) */
  .cabecalho__cta { display: none; }

  /* Drawer: faz scroll quando passar da tela */
  .drawer { overflow-y: auto; }

  /* Botões da landing: cluster vira coluna pra evitar overflow */
  .hero .cluster, .cta-wrap .cluster { flex-direction: column; align-items: stretch; }
  .hero .cluster .btn, .cta-wrap .cluster .btn { width: 100%; justify-content: center; }

  /* Botões grandes em geral: reduzir o "lg" */
  .btn.lg { padding: 14px 22px; font-size: var(--fs-base); }

  /* Proof bar: empilha melhor */
  .proof { gap: var(--sp-4); padding: var(--sp-4) 0; flex-direction: column; text-align: center; }

  /* Sec-head e modelos head: alinhar à esquerda */
  .sec-head { margin-bottom: var(--sp-5); }

  /* Cards / feature */
  .feat { padding: var(--sp-5) var(--sp-4); }

  /* Card de modelo: padding interno menor pra caber 2 lado a lado */
  .card-modelo__body { padding: var(--sp-4) var(--sp-3); }
  .card-modelo h4 { font-size: var(--fs-md); }
  .card-modelo .meta { gap: var(--sp-3); font-size: var(--fs-xs); }
  .card-modelo .price b { font-size: var(--fs-lg); }
  .card-modelo__badge { padding: 3px 8px; font-size: 10px; top: 8px; left: 8px; }

  /* Cta-wrap: padding interno menor pra não comer texto */
  .cta-wrap { padding: var(--sp-6) var(--sp-5); border-radius: var(--r); }
  .cta-wrap h2 { font-size: clamp(26px, 6vw, 36px); }

  /* Depoimento: padding menor + arte menor */
  .depoimento { padding-block: var(--sp-7); }
  .depoimento__art { max-width: 240px; padding: var(--sp-5); }

  /* Stepper: dot menor */
  .stepper__item { grid-template-columns: 36px 1fr; gap: var(--sp-3); }
  .stepper__dot  { width: 36px; height: 36px; font-size: var(--fs-sm); }
  .stepper__item + .stepper__item::before { left: 17px; }
  .stepper__meta { grid-column: 2; margin-top: 4px; }

  /* Modal: padding menor */
  .modal { padding: var(--sp-5); border-radius: var(--r); }

  /* Rodapé: padding menor + colunas menores */
  .rodape { padding: var(--sp-7) 0 var(--sp-5); }
  .rodape__top { gap: var(--sp-5); grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin-bottom: var(--sp-5); }
  .rodape__base { font-size: var(--fs-xs); }

  /* WhatsApp FAB: um pouco menor pra não dominar a tela */
  .whatsapp-fab { width: 52px; height: 52px; bottom: var(--sp-4); right: var(--sp-4); }
  .whatsapp-fab svg { width: 28px; height: 28px; }

  /* Slider value: tamanho menor pra não quebrar layout */
  .slider__valor { font-size: var(--fs-lg); }

  /* Dashboard: padding-top respeitando header */
  .dash { padding-top: calc(var(--topstrip-h) + var(--header-h) + var(--sp-5)); gap: var(--sp-4); }
  .dash-card { padding: var(--sp-4); }

  /* Inputs com fonte 16px pra evitar zoom no iOS */
  .input, .select, .textarea { font-size: 16px; }
  .search select, .search input { font-size: 16px; }

  /* Dashboards (cliente/admin): cards-hero com padding menor */
  .boas-vindas, .docs-hero, .admin-hero { padding: var(--sp-5); border-radius: var(--r); }

  /* Chat: padding interno menor + altura adequada ao mobile */
  .chat__body { padding: var(--sp-4); max-height: 55vh; min-height: 320px; }
  .chat__header { padding: var(--sp-3); }
  .chat__form { padding: var(--sp-2); }
  .balao { max-width: 85%; }
}

/* Tabelas com rolagem horizontal em telas estreitas (admin) */
.tabela-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 720px) {
  .tabela th, .tabela td { padding: var(--sp-3); white-space: nowrap; }
  .tabela { min-width: 600px; }
}

/* === PainelEtapas — uma SEÇÃO por etapa do plano ===================
   Compartilhado entre cliente/inicio e admin/familia.
   - Cliente: stepper vertical (acompanha a jornada de cima pra baixo)
   - Admin: grid de cards lado a lado (visão geral mais densa) */
.painel-etapas { display: flex; flex-direction: column; gap: var(--sp-4); }
.painel-etapas--admin {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: var(--sp-3);
}
.painel-etapas--admin .painel-etapas__head { grid-column: 1 / -1; }
.painel-etapas__head { padding-bottom: var(--sp-3); border-bottom: 1px solid var(--line); }
.painel-etapas__head h3 { color: var(--navy); margin: 0 0 4px; }

.etapa-sec {
  background: #fff; border: 2px solid var(--line); border-radius: var(--r);
  padding: var(--sp-5);
  display: flex; flex-direction: column; gap: var(--sp-3);
  position: relative;
}
/* Admin = cards lado a lado, mais compactos */
.painel-etapas--admin .etapa-sec { padding: var(--sp-4); gap: var(--sp-2); }
.painel-etapas--admin .etapa-sec__head { grid-template-columns: 44px 1fr; }
.painel-etapas--admin .etapa-sec__num { width: 44px; height: 44px; font-size: 22px; border-radius: 12px; }
.painel-etapas--admin .etapa-sec__headtxt h4 { font-size: var(--fs-md); }
.painel-etapas--admin .etapa-sec__pill { grid-column: 1 / -1; justify-self: start; font-size: 10px; padding: 4px 10px; }
.painel-etapas--admin .etapa-sec__desc { font-size: var(--fs-xs); }
.painel-etapas--admin .etapa-acao { grid-template-columns: 32px 1fr; padding: var(--sp-3); }
.painel-etapas--admin .etapa-acao__icone { font-size: 20px; }
.painel-etapas--admin .etapa-acao__btns { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
.painel-etapas--admin .etapa-acao__btns .btn { padding: 8px 12px; font-size: var(--fs-xs); flex: 1 1 auto; }
.etapa-sec--feita  { background: #F9FBFA; border-color: #C5E5CE; }
.etapa-sec--atual  { border-color: var(--yellow); box-shadow: 0 4px 16px rgba(247,199,61,.18); }
.etapa-sec--futura { opacity: .6; }
.etapa-sec--futura:hover { opacity: 1; transition: opacity .2s ease; }

.etapa-sec__head {
  display: grid; grid-template-columns: 60px 1fr auto; gap: var(--sp-4);
  align-items: center;
}
.etapa-sec__num {
  width: 60px; height: 60px; border-radius: 16px;
  background: var(--navy); color: var(--yellow);
  display: grid; place-items: center;
  font-family: var(--font-body); font-weight: 800; font-size: 28px;
}
.etapa-sec--feita .etapa-sec__num  { background: var(--green); color: #fff; }
.etapa-sec--atual .etapa-sec__num  { background: var(--yellow); color: var(--navy); }
.etapa-sec--futura .etapa-sec__num { background: var(--bg-soft); color: var(--muted); }

.etapa-sec__headtxt h4 { color: var(--navy); margin: 0 0 2px; font-size: var(--fs-lg); }
.etapa-sec__headtxt small { color: var(--muted); font-size: var(--fs-xs); }
.etapa-sec__pill {
  padding: 6px 12px; border-radius: 999px;
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  white-space: nowrap;
}
.etapa-sec__pill--feita  { background: #DCF3E2; color: #186E2F; }
.etapa-sec__pill--atual  { background: var(--yellow); color: var(--navy); }
.etapa-sec__pill--futura { background: var(--bg-soft); color: var(--muted); }

.etapa-sec__desc { color: var(--ink-2); margin: 0; font-size: var(--fs-sm); line-height: 1.5; }

.etapa-sec__acoes { display: flex; flex-direction: column; gap: var(--sp-3); margin-top: var(--sp-2); }
.etapa-acao {
  display: grid; grid-template-columns: 48px 1fr auto;
  gap: var(--sp-3); align-items: center;
  padding: var(--sp-4); border-radius: var(--r-sm);
  background: var(--bg-soft);
}
.etapa-acao--cliente { background: #FFFBEA; border: 1px solid #F1DA88; }
.etapa-acao--admin   { background: #EAF6FE; border: 1px solid #B9DDF2; }
.etapa-acao__icone { font-size: 26px; }
.etapa-acao__txt b { display: block; color: var(--navy); font-size: var(--fs-sm); margin-bottom: 2px; }
.etapa-acao__txt span { color: var(--ink-2); font-size: var(--fs-xs); line-height: 1.3; display: block; }
.etapa-acao__btns { display: flex; flex-direction: column; gap: 6px; }
.etapa-acao__btns .btn { padding: 10px 18px; font-size: var(--fs-sm); white-space: nowrap; }

.etapa-sec__feita-info, .etapa-sec__futura-info {
  padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm);
  background: var(--bg-soft);
}

/* Artefatos por etapa (PDFs, imagens, notas, links) */
.etapa-sec__art { display: flex; flex-direction: column; gap: var(--sp-2); margin-top: var(--sp-2); }
.etapa-art-lista {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--sp-2);
}
.etapa-art {
  position: relative; padding: 8px;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--r-sm);
  display: flex; flex-direction: column; gap: 4px;
  font-size: var(--fs-xs);
}
.etapa-art--nota { background: #FFFBEA; border-color: #F1DA88; }
.etapa-art--link { background: #EAF6FE; border-color: #B9DDF2; }
.etapa-art__img { display: block; }
.etapa-art__img img { width: 100%; height: 80px; object-fit: cover; border-radius: 4px; }
.etapa-art__file, .etapa-art__link {
  display: block; padding: 6px 8px; background: #fff; border-radius: 4px;
  color: var(--navy); text-decoration: none; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.etapa-art__nota { color: var(--ink-2); font-size: var(--fs-xs); line-height: 1.4; white-space: pre-wrap; }
.etapa-art__titulo { color: var(--navy); font-weight: 700; }
.etapa-art__meta { font-size: 10px !important; }
.etapa-art__rm {
  position: absolute; top: 4px; right: 4px;
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0,0,0,.1); color: var(--muted); border: 0;
  cursor: pointer; font-size: 10px; line-height: 1;
  opacity: 0; transition: opacity .15s ease, background .15s ease;
}
.etapa-art:hover .etapa-art__rm { opacity: 1; }
.etapa-art__rm:hover { background: var(--danger); color: #fff; }
.etapa-art-add { align-self: flex-start; }

.painel-vazio {
  padding: var(--sp-7); text-align: center;
  background: var(--bg-soft); border-radius: var(--r);
}
.painel-vazio h3 { color: var(--navy); margin: 0 0 var(--sp-2); }
.painel-vazio p { color: var(--muted); margin: 0; }

@media (max-width: 720px) {
  .etapa-sec__head { grid-template-columns: 48px 1fr; }
  .etapa-sec__pill { grid-column: 1 / -1; justify-self: start; }
  .etapa-sec__num { width: 48px; height: 48px; font-size: 22px; }
  .etapa-acao { grid-template-columns: 36px 1fr; }
  .etapa-acao__btns { grid-column: 1 / -1; }
}

/* === Abas (Tabs) — navegação por seções ============================= */
.abas {
  display: flex; gap: 2px; overflow-x: auto;
  background: var(--bg-soft); padding: 4px;
  border-radius: var(--r-sm); border: 1px solid var(--line);
  scrollbar-width: thin;
}
.abas__btn {
  padding: 10px 18px; background: transparent; border: 0;
  color: var(--ink-2); border-radius: 8px; cursor: pointer;
  font-family: inherit; font-weight: 600; font-size: var(--fs-sm);
  white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
  transition: background .15s ease, color .15s ease;
}
.abas__btn:hover { background: rgba(13,43,107,.05); color: var(--navy); }
.abas__btn--ativa {
  background: #fff; color: var(--navy);
  box-shadow: 0 2px 6px rgba(13,43,107,.08);
}
.abas__badge {
  display: inline-grid; place-items: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--pink); color: #fff;
  border-radius: 999px;
  font-size: 10px; font-weight: 800;
}
[hidden] { display: none !important; }

/* Reserva o espaço do scrollbar SEMPRE — evita layout shift entre páginas/abas
   com conteúdos de altura diferente */
html { scrollbar-gutter: stable; }

/* === Aviso.carregando — overlay de loading com spinner ============ */
.aviso-loader {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(13, 43, 107, .45);
  display: grid; place-items: center;
  backdrop-filter: blur(2px);
}
.aviso-loader__caixa {
  background: #fff; padding: var(--sp-6) var(--sp-7);
  border-radius: var(--r); box-shadow: 0 12px 32px rgba(0,0,0,.2);
  text-align: center; max-width: 320px;
}
.aviso-loader__spin {
  width: 48px; height: 48px; margin: 0 auto var(--sp-4);
  border: 4px solid var(--bg-soft); border-top-color: var(--navy);
  border-radius: 50%; animation: aviso-spin 0.8s linear infinite;
}
.aviso-loader__txt { margin: 0; color: var(--navy); font-weight: 600; font-size: var(--fs-sm); }
@keyframes aviso-spin { to { transform: rotate(360deg); } }

/* Cada painel de aba ocupa 12 cols dentro do grid .dash do main.
   Use um wrapper interno .dash pra ter sub-grid de 12 cols (cards lado a lado). */
.aba-painel { grid-column: 1 / -1; }
.aba-painel[hidden] { display: none !important; }
.aba-painel > .dash { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--sp-5); padding: 0 !important; }
.aba-painel > .dash-card { width: 100%; }

/* === Modal de CONFIRMAÇÃO / PROMPT visual (substitui confirm/prompt nativos) === */
.modal-fundo--alto { z-index: 1000; }
.modal--confirm {
  max-width: 460px; text-align: center;
  padding: var(--sp-6);
}
.modal-confirm__icone { font-size: 48px; margin-bottom: var(--sp-3); }
.modal--confirm h3 { color: var(--navy); margin: 0 0 var(--sp-2); font-size: var(--fs-lg); }
.modal--confirm p { color: var(--ink-2); margin: 0 0 var(--sp-5); font-size: var(--fs-sm); line-height: 1.5; }
.modal--confirm .input, .modal--confirm textarea {
  width: 100%; padding: 10px 14px; font-size: var(--fs-sm);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: #fff; font-family: inherit;
  margin-bottom: var(--sp-4);
}
.modal--confirm textarea { resize: vertical; min-height: 80px; }
.modal-confirm__btns { display: flex; gap: var(--sp-3); justify-content: center; }
.modal-confirm__btns .btn { min-width: 120px; }

/* Tabs do modal "Anexar à etapa" */
.art-tabs { display: flex; gap: 2px; background: var(--bg-soft); padding: 4px; border-radius: var(--r-sm); }
.art-tab {
  flex: 1; padding: 8px 4px; background: transparent; border: 0;
  font-size: var(--fs-xs); font-weight: 600; color: var(--ink-2);
  cursor: pointer; border-radius: 6px; font-family: inherit;
}
.art-tab:hover { background: rgba(13,43,107,.05); color: var(--navy); }
.art-tab.ativa { background: #fff; color: var(--navy); box-shadow: 0 2px 6px rgba(13,43,107,.08); }

/* === ChatWidget — chat reutilizável =============================== */
.chat-widget {
  display: flex; flex-direction: column;
  background: var(--bg-soft); border-radius: var(--r); overflow: hidden;
  border: 1px solid var(--line);
}
.chat-widget__corpo {
  flex: 1; overflow-y: auto; padding: var(--sp-4);
  display: flex; flex-direction: column; gap: var(--sp-2);
}
.chat-widget__sep {
  align-self: center; padding: 4px 12px;
  background: rgba(13,43,107,.06); color: var(--muted);
  font-size: 11px; border-radius: 999px; margin: var(--sp-2) 0;
}
.chat-widget__balao {
  max-width: 78%; padding: 10px 14px; border-radius: 14px;
  display: flex; flex-direction: column; gap: 4px;
  font-size: var(--fs-sm); line-height: 1.4;
  word-wrap: break-word;
}
.chat-widget__balao--meu   { background: var(--navy); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-widget__balao--outro { background: #fff; align-self: flex-start; box-shadow: 0 1px 3px rgba(0,0,0,.05); border-bottom-left-radius: 4px; }
.chat-widget__balao--outro .chat-widget__autor { color: var(--navy); font-weight: 700; font-size: 11px; }
.chat-widget__balao--meu small { color: rgba(255,255,255,.7); }
.chat-widget__balao--outro small { color: var(--muted); }
.chat-widget__hora { font-size: 10px; align-self: flex-end; }
.chat-widget__texto { white-space: pre-wrap; }
.chat-widget__img {
  max-width: 100%; max-height: 220px; border-radius: 8px;
  cursor: zoom-in; display: block;
}
.chat-widget__arquivo {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; background: rgba(255,255,255,.15); color: inherit;
  border-radius: 8px; text-decoration: none; font-weight: 600;
}
.chat-widget__balao--outro .chat-widget__arquivo { background: var(--bg-soft); color: var(--navy); }
.chat-widget__vazio { margin: auto; padding: var(--sp-4); font-size: var(--fs-sm); }

.chat-widget__form {
  display: flex; gap: 6px; padding: var(--sp-3);
  border-top: 1px solid var(--line); background: #fff;
  align-items: center;
}
.chat-widget__anexo {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--bg-soft); display: grid; place-items: center;
  cursor: pointer; font-size: 18px;
  transition: background .15s ease;
}
.chat-widget__anexo:hover { background: #E1E8F2; }
.chat-widget__input { flex: 1; padding: 10px 14px; font-size: var(--fs-sm); }
.chat-widget__previa {
  display: flex; gap: 8px; align-items: center;
  padding: var(--sp-2) var(--sp-3);
  background: #FFFBEA; border-top: 1px solid #F1DA88;
  font-size: var(--fs-sm); color: var(--navy);
}
.chat-widget__previa-x {
  margin-left: auto; background: transparent; border: none;
  cursor: pointer; color: var(--muted); font-size: 16px;
}

.chat-widget__lightbox {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,.85); display: grid; place-items: center;
  cursor: zoom-out; padding: var(--sp-5);
}
.chat-widget__lightbox img { max-width: 95vw; max-height: 95vh; border-radius: 8px; }
.chat-widget__lightbox button {
  position: absolute; top: 16px; right: 16px;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.2); color: #fff; border: none;
  cursor: pointer; font-size: 18px;
}

/* === ChatFlutuante — popup canto inferior direito ============== */
.chat-flut-launcher {
  position: fixed; bottom: 24px; right: 24px; z-index: 60;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--navy); color: var(--yellow); border: 0;
  display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 6px 16px rgba(13,43,107,.3);
  transition: transform .15s ease;
}
.chat-flut-launcher:hover { transform: scale(1.06); }
.chat-flut-launcher__icon { font-size: 24px; }
.chat-flut-launcher__badge {
  position: absolute; top: -2px; right: -2px;
  min-width: 22px; height: 22px; padding: 0 6px;
  background: var(--pink); color: #fff; border-radius: 999px;
  font-size: 11px; font-weight: 800;
  display: grid; place-items: center;
  border: 3px solid var(--bg);
}

.chat-flut {
  position: fixed; bottom: 24px; right: 24px; z-index: 65;
  width: 360px; max-width: calc(100vw - 32px);
  height: 520px; max-height: calc(100vh - 100px);
  background: #fff; border-radius: var(--r);
  box-shadow: 0 12px 32px rgba(13,43,107,.25);
  border: 1px solid var(--line);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.chat-flut[hidden] { display: none !important; }
.chat-flut__head {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--navy); color: #fff;
}
.chat-flut__nome {
  display: flex; align-items: center; gap: var(--sp-2);
  color: #fff; text-decoration: none; font-weight: 700;
  flex: 1; min-width: 0;
}
.chat-flut__nome:hover { color: var(--yellow); }
.chat-flut__nome > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-sm); }
.chat-flut__av {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--yellow); color: var(--navy);
  display: grid; place-items: center; font-weight: 800; font-size: var(--fs-xs);
  flex-shrink: 0;
}
.chat-flut__av.sm { width: 28px; height: 28px; font-size: 10px; }
.chat-flut__acoes { display: flex; gap: 4px; }
.chat-flut__icon-btn {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.1); color: #fff; border: 0;
  display: grid; place-items: center; cursor: pointer;
  text-decoration: none; font-size: 14px;
  transition: background .15s ease;
}
.chat-flut__icon-btn:hover { background: rgba(255,255,255,.25); color: var(--yellow); }
.chat-flut__sel {
  background: rgba(255,255,255,.15); color: #fff; border: 0;
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; font-size: 16px;
  flex-shrink: 0;
}

.chat-flut__corpo { flex: 1; min-height: 0; }
.chat-flut__corpo .chat-widget { height: 100%; border: 0; border-radius: 0; background: #fff; }

/* Switcher de conversas (admin) */
.chat-flut__switcher {
  position: absolute; top: 56px; left: 8px; right: 8px;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-sm); box-shadow: 0 8px 20px rgba(13,43,107,.18);
  z-index: 70; max-height: 360px; display: flex; flex-direction: column;
  overflow: hidden;
}
.chat-flut__busca { margin: 8px; padding: 8px 12px; font-size: var(--fs-sm); border: 1px solid var(--line); border-radius: var(--r-sm); }
.chat-flut__lista { list-style: none; padding: 0; margin: 0; overflow-y: auto; }
.chat-flut__lista li {
  display: grid; grid-template-columns: 28px 1fr auto; gap: 10px;
  align-items: center; padding: 8px 12px; cursor: pointer;
  border-top: 1px solid var(--bg-soft);
}
.chat-flut__lista li:hover { background: var(--bg-soft); }
.chat-flut__lista b { display: block; color: var(--navy); font-size: var(--fs-xs); }
.chat-flut__lista small { display: block; color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.chat-flut__bgr { background: var(--pink); color: #fff; min-width: 18px; padding: 1px 6px; border-radius: 999px; font-size: 10px; font-weight: 800; text-align: center; }
.chat-flut__sem { padding: 16px; text-align: center; color: var(--muted); font-size: var(--fs-xs); }

@media (max-width: 540px) {
  .chat-flut { bottom: 0; right: 0; left: 0; max-width: 100vw; height: 90vh; border-radius: var(--r) var(--r) 0 0; }
  .chat-flut-launcher { bottom: 16px; right: 16px; }
}

/* Quando há menu inferior fixo, sobe o launcher pra não cobrir */
body.com-bottomnav .chat-flut-launcher { bottom: 88px; }
body.com-bottomnav .chat-flut { bottom: 88px; }
