/* Aluguéis Serra/ES. Padrão dos portais (régua QuintoAndar + Airbnb): neutro, foto em destaque, um acento.
   Raios: 12px mídia e painéis, 8px botões e campos, pílula em filtros e abas. */

:root {
  --bg: #fafaf9;
  --surface: #fefefd;
  --surface-2: #f2f2f0;
  --surface-3: #e9e9e6;
  --line: #e3e3e0;
  --line-forte: #c9cac6;
  --text: #1d201f;
  --text-2: #565c5a;
  --text-3: #686e6c;
  --accent: #0e6a62;
  --accent-hover: #0a564f;
  --accent-ink: #fbfdfc;
  --accent-soft: #e3efed;
  --novo: #8f5200;
  --baixa: #1a7039;
  --alta: #b2271b;
  --saiu: #b2271b;
  --foco: #0e6a62;
  --sombra-1: 0 1px 2px rgb(29 32 31 / 0.06), 0 1px 1px rgb(29 32 31 / 0.04);
  --sombra-2: 0 10px 28px rgb(29 32 31 / 0.14), 0 2px 6px rgb(29 32 31 / 0.08);
  --scrim: rgb(14 16 15 / 0.42);
  --r-midia: 12px;
  --r-ctrl: 8px;
  --topo-h: 64px;
  --gutter: 32px;
  --max: 1440px;
  --fonte: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-tema="claro"]) {
    --bg: #121514;
    --surface: #191d1c;
    --surface-2: #212625;
    --surface-3: #2a302e;
    --line: #2c3230;
    --line-forte: #414846;
    --text: #eceeed;
    --text-2: #aab1ae;
    --text-3: #959c99;
    --accent: #62c6b6;
    --accent-hover: #7fd3c5;
    --accent-ink: #072421;
    --accent-soft: #183532;
    --novo: #e6ad52;
    --baixa: #6cd096;
    --alta: #f4958b;
    --saiu: #f4958b;
    --foco: #62c6b6;
    --sombra-1: 0 1px 2px rgb(0 0 0 / 0.35);
    --sombra-2: 0 12px 32px rgb(0 0 0 / 0.5), 0 2px 8px rgb(0 0 0 / 0.35);
    --scrim: rgb(0 0 0 / 0.6);
    color-scheme: dark;
  }
}
:root[data-tema="escuro"] {
  --bg: #121514;
  --surface: #191d1c;
  --surface-2: #212625;
  --surface-3: #2a302e;
  --line: #2c3230;
  --line-forte: #414846;
  --text: #eceeed;
  --text-2: #aab1ae;
  --text-3: #959c99;
  --accent: #62c6b6;
  --accent-hover: #7fd3c5;
  --accent-ink: #072421;
  --accent-soft: #183532;
  --novo: #e6ad52;
  --baixa: #6cd096;
  --alta: #f4958b;
  --saiu: #f4958b;
  --foco: #62c6b6;
  --sombra-1: 0 1px 2px rgb(0 0 0 / 0.35);
  --sombra-2: 0 12px 32px rgb(0 0 0 / 0.5), 0 2px 8px rgb(0 0 0 / 0.35);
  --scrim: rgb(0 0 0 / 0.6);
  color-scheme: dark;
}

