/* ── Barra de projeção (1º turno — presidente) ── */
.r1-proj-bar {
  padding: 0.6rem 1rem 0.75rem;
  border-bottom: 1px solid var(--glass-border);
}
.r1-proj-labels-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}
.r1-proj-name {
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 48%;
}
.r1-proj-name--right { text-align: right; }
.r1-proj-bar-outer {
  position: relative;
}
.r1-proj-bar-wrap {
  display: flex;
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
}
.r1-proj-bar-seg { height: 100%; transition: width 0.5s ease; }
.r1-proj-midline {
  position: absolute;
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: calc(100% + 6px);
  background: rgba(255,255,255,0.85);
  border-radius: 1px;
  pointer-events: none;
}
.r1-proj-labels-bot {
  display: flex;
  justify-content: space-between;
  margin-top: 0.4rem;
}
.r1-proj-pct {
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1;
  font-family: 'JetBrains Mono', monospace;
}
.r1-proj-pct--right { text-align: right; }

/* ── Partido Badge ── */
.partido-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  background: color-mix(in srgb, var(--cor) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--cor) 40%, transparent);
  color: var(--cor);
  letter-spacing: 0.02em;
}

/* ── Status Badge ── */
.badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge--elected     { background: rgba(0,200,83,0.15);  color: #00c853; border: 1px solid rgba(0,200,83,0.3); }
.badge--elected-avg { background: rgba(0,200,83,0.1);   color: #69f0ae; border: 1px solid rgba(0,200,83,0.2); }
.badge--probable    { background: rgba(255,215,0,0.12); color: #ffd700; border: 1px solid rgba(255,215,0,0.3); }
.badge--substitute  { background: rgba(139,155,191,0.1);color: #8b9bbf; border: 1px solid rgba(139,155,191,0.2); }
.badge--none        { background: transparent;           color: var(--text-muted); border: 1px solid transparent; }
.badge--annulled    { background: rgba(255,71,87,0.12); color: var(--accent-red); border: 1px solid rgba(255,71,87,0.3); }

/* ── Live Indicator ── */
.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  animation: pulse-dot 1.5s ease-in-out infinite;
  flex-shrink: 0;
}

/* ── Icon Button ── */
.icon-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  transition: color var(--transition), background var(--transition), border-color var(--transition);
}

.icon-btn:hover {
  color: var(--text-primary);
  background: var(--glass-hover);
  border-color: rgba(255,255,255,0.14);
}

.icon-btn--active {
  color: var(--accent-green);
  border-color: rgba(0,200,83,0.4);
}

/* ── Primary Button ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-blue);
  color: #fff;
}

.btn-primary:hover {
  background: #6ba0f9;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(79,142,247,0.3);
}

.btn-secondary {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--glass-hover);
  border-color: rgba(255,255,255,0.14);
}

/* ── Toast Notification ── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: rgba(15,22,40,0.95);
  border: 1px solid rgba(79,142,247,0.4);
  border-radius: var(--radius-md);
  padding: 0.7rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.875rem;
  color: var(--text-primary);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(79,142,247,0.1);
  transform: translateY(calc(100% + 1.5rem));
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), opacity 0.35s ease;
  z-index: 9999;
  pointer-events: none;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.toast--visible {
  transform: translateY(0);
  opacity: 1;
}

.toast-icon {
  font-size: 1rem;
  color: var(--accent-blue);
  animation: spin-once 0.4s ease;
}

/* ── Congress Scoreboard ── */
.chart-parliament {
  width: 100%;
  height: clamp(200px, 22vw, 270px);
}

.congress-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 900px) {
  .congress-layout {
    grid-template-columns: 1fr 1fr;
  }
}

.congress-legend {
  padding: 0.25rem 0.75rem 0.75rem;
}

.congress-summary {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 0.65rem;
  font-family: 'JetBrains Mono', monospace;
}

.congress-summary__sep  { color: var(--text-muted); margin: 0 0.1em; }
.congress-summary__dot  { color: var(--text-muted); margin: 0 0.4em; }

.congress-legend__items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
}

