/* Pontos — estilos */
:root {
  --tinta: #16202A;
  --tinta-2: #3A4652;
  --apagado: #55616D;
  --linha: #D9DEE3;
  --linha-2: #E8EBEE;
  --fundo: #EEF0F2;
  --painel: #FFFFFF;
  --destaque: #E8833A;
  --link: #1F5FAD;
  --ok: #0F6B4C;
  --erro: #A3241B;
  --raio: 10px;
  --sombra: 0 2px 10px rgba(22, 32, 42, .12);
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--tinta); background: var(--fundo); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--link); }
a:hover { color: #16467F; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #7FB0EA; outline-offset: 2px; }
.mono { font-family: var(--mono); font-weight: 500; }
.apagado { color: var(--apagado); }
.so-leitor { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- Topo ---------- */
.topo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding: 10px 20px; background: var(--tinta); color: #fff; position: relative; z-index: 5; }
.topo-marca { display: flex; flex-direction: column; text-decoration: none; color: #fff; margin-right: auto; }
.topo-marca:hover { color: #fff; }
.topo-sobre { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #B9C3CE; }
.topo-nome { font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.topo-nav { display: flex; gap: 2px; flex-wrap: wrap; }
.topo-nav a { color: #D5DCE3; text-decoration: none; padding: 9px 12px; border-radius: 6px; font-size: 14px; }
.topo-nav a:hover { background: #26323F; color: #fff; }
.topo-nav a[aria-current="page"] { background: #fff; color: var(--tinta); font-weight: 600; }
.topo-usuario { display: flex; gap: 12px; align-items: center; font-size: 13px; color: #B9C3CE; }
.topo-usuario a { color: #fff; }

/* ---------- Botões e campos ---------- */
.botao { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--linha); background: #fff; font-size: 14px; font-weight: 500; text-decoration: none; color: var(--tinta); white-space: nowrap; }
.botao:hover { border-color: #AEB7C0; color: var(--tinta); }
.botao-escuro { background: var(--tinta); border-color: var(--tinta); color: #fff; font-weight: 600; }
.botao-escuro:hover { background: #26323F; color: #fff; }
.botao-destaque { background: var(--destaque); border-color: var(--destaque); color: var(--tinta); font-weight: 600; }
.botao-destaque:hover { background: #F0954F; }
.botao-claro-escuro { background: transparent; border-color: #4A5866; color: #fff; }
.botao-claro-escuro:hover { color: #fff; border-color: #8090A0; }
.botao-perigo { color: var(--erro); }
.botao-peq { min-height: 34px; padding: 0 10px; font-size: 13px; }
.botao svg { width: 16px; height: 16px; flex: none; }
.botao:disabled { opacity: .5; cursor: default; }
.form-pilha { display: flex; flex-direction: column; gap: 14px; }
label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--apagado); }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea { min-height: 42px; padding: 8px 11px; border: 1px solid #C7CED5; border-radius: 8px; background: #fff; color: var(--tinta); font-size: 15px; width: 100%; }
textarea { line-height: 1.45; resize: vertical; }
.check { flex-direction: row; align-items: center; gap: 8px; color: var(--tinta); font-size: 14px; }
.check input { width: 18px; height: 18px; }
.grade-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chips-rotulo { font-size: 12px; color: var(--apagado); margin-right: 2px; }
.chip { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 11px; border-radius: 17px; border: 1px solid #C7CED5; background: #fff; font-size: 13px; color: var(--tinta); }
.chip[aria-pressed="true"] { background: var(--tinta); border-color: var(--tinta); color: #fff; }
.chip .bola { width: 10px; height: 10px; border-radius: 50%; background: var(--cor); box-shadow: 0 0 0 1.5px #fff; }
.chip svg { width: 13px; height: 13px; }

.segmentos { display: inline-flex; background: #26323F; border-radius: 8px; padding: 4px; gap: 4px; }
.segmentos button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 6px; background: transparent; color: #D5DCE3; font-size: 14px; }
.segmentos button[aria-pressed="true"] { background: #fff; color: var(--tinta); font-weight: 600; }
.segmentos-claro { background: #E3E7EB; }
.segmentos-claro button { color: var(--tinta-2); }
.segmentos-claro button[aria-pressed="true"] { box-shadow: 0 1px 3px rgba(22,32,42,.15); }

.aviso { padding: 10px 12px; border-radius: 8px; font-size: 14px; }
.aviso-erro { background: #FBEAE8; color: #7E1B14; }
.aviso-ok { background: #E3F3EC; color: #0B513A; }

/* ---------- Entrada (login, instalação) ---------- */
.pg-entrada { display: flex; min-height: 100%; align-items: center; justify-content: center; padding: 24px; background: var(--tinta); }
.entrada { width: 100%; max-width: 380px; background: #fff; border-radius: 14px; padding: 28px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.entrada .topo-sobre { color: var(--apagado); }
.entrada h1 { margin: 2px 0 18px; font-size: 26px; letter-spacing: -.01em; }
.entrada p { font-size: 14px; color: var(--tinta-2); }

/* ---------- Marcadores ---------- */
.mk { --tam: 24px; position: relative; width: var(--tam); height: var(--tam); padding: 0; border: 0; background: none; cursor: pointer; animation: mk-entra .5s cubic-bezier(.2,1.4,.4,1) backwards; }
.mk-forma { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--cor); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(22,32,42,.45); transition: transform .15s; }
.mk-c .mk-forma { border-radius: 50%; }
.mk-q .mk-forma { border-radius: 4px; }
.mk-forma svg { width: 14px; height: 14px; }
.mk-pendente .mk-forma { background: #fff; border: 3px solid var(--cor); }
.mk-avaliacao .mk-forma { outline: 2px dashed var(--cor); outline-offset: 2px; }
.mk:hover .mk-forma { transform: scale(1.15); }
.mk-sel { z-index: 3; }
.mk-sel .mk-forma { transform: scale(1.3); box-shadow: 0 0 0 4px rgba(22,32,42,.25), 0 2px 8px rgba(22,32,42,.5); }
.mk-fantasma { opacity: .38; pointer-events: none; animation: none; }
.mk-fantasma .mk-forma { box-shadow: none; }
.mk-removido { opacity: .45; }
.mk-removido .mk-forma { background: #5B6168; }
.mk-arrastar { --tam: 30px; cursor: grab; animation: none; }
.mk-arrastar .mk-forma { box-shadow: 0 0 0 6px rgba(232,131,58,.35), 0 4px 10px rgba(22,32,42,.4); }
.mk-selo { position: absolute; width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid #fff; }
.mk-selo-canil { top: -4px; right: -4px; background: #2B2F33; }
.mk-selo-posto { bottom: -4px; right: -4px; background: #fff; border-color: #2B2F33; }
.mk-sumir { animation: mk-sai .45s ease forwards; }
.mk-eu { width: 18px; height: 18px; border-radius: 50%; background: #1F5FAD; border: 3px solid #fff; box-shadow: 0 0 0 10px rgba(31,95,173,.18), 0 1px 4px rgba(0,0,0,.35); }
@keyframes mk-entra { from { transform: translateY(-14px) scale(.4); opacity: 0; } }
@keyframes mk-sai { to { transform: scale(.2); opacity: 0; } }
@keyframes pulso { 0% { box-shadow: 0 0 0 0 rgba(22,32,42,.45); } 100% { box-shadow: 0 0 0 18px rgba(22,32,42,0); } }
.mk-pulso .mk-forma { animation: pulso 1.2s ease-out 2; }

/* etiquetas de ação */
.etq { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 6px; border-radius: 4px; font-size: 12px; font-weight: 600; background: #E9ECEF; color: var(--tinta); white-space: nowrap; }
.etq svg { width: 12px; height: 12px; }
.etq-vazio { width: 9px; height: 9px; border-radius: 50%; border: 2px solid currentColor; }
.etq-realocar, .etq-novo, .etq-melhoria, .etq-fechar { background: var(--tinta); color: #fff; }
.etq-avaliacao { background: #fff; border: 1.5px dashed var(--tinta); padding: 1px 7px 1px 5px; }
.etq-pendente { background: #fff; border: 1px solid #C7CED5; color: var(--apagado); }

/* ---------- Mapa (controles) ---------- */
.mapa { position: relative; min-height: 0; background: #E4E7E2; }
.maplibregl-ctrl-group button { width: 36px; height: 36px; }
.legenda { position: absolute; left: 12px; bottom: 28px; z-index: 2; background: rgba(255,255,255,.96); border-radius: var(--raio); box-shadow: var(--sombra); padding: 9px 34px 9px 11px; font-size: 12px; max-width: min(330px, calc(100% - 24px)); }
.legenda .legenda-linhas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px 10px; }
.legenda-nota { margin-top: 5px; color: var(--apagado); font-size: 11.5px; }
.em-tour .legenda { display: none; }
.legenda h3 { margin: 0 0 6px; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--apagado); }
.legenda-linhas { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.legenda-item { display: inline-flex; align-items: center; gap: 6px; }
.legenda .mk { --tam: 16px; animation: none; pointer-events: none; }
.legenda .mk-forma svg { width: 9px; height: 9px; }
.legenda-bloco + .legenda-bloco, #leg-resto .legenda-bloco { margin-top: 7px; padding-top: 7px; border-top: 1px solid var(--linha-2); }
.legenda-recolher { position: absolute; top: 6px; right: 6px; border: 0; background: none; width: 28px; height: 28px; color: var(--apagado); }

/* ---------- Consulta ---------- */
.pg-consulta, .pg-editar { display: flex; flex-direction: column; height: 100%; }
.barra { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 20px; background: #1E2934; color: #fff; }
.barra-titulo { font-size: 17px; font-weight: 600; margin-right: auto; }
.resumo { display: flex; overflow-x: auto; background: #fff; border-bottom: 1px solid var(--linha); }
.resumo-item { display: flex; flex-direction: column; justify-content: center; gap: 1px; padding: 9px 18px; border-right: 1px solid var(--linha-2); white-space: nowrap; }
.resumo-num { font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.resumo-num .etq { font-size: 0; padding: 4px; gap: 0; }
.resumo-num .etq svg { width: 12px; height: 12px; }
.resumo-rot { font-size: 12px; color: var(--apagado); }
.filtros { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 9px 20px; background: #F7F8F9; border-bottom: 1px solid var(--linha); }
.filtros .busca { flex: 1 1 220px; max-width: 300px; min-height: 36px; }
.corpo { flex: 1; display: flex; min-height: 0; }
.corpo .mapa { flex: 1 1 auto; }
.lateral { width: 420px; flex: none; background: #fff; border-left: 1px solid var(--linha); display: flex; flex-direction: column; min-height: 0; }
.lateral-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--linha-2); }
.lateral-topo h2 { margin: 0; font-size: 15px; }
.lista { overflow-y: auto; flex: 1; padding: 8px 10px 16px; }
.cartao { display: block; width: 100%; text-align: left; border: 1px solid var(--linha-2); border-radius: var(--raio); background: #fff; padding: 11px 13px; margin-bottom: 7px; border-left: 4px solid var(--cor); }
.cartao:hover { border-color: #C3CAD1; border-left-color: var(--cor); }
.cartao-topo { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cartao-cod { font-family: var(--mono); font-size: 14px; font-weight: 500; }
.cartao-local { font-size: 14px; margin-top: 3px; }
.cartao-meta { font-size: 12.5px; color: var(--apagado); margin-top: 2px; }
.cartao-just { font-size: 13px; color: var(--tinta-2); margin-top: 5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lista-vazia { padding: 30px 16px; text-align: center; color: var(--apagado); font-size: 14px; }
.grupo-titulo { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--apagado); margin: 10px 4px 6px; }
.grupo-titulo .bola { width: 10px; height: 10px; border-radius: 50%; background: var(--cor); }

/* detalhe */
.detalhe { overflow-y: auto; flex: 1; }
.detalhe-cab { padding: 14px 16px; border-bottom: 1px solid var(--linha-2); border-top: 5px solid var(--cor); }
.detalhe-voltar { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--link); padding: 4px 0; font-size: 13px; margin-bottom: 6px; }
.detalhe-cod { font-family: var(--mono); font-size: 17px; font-weight: 500; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.detalhe-sec { padding: 14px 16px; border-bottom: 1px solid var(--linha-2); }
.detalhe-sec h3 { margin: 0 0 8px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--apagado); }
.dl { display: grid; grid-template-columns: 120px 1fr; gap: 5px 10px; font-size: 14px; margin: 0; }
.dl dt { color: var(--apagado); }
.dl dd { margin: 0; }
.antes-depois { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ad-col { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ad-rot { font-size: 12px; font-weight: 600; color: var(--apagado); }
.ad-pc { font-family: var(--mono); font-size: 13px; }
.just { white-space: pre-line; font-size: 14px; margin: 0; }
.fotos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.foto { position: relative; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: #E3E7EB; border: 0; padding: 0; display: block; width: 100%; }
.foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto-rot { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 7px 5px; font-size: 11.5px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.65)); text-align: left; }
.foto-vazia { display: flex; align-items: center; justify-content: center; text-align: center; font-size: 12px; color: var(--apagado); padding: 6px; border: 1px dashed #B8C0C8; background: #F7F8F9; }
.compara-fotos { display: grid; grid-template-columns: 58px repeat(2, minmax(0, 1fr)); gap: 6px 8px; align-items: center; }
.compara-fotos .cf-ano { font-size: 12px; font-weight: 600; color: var(--apagado); }
.compara-fotos .cf-cab { font-size: 12px; color: var(--apagado); }

/* tour */
.tour { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 4; width: min(560px, calc(100% - 24px)); background: #fff; border-radius: 14px; box-shadow: 0 12px 40px rgba(22,32,42,.3); padding: 16px 18px; animation: sobe .35s ease; }
.tour-topo { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12.5px; color: var(--apagado); }
.tour h2 { margin: 6px 0 2px; font-size: 18px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tour p { margin: 6px 0 0; font-size: 14px; white-space: pre-line; max-height: 110px; overflow-y: auto; }
.tour-acoes { display: flex; gap: 8px; margin-top: 12px; }
.tour-acoes .botao-escuro { margin-left: auto; }
.tour-barra { height: 3px; background: var(--linha-2); border-radius: 2px; margin-top: 10px; overflow: hidden; }
.tour-barra span { display: block; height: 100%; background: var(--destaque); transition: width .4s; }
.tour-capa h2 { font-size: 22px; }
@keyframes sobe { from { transform: translate(-50%, 20px); opacity: 0; } }

/* ---------- Edição ---------- */
.pg-editar .corpo { flex: 1; }
.lista-pontos { width: 320px; flex: none; background: #fff; border-right: 1px solid var(--linha); display: flex; flex-direction: column; min-height: 0; }
.lista-pontos-topo { padding: 12px 14px; border-bottom: 1px solid var(--linha-2); display: flex; flex-direction: column; gap: 9px; }
.progresso { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.progresso-linha { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.progresso-barra { height: 6px; border-radius: 3px; background: var(--linha-2); overflow: hidden; }
.progresso-barra span { display: block; height: 100%; background: var(--ok); }
.item-ponto { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--linha-2); background: #fff; padding: 9px 14px; border-left: 3px solid transparent; }
.item-ponto:hover { background: #F7F8F9; }
.item-ponto[aria-current="true"] { background: #F2F5F9; border-left-color: var(--tinta); }
.item-ponto .mk { --tam: 18px; animation: none; pointer-events: none; flex: none; }
.item-ponto .mk-forma svg { width: 10px; height: 10px; }
.item-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.item-txt .mono { font-size: 13px; }
.item-txt span:last-child { font-size: 12.5px; color: var(--apagado); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-fotos { font-size: 11px; color: var(--apagado); white-space: nowrap; }
.painel { width: 400px; flex: none; background: #fff; border-left: 1px solid var(--linha); display: flex; flex-direction: column; min-height: 0; }
.painel-rolagem { overflow-y: auto; flex: 1; }
.painel-rodape { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--linha-2); }
.painel-rodape .botao-escuro { flex: 1; }
.acoes-grade { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.acao-op { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 10px; border: 1px solid #C7CED5; border-radius: 8px; background: #fff; font-size: 13.5px; text-align: left; }
.acao-op .ic { width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--tinta); display: flex; align-items: center; justify-content: center; }
.acao-op .ic svg { width: 12px; height: 12px; }
.acao-op .ic-vazio { background: #fff; border: 2.5px solid var(--tinta); }
.acao-op .ic-tracejado { outline: 2px dashed var(--tinta); outline-offset: 1px; }
.acao-op[aria-checked="true"] { border-color: var(--tinta); background: var(--tinta); color: #fff; font-weight: 600; }
.acao-op[aria-checked="true"] .ic { background: #fff; }
.acao-op[aria-checked="true"] .ic svg { stroke: var(--tinta); }
.local-linha { display: flex; gap: 8px; align-items: flex-end; }
.local-linha label { flex: 1; }
.dica { font-size: 12.5px; color: var(--apagado); margin: 6px 0 0; }
.faixa-mapa { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 3; background: var(--tinta); color: #fff; border-radius: 10px; padding: 9px 12px 9px 14px; display: flex; align-items: center; gap: 12px; font-size: 14px; box-shadow: var(--sombra); max-width: calc(100% - 24px); }
.faixa-mapa .botao { min-height: 34px; }
.fotos-ed { display: flex; flex-direction: column; gap: 10px; }
.fotos-cat { display: flex; flex-direction: column; gap: 6px; }
.fotos-cat-topo { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; font-weight: 600; }
.mini-grade { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.mini { position: relative; }
.mini .foto { aspect-ratio: 1; }
.mini-x { position: absolute; top: 3px; right: 3px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 16px; line-height: 1; }
.add-foto { aspect-ratio: 1; border: 1px dashed #8A949E; border-radius: 8px; background: #F7F8F9; color: var(--tinta-2); font-size: 12.5px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; }
.add-foto input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.add-foto svg { width: 20px; height: 20px; }
.enviando { opacity: .6; pointer-events: none; }

/* ---------- Em campo (celular) ---------- */
.pg-campo { height: 100%; overflow: hidden; }
.pg-campo .topo { display: none; }
.campo { position: fixed; inset: 0; }
.campo .mapa { position: absolute; inset: 0; }
.campo-topo { position: absolute; top: max(10px, env(safe-area-inset-top)); left: 10px; right: 10px; z-index: 3; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.campo-topo > * { pointer-events: auto; }
.campo-busca { display: flex; align-items: center; gap: 6px; background: #fff; border-radius: 12px; padding: 0 6px 0 4px; min-height: 48px; box-shadow: var(--sombra); }
.campo-busca a { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; color: var(--tinta); }
.campo-busca input { border: 0 !important; min-height: 40px !important; padding: 0 4px !important; flex: 1; min-width: 0; outline: 0; }
.campo-busca select { width: auto !important; min-height: 36px !important; border: 0 !important; background: #EEF0F2 !important; font-size: 13px !important; padding: 0 8px !important; }
.campo-chips .chip { box-shadow: 0 1px 4px rgba(22,32,42,.2); border: 0; }
.botao-eu { position: absolute; right: 10px; top: calc(max(10px, env(safe-area-inset-top)) + 104px); z-index: 3; min-height: 48px; border-radius: 24px; border: 0; background: #fff; padding: 0 16px; font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; box-shadow: var(--sombra); }
.botao-eu svg { width: 18px; height: 18px; stroke: var(--link); }
.botao-eu[aria-pressed="true"] { background: var(--link); color: #fff; }
.botao-eu[aria-pressed="true"] svg { stroke: #fff; }
.gaveta { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; background: #fff; border-radius: 18px 18px 0 0; box-shadow: 0 -4px 18px rgba(22,32,42,.16); max-height: 46%; display: flex; flex-direction: column; padding-bottom: env(safe-area-inset-bottom); transition: max-height .25s; }
.gaveta.recolhida { max-height: 92px; }
.gaveta-alca { border: 0; background: none; padding: 8px 0 2px; display: flex; justify-content: center; }
.gaveta-alca span { width: 42px; height: 5px; border-radius: 3px; background: #C7CED5; }
.gaveta-topo { display: flex; justify-content: space-between; align-items: baseline; padding: 2px 16px 8px; gap: 8px; }
.gaveta-topo h2 { margin: 0; font-size: 16px; }
.gaveta-lista { overflow-y: auto; padding: 0 16px 10px; }
.prox { display: flex; align-items: center; gap: 12px; min-height: 58px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--linha-2); background: none; padding: 6px 0; }
.prox .mk { --tam: 20px; animation: none; pointer-events: none; flex: none; }
.prox .mk-forma svg { width: 11px; height: 11px; }
.prox-dist { font-weight: 600; font-size: 14px; white-space: nowrap; }
.prox-fotos { font-size: 11.5px; color: var(--apagado); }
.folha { position: fixed; inset: 0; z-index: 10; background: #F4F5F6; display: flex; flex-direction: column; animation: entra-dir .25s ease; }
@keyframes entra-dir { from { transform: translateX(30px); opacity: 0; } }
.folha-topo { display: flex; align-items: center; gap: 6px; padding: max(8px, env(safe-area-inset-top)) 12px 8px 4px; background: #fff; border-bottom: 1px solid var(--linha-2); border-top: 4px solid var(--cor); }
.folha-topo button { width: 44px; height: 44px; border: 0; background: none; display: flex; align-items: center; justify-content: center; }
.folha-topo svg { width: 22px; height: 22px; }
.folha-corpo { flex: 1; overflow-y: auto; padding: 14px 14px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }
.cartao-branco { background: #fff; border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.cartao-branco h2 { margin: 0; font-size: 15px; display: flex; justify-content: space-between; align-items: baseline; }
.estado-ok { font-size: 12px; font-weight: 600; color: var(--ok); }
.estado-pend { font-size: 12px; color: var(--apagado); font-weight: 400; }
.botao-camera { min-height: 56px; font-size: 15px; width: 100%; position: relative; }
.botao-camera input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.linha-botoes { display: flex; gap: 8px; }
.linha-botoes > * { flex: 1; }
.galeria-link { position: relative; align-self: center; font-size: 13.5px; color: var(--link); text-decoration: underline; }
.galeria-link input { position: absolute; inset: 0; opacity: 0; width: 100%; }
.foto-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--apagado); }

/* ---------- Administração ---------- */
.pg-admin main { max-width: 1100px; margin: 0 auto; padding: 20px; display: flex; flex-direction: column; gap: 20px; }
.bloco { background: #fff; border-radius: 12px; border: 1px solid var(--linha); }
.bloco-cab { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--linha-2); flex-wrap: wrap; }
.bloco-cab h2 { margin: 0; font-size: 16px; }
.tabela-caixa { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--linha-2); vertical-align: middle; }
th { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--apagado); background: #F7F8F9; }
td input { min-height: 36px !important; }
.selo { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; background: #E9ECEF; }
.selo-admin { background: var(--tinta); color: #fff; }
.selo-inativo { background: #FBEAE8; color: #7E1B14; }
.dialogo { border: 0; border-radius: 14px; padding: 0; width: min(440px, calc(100% - 24px)); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.dialogo::backdrop { background: rgba(22,32,42,.5); }
.dialogo form { padding: 22px; }
.dialogo h2 { margin: 0 0 14px; font-size: 18px; }
.dialogo-acoes { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; }
.senha-temp { font-family: var(--mono); font-size: 20px; background: #F2F5F9; padding: 12px; border-radius: 8px; text-align: center; letter-spacing: .05em; user-select: all; }

/* ---------- Avisos e visor ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; background: var(--tinta); color: #fff; padding: 11px 16px; border-radius: 10px; font-size: 14px; box-shadow: 0 6px 24px rgba(0,0,0,.25); transition: opacity .4s, transform .4s; max-width: calc(100% - 32px); }
.toast-erro { background: var(--erro); }
.toast.sai { opacity: 0; transform: translate(-50%, 10px); }
.visor { position: fixed; inset: 0; z-index: 60; background: rgba(10,14,18,.92); display: flex; align-items: center; justify-content: center; padding: 20px; }
.visor figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; gap: 8px; }
.visor img { max-width: 100%; max-height: calc(100vh - 90px); object-fit: contain; border-radius: 6px; }
.visor figcaption { color: #D5DCE3; font-size: 14px; text-align: center; }
.visor-fechar { position: absolute; top: 12px; right: 12px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: #fff; font-size: 26px; }
.carregando { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--apagado); font-size: 14px; }

/* ---------- Telas menores ---------- */
@media (max-width: 1100px) {
  .lateral { width: 360px; }
  .painel { width: 360px; }
  .lista-pontos { width: 270px; }
}
.so-celular { display: none !important; }
@media (max-width: 820px) {
  .so-celular { display: inline-flex !important; }
  .topo-sobre { display: none; }
  .topo { padding: 8px 12px; gap: 6px 12px; }
  .topo-nav a { padding: 7px 9px; font-size: 13.5px; }
  .barra { padding: 10px 12px; }
  .filtros { display: none; padding: 9px 12px; }
  .filtros.aberto { display: flex; }
  .legenda { bottom: 24px; }
  .pg-consulta, .pg-editar { height: auto; min-height: 100%; }
  .corpo { flex-direction: column; }
  .corpo .mapa { height: 62vh; flex: none; }
  .lateral, .painel, .lista-pontos { width: auto; border-left: 0; border-right: 0; border-top: 1px solid var(--linha); }
  .lista-pontos { max-height: 40vh; order: 3; }
  .painel { order: 2; }
  .lista { overflow: visible; }
  .topo-usuario span { display: none; }
  .barra-titulo { width: 100%; }
  .tour { bottom: 10px; }
}

/* ---------- Impressão (PDF) ---------- */
.so-impressao { display: none; }
.imprimindo .corpo .mapa { flex: none; width: 680px; height: 560px; }
.imprimindo .legenda { display: none; }
@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; font-size: 11pt; }
  .topo, .barra, .filtros, .lateral, .legenda-recolher, .maplibregl-control-container, .tour, .toast { display: none !important; }
  .pg-consulta { height: auto; display: block; }
  .resumo { border: 0; flex-wrap: wrap; }
  .corpo { display: block; }
  .corpo .mapa { width: 680px !important; height: 560px !important; max-width: 100%; break-inside: avoid; border: 1px solid #ccc; }
  .legenda { display: none !important; }
  .so-impressao { display: block; }
  .imp-cab h1 { font-size: 18pt; margin: 0; }
  .imp-cab p { margin: 2pt 0 8pt; color: #444; }
  .imp-tabela { margin-top: 8mm; }
  .imp-tabela td, .imp-tabela th { padding: 5pt 6pt; font-size: 9.5pt; vertical-align: top; }
  .imp-tabela tr { break-inside: avoid; }
  .imp-tabela .just { font-size: 9.5pt; }
}
