/* Mandato v16 — visual inspirado na urna eletrônica: fundo azul-noite, telas em cinza-esverdeado, teclas laranja e verde. */
:root {
  --bg: #0b1426; --bg2: #101c36; --panel: #15264a; --panel2: #1b2f5a; --linha: #2a3f6b;
  --texto: #e8edf7; --mudo: #93a4c8;
  --urna: #d9ddcc; --urna-borda: #aeb39f; --urna-tx: #15191b; --urna-mudo: #4a5148;
  --laranja: #f28a2e; --laranja-esc: #c96a14; --verde: #2fa463; --verde-esc: #247f4d; --verm: #d9483f; --ouro: #f1c232;
  --raio: 10px; --fd: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif; --fb: 'Public Sans', 'Segoe UI', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--texto); font-family: var(--fb); font-size: 16px; line-height: 1.5; min-height: 100vh; }
h1, h2, h3, h4 { font-family: var(--fd); line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--ouro); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.mudo { color: var(--mudo); }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }

/* topo */
.topo { background: var(--bg2); border-bottom: 1px solid var(--linha); position: sticky; top: 0; z-index: 20; }
.topo .wrap { display: flex; align-items: center; gap: 16px; min-height: 56px; flex-wrap: wrap; padding-block: 8px; }
.logo { font-family: var(--fd); font-weight: 800; font-size: 1.35rem; display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; }
.logo i { width: 30px; height: 30px; border-radius: 7px; background: var(--urna); color: var(--urna-tx); display: grid; place-items: center; font-style: normal; font-size: 1.05rem; }
.topo .sp { flex: 1; }
.pill { background: var(--panel); border: 1px solid var(--linha); border-radius: 999px; padding: 4px 12px; font-size: .86rem; white-space: nowrap; }
.pill b { font-weight: 700; }
.pontos { display: inline-flex; gap: 4px; vertical-align: middle; margin-left: 6px; }
.pontos span { width: 9px; height: 9px; border-radius: 50%; background: var(--linha); }
.pontos span.on { background: var(--laranja); }