.congress-legend__item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: default;
}

.congress-legend__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.congress-legend__label {
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.congress-legend__count {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
}

/* ── Party Breakdown ── */
.party-breakdown {
  padding: 1rem 1.25rem 0.75rem;
}

.party-breakdown__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.party-breakdown__title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.party-breakdown__summary {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.party-breakdown__list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.party-row {
  display: grid;
  grid-template-columns: minmax(3rem, max-content) 1fr auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.2rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: background 0.15s;
}

.party-row:last-child { border-bottom: none; }
.party-row:hover { background: rgba(255,255,255,0.03); border-radius: 4px; }

.party-row__badge {
  display: block;
  text-align: center;
  max-width: 8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: color-mix(in srgb, var(--cor) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--cor) 35%, transparent);
  color: var(--cor);
  cursor: default;
}

.party-row__bar-wrap {
  position: relative;
  background: rgba(255,255,255,0.05);
  border-radius: 3px;
  overflow: hidden;
}

.party-row__bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}

.party-row__count {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--text-primary);
  text-align: right;
  min-width: 2.2rem;
}

/* size tiers */
.party-row--xl .party-row__badge    { font-size: 1.05rem; padding: 0.35rem 0.5rem; }
.party-row--xl .party-row__bar-wrap { height: 22px; }
.party-row--xl .party-row__count    { font-size: 1.5rem; }
.party-row--xl                       { padding: 0.5rem 0; }

.party-row--lg .party-row__badge    { font-size: 0.88rem; padding: 0.25rem 0.35rem; }
.party-row--lg .party-row__bar-wrap { height: 16px; }
.party-row--lg .party-row__count    { font-size: 1.1rem; }
.party-row--lg                       { padding: 0.35rem 0; }

.party-row--md .party-row__badge    { font-size: 0.74rem; padding: 0.18rem 0; }
.party-row--md .party-row__bar-wrap { height: 10px; }
.party-row--md .party-row__count    { font-size: 0.82rem; }
.party-row--md                       { padding: 0.22rem 0; }

.party-row--sm .party-row__badge    { font-size: 0.68rem; padding: 0.14rem 0; }
.party-row--sm .party-row__bar-wrap { height: 7px; }
.party-row--sm .party-row__count    { font-size: 0.76rem; }
.party-row--sm                       { padding: 0.16rem 0; }

.party-row--xs .party-row__badge    { font-size: 0.62rem; padding: 0.1rem 0; }
.party-row--xs .party-row__bar-wrap { height: 5px; }
.party-row--xs .party-row__count    { font-size: 0.7rem; color: var(--text-muted); }
.party-row--xs                       { padding: 0.12rem 0; }

