/* ============================================================
   VOTABRASIL - DESIGN SYSTEM v2.0
   Sistema de design completo com tokens, componentes e estados
   ============================================================ */

/* ---------- DESIGN TOKENS - VOTABRASIL v2 (baseado nos .docx) ---------- */
:root {
  /* Paleta Dark Navy Premium - VotaBrasil v3 */
  --bg-base: #0E1726;       /* Navy profundo */
  --bg-card: #16223A;       /* Card slightly lighter */
  --bg-card-hover: #1D2D4A;
  --bg-overlay: rgba(14, 23, 38, 0.92);

  /* Brand colors Premium */
  --primary: #1A73E8;       /* Blue elétrico */
  --primary-dark: #1557b9;
  --primary-light: #3399ff;
  --gold: #D4AF37;          /* Dourado metálico */
  --gold-light: #E4C247;
  --gold-dark: #A88D22;
  --muted: #5A6E8E;         /* Gray medio */
  --muted-soft: #8A9BA7;
  --green-br: #009739;

  /* Neutros */
  --white: #FFFFFF;
  --gray-50: #F8FAFC;
  --gray-100: #EEF2F7;
  --gray-200: #E0E7EF;
  --gray-300: #C6D0DD;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;

  /* Texto */
  --text-primary: #FFFFFF;
  --text-secondary: #C8D5E7;
  --text-muted: #5A6E8E;
  --text-muted2: #8A9BA7;

  /* Status */
  --success: #2ECC71;
  --success-dark: #27ae60;
  --warning: #FFA500;
  --danger: #E74C3C;
  --danger-dark: #c0392b;

  /* Gradientes Premium */
  --gradient-hero: linear-gradient(160deg, #0E1726 0%, #16223A 40%, #1a283b 100%);
  --gradient-card: linear-gradient(145deg, rgba(22,34,58,0.8) 0%, rgba(14,23,38,0.5) 100%);
  --gradient-gold: linear-gradient(135deg, #D4AF37 0%, #A88D22 100%);
  --gradient-blue: linear-gradient(135deg, #1A73E8 0%, #1557b9 100%);
  --gradient-green-br: linear-gradient(135deg, #009739 0%, #007a2e 100%);

  /* Sombras Premium */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.45);
  --shadow-blue: 0 0 24px rgba(26, 115, 232, 0.35);
  --shadow-gold: 0 0 20px rgba(212, 175, 55, 0.3);

  /* Bordas e raios */
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 16px;
  --border-radius-xl: 24px;
  --border-radius-full: 9999px;

  /* Espaçamento */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Tipografia: Manrope (corpo) + Montserrat (títulos) — dos .docx */
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-title: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Roboto Mono', 'SF Mono', monospace;
  --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;

  /* Transições */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-index */
  --z-header: 1000;
  --z-sidebar: 900;
  --z-modal: 2000;
  --z-toast: 3000;
}

/* ---------- RESET & BASE ---------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background:
    radial-gradient(ellipse at top right, rgba(52,101,164,0.12) 0%, transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(174,207,0,0.04) 0%, transparent 40%),
    var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Textura sutil de fundo */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-md);
  font-family: var(--font-title);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }

p {
  margin: 0 0 var(--space-md);
  color: var(--text-secondary);
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--gold);
}

