/* frontend/css/style.css — Rainha da 35ª Festa da Soja e do Trigo de Iraí de Minas 2026
   Design System v2 — Reescrita completa
   ─────────────────────────────────────────────────────────────────────────── */

/* ─── Fontes locais (P12) — execute backend/scripts/download-fonts.js para baixar ─ */
/* Se os arquivos .woff2 não existirem ainda, o browser faz fallback para as system fonts */
@font-face { font-family:'Inter'; font-style:normal; font-weight:300; font-display:swap; src:url('/fonts/inter-300.woff2') format('woff2'); }
@font-face { font-family:'Inter'; font-style:normal; font-weight:400; font-display:swap; src:url('/fonts/inter-400.woff2') format('woff2'); }
@font-face { font-family:'Inter'; font-style:normal; font-weight:500; font-display:swap; src:url('/fonts/inter-500.woff2') format('woff2'); }
@font-face { font-family:'Inter'; font-style:normal; font-weight:600; font-display:swap; src:url('/fonts/inter-600.woff2') format('woff2'); }
@font-face { font-family:'Inter'; font-style:normal; font-weight:700; font-display:swap; src:url('/fonts/inter-700.woff2') format('woff2'); }
@font-face { font-family:'Playfair Display'; font-style:normal;  font-weight:400; font-display:swap; src:url('/fonts/playfair-400.woff2')  format('woff2'); }
@font-face { font-family:'Playfair Display'; font-style:italic;  font-weight:400; font-display:swap; src:url('/fonts/playfair-400i.woff2') format('woff2'); }
@font-face { font-family:'Playfair Display'; font-style:normal;  font-weight:600; font-display:swap; src:url('/fonts/playfair-600.woff2')  format('woff2'); }
@font-face { font-family:'Playfair Display'; font-style:normal;  font-weight:700; font-display:swap; src:url('/fonts/playfair-700.woff2')  format('woff2'); }

/* ─── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ═══════════════════════════════════════════════════════════════════════════
   DESIGN TOKENS — CSS Variables
═══════════════════════════════════════════════════════════════════════════ */
:root {
  /* ── Verdes ─────────────────────────────────────────────── */
  --green-900:  #1B4332;
  --green-800:  #2D6A4F;
  --green-700:  #40916C;
  --green-600:  #52B788;
  --green-100:  #D8F3DC;
  --green-50:   #EEF7F0;

  /* ── Dourados ───────────────────────────────────────────── */
  --gold-600:   #A67C18;
  --gold-500:   #C9A227;
  --gold-400:   #D4B44A;
  --gold-300:   #E0C96A;
  --gold-200:   #EDD98E;
  --gold-100:   #F5E8BB;
  --gold-50:    #FDF8EA;

  /* ── Superfícies ─────────────────────────────────────────── */
  --bg-body:    #FAFAF5;
  --bg-card:    #FFFFFF;
  --bg-alt:     #F2EDE0;
  --bg-subtle:  #F7F3EC;

  /* ── Bordas ──────────────────────────────────────────────── */
  --border:         #E4DDD0;
  --border-strong:  #CEC5AE;

  /* ── Textos ──────────────────────────────────────────────── */
  --text-primary:   #201E17;
  --text-secondary: #52493A;
  --text-muted:     #8C8270;
  --text-on-dark:   #FFFFFF;

  /* ── Feedback ────────────────────────────────────────────── */
  --success:    #1B6E2B;
  --success-bg: #E8F5E9;
  --danger:     #B91C1C;
  --danger-bg:  #FEF2F2;
  --warn-bg:    #FFFBEB;
  --warn-txt:   #92400E;

  /* ── Sombras ─────────────────────────────────────────────── */
  --shadow-card:  0 2px 8px rgba(26,26,46,.07), 0 0 1px rgba(26,26,46,.06);
  --shadow-hover: 0 16px 40px rgba(26,26,46,.13), 0 4px 12px rgba(26,26,46,.07);
  --shadow-sm:    0 1px 3px rgba(43,41,32,.06), 0 1px 2px rgba(43,41,32,.04);
  --shadow-md:    0 4px 16px rgba(43,41,32,.09);
  --shadow-lg:    0 12px 40px rgba(43,41,32,.13);
  --shadow-xl:    0 24px 64px rgba(43,41,32,.17);
  --shadow-gold:  0 4px 24px rgba(166,132,28,.30);
  --shadow-green: 0 4px 20px rgba(27,67,50,.28);

  /* ── Bordas arredondadas ─────────────────────────────────── */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full: 9999px;

  /* Aliases legados (usados em partes do admin / relatório) */
  --radius:     var(--radius-md);

  /* ── Tipografia ──────────────────────────────────────────── */
  --font-title: 'Playfair Display', Georgia, serif;
  --font-body:  'Inter', system-ui, -apple-system, sans-serif;

  /* ── Transições ──────────────────────────────────────────── */
  --transition:        220ms cubic-bezier(.4,0,.2,1);
  --transition-spring: 380ms cubic-bezier(.34,1.56,.64,1);

  /* ── Aliases retrocompatíveis (admin usa --orange-* e --blue-*) ── */
  --orange:       var(--gold-500);
  --orange-dark:  var(--gold-600);
  --orange-mid:   var(--gold-300);
  --orange-light: var(--gold-100);
  --orange-glow:  var(--shadow-gold);
  --blue:         var(--green-800);
  --blue-dark:    var(--green-900);
  --blue-mid:     var(--green-700);
  --blue-light:   var(--green-100);

  /* Aliases adicionais usados no CSS legado */
  --gold:        var(--gold-500);
  --gold-dark:   var(--gold-600);
  --gold-mid:    var(--gold-300);
  --gold-light:  var(--gold-100);
  --gold-glow:   var(--shadow-gold);
  --green:       var(--green-800);
  --green-dark:  var(--green-900);
  --green-mid:   var(--green-700);
  --green-light: var(--green-100);
  --earth:       #8C6239;
  --earth-light: #F3E9DD;

  /* Superfícies legado */
  --bg-page:    var(--bg-body);
  --surface:    var(--bg-card);
  --surface-2:  var(--bg-subtle);

  /* Ease legado */
  --ease: cubic-bezier(.4,0,.2,1);
}

/* ═══════════════════════════════════════════════════════════════════════════
   KEYFRAMES
═══════════════════════════════════════════════════════════════════════════ */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes scale-in {
  from { opacity: 0; transform: scale(.93); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.5); opacity: .6; }
}

@keyframes slide-in-right {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

@keyframes countdown-pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.10); }
  100% { transform: scale(1); }
}

@keyframes modal-in {
  from { transform: translateY(24px) scale(.96); opacity: 0; }
  to   { transform: translateY(0)     scale(1);   opacity: 1; }
}