/* ── Star / Highlight ── */
.star-btn {
  background: none;
  border: none;
  padding: 0.2rem 0.3rem;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-secondary);
  opacity: 1;
  transition: color 0.15s, transform 0.15s;
  border-radius: 3px;
}
.star-btn:hover             { color: rgba(255,215,0,0.45); transform: scale(1.25); cursor: pointer; }
.star-btn--active           { color: #ffd700; }
.star-btn--active:hover     { color: #ffd700; transform: scale(1.25); cursor: pointer; }
.col-star              { width: 28px; padding: 0 0 0 0.25rem !important; }

.row--highlighted { background: rgba(255,215,0,0.04) !important; }

.highlight-empty-state {
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.link-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #ffd700;
  font-size: inherit;
  text-decoration: underline;
  padding: 0;
}

/* ── Highlight Filter Button ── */
.highlight-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.75rem;
  border-radius: 4px;
  border: 1px solid rgba(255,215,0,0.25);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.highlight-filter-btn:not(:disabled):hover {
  border-color: rgba(255,215,0,0.6);
  color: #ffd700;
}
.highlight-filter-btn:disabled { opacity: 0.35; cursor: default; }
.highlight-filter-btn--active  {
  background: rgba(255,215,0,0.12);
  color: #ffd700;
  border-color: rgba(255,215,0,0.5);
}

/* ── Highlights FAB ── */
.highlights-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: 2rem;
  border: 1px solid rgba(255,215,0,0.4);
  background: rgba(20,20,30,0.9);
  color: #ffd700;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  z-index: 200;
  backdrop-filter: blur(8px);
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.highlights-fab:hover { background: rgba(255,215,0,0.15); transform: translateY(-1px); }
.highlights-fab--empty { color: var(--text-muted); border-color: rgba(255,255,255,0.1); }
.highlights-fab--empty:hover { background: rgba(255,255,255,0.05); transform: none; }
.highlights-fab__count {
  background: #ffd700;
  color: #111;
  border-radius: 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.05rem 0.45rem;
  min-width: 1.2rem;
  text-align: center;
}
.highlights-fab--empty .highlights-fab__count {
  background: rgba(255,255,255,0.15);
  color: var(--text-muted);
}

/* ── Alerts FAB ── */
.alerts-fab {
  position: fixed;
  bottom: 4.5rem;
  right: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 1.1rem;
  border-radius: 2rem;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(20,20,30,0.9);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  z-index: 200;
  backdrop-filter: blur(8px);
  transition: background 0.15s, border-color 0.15s, transform 0.15s, color 0.15s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.alerts-fab:hover { background: rgba(255,255,255,0.06); transform: translateY(-1px); }
.alerts-fab--active { color: #60c8ff; border-color: rgba(96,200,255,0.4); }
.alerts-fab--active:hover { background: rgba(96,200,255,0.1); }
.alerts-fab__count {
  font-size: 0.7rem;
  font-weight: 700;
  background: #60c8ff;
  color: #0a0e1a;
  border-radius: 1rem;
  padding: 0.05rem 0.4rem;
  min-width: 1.1rem;
  text-align: center;
  display: none;
}
.alerts-fab--active .alerts-fab__count { display: inline; }

/* ── Alerts Modal ── */
.alerts-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s;
  padding: 1rem;
}
.alerts-modal-overlay--visible { opacity: 1; }

.alerts-modal {
  background: var(--surface-2, #111827);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,0.7);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.alerts-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.alerts-modal__close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}
.alerts-modal__close:hover { color: var(--text-primary); background: rgba(255,255,255,0.07); }

.alerts-modal__desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.alerts-modal__actions {
  display: flex;
  gap: 0.5rem;
}
.alerts-modal__btn-all,
.alerts-modal__btn-none {
  padding: 0.3rem 0.9rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.15s;
}
.alerts-modal__btn-all:hover,
.alerts-modal__btn-none:hover { background: rgba(255,255,255,0.1); }

.alerts-modal__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
}

.alerts-uf-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.07);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  user-select: none;
}
.alerts-uf-item:hover { background: rgba(255,255,255,0.05); }
.alerts-uf-item:has(input:checked) {
  background: rgba(96,200,255,0.08);
  border-color: rgba(96,200,255,0.35);
}
.alerts-uf-item input { display: none; }
.alerts-uf-sigla {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 1.8rem;
}
.alerts-uf-nome {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Highlight Modal ── */
.hl-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.hl-modal-overlay--visible { opacity: 1; pointer-events: all; }

.hl-modal {
  background: var(--surface-2, #1a1b2e);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius, 10px);
  width: min(520px, 92vw);
  max-height: 75vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.hl-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}

.hl-modal__title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffd700;
  letter-spacing: 0.02em;
}

.hl-modal__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hl-modal__clear {
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.6;
}
.hl-modal__clear:hover { opacity: 1; color: var(--accent-red, #ff4757); }

.hl-modal__close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  transition: color 0.15s;
}
.hl-modal__close:hover { color: var(--text-primary); }

.hl-modal__body {
  overflow-y: auto;
  padding: 0.75rem 1.25rem 1.25rem;
  flex: 1;
}

.hl-modal__empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.7;
}

.hl-group { margin-bottom: 1.1rem; }
.hl-group:last-child { margin-bottom: 0; }

.hl-group__title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hl-group__count {
  background: rgba(255,255,255,0.1);
  border-radius: 1rem;
  padding: 0.05rem 0.45rem;
  font-size: 0.68rem;
  color: var(--text-secondary);
}

.hl-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.5rem;
  border-radius: 6px;
  transition: background 0.12s;
}
.hl-item:hover { background: rgba(255,255,255,0.04); }

.hl-item__nome {
  flex: 1;
  font-size: 0.84rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hl-item__uf {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  flex-shrink: 0;
}

.hl-item__remove { opacity: 0.6; font-size: 0.9rem; flex-shrink: 0; }
.hl-item__remove:hover { opacity: 1; }

/* ── Candidate Modal ── */
.cand-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5,8,18,0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 1rem;
}

.cand-modal-overlay--visible {
  opacity: 1;
  pointer-events: all;
}

.cand-modal {
  background: rgba(13,19,36,0.98);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,0.65), 0 0 0 1px rgba(79,142,247,0.08);
  position: relative;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
}

.cand-modal-overlay--visible .cand-modal {
  transform: scale(1) translateY(0);
}

.cand-modal__close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text-secondary);
  font-size: 0.72rem;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
  z-index: 1;
}