/* ---------- HEADER / NAVBAR ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  background: rgba(14, 23, 38, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(90, 107, 126, 0.3);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-xl);
  font-weight: 800;
  font-family: var(--font-title);
  background: transparent 0%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  cursor: pointer;
}

.logo svg {
  filter: drop-shadow(0 0 8px rgba(52, 101, 164, 0.5));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--border-radius-full);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: var(--text-sm);
  transition: all var(--transition-base);
}

.nav-links a:hover {
  background: rgba(52, 101, 164, 0.25);
  color: var(--white);
  -webkit-text-fill-color: var(--white);
}

.nav-links a.active {
  background: var(--gradient-blue);
  color: var(--white);
  -webkit-text-fill-color: var(--white);
  box-shadow: var(--shadow-blue);
}

.mobile-toggle {
  display: none;
  font-size: var(--text-2xl);
  cursor: pointer;
  padding: var(--space-xs) var(--space-sm);
  color: var(--text-primary);
}

/* ---------- SIDEBAR ---------- */
.sidebar {
  position: fixed;
  top: 68px;
  left: 0;
  width: 220px;
  height: calc(100vh - 68px);
  padding: var(--space-lg) var(--space-md);
  background: rgba(14, 23, 38, 0.5);
  border-right: 1px solid rgba(90, 107, 126, 0.15);
  z-index: var(--z-sidebar);
  overflow-y: auto;
}

.sidebar ul {
  list-style: none;
  margin: 0 0 var(--space-xl);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.sidebar li a {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  border-radius: var(--border-radius-md);
  color: var(--text-secondary);
  font-weight: 600;
  transition: all var(--transition-base);
}

.sidebar li a:hover {
  background: rgba(52, 101, 164, 0.2);
  color: var(--white);
  padding-left: var(--space-lg);
  -webkit-text-fill-color: var(--white);
}

.login-area {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(127, 176, 245, 0.15);
  text-align: center;
}

/* ---------- MAIN CONTENT ---------- */
.main-content {
  margin-left: 220px;
  padding: var(--space-xl) var(--space-2xl);
  position: relative;
  z-index: 1;
  max-width: 1200px;
}

/* ---------- HERO ---------- */
.hero {
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
}

.hero h1 {
  background: transparent 50%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: var(--space-md);
}

.hero > p {
  font-size: var(--text-lg);
  max-width: 600px;
  margin: 0 auto var(--space-xl);
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px var(--space-lg);
  border: none;
  border-radius: var(--border-radius-full);
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-base);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent, transparent);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.btn:hover::after {
  transform: translateX(100%);
}

.btn-primary {
  background: var(--gradient-blue);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-blue);
}

.btn-accent {
  background: var(--gradient-lime);
  color: var(--bg-base);
  box-shadow: var(--shadow-md);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lime);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid rgba(90, 107, 126, 0.3);
  backdrop-filter: blur(4px);
}

.btn-secondary:hover {
  background: rgba(52, 101, 164, 0.3);
  border-color: var(--primary-light);
}

.btn-danger {
  background: transparent;
  color: var(--white);
}

.btn-sm {
  padding: 8px var(--space-md);
  font-size: var(--text-xs);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

/* ---------- CARDS ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.card {
  background: var(--gradient-card);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(127, 176, 245, 0.18);
  border-radius: var(--border-radius-lg);
  padding: var(--space-lg);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--primary-light);
  box-shadow: var(--shadow-lg);
}

.card h3 {
  margin-bottom: var(--space-sm);
  font-size: var(--text-xl);
}

.card p {
  font-size: var(--text-sm);
  margin-bottom: var(--space-md);
}

/* ---------- ACTION PANEL ---------- */
.action-panel {
  background: rgba(6, 26, 58, 0.6);
  border: 1px solid rgba(127, 176, 245, 0.25);
  border-radius: var(--border-radius-xl);
  padding: var(--space-xl);
  max-width: 640px;
  margin: var(--space-xl) auto;
  box-shadow: var(--shadow-lg);
}

.action-panel h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-md);
}

/* ---------- SCORE BARS ---------- */
.score-bar-container {
  margin: var(--space-lg) 0;
}

.score-label {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-sm);
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
}

.score-label strong {
  color: var(--gold);
}

.score-bar,
.metric-bar,
.mini-score-bar,
.stat-bar {
  height: 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-full);
  overflow: hidden;
  position: relative;
}