/* Base ------------------------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--line-forte) transparent; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--fonte);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--accent-soft); color: var(--text); }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3 { margin: 0; line-height: 1.2; text-wrap: balance; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.i { width: 20px; height: 20px; flex: none; fill: currentColor; }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--foco); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.btn, .btn-texto, .btn-icone, .pilula {
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border: 1px solid var(--line-forte); border-radius: var(--r-ctrl);
  background: var(--surface); font-weight: 600; white-space: nowrap;
}
.btn:hover { border-color: var(--text); }
.btn:active, .pilula:active, .btn-icone:active { transform: scale(0.97); }
.btn-primario { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primario:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-texto {
  border: 0; background: none; padding: 8px 4px; min-height: 36px;
  font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.btn-texto:hover { color: var(--accent); }
.btn-icone {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 999px; border: 0; background: none; color: var(--text);
}
.btn-icone:hover { background: var(--surface-2); }

/* Topo ------------------------------------------------------------------------------------------- */
.topo {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topo-linha {
  max-width: var(--max); margin: 0 auto; height: var(--topo-h);
  padding: 0 var(--gutter);
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px;
}
.marca { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; white-space: nowrap; }
.marca span { color: var(--text-3); font-weight: 500; }
.abas { display: flex; gap: 4px; justify-content: center; }
.abas button {
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: none;
  color: var(--text-2); font-weight: 600; white-space: nowrap;
}
.abas button:hover { background: var(--surface-2); color: var(--text); }
.abas button[aria-current="page"] { background: var(--text); color: var(--bg); }
.abas b { font-weight: 600; font-variant-numeric: tabular-nums; opacity: 0.7; }
.topo-acoes { display: flex; align-items: center; gap: 2px; }
.topo-acoes form { margin: 0; }
.atualizado { color: var(--text-3); font-size: 13px; margin-right: 8px; white-space: nowrap; }

/* Filtros ---------------------------------------------------------------------------------------- */
.vista { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.filtros {
  position: sticky; top: var(--topo-h); z-index: 20;
  margin: 0 calc(var(--gutter) * -1); padding: 14px var(--gutter);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
}
.filtros-linha { display: flex; align-items: center; gap: 10px; }
.busca {
  display: flex; align-items: center; gap: 8px;
  flex: 0 1 300px; min-width: 0; height: 44px; padding: 0 14px;
  border: 1px solid var(--line-forte); border-radius: 999px; background: var(--surface);
  color: var(--text-3);
}
.busca:focus-within { border-color: var(--text); color: var(--text); }
.busca input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--text); }
.busca input::placeholder { color: var(--text-3); }
.busca input::-webkit-search-cancel-button { filter: grayscale(1); }
.pilulas { display: flex; gap: 8px; align-items: center; min-width: 0; }
.pilula {
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line-forte); background: var(--surface); color: var(--text);
  font-size: 14px; font-weight: 500; white-space: nowrap;
}
.pilula .i { width: 16px; height: 16px; }
.pilula:hover { border-color: var(--text); }
.pilula[aria-expanded="true"] { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.pilula.ativa { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); font-weight: 600; }
.pilula-texto { border-color: transparent; background: none; text-decoration: underline; text-underline-offset: 3px; }
.pilula-texto:hover { border-color: transparent; color: var(--accent); }
.ordem { margin-left: auto; }
.pilula-ordem { border-color: transparent; background: none; }
.pilula-ordem:hover { background: var(--surface-2); border-color: transparent; }