.cand-modal__close:hover { background: rgba(255,255,255,0.16); color: var(--text-primary); }

.cand-modal__header {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
  padding: 1.4rem 1.4rem 1.2rem;
  border-bottom: 1px solid var(--glass-border);
}

.cand-modal__avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.1);
}

.cand-modal__photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  opacity: 0; transition: opacity 0.3s;
}

.cand-modal__photo.loaded { opacity: 1; }

.cand-modal__num {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem; font-weight: 700;
  color: rgba(255,255,255,0.85);
}

.cand-modal__identity {
  flex: 1;
  min-width: 0;
  padding-right: 1.8rem;
}

.cand-modal__name {
  font-size: 0.95rem; font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 0.4rem;
}

.cand-modal__meta {
  display: flex; align-items: center;
  gap: 0.4rem; flex-wrap: wrap;
  margin-bottom: 0.4rem;
}

.cand-modal__votes {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
}

.cand-modal__loading {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 1.1rem 1.4rem;
  color: var(--text-muted);
  font-size: 0.83rem;
}

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

.cand-modal__spinner {
  width: 14px; height: 14px; flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.1);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: modal-spin 0.7s linear infinite;
}

.cand-modal__profile {
  padding: 0.4rem 0 0.6rem;
}

.cand-modal__row {
  display: flex; align-items: baseline;
  gap: 1rem;
  padding: 0.65rem 1.4rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.cand-modal__row:last-child { border-bottom: none; }

.cand-modal__label {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  min-width: 140px;
  flex-shrink: 0;
}

.cand-modal__value {
  font-size: 0.875rem;
  color: var(--text-primary);
  font-weight: 500;
}

.cand-trigger:hover { opacity: 0.8; }

/* ── Candidate Avatar ── */
.candidate-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.08);
}

.candidate-avatar__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.candidate-avatar__img.loaded {
  opacity: 1;
}

.candidate-avatar__num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
}

/* ── Deputy Avatar ── */
.deputy-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.deputy-avatar__icon {
  color: rgba(255,255,255,0.22);
  flex-shrink: 0;
}

.deputy-avatar__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.deputy-avatar__img.loaded {
  opacity: 1;
}

.col-foto {
  width: 46px;
  padding-left: 0.5rem !important;
  padding-right: 0.25rem !important;
}

/* ── Overtake Banner ── */
.overtake-banner {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(calc(-100% - 2rem));
  opacity: 0;
  background: rgba(15,22,40,0.97);
  border: 1px solid rgba(245,158,11,0.55);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.3rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.9rem;
  color: var(--text-primary);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(245,158,11,0.15), 0 0 24px rgba(245,158,11,0.12);
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), opacity 0.35s ease;
  z-index: 10000;
  pointer-events: none;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  white-space: nowrap;
}

.overtake-banner--visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.overtake-banner__icon {
  font-size: 1.4rem;
  animation: glow-pulse 1.5s ease-in-out infinite;
  color: #f59e0b;
}