/* botões (teclas da urna) */
.btn { background: var(--panel2); border: 1px solid var(--linha); border-radius: 8px; padding: 9px 16px; font-weight: 600; transition: background .15s, transform .05s; }
.btn:hover:not(:disabled) { background: #24407a; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.prim { background: var(--verde); border-color: var(--verde-esc); color: #06180e; }
.btn.prim:hover:not(:disabled) { background: #3bb872; }
.btn.alt { background: var(--laranja); border-color: var(--laranja-esc); color: #1d0e00; }
.btn.alt:hover:not(:disabled) { background: #ff9d45; }
.btn.ghost { background: transparent; }
.btn.peq { padding: 5px 10px; font-size: .85rem; }

/* home */
.hero { padding: 44px 0 20px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 5.2vw, 3.9rem); font-weight: 800; max-width: 14ch; }
.hero p.lead { color: var(--mudo); max-width: 52ch; margin-top: 14px; font-size: 1.05rem; }
.hero .acoes { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.urna-demo { background: var(--urna); color: var(--urna-tx); border: 6px solid #bfc4b2; border-radius: 12px; padding: 16px 18px; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.urna-demo .l1 { font-size: .8rem; color: var(--urna-mudo); }
.urna-demo .cargo { font-family: var(--fd); font-weight: 800; font-size: 1.5rem; margin: 2px 0 10px; }
.urna-demo .linha { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: .9rem; }
.urna-demo .nome { font-weight: 700; font-size: 1.1rem; }
.urna-demo .rodape { border-top: 1px solid var(--urna-borda); margin-top: 10px; padding-top: 8px; font-size: .78rem; color: var(--urna-mudo); }
.digitos { display: inline-flex; gap: 4px; }
.digitos b { width: 26px; height: 32px; display: grid; place-items: center; border: 1.5px solid #2c3128; background: #f3f4ec; font-family: var(--fd); font-size: 1.2rem; border-radius: 3px; }

.filtros { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 22px 0 14px; }
.filtros input[type=search], .filtros select, .campo input, .campo select { background: var(--bg2); border: 1px solid var(--linha); border-radius: 8px; padding: 9px 12px; min-width: 0; }
.filtros input[type=search] { flex: 1 1 220px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { background: transparent; border: 1px solid var(--linha); border-radius: 999px; padding: 5px 13px; font-size: .88rem; color: var(--mudo); }
.chip[aria-pressed=true] { background: var(--texto); color: var(--bg); border-color: var(--texto); font-weight: 600; }

.grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; padding-bottom: 28px; }
.cand { background: var(--urna); color: var(--urna-tx); border: 4px solid #bfc4b2; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.cand .corpo { display: grid; grid-template-columns: 84px 1fr; gap: 12px; padding: 12px; align-items: start; }
.cand h3 { font-size: 1.12rem; font-weight: 800; }
.cand .cargo { font-size: .8rem; color: var(--urna-mudo); margin-top: 3px; line-height: 1.3; }
.cand .num { padding: 0 12px 10px; display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--urna-mudo); }
.cand .num .digitos b { width: 22px; height: 28px; font-size: 1rem; }
.cand .base { display: flex; gap: 6px; padding: 10px 12px 12px; border-top: 1px solid var(--urna-borda); margin-top: auto; background: #cfd3c1; }
.cand .base .btn { flex: 1; background: var(--verde); border-color: var(--verde-esc); color: #06180e; }
.cand .base .btn.peq { flex: 0 0 auto; background: #e9ebdf; border-color: var(--urna-borda); color: var(--urna-tx); }
.part { display: inline-block; margin-top: 6px; padding: 1px 8px; border-radius: 4px; font-size: .75rem; font-weight: 700; }
.foto { width: 84px; height: 84px; object-fit: cover; border-radius: 6px; border: 2px solid #8f9482; background: #c7cbb9; display: grid; place-items: center; font-family: var(--fd); font-weight: 800; font-size: 1.6rem; flex: none; }
.foto.p { width: 34px; height: 34px; font-size: .8rem; border-width: 1px; border-radius: 50%; border-color: var(--linha); }
.foto.m { width: 52px; height: 52px; font-size: 1.1rem; border-radius: 8px; border-color: var(--linha); }
.foto.g { width: 110px; height: 110px; font-size: 2rem; }
.vazio { color: var(--mudo); padding: 30px 0; text-align: center; }
.rodape-legal { border-top: 1px solid var(--linha); padding: 18px 0 40px; color: var(--mudo); font-size: .85rem; }
.rodape-legal p + p { margin-top: 6px; }

/* modal */
#modal:empty { display: none; }
.mbg { position: fixed; inset: 0; background: rgba(4,9,20,.78); z-index: 50; display: grid; place-items: start center; overflow-y: auto; padding: 24px 12px; }
.mbox { background: var(--bg2); border: 1px solid var(--linha); border-radius: 14px; width: min(720px, 100%); padding: 22px; position: relative; margin-block: auto; }
.mbox.largo { width: min(920px, 100%); }
.mbox h2 { font-size: 1.6rem; margin-bottom: 4px; }
.mbox .fechar { position: absolute; top: 12px; right: 12px; background: transparent; border: 0; font-size: 1.4rem; color: var(--mudo); width: 36px; height: 36px; border-radius: 8px; }
.mbox .fechar:hover { background: var(--panel); }
.mbox .rod { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 18px; }
.campo { display: grid; gap: 6px; margin-top: 14px; }
.campo label, .campo .rot { font-weight: 600; font-size: .92rem; }
.opcoes { display: grid; gap: 8px; margin-top: 8px; }
.opcoes.g2 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.opc { text-align: left; background: var(--panel); border: 1px solid var(--linha); border-radius: 10px; padding: 11px 14px; display: block; width: 100%; }
.opc small { display: block; color: var(--mudo); font-weight: 400; margin-top: 2px; }
.opc:hover:not(:disabled) { border-color: var(--laranja); }
.opc[aria-pressed=true] { border-color: var(--verde); background: #12382b; }
.opc:disabled { opacity: .5; cursor: not-allowed; }
.ficha { display: flex; gap: 14px; align-items: center; margin: 14px 0 6px; }
.attr { display: grid; grid-template-columns: 110px 1fr 34px; gap: 8px; align-items: center; font-size: .85rem; margin-top: 5px; }
.barra { background: var(--panel); border-radius: 99px; height: 8px; overflow: hidden; }
.barra i { display: block; height: 100%; border-radius: 99px; background: var(--ouro); }

/* jogo */
.abas { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--linha); margin-top: 14px; }
.abas button { background: transparent; border: 0; border-bottom: 3px solid transparent; padding: 10px 14px; color: var(--mudo); font-weight: 600; white-space: nowrap; }
.abas button[aria-selected=true] { color: var(--texto); border-bottom-color: var(--laranja); }
.painel { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; padding: 18px 0 40px; align-items: start; }
.cx { background: var(--panel); border: 1px solid var(--linha); border-radius: var(--raio); padding: 16px; }
.cx + .cx { margin-top: 16px; }
.cx h3 { font-size: 1.15rem; margin-bottom: 10px; }
.cx .sub { color: var(--mudo); font-size: .85rem; margin: -4px 0 10px; }
.proximo { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--bg2); border: 1px solid var(--linha); border-radius: var(--raio); padding: 14px 16px; margin-top: 16px; }
.proximo h2 { font-size: 1.35rem; }
.linha-pq { display: grid; grid-template-columns: 34px 1fr 54px; gap: 10px; align-items: center; padding: 6px 0; }
.linha-pq .n { font-weight: 600; font-size: .94rem; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.linha-pq .n em { font-style: normal; font-size: .7rem; padding: 0 6px; border-radius: 3px; font-weight: 700; }
.linha-pq .bar { background: var(--bg2); height: 10px; border-radius: 99px; overflow: hidden; margin-top: 4px; }
.linha-pq .bar i { display: block; height: 100%; border-radius: 99px; transition: width .5s; }
.linha-pq .v { text-align: right; font-family: var(--fd); font-weight: 700; font-size: 1.05rem; }
.linha-pq.eu .n { color: var(--ouro); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { background: var(--bg2); border: 1px solid var(--linha); border-radius: 8px; padding: 10px; }
.tile .t { font-size: .78rem; color: var(--mudo); }
.tile .val { font-family: var(--fd); font-weight: 700; font-size: 1.15rem; }
.tile .barra { margin-top: 6px; height: 6px; }
.noticias { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.noticias li { font-size: .9rem; padding-left: 12px; border-left: 3px solid var(--linha); }
.noticias li:first-child { border-left-color: var(--laranja); }
.grid-acoes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; padding: 18px 0 40px; }
.ac { background: var(--panel); border: 1px solid var(--linha); border-radius: var(--raio); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.ac h4 { font-size: 1.05rem; }
.ac p { color: var(--mudo); font-size: .88rem; flex: 1; }
.ac .cus { font-size: .82rem; font-weight: 600; }
.ac select { background: var(--bg2); border: 1px solid var(--linha); border-radius: 8px; padding: 7px 10px; width: 100%; }
.lista-prop { display: grid; gap: 12px; padding: 18px 0 40px; }
.tabela { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tabela th, .tabela td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--linha); vertical-align: middle; }
.tabela th { font-size: .8rem; color: var(--mudo); font-weight: 600; }
.pt { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.rivais { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; padding: 18px 0 40px; }
.rival { background: var(--panel); border: 1px solid var(--linha); border-radius: var(--raio); padding: 12px; display: grid; grid-template-columns: 52px 1fr; gap: 10px; }
.hist { display: grid; gap: 8px; }
.hist .it { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; background: var(--panel); border: 1px solid var(--linha); border-radius: 8px; padding: 10px 12px; align-items: center; }
.sel { font-weight: 700; padding: 2px 8px; border-radius: 4px; font-size: .8rem; }
.sel.v { background: var(--verde); color: #06180e; }
.sel.d { background: #4a2a30; color: #ffb3ae; }

/* apuração */
.apur-topo { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.relogio { font-family: var(--fd); font-weight: 800; font-size: 2rem; }
.prog { background: var(--panel); height: 10px; border-radius: 99px; overflow: hidden; margin: 8px 0 14px; }
.prog i { display: block; height: 100%; background: var(--laranja); transition: width .4s; }
.veredito { border-radius: 12px; padding: 18px; margin-top: 14px; border: 1px solid; }
.veredito.v { background: #11382a; border-color: var(--verde); }
.veredito.d { background: #38202a; border-color: var(--verm); }
.veredito.n { background: var(--panel); border-color: var(--linha); }
.veredito h3 { font-size: 1.6rem; }
.toast-on { opacity: 1 !important; transform: translate(-50%, 0) !important; }
#toast { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 20px); background: var(--urna); color: var(--urna-tx); padding: 10px 16px; border-radius: 8px; z-index: 80; max-width: min(520px, 92vw); opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
svg.evol { width: 100%; height: auto; display: block; }
svg.evol text { fill: var(--mudo); font-size: 11px; font-family: var(--fb); }

@media (max-width: 860px) {
  .topo { position: static; }
  .topo .wrap { gap: 8px; }
  .hero, .painel { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .urna-demo { order: -1; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

.cx .barra { margin: 8px 0; }