.score-fill,
.metric-fill,
.mini-score-fill,
.stat-fill {
  height: 100%;
  background: var(--gradient-success);
  border-radius: var(--border-radius-full);
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.mini-score-bar {
  height: 8px;
  width: 120px;
  margin: var(--space-sm) 0;
}

.note {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-md);
  font-style: italic;
}

/* ---------- METRICS ---------- */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  margin: var(--space-xl) 0;
}

.metric-card {
  text-align: center;
  background: var(--gradient-card);
  border: 1px solid rgba(127, 176, 245, 0.18);
  border-radius: var(--border-radius-lg);
  padding: var(--space-lg);
  transition: transform var(--transition-base);
}

.metric-card:hover {
  transform: scale(1.03);
}

.metric-number {
  font-size: var(--text-4xl);
  font-weight: 800;
  background: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: var(--font-mono);
}

.metric-label {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  margin: var(--space-sm) 0 var(--space-md);
}

.metric-card .metric-bar {
  margin-top: var(--space-md);
}

/* ---------- CHARTS ---------- */
.charts-section {
  margin-top: var(--space-2xl);
  text-align: left;
}

.charts-section h2 {
  text-align: center;
}

.chart-card {
  background: var(--gradient-card);
  border: 1px solid rgba(127, 176, 245, 0.18);
  border-radius: var(--border-radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.chart-card canvas {
  width: 100% !important;
  height: auto !important;
}

/* ---------- FORMS ---------- */
textarea, input[type="text"], input[type="password"], select {
  width: 100%;
  padding: 12px var(--space-md);
  background: rgba(6, 26, 58, 0.6);
  border: 1px solid rgba(127, 176, 245, 0.25);
  border-radius: var(--border-radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: var(--text-base);
  transition: all var(--transition-base);
  resize: vertical;
}

textarea:focus,
input:focus,
select:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(17, 95, 203, 0.25);
  background: rgba(6, 26, 58, 0.8);
}

label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

/* ---------- REVOCAR ---------- */
.revogar-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
  text-align: left;
}

.revogar-card {
  text-align: left;
}

.signature-counter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  margin: var(--space-md) 0;
}

.signature-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
  font-weight: 800;
  font-family: var(--font-mono);
  background: conic-gradient(#FFD700 0%, #333 0%);
  position: relative;
}

.signature-circle::before {
  content: '';
  position: absolute;
  inset: 10px;
  background: var(--bg-card);
  border-radius: 50%;
}

.signature-circle span {
  position: relative;
  z-index: 1;
}

.signature-circle .target {
  color: var(--text-muted);
  font-size: var(--text-base);
}

.revogar-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  margin-top: var(--space-lg);
}

/* ---------- COMUNIDADE ---------- */
.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-lg);
  margin: var(--space-xl) 0;
  text-align: left;
}

.community-card {
  text-align: left;
}

.card-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
  font-weight: 800;
  flex-shrink: 0;
}

.stats-section {
  text-align: left;
  margin: var(--space-xl) 0;
}

.stat-item {
  margin-bottom: var(--space-lg);
}

.stat-value {
  font-size: var(--text-3xl);
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--gold);
}

.stat-label {
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.contribution-section {
  background: var(--gradient-card);
  border: 1px solid rgba(127, 176, 245, 0.2);
  border-radius: var(--border-radius-xl);
  padding: var(--space-xl);
  margin-top: var(--space-xl);
  text-align: left;
}

.contribution-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.contribution-list li {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: rgba(6, 26, 58, 0.4);
  border-radius: var(--border-radius-md);
  transition: transform var(--transition-base);
}

.contribution-list li:hover {
  transform: translateX(6px);
}

.contribution-list .icon {
  font-size: var(--text-xl);
  width: 32px;
  text-align: center;
}

/* ---------- MODAL ---------- */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(6, 26, 58, 0.85);
  backdrop-filter: blur(8px);
  z-index: var(--z-modal);
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid rgba(127, 176, 245, 0.3);
  border-radius: var(--border-radius-xl);
  padding: var(--space-2xl);
  max-width: 420px;
  width: 100%;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.modal-content h2 {
  margin-bottom: var(--space-lg);
  text-align: center;
}

.modal-content form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  font-size: var(--text-2xl);
  cursor: pointer;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.close:hover {
  color: var(--danger-500);
}

/* ---------- TOAST / NOTIFICATION ---------- */
.score-notification {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  background: var(--gradient-success);
  color: var(--white);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--border-radius-md);
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: var(--z-toast);
  animation: slide-in-right 0.4s ease;
  transition: opacity 0.5s;
  max-width: 340px;
}