@keyframes pop-in {
  from { transform: scale(0) rotate(-20deg); opacity: 0; }
  to   { transform: scale(1) rotate(0);      opacity: 1; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes skeleton-wave {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes confettiFall {
  0%   { transform: translateY(-10px) rotate(0deg)   scaleX(1);  opacity: 1; }
  100% { transform: translateY(80px)  rotate(540deg) scaleX(-1); opacity: 0; }
}

@keyframes check-draw {
  from { stroke-dashoffset: 60; }
  to   { stroke-dashoffset: 0; }
}

@keyframes toast-in {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   BASE
═══════════════════════════════════════════════════════════════════════════ */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-body);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

img { display: block; max-width: 100%; }

h1, h2, h3 { font-family: var(--font-title); }

/* ═══════════════════════════════════════════════════════════════════════════
   SKELETON LOADING
═══════════════════════════════════════════════════════════════════════════ */
.skeleton {
  background: linear-gradient(90deg, #f0ebe0 25%, #e5dfd4 50%, #f0ebe0 75%);
  background-size: 200% 100%;
  animation: skeleton-wave 1.5s infinite;
  border-radius: var(--radius-md);
}

.skeleton-card {
  border-radius: var(--radius-lg);
  height: 420px;
}

.skeleton-text {
  height: 1em;
  margin-bottom: .5em;
  border-radius: var(--radius-full);
}

.skeleton-text.short { width: 60%; }
.skeleton-text.medium { width: 80%; }

/* ═══════════════════════════════════════════════════════════════════════════
   NAVBAR — Glass morphism
═══════════════════════════════════════════════════════════════════════════ */
.navbar {
  background: rgba(27, 67, 50, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid rgba(201,162,39,.45);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 20px rgba(27,67,50,.25);
}

.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  flex-shrink: 0;
}

.navbar-logo {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-300));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-gold);
}

.navbar-logo svg { color: var(--green-900); }

.navbar-title {
  font-family: var(--font-title);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-on-dark);
  letter-spacing: .15px;
  white-space: nowrap;
}

/* Nav links */
.navbar-links {
  display: flex;
  align-items: center;
  gap: .35rem;
  margin-right: auto;
  margin-left: 1.25rem;
}

.navbar-links a {
  font-size: .82rem;
  font-weight: 500;
  color: rgba(255,255,255,.78);
  text-decoration: none;
  font-family: var(--font-body);
  letter-spacing: .02em;
  padding: .4rem .75rem;
  border-radius: var(--radius-full);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}

.navbar-links a:hover {
  color: var(--gold-300);
  background: rgba(255,255,255,.08);
}

/* Badge de período */
.navbar-badge {
  font-size: .72rem;
  font-weight: 600;
  background: rgba(201,162,39,.18);
  color: var(--gold-200);
  padding: .3rem .85rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(201,162,39,.35);
  white-space: nowrap;
  font-family: var(--font-body);
  letter-spacing: .01em;
  backdrop-filter: blur(4px);
}

/* Hamburger toggle */
.navbar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  flex-shrink: 0;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.20);
  border-radius: var(--radius-md);
  color: white;
  cursor: pointer;
  transition: background var(--transition);
}

.navbar-toggle:hover { background: rgba(255,255,255,.20); }
.navbar-toggle svg { display: block; }

/* ═══════════════════════════════════════════════════════════════════════════
   STATUS BAR
═══════════════════════════════════════════════════════════════════════════ */
.status-bar {
  display: none;
  text-align: center;
  padding: .7rem 1.5rem;
  font-size: .82rem;
  font-weight: 600;
  font-family: var(--font-body);
  letter-spacing: .01em;
  position: relative;
  animation: fade-in-up .35s var(--ease) both;
}

.status-bar.aberta {
  background: linear-gradient(90deg, #E8F5E9, #F0FAF0);
  color: var(--success);
  border-bottom: 1px solid #A5D6A7;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
}

.status-bar.aberta::before {
  content: '';
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse-dot 1.4s ease-in-out infinite;
  flex-shrink: 0;
}

.status-bar.encerrada {
  background: linear-gradient(90deg, var(--danger-bg), #FFF5F5);
  color: var(--danger);
  border-bottom: 1px solid #FECACA;
  display: block;
}

.status-bar.nao-iniciada {
  background: linear-gradient(90deg, var(--warn-bg), #FFFDF0);
  color: var(--warn-txt);
  border-bottom: 1px solid #FDE68A;
  display: block;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HERO SECTION
═══════════════════════════════════════════════════════════════════════════ */
.hero {
  background:
    radial-gradient(ellipse at 75% 15%, rgba(201,162,39,.32) 0%, transparent 50%),
    radial-gradient(ellipse at 10% 85%, rgba(64,145,108,.28) 0%, transparent 50%),
    linear-gradient(155deg, var(--green-900) 0%, var(--green-800) 50%, #2A5C41 100%);
  color: white;
  text-align: center;
  padding: 5.5rem 1.5rem 7rem;
  position: relative;
  overflow: hidden;
}

/* Wheat pattern overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cpath d='M30 5 C29 15 31 25 30 35' stroke='rgba(201,162,39,.06)' stroke-width='1.5' fill='none'/%3E%3Cellipse cx='30' cy='12' rx='4' ry='8' stroke='rgba(201,162,39,.06)' stroke-width='1' fill='none'/%3E%3Cellipse cx='24' cy='20' rx='3' ry='6' stroke='rgba(201,162,39,.06)' stroke-width='1' fill='none'/%3E%3Cellipse cx='36' cy='20' rx='3' ry='6' stroke='rgba(201,162,39,.06)' stroke-width='1' fill='none'/%3E%3C/svg%3E");
  opacity: 1;
  pointer-events: none;
  z-index: 0;
}

/* Decorative circles */
.hero::after {
  content: '';
  position: absolute;
  top: -100px; right: -80px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(201,162,39,.15) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
}

.hero-eyebrow {
  display: inline-block;
  background: rgba(201,162,39,.18);
  border: 1px solid rgba(224,201,106,.45);
  color: var(--gold-200);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: .38rem 1.1rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
  font-family: var(--font-body);
  animation: fade-in-up .5s .1s var(--ease) both;
}

.hero h1 {
  font-family: var(--font-title);
  font-size: clamp(1.9rem, 5.5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -.4px;
  line-height: 1.18;
  margin-bottom: 1rem;
  color: white;
  text-shadow: 0 2px 24px rgba(0,0,0,.22);
  animation: fade-in-up .5s .2s var(--ease) both;
}

.hero h1 .gold-accent {
  color: var(--gold-300);
}

.hero p {
  font-size: clamp(.92rem, 2.2vw, 1.08rem);
  color: rgba(255,255,255,.82);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.75;
  font-family: var(--font-body);
  animation: fade-in-up .5s .3s var(--ease) both;
}

.hero-divider {
  width: 56px; height: 3px;
  background: linear-gradient(90deg, var(--gold-400), var(--gold-200));
  border-radius: var(--radius-full);
  margin: 1.1rem auto 0;
}

/* CTA Button */
.btn-hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  margin-top: 2rem;
  padding: .95rem 2.4rem;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  color: var(--green-900);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .96rem;
  letter-spacing: .03em;
  text-decoration: none;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-gold), 0 0 0 0 rgba(201,162,39,.0);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  animation: fade-in-up .5s .4s var(--ease) both;
  position: relative;
  overflow: hidden;
}

.btn-hero-cta::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.22), transparent 60%);
  pointer-events: none;
}

.btn-hero-cta:hover {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-300));
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(166,132,28,.45), 0 0 0 4px rgba(201,162,39,.18);
}

.btn-hero-cta:active { transform: translateY(-1px); }

