:root {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #17324d;
  background: #f1f5fa;
  font-size: 16px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, textarea { font: inherit; }
button, .botao {
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 650;
  cursor: pointer;
  color: white;
  background: #1565c0;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
button:disabled { opacity: .65; cursor: wait; }
.secundario { background: white; color: #124c8e; border-color: #a9bfd6; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid #ef8e00; outline-offset: 2px;
}
.topo {
  display: flex; gap: 10px; align-items: center;
  padding: 10px 12px;
  padding: 10px max(12px, env(safe-area-inset-right)) 10px max(12px, env(safe-area-inset-left));
  background: #1565c0; color: white;
}
.topo img { height: 36px; max-width: 120px; object-fit: contain; background: white; border-radius: 8px; padding: 2px; }
.topo strong { flex: 1; overflow-wrap: anywhere; }
.topo .secundario { min-height: 40px; padding: 8px 14px; }
.tela { max-width: 640px; margin: auto; padding: 14px 12px 32px; }
.cartao { padding: 18px; background: white; border-radius: 16px; margin-bottom: 14px; box-shadow: 0 2px 8px #17324d12; }
h1 { font-size: 1.4rem; margin: 0 0 6px; overflow-wrap: anywhere; }
h2 { font-size: 1.15rem; margin: 18px 0 10px; }
.cartao h2 { margin-top: 0; }
p { line-height: 1.5; overflow-wrap: anywhere; }
.discreto { color: #52677c; margin: 0; }
label { display: block; font-weight: 650; margin: 14px 0 6px; }
input, textarea {
  width: 100%; min-height: 48px; border: 1px solid #9eb2c6; border-radius: 10px;
  padding: 12px; background: white; color: #17324d;
}
#codigo { text-transform: uppercase; letter-spacing: 2px; font-size: 1.2rem; text-align: center; }
form button { width: 100%; margin-top: 16px; }
.erro { color: #b71c1c; font-weight: 600; min-height: 1.5em; }
.abas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 4px; }
.abas.quatro { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.abas.quatro .aba { padding: 10px 2px; font-size: .9rem; }
.aba { background: white; color: #124c8e; border-color: #a9bfd6; padding: 10px 4px; position: relative; }
.aba.ativa { background: #1565c0; color: white; }
.item { padding: 14px; background: white; border-radius: 12px; margin-bottom: 10px; box-shadow: 0 1px 4px #17324d14; }
.item strong { display: block; overflow-wrap: anywhere; }
.item p { margin: 4px 0; }
.linha { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.valor { font-size: 1.2rem; font-weight: 750; }
.selo { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: .85rem; font-weight: 650; background: #e3f2fd; color: #0d47a1; }
.selo.alerta { background: #ffebee; color: #b71c1c; }
.selo.ok { background: #e8f5e9; color: #1b5e20; }
.acoes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.acoes > * { flex: 1 1 140px; }
.codigo-barras { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; word-break: break-all; background: #f5f7fa; padding: 8px; border-radius: 8px; }
.vazio { color: #52677c; }
.pix { margin-top: 12px; padding: 12px; border: 1px dashed #a9bfd6; border-radius: 12px; }
.qr { display: block; width: 220px; max-width: 100%; height: auto; margin: 8px auto; image-rendering: pixelated; }
p.selo { display: block; border-radius: 10px; padding: 8px 10px; }
.grupo { border: 1px solid #d0d7de; border-radius: 10px; padding: 10px 12px; margin: 0 0 14px; min-width: 0; }
.grupo legend { font-weight: 700; padding: 0 6px; }
#mp-aviso-url { word-break: break-all; }
.opcao { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.opcao input { width: 22px; min-height: 22px; flex: none; margin-top: 2px; }
.topo .botao { min-height: 40px; padding: 8px 12px; }
.item.destaque { border: 2px solid #ef9a9a; }
.senha { display: inline; font-size: 1.35rem; letter-spacing: 2px; font-family: ui-monospace, Consolas, monospace; }
#mais { width: 100%; }
#instalar-botao { width: 100%; margin: 8px 0; }
.janela { border: none; border-radius: 16px; padding: 20px; max-width: 420px; max-width: min(420px, calc(100vw - 32px)); color: #17324d; }
.janela::backdrop { background: #0d1b2a99; }
.janela h2 { margin-top: 0; }
.janela ul { padding-left: 20px; line-height: 1.5; }
.janela li { margin-bottom: 6px; }
.copiar-pix { width: 100%; margin: 8px 0; font-size: 1.1rem; }
.copiar-pix.copiado { background: #2e7d32; }
.qr-area { margin-top: 10px; }
.qr-area summary { cursor: pointer; font-weight: 650; color: #124c8e; padding: 6px 0; }
.grafico-consumo { display: block; width: 100%; height: auto; margin-top: 8px; }
.grafico-consumo rect { fill: #1565c0; }
.consumo .linha { font-size: .85rem; }
.bolinha { position: absolute; top: -6px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #c62828; color: white; font-size: .8rem; line-height: 22px; }
.chat-lista { display: flex; flex-direction: column; gap: 8px; max-height: 55vh; min-height: 160px; overflow-y: auto; padding: 10px; background: white; border-radius: 12px; box-shadow: 0 1px 4px #17324d14; }
.bolha { max-width: 85%; padding: 8px 12px; border-radius: 14px; }
.bolha p { margin: 0; white-space: pre-wrap; }
.bolha small { display: block; margin-top: 4px; font-size: .75rem; opacity: .8; }
.bolha.minha { align-self: flex-end; background: #1565c0; color: white; border-bottom-right-radius: 4px; }
.bolha.deles { align-self: flex-start; background: #e8eef5; color: #17324d; border-bottom-left-radius: 4px; }
.chat-form button { margin-top: 8px; }
.chat-form textarea { resize: vertical; }
.clima { margin-top: 18px; }
.clima-agora { margin: 0 0 10px; font-size: 1.15rem; font-weight: 650; }
.clima-dias { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.clima-dia { display: flex; flex-direction: column; gap: 3px; padding: 10px 8px; background: white; border-radius: 12px; font-size: .85rem; overflow-wrap: anywhere; }
.atendimento { margin-bottom: 12px; }
.atendimento p { margin: 0 0 8px; }

/* ---- Mais amigável e compatível com celulares antigos (04/11/2026) ---- */
:root { font-size: 17px; line-height: 1.45; -webkit-text-size-adjust: 100%; }
.cartao { box-shadow: 0 2px 8px rgba(23, 50, 77, .08); }
.item { box-shadow: 0 1px 4px rgba(23, 50, 77, .09); }
.chat-lista { box-shadow: 0 1px 4px rgba(23, 50, 77, .09); }
.janela::backdrop { background: rgba(13, 27, 42, .6); }
button, .botao { min-height: 52px; font-size: 1.05rem; -webkit-appearance: none; }
input, textarea { min-height: 52px; font-size: 1.05rem; -webkit-appearance: none; }
#codigo { font-size: 1.35rem; }
.abas { margin-bottom: 8px; }
.abas .aba { font-size: .95rem; min-height: 56px; line-height: 1.15; }
.abas.quatro .aba { font-size: .8rem; padding: 8px 1px; letter-spacing: -.2px; }
/* "gap" do flex não existe em Chrome < 84 / iOS < 14.5: margens de reserva */
.acoes > * { margin: 4px; }
.acoes { margin-left: -4px; margin-right: -4px; }
.topo > * + * { margin-left: 10px; }
.bolha { margin-bottom: 8px; }
@supports (inset: 0) { .acoes > * { margin: 0; } .acoes { margin-left: 0; margin-right: 0; } .topo > * + * { margin-left: 0; } .bolha { margin-bottom: 0; } }
.aviso-travado { background: #fff8e1; border: 2px solid #f9a825; border-radius: 16px; padding: 18px; color: #4e342e; }
.aviso-travado strong { display: block; font-size: 1.15rem; margin-bottom: 8px; }
.aviso-travado ul { padding-left: 20px; margin: 0 0 12px; }
.aviso-travado li { margin-bottom: 6px; }
.aviso-travado button { width: 100%; }
#carregando:not(.aviso-travado) { text-align: center; font-size: 1.1rem; color: #52677c; padding: 30px 0; }
/* Primeiro acesso pelo celular (05/11/2026) */
#form-primeiro h2 { font-size: 1.15rem; margin: 0 0 4px; }
#entrada hr { border: 0; border-top: 1px solid #ddd; margin: 18px 0 12px; }
#senha-nova { border: 2px solid #1a7f37; }
.senha-grande { font-size: 2rem; font-weight: 700; letter-spacing: .1em; text-align: center; margin: 8px 0; font-variant-numeric: tabular-nums; }
#senha-nova button { margin-top: 8px; }

/* ── Comunidade (09/11/2026): verde e branco, como o site acegua.net ── */
.botao-comunidade {
  width: 100%; margin-bottom: 14px; justify-content: flex-start; gap: 12px; text-align: left;
  background: linear-gradient(135deg, #2f9e52, #1f6e38); border-radius: 16px; padding: 14px 16px;
}
.botao-comunidade .ic { font-size: 1.6rem; }
.botao-comunidade small { display: block; font-weight: 500; opacity: .92; font-size: .85rem; }
.botao-comunidade .seta { margin-left: auto; font-size: 1.6rem; }
.comunidade { padding-bottom: 80px; }
.com-topo { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.com-topo h2 { margin: 0; }
.com-topo .secundario { min-height: 40px; padding: 8px 12px; }
.com-aviso { background: #eaf8e6; border: 2px solid #2f9e52; border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; overflow-wrap: anywhere; }
.com-aviso b { color: #1f6e38; }
.com-chave { display: flex; align-items: center; gap: 12px; }
.chave { width: 52px; min-height: 30px; height: 30px; padding: 0; border-radius: 999px; background: #c5d3c8; position: relative; flex: none; }
.chave::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: white; transition: left .15s; }
.chave[aria-checked="true"] { background: #2f9e52; }
.chave[aria-checked="true"]::after { left: 25px; }
.com-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: #eaf8e6; border-radius: 999px; padding: 4px; margin-bottom: 10px; }
.com-seg button { min-height: 40px; border-radius: 999px; background: transparent; color: #143a22; padding: 6px 10px; }
.com-seg button[aria-pressed="true"] { background: #2f9e52; color: white; }
.com-cats { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 6px; }
.com-cats button { min-height: 36px; padding: 6px 12px; border-radius: 999px; background: white; color: #143a22; border-color: #cfe3d3; white-space: nowrap; font-weight: 600; }
.com-cats button[aria-pressed="true"] { background: #143a22; color: white; }
.com-lista { display: grid; gap: 12px; }
.com-post { background: white; border-radius: 16px; overflow: hidden; box-shadow: 0 1px 4px rgba(23, 50, 77, .09); }
.com-post.oficial { border: 2px solid #2f9e52; }
.com-cab { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.com-quem { display: flex; align-items: center; gap: 10px; background: none; color: inherit; padding: 0; min-height: 0; text-align: left; font-weight: 400; }
.com-av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: white; font-weight: 700; flex: none; }
.com-av.g { width: 56px; height: 56px; font-size: 1.4rem; }
.com-nome { font-weight: 700; display: block; }
.com-meta { font-size: .8rem; color: #52677c; }
.com-cat { margin-left: auto; font-size: .72rem; font-weight: 700; border-radius: 999px; padding: 2px 8px; background: #eaf8e6; color: #1f6e38; white-space: nowrap; }
.com-post img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: #eaf8e6; }
.com-txt { padding: 10px 12px 2px; margin: 0; overflow-wrap: anywhere; }
.com-barra { display: flex; gap: 4px; padding: 4px 6px 8px; }
.com-barra button { min-height: 40px; background: transparent; color: #52677c; padding: 6px 10px; font-weight: 650; }
.com-barra button.on { color: #c62828; }
.com-barra .dir { margin-left: auto; }
.com-perfil-cab { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.com-grade { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.com-grade figure { margin: 0; background: white; border-radius: 12px; overflow: hidden; }
.com-grade img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }
.com-grade figcaption { padding: 8px; font-size: .85rem; overflow-wrap: anywhere; }
.com-grade figcaption span { display: block; color: #52677c; font-size: .78rem; }
.com-fab {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom));
  border-radius: 999px; background: #2f9e52; box-shadow: 0 10px 24px rgba(0, 0, 0, .25); z-index: 20; padding: 12px 20px;
}
.com-fundo { position: fixed; inset: 0; background: rgba(10, 35, 18, .5); z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.com-folha {
  background: white; width: 100%; max-width: 640px; max-height: 92vh; overflow: auto; border-radius: 20px 20px 0 0;
  padding: 18px 16px max(18px, env(safe-area-inset-bottom));
}
.com-folha h2 { margin: 0 0 4px; }
.com-folha select { width: 100%; min-height: 52px; border: 1px solid #a9bfd6; border-radius: 12px; padding: 10px; font-size: 1.05rem; background: white; color: inherit; }
.com-folha #com-escolher { width: 100%; margin-top: 12px; border-style: dashed; }
#com-previa { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; margin-top: 12px; }
.com-botoes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.com-cota { display: flex; gap: 6px; align-items: center; }
.com-cota i { width: 28px; height: 8px; border-radius: 4px; background: #d6ead9; display: inline-block; }
.com-cota i.usado { background: #2f9e52; }
.com-botoes button { margin-top: 0; }

/* ── App do cliente verde e branco (09/11/2026, pedido do proprietário) ──
   Só nas páginas do cliente (body.acegua: /app e /app/entrar); as páginas da equipe continuam azuis. */
body.acegua { background: #f4faf3; color: #143a22; }
.acegua button, .acegua .botao { background: #2f9e52; }
.acegua .secundario, .acegua .aba { background: white; color: #1f6e38; border-color: #b9dcc0; }
.acegua .aba.ativa { background: #2f9e52; color: white; }
.acegua .topo { background: #2f9e52; }
.acegua .discreto, .acegua .vazio, .acegua #carregando:not(.aviso-travado) { color: #55705e; }
.acegua input, .acegua textarea { border-color: #a9cdb1; color: #143a22; }
.acegua button:focus-visible, .acegua a:focus-visible, .acegua input:focus-visible, .acegua textarea:focus-visible { outline-color: #f2b632; }
.acegua .selo { background: #eaf8e6; color: #1f6e38; }
.acegua .pix { border-color: #a9cdb1; }
.acegua .qr-area summary { color: #1f6e38; }
.acegua .grafico-consumo rect { fill: #2f9e52; }
.acegua .bolha.minha { background: #2f9e52; }
.acegua .bolha.deles { background: #e6f2e8; color: #143a22; }
.acegua .janela { color: #143a22; }
.acegua .com-barra button, .acegua .com-quem, .acegua .com-seg button, .acegua .com-cats button { background: transparent; }
.acegua .com-cats button { background: white; }
.acegua .com-seg button[aria-pressed="true"] { background: #2f9e52; }
.acegua .com-cats button[aria-pressed="true"] { background: #143a22; }
.acegua .chave { background: #c5d3c8; }
.acegua .chave[aria-checked="true"] { background: #2f9e52; }
.acegua .botao-comunidade { background: linear-gradient(135deg, #2f9e52, #1f6e38); }