.overtake-banner__title {
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f59e0b;
  margin-bottom: 0.15rem;
}

.overtake-banner__sub {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.overtake-banner__sub strong {
  color: var(--text-primary);
}

/* ── Deputies Table ── */
.qe-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border: 1px solid var(--glass-border);
  border-bottom: none;
  font-size: 0.875rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.qe-header__item strong {
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
}

.qe-header__item--right { margin-left: auto; }

.table-wrap {
  overflow: auto;
  max-height: 600px;
  border: 1px solid var(--glass-border);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: rgba(255,255,255,0.01);
}

.deputies-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  table-layout: fixed;
}

.deputies-table .col-num     { width: 44px; }
.deputies-table .col-nome    { width: 38%; }
.deputies-table .col-partido { width: 160px; }
.deputies-table .col-pos     { width: 68px; }
.deputies-table .col-votos   { width: 116px; }
.deputies-table .col-status  { width: 82px; }

.deputies-table thead th { position: sticky; top: 0; z-index: 1; }

.deputies-table th {
  text-align: left;
  padding: 0.6rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--glass-border);
  white-space: nowrap;
  background: rgba(255,255,255,0.02);
}

.deputies-table td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text-secondary);
  vertical-align: middle;
}

.deputies-table td.nome { color: var(--text-primary); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deputies-table td.num  { font-family: 'JetBrains Mono', monospace; color: var(--text-muted); font-size: 0.8rem; }

.deputies-table .row--elected td { background: rgba(0,200,83,0.03); }
.deputies-table .row--elected td.nome { color: var(--accent-green); }

.deputies-table tr:hover td { background: rgba(255,255,255,0.03); }
.deputies-table tr:last-child td { border-bottom: none; }

.partido-cell { vertical-align: middle; }
.partido-seats { font-size: 0.72rem; color: var(--text-secondary); margin-top: 2px; white-space: nowrap; opacity: 0.75; }

.cand-seats { font-size: 0.68rem; color: var(--accent-green); margin-top: 2px; }

.pos-cell { display: inline-block; font-size: 0.82rem; font-weight: 700; font-family: 'JetBrains Mono', monospace; white-space: nowrap; }
.pos--in  { color: var(--accent-green); }
.pos--out { color: var(--text-muted); }
.pos-vagas { font-weight: 400; opacity: 0.65; }

/* ── Tooltip ── */
[data-tooltip] { cursor: help; }

.tooltip-bubble {
  position: fixed;
  display: none;
  max-width: 230px;
  background: rgba(10,14,26,0.97);
  border: 1px solid rgba(79,142,247,0.35);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.45;
  padding: 0.45rem 0.7rem;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 99999;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
}

.text-right  { text-align: right; }
.text-center { text-align: center; }

.star {
  font-size: 0.8rem;
  margin-right: 0.15rem;
}

/* ── Candidate Percent Bar ── */
.pct-bar-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.pct-bar {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}

.pct-bar__fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s ease;
}

/* ── Countdown ── */
.countdown {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 70px;
}

.countdown-value {
  font-size: 2.5rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent-blue);
  line-height: 1;
}

.countdown-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.25rem;
}

.countdown-sep {
  font-size: 2rem;
  font-weight: 300;
  color: var(--text-muted);
  padding-bottom: 0.3rem;
}

/* ── Blocked Panel ── */
.blocked-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 3rem 1.5rem;
  text-align: center;
}

.blocked-panel__icon { font-size: 2.5rem; }

.blocked-panel__title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
}

.blocked-panel__sub { color: var(--text-secondary); font-size: 0.9rem; }

.blocked-panel__countdown {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-blue);
}

/* ── Second Round Notice ── */
.second-round-notice {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-gold);
  background: rgba(255,215,0,0.06);
  border: 1px solid rgba(255,215,0,0.2);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.6rem;
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}

.second-round-notice--math {
  color: #f0a500;
  background: rgba(240,165,0,0.1);
  border-color: rgba(240,165,0,0.35);
}