/* Espigas decorativas */
.hero-stalks {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 140px;
  opacity: .22;
  z-index: 0;
  pointer-events: none;
}

/* Wave divider */
.hero-wave {
  position: absolute;
  bottom: -2px; left: 0;
  width: 100%;
  line-height: 0;
  z-index: 1;
}

.hero-wave svg { display: block; width: 100%; }

/* ═══════════════════════════════════════════════════════════════════════════
   COUNTDOWN
═══════════════════════════════════════════════════════════════════════════ */
.countdown {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: .7rem;
  animation: fade-in-up .5s .5s var(--ease) both;
}

.countdown-label {
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-300);
  font-family: var(--font-body);
}

.countdown-units {
  display: flex;
  gap: .65rem;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 66px;
  padding: .7rem .55rem;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(224,201,106,.28);
  border-radius: var(--radius-md);
  backdrop-filter: blur(8px);
  transition: transform .2s var(--ease);
}

.countdown-unit:hover { transform: translateY(-2px); }

.countdown-num {
  font-family: var(--font-title);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--gold-300);
  line-height: 1;
  animation: countdown-pop .15s var(--ease);
}

.countdown-rotulo {
  margin-top: .3rem;
  font-size: .64rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: rgba(255,255,255,.65);
  font-family: var(--font-body);
}

.countdown-ended {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold-300);
}

/* ═══════════════════════════════════════════════════════════════════════════
   CONTEÚDO PRINCIPAL
═══════════════════════════════════════════════════════════════════════════ */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.75rem 1.5rem 3.5rem;
}

/* Section header */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2.25rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.section-head h2 {
  font-family: var(--font-title);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--green-900);
  letter-spacing: -.25px;
}

.section-head p {
  font-size: .86rem;
  color: var(--text-muted);
  margin-top: .25rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CANDIDATE CARDS GRID
═══════════════════════════════════════════════════════════════════════════ */
.candidates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
}

/* ─── Individual Card ─────────────────────────────────────────────────── */
.candidate-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition:
    transform var(--transition-spring),
    box-shadow var(--transition),
    border-color var(--transition);
  position: relative;
  animation: fade-in-up .45s var(--ease) both;
}

.candidate-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(201,162,39,.55);
}

.candidate-card:hover .card-photo img,
.candidate-card:hover .photo-placeholder {
  transform: scale(1.055);
}

/* Top accent line */
.candidate-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-300), var(--gold-500));
  background-size: 200% 100%;
  z-index: 2;
  transition: background-position .5s var(--ease);
}

.candidate-card:hover::before {
  background-position: -100% 0;
}

/* ─── Foto ──────────────────────────────────────────────────────────────── */
.card-photo {
  position: relative;
  width: 100%;
  padding-top: 118%; /* ~3:4 aspect ratio */
  background: linear-gradient(135deg, var(--green-100), var(--gold-100));
  overflow: hidden;
}

.card-photo img,
.card-photo .photo-placeholder {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
}

.card-photo a {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
}

.card-photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
    rgba(27,67,50,.55) 0%,
    rgba(27,67,50,.10) 40%,
    transparent 65%
  );
  pointer-events: none;
  z-index: 1;
}

/* Number badge */
.card-number-badge {
  position: absolute;
  top: .85rem;
  left: .85rem;
  z-index: 3;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  color: var(--green-900);
  font-family: var(--font-body);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: .3rem .75rem;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 10px rgba(166,132,28,.45);
  text-transform: uppercase;
}

/* ─── Body ──────────────────────────────────────────────────────────────── */
.card-body {
  padding: 1.15rem 1.2rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  flex: 1;
}

.card-name {
  font-family: var(--font-title);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  line-height: 1.28;
  text-decoration: none;
  transition: color var(--transition);
}

.card-name:hover { color: var(--green-900); }

.card-occupation {
  font-size: .72rem;
  font-weight: 600;
  color: var(--green-800);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: -.3rem;
}

.card-bio {
  font-size: .81rem;
  color: var(--text-secondary);
  line-height: 1.55;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-profile-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--green-800);
  text-decoration: none;
  letter-spacing: .01em;
  transition: color var(--transition);
}

.card-profile-link:hover { color: var(--gold-600); }

/* ─── Vote button ───────────────────────────────────────────────────────── */
.btn-vote {
  width: 100%;
  min-height: 46px;
  padding: .72rem 1rem;
  background: linear-gradient(135deg, var(--green-900), var(--green-800));
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: .88rem;
  font-weight: 700;
  font-family: var(--font-body);
  letter-spacing: .03em;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-green);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
}

.btn-vote::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.12), transparent 55%);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.btn-vote:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--gold-600), var(--gold-500));
  color: var(--green-900);
  box-shadow: var(--shadow-gold);
  transform: translateY(-1px);
}

.btn-vote:hover:not(:disabled)::after { opacity: 1; }
.btn-vote:active:not(:disabled) { transform: translateY(0); }
.btn-vote:disabled {
  background: var(--border);
  color: var(--text-muted);
  cursor: not-allowed;
  box-shadow: none;
}

.btn-vote svg { flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════════════════════
   OVERLAY / MODAL
═══════════════════════════════════════════════════════════════════════════ */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,30,20,.65);
  z-index: 900;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.overlay.active { display: flex; }

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 470px;
  overflow: hidden;
  animation: modal-in .28s cubic-bezier(.22,1,.36,1);
  border: 1px solid var(--border);
}

.modal-header {
  padding: 1.6rem 1.6rem 1.35rem;
  background: linear-gradient(135deg, var(--green-900) 0%, var(--green-800) 100%);
  color: white;
  position: relative;
  border-bottom: 2px solid var(--gold-500);
}

/* Decorative lock icon area */
.modal-header::after {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 130px; height: 130px;
  background: rgba(201,162,39,.10);
  border-radius: 50%;
  pointer-events: none;
}

.modal-header h2 {
  font-family: var(--font-title);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -.15px;
  margin-bottom: .25rem;
  color: white;
}

.modal-candidata-label {
  font-size: .84rem;
  color: var(--gold-200);
  font-weight: 500;
  font-family: var(--font-body);
}

.btn-close {
  position: absolute;
  top: .9rem; right: 1.1rem;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  color: white;
  width: 2.6rem; height: 2.6rem;
  border-radius: 50%;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
  z-index: 1;
}

.btn-close:hover {
  background: rgba(255,255,255,.25);
  transform: rotate(90deg);
}

.modal-body { padding: 1.6rem; }