/* Painel de filtro: popover no desktop, folha no celular */
.painel-filtro {
  margin: 0; padding: 0; border: 0; color: var(--text);
  width: min(380px, calc(100vw - 32px)); max-height: min(70vh, 560px);
  border-radius: var(--r-midia); background: var(--surface); box-shadow: var(--sombra-2);
  overflow: hidden; flex-direction: column;
}
.painel-filtro[open] { display: flex; }
.painel-filtro::backdrop { background: transparent; }
.painel-cabeca { display: none; align-items: center; justify-content: space-between; padding: 12px 12px 4px 20px; }
.painel-cabeca h2 { font-size: 17px; }
.painel-corpo { padding: 16px 20px; overflow: auto; display: grid; gap: 22px; }
.painel-pe {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 20px; border-top: 1px solid var(--line);
}
.grupo-filtro h3 { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.grupo-filtro .dica { color: var(--text-3); font-size: 13px; margin-top: 6px; }
.opcoes { display: grid; gap: 2px; }
.opcao {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 4px;
  border-radius: var(--r-ctrl); cursor: pointer;
}
.opcao:hover { background: var(--surface-2); }
.opcao input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); flex: none; }
.opcao span { flex: 1; }
.opcao small { color: var(--text-3); font-variant-numeric: tabular-nums; font-size: 13px; }
.segmentos { display: flex; flex-wrap: wrap; gap: 8px; }
.segmentos button {
  min-height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line-forte); background: var(--surface); font-size: 14px;
}
.segmentos button:hover { border-color: var(--text); }
.segmentos button[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); font-weight: 600; }
.faixa { display: grid; gap: 8px; }
.faixa output { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.faixa input[type="range"] { width: 100%; accent-color: var(--accent); }
.faixa-limites { display: flex; justify-content: space-between; color: var(--text-3); font-size: 13px; font-variant-numeric: tabular-nums; }

/* Lista ------------------------------------------------------------------------------------------ */
.lista-cabeca {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 6px 0 18px; min-height: 48px;
}
.lista-cabeca p { color: var(--text-2); font-size: 14px; }
.lista-cabeca p strong { color: var(--text); font-weight: 600; }
.grade {
  display: grid; gap: 40px 24px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  padding-bottom: 48px;
}
.vazio { grid-column: 1 / -1; padding: 72px 16px; text-align: center; display: grid; gap: 12px; justify-items: center; }
.vazio h2 { font-size: 20px; }
.vazio p { color: var(--text-2); max-width: 46ch; }

/* Card */
.card { position: relative; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card-midia {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-midia); overflow: hidden;
  background: var(--surface-2);
}
.trilho {
  display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.trilho::-webkit-scrollbar { display: none; }
.trilho a { flex: 0 0 100%; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.trilho img { width: 100%; height: 100%; object-fit: cover; }
.sem-foto { display: grid; place-items: center; height: 100%; color: var(--text-3); }
.sem-foto .i { width: 40px; height: 40px; }
.card.saiu .trilho img { filter: grayscale(1); opacity: 0.75; }
.midia-seta {
  position: absolute; top: 50%; translate: 0 -50%;
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 999px; border: 0;
  background: rgb(254 254 253 / 0.92); color: #1d201f; box-shadow: var(--sombra-1);
  opacity: 0; transition: opacity 0.15s, transform 0.1s;
}
.midia-seta .i { width: 16px; height: 16px; }
.midia-seta.ant { left: 10px; }
.midia-seta.prox { right: 10px; }
.card-midia:hover .midia-seta:not([disabled]) { opacity: 1; }
.midia-seta[disabled] { pointer-events: none; }
.pontos {
  position: absolute; left: 50%; bottom: 10px; translate: -50% 0;
  display: flex; gap: 5px; pointer-events: none;
}
.pontos i { width: 6px; height: 6px; border-radius: 999px; background: rgb(255 255 255 / 0.6); box-shadow: 0 0 2px rgb(0 0 0 / 0.4); }
.pontos i.atual { background: #fff; }
.salvar {
  position: absolute; top: 8px; right: 8px;
  display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 999px;
  background: none; color: #fff;
}
.salvar .i { width: 26px; height: 26px; filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.55)); }
.salvar[aria-pressed="true"] { color: #ff5a5f; }
.salvar:hover .i { transform: scale(1.06); }
.card-corpo { display: grid; gap: 3px; min-width: 0; }
.card-corpo:hover .card-total strong { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.rotulos { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; font-weight: 600; min-height: 0; }
.rotulos:empty { display: none; }
.rot { display: inline-flex; align-items: center; gap: 4px; }
.rot .i { width: 15px; height: 15px; }
.rot.novo { color: var(--novo); }
.rot.baixa { color: var(--baixa); }
.rot.alta, .rot.saiu { color: var(--alta); }
.rot.neutro { color: var(--text-2); }
.rot.marca { color: var(--accent); }
.card-total { display: flex; align-items: baseline; gap: 4px; margin-top: 2px; }
.card-total strong { font-size: 20px; font-weight: 650; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.card-total span { color: var(--text-2); font-size: 14px; }
.card-composicao { color: var(--text-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.specs { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0 2px; padding: 0; list-style: none; font-size: 14px; }
.specs li { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.specs .i { width: 17px; height: 17px; color: var(--text-2); }
.card-local { font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-local span { color: var(--text-2); }
.card-colegio { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text); }
.card-colegio .i { width: 17px; height: 17px; color: var(--accent); }
.card-meta { color: var(--text-3); font-size: 13px; }

/* Esqueleto de carregamento */
.esqueleto .card-midia, .esqueleto .linha { background: var(--surface-2); }
.esqueleto .linha { height: 14px; border-radius: 4px; }
.esqueleto .linha.g { height: 20px; width: 45%; }
.esqueleto .linha.m { width: 75%; }
.esqueleto .linha.p { width: 55%; }
@media (prefers-reduced-motion: no-preference) {
  .esqueleto .card-midia, .esqueleto .linha { animation: pulso 1.4s ease-in-out infinite; }
}
@keyframes pulso { 50% { opacity: 0.55; } }

/* Rodapé */
.rodape {
  display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center;
  padding: 24px 0 40px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 13px;
}
.rodape span { display: inline-flex; align-items: center; gap: 6px; }
.rodape .i { width: 15px; height: 15px; }
.rodape .ok .i { color: var(--baixa); }
.rodape .erro { color: var(--alta); }

/* Página do imóvel ------------------------------------------------------------------------------- */
#vista-imovel { max-width: 1160px; padding-bottom: 64px; }
.imovel-barra { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0 12px; }
.voltar { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 8px; margin-left: -8px; border-radius: 999px; font-weight: 600; }
.voltar:hover { background: var(--surface-2); }
.imovel-acoes { display: flex; gap: 4px; }
.imovel-acoes .btn-texto { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; padding: 8px 10px; border-radius: var(--r-ctrl); }
.imovel-acoes .btn-texto:hover { background: var(--surface-2); color: var(--text); text-decoration: underline; }
.imovel-acoes .i { width: 18px; height: 18px; }
.imovel-acoes [aria-pressed="true"] .i { color: #ff5a5f; }
.imovel-titulo { display: grid; gap: 6px; margin-bottom: 20px; }
.imovel-titulo h1 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 650; letter-spacing: -0.015em; }
.imovel-titulo p { color: var(--text-2); }
.aviso-saiu { color: var(--saiu); font-weight: 600; }

.galeria-grade {
  position: relative; display: grid; gap: 8px;
  grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr;
  height: clamp(300px, 42vw, 460px); border-radius: var(--r-midia); overflow: hidden;
}
.galeria-grade button { position: relative; padding: 0; border: 0; background: var(--surface-2); overflow: hidden; cursor: zoom-in; }
.galeria-grade button:first-child { grid-row: 1 / 3; }
.galeria-grade img { width: 100%; height: 100%; object-fit: cover; transition: filter 0.2s; }
.galeria-grade button:hover img { filter: brightness(0.92); }
.galeria-grade.n1 { grid-template-columns: 1fr; }
.galeria-grade.n2 { grid-template-columns: 2fr 1fr; }
.galeria-grade.n2 button:nth-child(2) { grid-row: 1 / 3; }
.galeria-grade.n3 { grid-template-columns: 2fr 1fr; }
.galeria-grade.n4 { grid-template-columns: 2fr 1fr 1fr; }
.galeria-grade.n4 button:nth-child(4) { grid-column: 2 / 4; }
.saiu-midia img { filter: grayscale(1); }
.ver-fotos {
  position: absolute; right: 16px; bottom: 16px;
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px;
  border: 1px solid var(--text); border-radius: var(--r-ctrl);
  background: var(--surface); color: var(--text); font-size: 14px; font-weight: 600;
}
.ver-fotos .i { width: 18px; height: 18px; }
.carrossel { display: none; }

.imovel-corpo { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 64px; margin-top: 32px; align-items: start; }
.imovel-principal { display: grid; gap: 0; min-width: 0; }
.imovel-principal > section { padding: 32px 0; border-top: 1px solid var(--line); }
.imovel-principal > section:first-child { padding-top: 0; border-top: 0; }
.imovel-principal h2 { font-size: 20px; font-weight: 650; margin-bottom: 16px; letter-spacing: -0.01em; }
.fatos { display: flex; flex-wrap: wrap; gap: 10px 28px; padding: 0; margin: 0; list-style: none; }
.fatos li { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.fatos .i { width: 22px; height: 22px; color: var(--text-2); }
.fatos small { display: block; color: var(--text-3); font-size: 13px; }
.colegio { display: grid; gap: 16px; }
.colegio-linha { display: flex; align-items: flex-start; gap: 14px; }
.colegio-linha > .i { width: 26px; height: 26px; color: var(--accent); margin-top: 1px; }
.colegio-linha strong { display: block; font-size: 16px; font-weight: 600; }
.colegio-linha p { color: var(--text-2); font-size: 14px; }
.trajetos { display: flex; flex-wrap: wrap; gap: 12px; }
.trajeto {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; min-width: 180px;
  border: 1px solid var(--line); border-radius: var(--r-midia);
}
.trajeto .i { width: 22px; height: 22px; color: var(--text-2); }
.trajeto strong { display: block; font-size: 16px; font-variant-numeric: tabular-nums; }
.trajeto span { color: var(--text-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.descricao { white-space: pre-line; max-width: 70ch; color: var(--text); }
.descricao.recolhida { display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
.mais { margin-top: 8px; }
.comodidades { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 40px; }
.comodidades h3 { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.comodidades ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.comodidades li { display: flex; align-items: center; gap: 10px; }
.comodidades li .i { width: 18px; height: 18px; color: var(--text-2); }
.destaques-imovel { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 20px; }
.destaques-imovel span { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.destaques-imovel .i { width: 20px; height: 20px; color: var(--accent); }
.mapa { height: 360px; border-radius: var(--r-midia); overflow: hidden; background: var(--surface-2); z-index: 0; }
.mapa-legenda { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin-top: 12px; color: var(--text-2); font-size: 14px; }
.mapa-legenda a { font-weight: 600; color: var(--text); text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; gap: 6px; }
.mapa-legenda a .i { width: 16px; height: 16px; }
.historico-resumo { margin-bottom: 16px; color: var(--text-2); }
.mapa-erro { padding: 16px; color: var(--text-2); }
.historico { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.historico li { display: grid; grid-template-columns: 92px 1fr; gap: 12px; font-size: 14px; }
.historico time { color: var(--text-3); font-variant-numeric: tabular-nums; }

/* Painel lateral (custo + marcação) */
.painel {
  position: sticky; top: calc(var(--topo-h) + 24px);
  display: grid; gap: 20px; padding: 24px;
  border: 1px solid var(--line); border-radius: var(--r-midia); background: var(--surface);
  box-shadow: 0 6px 16px rgb(29 32 31 / 0.06);
}
.custo-total { display: flex; align-items: baseline; gap: 6px; }
.custo-total strong { font-size: 26px; font-weight: 650; letter-spacing: -0.015em; font-variant-numeric: tabular-nums; }
.custo-total span { color: var(--text-2); }
.custo-linhas { display: grid; gap: 8px; margin: 14px 0 0; font-size: 14px; }
.custo-linhas div { display: flex; justify-content: space-between; gap: 12px; }
.custo-linhas dt { color: var(--text-2); }
.custo-linhas dd { margin: 0; font-variant-numeric: tabular-nums; }
.custo-linhas .soma { padding-top: 10px; border-top: 1px solid var(--line); font-weight: 600; }
.custo-linhas .soma dt { color: var(--text); }
.custo-nota { color: var(--text-3); font-size: 13px; margin-top: 8px; }
.garantias { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r-ctrl); background: var(--surface-2); font-size: 14px; }
.garantias .i { width: 22px; height: 22px; color: var(--accent); }
.garantias strong { display: block; font-weight: 600; }
.garantias p { color: var(--text-2); }
.marcacao { display: grid; gap: 14px; }
.marcacao h3, .anuncios h3 { font-size: 15px; font-weight: 600; }
.status-grade { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.status-grade button {
  display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px;
  border: 1px solid var(--line-forte); border-radius: var(--r-ctrl); background: var(--surface);
  font-size: 14px; font-weight: 500; text-align: left;
}
.status-grade button:hover { border-color: var(--text); }
.status-grade button .i { width: 18px; height: 18px; color: var(--text-2); }
.status-grade button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; box-shadow: inset 0 0 0 1px var(--accent); }
.status-grade button[aria-pressed="true"] .i { color: var(--accent); }
.status-grade button[data-status="descartado"][aria-pressed="true"] { border-color: var(--alta); background: color-mix(in srgb, var(--alta) 10%, var(--surface)); box-shadow: inset 0 0 0 1px var(--alta); }
.status-grade button[data-status="descartado"][aria-pressed="true"] .i { color: var(--alta); }
.campo { display: grid; gap: 6px; font-size: 14px; font-weight: 500; }
.campo input, .campo textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line-forte); border-radius: var(--r-ctrl);
  background: var(--surface); font-weight: 400; color: var(--text);
}
.campo input:focus, .campo textarea:focus { outline: none; border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.campo textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.campo textarea::placeholder { color: var(--text-3); }
.autor { color: var(--text-3); font-size: 13px; }
.anuncios { display: grid; gap: 10px; }
.anuncios ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.anuncio {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--r-ctrl);
}
.anuncio:hover { border-color: var(--text); }
.anuncio div { flex: 1; min-width: 0; }
.anuncio strong { display: block; font-size: 14px; }
.anuncio span { display: block; color: var(--text-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.anuncio .i { width: 18px; height: 18px; color: var(--text-2); }
.anuncio.fora { opacity: 0.6; }

.parecidos { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.parecidos h2 { font-size: 20px; font-weight: 650; margin-bottom: 20px; }
.parecidos .grade { grid-template-columns: repeat(4, minmax(0, 1fr)); padding-bottom: 0; }
.barra-celular { display: none; }

/* Galeria em tela cheia */
.galeria-tela {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: #0d0f0e; color: #f2f3f2; flex-direction: column;
}
.galeria-tela[open] { display: flex; }
.galeria-tela::backdrop { background: #0d0f0e; }
.galeria-tela .btn-icone { color: #f2f3f2; }
.galeria-tela .btn-icone:hover { background: rgb(255 255 255 / 0.1); }
.gt-topo { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 10px 16px; }
.gt-contador { font-size: 14px; font-variant-numeric: tabular-nums; color: #cfd3d1; }
.gt-palco { position: relative; flex: 1; min-height: 0; }
.gt-trilho {
  display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  outline: none; overscroll-behavior: contain;
}
.gt-trilho::-webkit-scrollbar { display: none; }
.gt-trilho figure { flex: 0 0 100%; height: 100%; margin: 0; scroll-snap-align: center; scroll-snap-stop: always; display: grid; place-items: center; padding: 0 72px; }
.gt-trilho img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.gt-seta {
  position: absolute; top: 50%; translate: 0 -50%;
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 999px;
  border: 1px solid rgb(255 255 255 / 0.25); background: rgb(20 22 21 / 0.6); color: #fff;
}
.gt-seta:hover { background: rgb(40 44 42 / 0.85); }
.gt-seta[disabled] { opacity: 0.3; pointer-events: none; }
.gt-ant { left: 16px; }
.gt-prox { right: 16px; }
.gt-miniaturas { display: flex; gap: 8px; padding: 12px 16px 16px; overflow-x: auto; scrollbar-width: thin; justify-content: safe center; }
.gt-miniaturas button { flex: none; width: 72px; height: 54px; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: #1b1e1d; opacity: 0.55; }
.gt-miniaturas button[aria-current="true"] { border-color: #fff; opacity: 1; }
.gt-miniaturas button:hover { opacity: 1; }
.gt-miniaturas img { width: 100%; height: 100%; object-fit: cover; }

/* Mapa (Leaflet) */
.leaflet-container { font: 13px/1.4 var(--fonte); background: var(--surface-2); }
.leaflet-container a { color: var(--accent); }
.pino-colegio {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 999px;
  background: var(--text); color: var(--bg); border: 2px solid var(--bg); box-shadow: var(--sombra-1);
}
.pino-colegio .i { width: 18px; height: 18px; }
.pino-imovel {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); border: 2px solid var(--bg); box-shadow: var(--sombra-1);
}
.pino-imovel .i { width: 18px; height: 18px; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface); color: var(--text); box-shadow: var(--sombra-2); }
.leaflet-popup-content { margin: 10px 14px; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 60;
  translate: -50% 8px; padding: 10px 16px; border-radius: var(--r-ctrl);
  background: var(--text); color: var(--bg); font-size: 14px; font-weight: 500;
  opacity: 0; pointer-events: none; transition: opacity 0.2s var(--ease), translate 0.2s var(--ease);
}
.toast.show { opacity: 1; translate: -50% 0; }

/* Transição card → imóvel */
::view-transition-old(capa), ::view-transition-new(capa) { animation-duration: 0.26s; animation-timing-function: var(--ease); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.18s; }
@media (prefers-reduced-motion: reduce) {
  *, ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; transition: none !important; }
}

/* Responsivo ------------------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .atualizado { display: none; }
}
@media (max-width: 1023px) {
  :root { --gutter: 24px; }
  .topo-linha { grid-template-columns: auto 1fr; height: auto; padding-top: 10px; gap: 4px 16px; }
  .topo-acoes { justify-self: end; }
  .abas { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 2px var(--gutter) 10px; }
  .abas::-webkit-scrollbar { display: none; }
  .imovel-corpo { grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; }
  .parecidos .grade { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .busca { flex: 1 1 auto; }
  .pilulas [data-filtro="bairros"], .pilulas [data-filtro="tipo"], .pilulas [data-filtro="quartos"], .pilulas [data-filtro="preco"] { display: none; }
  .imovel-corpo { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 24px; }
  .painel { position: static; order: -1; margin-bottom: 32px; box-shadow: none; }
}
@media (max-width: 719px) {
  :root { --gutter: 16px; }
  /* No celular só a busca fica fixa; o topo rola junto. */
  .topo { position: relative; }
  .filtros { top: 0; }
  body { font-size: 16px; }
  .topo-linha { padding-top: 6px; }
  .marca { font-size: 16px; }
  .abas button { height: 38px; padding: 0 12px; font-size: 15px; }
  .filtros { padding: 10px var(--gutter); }
  .filtros-linha { gap: 6px; }
  .busca { flex: 1 1 auto; height: 44px; padding: 0 12px; }
  .pilulas { flex: none; }
  #limpar { display: none; }
  .pilula { padding: 0 12px; }
  .pilula-ordem { width: 40px; padding: 0; justify-content: center; }
  .pilula-ordem span { display: none; }
  .lista-cabeca { padding: 2px 0 14px; min-height: 0; }
  .grade { gap: 32px; }
  .card-total strong { font-size: 21px; }
  .midia-seta { display: none; }
  /* Painel de filtro vira folha que sobe de baixo */
  .painel-filtro {
    position: fixed; inset: auto 0 0 0; width: 100%; max-width: none; max-height: 88dvh;
    border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom);
  }
  .painel-filtro::backdrop { background: var(--scrim); }
  .painel-cabeca { display: flex; }
  /* Imóvel */
  #vista-imovel { padding: 0; }
  .imovel-barra { padding: 8px 8px; position: sticky; top: 0; z-index: 10; background: var(--bg); }
  .voltar { margin-left: 0; }
  .galeria-grade { display: none; }
  .carrossel { display: block; position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); }
  .carrossel .trilho button { flex: 0 0 100%; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; padding: 0; border: 0; background: none; }
  .carrossel img { width: 100%; height: 100%; object-fit: cover; }
  .carrossel-contador {
    position: absolute; right: 12px; bottom: 12px; padding: 4px 10px; border-radius: 999px;
    background: rgb(20 22 21 / 0.72); color: #fff; font-size: 13px; font-variant-numeric: tabular-nums;
  }
  .imovel-titulo, .imovel-corpo, .parecidos { padding-left: var(--gutter); padding-right: var(--gutter); }
  .imovel-titulo { margin: 20px 0 0; }
  .comodidades { grid-template-columns: 1fr; }
  .mapa { height: 300px; }
  .trajeto { flex: 1 1 100%; }
  .parecidos .grade { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
  .barra-celular {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: sticky; bottom: 0; z-index: 15; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
    background: var(--surface); border-top: 1px solid var(--line);
  }
  .barra-celular strong { font-size: 18px; font-variant-numeric: tabular-nums; }
  .barra-celular span { display: block; color: var(--text-2); font-size: 13px; }
  .barra-celular .acoes { display: flex; gap: 6px; }
  .barra-celular .acoes button {
    display: grid; place-items: center; width: 46px; height: 46px; border-radius: var(--r-ctrl);
    border: 1px solid var(--line-forte); background: var(--surface);
  }
  .barra-celular .acoes button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
  .barra-celular .acoes button[data-status="descartado"][aria-pressed="true"] { border-color: var(--alta); color: var(--alta); background: color-mix(in srgb, var(--alta) 10%, var(--surface)); }
  .gt-trilho figure { padding: 0; }
  .gt-seta { display: none; }
  .gt-miniaturas { justify-content: flex-start; }
  .rodape { padding-bottom: 32px; }
}

/* Login ------------------------------------------------------------------------------------------ */
.login-pagina { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.login {
  width: 100%; max-width: 380px; display: grid; gap: 16px; padding: 32px 28px;
  border: 1px solid var(--line); border-radius: var(--r-midia); background: var(--surface); box-shadow: var(--sombra-2);
}
.login h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.login h1 span { color: var(--text-3); font-weight: 500; }
.login > p { color: var(--text-2); font-size: 14px; margin-top: -8px; }
.login .btn { width: 100%; margin-top: 4px; }
.login .erro { color: var(--alta); font-size: 14px; font-weight: 500; }