/* ── Math Elected Banner ── */
.math-elected-banner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-green);
  background: rgba(0,220,130,0.07);
  border: 1px solid rgba(0,220,130,0.25);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.75rem;
  margin-bottom: 0.6rem;
  letter-spacing: 0.01em;
}

.math-elected-banner::before {
  content: '⚡';
  font-size: 0.85rem;
}

/* ── Status chip ── */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-chip--waiting  { background: rgba(139,155,191,0.1); color: var(--text-secondary); border: 1px solid rgba(139,155,191,0.2); }
.status-chip--counting { background: rgba(0,200,83,0.1);    color: var(--accent-green);   border: 1px solid rgba(0,200,83,0.25); }
.status-chip--done     { background: rgba(255,215,0,0.1);   color: var(--accent-gold);    border: 1px solid rgba(255,215,0,0.25); }

/* ── Skeleton ── */
.skeleton {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 25%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.04) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: 4px;
}

.skeleton--row { height: 36px; width: 100%; }
.skeleton--text { height: 14px; width: 60%; margin-bottom: 8px; }
.skeleton--chart { height: 200px; width: 100%; border-radius: var(--radius-md); }

/* ── Nav Card (home) ── */
.nav-card {
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  cursor: pointer;
  text-decoration: none;
  display: block;
  color: var(--text-primary);
}

.nav-card:hover {
  transform: translateY(-4px);
  border-color: rgba(79,142,247,0.3);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3), 0 0 0 1px rgba(79,142,247,0.1);
  text-decoration: none;
  color: var(--text-primary);
}

.nav-card__icon { font-size: 2.5rem; margin-bottom: 1rem; }
.nav-card__title { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.4rem; }
.nav-card__sub { color: var(--text-secondary); font-size: 0.875rem; }

/* ── Mock Switcher ── */
.mock-switcher {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(10,14,26,0.92);
  border: 1px solid rgba(255,211,0,0.35);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
}

.mock-switcher__label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent-gold);
  text-transform: uppercase;
  padding-right: 0.4rem;
  border-right: 1px solid rgba(255,255,255,0.12);
}

.mock-switcher__btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 5px;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mock-switcher__btn:hover {
  background: rgba(255,255,255,0.07);
  color: var(--text-primary);
}

.mock-switcher__btn--active {
  background: rgba(79,142,247,0.18);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

/* ── Duel Section (presidente / governador top 2) ── */
.duel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  padding: 0.25rem 0 0.75rem;
}

.duel-grid--single {
  grid-template-columns: 1fr;
  max-width: 260px;
  margin: 0 auto;
}

.duel-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.45rem;
  padding: 1.25rem 0.75rem 1rem;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--duel-cor, #fff) 25%, transparent);
  cursor: pointer;
  transition: background 0.2s;
  min-width: 0;
  overflow: hidden;
}

.duel-card:hover {
  background: rgba(255,255,255,0.06);
}

.duel-photo {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  border: 3px solid var(--duel-cor, rgba(255,255,255,0.2));
  box-shadow: 0 0 0 1px rgba(0,0,0,0.3);
}

.duel-photo__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.duel-photo__img.loaded { opacity: 1; }

.duel-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.25;
  word-break: break-word;
}

.duel-pct {
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

.duel-votes {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.duel-bar {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 0.15rem;
}

.duel-bar__fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s ease;
}

.duel-grid--secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  padding: 0 0 0.75rem;
}

.duel-card--sm {
  padding: 0.5rem 0.6rem 0.45rem;
  gap: 0.3rem;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  overflow: hidden;
}

.duel-card__row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.duel-card--sm .duel-photo {
  width: 36px;
  height: 36px;
  border-width: 2px;
  flex-shrink: 0;
}