/* ---------- FOOTER ---------- */
footer {
  margin-left: 220px;
  background: rgba(6, 26, 58, 0.6);
  border-top: 1px solid rgba(127, 176, 245, 0.15);
  padding: var(--space-2xl) var(--space-2xl) var(--space-lg);
  position: relative;
  z-index: 1;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-xl);
  max-width: 1200px;
}

.footer-section h4 {
  color: var(--gold);
  font-size: var(--text-base);
  margin-bottom: var(--space-md);
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section ul li {
  margin-bottom: var(--space-sm);
}

.footer-section p {
  font-size: var(--text-sm);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-lg);
  margin-top: var(--space-xl);
  border-top: 1px solid rgba(127, 176, 245, 0.1);
}

.footer-bottom p {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin: 0;
}

/* ---------- CANDIDATES (página de candidatos) ---------- */
.search-bar {
  display: flex;
  gap: var(--space-md);
  max-width: 700px;
  margin: 0 auto var(--space-lg);
}

.search-bar input {
  flex: 1;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
  margin-bottom: var(--space-xl);
}

.filter-row select {
  width: auto;
  min-width: 180px;
}

.candidates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

.candidate-card {
  background: var(--gradient-card);
  border: 1px solid rgba(127, 176, 245, 0.18);
  border-radius: var(--border-radius-lg);
  padding: var(--space-lg);
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.candidate-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
  box-shadow: var(--shadow-lime);
}

.candidate-card .candidate-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.candidate-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-2xl);
  font-weight: 800;
  background: var(--gradient-blue);
  color: var(--white);
  flex-shrink: 0;
  border: 2px solid var(--gold);
}

.candidate-name {
  font-size: var(--text-lg);
  font-weight: 800;
  margin: 0 0 var(--space-xs);
}

.candidate-party {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin: 0;
}

.candidate-meta {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--border-radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  background: rgba(17, 95, 203, 0.25);
  color: var(--primary-light);
  border: 1px solid rgba(127, 176, 245, 0.3);
}

.badge.score {
  background: rgba(46, 204, 113, 0.2);
  color: var(--success-400);
  border-color: rgba(46, 204, 113, 0.3);
}

.badge.risk {
  background: rgba(231, 76, 60, 0.2);
  color: var(--danger-400);
  border-color: rgba(231, 76, 60, 0.3);
}

.candidate-score-bar {
  margin: var(--space-md) 0;
}

.candidate-score-label {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  margin-bottom: var(--space-xs);
  color: var(--text-secondary);
}

.candidate-score-label span:last-child {
  font-weight: 800;
  color: var(--gold);
  font-family: var(--font-mono);
}

.compare-checkbox {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
}

.compare-checkbox input {
  width: 20px;
  height: 20px;
  accent-color: var(--gold);
  cursor: pointer;
}

/* ---------- COMPARISON MODAL ---------- */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--space-md);
}

.compare-table th,
.compare-table td {
  padding: var(--space-md);
  text-align: left;
  border-bottom: 1px solid rgba(127, 176, 245, 0.15);
}

.compare-table th {
  background: rgba(17, 95, 203, 0.2);
  font-weight: 700;
}

.compare-table tr:hover {
  background: rgba(17, 95, 203, 0.1);
}

.compare-table td.best {
  color: var(--success-400);
  font-weight: 700;
}

/* ---------- DATA SOURCE BADGES ---------- */
.source-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-sm);
}

