:root {
  --bg: #081114;
  --bg2: #0b1518;
  --surf: #101c20;
  --line: rgba(148, 180, 178, 0.14);
  --text: #e8f2f1;
  --muted: #8aa3a1;
  --accent: #2dd4bf;
  --accent-ink: #04211e;
  --good: #0ca30c;
  --warning: #fab219;
  --critical: #d03b3b;
  --radius: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 48px;
}

.wrap { max-width: 720px; margin: 0 auto; padding: 16px; }

header.topo {
  position: sticky; top: 0; z-index: 10;
  background: rgba(8, 17, 20, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
header.topo .linha1 { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
header.topo h1 { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.01em; }
header.topo .data { color: var(--muted); font-size: 0.82rem; margin-top: 2px; }

.selo { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; white-space: nowrap; }
.selo .ponto { width: 8px; height: 8px; border-radius: 50%; }
.selo.verde { background: rgba(12, 163, 12, 0.16); color: #4fdc4f; }
.selo.verde .ponto { background: var(--good); }
.selo.amarelo { background: rgba(250, 178, 25, 0.16); color: #ffcf6a; }
.selo.amarelo .ponto { background: var(--warning); }
.selo.vermelho { background: rgba(208, 59, 59, 0.16); color: #ff8a8a; }
.selo.vermelho .ponto { background: var(--critical); }

section.zona { margin-top: 22px; }
section.zona h2 { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }

.cartao {
  background: var(--surf);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 10px;
}

.grade-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 480px) { .grade-stats { grid-template-columns: repeat(3, 1fr); } }
.stat { background: var(--surf); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.stat .valor { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat .rotulo { color: var(--muted); font-size: 0.78rem; margin-top: 2px; }

.item-pendencia { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.item-pendencia:last-child { border-bottom: none; }
.item-pendencia .marca { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--muted); flex: none; margin-top: 2px; }
.item-pendencia.feita .marca { background: var(--accent); border-color: var(--accent); }
.item-pendencia.feita .texto { color: var(--muted); text-decoration: line-through; }
.item-pendencia .texto { font-size: 0.94rem; }
.item-pendencia .resp { color: var(--muted); font-size: 0.76rem; margin-top: 2px; }

.vazio { color: var(--muted); font-size: 0.92rem; padding: 8px 0; }
.vazio b { color: var(--text); }

.linha-agente { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.linha-agente:last-child { border-bottom: none; }
.linha-agente .nome { font-weight: 700; font-size: 0.94rem; }
.linha-agente .detalhe { color: var(--muted); font-size: 0.8rem; margin-top: 2px; }

.pill { padding: 3px 10px; border-radius: 999px; font-size: 0.74rem; font-weight: 700; white-space: nowrap; }
.pill.ok { background: rgba(12, 163, 12, 0.16); color: #4fdc4f; }
.pill.alerta { background: rgba(250, 178, 25, 0.16); color: #ffcf6a; }
.pill.erro { background: rgba(208, 59, 59, 0.16); color: #ff8a8a; }

.busca { width: 100%; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; color: var(--text); font-size: 0.94rem; margin-bottom: 10px; }
.busca::placeholder { color: var(--muted); }

.filtros { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.filtro-btn { background: var(--bg2); border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 7px 13px; font-size: 0.78rem; font-weight: 600; cursor: pointer; }
.filtro-btn.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.lead-card { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.lead-card .topo-lead { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.lead-card .negocio { font-weight: 700; font-size: 0.94rem; }
.lead-card .segmento { color: var(--muted); font-size: 0.78rem; margin-top: 2px; }
.lead-card .quando { color: var(--muted); font-size: 0.76rem; margin-top: 6px; }

.status-tag { font-size: 0.72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.status-tag.enviado { background: rgba(45, 212, 191, 0.16); color: var(--accent); }
.status-tag.sem-whatsapp { background: rgba(148, 163, 184, 0.16); color: #a3b3c2; }
.status-tag.nao-contatado { background: rgba(148, 163, 184, 0.10); color: var(--muted); }
.status-tag.confere-falhou { background: rgba(250, 178, 25, 0.16); color: #ffcf6a; }
.status-tag.pulado { background: rgba(148, 163, 184, 0.10); color: var(--muted); }

.grafico { display: flex; align-items: flex-end; gap: 3px; height: 90px; margin-top: 6px; }
.grafico .barra-col { flex: 1; display: flex; align-items: flex-end; height: 100%; }
.grafico .barra { width: 100%; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 2px; opacity: 0.85; }
.grafico .barra.hoje { opacity: 1; }
.grafico-legenda { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.72rem; margin-top: 6px; }

.rodape { text-align: center; color: var(--muted); font-size: 0.76rem; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); }
.rodape a { color: var(--accent); text-decoration: none; }

.botao-atualizar { background: var(--surf); border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 8px 16px; font-size: 0.8rem; font-weight: 600; cursor: pointer; }
.botao-atualizar:active { transform: scale(0.97); }

@media (prefers-reduced-motion: no-preference) {
  .cartao, .stat, .lead-card { transition: transform 0.15s ease; }
}
