/* Visual no estilo Airbnb: fundo branco, foto como protagonista, texto direto sobre o fundo. */
:root {
  color-scheme: light;
  --fundo: #ffffff;
  --superficie: #ffffff;
  --superficie-2: #f7f7f7;
  --texto: #222222;
  --texto-2: #6a6a6a;
  --texto-3: #b0b0b0;
  --borda: #dddddd;
  --borda-forte: #b0b0b0;
  --acento: #ff385c;
  --acento-escuro: #e00b41;
  --verde: #008a05;
  --azul: #006aff;
  --laranja: #c13515;
  --vermelho: #c13515;
  --cinza: #8a8a8a;
  /* Faixas do condomínio: até 600 / 601–799 / 800+ */
  --cond-bom: #008a05;
  --cond-medio: #b07800;
  --cond-alto: #d93900;
  --sombra-flutuante: 0 6px 16px rgba(0, 0, 0, 0.12);
  --sombra-leve: 0 1px 2px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.05);
  --raio: 12px;
  --fonte: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --fundo: #121212;
    --superficie: #1c1c1c;
    --superficie-2: #242424;
    --texto: #f5f5f5;
    --texto-2: #a6a6a6;
    --texto-3: #5c5c5c;
    --borda: #333333;
    --borda-forte: #555555;
    --acento: #ff385c;
    --acento-escuro: #ff5a78;
    --verde: #3ccf4e;
    --azul: #4c9aff;
    --laranja: #ff8a65;
    --vermelho: #ff6b6b;
    --cinza: #8a8a8a;
    --cond-bom: #3ccf4e;
    --cond-medio: #ffcc33;
    --cond-alto: #ff6b4a;
    --sombra-flutuante: 0 6px 20px rgba(0, 0, 0, 0.6);
    --sombra-leve: 0 1px 2px rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--fundo);
  color: var(--texto);
  font: 15px/1.35 var(--fonte);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--texto); outline-offset: 2px; }

/* ---------- topo ---------- */
.topo {
  position: sticky; top: 0; z-index: 1000;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 14px;
  background: var(--fundo);
  border-bottom: 1px solid var(--borda);
}
.topo-in { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 16px; }
.topo h1 { font-size: 22px; font-weight: 800; margin: 0; letter-spacing: -0.02em; color: var(--acento); }
.resumo { flex: 1; color: var(--texto-2); font-size: 14px; font-variant-numeric: tabular-nums; }