.source-badge::before {
  content: '📊';
}

/* ---------- FOTOS REAIS DE PARLAMENTARES ---------- */
.candidate-photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  flex-shrink: 0;
  border: 2px solid var(--gold);
  background: rgba(127, 176, 245, 0.1);
}

.detail-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 3px solid var(--gold);
  background: rgba(127, 176, 245, 0.1);
}

.cmp-photo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 2px solid var(--gold);
  display: block;
  margin: 0 auto 4px;
}

/* ---------- BADGE "DADO REAL" ---------- */
.badge.real {
  background: rgba(46, 204, 113, 0.18);
  color: var(--success-400);
  border-color: rgba(46, 204, 113, 0.4);
}

/* ---------- SELO DE FONTE (pill no topo da página) ---------- */
.source-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--border-radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  border: 1px solid rgba(127, 176, 245, 0.3);
  background: rgba(17, 95, 203, 0.15);
  color: var(--text-secondary);
  backdrop-filter: blur(6px);
}

.source-badge-pill.real {
  background: transparent, rgba(39, 174, 96, 0.12));
  border-color: rgba(46, 204, 113, 0.5);
  color: #d6ffe8;
  box-shadow: 0 0 18px rgba(46, 204, 113, 0.18);
}

.source-badge-pill.demo {
  background: transparent, rgba(255, 165, 0, 0.1));
  border-color: rgba(255, 215, 0, 0.4);
  color: #fff3c4;
}

/* ---------- NOTA DE COMPARAÇÃO / AVISO ---------- */
.compare-note {
  font-size: var(--text-xs);
  color: var(--text-muted);
  background: rgba(17, 95, 203, 0.12);
  border: 1px solid rgba(127, 176, 245, 0.2);
  border-radius: var(--border-radius-md);
  padding: var(--space-sm) var(--space-md);
  margin: 0 0 var(--space-md);
  line-height: 1.5;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-md) 0;
}

/* ============================================================
   TERMÔMETRO DE CONFIANÇA (revogação do voto)
   ============================================================ */

.demo-notice {
  max-width: 820px;
  margin: 0 auto var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--border-radius-md);
  background: transparent, rgba(255, 165, 0, 0.08));
  border: 1px solid rgba(255, 215, 0, 0.35);
  color: #fff3c4;
  font-size: var(--text-sm);
  line-height: 1.6;
}
.demo-notice code {
  font-family: var(--font-mono);
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: var(--text-xs);
}

/* métricas do termômetro (sem a barra, só número + label) */
.thermo-metrics .metric-card { text-align: center; }

/* layout 2 colunas: seu voto | termômetro */
.thermo-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: var(--space-lg);
  align-items: start;
}
.thermo-col { display: flex; flex-direction: column; gap: var(--space-lg); }
@media (max-width: 900px) {
  .thermo-grid { grid-template-columns: 1fr; }
}

.thermo-card h3 { display: flex; align-items: center; gap: var(--space-sm); }
.card-hint {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin: -4px 0 var(--space-md);
  line-height: 1.5;
}

/* ---- seletor de parlamentar (combobox) ---- */
.field-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-xs);
}
.pol-combo { position: relative; margin-bottom: var(--space-md); }
.pol-combo input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--border-radius-md);
  border: 1px solid rgba(127, 176, 245, 0.3);
  background: rgba(6, 26, 58, 0.5);
  color: var(--white);
  font-size: var(--text-base);
}
.pol-combo input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(30, 111, 224, 0.2); }
.pol-combo input:disabled { opacity: 0.6; cursor: not-allowed; }
.pol-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 50;
  max-height: 320px;
  overflow-y: auto;
  background: #0d1b3a;
  border: 1px solid rgba(127, 176, 245, 0.3);
  border-radius: var(--border-radius-md);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  display: none;
}
.pol-dropdown.open { display: block; }
.pol-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  cursor: pointer;
  border-bottom: 1px solid rgba(127, 176, 245, 0.1);
}
.pol-item:last-child { border-bottom: none; }
.pol-item:hover { background: rgba(17, 95, 203, 0.25); }
.pol-item img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; object-position: top center; flex-shrink: 0; }
.pol-item-name { font-weight: 700; font-size: var(--text-sm); color: var(--white); }
.pol-item-meta { margin-left: auto; font-size: var(--text-xs); color: var(--text-muted); }
.pol-empty { padding: 14px 12px; font-size: var(--text-sm); color: var(--text-muted); }