.modal-footer {
  padding: 0 1.6rem 1.6rem;
  display: flex;
  gap: .75rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FORMULÁRIO
═══════════════════════════════════════════════════════════════════════════ */
.field { margin-bottom: 1.15rem; }
.field:last-child { margin-bottom: 0; }

.field label {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  color: var(--green-900);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .45rem;
  font-family: var(--font-body);
}

.field input {
  width: 100%;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: .85rem 1.1rem;
  font-size: 1rem;
  min-height: 48px;
  font-family: var(--font-body);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.field input::placeholder { color: var(--text-muted); }

.field input:focus {
  border-color: var(--gold-500);
  background: var(--bg-card);
  box-shadow: 0 0 0 3.5px rgba(201,162,39,.15);
}

.field input.is-error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(185,28,28,.10);
}

.field-error {
  margin-top: .38rem;
  font-size: .76rem;
  color: var(--danger);
  font-weight: 500;
  display: none;
  font-family: var(--font-body);
}

.field-error.visible { display: block; }

/* ═══════════════════════════════════════════════════════════════════════════
   BOTÕES
═══════════════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 46px;
  border: none;
  border-radius: var(--radius-md);
  padding: .76rem 1.5rem;
  font-size: .9rem;
  font-family: var(--font-body);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  letter-spacing: .015em;
  position: relative;
  overflow: hidden;
}

.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, var(--green-900), var(--green-800));
  color: white;
  box-shadow: var(--shadow-green);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--green-800), var(--green-700));
  box-shadow: 0 6px 24px rgba(27,67,50,.32);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.btn-success {
  background: linear-gradient(135deg, var(--green-900), var(--green-800));
  color: white;
  box-shadow: var(--shadow-green);
}

.btn-success:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--green-800), var(--green-700));
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SPINNER
═══════════════════════════════════════════════════════════════════════════ */
.spinner {
  width: 1em; height: 1em;
  border: 2px solid rgba(255,255,255,.28);
  border-top-color: white;
  border-radius: 50%;
  animation: spin .55s linear infinite;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
═══════════════════════════════════════════════════════════════════════════ */
#toast-container {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  pointer-events: none;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: .95rem 1.25rem;
  font-size: .85rem;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--text-primary);
  max-width: 360px;
  min-width: 240px;
  display: flex;
  align-items: center;
  gap: .7rem;
  pointer-events: all;
  animation: slide-in-right .32s cubic-bezier(.22,1,.36,1);
  border-left: 4px solid var(--green-800);
  position: relative;
  overflow: hidden;
}

/* Progress bar at bottom of toast */
.toast::after {
  content: '';
  position: absolute;
  bottom: 0; left: 4px;
  height: 2px;
  background: currentColor;
  opacity: .25;
  width: 100%;
  animation: toast-progress linear forwards;
}

.toast.success { border-left-color: var(--success); }
.toast.error   { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--gold-500); }

.toast-icon {
  flex-shrink: 0;
  width: 20px; height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
}

.toast.success .toast-icon { background: var(--success-bg); color: var(--success); }
.toast.error   .toast-icon { background: var(--danger-bg);  color: var(--danger); }

/* ═══════════════════════════════════════════════════════════════════════════
   VOTE DONE / CELEBRAÇÃO
═══════════════════════════════════════════════════════════════════════════ */
.vote-done {
  display: none;
  text-align: center;
  padding: 5.5rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.vote-done.active { display: block; animation: fade-in-up .5s var(--ease); }

/* Confetti particles */
.vote-done.active::before,
.vote-done.active::after {
  content: '';
  position: absolute;
  width: 10px; height: 10px;
  border-radius: 2px;
  animation: confetti-fall 1.6s ease-in forwards;
}

.vote-done.active::before {
  background: var(--gold-500);
  top: 10%; left: 20%;
  animation-delay: .2s;
  transform-origin: center center;
}

.vote-done.active::after {
  background: var(--green-700);
  top: 5%; right: 25%;
  animation-delay: .5s;
  transform-origin: center center;
}

/* Circle */
.vote-done-circle {
  width: 88px; height: 88px;
  background: linear-gradient(135deg, var(--green-900), var(--green-800));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.75rem;
  box-shadow: var(--shadow-green), 0 0 0 8px var(--green-100);
  animation: pop-in .55s cubic-bezier(.34,1.56,.64,1);
}

.vote-done-circle svg {
  color: white;
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: check-draw .5s .4s ease forwards;
}

.vote-done h2 {
  font-family: var(--font-title);
  font-size: 2.15rem;
  font-weight: 700;
  color: var(--green-900);
  letter-spacing: -.3px;
  margin-bottom: .65rem;
}

.vote-done p {
  color: var(--text-secondary);
  font-size: 1.02rem;
  max-width: 380px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Extra confetti dots via JS-added elements (spawned in votacao.js) */
.confetti-dot {
  position: absolute;
  width:         var(--cf-size, 8px);
  height:        var(--cf-size, 8px);
  background:    var(--cf-bg, #C9A227);
  top:           var(--cf-top, 10%);
  left:          var(--cf-left, 50%);
  border-radius: var(--cf-radius, 2px);
  animation-name:     confettiFall;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
  animation-duration:  var(--cf-duration, 1.5s);
  animation-delay:     var(--cf-delay, 0s);
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PHOTO PLACEHOLDER
═══════════════════════════════════════════════════════════════════════════ */
.photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.photo-placeholder-initials {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 2.7rem;
  color: rgba(255,255,255,.92);
  text-shadow: 0 2px 14px rgba(0,0,0,.20);
  letter-spacing: .04em;
  z-index: 1;
}

.photo-placeholder-grain {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
}

.profile-photo .photo-placeholder-initials { font-size: 4.8rem; }

/* ═══════════════════════════════════════════════════════════════════════════
   SEÇÕES INSTITUCIONAIS
═══════════════════════════════════════════════════════════════════════════ */
.institutional-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem;
}

.institutional-section.institutional-alt {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
  background: var(--bg-alt);
}

.institutional-section.institutional-alt > * {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.institutional-section.institutional-alt .rules-list {
  max-width: 760px;
  padding-left: 0;
  padding-right: 0;
}

.institutional-section h2 {
  font-family: var(--font-title);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--green-900);
  letter-spacing: -.2px;
  margin-bottom: 1.5rem;
  text-align: center;
}

.institutional-section h3 {
  font-family: var(--font-title);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--green-900);
  text-align: center;
  margin: 2.25rem 0 1rem;
}

.institutional-section h3:first-of-type { margin-top: 0; }

.institutional-text {
  max-width: 760px;
  margin: 0 auto;
  color: var(--text-secondary);
  font-size: .97rem;
  line-height: 1.88;
  text-align: center;
}

/* Rules list */
.rules-list {
  max-width: 720px;
  margin: 0 auto;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .9rem;
}

.rules-list li {
  position: relative;
  padding-left: 2rem;
  color: var(--text-secondary);
  font-size: .93rem;
  line-height: 1.65;
}

.rules-list li::before {
  content: '';
  position: absolute;
  left: 0; top: .42rem;
  width: 11px; height: 11px;
  background: var(--gold-500);
  border-radius: 3px;
  transform: rotate(45deg);
}

/* Sponsor grid */
.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.35rem;
  max-width: 980px;
  margin: 0 auto;
}

.sponsor-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .8rem;
  padding: 1.75rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  box-shadow: var(--shadow-card);
}

.sponsor-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(201,162,39,.45);
}

.sponsor-initials {
  width: 60px; height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.15rem;
  color: white;
  background: linear-gradient(135deg, var(--green-900), var(--gold-500));
  box-shadow: 0 4px 14px rgba(27,67,50,.25);
}

.sponsor-name {
  font-size: .86rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Supporter chips */
.supporter-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .75rem;
  max-width: 880px;
  margin: 0 auto;
}

.supporter-chip {
  padding: .6rem 1.35rem;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  font-size: .83rem;
  font-weight: 600;
  color: var(--green-900);
  transition: background var(--transition), border-color var(--transition);
}

