/* ==========================================================================
   APURAÇÃO.ONLINE - COMPONENTES LIQUID GLASS
   ========================================================================== */

/* Layout Principal */
.app-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Área do Mapa em Canvas (Fundo dinâmico) */
.map-stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-color: var(--bg-deep);
  cursor: grab;
}
.map-stage:active {
  cursor: grabbing;
}
#map-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Rótulos dos Estados e Callouts Litorâneos (Estilo seuimposto.com) */
.state-labels {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.state-label,
.state-callout {
  position: absolute;
  display: flex;
  align-items: center;
  padding: 0;
  border: 0;
  font-family: var(--font-sans);
  font-size: 11px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  pointer-events: auto;
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.15s ease;
}

.state-label b,
.state-callout b {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.state-label span,
.state-callout span {
  font-weight: 600;
  opacity: 0.9;
  font-size: 10px;
}

.state-label {
  flex-direction: column;
  gap: 2px;
  padding: 3px 5px;
  border-radius: 4px;
  background: transparent;
  transform: translate(-50%, -50%);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 8px rgba(0, 0, 0, 0.65);
}

.state-label:hover {
  transform: translate(-50%, -50%) scale(1.18);
  z-index: 10;
}

.state-callout {
  justify-content: space-between;
  gap: 5px;
  min-width: 48px;
  height: 22px;
  padding: 0 7px;
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.state-callout:hover {
  transform: scale(1.12);
  z-index: 10;
}

@media (max-width: 520px) {
  .state-label span,
  .state-callout span {
    display: none;
  }
  .state-callout {
    min-width: 28px;
    height: 19px;
    padding: 0 4px;
    justify-content: center;
  }
}

/* TopBar Suspensa em Vidro Líquido */
.topbar {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  height: 58px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  display: flex;
  align-items: baseline;
  gap: 4px;
  text-decoration: none;
  color: var(--text-bright);
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, #ffffff 40%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Segmented Control para Cargos */
.cargo-tabs {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--glass-border);
  padding: 3px;
  border-radius: 999px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.cargo-tab {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-liquid);
}

.cargo-tab:hover {
  color: var(--text-main);
}

.cargo-tab.active {
  background: rgba(255, 255, 255, 0.16);
  color: var(--text-bright);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

/* TopBar Lado Direito: Status TSE + Busca */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-liquid);
}

.search-trigger:hover {
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--text-bright);
  background: rgba(0, 0, 0, 0.55);
}

.search-kbd {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  background: rgba(255, 255, 255, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-main);
}

/* HUD Lateral Esquerdo: Placar & Projeções */
.hud-left {
  position: absolute;
  top: 86px;
  left: 16px;
  bottom: 86px;
  width: min(390px, calc(100vw - 32px));
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}

/* Scrollbar fina translúcida */
.hud-left::-webkit-scrollbar {
  width: 4px;
}

.hud-left::-webkit-scrollbar-track {
  background: transparent;
}

.hud-left::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

.hud-left::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}

.scope-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #60a5fa;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  margin-bottom: 6px;
  transition: all 0.2s;
  width: fit-content;
}

.scope-back-btn:hover {
  background: rgba(96, 165, 250, 0.2);
  color: #ffffff;
}

/* Detalhes do Candidato (Padrão Editorial Imagem 2) */
.candidate-detail-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.candidate-detail-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cand-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s;
  padding: 0;
}

.cand-back-btn:hover {
  color: #ffffff;
}

.cand-close-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}

.cand-close-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.candidate-detail-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.candidate-detail-photo {
  width: 62px;
  height: 62px;
  border-radius: 12px;
  object-fit: cover;
  object-position: top center;
  border: 2px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

.candidate-detail-header-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.candidate-detail-name {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.candidate-detail-party {
  font-size: 13px;
  color: var(--text-muted);
}

.candidate-hero-stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.candidate-hero-pct {
  font-family: var(--font-serif);
  font-size: 44px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
}

.candidate-hero-sub {
  font-size: 12.5px;
  color: var(--text-muted);
}

.candidate-stats-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.candidate-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
}

.candidate-stat-label {
  color: var(--text-muted);
}

.candidate-stat-value {
  color: #ffffff;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.candidate-regional-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 6px;
}

.candidate-regional-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.candidate-regional-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}

.candidate-uf-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  width: 24px;
  text-align: center;
}