/* parlamentar selecionado */
.selected-pol {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--border-radius-md);
  background: rgba(17, 95, 203, 0.15);
  border: 1px solid rgba(127, 176, 245, 0.3);
  margin-bottom: var(--space-md);
}
.selected-pol-photo { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; object-position: top center; border: 2px solid var(--gold); }
.selected-pol-name { font-weight: 800; color: var(--white); }
.selected-pol-meta { font-size: var(--text-xs); color: var(--text-secondary); }

/* nota de consentimento (R3) */
.consent-note {
  font-size: var(--text-xs);
  line-height: 1.6;
  color: var(--text-secondary);
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: var(--border-radius-md);
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-md);
}

.thermo-divider { height: 1px; background: rgba(127, 176, 245, 0.15); margin: var(--space-lg) 0; }

/* ---- meu voto (R6 mascarado) ---- */
.my-vote-box {
  border-radius: var(--border-radius-md);
  padding: var(--space-md);
  background: rgba(6, 26, 58, 0.5);
  border: 1px solid rgba(127, 176, 245, 0.2);
  margin-bottom: var(--space-md);
  min-height: 60px;
}
.my-vote-placeholder { color: var(--text-muted); font-size: var(--text-sm); text-align: center; padding: var(--space-sm) 0; }
.my-vote-error { color: var(--danger-400); font-size: var(--text-sm); }
.my-vote-success { color: var(--success-400); font-size: var(--text-sm); font-weight: 600; }
.myvote-row { display: flex; align-items: center; gap: 12px; }
.myvote-photo { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: top center; border: 2px solid var(--gold); flex-shrink: 0; }
.myvote-photo.myvote-fallback,
.myvote-fallback {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--gradient-blue); color: #fff; font-weight: 800;
}
.myvote-info { flex: 1; min-width: 0; }
.myvote-name { font-weight: 800; font-size: var(--text-base); color: var(--white); cursor: pointer; letter-spacing: 0.5px; }
.myvote-meta { font-size: var(--text-xs); color: var(--text-secondary); margin-top: 2px; }
.myvote-stats { font-size: var(--text-xs); color: var(--text-muted); margin-top: 6px; }
.myvote-stats strong { color: var(--gold); font-family: var(--font-mono); }
.vote-status { display: inline-block; margin-top: 6px; font-size: var(--text-xs); font-weight: 700; padding: 2px 10px; border-radius: var(--border-radius-full); }
.vote-status.active { background: rgba(46, 204, 113, 0.2); color: var(--success-400); }
.vote-status.revoked { background: rgba(231, 76, 60, 0.2); color: var(--danger-400); }
.reaffirm-banner {
  margin-top: var(--space-md);
  font-size: var(--text-xs);
  line-height: 1.5;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--border-radius-md);
  background: rgba(255, 165, 0, 0.12);
  border: 1px solid rgba(255, 165, 0, 0.35);
  color: #ffe0a3;
}

