:root {
  --bg: #06110c;
  --surface: #0b1c14;
  --surface-2: #10261b;
  --border: #1b3a29;
  --border-2: #24503a;
  --text: #eaf5ee;
  --muted: #8fae9c;
  --soft: #5f7f6d;
  --accent: #38d47b;
  --accent-strong: #1da85a;
  --accent-dim: rgba(56, 212, 123, 0.12);
  --gold: #f5c451;
  --warn: #f0a43a;
  --radius: 16px;
}

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

body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 500px at 50% -200px, #0f3322 0%, transparent 70%), var(--bg);
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.topo {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(6, 17, 12, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.topo-in {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.marca {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}

.logo {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #04140b;
  font-weight: 800;
  font-size: 19px;
  box-shadow: 0 4px 14px rgba(56, 212, 123, 0.25);
}

.marca strong { display: block; font-size: 16px; font-weight: 800; letter-spacing: 0.3px; }
.marca small { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }

.abas {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
}

.aba {
  padding: 9px 16px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: 0.15s;
}

.aba:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.aba.ativa { background: var(--accent); color: #04140b; }

.vivo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
}

.vivo i { width: 8px; height: 8px; border-radius: 50%; background: var(--soft); }
.vivo.ok { color: var(--accent); border-color: rgba(56, 212, 123, 0.4); }
.vivo.ok i { background: var(--accent); animation: pulso 1.8s infinite; }
.vivo.alerta { color: var(--warn); border-color: rgba(240, 164, 58, 0.4); }
.vivo.alerta i { background: var(--warn); }

@keyframes pulso {
  0% { box-shadow: 0 0 0 0 rgba(56, 212, 123, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(56, 212, 123, 0); }
  100% { box-shadow: 0 0 0 0 rgba(56, 212, 123, 0); }
}

.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 40px; }

.voltar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 10px 16px;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  transition: 0.15s;
}

.voltar:hover { background: var(--accent-dim); border-color: var(--accent); }

.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; margin-bottom: 16px; }

.hero-txt {
  padding: 26px;
  background: linear-gradient(135deg, #10301f, #0b1c14 70%);
  border: 1px solid var(--border-2);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
}

.sobre {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.15;
  margin: 10px 0 8px;
  letter-spacing: -0.4px;
}

.local { color: var(--muted); font-size: 17px; font-weight: 600; }

.apuracao {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.apuracao-topo {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.apuracao-topo strong {
  font-size: 38px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  text-transform: none;
  font-variant-numeric: tabular-nums;
}

.barra {
  height: 14px;
  background: #07130d;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  overflow: hidden;
}

.barra div {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent-strong), var(--accent));
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(56, 212, 123, 0.45);
  transition: width 0.6s ease;
}

.atualizacao { font-size: 13px; color: var(--soft); }

.filtros-card {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.filtros { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; margin-bottom: 16px; }
.campo { display: flex; flex-direction: column; gap: 6px; }

.campo span, .rotulo {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
}

.rotulo { display: block; margin-bottom: 8px; }

select, .busca {
  width: 100%;
  padding: 12px 14px;
  background-color: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-2);
  border-radius: 10px;
  font: inherit;
  font-size: 15px;
  outline: none;
}

select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238fae9c' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}

select option { background: #10261b; color: var(--text); }
select:focus, .busca:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.busca::placeholder { color: var(--soft); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }

.chip {
  flex: 0 0 auto;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.15s;
}

.chip:hover { color: var(--text); border-color: var(--accent-strong); }
.chip.ativo { background: var(--accent); border-color: var(--accent); color: #04140b; }

.resultado {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
}

.resultado-topo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.resultado-topo h2 { font-size: 19px; font-weight: 800; }
.contagem { font-size: 13px; color: var(--muted); font-weight: 600; }
.busca { margin-bottom: 14px; }
.lista { display: flex; flex-direction: column; gap: 10px; }

.cand {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: 12px;
  transition: border-color 0.2s;
}

.cand:hover { border-color: #2f6b4b; }

.cand.lider {
  border: 1px solid rgba(56, 212, 123, 0.55);
  background: linear-gradient(90deg, rgba(56, 212, 123, 0.12), var(--surface-2) 65%);
  box-shadow: 0 0 0 1px rgba(56, 212, 123, 0.1), 0 8px 24px rgba(0, 0, 0, 0.25);
}

.pos {
  font-size: 16px;
  font-weight: 800;
  color: var(--soft);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.cand.lider .pos { color: var(--gold); }
.info { min-width: 0; }
.linha { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.num {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(56, 212, 123, 0.25);
  border-radius: 6px;
  padding: 2px 8px;
  font-variant-numeric: tabular-nums;
}

.nome { font-weight: 800; font-size: 17px; letter-spacing: 0.1px; }

.tag {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #1b1403;
  background: var(--gold);
  border-radius: 999px;
  padding: 3px 9px;
}

.completo {
  font-size: 12px;
  color: var(--soft);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trilha {
  height: 8px;
  background: #07130d;
  border: 1px solid var(--border);
  border-radius: 999px;
  margin-top: 10px;
  overflow: hidden;
}

.preenche {
  height: 100%;
  background: linear-gradient(90deg, #1f6b44, #2f9a62);
  border-radius: 999px;
  transition: width 0.6s ease;
}

.cand.lider .preenche {
  background: linear-gradient(90deg, var(--accent-strong), var(--accent));
  box-shadow: 0 0 10px rgba(56, 212, 123, 0.5);
}

.numeros { text-align: right; display: flex; flex-direction: column; gap: 2px; }

.pct {
  font-size: 24px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.3px;
}

.cand.lider .pct { color: var(--accent); }
.votos { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

.aviso {
  padding: 30px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  border: 1px dashed var(--border-2);
  border-radius: 12px;
}

.esqueleto {
  height: 82px;
  background: linear-gradient(90deg, var(--surface-2) 0%, #17351f 50%, var(--surface-2) 100%);
  background-size: 200% 100%;
  animation: brilho 1.2s infinite linear;
}

@keyframes brilho { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.mais {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 13px;
  background: transparent;
  border: 1px solid var(--border-2);
  border-radius: 10px;
  color: var(--accent);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.mais:hover { background: var(--accent-dim); border-color: var(--accent); }
.mais[hidden] { display: none; }

.ir-cargos {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: 0.15s;
}

.ir-cargos:hover { border-color: var(--accent); background: #0e2419; }
.ir-cargos strong { display: block; font-size: 16px; font-weight: 800; }
.ir-cargos small { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; }
.ir-cargos span.seta { color: var(--accent); font-size: 22px; font-weight: 800; }

.rodape { text-align: center; color: var(--soft); font-size: 12px; margin-top: 28px; line-height: 1.6; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .hero h1 { font-size: 25px; }
  .apuracao-topo strong { font-size: 32px; }
  .filtros { grid-template-columns: 1fr; }
  .abas { order: 3; width: 100%; }
  .aba { flex: 1; text-align: center; padding: 9px 10px; }
  .cand { grid-template-columns: 28px 1fr auto; gap: 10px; padding: 13px; }
  .pct { font-size: 19px; }
  .nome { font-size: 15px; }
  .container { padding-top: 16px; }
}

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

.bandeira {
  display: inline-block;
  width: 20px;
  height: 14px;
  margin-right: 7px;
  vertical-align: -2px;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 14'%3E%3Crect width='20' height='14' fill='%23009c3b'/%3E%3Cpolygon points='10,1.6 18.4,7 10,12.4 1.6,7' fill='%23ffdf00'/%3E%3Ccircle cx='10' cy='7' r='3.4' fill='%23002776'/%3E%3Cpath d='M6.8 6.3c2.2-.4 4.5.2 6.4 1.5' stroke='%23fff' stroke-width='.8' fill='none'/%3E%3C/svg%3E") center / cover no-repeat;
}

.radio {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding: 14px 18px;
  border-radius: 16px;
  text-decoration: none;
  color: var(--text);
  background: linear-gradient(90deg, #16402a, #0f2a1d);
  border: 1px solid var(--accent);
  box-shadow: 0 0 20px rgba(56, 212, 123, 0.15);
  transition: 0.15s;
}
.radio:hover { box-shadow: 0 0 28px rgba(56, 212, 123, 0.3); }
.radio-play {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #04140b;
  font-size: 16px;
  animation: pulso 1.8s infinite;
}
.radio-txt { flex: 1; min-width: 0; }
.radio-txt strong { display: block; font-size: 16px; font-weight: 800; }
.radio-txt small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.radio-btn {
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--gold);
  color: #1b1403;
  font-weight: 800;
  font-size: 13px;
  white-space: nowrap;
}
@media (max-width: 760px) { .radio-btn { display: none; } }
