:root {
  --afp-bg: #f4f7fb;
  --afp-surface: #ffffff;
  --afp-text: #172033;
  --afp-muted: #67748a;
  --afp-primary: #1557b0;
  --afp-primary-dark: #0d3d80;
  --afp-success: #19764a;
  --afp-danger: #b3261e;
  --afp-border: #dce3ed;
  --afp-shadow: 0 14px 40px rgba(26, 45, 78, .10);
  --afp-radius: 16px;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--afp-bg); }
body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #eef4fb 0, #f8fafc 280px, #f4f7fb 100%);
  color: var(--afp-text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.45;
}
a { color: var(--afp-primary); }
hr { border: 0; border-top: 1px solid var(--afp-border); margin: 22px auto; max-width: 1180px; }
.afp-header { background: rgba(255,255,255,.96); border-bottom: 1px solid var(--afp-border); box-shadow: 0 3px 18px rgba(27,46,76,.05); }
.afp-header-inner { max-width: 1180px; margin: 0 auto; padding: 18px 24px 14px; }
.afp-brand-row { display:flex; align-items:center; justify-content:space-between; gap:28px; }
.afp-logos { display:flex; align-items:center; gap:24px; flex-wrap:wrap; }
.afp-logos img { object-fit:contain; max-width:100%; }
.afp-logo-afp { width: 300px; height:auto; display:block; }
.afp-titlebox { text-align:right; min-width:300px; }
.afp-kicker { color:var(--afp-primary); font-size:12px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; }
.afp-title { margin:3px 0 2px; font-size:22px; line-height:1.15; font-weight:800; }
.afp-clock { color:var(--afp-muted); font-size:13px; }
.afp-main-title { max-width:1180px; margin:20px auto 0; padding:0 24px; }
.afp-main-title > div { background:var(--afp-surface)!important; border:1px solid var(--afp-border); border-radius:var(--afp-radius); padding:14px 18px; box-shadow:var(--afp-shadow); color:var(--afp-text)!important; }
body > div[align="center"], body > center, body > form, body > table { max-width:1180px; margin-left:auto; margin-right:auto; }
table { border-collapse:separate; border-spacing:0; background:var(--afp-surface); color:var(--afp-text); }
table[border="1"] { border:1px solid var(--afp-border)!important; border-radius:12px; overflow:hidden; box-shadow:0 8px 24px rgba(30,48,77,.07); }
table[border="1"] td, table[border="1"] th { border-color:var(--afp-border)!important; padding:9px 11px; }
th { background:#edf3fb; color:#1c3557; font-weight:800; }
input[type="text"], input[type="password"], input[type="date"], select {
  border:1px solid #bbc7d8; border-radius:9px; min-height:40px; padding:8px 10px; background:#fff; color:var(--afp-text); font-size:16px; outline:none;
}
input[type="text"]:focus, input[type="password"]:focus, select:focus { border-color:var(--afp-primary); box-shadow:0 0 0 3px rgba(21,87,176,.14); }
input[type="submit"], input[type="button"], button {
  border:0; border-radius:10px; cursor:pointer; font-weight:800; transition:transform .08s ease, filter .15s ease, box-shadow .15s ease;
}
input[type="submit"] { background:var(--afp-primary); color:#fff; min-height:42px; padding:0 24px; box-shadow:0 6px 16px rgba(21,87,176,.20); }
input[type="submit"]:hover, input[type="button"]:hover { filter:brightness(1.05); }
input[type="submit"]:active, input[type="button"]:active { transform:translateY(1px); }
#txdrtcandidato { border-radius:12px!important; border:2px solid #b9c7da!important; background:#f8fbff!important; font-size:32px!important; font-weight:800; letter-spacing:.16em; color:#102844; }
#btn0,#btn1,#btn2,#btn3,#btn4,#btn5,#btn6,#btn7,#btn8,#btn9 { border-radius:14px!important; background:#173d6f!important; box-shadow:0 5px 12px rgba(16,38,68,.18); font-size:20px!important; }
#btn_branco { border:2px solid #cbd3df!important; border-radius:14px!important; background:#fff!important; }
#btn_confirma { border-radius:14px!important; background:var(--afp-success)!important; box-shadow:0 7px 18px rgba(25,118,74,.24); font-weight:900!important; letter-spacing:.03em; }
#btnFim, #btnProx { border-radius:18px!important; box-shadow:var(--afp-shadow); }
#candidatos img { border-radius:10px; object-fit:cover; box-shadow:0 3px 10px rgba(0,0,0,.10); }
#barra { overflow:hidden; border-radius:999px; min-height:24px; background:#e8edf4!important; }
#progress { min-height:24px; border-radius:999px; padding-left:8px; font-weight:700; display:flex; align-items:center; }
.afp-result-banner { max-width:900px; margin:24px auto 12px; padding:18px 22px; background:#fff; border:1px solid var(--afp-border); border-left:5px solid var(--afp-primary); border-radius:14px; box-shadow:var(--afp-shadow); }
.afp-result-banner strong { display:block; font-size:18px; margin-bottom:3px; }
.afp-result-banner span { color:var(--afp-muted); }
@media (max-width: 850px) {
  .afp-brand-row { flex-direction:column; align-items:flex-start; }
  .afp-titlebox { text-align:left; min-width:0; }
  .afp-logo-afp { width:min(300px, 100%); }
  table[width="800"], table[width="700"], table[width="500"], table[width="280"] { width:96%!important; }
  body { font-size:14px; }
}

/* Resultado 2026 */
.afp-results-shell { max-width: 1050px; margin: 18px auto 44px; padding: 0 22px; }
.afp-stats-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin:18px 0; }
.afp-stat { background:#fff; border:1px solid var(--afp-border); border-radius:14px; padding:18px; box-shadow:0 8px 24px rgba(30,48,77,.06); }
.afp-stat span { display:block; color:var(--afp-muted); font-size:13px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; }
.afp-stat strong { display:inline-block; margin-top:4px; font-size:30px; line-height:1; color:#132c4d; }
.afp-stat small { margin-left:7px; color:var(--afp-muted); font-weight:700; }
.afp-result-section { background:#fff; border:1px solid var(--afp-border); border-radius:18px; padding:22px; margin-top:18px; box-shadow:var(--afp-shadow); }
.afp-section-heading { display:flex; justify-content:space-between; align-items:center; gap:18px; padding-bottom:16px; border-bottom:1px solid var(--afp-border); }
.afp-section-heading h2 { margin:2px 0 0; font-size:24px; }
.afp-total-badge { background:#edf3fb; color:#1d4f8d; border-radius:999px; padding:8px 13px; font-weight:800; white-space:nowrap; }
.afp-result-list { margin-top:8px; }
.afp-result-row { display:grid; grid-template-columns:minmax(220px,1.4fr) minmax(180px,2fr) 70px; align-items:center; gap:18px; padding:15px 2px; border-bottom:1px solid #eef2f7; }
.afp-result-row:last-child { border-bottom:0; }
.afp-result-name strong { display:block; }
.afp-result-name span { color:var(--afp-muted); font-size:13px; }
.afp-result-progress { height:14px; overflow:hidden; border-radius:999px; background:#e7edf5; }
.afp-result-progress-fill { height:100%; border-radius:999px; background:linear-gradient(90deg,#1557b0,#19764a); }
.afp-result-percent { text-align:right; font-weight:900; color:#173d6f; }
.afp-zero-votes, .afp-empty { margin-top:14px; padding:12px 14px; border-radius:10px; background:#f7f9fc; color:var(--afp-muted); }
@media (max-width:800px) {
  .afp-stats-grid { grid-template-columns:repeat(2,1fr); }
  .afp-result-row { grid-template-columns:1fr 64px; gap:10px; }
  .afp-result-progress { grid-column:1 / -1; grid-row:2; }
  .afp-section-heading { align-items:flex-start; flex-direction:column; }
}

/* Confirmacao intermediaria de voto - v2.1 */
.afp-vote-confirm-shell {
  max-width: 760px;
  margin: 46px auto 58px;
  padding: 0 22px;
}
.afp-vote-confirm-card {
  text-align: center;
  background: var(--afp-surface);
  border: 1px solid var(--afp-border);
  border-radius: 22px;
  padding: 34px 42px 38px;
  box-shadow: var(--afp-shadow);
}
.afp-vote-confirm-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e8f5ee;
  color: var(--afp-success);
  font-size: 34px;
  font-weight: 900;
}
.afp-vote-confirm-kicker {
  color: var(--afp-success);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.afp-vote-confirm-card h2 {
  margin: 7px 0 22px;
  font-size: 25px;
  color: var(--afp-text);
}
.afp-voter-summary {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 0 auto 24px;
  padding: 16px 18px;
  max-width: 430px;
  border-radius: 13px;
  background: #f7f9fc;
  border: 1px solid #e8edf4;
}
.afp-voter-summary strong { font-size: 17px; }
.afp-voter-summary span { color: var(--afp-muted); font-size: 14px; }
.afp-next-step {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 auto 24px;
  color: var(--afp-muted);
}
.afp-next-step strong { color: var(--afp-text); font-size: 17px; }
.afp-next-button {
  width: auto !important;
  min-width: 340px;
  min-height: 58px;
  padding: 0 26px;
  border-radius: 13px !important;
  background: var(--afp-success) !important;
  color: #fff !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  letter-spacing: .01em;
  box-shadow: 0 8px 20px rgba(25,118,74,.22) !important;
}
@media (max-width: 600px) {
  .afp-vote-confirm-card { padding: 28px 18px 30px; }
  .afp-vote-confirm-card h2 { font-size: 21px; }
  .afp-next-button { width: 100% !important; min-width: 0; font-size: 14px !important; }
}