.supporter-chip:hover {
  background: var(--gold-50);
  border-color: var(--gold-400);
}

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════════════════════ */
.site-footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-on-dark);
  font-size: .78rem;
  background: var(--green-900);
  margin-top: 3rem;
  font-family: var(--font-body);
}

.site-footer-new {
  background: var(--green-900);
  color: rgba(255,255,255,.82);
  margin-top: 3.5rem;
  font-family: var(--font-body);
  position: relative;
}

.site-footer-new::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-600), var(--gold-400), var(--gold-600));
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 2.5rem;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2.5rem;
}

.footer-col h3 {
  font-family: var(--font-title);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--gold-300);
  margin-bottom: 1rem;
}

.footer-col p, .footer-col li {
  font-size: .83rem;
  line-height: 1.75;
  color: rgba(255,255,255,.68);
}

.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .45rem; }

.footer-col a {
  color: rgba(255,255,255,.65);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-col a:hover { color: var(--gold-300); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.10);
  text-align: center;
  padding: 1.35rem 1.5rem;
  font-size: .77rem;
  color: rgba(255,255,255,.45);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PERFIL DA CANDIDATA
═══════════════════════════════════════════════════════════════════════════ */
.profile-back {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .86rem;
  font-weight: 600;
  color: var(--green-800);
  text-decoration: none;
  margin-bottom: 1.75rem;
  padding: .4rem .85rem .4rem .6rem;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  transition: background var(--transition), color var(--transition);
}

.profile-back:hover {
  background: var(--gold-50);
  color: var(--gold-600);
  border-color: var(--gold-300);
}

.profile-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 2.75rem;
  align-items: start;
}

.profile-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
  background: linear-gradient(135deg, var(--green-100), var(--gold-100));
}

.profile-photo img,
.profile-photo .photo-placeholder {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

.profile-name {
  font-family: var(--font-title);
  font-size: clamp(1.65rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -.3px;
  margin-bottom: .5rem;
  line-height: 1.18;
}

.profile-age {
  display: inline-block;
  font-size: .83rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 1.35rem;
}

.profile-instagram {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .83rem;
  font-weight: 600;
  color: #E1306C;
  text-decoration: none;
  background: #fff0f5;
  border: 1px solid #f7c5d8;
  padding: .48rem 1.1rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.35rem;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.profile-instagram:hover {
  background: #E1306C;
  color: #fff;
  border-color: #E1306C;
}

.profile-hashtag {
  display: inline-block;
  font-size: .81rem;
  color: var(--green-900);
  background: var(--gold-50);
  border: 1px solid var(--gold-200);
  padding: .48rem 1.1rem;
  border-radius: var(--radius-full);
  margin: 0 0 1.35rem .85rem;
}

.profile-hashtag strong { color: var(--gold-600); }

.profile-subtitle {
  font-family: var(--font-title);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--green-900);
  margin: 1.65rem 0 .65rem;
}

.profile-bio {
  color: var(--text-secondary);
  font-size: .97rem;
  line-height: 1.88;
}

.profile-message {
  margin-top: 1.65rem;
  padding: 1.3rem 1.6rem;
  background: var(--gold-50);
  border-left: 4px solid var(--gold-500);
  border-radius: var(--radius-md);
}

.profile-message-label {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin-bottom: .5rem;
  font-family: var(--font-body);
}

.profile-message p {
  font-style: italic;
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.82;
}

.btn-vote-profile {
  margin-top: 2.25rem;
  padding: .95rem 2.5rem;
  font-size: .97rem;
}

.profile-not-found {
  text-align: center;
  padding: 4.5rem 1.5rem;
  color: var(--text-secondary);
}

.profile-not-found h2 {
  font-family: var(--font-title);
  color: var(--green-900);
  margin-bottom: .85rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ALERT
═══════════════════════════════════════════════════════════════════════════ */
.alert {
  border-radius: var(--radius-md);
  padding: .8rem 1.1rem;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 1.35rem;
  display: none;
  border: 1px solid transparent;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-body);
}

.alert.error   { background: var(--danger-bg);  color: var(--danger);  border-color: #FECACA; display: flex; }
.alert.success { background: var(--success-bg); color: var(--success); border-color: #A5D6A7; display: flex; }

/* ═══════════════════════════════════════════════════════════════════════════
   ADMIN — LOGIN
═══════════════════════════════════════════════════════════════════════════ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(64,145,108,.20) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 10%, rgba(201,162,39,.18) 0%, transparent 50%),
    linear-gradient(145deg, var(--green-900) 0%, var(--green-800) 60%, #2A5540 100%);
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  top: -120px; right: -120px;
  width: 480px; height: 480px;
  background: rgba(201,162,39,.07);
  border-radius: 50%;
  pointer-events: none;
}

.login-page::after {
  content: '';
  position: absolute;
  bottom: -100px; left: -100px;
  width: 360px; height: 360px;
  background: rgba(64,145,108,.08);
  border-radius: 50%;
  pointer-events: none;
}

.login-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255,255,255,.05);
  padding: 2.75rem 2.5rem;
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
  border-top: 4px solid var(--gold-500);
  animation: scale-in .35s cubic-bezier(.22,1,.36,1);
}

.login-brand { text-align: center; margin-bottom: 2.25rem; }

.login-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--green-900), var(--green-800));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.1rem;
  box-shadow: var(--shadow-green);
}

.login-icon svg { color: var(--gold-300); }

.login-brand h1 {
  font-family: var(--font-title);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--green-900);
  letter-spacing: -.2px;
  margin-bottom: .3rem;
}

.login-brand p {
  font-size: .86rem;
  color: var(--text-muted);
  font-family: var(--font-body);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ADMIN — NAVBAR DO PAINEL
═══════════════════════════════════════════════════════════════════════════ */
.admin-navbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 8px rgba(27,67,50,.06);
}

.admin-navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.admin-brand { display: flex; align-items: center; gap: .7rem; }

.admin-brand-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--green-900), var(--green-800));
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-green);
}

.admin-brand-icon svg { color: var(--gold-300); }

.admin-brand-name {
  font-family: var(--font-title);
  font-size: .97rem;
  font-weight: 700;
  color: var(--text-primary);
}

.admin-brand-sub {
  font-size: .72rem;
  color: var(--text-muted);
  font-family: var(--font-body);
}

.btn-logout {
  background: var(--danger-bg);
  border: 1px solid #FECACA;
  color: var(--danger);
  padding: .44rem 1rem;
  border-radius: var(--radius-md);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background var(--transition), color var(--transition);
}

.btn-logout:hover {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}

/* ═══════════════════════════════════════════════════════════════════════════
   TABS
═══════════════════════════════════════════════════════════════════════════ */
.tabs-wrap {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(27,67,50,.04);
}

.tabs {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  gap: .15rem;
  overflow-x: auto;
}

.tab-btn {
  background: none;
  border: none;
  border-bottom: 2.5px solid transparent;
  padding: 1rem 1.2rem;
  font-size: .86rem;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--transition), border-color var(--transition);
  margin-bottom: -1px;
  letter-spacing: .01em;
}

.tab-btn:hover { color: var(--green-800); }