.duel-card__info {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.duel-card--sm .duel-name {
  font-size: 0.74rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.duel-card__stats {
  text-align: right;
  flex-shrink: 0;
}

.duel-card--sm .duel-pct {
  font-size: 1.0rem;
  line-height: 1.1;
}

.duel-card--sm .duel-votes {
  font-size: 0.64rem;
}

.duel-gap {
  font-size: 0.64rem;
  color: var(--text-muted);
  opacity: 0.85;
}

/* ── Mobile ── */
/* ── Mapa Presidente 1º Turno ── */
.map-container--r1 {
  height: 340px;
  width: 100%;
}

.map-legend-multi {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.75rem 1rem 0.5rem;
  border-top: 1px solid var(--glass-border);
  min-height: 36px;
}

.map-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.map-legend-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
}

.map-legend-count {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

@media (max-width: 600px) {
  /* Deputies table: reduce fixed column widths to prevent horizontal scroll */
  .deputies-table { font-size: 0.78rem; }
  .deputies-table .col-star    { width: 22px; }
  .deputies-table .col-foto    { width: 34px; }
  .deputies-table .col-nome    { width: auto; min-width: 80px; }
  .deputies-table .col-partido { width: 72px; }
  .deputies-table .col-pos     { display: none; }
  .deputies-table .col-votos   { width: 76px; }
  .deputies-table .col-status  { width: 60px; }
  /* Hide sub-lines that take extra space */
  .partido-seats { display: none; }
  .cand-seats    { display: none; }
  /* Reduce table cell padding */
  .deputies-table td, .deputies-table th { padding: 0.4rem 0.4rem; }
  .deputy-avatar { width: 28px; height: 28px; }

  /* QE header: tighter on mobile */
  .qe-header { gap: 0.6rem; padding: 0.5rem 0.75rem; font-size: 0.8rem; }

  /* Countdown: smaller on mobile */
  .countdown-unit  { min-width: 52px; }
  .countdown-value { font-size: 1.9rem; }
  .countdown-sep   { font-size: 1.6rem; }

  /* Overtake banner: constrain width so it doesn't widen the page */
  .overtake-banner {
    width: calc(100vw - 2rem);
    white-space: normal;
    max-width: none;
    left: 1rem;
    transform: translateY(calc(-100% - 2rem));
  }
  .overtake-banner--visible { transform: translateY(0); }

  /* Party breakdown: tighter */
  .party-breakdown { padding: 0.75rem; }
  .party-breakdown__header { flex-direction: column; align-items: flex-start; gap: 0.2rem; }

  /* Highlights FAB: smaller on mobile */
  .highlights-fab { padding: 0.45rem 0.85rem; font-size: 0.82rem; bottom: 1rem; right: 1rem; }

  /* Highlight modal: full width */
  .hl-modal { width: calc(100vw - 1.5rem); max-height: 80vh; }

  /* Duel secondary grid: empilha em coluna única no mobile */
  .duel-grid--secondary { grid-template-columns: 1fr; }
  .duel-card--sm .duel-name { font-size: 0.78rem; }

  /* Presidente map: shorter on mobile */
  .map-container--r1 { height: 240px; }
  .map-legend-multi { gap: 0.4rem; }

  /* Notification stack: left/right margins on mobile */
  .notif-stack { right: 10px; bottom: 10px; max-width: calc(100vw - 20px); }
  .avast-notif, .state-notif, .api-notif { width: 100%; }
}

/* ── Notification Stack ───────────────────────────────────────────────────── */
.notif-stack {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column-reverse;
  gap: 0.75rem;
  z-index: 10100;
  pointer-events: none;
}

.notif-stack > * {
  pointer-events: auto;
  transform: translateX(calc(100% + 30px));
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.notif-stack > *.notif--visible {
  transform: translateX(0);
  opacity: 1;
}

/* ── Avast Notification ───────────────────────────────────────────────────── */
.avast-notif {
  width: 380px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.55), 0 2px 8px rgba(0,0,0,0.3);
  overflow: hidden;
}

.avast-notif__header {
  background: #1a1a1a;
  color: #ffffff;
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.01em;
}

.avast-notif__top {
  background: #cc0000;
  color: #ffffff;
  text-align: center;
  padding: 0.55rem 1rem;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.avast-notif__body {
  padding: 1rem 1.25rem 1.25rem;
  background: #fff;
  color: #1a1a1a;
}

.avast-notif__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  border-bottom: 1px solid #eee;
  font-size: 0.85rem;
  gap: 0.75rem;
}

.avast-notif__row:last-of-type { border-bottom: none; }

.avast-notif__label {
  font-weight: 700;
  color: #555;
  white-space: nowrap;
  flex-shrink: 0;
}

.avast-notif__value {
  color: #1a1a1a;
  text-align: right;
  word-break: break-word;
}

.avast-notif__value--threat {
  color: #cc0000;
  font-weight: 700;
}

.avast-notif__btn {
  display: block;
  width: 100%;
  margin-top: 0.9rem;
  background: #fe8900;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 0.6rem;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
}

.avast-notif__btn:hover { background: #e07a00; }

.avast-notif__body--alert {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.avast-notif__alert-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a1a1a;
}
.avast-notif__alert-text {
  font-size: 0.82rem;
  color: #444;
  line-height: 1.4;
}

/* ── State Overtake Notification ─────────────────────────────────────────── */
.state-notif {
  width: 320px;
  background: rgba(10,14,26,0.97);
  border: 1px solid color-mix(in srgb, var(--notif-cor, #4a5568) 40%, transparent);
  border-radius: var(--radius-md);
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5),
              0 0 0 1px color-mix(in srgb, var(--notif-cor, #4a5568) 15%, transparent);
}

.state-notif__header {
  background: var(--notif-cor, #4a5568);
  color: #fff;
  padding: 0.55rem 1rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.state-notif__body {
  padding: 0.7rem 1rem 0.85rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.state-notif__body strong { color: var(--text-primary); }

.state-notif__cargo {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--notif-cor, #8b9bbf) 70%, #fff);
  margin-bottom: 0.25rem;
}

.state-notif__partido {
  margin-top: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: color-mix(in srgb, var(--notif-cor, #8b9bbf) 80%, #fff);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── API Notification ─────────────────────────────────────────────────────── */
.api-notif {
  width: 320px;
  background: rgba(10,14,26,0.97);
  border: 1px solid rgba(255,200,0,0.3);
  border-radius: var(--radius-md);
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,200,0,0.1);
}

.api-notif__header {
  background: rgba(255,200,0,0.1);
  padding: 0.45rem 0.85rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffc800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,200,0,0.15);
}

.api-notif__body {
  padding: 0.7rem 0.9rem 0.85rem;
}

.api-notif__title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.api-notif__text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.api-notif__close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0;
  transition: color var(--transition);
}

.api-notif__close:hover { color: var(--text-primary); }

.api-notif--info {
  border-color: rgba(79,142,247,0.3);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(79,142,247,0.1);
}
.api-notif--info .api-notif__header {
  background: rgba(79,142,247,0.12);
  color: var(--accent-blue);
  border-bottom-color: rgba(79,142,247,0.15);
}

/* ── Welcome Modal ────────────────────────────────────────────────────────── */
.welcome-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20000;
  opacity: 0;
  transition: opacity 0.35s ease;
  padding: 1rem;
}
.welcome-overlay--visible { opacity: 1; }

.welcome-modal {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem 2rem 1.75rem;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
  text-align: center;
  transform: translateY(20px);
  transition: transform 0.35s ease;
}
.welcome-overlay--visible .welcome-modal { transform: translateY(0); }

.welcome-modal__icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}
.welcome-modal__title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}
.welcome-modal__sub {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.welcome-modal__features {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
  margin-bottom: 1.75rem;
}
.welcome-modal__feature {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}
.welcome-modal__feature-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  width: 2rem;
  text-align: center;
  margin-top: 0.1rem;
}
.welcome-modal__feature strong {
  display: block;
  font-size: 0.875rem;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}
.welcome-modal__feature p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
}

.welcome-modal__btn {
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: var(--accent-blue);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  font-family: inherit;
}
.welcome-modal__btn:hover { background: #3a7bd5; }
.welcome-modal__btn:active { transform: scale(0.98); }

@media (max-width: 600px) {
  .welcome-modal { padding: 1.5rem 1.25rem; }
}