/* ---------- botões ---------- */
.icone {
  width: 36px; height: 36px;
  display: inline-grid; place-items: center;
  border: 1px solid var(--borda); border-radius: 50%;
  background: var(--superficie); color: var(--texto);
  cursor: pointer; flex: none;
  transition: box-shadow .15s, transform .1s;
}
.icone:hover { box-shadow: var(--sombra-leve); }
.icone:active { transform: scale(0.96); }
.icone svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icone.primario { background: var(--acento); border-color: var(--acento); color: #fff; width: 40px; height: 40px; }
.icone.primario:hover { background: var(--acento-escuro); }
.icone.ativo svg { fill: var(--acento); stroke: var(--acento); }
.icone:disabled { opacity: 0.4; cursor: default; }
.botao-texto {
  background: none; border: 0; padding: 4px 0;
  color: var(--texto); cursor: pointer; font-weight: 600;
  text-decoration: underline; text-underline-offset: 2px;
  display: inline-block;
}
.perigo { color: var(--vermelho) !important; }

/* ---------- página ---------- */
.pagina {
  width: 100%; max-width: 1200px; margin: 0 auto;
  padding: 24px 16px calc(48px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 20px;
}
.mapa-wrap {
  position: relative; height: 340px; border-radius: var(--raio); overflow: hidden;
  background: var(--superficie-2); border: 1px solid var(--borda);
}
#mapa { position: absolute; inset: 0; background: var(--superficie-2); }
.mapa-escuro .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(0.85) contrast(0.9) saturate(0.5); }
@media (max-width: 640px) { .mapa-wrap { height: 240px; } }

.legenda {
  position: absolute; left: 12px; bottom: 12px; z-index: 500;
  display: flex; gap: 12px; flex-wrap: wrap;
  background: var(--superficie); color: var(--texto);
  padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 500;
  box-shadow: var(--sombra-flutuante);
}
.legenda span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.dot.feita { background: var(--verde); }
.dot.agendada { background: var(--azul); }
.dot.nao_agendada { background: var(--cinza); }

/* ---------- filtros ---------- */
.controles { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; border-bottom: 1px solid var(--borda); }
.abas { display: flex; gap: 28px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.abas button {
  flex: none; border: 0; background: none; cursor: pointer; white-space: nowrap;
  padding: 10px 0 12px; font-size: 14px; font-weight: 600; color: var(--texto-2);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.abas button:hover { color: var(--texto); border-bottom-color: var(--borda); }
.abas button[aria-selected="true"] { color: var(--texto); border-bottom-color: var(--texto); }
.ordenar { padding-bottom: 8px; }
.ordenar select {
  width: auto; cursor: pointer;
  border: 1px solid var(--borda); border-radius: 999px; padding: 7px 14px;
  background: var(--superficie); font-size: 14px; font-weight: 600;
}

/* ---------- próximas visitas ---------- */
.proximas { border: 1px solid var(--borda); border-radius: var(--raio); padding: 16px 20px; display: grid; gap: 10px; }
.proximas h2 { margin: 0; font-size: 16px; font-weight: 600; }
.proximas button {
  display: flex; gap: 16px; align-items: baseline; text-align: left; min-width: 0; width: 100%;
  border: 0; background: none; padding: 0; cursor: pointer;
}
.proximas time { color: var(--texto); font-weight: 600; font-variant-numeric: tabular-nums; flex: none; }
.proximas .onde { min-width: 0; color: var(--texto-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proximas button:hover .onde { text-decoration: underline; }

/* ---------- cards ---------- */
.lista {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 40px 24px;
}
.card { cursor: pointer; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card.descartado { opacity: 0.5; }

.capa { position: relative; aspect-ratio: 20 / 19; border-radius: var(--raio); overflow: hidden; background: var(--superficie-2); }
.card.destaque .capa { box-shadow: 0 0 0 2px var(--texto); }
.trilho { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.trilho::-webkit-scrollbar { display: none; }
.trilho img { flex: none; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; }
.capa > svg { position: absolute; inset: 0; margin: auto; width: 48px; height: 48px; fill: none; stroke: var(--texto-3); stroke-width: 1.5; }

.capa .seta {
  position: absolute; top: 50%; translate: 0 -50%;
  width: 32px; height: 32px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, 0.92); color: #222; cursor: pointer;
  display: grid; place-items: center; box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  opacity: 0; transition: opacity .15s;
}
.capa .seta svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.capa .seta.ant { left: 10px; }
.capa .seta.prox { right: 10px; }
.card:hover .seta, .seta:focus-visible { opacity: 1; }
@media (hover: none) { .capa .seta { display: none; } }

.pontos { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.pontos i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.6); transition: background .15s, transform .15s; }
.pontos i.on { background: #fff; transform: scale(1.15); }

.selo {
  position: absolute; left: 12px; top: 12px; max-width: calc(100% - 140px);
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; color: #222; font-size: 13px; font-weight: 600;
  padding: 5px 10px; border-radius: 999px; box-shadow: 0 1px 4px rgba(0,0,0,0.18);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.coracao {
  position: absolute; right: 10px; top: 10px; width: 36px; height: 36px;
  border: 0; background: none; cursor: pointer; display: grid; place-items: center; padding: 0;
}
.coracao svg { width: 26px; height: 26px; fill: rgba(0, 0, 0, 0.45); stroke: #fff; stroke-width: 2; transition: transform .15s; }
.coracao:hover svg { transform: scale(1.08); }
.coracao.on svg { fill: var(--acento); }

.card .corpo { display: flex; flex-direction: column; gap: 14px; }
.card .cab { display: flex; flex-direction: column; gap: 2px; }
.card .preco { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.card .preco small { font-size: 14px; font-weight: 500; color: var(--texto-2); }
.card .titulo { font-size: 16px; font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.card .nota { flex: none; font-size: 14px; font-weight: 500; }
.card .sub { color: var(--texto-2); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.fatos { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--borda); border-radius: var(--raio); overflow: hidden; }
.fatos div { padding: 9px 12px; min-width: 0; border-right: 1px solid var(--borda); border-bottom: 1px solid var(--borda); }
.fatos div:nth-child(3n) { border-right: 0; }
.fatos div:nth-last-child(-n + 3) { border-bottom: 0; }
.fatos dt { font-size: 11px; font-weight: 600; color: var(--texto-2); text-transform: uppercase; letter-spacing: 0.04em; }
.fatos dd { margin: 2px 0 0; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fatos dd small { font-weight: 500; color: var(--texto-2); }
.fatos dd.vazio-val { color: var(--texto-3); font-weight: 500; }

.bloco h3 { margin: 0 0 8px; font-size: 11px; font-weight: 600; color: var(--texto-2); text-transform: uppercase; letter-spacing: 0.04em; }
.amenidades { display: flex; flex-wrap: wrap; gap: 6px; }
.amenidades span {
  font-size: 13px; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--borda); cursor: pointer;
  transition: color .15s, background .15s, border-color .15s;
}
.amenidades span:hover { border-color: var(--texto); }
.lista.realcando .amenidades span { color: var(--texto-3); border-color: var(--borda); }
.lista.realcando .amenidades span.match { color: var(--fundo); background: var(--texto); border-color: var(--texto); }
.card { transition: opacity .2s, filter .2s; }
.card.sem-amen { opacity: 0.3; filter: grayscale(1); }
.pin.apagado { opacity: 0.25; filter: grayscale(1); }
.pc { display: grid; gap: 6px; font-size: 14px; }
.pc ul { margin: 0; padding: 0; display: grid; gap: 3px; }
.pc li { list-style: none; display: flex; gap: 8px; }
.pc .mais { color: var(--verde); font-weight: 700; }
.pc .menos { color: var(--vermelho); font-weight: 700; }

/* Valor do condomínio colorido pela faixa */
.cond { font-weight: 600; }
.cond.bom { color: var(--cond-bom); }
.cond.medio { color: var(--cond-medio); }
.cond.alto { color: var(--cond-alto); }

.pill {
  font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--borda); color: var(--texto-2); white-space: nowrap;
}

.vazio { color: var(--texto-2); text-align: center; padding: 48px 12px; margin: 0; }

/* ---------- pins ---------- */
.pin {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px;
  background: #fff; color: #222; font: 700 13px/1.2 var(--fonte); white-space: nowrap;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.22);
  transform: translate(-50%, -50%); width: max-content;
  transition: transform .15s;
}
.pin:hover { transform: translate(-50%, -50%) scale(1.08); }
.pin.descartado { opacity: 0.45; }
.pin.aprox { outline: 1.5px dashed #222; outline-offset: 2px; }
.pin .dot { width: 7px; height: 7px; }
.pin.destaque { background: #222; color: #fff; transform: translate(-50%, -50%) scale(1.12); z-index: 1000; }
.leaflet-div-icon.pin-wrap { background: none; border: 0; }
.leaflet-container { font-family: var(--fonte); }
.leaflet-control-attribution { background: color-mix(in srgb, var(--superficie) 80%, transparent) !important; color: var(--texto-2) !important; }
.leaflet-control-attribution a { color: var(--texto-2) !important; }
.leaflet-bar { border: 0 !important; box-shadow: var(--sombra-flutuante) !important; border-radius: 8px !important; overflow: hidden; }
.leaflet-bar a { background: var(--superficie); color: var(--texto); border-color: var(--borda); }

/* ---------- folhas (dialogs) ---------- */
dialog.folha {
  border: 0; padding: 0; margin: auto;
  width: min(760px, 100vw); height: min(92vh, 1000px); max-height: 100vh;
  background: var(--fundo); color: var(--texto);
  border-radius: 16px; box-shadow: 0 8px 28px rgba(0,0,0,0.28);
  display: none; flex-direction: column; overflow: hidden;
}
dialog.folha[open] { display: flex; }
dialog.folha.pequena { height: auto; width: min(520px, 100vw); }
dialog.folha::backdrop { background: rgba(0,0,0,0.5); }
dialog.lightbox::backdrop { background: #000; }
@media (max-width: 820px) {
  dialog.folha { width: 100vw; height: 100%; max-width: 100vw; max-height: 100%; border-radius: 0; }
  dialog.folha.pequena { height: auto; margin-top: auto; margin-bottom: 0; border-radius: 16px 16px 0 0; }
}
dialog.folha > form { display: flex; flex-direction: column; min-height: 0; }

.folha-topo {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px;
  background: var(--fundo); border-bottom: 1px solid var(--borda);
}
.folha-topo .icone { border-color: transparent; }
.folha-topo .icone:hover { background: var(--superficie-2); box-shadow: none; }
.folha-topo .icone.primario { border-color: var(--acento); }
.folha-topo .icone.primario:hover { background: var(--acento-escuro); }
.folha-topo h2 { flex: 1; margin: 0; font-size: 16px; font-weight: 700; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.salvo { color: var(--texto-2); font-size: 12px; }
.folha-corpo > * { flex-shrink: 0; }
.folha-corpo {
  flex: 1; overflow-y: auto; padding: 20px 24px;
  padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 4px;
}
@media (max-width: 640px) { .folha-corpo { padding-left: 16px; padding-right: 16px; } }

.menu {
  position: absolute; right: 16px; top: calc(100% - 4px); z-index: 10;
  background: var(--superficie); border-radius: 12px; box-shadow: var(--sombra-flutuante);
  border: 1px solid var(--borda);
  display: flex; flex-direction: column; min-width: 240px; overflow: hidden; padding: 8px 0;
}
.menu button { border: 0; background: none; text-align: left; padding: 12px 16px; cursor: pointer; font-size: 14px; }
.menu button:hover { background: var(--superficie-2); }

/* ---------- formulário ---------- */
.grupo {
  border: 0; margin: 0; padding: 24px 0;
  border-bottom: 1px solid var(--borda);
  display: flex; flex-direction: column; gap: 12px; min-width: 0;
}
.grupo:last-of-type { border-bottom: 0; }
.grupo legend { float: left; width: 100%; padding: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 4px; }
.grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.campo { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.campo > span { font-size: 12px; font-weight: 600; color: var(--texto-2); }
input:not([type="file"]), select, textarea {
  width: 100%; border: 1px solid var(--borda-forte); border-radius: 8px; padding: 10px 12px;
  background: var(--superficie);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--texto); outline-offset: -1px; border-color: transparent; }
textarea { resize: vertical; }
.dica { margin: 0; color: var(--texto-2); font-size: 14px; }
.erro { margin: 0; color: var(--vermelho); font-size: 14px; }

.segmentado { display: flex; gap: 8px; flex-wrap: wrap; }
.segmentado button {
  border: 1px solid var(--borda); background: var(--superficie); padding: 8px 16px; border-radius: 999px;
  font-size: 14px; font-weight: 500; cursor: pointer;
}
.segmentado button:hover { border-color: var(--texto); }
.segmentado button.sel { background: var(--texto); color: var(--fundo); border-color: var(--texto); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 2px;
  border: 1px solid var(--borda); border-radius: 999px; padding: 5px 6px 5px 14px; font-size: 14px;
}
.chip button { border: 0; background: none; color: var(--texto-2); cursor: pointer; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.chip button:hover { background: var(--superficie-2); }
.chip button svg { width: 11px; height: 11px; stroke: currentColor; stroke-width: 2.5; fill: none; }
.chip.sugestao { border-style: dashed; color: var(--texto-2); padding: 5px 14px; cursor: pointer; background: none; }
.chip.sugestao:hover { border-color: var(--texto); color: var(--texto); }
.chips input { flex: 1 1 160px; width: auto; min-width: 140px; border-radius: 999px; padding: 6px 14px; }

.linha-add { display: flex; gap: 12px; align-items: center; }
.linha-add input { flex: 1; }

/* ---------- galeria do detalhe ---------- */
.galeria {
  display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: -20px -24px 0; scrollbar-width: thin;
}
@media (max-width: 640px) { .galeria { margin: -20px -16px 0; } }
.galeria .foto { position: relative; flex: none; scroll-snap-align: start; }
.galeria img { height: 300px; width: auto; max-width: 90vw; object-fit: cover; cursor: zoom-in; display: block; background: var(--superficie-2); }
.galeria .apagar-foto {
  position: absolute; top: 10px; right: 10px; width: 30px; height: 30px;
  background: rgba(255,255,255,0.92); color: #222; border: 0;
}
.galeria .apagar-foto svg { width: 12px; height: 12px; }
.galeria .sem-fotos {
  height: 180px; flex: 1; background: var(--superficie-2);
  display: grid; place-items: center; color: var(--texto-2); text-align: center; padding: 16px;
}
.galeria-acoes { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0 8px; }
.import-status { font-size: 13px; color: var(--texto-2); text-align: right; }

.numeros {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  border: 1px solid var(--borda); border-radius: var(--raio); overflow: hidden; margin: 8px 0 4px;
}
.numeros div { padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--borda); }
.numeros div:last-child { border-right: 0; }
.numeros div > span { font-size: 12px; font-weight: 600; color: var(--texto-2); }
.numeros b { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }

.links { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.links li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--borda); }
.links li:last-child { border-bottom: 0; }
.links a { min-width: 0; display: flex; flex-direction: column; color: var(--texto); text-decoration: none; }
.links a b { font-weight: 600; }
.links a span { color: var(--texto-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.links a:hover b { text-decoration: underline; }

.videos { display: grid; gap: 12px; }
.video { display: flex; flex-direction: column; gap: 6px; }
.video iframe, .video video { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--raio); background: #000; max-width: 100%; }
.video .linha { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 13px; }
.video .linha a { color: var(--texto); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.confirmar-apagar { border: 1px solid var(--vermelho); border-radius: var(--raio); padding: 16px; margin-top: 16px; }
.confirmar-apagar p { margin: 0 0 8px; }

/* ---------- lightbox ---------- */
dialog.lightbox {
  border: 0; padding: 0; margin: 0; width: 100vw; height: 100%; max-width: 100vw; max-height: 100%;
  background: #000; display: none; place-items: center;
}
dialog.lightbox[open] { display: grid; }
dialog.lightbox img { max-width: 100vw; max-height: 100vh; object-fit: contain; }
.lightbox .icone { position: absolute; background: rgba(255,255,255,0.12); border: 0; color: #fff; width: 44px; height: 44px; }
.lb-fechar { top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; }
.lb-ant { left: 12px; top: 50%; }
.lb-prox { right: 12px; top: 50%; }
.lb-contador { position: absolute; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); color: #fff; font-size: 13px; font-variant-numeric: tabular-nums; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  background: #222; color: #fff; padding: 12px 18px; border-radius: 10px; z-index: 3000;
  box-shadow: var(--sombra-flutuante); max-width: calc(100vw - 32px); font-size: 14px;
}

/* ---------- número do prédio faltando ---------- */
.num-faltando {
  border: 1px solid var(--acento); background: color-mix(in srgb, var(--acento) 10%, transparent); color: var(--acento);
  font-weight: 700; border-radius: 6px; padding: 0 7px; cursor: pointer; line-height: 1.4; font-size: 13px;
}
.num-faltando:hover { background: var(--acento); color: #fff; }
input.num-input { width: 5.5em !important; padding: 2px 8px !important; display: inline-block; font-size: 13px; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* ---------- detalhe só leitura ---------- */
.icone-espaco { width: 36px; flex: none; }
.coracao { pointer-events: none; }
.grupo > h3 { margin: 0 0 4px; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.det-cab { display: flex; flex-direction: column; gap: 4px; padding: 20px 0 16px; }
.det-preco { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.det-preco small { font-size: 16px; font-weight: 500; color: var(--texto-2); }
.det-local { font-size: 18px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.det-cab .sub { color: var(--texto-2); }
.det-visita { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-weight: 600; }
.pill.fav { color: var(--acento); border-color: var(--acento); }
.fatos-det { margin-bottom: 8px; }
.notas { margin: 0; line-height: 1.5; display: grid; gap: 6px; }
.notas p { margin: 0; }
.notas h4 { margin: 10px 0 0; font-size: 13px; font-weight: 600; color: var(--texto-2); text-transform: uppercase; letter-spacing: 0.04em; }
.notas.pc { font-size: 15px; }
.sub-notas { white-space: pre-wrap; }

/* Canto direito da foto: etiqueta "Notas" + coração */
.capa-dir { position: absolute; right: 10px; top: 10px; display: flex; align-items: center; gap: 4px; }
.capa-dir .coracao { position: static; }
.selo.selo-notas { position: static; max-width: none; border: 0; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600; }
.selo.selo-notas:hover { background: #f2f2f2; }
.sub-notas { color: var(--texto-2); }

/* ---------- análise atual ---------- */
.analise {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  background: var(--superficie); color: var(--texto);
  border: 1px solid var(--borda); border-radius: var(--raio); padding: 12px 16px;
  transition: border-color .15s, box-shadow .15s;
}
.analise:hover { border-color: var(--texto); box-shadow: var(--sombra-leve); }
.analise-rot { flex: none; font-weight: 600; }
.analise-res { flex: 1; min-width: 0; color: var(--texto-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.analise-data { flex: none; color: var(--texto-3); font-size: 13px; }
.analise svg { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 640px) { .analise-data { display: none; } }
.blocos { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.blocos:not(:has(> :not([hidden]))) { display: none; }

/* ---------- lista de validações ---------- */
.topo-acao { flex: none; font-size: 14px; padding: 8px 4px; }
.folha-topo:has(.topo-acao) .icone { flex: none; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li {
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid var(--borda); background: var(--fundo);
  position: relative;
}
.checklist label { flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; cursor: pointer; }
.checklist input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--acento); cursor: pointer; }
.checklist label span { line-height: 20px; }
.checklist li.feito label span { color: var(--texto-3); text-decoration: line-through; }
.checklist .alca { flex: none; display: grid; place-items: center; width: 36px; height: 44px; color: var(--texto-3); cursor: grab; touch-action: none; }
.checklist .alca svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; }
.checklist li.arrastando { z-index: 1; box-shadow: var(--sombra-flutuante); border-radius: 8px; }
.checklist li.arrastando .alca { cursor: grabbing; }

.md { font-size: 15px; line-height: 1.55; padding-bottom: 8px; }
.md h1, .md h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; margin: 28px 0 10px; }
.md h3 { font-size: 16px; font-weight: 600; margin: 20px 0 8px; }
.md > :first-child { margin-top: 4px; }
.md p { margin: 0 0 12px; }
.md ul, .md ol { margin: 0 0 12px; padding-left: 20px; }
.md li { margin: 4px 0; }
.md strong { font-weight: 600; }
.md-tabela { overflow-x: auto; margin: 0 0 16px; border: 1px solid var(--borda); border-radius: var(--raio); }
.md table { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
.md th, .md td { padding: 9px 12px; border-bottom: 1px solid var(--borda); text-align: left; vertical-align: top; }
.md th { font-size: 12px; font-weight: 600; color: var(--texto-2); background: var(--superficie-2); }
.md tr:last-child td { border-bottom: 0; }
.md td:first-child { font-weight: 600; white-space: nowrap; }
.md hr { border: 0; border-top: 1px solid var(--borda); margin: 24px 0; }
.md ul.pc-md { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 4px; }
.md ul.pc-md li { display: flex; gap: 8px; margin: 0; }
.md ul.pc-md .mais { color: var(--verde); font-weight: 700; flex: none; }
.md ul.pc-md .menos { color: var(--vermelho); font-weight: 700; flex: none; }
.md h3 + ul.pc-md { margin-top: 0; }