/* inputs de código + botões */
.code-row { margin-bottom: var(--space-md); }
.code-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--border-radius-md);
  border: 1px dashed rgba(127, 176, 245, 0.4);
  background: rgba(6, 26, 58, 0.5);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: var(--text-base);
  letter-spacing: 1px;
}
.code-input:focus { outline: none; border-color: var(--gold); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.btn-block { width: 100%; justify-content: center; }
.btn-link {
  background: none; border: none; cursor: pointer;
  color: var(--gold-light); font-size: var(--text-sm); font-weight: 600;
  padding: 4px 6px; border-radius: 6px;
}
.btn-link:hover { background: rgba(17, 95, 203, 0.2); }
.privacy-note { font-size: var(--text-xs); color: var(--text-muted); margin-top: var(--space-md); line-height: 1.5; }

/* ---- lista de confiança ao vivo ---- */
.thermo-list { display: flex; flex-direction: column; gap: 10px; }
.thermo-empty { color: var(--text-muted); font-size: var(--text-sm); text-align: center; padding: var(--space-lg) 0; }
.thermo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--border-radius-md);
  background: rgba(17, 95, 203, 0.08);
  border: 1px solid rgba(127, 176, 245, 0.12);
  transition: all var(--transition-base);
}
.thermo-row:hover { background: rgba(17, 95, 203, 0.16); border-color: rgba(127, 176, 245, 0.3); transform: translateX(3px); }
.thermo-pos {
  width: 24px; height: 24px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: var(--text-xs); font-weight: 800; flex-shrink: 0;
  background: rgba(127, 176, 245, 0.15); color: var(--text-secondary);
}
.thermo-row:nth-child(1) .thermo-pos { background: var(--gradient-gold, #FFD700); color: #3a2e00; }
.thermo-photo { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: top center; border: 2px solid var(--gold); flex-shrink: 0; }
.thermo-photo.thermo-fallback,
.thermo-fallback {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--gradient-blue); color: #fff; font-weight: 800; font-size: var(--text-sm);
}
.thermo-info { flex: 1; min-width: 0; }
.thermo-name { font-weight: 800; font-size: var(--text-sm); color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thermo-meta { font-size: var(--text-xs); color: var(--text-muted); margin-bottom: 5px; }
.thermo-scorebar { margin: 0; }
.thermo-scorebar .score-bar { height: 8px; }
.thermo-score { text-align: right; flex-shrink: 0; min-width: 54px; }
.thermo-score-num { display: block; font-weight: 800; font-size: var(--text-lg); color: var(--gold); font-family: var(--font-mono); }
.thermo-score-sub { font-size: var(--text-xs); color: var(--text-muted); }

/* gráfico */
.chart-wrap { position: relative; height: 240px; }

/* metodologia */
.method-card { margin-top: var(--space-lg); }
.method-list { list-style: none; padding: 0; margin: 0; }
.method-list li {
  position: relative;
  padding-left: var(--space-lg);
  margin-bottom: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}
.method-list li::before { content: '◆'; position: absolute; left: 0; color: var(--gold); font-size: var(--text-xs); }
.method-list strong { color: var(--white); }

/* ---- modal do código (R4) ---- */
.code-modal-content { text-align: center; }
.code-display {
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--white);
  background: transparent, rgba(255, 215, 0, 0.15));
  border: 2px solid var(--gold);
  border-radius: var(--border-radius-lg);
  padding: var(--space-lg);
  margin: var(--space-lg) 0 var(--space-sm);
  box-shadow: 0 0 24px rgba(30, 111, 224, 0.3);
  user-select: all;
}
.code-pol { font-size: var(--text-sm); color: var(--text-secondary); }

.data-table th,
.data-table td {
  padding: var(--space-md);
  text-align: left;
  border-bottom: 1px solid rgba(127, 176, 245, 0.15);
  font-size: var(--text-sm);
}

.data-table th {
  background: rgba(17, 95, 203, 0.15);
  font-weight: 700;
  color: var(--primary-light);
}

.data-table tr:hover {
  background: rgba(17, 95, 203, 0.08);
}

.data-table .value-positive { color: var(--success-400); }
.data-table .value-negative { color: var(--danger-400); }
.data-table .value-neutral { color: var(--text-secondary); }

/* ---------- EMPTY STATE ---------- */
.empty-state {
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
  color: var(--text-muted);
}