.candidate-uf-name {
  color: var(--text-main);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.candidate-bar-container {
  width: 80px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  flex-shrink: 0;
}

.candidate-bar-fill {
  height: 100%;
  border-radius: 999px;
}

.candidate-uf-pct {
  font-weight: 700;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  width: 44px;
  text-align: right;
}

/* Placar de Apuração */
.score-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.score-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.place-title {
  font-size: var(--text-h2);
  font-weight: 600;
  color: var(--text-bright);
}

.place-meta {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.progress-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}

.progress-pct {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-bright);
}

.progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  border-radius: 999px;
  transition: width var(--duration-slow) var(--ease-liquid);
}

/* Lista de Candidatos e Duelo */
.candidate-row {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  transition: background var(--duration-fast) var(--ease-liquid);
}

.candidate-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.cand-photo-wrap {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-subtle);
  border: 2px solid rgba(255, 255, 255, 0.14);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cand-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.cand-photo-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
  color: var(--text-muted);
  font-size: 19px;
}

.cand-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cand-name {
  font-size: var(--text-h3);
  font-weight: 600;
  color: var(--text-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cand-partido {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.cand-numbers {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cand-pct {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-bright);
}

.cand-votes {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* Card "Pode Virar? / Análise Matemática" */
.outlook-card {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.outlook-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  font-size: 18px;
  flex-shrink: 0;
}

.outlook-text {
  font-size: var(--text-sm);
  color: var(--text-main);
  line-height: 1.45;
}

.outlook-text strong {
  color: var(--text-bright);
  font-weight: 600;
}

/* Feed de Últimas Viradas & Eleitos (Editorial News Flash) */
.events-section {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.events-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.events-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.events-pulse-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 10px #3b82f6;
  animation: pulse-dot 2s infinite ease-in-out;
}

.events-count-badge {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-faint);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.events-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 250px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
}

.event-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: background var(--duration-fast) var(--ease-liquid), border-color var(--duration-fast) var(--ease-liquid), box-shadow var(--duration-fast) var(--ease-liquid);
  cursor: pointer;
}

.event-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.event-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.event-tags {
  display: flex;
  align-items: center;
  gap: 6px;
}

.event-uf-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.12);
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid rgba(96, 165, 250, 0.25);
}

.event-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-eleito {
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}

.badge-virada {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
}

.badge-concluido {
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.event-time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.event-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.event-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-bright);
  letter-spacing: -0.01em;
}

.event-subtitle {
  font-size: 11px;
  color: var(--text-muted);
}

.events-empty {
  color: var(--text-faint);
  font-size: 11.5px;
  padding: 10px 0;
  display: flex;
  align-items: center;
}

/* HUD Lateral Direito: Controles do Mapa e Estatísticas */
.hud-right {
  position: absolute;
  top: 86px;
  right: 18px;
  z-index: 15;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}

.hud-right > * {
  pointer-events: auto;
}

/* Modo de Colorir Mapa (Quem lidera vs % Apurado) */
.map-mode-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(14, 18, 26, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 4px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.map-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 15px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.map-mode-btn:hover {
  color: #ffffff;
}

.map-mode-btn.active {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

/* Coluna vertical de controles de zoom */
.map-controls {
  width: 38px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 5px;
  background: rgba(14, 18, 26, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.map-control-btn {
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  color: #ffffff;
  font-size: 13px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
}

.map-control-btn:hover {
  background: rgba(255, 255, 255, 0.20);
  color: #ffffff;
  transform: scale(1.1);
}

/* Legenda Visual Flutuante do Mapa */
.map-legend {
  padding: 7px 12px;
  background: rgba(14, 18, 26, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55);
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-main);
  white-space: nowrap;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.legend-bar {
  width: 110px;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, #1e293b 0%, #065f46 30%, #059669 65%, #10b981 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Barra Inferior: Timeline de Apuração */
.bottom-bar {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  height: 52px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 20px;
}

.timeline-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--text-xs);
  color: var(--text-muted);
  white-space: nowrap;
}

.timeline-track-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  height: 24px;
}

.timeline-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
  cursor: pointer;
}

.timeline-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
  cursor: grab;
  transition: transform var(--duration-fast);
}

.timeline-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Modal de Busca Instantânea */
.search-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
  display: none;
  place-items: center;
  padding: 20px;
}

.search-modal-backdrop.open {
  display: grid;
}

.search-dialog {
  width: min(580px, 100%);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--glass-border);
}

.search-input {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-bright);
  font-family: var(--font-sans);
  font-size: 18px;
  outline: none;
}

