/* =====================================================================
   Identidade visual — Câmara Municipal de Pontalina
   Paleta extraída do portal oficial (pontalina.go.leg.br):
   azul institucional #0F366F / #0D3063, verde #3FB941, ciano #09C5E7
   Fonte: Montserrat (arquivos locais)
   ===================================================================== */
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/montserrat-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/montserrat-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/montserrat-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/montserrat-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 800; font-display: swap; src: url('../fonts/montserrat-latin-800-normal.woff2') format('woff2'); }

:root {
  --cmp-navy: #0F366F;
  --cmp-navy-900: #0A2550;
  --cmp-navy-700: #164A94;
  --cmp-green: #3FB941;
  --cmp-green-700: #1F7A22;   /* verde para TEXTO e botões com texto branco (contraste ≥ 4,5:1) */
  --cmp-green-800: #17621A;
  --cmp-cyan: #09C5E7;
  --cmp-ink: #1F2933;
  --cmp-muted: #5B6573;
  --cmp-bg: #F1F4F9;
  --cmp-card: #FFFFFF;
  --cmp-line: #DCE3EE;
  --cmp-warn: #F2A900;
  --cmp-danger: #D63B3B;
  --radius: 18px;
  --shadow: 0 6px 24px rgba(15, 54, 111, .10);

  --bs-primary: var(--cmp-navy);
  --bs-primary-rgb: 15, 54, 111;
  --bs-success: var(--cmp-green);
  --bs-success-rgb: 63, 185, 65;
  --bs-body-font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --bs-body-color: var(--cmp-ink);
  --bs-body-bg: var(--cmp-bg);
  --bs-link-color: var(--cmp-navy-700);
  --bs-link-color-rgb: 22, 74, 148;
}

/* O sistema é somente tema claro: impede que modos escuros forçados do navegador
   (Chrome/Samsung Internet "escurecer páginas", extensões) deixem textos invisíveis. */