.tab-btn.active {
  color: var(--green-900);
  border-bottom-color: var(--gold-500);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fade-in-up .3s var(--ease); }

/* ═══════════════════════════════════════════════════════════════════════════
   ADMIN — CONTAINER
═══════════════════════════════════════════════════════════════════════════ */
.admin-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   STAT CARDS
═══════════════════════════════════════════════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.1rem;
  margin-bottom: 2.25rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* Accent gradient bar on left */
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: linear-gradient(to bottom, var(--gold-500), var(--gold-300));
  border-radius: 4px 0 0 4px;
}

/* Decorative background shape */
.stat-card::after {
  content: '';
  position: absolute;
  top: -20px; right: -20px;
  width: 80px; height: 80px;
  background: radial-gradient(circle, rgba(201,162,39,.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.stat-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: .45rem;
  font-family: var(--font-body);
}

.stat-value {
  font-family: var(--font-title);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--green-900);
  line-height: 1.1;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TOOLBAR
═══════════════════════════════════════════════════════════════════════════ */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.35rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.toolbar-title {
  font-family: var(--font-title);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-primary);
}

.toolbar-sub {
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: .12rem;
  font-family: var(--font-body);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESULT BARS
═══════════════════════════════════════════════════════════════════════════ */
.result-list { display: flex; flex-direction: column; gap: .85rem; }

.result-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.5rem;
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
  box-shadow: var(--shadow-card);
}

.result-item:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(201,162,39,.40);
  transform: translateX(3px);
}

.result-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .75rem;
  gap: .75rem;
  flex-wrap: wrap;
}

.result-item-rank {
  width: 1.75rem; height: 1.75rem;
  background: var(--gold-100);
  color: var(--gold-600);
  border-radius: 50%;
  font-size: .74rem;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-family: var(--font-body);
  box-shadow: 0 1px 4px rgba(166,132,28,.20);
}

.result-item-rank.gold {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-300));
  color: var(--green-900);
}

.result-item-name {
  font-family: var(--font-body);
  font-size: .92rem;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
}

.result-item-meta {
  font-size: .81rem;
  color: var(--text-muted);
  font-weight: 600;
  flex-shrink: 0;
  font-family: var(--font-body);
}

.progress-track {
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  height: 8px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-900), var(--green-700));
  transition: width .85s var(--ease);
  border-radius: var(--radius-full);
}

/* ═══════════════════════════════════════════════════════════════════════════
   TABELAS
═══════════════════════════════════════════════════════════════════════════ */
.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  overflow-x: auto;
  box-shadow: var(--shadow-card);
}

table { width: 100%; border-collapse: collapse; background: var(--bg-card); }

thead { background: var(--green-900); }

thead th {
  padding: .88rem 1.2rem;
  text-align: left;
  font-size: .71rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.80);
  white-space: nowrap;
  font-family: var(--font-body);
}

tbody tr {
  border-bottom: 1px solid var(--bg-subtle);
  transition: background var(--transition);
}

tbody tr:last-child { border-bottom: none; }

tbody tr:nth-child(even) { background: var(--bg-body); }

tbody tr:hover { background: var(--gold-50); }

tbody td {
  padding: .75rem 1.2rem;
  font-size: .82rem;
  color: var(--text-secondary);
  vertical-align: middle;
  font-family: var(--font-body);
}

/* ═══════════════════════════════════════════════════════════════════════════
   BADGES
═══════════════════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: .22rem .7rem;
  border-radius: var(--radius-full);
  font-size: .69rem;
  font-weight: 700;
  letter-spacing: .03em;
  white-space: nowrap;
  font-family: var(--font-body);
}

.badge-green  { background: var(--green-100); color: var(--green-900); }
.badge-red    { background: var(--danger-bg);  color: var(--danger); }
.badge-purple { background: #EDE9FE; color: #5B21B6; }
.badge-yellow { background: var(--gold-100);  color: var(--gold-600); }

/* ═══════════════════════════════════════════════════════════════════════════
   RELATÓRIO
═══════════════════════════════════════════════════════════════════════════ */
.rel-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  margin-bottom: 1.35rem;
  box-shadow: var(--shadow-card);
}

.rel-section-title {
  font-family: var(--font-title);
  font-size: .97rem;
  font-weight: 700;
  color: var(--green-900);
  margin-bottom: 1.35rem;
  padding-bottom: .8rem;
  border-bottom: 1px solid var(--border);
}

.rel-info-row { display: flex; gap: 1rem; margin-bottom: 1.35rem; flex-wrap: wrap; }

.rel-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.35rem;
  flex: 1;
  min-width: 200px;
  border-left: 3px solid var(--gold-500);
  box-shadow: var(--shadow-card);
}

.rel-info-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: .32rem;
  font-family: var(--font-body);
}

.rel-info-value {
  font-family: var(--font-body);
  font-size: .96rem;
  font-weight: 700;
  color: var(--text-primary);
}

.rel-bar-item { display: flex; align-items: center; gap: .95rem; margin-bottom: .95rem; }
.rel-bar-item:last-child { margin-bottom: 0; }

.rel-bar-rank {
  width: 1.6rem; height: 1.6rem;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .71rem;
  font-weight: 800;
  flex-shrink: 0;
  background: var(--green-100);
  color: var(--green-900);
  font-family: var(--font-body);
}