.empty-state .icon {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-md);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .main-content, footer {
    margin-left: 0;
  }

  .main-content {
    padding: var(--space-lg);
  }
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 68px;
    left: -240px;
    width: 240px;
    background: var(--bg-card);
    transition: left var(--transition-base);
    z-index: var(--z-header);
  }

  .sidebar.open {
    left: 0;
  }

  .mobile-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 68px;
    right: -100%;
    flex-direction: column;
    background: var(--bg-card);
    width: 100%;
    padding: var(--space-lg);
    transition: right var(--transition-base);
    gap: var(--space-md);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links a {
    display: block;
    width: 100%;
    text-align: center;
  }

  .hero {
    padding: var(--space-xl) var(--space-sm);
  }

  .hero h1 {
    font-size: var(--text-2xl);
  }

  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .search-bar {
    flex-direction: column;
  }

  .filter-row select {
    width: 100%;
    min-width: 0;
  }
}

/* ---------- KEYFRAMES (animações) ---------- */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scale-in {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slide-in-right {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 0 0 rgba(17, 95, 203, 0.45); }
  70% { box-shadow: 0 0 0 12px rgba(17, 95, 203, 0); }
  100% { box-shadow: 0 0 0 0 rgba(17, 95, 203, 0); }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Pulso em botões após ação (ex: assinatura) */
.animation-pulse {
  animation: pulse 0.6s ease;
}

/* Animações de revelação (usadas com JS/scroll) */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.show {
  opacity: 1;
  transform: translateY(0);
}

/* Comparação: barra flutuante */
.compare-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(6, 26, 58, 0.95);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 215, 0, 0.4);
  padding: var(--space-md) var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  transform: translateY(100%);
  transition: transform var(--transition-base);
  z-index: var(--z-header);
}

.compare-bar.visible {
  transform: translateY(0);
}

.compare-bar .compare-info {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-weight: 600;
}

.compare-bar .compare-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient-lime);
  color: var(--bg-base);
  font-weight: 800;
}

.compare-bar .compare-actions {
  display: flex;
  gap: var(--space-sm);
}

/* ---------- PAINEL "PLATAFORMA AO VIVO" (HOME) ---------- */
.live-panel {
  border: 1px solid rgba(255, 215, 0, 0.28);
  box-shadow: 0 0 40px rgba(255, 215, 0, 0.06), 0 18px 40px rgba(6, 26, 58, 0.45);
}

.live-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.live-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}

.live-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: var(--space-md);
  border-radius: var(--border-radius-md);
  background: rgba(17, 95, 203, 0.10);
  border: 1px solid rgba(127, 176, 245, 0.18);
}

.live-metric-num {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.live-metric-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
/* ---------- SKELETON LOADING (Estados de Loading Elegantes) ---------- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: var(--border-radius-md);
  color: transparent !important;
  user-select: none;
  pointer-events: none;
}

.skeleton-text {
  height: 1em;
  margin-bottom: var(--space-sm);
}

.skeleton-title {
  height: 1.5em;
  width: 60%;
  margin-bottom: var(--space-md);
}

.skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.skeleton-card {
  height: 120px;
  width: 100%;
}

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

/* ---------- MODAL DE CÓDIGO PREMIUM ---------- */
.code-display {
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--gold);
  background: rgba(212, 175, 55, 0.1);
  border: 2px dashed var(--gold);
  border-radius: var(--border-radius-md);
  padding: var(--space-lg);
  text-align: center;
  margin: var(--space-lg) 0;
  word-break: break-all;
  position: relative;
}

.code-display::before {
  content: '🔒';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  padding: 0 var(--space-sm);
  font-size: var(--text-lg);
}

.code-actions {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-md);
}

.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--border-radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-copy:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-blue);
}

.btn-copy.copied {
  background: var(--success);
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--gray-600);
  border-radius: var(--border-radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-download:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(212, 175, 55, 0.1);
}