:root {
  --verde-900: #0f3d2e;
  --verde-700: #1b6b4a;
  --verde-500: #2e9e5b;
  --verde-100: #e4f3e9;
  --creme: #f8f6f0;
  --branco: #ffffff;
  --texto: #1d2a24;
  --texto-suave: #55645c;
  --borda: #dfe5df;
  --amarelo: #f2c14e;
  --raio: 14px;
  --sombra: 0 6px 24px rgba(15, 61, 46, .12);
  --fonte: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  font-family: var(--fonte);
  color: var(--texto);
  background: var(--creme);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--verde-700); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; color: var(--verde-900); letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.container { width: min(1120px, 100% - 2rem); margin-inline: auto; }
.secao { padding-block: clamp(3rem, 7vw, 5.5rem); }
.secao-titulo { max-width: 640px; margin-bottom: 2.2rem; }
.secao-titulo p { color: var(--texto-suave); font-size: 1.1rem; }
.etiqueta {
  display: inline-block; padding: .25rem .8rem; border-radius: 999px;
  background: var(--verde-100); color: var(--verde-700);
  font-size: .85rem; font-weight: 600; margin-bottom: 1rem;
}

/* Botões */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.4rem; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform .15s, background .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primario { background: var(--verde-500); color: #fff; box-shadow: 0 6px 16px rgba(46, 158, 91, .35); }
.btn-primario:hover { background: var(--verde-700); }
.btn-secundario { background: var(--branco); color: var(--verde-700); border-color: var(--borda); }
.btn-secundario:hover { border-color: var(--verde-500); background: var(--verde-100); }
.btn-contorno { border-color: rgba(255, 255, 255, .6); color: #fff; }
.btn-contorno:hover { background: rgba(255, 255, 255, .12); }
.btn-pequeno { padding: .45rem .9rem; font-size: .9rem; }

/* Cabeçalho */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(248, 246, 240, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--borda);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.logo { display: flex; align-items: center; gap: .55rem; font-weight: 700; font-size: 1.2rem; color: var(--verde-900); text-decoration: none; }
.logo svg { flex: none; }
.nav { display: flex; align-items: center; gap: 1.4rem; }
.nav a { text-decoration: none; color: var(--texto); font-weight: 500; }
.nav a:hover { color: var(--verde-500); }
.nav a.btn { color: #fff; }
.nav a.btn-secundario { color: var(--verde-700); }
.nav-sessao {
  position: relative; display: inline-flex; align-items: center; min-width: 0;
}
.avatar-botao {
  width: 38px; height: 38px; border: 2px solid var(--branco); border-radius: 50%;
  padding: 0; overflow: hidden; background: var(--verde-700); color: #fff;
  display: grid; place-items: center; font: inherit; font-weight: 700; cursor: pointer;
  box-shadow: 0 2px 10px rgba(15, 61, 46, .16);
}
.avatar-botao:hover, .avatar-botao[aria-expanded="true"] { outline: 2px solid var(--verde-500); outline-offset: 2px; }
.avatar-botao img { width: 100%; height: 100%; object-fit: cover; display: block; }
.menu-usuario {
  position: absolute; right: 0; top: calc(100% + .65rem); z-index: 1100;
  width: min(260px, calc(100vw - 2rem)); padding: .75rem; border: 1px solid var(--borda);
  border-radius: 10px; background: var(--branco); box-shadow: var(--sombra);
  display: grid; gap: .15rem;
}
.menu-usuario[hidden] { display: none; }
.menu-usuario strong, .menu-usuario small {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.menu-usuario strong { color: var(--verde-900); line-height: 1.2; }
.menu-usuario small { color: var(--texto-suave); margin-bottom: .45rem; }
.menu-usuario a, .menu-usuario button {
  width: 100%; border: 0; border-radius: 8px; padding: .55rem .65rem;
  background: var(--creme); color: var(--verde-700); font: inherit; font-weight: 700;
  text-align: left; cursor: pointer; text-decoration: none;
}
.menu-usuario a:hover, .menu-usuario button:hover { background: var(--verde-100); }

/* Hero */
.hero {
  background:
    radial-gradient(circle at 85% 20%, rgba(242, 193, 78, .25), transparent 40%),
    linear-gradient(135deg, var(--verde-900), var(--verde-700));
  color: #fff;
  padding-block: clamp(3.5rem, 9vw, 7rem);
  overflow: hidden;
}
.hero .container { display: grid; grid-template-columns: 1.2fr .8fr; gap: 3rem; align-items: center; }
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; color: var(--amarelo); }
.hero p { font-size: 1.2rem; color: rgba(255, 255, 255, .88); max-width: 34rem; }
.hero-acoes { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.hero-cartao {
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 22px; padding: 1.6rem; backdrop-filter: blur(4px);
}
.hero-cartao h2 { color: #fff; font-size: 1.15rem; margin-bottom: 1rem; }
.hero-cartao ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.hero-cartao li { display: flex; align-items: center; gap: .7rem; font-size: 1.02rem; }
.bolinha { width: 14px; height: 14px; border-radius: 50%; background: var(--c); border: 2px solid #fff; flex: none; }

/* Proposta */
.cartoes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; }
.cartao {
  background: var(--branco); border: 1px solid var(--borda); border-radius: var(--raio);
  padding: 1.6rem; box-shadow: 0 2px 8px rgba(15, 61, 46, .05);
}
.cartao .icone {
  width: 48px; height: 48px; border-radius: 12px; background: var(--verde-100);
  display: grid; place-items: center; margin-bottom: 1rem; color: var(--verde-700);
}
.cartao p { color: var(--texto-suave); margin: 0; }

/* Mapa da landing */
.secao-mapa { background: var(--branco); border-block: 1px solid var(--borda); }
.mapa-cidades { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.chip {
  padding: .4rem .95rem; border-radius: 999px; border: 1.5px solid var(--borda);
  background: var(--branco); font: inherit; font-size: .95rem; cursor: pointer; color: var(--texto);
  transition: background .15s, border-color .15s;
}
.chip:hover { border-color: var(--verde-500); }
.chip[aria-pressed="true"] { background: var(--verde-700); border-color: var(--verde-700); color: #fff; }
.mapa-destaque {
  position: relative; border-radius: 20px; overflow: hidden; box-shadow: var(--sombra);
  border: 1px solid var(--borda); cursor: pointer;
}
#mapa-preview { height: min(520px, 70vh); background: #dfe9df; }
.mapa-destaque:focus-visible { outline: 3px solid var(--verde-500); outline-offset: 3px; }
.mapa-selo {
  position: absolute; z-index: 500; left: 50%; bottom: 1.2rem; transform: translateX(-50%);
  background: var(--verde-900); color: #fff; padding: .7rem 1.3rem; border-radius: 999px;
  font-weight: 600; box-shadow: var(--sombra); white-space: nowrap; pointer-events: none;
  transition: background .15s;
}
.mapa-destaque:hover .mapa-selo { background: var(--verde-500); }
.mapa-nota { color: var(--texto-suave); font-size: .9rem; margin-top: .8rem; }

/* Como funciona */
.passos { counter-reset: passo; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.5rem; list-style: none; padding: 0; margin: 0; }
.passos li { position: relative; padding-top: 3.4rem; }
.passos li::before {
  counter-increment: passo; content: counter(passo);
  position: absolute; top: 0; left: 0; width: 2.6rem; height: 2.6rem; border-radius: 50%;
  background: var(--verde-500); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 1.2rem;
}
.passos p { color: var(--texto-suave); }

/* Sobre */
.sobre { background: var(--verde-900); color: rgba(255, 255, 255, .88); }
.sobre h2 { color: #fff; }
.sobre .container { display: grid; grid-template-columns: 1.2fr .8fr; gap: 3rem; align-items: start; }
.ods { display: grid; gap: .8rem; }
.ods div { background: rgba(255, 255, 255, .08); border-radius: 12px; padding: 1rem 1.2rem; }
.ods strong { color: var(--amarelo); display: block; }

.rodape { background: #0a2a20; color: rgba(255, 255, 255, .65); padding-block: 1.6rem; font-size: .9rem; }

/* Pinos do mapa */
.pin-wrap { background: none; border: none; }
.pin {
  position: relative; display: block; width: 28px; height: 28px;
  border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--c); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
}
.pin::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: #fff; }
.pin-wrap.ativo .pin { animation: pulo .5s ease 2; }
@keyframes pulo { 50% { transform: rotate(-45deg) translate(-4px, 4px) scale(1.15); } }

.popup h3 { font-size: 1.05rem; margin: 0 0 .2rem; }
.popup .tipo { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 600; margin-bottom: .5rem; }
.popup p { margin: 0 0 .3rem; font-size: .9rem; line-height: 1.4; }
.popup a.rota { display: inline-block; margin-top: .4rem; font-weight: 600; }
.leaflet-popup-content { font-family: var(--fonte); }

/* Página da cidade */
body.pagina-cidade { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.cidade { flex: 1; min-height: 0; display: grid; grid-template-columns: 400px 1fr; }
.painel { display: flex; flex-direction: column; min-height: 0; background: var(--branco); border-right: 1px solid var(--borda); }
.painel-topo { padding: 1.1rem 1.2rem .9rem; border-bottom: 1px solid var(--borda); }
.voltar { font-size: .9rem; text-decoration: none; font-weight: 500; }
.painel-topo h1 { font-size: 1.7rem; margin: .3rem 0 .2rem; }
.resumo { color: var(--texto-suave); font-size: .95rem; margin-bottom: .8rem; }
.seletor { display: flex; align-items: center; gap: .6rem; font-size: .9rem; margin-bottom: .8rem; }
.seletor select {
  flex: 1; font: inherit; padding: .4rem .6rem; border-radius: 8px; border: 1.5px solid var(--borda); background: var(--branco);
}
.filtros { display: flex; flex-wrap: wrap; gap: .4rem; }
.filtro {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .3rem .75rem; border-radius: 999px; border: 1.5px solid var(--borda);
  background: var(--branco); font: inherit; font-size: .85rem; cursor: pointer; color: var(--texto);
}
.filtro .bolinha { width: 11px; height: 11px; border-width: 0; }
.filtro[aria-pressed="false"] { opacity: .5; }
.filtro[aria-pressed="false"] .bolinha { background: #b8c2bb; }
.filtro[aria-pressed="true"] { border-color: var(--c); background: #fff; }

.lista { list-style: none; margin: 0; padding: .4rem; overflow-y: auto; flex: 1; }
.item {
  width: 100%; text-align: left; font: inherit; cursor: pointer; background: none;
  border: 1.5px solid transparent; border-radius: 12px; padding: .75rem .8rem;
  display: flex; gap: .8rem; align-items: flex-start; color: var(--texto);
}
.item:hover { background: var(--creme); }
.item.selecionado { background: var(--verde-100); border-color: var(--verde-500); }
.item .bolinha { margin-top: .35rem; }
.item strong { display: block; line-height: 1.25; }
.item small { display: block; color: var(--texto-suave); line-height: 1.4; }
.vazio { padding: 1.4rem 1rem; color: var(--texto-suave); text-align: center; }
.aviso { margin: 0; padding: .7rem 1.2rem; font-size: .8rem; background: #fff8e1; color: #6b5300; border-top: 1px solid #f0e2a8; }

#mapa-cidade { height: 100%; min-height: 0; background: #dfe9df; }

.erro { max-width: 560px; margin: 4rem auto; padding: 0 1rem; text-align: center; }

/* Cadastro de ponto */
.cadastro { grid-template-columns: 430px 1fr; }
.painel-cadastro { overflow-y: auto; }
.form-cadastro { display: grid; gap: .9rem; padding: 1rem 1.2rem 1.2rem; }
.grupo-form {
  border: 1px solid var(--borda); border-radius: 12px; padding: 1rem;
  background: #fff; display: grid; gap: .75rem;
}
.grupo-form h2 { font-size: 1.05rem; margin: 0; }
.campo { display: grid; gap: .35rem; font-size: .9rem; font-weight: 600; color: var(--verde-900); }
.campo input, .campo select, .campo textarea {
  width: 100%; font: inherit; color: var(--texto); background: var(--branco);
  border: 1.5px solid var(--borda); border-radius: 8px; padding: .6rem .7rem;
}
.campo textarea { resize: vertical; min-height: 82px; }
.campo input:focus, .campo select:focus, .campo textarea:focus {
  outline: 3px solid rgba(46, 158, 91, .18); border-color: var(--verde-500);
}
.grade-coordenadas { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.acoes-mapa, .acoes-form { display: flex; flex-wrap: wrap; gap: .55rem; }
.ajuda { color: var(--texto-suave); font-size: .86rem; margin: -.2rem 0 0; }
.mapa-cadastro-wrap { position: relative; min-height: 0; }
#mapa-cadastro { height: 100%; min-height: 0; background: #dfe9df; }
.instrucao-mapa {
  position: absolute; z-index: 500; top: 1rem; left: 50%; transform: translateX(-50%);
  max-width: min(520px, calc(100% - 2rem)); padding: .65rem 1rem; border-radius: 999px;
  background: var(--verde-900); color: #fff; font-size: .9rem; font-weight: 600;
  box-shadow: var(--sombra); text-align: center;
}
.item-previa {
  display: grid; gap: .35rem; border: 1px dashed var(--borda); border-radius: 10px;
  padding: .85rem; background: var(--creme);
}
.item-previa .tipo { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 700; }
.item-previa .bolinha { width: 11px; height: 11px; border-width: 0; }
.item-previa strong { line-height: 1.25; }
.item-previa small { color: var(--texto-suave); line-height: 1.35; }
.item-previa p { margin: .2rem 0 0; font-size: .92rem; }
.item-previa code {
  width: fit-content; max-width: 100%; overflow-wrap: anywhere;
  padding: .25rem .45rem; border-radius: 6px; background: #fff; color: var(--verde-700);
}
.sucesso { color: var(--verde-700); font-weight: 700; }
.erro-form { color: #8a1f1f; font-weight: 700; }
.meus-pontos {
  display: grid; gap: .6rem; padding: 0 1.2rem 1.2rem;
}
.meus-pontos h2 { font-size: 1.05rem; margin: 0; }
.lista-meus-pontos {
  list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem;
}
.meu-ponto {
  display: grid; grid-template-columns: 1fr auto; gap: .6rem; align-items: center;
  border: 1px solid var(--borda); border-radius: 10px; padding: .7rem; background: var(--branco);
}
.meu-ponto button { min-width: 0; }
.meu-ponto-abrir {
  display: grid; grid-template-columns: auto 1fr; gap: .55rem; align-items: start;
  width: 100%; text-align: left; border: 0; background: transparent; padding: 0;
  color: var(--texto); font: inherit; cursor: pointer;
}
.meu-ponto-abrir:hover strong { color: var(--verde-700); }
.meu-ponto-abrir .bolinha { margin-top: .3rem; width: 11px; height: 11px; border-width: 0; }
.meu-ponto-abrir strong, .meu-ponto-abrir small { display: block; }
.meu-ponto-abrir small { color: var(--texto-suave); line-height: 1.35; }
.meu-ponto-remover {
  border: 1px solid #efc8c8; background: #fff7f7; color: #8a1f1f;
  border-radius: 8px; font: inherit; font-weight: 700; padding: .42rem .55rem; cursor: pointer;
}
.meu-ponto-remover:hover { background: #ffecec; }

.pagina-meus-pontos { min-height: 100vh; min-height: 100dvh; }
.meus-pontos-pagina { padding-block: clamp(2rem, 5vw, 4rem); }
.meus-pontos-cabecalho {
  display: flex; align-items: end; justify-content: space-between; gap: 1rem;
  margin-bottom: 1.2rem;
}
.meus-pontos-cabecalho h1 { font-size: clamp(2rem, 4vw, 3rem); }
.meus-pontos-cabecalho p { color: var(--texto-suave); margin: 0; }
.grade-meus-pontos {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: .9rem;
}
.cartao-ponto {
  display: grid; gap: .7rem; background: var(--branco); border: 1px solid var(--borda);
  border-radius: 12px; padding: 1rem; box-shadow: 0 2px 8px rgba(15, 61, 46, .05);
}
.cartao-ponto-topo { display: flex; align-items: start; gap: .65rem; }
.cartao-ponto-topo .bolinha { margin-top: .3rem; width: 12px; height: 12px; border-width: 0; }
.cartao-ponto h2 { font-size: 1.1rem; margin: 0; }
.cartao-ponto small { color: var(--texto-suave); line-height: 1.35; }
.cartao-ponto p { color: var(--texto-suave); margin: 0; }
.cartao-ponto code {
  width: fit-content; max-width: 100%; overflow-wrap: anywhere;
  padding: .25rem .45rem; border-radius: 6px; background: var(--creme); color: var(--verde-700);
}
.acoes-ponto { display: flex; flex-wrap: wrap; gap: .5rem; }
.btn-perigo {
  background: #fff7f7; color: #8a1f1f; border-color: #efc8c8;
  box-shadow: none;
}
.btn-perigo:hover { background: #ffecec; }

/* Login */
.pagina-login {
  min-height: 100vh; min-height: 100dvh; display: grid; place-items: center;
  padding: 1rem; background: var(--creme);
}
.login { width: min(420px, 100%); display: grid; gap: 1.2rem; }
.login .logo { justify-content: center; }
.login-painel {
  background: var(--branco); border: 1px solid var(--borda); border-radius: 12px;
  padding: 1.4rem; box-shadow: var(--sombra); display: grid; justify-items: center; gap: .8rem;
  text-align: center;
}
.login-painel h1 { font-size: 1.9rem; margin: 0; }
.login-painel p { color: var(--texto-suave); margin: 0; }
.erro-login {
  width: 100%; padding: .7rem; border-radius: 8px; background: #fff0f0;
  color: #8a1f1f; font-weight: 600;
}

@media (max-width: 860px) {
  .hero .container, .sobre .container { grid-template-columns: 1fr; gap: 2rem; }
  .nav a:not(.btn) { display: none; }
  .site-header .container { align-items: flex-start; padding-block: .65rem; }
  .nav { flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }
  .nav-sessao { order: 2; width: 100%; justify-content: flex-end; }
  body.pagina-cidade { height: auto; overflow: visible; display: block; }
  .cidade { display: flex; flex-direction: column-reverse; }
  #mapa-cidade { height: 55vh; flex: none; }
  #mapa-cadastro { height: 58vh; flex: none; }
  .mapa-cadastro-wrap { min-height: 58vh; }
  .painel { border-right: 0; }
  .lista { max-height: none; overflow: visible; }
  .mapa-selo { white-space: normal; text-align: center; width: max-content; max-width: calc(100% - 2rem); }
  .grade-coordenadas { grid-template-columns: 1fr; }
  .instrucao-mapa { top: .75rem; border-radius: 12px; }
}

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

/* Situação e histórico de moderação */
.selo-situacao { display:inline-block; padding:.25rem .6rem; border-radius:1rem; font-size:.85rem; background:#fff3cd; color:#664d03; }
.selo-situacao.APROVADO { background:#d1e7dd; color:#0f5132; }
.selo-situacao.REJEITADO { background:#f8d7da; color:#842029; }
.observacao { border-left:3px solid #2e9e5b; padding:.5rem 1rem; margin:1rem 0; overflow-wrap:anywhere; }
.observacao p { white-space:pre-wrap; }
details { margin:1rem 0; } summary { cursor:pointer; }
#painel-admin form, #filtros { display:flex; gap:1rem; flex-wrap:wrap; align-items:end; margin:1rem 0; }
#painel-admin label, #filtros label { display:flex; flex-direction:column; gap:.3rem; }
#painel-admin input, #painel-admin select, #filtros select { padding:.5rem; max-width:100%; }
#abas { display:flex; flex-wrap:wrap; gap:.5rem; }
#mapa-moderacao { margin:1rem 0; border-radius:12px; }
.aviso-revisao { padding:1rem; background:#fff3cd; }

.pin-pendente .pin { border:3px dashed #9a6700; opacity:.65; }

.pin-rejeitado .pin { border:3px dashed #842029; opacity:.65; }
.identificacao-ponto { display:block; margin:.35rem 0; }