:root { color-scheme: only light; }
html, body { font-family: var(--bs-body-font-family); background: var(--cmp-bg); color: var(--cmp-ink); }
code { color: var(--cmp-navy-700); background: #EEF2F8; padding: .1em .35em; border-radius: 4px; }
.text-muted { color: #5B6573 !important; }
.form-text { color: #5B6573; }
/* Rótulos de opções desativadas (dados congelados) continuam legíveis */
.form-check-input:disabled ~ .form-check-label, .form-check-input[disabled] ~ .form-check-label { opacity: 1; color: var(--cmp-ink); }
.form-control:disabled, .form-select:disabled { background-color: #E9EDF3; color: var(--cmp-ink); opacity: 1; }
/* Selos e fundos verdes com texto branco */
.bg-success, .badge.bg-success, .text-bg-success { background-color: var(--cmp-green-700) !important; color: #fff !important; }
.bg-info, .badge.bg-info { background-color: #BFEFF9 !important; color: #0A3F5C !important; }
.bg-warning, .badge.bg-warning { background-color: #F2A900 !important; color: #2B2100 !important; }
body { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4, h5 { font-weight: 700; letter-spacing: -.01em; }
.fw-800 { font-weight: 800; }
.text-navy { color: var(--cmp-navy) !important; }
.text-green { color: var(--cmp-green-700) !important; }
.bg-navy { background: var(--cmp-navy) !important; color: #fff; }

/* ---------- Botões ---------- */
.btn { font-weight: 600; border-radius: 12px; }
.btn-primary { --bs-btn-bg: var(--cmp-navy); --bs-btn-border-color: var(--cmp-navy); --bs-btn-hover-bg: var(--cmp-navy-700); --bs-btn-hover-border-color: var(--cmp-navy-700); --bs-btn-active-bg: var(--cmp-navy-900); --bs-btn-disabled-bg: #8FA3C2; --bs-btn-disabled-border-color: #8FA3C2; }
.btn-success { --bs-btn-color: #fff; --bs-btn-bg: var(--cmp-green-700); --bs-btn-border-color: var(--cmp-green-700); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--cmp-green-800); --bs-btn-hover-border-color: var(--cmp-green-800); --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--cmp-green-800); --bs-btn-disabled-color: #fff; --bs-btn-disabled-bg: #7FAF81; --bs-btn-disabled-border-color: #7FAF81; }
.btn-outline-primary { --bs-btn-color: var(--cmp-navy); --bs-btn-border-color: var(--cmp-navy); --bs-btn-hover-bg: var(--cmp-navy); --bs-btn-hover-border-color: var(--cmp-navy); }
.btn-outline-success { --bs-btn-color: var(--cmp-green-700); --bs-btn-border-color: var(--cmp-green-700); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--cmp-green-700); --bs-btn-hover-border-color: var(--cmp-green-700); }
.btn-outline-warning { --bs-btn-color: #7A5200; --bs-btn-border-color: #C98A00; --bs-btn-hover-color: #2B2100; --bs-btn-hover-bg: #F2A900; --bs-btn-hover-border-color: #F2A900; --bs-btn-active-color: #2B2100; --bs-btn-active-bg: #F2A900; }
.btn-outline-danger { --bs-btn-color: #B42318; --bs-btn-border-color: #B42318; --bs-btn-hover-bg: #B42318; --bs-btn-hover-border-color: #B42318; }
.btn-outline-secondary { --bs-btn-color: #4A5361; --bs-btn-border-color: #8A94A3; }
.btn-danger { --bs-btn-bg: #B42318; --bs-btn-border-color: #B42318; --bs-btn-hover-bg: #921B12; --bs-btn-hover-border-color: #921B12; }
.btn-warning { --bs-btn-color: #2B2100; --bs-btn-bg: #F2A900; --bs-btn-border-color: #F2A900; --bs-btn-hover-color: #2B2100; --bs-btn-hover-bg: #D99700; --bs-btn-disabled-color: #2B2100; }
.btn-xl:disabled, .btn-xl.disabled { background: #D5DCE5; border-color: #D5DCE5; color: #3E4A59; opacity: 1; }
.btn-xl { padding: 1.1rem 2rem; font-size: 1.35rem; font-weight: 800; border-radius: 16px; letter-spacing: .02em; }

/* ---------- Cabeçalho institucional ---------- */
.cmp-header { background: linear-gradient(90deg, var(--cmp-navy-900), var(--cmp-navy) 55%, var(--cmp-navy-700)); color: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.18); }
.cmp-header .logo { height: 54px; width: auto; }
.cmp-header .sistema { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; opacity: .85; }
.cmp-header .stripe { height: 4px; background: linear-gradient(90deg, var(--cmp-green), var(--cmp-cyan)); }
.cmp-nav { background: #fff; border-bottom: 1px solid var(--cmp-line); }
.cmp-nav .nav-link { color: var(--cmp-navy); font-weight: 600; padding: .85rem 1rem; border-bottom: 3px solid transparent; white-space: nowrap; }
.cmp-nav .nav-link.active, .cmp-nav .nav-link:hover { border-bottom-color: var(--cmp-green); color: var(--cmp-navy-900); }
/* Telas pequenas: menu rola na horizontal com barra visível; telas médias/grandes: menu quebra em linhas (nenhum item escondido) */
.cmp-nav .nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.cmp-nav .nav-link { padding: .75rem .8rem; font-size: .92rem; }
@media (min-width: 768px) {
  .cmp-nav .nav { flex-wrap: wrap; overflow: visible; }
}

.badge-simulacao { background: var(--cmp-warn); color: #2b2100; font-weight: 800; letter-spacing: .06em; }

/* ---------- Cards ---------- */
.card-cmp { background: var(--cmp-card); border: 1px solid var(--cmp-line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-cmp .card-title { color: var(--cmp-navy); font-weight: 700; }
.kpi { padding: 1.1rem 1.25rem; }
.kpi .kpi-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--cmp-muted); font-weight: 600; }
.kpi .kpi-value { font-size: 2rem; font-weight: 800; color: var(--cmp-navy); line-height: 1.1; }
.section-title { font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; color: var(--cmp-muted); font-weight: 700; margin-bottom: .75rem; }

.status-pill { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .8rem; border-radius: 999px; font-weight: 700; font-size: .85rem; background: #E8EEF7; color: var(--cmp-navy); }
.status-pill.ok { background: #E3F5E3; color: #1F7A22; }
.status-pill.warn { background: #FFF4D6; color: #7A5600; }
.status-pill.live { background: #E3F5E3; color: #1F7A22; }
.status-pill.live::before { content: ''; width: .6rem; height: .6rem; border-radius: 50%; background: var(--cmp-green); animation: pulse 1.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(63,185,65,.6); } 70% { box-shadow: 0 0 0 10px rgba(63,185,65,0); } 100% { box-shadow: 0 0 0 0 rgba(63,185,65,0); } }

/* ---------- Grade de vereadores (acompanhamento) ---------- */
.eleitores-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .9rem; }
.eleitor { background: #fff; border: 2px solid var(--cmp-line); border-radius: 16px; padding: .8rem; text-align: center; position: relative; transition: border-color .2s, background .2s; }
.eleitor img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.eleitor .nome { font-weight: 700; font-size: .85rem; margin-top: .5rem; line-height: 1.2; min-height: 2.1em; }
.eleitor .situacao { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-top: .35rem; color: var(--cmp-muted); }
.eleitor.votou { border-color: var(--cmp-green); background: #F1FAF1; }
.eleitor.votou .situacao { color: #1F7A22; }
.eleitor .online { position: absolute; top: .6rem; right: .6rem; width: .7rem; height: .7rem; border-radius: 50%; background: #C5CCD6; }
.eleitor .online.on { background: var(--cmp-green); }

/* ---------- Tela de votação (tablet) ---------- */
/* Ocupa exatamente a altura visível (100dvh desconta as barras do navegador): nada fica cortado */
.voto-body { height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; background: var(--cmp-bg); }
.voto-top { flex: none; }
.voto-top { background: linear-gradient(90deg, var(--cmp-navy-900), var(--cmp-navy)); color: #fff; padding: .75rem 1.25rem; display: flex; align-items: center; gap: 1rem; }
.voto-top .logo { height: 46px; }
.voto-top .eleitor-nome { margin-left: auto; text-align: right; font-weight: 600; font-size: .95rem; min-width: 0; overflow-wrap: anywhere; }
.voto-top .logo { max-width: 45vw; object-fit: contain; }
@media (max-width: 576px) {
  .voto-top { flex-wrap: wrap; gap: .5rem; padding: .6rem .8rem; }
  .voto-top .logo { height: 34px; }
  .voto-top .eleitor-nome { font-size: .8rem; }
  .voto-main { padding: .9rem .75rem; }
}
.voto-main { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: clamp(.5rem, 1.6vh, 1.1rem) clamp(.75rem, 2vw, 1.5rem); padding-bottom: max(.5rem, env(safe-area-inset-bottom)); }
.tela { display: none; flex: 1; min-height: 0; overflow-y: auto; }
.tela.ativa { display: flex; flex-direction: column; }
.tela-centro { align-items: center; justify-content: safe center; text-align: center; }
#tela-votacao { overflow: hidden; }
#tela-votacao > * { flex: none; }
.aguardando-titulo { font-size: clamp(1.8rem, 4.5vw, 3rem); font-weight: 800; color: var(--cmp-navy); letter-spacing: .02em; }
.aguardando-icone { width: 110px; height: 110px; border-radius: 50%; border: 8px solid #DCE6F5; border-top-color: var(--cmp-navy); animation: spin 1.6s linear infinite; margin-bottom: 1.5rem; }
@keyframes spin { to { transform: rotate(360deg); } }
.cargo-titulo { font-size: clamp(1.25rem, min(3.6vw, 4.6vh), 2.4rem); line-height: 1.15; font-weight: 800; color: var(--cmp-navy); text-align: center; margin: 0 0 .3rem; }
.turno-sub { text-align: center; color: var(--cmp-muted); font-weight: 600; margin-bottom: 1.1rem; }
.voto-info { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .3rem 1rem; margin-bottom: .4rem; }
.voto-info .turno-sub, .voto-info .tempo-voto { margin: 0; }
.voto-instrucao { text-align: center; color: var(--cmp-muted); margin: 0 0 .5rem; line-height: 1.25; }
/* Colunas, formato e tamanho da foto (--foto) são calculados em votar.js para caber sem rolagem */
#tela-votacao > .candidatos-grid { flex: 1 1 0; min-height: 0; }
.candidatos-grid { display: grid; grid-auto-rows: max-content; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: clamp(.6rem, 1.6vw, 1.4rem); padding: 8px; justify-content: center; align-content: safe center; }
.candidatos-grid.rola { overflow-y: auto; align-content: start; -webkit-overflow-scrolling: touch; }.cand { background: #fff; border: 4px solid transparent; border-radius: 22px; box-shadow: var(--shadow); padding: 8px; min-width: 0; text-align: center; cursor: pointer; user-select: none; transition: transform .12s, border-color .12s, box-shadow .12s; position: relative; min-height: 48px; }
.cand:active { transform: scale(.98); }
.cand img { display: block; width: var(--foto, 100%); max-width: 100%; aspect-ratio: 1; margin: 0 auto; object-fit: cover; border-radius: 16px; background: #E9EEF5; }
.cand-txt { margin-top: .5rem; min-width: 0; }
.candidatos-grid.lado .cand { display: flex; align-items: center; gap: 12px; text-align: left; }
.candidatos-grid.lado .cand img, .candidatos-grid.lado .branco-box { flex: none; margin: 0; }
.candidatos-grid.lado .cand-txt { margin-top: 0; flex: 1; }
.candidatos-grid.lado .cand-branco .cand-chapa { display: none; }
.candidatos-grid.compacto .cand .cand-nome { font-size: .92rem; line-height: 1.1; }
.candidatos-grid.compacto .cand .cand-chapa { font-size: .7rem; line-height: 1.1; margin-top: .1rem; }
.candidatos-grid.compacto { gap: .5rem; }
.candidatos-grid.lado .cand .check { width: 34px; height: 34px; font-size: 1.2rem; }
.cand .cand-nome { font-weight: 800; font-size: clamp(1rem, 1.7vw, 1.3rem); color: var(--cmp-navy-900); line-height: 1.2; }
.cand .cand-chapa { font-size: .82rem; font-weight: 700; color: var(--cmp-green-700); margin-top: .25rem; text-transform: uppercase; letter-spacing: .03em; }
.cand.selecionado { border-color: var(--cmp-green); box-shadow: 0 0 0 6px rgba(63,185,65,.25), var(--shadow); }
.cand .check { position: absolute; top: .7rem; right: .7rem; width: 44px; height: 44px; border-radius: 50%; background: var(--cmp-green); color: #fff; display: none; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 800; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.cand.selecionado .check { display: flex; }
/* Card do voto em BRANCO, ao lado dos candidatos/chapas */
.cand-branco .branco-box { width: var(--foto, 100%); max-width: 100%; margin: 0 auto; aspect-ratio: 1; border-radius: 16px; background: #F4F6F9; border: 3px dashed #9AA5B1; display: flex; align-items: center; justify-content: center; font-size: clamp(.75rem, calc(var(--foto, 130px) * .15), 1.9rem); font-weight: 800; letter-spacing: .04em; color: #5B6573; }
.cand-branco.selecionado .branco-box { background: #EAF6EA; border-color: var(--cmp-green); color: var(--cmp-navy-900); }
/* Barra fora da área dos cards: nunca passa por cima deles */
.voto-barra { padding: .5rem 0 .25rem; text-align: center; }
.voto-barra .btn-xl { min-width: min(420px, 100%); }
/* Pouca altura (tablet deitado, com as barras do Chrome): cabeçalho e textos compactos */
@media (max-height: 700px) {
  .voto-top { padding: .45rem 1.25rem; }
  .voto-top .logo { height: 38px; }
  .voto-info .tempo-voto { font-size: 1rem; padding: .2rem .9rem; }
  .voto-instrucao { font-size: .92rem; margin-bottom: .2rem; }
  .voto-barra .btn-xl { padding: .75rem 2rem; font-size: 1.2rem; }
  .sucesso-icone { width: 96px; height: 96px; font-size: 3.2rem; }
  .aguardando-icone { width: 84px; height: 84px; margin-bottom: 1rem; }
}
@media (max-height: 430px) {
  .voto-top .logo { height: 30px; }
  .voto-instrucao { display: none; }
  .voto-barra .btn-xl { padding: .5rem 1.5rem; font-size: 1.05rem; }
}
/* Aviso do primeiro toque (entra em tela cheia) */
.aviso-telacheia { position: fixed; inset: 0; z-index: 4000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; padding: 1.5rem; text-align: center; color: #fff; cursor: pointer; background: linear-gradient(160deg, var(--cmp-navy-900), var(--cmp-navy) 60%, var(--cmp-navy-700)); }
.aviso-telacheia img { height: clamp(64px, 16vh, 120px); max-width: 80vw; object-fit: contain; margin-bottom: 1rem; }
.aviso-telacheia .aviso-titulo { font-size: clamp(1.6rem, 4.5vw, 2.8rem); font-weight: 800; }
.aviso-telacheia .aviso-texto { font-size: 1.15rem; opacity: .85; }
.sucesso-icone { width: 130px; height: 130px; border-radius: 50%; background: var(--cmp-green); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 4.5rem; font-weight: 800; margin: 0 auto 1.25rem; box-shadow: 0 10px 30px rgba(63,185,65,.4); animation: pop .4s ease-out; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.sucesso-titulo { font-size: clamp(1.7rem, 4.5vw, 2.8rem); font-weight: 800; color: #1F7A22; }
/* Eleito do cargo recém-homologado */
.eleito-rotulo { font-size: clamp(1rem, min(2.2vw, 3.4vh), 1.5rem); font-weight: 800; letter-spacing: .08em; color: var(--cmp-green-700); margin-bottom: clamp(.6rem, 2.5vh, 1.5rem); }
.eleito-painel { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.5rem); max-width: min(1000px, 100%); background: #fff; border: 5px solid var(--cmp-green); border-radius: 28px; box-shadow: var(--shadow); padding: clamp(1rem, 3vh, 2rem) clamp(1rem, 3vw, 2.5rem); text-align: left; animation: pop .4s ease-out; }
.eleito-foto { flex: none; width: min(34vw, 46vh, 340px); aspect-ratio: 1; object-fit: cover; border-radius: 22px; background: #E9EEF5; }
.eleito-dados { min-width: 0; }
.eleito-cargo { font-size: clamp(1.15rem, min(2.6vw, 4.2vh), 1.8rem); font-weight: 700; color: var(--cmp-green-700); line-height: 1.2; }
.eleito-nome { font-size: clamp(1.6rem, min(4.6vw, 7.5vh), 3.2rem); font-weight: 800; color: var(--cmp-navy); line-height: 1.1; margin: .4rem 0 .6rem; overflow-wrap: break-word; }
.eleito-votos { font-size: clamp(1.1rem, min(2.4vw, 4vh), 1.6rem); font-weight: 700; color: var(--cmp-muted); }
@media (orientation: portrait) {
  .eleito-painel { flex-direction: column; text-align: center; }
  .eleito-foto { width: min(60vw, 38vh, 380px); }
}
.conexao-alerta { position: fixed; top: 0; left: 0; right: 0; z-index: 2000; background: var(--cmp-warn); color: #2b2100; text-align: center; font-weight: 700; padding: .6rem; display: none; }
.conexao-alerta.visivel { display: block; }
.modal-confirma .modal-content { border-radius: 24px; border: 0; }
.modal-confirma .modal-header { background: var(--cmp-navy); color: #fff; border-radius: 24px 24px 0 0; justify-content: center; }
.modal-confirma .foto-confirma { width: 220px; height: 220px; border-radius: 20px; object-fit: cover; border: 5px solid var(--cmp-green); }
.modal-confirma .modal-footer { justify-content: center; gap: .75rem; flex-wrap: wrap; }
.modal-confirma .modal-footer .btn { min-width: 260px; }
.modal-confirma .foto-confirma { margin-bottom: 1rem; }
.modal-confirma .modal-dialog { --bs-modal-width: min(940px, 94vw); }
/* Tablet deitado: foto ao lado dos dados e botões na mesma linha, tudo visível sem rolar */
@media (min-width: 768px) and (max-height: 800px) {
  .modal-confirma .modal-dialog { --bs-modal-margin: .5rem; }
  .modal-confirma .modal-header { padding: .6rem 1rem; }
  .modal-confirma .modal-body { display: flex; align-items: center; justify-content: center; gap: 1.75rem; padding: 1rem 1.5rem !important; }
  .modal-confirma .foto-confirma { width: clamp(140px, 34vh, 220px); height: auto; aspect-ratio: 1; margin: 0; flex: none; }
  .modal-confirma .conf-dados { min-width: 0; }
  .modal-confirma .conf-dados .alert { margin-top: .75rem !important; }
  .modal-confirma .modal-footer { flex-wrap: nowrap; padding-bottom: 1rem !important; }
  .modal-confirma .modal-footer .btn { min-width: 0; padding: .9rem 1.2rem; font-size: clamp(.95rem, 1.75vw, 1.25rem); white-space: nowrap; }
}

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; background: radial-gradient(1200px 600px at 10% -10%, var(--cmp-navy-700), transparent), linear-gradient(160deg, var(--cmp-navy-900), var(--cmp-navy)); }
.login-card { width: 100%; max-width: 460px; background: #fff; border-radius: 24px; box-shadow: 0 20px 60px rgba(0,0,0,.3); overflow: hidden; }
@media (max-height: 640px) {
  .login-wrap { padding: .75rem; }
  .login-card .p-4 { padding: 1rem 1.5rem !important; }
  .login-card .p-4 p.text-muted { margin-bottom: .75rem !important; }
  .login-card .mb-4 { margin-bottom: 1rem !important; }
}
.login-card .topo { background: var(--cmp-navy); padding: 1.5rem; text-align: center; border-bottom: 5px solid var(--cmp-green); }
.login-card .topo img { max-width: 100%; height: 64px; }
.login-card .form-control { padding: .9rem 1rem; font-size: 1.1rem; border-radius: 12px; }

/* ---------- Resultados ---------- */
.eleito-card { display: flex; gap: 1rem; align-items: center; }
.eleito-card img { width: 96px; height: 96px; border-radius: 18px; object-fit: cover; border: 4px solid var(--cmp-green); }
.mesa-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; }
.mesa-item { background: #fff; border-radius: 20px; border: 1px solid var(--cmp-line); box-shadow: var(--shadow); text-align: center; padding: 1.2rem; }
.mesa-item img { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; border: 5px solid var(--cmp-green); }
.mesa-item .cargo { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 800; color: var(--cmp-green-700); margin-top: .75rem; }
.mesa-item .nome { font-weight: 800; color: var(--cmp-navy-900); font-size: 1.05rem; }
.mesa-item.vazio img { border-color: var(--cmp-line); filter: grayscale(1); opacity: .5; }
.chart-box { position: relative; height: 300px; }
.table-cmp thead th { background: var(--cmp-navy); color: #fff; font-weight: 600; font-size: .85rem; border: 0; }
.table-cmp td { vertical-align: middle; }
.foto-mini { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }

/* ---------- Ata (conferência na tela) ---------- */
.ata-previa { max-width: 860px; margin: 0 auto; border: 1px solid var(--cmp-line); background: #fff; color: #000; font-family: Arial, Helvetica, sans-serif; line-height: 1.45; padding: 0 clamp(1rem, 5vw, 3.5rem) clamp(1rem, 4vw, 3rem); overflow-wrap: break-word; }
.ata-previa .cab { background: var(--cmp-navy); color: #fff; border-bottom: 4px solid var(--cmp-green); padding: 12px 18px; margin: 0 calc(-1 * clamp(1rem, 5vw, 3.5rem)) 1.5rem; }
.ata-previa .cab table { width: 100%; }
.ata-previa .cab .so-impressao { display: none; }
.ata-previa .cab .t1 { font-weight: 700; font-size: 1.15rem; }
.ata-previa .cab .t2 { font-size: .85rem; }
.ata-previa .marca { display: none; }
.ata-previa .ata-numero { text-align: center; font-size: 1.25rem; font-weight: 700; margin-bottom: .25rem; }
.ata-previa .ata-titulo { text-align: center; font-weight: 700; margin-bottom: 1.25rem; }
.ata-previa .ata-h { color: var(--cmp-navy); font-weight: 700; margin: 1.25rem 0 .5rem; }
.ata-previa .ata-s { font-weight: 700; margin: .9rem 0 .35rem; }
.ata-previa .ata-p { text-align: justify; margin-bottom: .55rem; }
.ata-previa .ata-l { text-align: justify; margin-bottom: .35rem; padding-left: 1.9rem; text-indent: -.9rem; }
.ata-previa .ata-assin { width: 100%; margin-top: 3.5rem; }
.ata-previa .ata-assin td { width: 50%; text-align: center; vertical-align: top; font-size: .9rem; overflow-wrap: anywhere; }
.ata-previa .ata-sim { text-align: center; font-weight: 700; color: #B42318; }

/* ---------- Nome do sistema ---------- */
.marca-sistema { font-weight: 800; letter-spacing: -.01em; line-height: 1.1; white-space: nowrap; }
.marca-sistema b { font-weight: 800; color: var(--cmp-green-700); }
.cmp-header .marca-sistema { display: block; font-size: 1.3rem; }
.cmp-header .marca-sistema b { color: #5FD361; }
.login-marca { font-size: 2.1rem; color: #fff; text-align: center; margin: .9rem 0 0; }
.login-marca .marca-sistema b { color: #5FD361; }
.login-marca small { display: block; font-size: .95rem; font-weight: 600; color: #D5E0F2; margin-top: .25rem; }

/* ---------- Cartão "Identificação da eleição" ---------- */
.cartao-id { overflow: hidden; }
.cartao-id-dados { flex: 1 1 320px; min-width: 0; }
.cartao-id-status { text-align: right; }
.cartao-id-acoes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; padding: 1rem 1.5rem; background: #F7F9FC; border-top: 1px solid var(--cmp-line); }
.atalho { display: flex; align-items: center; gap: .85rem; min-height: 68px; padding: .7rem .9rem; background: #fff; border: 1px solid var(--cmp-line); border-radius: 14px; color: var(--cmp-navy); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
.atalho:hover { border-color: var(--cmp-navy); box-shadow: 0 6px 16px rgba(15,54,111,.14); transform: translateY(-1px); color: var(--cmp-navy-900); }
.atalho:focus-visible { outline: 3px solid var(--cmp-cyan); outline-offset: 2px; }
.atalho-icone { flex: none; width: 42px; height: 42px; padding: 10px; border-radius: 11px; background: #E8EEF7; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.atalho-texto { min-width: 0; line-height: 1.25; }
.atalho-texto strong { display: block; font-weight: 700; }
.atalho-texto small { display: block; font-size: .8rem; color: var(--cmp-muted); }
.atalho.verde .atalho-icone { background: #E6F5E7; color: var(--cmp-green-700); }
.atalho.verde:hover { border-color: var(--cmp-green-700); }
.atalho.cheio { background: var(--cmp-navy); border-color: var(--cmp-navy); color: #fff; }
.atalho.cheio:hover { background: var(--cmp-navy-700); color: #fff; }
.atalho.cheio .atalho-icone { background: rgba(255,255,255,.16); }
.atalho.cheio small { color: #D5E0F2; }
@media (max-width: 1100px) { .cartao-id-acoes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 768px) { .cartao-id-status { text-align: left; } }
@media (max-width: 576px) { .cartao-id-acoes { grid-template-columns: 1fr; padding: 1rem; } }

/* ---------- Registro de chapa e regras ---------- */
.prazo-chapa { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; border-left: 5px solid var(--cmp-green); }
.regimento { max-height: 420px; overflow-y: auto; padding: 1.1rem 1.35rem; background: #F7F9FC; border: 1px solid var(--cmp-line); border-radius: 14px; line-height: 1.55; }
.regimento h3 { font-size: 1rem; font-weight: 700; color: var(--cmp-navy); margin: 1rem 0 .4rem; }
.regimento ul { margin: 0; padding-left: 1.2rem; }
.regimento li { margin-bottom: .35rem; }
details > .regimento { margin-top: .75rem; }

/* ---------- Protocolo das chapas ---------- */
.status-pill { white-space: nowrap; }
.status-pill.erro { background: #FDE8E8; color: #8A1C1C; }
.criador-chapa { padding: .55rem .85rem; background: #F1F4F9; border-left: 4px solid var(--cmp-green); border-radius: 8px; }
.chapa-pendente { border: 2px solid var(--cmp-warn); }
.protocolo-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin-top: .75rem; padding: .85rem 1rem; background: #F1FAF1; border: 1px solid #BFE5C0; border-radius: 12px; }
.minha-chapa { border-left: 5px solid var(--cmp-warn); }
.minha-chapa.sit-protocolada { border-left-color: var(--cmp-green); }
.minha-chapa.sit-devolvida, .minha-chapa.sit-cancelada { border-left-color: var(--cmp-danger); }
.passos { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; padding: 0; margin: 0 0 .75rem; }
.passos li { padding: .7rem .9rem; border-radius: 12px; background: #F1F4F9; border-top: 4px solid var(--cmp-line); color: var(--cmp-muted); }
.passos li strong, .passos li span { display: block; }
.passos li span { font-size: .82rem; }
.passos li.feito { background: #F1FAF1; border-top-color: var(--cmp-green); color: var(--cmp-green-800); }
.passos li.atual { background: #FFF4D6; border-top-color: var(--cmp-warn); color: #5C4100; }
.aviso-chapa { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .6rem 1.2rem; max-width: 100%; padding: .85rem 1.25rem; border-radius: 16px; background: #FFF4D6; color: #5C4100; border: 2px solid var(--cmp-warn); text-align: left; }
.aviso-chapa span { display: block; font-weight: 700; }
.aviso-chapa.sit-protocolada { background: #E3F5E3; color: #14531A; border-color: var(--cmp-green); }
.aviso-chapa.sit-devolvida, .aviso-chapa.sit-cancelada { background: #FDE8E8; color: #8A1C1C; border-color: var(--cmp-danger); }
@media (max-width: 576px) { .passos { grid-template-columns: 1fr; } }

/* ---------- Impugnação, avisos e textos ---------- */
.impug-texto { max-height: 320px; overflow-y: auto; padding: 1rem 1.15rem; background: #F7F9FC; border: 1px solid var(--cmp-line); border-radius: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.anexo { display: inline-flex; align-items: center; gap: .4rem; max-width: 100%; padding: .45rem .8rem; border: 1px solid var(--cmp-line); border-radius: 10px; background: #fff; text-decoration: none; font-weight: 600; overflow-wrap: anywhere; }
.anexo:hover { border-color: var(--cmp-navy); }
.anexo small { color: var(--cmp-muted); white-space: nowrap; }
.aviso-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .6rem; max-height: 380px; overflow-y: auto; }
.texto-pronto { padding: 1rem; margin-bottom: .75rem; border: 1px solid var(--cmp-line); border-radius: 12px; background: #F7F9FC; }
.menu-espera { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }

/* ---------- Notificações ---------- */
.btn-push { display: inline-flex; align-items: center; gap: .4rem; color: #fff; border: 1px solid rgba(255,255,255,.55); background: transparent; white-space: nowrap; }
.btn-push:hover, .btn-push:focus-visible { color: #fff; background: rgba(255,255,255,.14); }
.btn-push svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn-push.push-on { background: rgba(63,185,65,.28); border-color: #5FD361; }
.voto-top .btn-push { margin-left: .5rem; }
@media (max-width: 480px) { .btn-push.push-on span { display: none; } .btn-push { padding-inline: .5rem; } }
@media (max-width: 576px) {
  .cmp-header .container-fluid, .cmp-header .container-fluid > .d-flex { gap: .5rem !important; }
  .cmp-header .container-fluid > a { min-width: 0; flex: 0 1 auto; }
  .cmp-header .container-fluid > .d-flex { flex: none; }
  .cmp-header .container-fluid > a .logo { max-width: 100%; object-fit: contain; object-position: left; }
}

/* ---------- Acessos ---------- */
.acesso-item > summary { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; padding: 1rem 1.25rem; cursor: pointer; list-style: none; }
.acesso-item > summary::-webkit-details-marker { display: none; }
.acesso-item > summary::after { content: '▾'; color: var(--cmp-muted); }
.acesso-item[open] > summary::after { content: '▴'; }
.acesso-item > summary small { display: block; color: var(--cmp-muted); }
.acesso-opcoes { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .6rem; }
.acesso-op { display: flex; gap: .7rem; padding: .7rem .85rem; border: 1px solid var(--cmp-line); border-radius: 12px; cursor: pointer; background: #fff; }
.acesso-op:has(:checked) { border-color: var(--cmp-green); background: #F1FAF1; }
.acesso-op small { display: block; color: var(--cmp-muted); line-height: 1.25; }
.acesso-tabela td { vertical-align: middle; }
.acesso-item { overflow: hidden; }
.acesso-nota { grid-column: span 2; }
.d-contents { display: contents; }
button.atalho { width: 100%; font: inherit; text-align: left; cursor: pointer; }
.atalho.mini { display: inline-flex; width: auto; min-height: 0; gap: .5rem; padding: .35rem .75rem .35rem .35rem; border-radius: 12px; font-size: .88rem; }
.atalho.mini .atalho-icone { width: 32px; height: 32px; padding: 7px; border-radius: 9px; }
.acesso-modal { border: 0; border-radius: 20px; overflow: hidden; }
.acesso-modal .cartao-id-acoes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 576px) { .acesso-nota { grid-column: auto; } .acesso-modal .cartao-id-acoes { grid-template-columns: 1fr; } }

/* ---------- Rodapé de formulário ---------- */
.form-rodape { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin: 1.5rem -1.5rem -1.5rem; padding: 1rem 1.5rem; background: #F7F9FC; border-top: 1px solid var(--cmp-line); border-radius: 0 0 var(--radius) var(--radius); }
.form-rodape > div { flex: 1 1 260px; }
.form-rodape .btn { min-width: 180px; }
@media (max-width: 576px) { .form-rodape .btn { width: 100%; } }

/* ---------- Ações administrativas ---------- */
.acoes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .75rem; }
.acoes-grid .btn { padding: .95rem .75rem; font-size: .95rem; display: flex; flex-direction: column; align-items: center; gap: .2rem; min-height: 72px; justify-content: center; }
.acoes-grid .btn small { font-weight: 600; font-size: .74rem; }
.acoes-grid .btn:disabled, .acoes-grid .btn.disabled { opacity: .32; filter: grayscale(.7); cursor: not-allowed; }

/* =====================================================================
   TELÃO — "palco" fixo 1920×1080 (16:9) redimensionado por JavaScript para
   caber em qualquer TV/resolução/zoom (720p, 1080p, 4K, escala do Windows),
   sem rolagem e sem precisar reduzir o zoom da TV. Todas as medidas abaixo
   são do palco (px fixos), por isso não dependem da largura da janela.
   ===================================================================== */
body.telao { margin: 0; overflow: hidden; background: var(--cmp-navy-900); color: #fff; }
.telao-palco { position: fixed; top: 0; left: 0; width: 1920px; height: 1080px; transform-origin: 0 0; overflow: hidden;
  background: linear-gradient(160deg, var(--cmp-navy-900), var(--cmp-navy) 60%, var(--cmp-navy-700)); display: flex; flex-direction: column; }
.telao-palco .topo { flex: none; height: 112px; display: flex; align-items: center; gap: 28px; padding: 0 44px; border-bottom: 6px solid var(--cmp-green); }
.telao-palco .topo img { height: 74px; width: auto; }
.telao-palco .topo-titulo { min-width: 0; }
.telao-palco .topo-titulo .rotulo { font-size: 17px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.telao-palco .topo-titulo .nome { font-size: 28px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 980px; }
.telao-palco .badge-simulacao { font-size: 20px; padding: 8px 14px; }
.telao-palco #t-ativar-som { margin-left: auto; font-size: 20px; padding: 10px 18px; border-radius: 12px; }
.telao-palco .relogio { margin-left: auto; font-size: 40px; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; line-height: 1.05; }
.telao-palco .relogio-data { font-size: 18px; font-weight: 600; opacity: .85; margin-top: 4px; }
.telao-palco .relogio-data::first-letter { text-transform: uppercase; }
.telao-palco #t-ativar-som:not(.d-none) + .relogio { margin-left: 24px; }

.telao-palco .telao-layout { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 18px; padding: 20px 36px 24px; }

/* Faixa superior (abaixo do cabeçalho): cargo e turno, participação, resultado ou composição da Mesa */
.telao-palco .telao-principal { flex: none; min-width: 0; background: rgba(255,255,255,.07); border: 2px solid rgba(255,255,255,.12); border-radius: 22px; padding: 16px 28px; }
.telao-palco h1 { font-size: 46px; line-height: 1.12; font-weight: 800; margin-bottom: 6px; }
.telao-palco .t-sub { font-size: 26px; opacity: .85; }
.telao-palco .t-num { font-size: 34px; font-weight: 800; }
.telao-palco .t-texto { font-size: 22px; opacity: .85; }
.telao-palco .faixa { display: flex; align-items: center; gap: 32px; }
.telao-palco .faixa-info { flex: 1; min-width: 0; }
.telao-palco .faixa-part { flex: 0 0 640px; }
.telao-palco .barra-part { height: 26px; border-radius: 99px; background: rgba(255,255,255,.15); overflow: hidden; }
.telao-palco .barra-part > div { height: 100%; background: linear-gradient(90deg, var(--cmp-green), var(--cmp-cyan)); transition: width .4s; }
.telao-palco .chart-box { flex: 0 0 560px; height: 168px; background: #fff; border-radius: 18px; padding: 10px 14px; }
.telao-palco .faixa-eleito { flex: 0 0 auto; max-width: 860px; }
.telao-palco .eleito-destaque { background: #fff; color: var(--cmp-ink); border-radius: 20px; padding: 14px 20px; display: flex; gap: 18px; align-items: center; }
.telao-palco .eleito-destaque img { width: 146px; height: 146px; border-radius: 16px; object-fit: cover; border: 5px solid var(--cmp-green); flex: none; }
.telao-palco .eleito-destaque .e-rotulo { font-size: 20px; font-weight: 800; text-transform: uppercase; color: var(--cmp-green-700); }
.telao-palco .eleito-destaque .e-nome { font-size: 40px; font-weight: 800; color: var(--cmp-navy); line-height: 1.1; overflow-wrap: anywhere; }
.telao-palco .eleito-destaque .e-votos { font-size: 34px; font-weight: 800; color: var(--cmp-green-700); line-height: 1.2; }
.telao-palco .eleito-destaque .e-info { font-size: 20px; }
/* Resultado final: ocupa o telão inteiro, legível à distância */
.telao-palco.modo-final .telao-principal { flex: 1; min-height: 0; display: flex; padding: 22px 28px 26px; }
.telao-palco.modo-final #t-final { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 20px; }
.telao-palco .final-cab { flex: none; display: flex; align-items: center; gap: 28px; white-space: nowrap; }
.telao-palco #t-final h1 { font-size: 50px; }
.telao-palco #t-final .final-cab > .t-texto { font-size: 24px; }
.telao-palco .final-grade { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.telao-palco .final-item { min-width: 0; min-height: 0; display: flex; flex-direction: column; align-items: center; text-align: center; background: #fff; color: var(--cmp-ink); border-radius: 26px; border-top: 12px solid var(--cmp-green); padding: 20px 18px 18px; }
.telao-palco .final-cargo { font-size: 29px; font-weight: 800; text-transform: uppercase; color: var(--cmp-green-700); white-space: nowrap; line-height: 1.1; }
.telao-palco .final-item img { width: 270px; height: 270px; border-radius: 50%; object-fit: cover; border: 8px solid var(--cmp-green); margin: 18px 0; flex: none; }
.telao-palco .final-nome { flex: 1; display: flex; align-items: center; justify-content: center; font-size: 43px; font-weight: 800; color: var(--cmp-navy); line-height: 1.1; text-wrap: balance; }
.telao-palco .final-votos { font-size: 40px; font-weight: 800; color: var(--cmp-green-700); line-height: 1; margin: 8px 0 14px; }
.telao-palco .final-votos strong { font-size: 84px; font-weight: 800; line-height: 1; }
.telao-palco .final-turno { align-self: stretch; background: var(--cmp-navy); color: #fff; font-size: 32px; font-weight: 800; line-height: 1.15; border-radius: 16px; padding: 10px 8px; white-space: nowrap; }
.telao-palco .final-criterio { height: 34px; padding-top: 6px; font-size: 24px; font-weight: 700; color: var(--cmp-muted); line-height: 1.1; }
.telao-palco .final-item.vazio { border-top-color: var(--cmp-line); }
.telao-palco .final-item.vazio img { border-color: var(--cmp-line); filter: grayscale(1); opacity: .5; }
.telao-palco .telao-relatorios { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.telao-palco .telao-relatorios .btn { font-size: 18px; padding: 5px 16px; border-radius: 12px; }
/* Aguardando o início da votação: logo do SELEG em destaque, sem os cards dos vereadores */
.telao-palco .aguardando-palco { text-align: center; }
.telao-palco .espera-logo { height: 640px; width: auto; display: block; margin: 0 auto 26px; }
.telao-palco.modo-espera .telao-principal { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; background: none; border: 0; padding: 0; }
.telao-palco.modo-espera h1 { font-size: 64px; }
.telao-palco.modo-espera .t-sub { font-size: 36px; }
.telao-palco .topo > img { flex: none; }
.telao-palco .topo .topo-seleg { height: 98px; }
.telao-palco .topo .relogio, .telao-palco #t-ativar-som { flex: none; white-space: nowrap; }
.telao-palco.modo-espera .topo-seleg { display: none; }

/* Cards abaixo da faixa, em toda a largura: 3 colunas × 4 linhas (até 12 vereadores). Cards largos: o nome
   do vereador e o nome de quem ele votou ficam sempre em UMA linha */
.telao-palco .telao-cards { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.telao-palco .telao-cards h2 { font-size: 22px; line-height: 1.1; font-weight: 800; margin-bottom: 8px; }
.telao-palco .voto-cards { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(4, minmax(0, 1fr)); gap: 10px 14px; }
.telao-palco .vcard { display: flex; gap: 16px; align-items: center; min-height: 0; overflow: hidden; background: rgba(255,255,255,.08); border: 3px solid rgba(255,255,255,.16); border-radius: 18px; padding: 4px 16px; transition: border-color .2s, background .2s; }
.telao-palco .vcard.ok { border-color: var(--cmp-green); background: rgba(63,185,65,.16); }
.telao-palco .vcard.novo { animation: card-novo 1.2s ease-out; }
@keyframes card-novo { 0% { box-shadow: 0 0 0 0 rgba(63,185,65,.9); background: rgba(63,185,65,.45); } 100% { box-shadow: 0 0 0 18px rgba(63,185,65,0); } }
.telao-palco .vcard-foto-box { position: relative; flex: none; width: 112px; height: 112px; border-radius: 14px; overflow: hidden; border: 3px solid rgba(255,255,255,.7); background: #fff; }
.telao-palco .vcard-foto { display: block; width: 100%; height: 100%; object-fit: cover; }
.telao-palco .vcard-corpo { min-width: 0; flex: 1; }
/* Nome do vereador: mesma fonte e mesmo tamanho em todos os cards, em uma única linha.
   --vc-nome e --vc-voto só diminuem (no telao.js) se algum nome for longo demais para o card */
.telao-palco .vcard-nome { font-size: var(--vc-nome, 20px); font-weight: 800; color: #fff; line-height: 1.15; margin-bottom: 3px; padding-left: 6px; white-space: nowrap; overflow: hidden; }
.telao-palco .vcard-votos { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.telao-palco .vcard-votos li { display: flex; align-items: center; gap: 8px; font-size: 18px; line-height: 1.2; color: rgba(255,255,255,.88); min-height: 26px; padding: 1px 6px; border-radius: 8px; min-width: 0; }
.telao-palco .vcard-votos li.atual { background: rgba(255,255,255,.16); color: #fff; }
.telao-palco .vcard-votos .vc-cargo { flex: 0 0 96px; font-weight: 600; white-space: nowrap; }
.telao-palco .vcard-votos .vc-cargo small { font-size: 14px; opacity: .8; }
.telao-palco .vcard-votos .vc-voto { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; font-weight: 800; }
.telao-palco .vcard-votos .vc-voto span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; font-size: var(--vc-voto, 18px); line-height: 1.25; }
.telao-palco .vcard-votos .vc-voto img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; background: #fff; flex: none; }
.telao-palco .vcard-votos .est-candidato .vc-voto { color: #fff; }
.telao-palco .vcard-votos .est-branco .vc-voto { color: #D5DCE5; font-style: italic; }
.telao-palco .vcard-votos .est-nao_logado .vc-voto { color: #FFB4B4; font-weight: 700; }
/* PRESENTE / AUSENTE no rodapé da foto (ausente = sem sessão no tablet, não pode votar) */
.telao-palco .vcard-login { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font-size: 13px; font-weight: 800; letter-spacing: .06em; line-height: 1; padding: 4px 0; color: #fff; }
.telao-palco .vcard-login.on { background: rgba(46,154,49,.95); }
.telao-palco .vcard-login.off { background: rgba(214,59,59,.95); }
.telao-palco .vcard.offline:not(.ok) { border-color: rgba(214,59,59,.55); }
.telao-palco .vcard.offline .vcard-foto { filter: grayscale(1); opacity: .75; }
.telao-palco .vcard-votos .est-votou .vc-voto { color: #B8F0B9; }
.telao-palco .vcard-votos .est-aguardando .vc-voto { color: #FFE08A; font-weight: 700; }
.telao-palco .vcard-votos .est-nao_votou .vc-voto, .telao-palco .vcard-votos .est-pendente .vc-voto { color: rgba(255,255,255,.6); font-weight: 600; }
.telao-palco .telao-tempo { font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; background: rgba(255,255,255,.12); border-radius: 14px; padding: 2px 16px; }
.telao-palco .telao-tempo.alerta { background: #F2A900; color: #2B2100; }
.telao-palco .telao-tempo.critico { background: #D63B3B; color: #fff; animation: pulse 1s infinite; }

/* ---------- Mensagens (alto contraste) ---------- */
.alert { border: 0; border-left: 6px solid; border-radius: 12px; font-weight: 600; box-shadow: 0 2px 10px rgba(15,54,111,.08); }
.alert-success { background: #E3F5E3; color: #14531A; border-left-color: #2E9A31; }
.alert-danger  { background: #FDE8E8; color: #8A1C1C; border-left-color: #D63B3B; }
.alert-warning { background: #FFF4D6; color: #5C4100; border-left-color: #F2A900; }
.alert-info    { background: #E6F4FB; color: #0A3F5C; border-left-color: #09C5E7; }
.alert a { color: inherit; text-decoration: underline; }
.alert-flash { display: flex; align-items: center; gap: .75rem; font-size: 1.05rem; padding: 1rem 3rem 1rem 1rem; animation: flash-in .35s ease-out; }
.alert-flash::before { flex: none; width: 2rem; height: 2rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; }
.alert-flash.alert-success::before { content: '✓'; background: #2E9A31; }
.alert-flash.alert-danger::before  { content: '!'; background: #D63B3B; }
.alert-flash.alert-warning::before { content: '!'; background: #C98A00; }
.alert-flash.alert-info::before    { content: 'i'; background: var(--cmp-navy); }
@keyframes flash-in { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Notificações flutuantes */
.toast-box { position: fixed; top: 92px; left: 50%; transform: translateX(-50%); z-index: 3000; width: min(560px, calc(100vw - 2rem)); display: flex; flex-direction: column; gap: .6rem; pointer-events: none; }
.toast-cmp { pointer-events: auto; width: 100%; border: 0; border-radius: 14px; box-shadow: 0 12px 32px rgba(10,37,80,.35); font-size: 1.05rem; font-weight: 700; color: #fff; }
.toast-cmp .toast-body { display: flex; align-items: center; gap: .75rem; padding: 1rem 1.1rem; }
.toast-cmp .toast-ico { flex: none; width: 2rem; height: 2rem; border-radius: 50%; background: rgba(255,255,255,.22); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.toast-cmp.toast-success { background: #1F7A22; }
.toast-cmp.toast-danger  { background: #B42318; }
.toast-cmp.toast-warning { background: #F2A900; color: #2B2100; }
.toast-cmp.toast-warning .toast-ico { background: rgba(0,0,0,.12); }
.toast-cmp.toast-info    { background: var(--cmp-navy); }

/* ---------- Tablet: tempo para votar ---------- */
.tempo-voto { display: inline-flex; align-items: center; gap: .5rem; margin: 0 auto .75rem; padding: .35rem 1rem; border-radius: 999px; background: #E8EEF7; color: var(--cmp-navy); font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.tempo-voto.alerta { background: #FFF4D6; color: #5C4100; }
.tempo-voto.critico { background: #FDE8E8; color: #8A1C1C; animation: pulse 1s infinite; }
.tempo-voto.esgotado { background: #B42318; color: #fff; }

/* Quebra segura de palavras longas e ajustes para telas estreitas */
.kpi .kpi-label, .section-title, .eleitor .nome, .mesa-item .nome, .cand .cand-nome { overflow-wrap: anywhere; }
@media (max-width: 768px) {
  .kpi .kpi-value { font-size: 1.6rem; }
  .cmp-header .sistema { display: none; }
}

.marca-simulacao { position: fixed; bottom: 12px; left: 12px; z-index: 1500; }

@media (max-width: 576px) {
  .cmp-header .logo { height: 40px; }
  .modal-confirma .modal-footer .btn { min-width: 100%; }
}
@media print {
  .cmp-nav, .no-print { display: none !important; }
}