.rel-bar-rank.gold   { background: linear-gradient(135deg, var(--gold-500), var(--gold-300)); color: var(--green-900); }
.rel-bar-rank.silver { background: #F1F5F9; color: #475569; }
.rel-bar-rank.bronze { background: #FEF3C7; color: #92400E; }

.rel-bar-info { flex: 1; min-width: 0; }

.rel-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: .38rem;
  gap: .5rem;
}

.rel-bar-name {
  font-family: var(--font-body);
  font-size: .89rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rel-bar-count {
  font-size: .81rem;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
  font-family: var(--font-body);
}

.rel-bar-track {
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  height: 10px;
  overflow: hidden;
}

.rel-bar-fill {
  height: 100%;
  transition: width .9s var(--ease);
  border-radius: var(--radius-full);
}

.rel-bar-fill.rank-1 { background: linear-gradient(90deg, var(--gold-600), var(--gold-400)); }
.rel-bar-fill.rank-2 { background: linear-gradient(90deg, #475569, #64748B); }
.rel-bar-fill.rank-3 { background: linear-gradient(90deg, #92400E, #B45309); }
.rel-bar-fill.rank-n { background: linear-gradient(90deg, var(--green-900), var(--green-700)); }

.rel-chart-wrap { position: relative; width: 100%; height: 220px; }
.rel-chart-wrap canvas { width: 100% !important; height: 100% !important; }

.rel-chart-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: .89rem;
  font-family: var(--font-body);
}

#rel-tbody td { font-size: .86rem; font-family: var(--font-body); }

#rel-tbody .pos-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem; height: 1.65rem;
  border-radius: 50%;
  font-size: .73rem;
  font-weight: 800;
  background: var(--green-100);
  color: var(--green-900);
  font-family: var(--font-body);
}

#rel-tbody .pos-badge.gold   { background: linear-gradient(135deg, var(--gold-500), var(--gold-300)); color: var(--green-900); }
#rel-tbody .pos-badge.silver { background: #F1F5F9; color: #475569; }
#rel-tbody .pos-badge.bronze { background: #FEF3C7; color: #92400E; }

.pct-bar-inline { display: flex; align-items: center; gap: .5rem; }

.pct-bar-inline .track {
  flex: 1;
  height: 6px;
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.pct-bar-inline .fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--green-900), var(--gold-500));
  transition: width .9s var(--ease);
}

.pct-label {
  font-size: .79rem;
  font-weight: 700;
  color: var(--text-secondary);
  min-width: 42px;
  text-align: right;
  font-family: var(--font-body);
}

/* ─── Auditoria ──────────────────────────────────────────────────────────── */
#auditoria-print { display: none; }

/* ═══════════════════════════════════════════════════════════════════════════
   PRINT / PDF
═══════════════════════════════════════════════════════════════════════════ */
@media print {
  .admin-navbar,
  .tabs-wrap,
  .toolbar .btn,
  .btn-logout,
  #btn-imprimir,
  #btn-pdf-resultados { display: none !important; }

  body {
    background: white !important;
    color: #111 !important;
    font-size: 11pt;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .admin-container { padding: 0 !important; }
  .tab-panel { display: none !important; }

  body[data-print="relatorio"] #tab-relatorio,
  body:not([data-print]) #tab-relatorio { display: block !important; }

  body[data-print="resultados"] #tab-resultados { display: block !important; }

  .print-header {
    display: block !important;
    text-align: center;
    padding: 0 0 1.2rem;
    border-bottom: 2px solid var(--gold-500);
    margin-bottom: 1.5rem;
  }

  .print-header h1 {
    font-size: 16pt;
    font-weight: 800;
    color: var(--green-900) !important;
    margin-bottom: .25rem;
  }

  .print-header p { font-size: 9pt; color: #555; }

  .rel-section { box-shadow: none !important; border: 1px solid #ddd !important; break-inside: avoid; margin-bottom: 1rem; }
  .stat-card   { box-shadow: none !important; border: 1px solid #ddd !important; break-inside: avoid; }
  .result-item { box-shadow: none !important; border: 1px solid #ddd !important; break-inside: avoid; }

  table { border-collapse: collapse !important; width: 100% !important; }
  thead { background: var(--green-900) !important; }
  thead th { color: white !important; font-size: 9pt; padding: .4rem .6rem; }
  tbody td  { font-size: 9pt; padding: .35rem .6rem; }
  tbody tr:nth-child(even) { background: #f9f9f9 !important; }

  .rel-chart-wrap { display: none !important; }

  .progress-fill, .rel-bar-fill, .pct-bar-inline .fill {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .stats-grid { grid-template-columns: repeat(3, 1fr) !important; gap: .5rem !important; }

  body[data-print="auditoria"] .admin-navbar,
  body[data-print="auditoria"] .tabs-wrap,
  body[data-print="auditoria"] .admin-container { display: none !important; }

  body[data-print="auditoria"] #auditoria-print { display: block !important; }

  .aud-capa {
    text-align: center;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--gold-500);
  }

  .aud-logo-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    margin-bottom: .75rem;
    color: var(--green-900);
  }

  .aud-sistema { font-size: 10pt; font-weight: 600; color: var(--green-900); text-transform: uppercase; letter-spacing: .06em; }
  .aud-titulo  { font-size: 16pt; font-weight: 800; color: var(--green-900); margin-bottom: .3rem; }
  .aud-subtitulo { font-size: 11pt; color: var(--gold-600); font-weight: 600; margin-bottom: .6rem; }
  .aud-meta { font-size: 9pt; color: #555; margin-bottom: .75rem; }
  .aud-sep  { margin: 0 .5rem; color: #ccc; }

  .aud-aviso {
    display: inline-block;
    background: var(--gold-50);
    border: 1px solid var(--gold-400);
    border-radius: 4px;
    padding: .4rem 1rem;
    font-size: 8pt;
    color: #555;
  }

  .aud-tabela {
    width: 100%;
    border-collapse: collapse;
    font-size: 8.5pt;
    page-break-inside: auto;
  }

  .aud-tabela thead { background: var(--green-900); print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .aud-tabela thead th {
    color: white;
    padding: .45rem .5rem;
    text-align: left;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 7.5pt;
    letter-spacing: .04em;
  }

  .aud-tabela tbody tr { page-break-inside: avoid; }
  .aud-tabela tbody tr:nth-child(even) { background: var(--gold-50); print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .aud-tabela tbody tr:nth-child(odd)  { background: #FFFFFF; }

  .aud-tabela tbody td { padding: .35rem .5rem; border-bottom: 1px solid #eee; vertical-align: middle; }

  .aud-seq  { text-align: center; color: #999; width: 28px; }
  .aud-num  { text-align: center; font-weight: 700; color: var(--green-900); width: 28px; }
  .aud-cpf  { font-family: monospace; font-size: 8pt; }
  .aud-cand { font-weight: 700; color: var(--gold-600); }

  .aud-rodape {
    margin-top: 1.5rem;
    padding-top: .75rem;
    border-top: 1px solid #ddd;
    text-align: center;
    font-size: 7.5pt;
    color: #999;
  }

  @page { margin: 1.2cm; size: A4 landscape; }

  body[data-print="relatorio"],
  body[data-print="resultados"],
  body:not([data-print]) { size: A4 portrait; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVIDADE — Mobile-First
   Breakpoints: 480 / 768 / 1024 / 1280 / 1920
═══════════════════════════════════════════════════════════════════════════ */

/* ─── ≥ 1280px ────────────────────────────────────────────────────────────── */
@media (min-width: 1280px) {
  .candidates-grid { gap: 2rem; }
}

/* ─── ≥ 1920px — Ultra-wide ──────────────────────────────────────────────── */
@media (min-width: 1920px) {
  .navbar-inner,
  .main-content,
  .admin-container,
  .admin-navbar-inner,
  .tabs,
  .footer-grid { max-width: 1520px; }

  .institutional-section { max-width: 1520px; }
  .institutional-section.institutional-alt { max-width: none; }
  .institutional-section.institutional-alt > * { max-width: 1520px; }

  .candidates-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.25rem;
  }

  .hero-content { max-width: 900px; margin: 0 auto; }
}

/* ─── ≤ 1023px — Tablet ──────────────────────────────────────────────────── */
@media (max-width: 1023px) {
  .main-content    { padding: 2rem 1.25rem 2.75rem; }
  .admin-container { padding: 1.5rem 1.25rem; }
  .candidates-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
  .profile-grid    { grid-template-columns: 290px 1fr; gap: 2rem; }

  /* Hamburger menu */
  .navbar-toggle { display: inline-flex; }
  .navbar-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    background: rgba(27,67,50,.97);
    backdrop-filter: blur(12px);
    border-bottom: 2px solid rgba(201,162,39,.35);
    box-shadow: var(--shadow-lg);
    padding: .6rem;
    max-height: calc(100vh - 66px);
    overflow-y: auto;
  }

  .navbar-links.open { display: flex; animation: fade-in-up .2s var(--ease); }

  .navbar-links a {
    padding: .85rem 1rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    border-radius: var(--radius-md);
  }

  .navbar-links a:hover { background: rgba(255,255,255,.08); }
}

/* ─── ≤ 767px — Smartphone ──────────────────────────────────────────────── */
@media (max-width: 767px) {
  .navbar-inner  { padding: 0 1rem; height: 56px; }
  .navbar-title  { font-size: .88rem; }
  .navbar-badge  { font-size: .68rem; padding: .22rem .6rem; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .navbar-links  { max-height: calc(100vh - 56px); }

  .hero          { padding: 2.75rem 1.1rem 4rem; }
  .hero-eyebrow  { font-size: .73rem; }
  .btn-hero-cta  { width: 100%; }

  .countdown-unit     { min-width: 56px; padding: .58rem .42rem; }
  .countdown-num      { font-size: 1.28rem; }

  .candidates-grid    { grid-template-columns: minmax(0, 1fr); gap: 1.1rem; }
  .card-bio           { font-size: .84rem; }
  .hero p             { font-size: .95rem; }

  .institutional-text,
  .profile-bio        { font-size: .97rem; }

  .institutional-section { padding: 2.5rem 1.1rem; }
  .institutional-section.institutional-alt          { padding-left: 0; padding-right: 0; }
  .institutional-section.institutional-alt > *      { padding-left: 1.1rem; padding-right: 1.1rem; }
  .sponsor-grid       { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }

  .profile-grid       { grid-template-columns: 1fr; gap: 1.75rem; }
  .profile-photo      { max-width: 360px; margin: 0 auto; }

  .footer-grid        { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
  .footer-col ul      { align-items: center; }

  .modal              { max-width: 100%; border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
  .overlay            { align-items: flex-end; padding: 0; }
  .modal-header       { padding: 1.3rem 1.3rem 1.1rem; }
  .modal-body         { padding: 1.3rem; }
  .modal-footer       { padding: 0 1.3rem 1.5rem; flex-direction: column; gap: .65rem; }

  .admin-navbar-inner { padding: 0 1rem; height: auto; min-height: 54px; flex-wrap: wrap; padding-top: .7rem; padding-bottom: .7rem; }
  .admin-brand-sub    { display: none; }

  .tabs               { padding: 0 1rem; }
  .tab-btn            { padding: .85rem .9rem; font-size: .81rem; }
  .admin-container    { padding: 1.35rem 1rem; }

  .stats-grid   { grid-template-columns: 1fr 1fr; gap: .8rem; }
  .stat-value   { font-size: 1.6rem; }

  .toolbar      { flex-direction: column; align-items: flex-start; gap: .8rem; }
  .toolbar .btn { width: 100%; justify-content: center; }

  .result-item  { padding: 1rem 1.1rem; }
  .result-item-header { flex-wrap: wrap; }

  .rel-section  { padding: 1.2rem; }
  .rel-info-row { flex-direction: column; }
  .rel-chart-wrap { height: 180px; }

  .login-card   { padding: 2.25rem 1.75rem; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .main-content { padding: 1.85rem 1rem 2.75rem; }
}

/* ─── ≤ 480px — Smartphone pequeno ─────────────────────────────────────── */
@media (max-width: 480px) {
  .navbar-badge { display: none; }

  .hero         { padding: 2.25rem .9rem 3.25rem; }
  .hero h1      { font-size: 1.65rem; }
  .hero p       { font-size: .88rem; }

  .countdown-units { gap: .42rem; }
  .countdown-unit  { min-width: 50px; padding: .48rem .32rem; }
  .countdown-num   { font-size: 1.08rem; }
  .countdown-rotulo { font-size: .6rem; }

  .candidates-grid { gap: .95rem; }
  .card-name       { font-size: .97rem; }
  .btn-vote        { font-size: .82rem; padding: .65rem .55rem; min-height: 44px; }

  .profile-name    { font-size: 1.55rem; }
  .btn-vote-profile { width: 100%; }

  .stats-grid   { grid-template-columns: 1fr; }
  .rel-chart-wrap { height: 160px; }
  .rel-bar-count  { display: none; }
  .table-col-hide { display: none; }

  .admin-brand-icon { display: none; }

  .login-card    { padding: 1.85rem 1.35rem; }
  .login-icon    { width: 52px; height: 52px; }
  .login-brand h1 { font-size: 1.25rem; }

  .vote-done     { padding: 3.5rem 1rem; }
  .vote-done h2  { font-size: 1.6rem; }
  .vote-done-circle { width: 70px; height: 70px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   CLASSES UTILITÁRIAS — substitui inline styles banidos pelo CSP (P11)
═══════════════════════════════════════════════════════════════════════════ */

/* Visibilidade */
.hidden { display: none !important; }

/* Células de tabela */
.td-seq   { color: var(--text-muted); font-size: .8rem; }
.td-mono  { font-family: monospace; font-size: .85rem; }
.td-small { font-size: .85rem; }
.td-center { text-align: center; }
.td-bold  { font-weight: 700; }

/* Skeletons */
.skeleton-card-photo {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  height: 300px;
}
.skeleton-body { display: flex; flex-direction: column; gap: .7rem; }
.skeleton-title { height: 1.1rem; margin: 0 auto; width: 65%; }
.skeleton-sub   { height: .8rem;  margin: 0 auto; width: 45%; }
.skeleton-line  { height: .75rem; width: 90%; }
.skeleton-line-short { height: .75rem; width: 75%; }
.skeleton-btn   { height: 46px; border-radius: var(--radius-md); margin-top: .3rem; }

/* Paletas de foto-placeholder (evita inline gradient) */
.photo-palette-0 { background: linear-gradient(135deg, #2F5233, #5B8C5A); }
.photo-palette-1 { background: linear-gradient(135deg, #C9A227, #E0BE5A); }
.photo-palette-2 { background: linear-gradient(135deg, #8C6239, #C9A227); }

/* Confetti */
.confetti-base {
  position: absolute;
  pointer-events: none;
  animation: confettiFall linear forwards;
  border-radius: 50%;
}

/* Stagger de animação das cards */
.card-stagger-0  { animation-delay:   0ms; }
.card-stagger-1  { animation-delay:  80ms; }
.card-stagger-2  { animation-delay: 160ms; }
.card-stagger-3  { animation-delay: 240ms; }
.card-stagger-4  { animation-delay: 320ms; }
.card-stagger-5  { animation-delay: 400ms; }
.card-stagger-6  { animation-delay: 480ms; }
.card-stagger-7  { animation-delay: 560ms; }
.card-stagger-8  { animation-delay: 640ms; }
.card-stagger-9  { animation-delay: 720ms; }

/* Print headers */
.print-only { display: none; }
@media print { .print-only { display: block; } }

/* Painel admin — seções controladas por JS */
.admin-section-hidden { display: none; }

/* Modal footer buttons */
.modal-footer .btn { flex: 1; }

/* Login form submit button */
.btn-login-submit { width: 100%; margin-top: .75rem; padding: .8rem; }

/* Texto de carregamento */
.loading-text { color: var(--text-muted); font-size: .875rem; }
.td-pad       { padding: 2rem; }
.td-danger    { color: var(--danger); }
.td-nowrap    { white-space: nowrap; }
.td-detalhe      { max-width: 180px; word-break: break-all; }
.profile-back-wrap { margin-top: 1.5rem; }