.search-input::placeholder {
  color: var(--text-dim);
}

.search-results {
  max-height: 400px;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--text-main);
  text-decoration: none;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: background var(--duration-fast);
}

.search-item:hover, .search-item.selected {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.search-item-badge {
  font-size: var(--text-xs);
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
}

.search-item-country {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  margin-bottom: 6px;
}
.search-item-country:hover {
  background: rgba(59, 130, 246, 0.22);
}

/* Banner e Panorama de Eleições Estaduais (Governadores e Senado) */
.state-election-banner {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  color: #93c5fd;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  margin-bottom: 6px;
  line-height: 1.4;
}
.state-election-banner i {
  font-size: 16px;
  color: #60a5fa;
  flex-shrink: 0;
}

.party-bancadas-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 12px;
}
.party-bancada-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-bright);
}
.party-bancada-pill b {
  color: #60a5fa;
  font-weight: 700;
}

.state-overview-row {
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-liquid), border-color var(--duration-fast) var(--ease-liquid), box-shadow var(--duration-fast) var(--ease-liquid);
  border: 1px solid transparent;
}
.state-overview-row:hover {
  background: rgba(255, 255, 255, 0.09) !important;
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.state-badge-pill {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12.5px;
  color: #ffffff;
  flex-shrink: 0;
}

/* Tooltip flutuante do mapa */
.map-tooltip {
  position: absolute;
  pointer-events: none;
  z-index: 50;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: var(--text-xs);
  color: var(--text-bright);
  transform: translate(-50%, -100%);
  margin-top: -12px;
  opacity: 0;
  transition: opacity 0.15s ease;
  white-space: nowrap;
}

.map-tooltip.visible {
  opacity: 1;
}

.sheet-handle-bar {
  display: none;
}

/* Responsividade Mobile & Tablet (Liquid Sheet Layout) */
@media (max-width: 860px) {
  .topbar {
    top: 8px;
    left: 8px;
    right: 8px;
    height: 50px;
    padding: 0 12px;
    gap: 8px;
  }

  .brand-title {
    font-size: 20px;
  }

  .brand-badge {
    display: none;
  }

  .live-badge {
    padding: 3px 8px;
    font-size: 10.5px;
  }

  .cargo-tabs {
    padding: 2px;
  }

  .cargo-tab {
    padding: 5px 10px;
    font-size: 12px;
  }

  #last-update-time {
    display: none;
  }

  .search-trigger {
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }

  .search-trigger .search-text,
  .search-trigger .search-kbd {
    display: none;
  }

  /* Controles flutuantes no topo direito para não colidir com o placar */
  .hud-right {
    top: 66px;
    right: 8px;
    bottom: auto;
    align-items: flex-end;
    gap: 8px;
    z-index: 15;
  }

  .map-mode-pill {
    padding: 2px;
  }

  .map-mode-btn {
    padding: 4px 10px;
    font-size: 11px;
  }

  .map-controls {
    padding: 3px;
  }

  .map-control-btn {
    width: 34px;
    height: 34px;
    font-size: 13px;
  }

  /* HUD Lateral vira Bottom Sheet tátil */
  .hud-left {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 220px;
    max-height: 85vh;
    border-radius: 20px 20px 0 0;
    background: rgba(12, 16, 23, 0.90);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.75);
    z-index: 25;
    padding: 0 16px 14px 16px;
    gap: 12px;
    overflow: hidden;
    pointer-events: auto;
    transition: height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .hud-left.expanded {
    height: 72vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .sheet-handle-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 10px 0 6px 0;
    cursor: pointer;
  }

  .sheet-handle {
    width: 44px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
    transition: background var(--duration-fast);
  }

  .sheet-handle-bar:hover .sheet-handle {
    background: rgba(255, 255, 255, 0.6);
  }

  .hud-left .score-card {
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
    gap: 10px;
  }

  .hud-left:not(.expanded) .events-section {
    display: none;
  }

  .bottom-bar {
    display: none;
  }
}

@media (max-width: 480px) {
  .topbar {
    padding: 0 8px;
    height: 46px;
  }

  .brand-title {
    font-size: 17px;
  }

  .cargo-tab {
    padding: 4px 7px;
    font-size: 11px;
  }

  .hud-left {
    height: 215px;
    padding: 0 12px 12px 12px;
  }

  .hud-left.expanded {
    height: 76vh;
  }

  .cand-name {
    font-size: 14px;
  }

  .cand-pct {
    font-size: 20px;
  }
}

