/* Golosovanie dashboard — Vibor-aligned overrides */

:root {
  --accent: var(--primary);
  --accent-light: var(--light);
  --surface: var(--card);
  --surface2: var(--bg);
  --green: var(--positive);
  --green-bg: #d1fae5;
  --yellow: var(--warning);
  --red: var(--negative);
  --red-bg: #fee2e2;
  --shadow: var(--shadow-sm);
  --radius: 14px;
}

/* Layout */
.layout {
  display: flex;
  max-width: 100%;
  margin: 0;
  gap: 0;
  min-width: 0;
}

.sidebar {
  width: 250px;
  flex-shrink: 0;
  padding: 0 16px 16px 0;
  position: sticky;
  top: 20px;
  height: calc(100vh - 40px);
  overflow-y: auto;
}

.sidebar-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
  transition: transform 0.32s var(--ease-spring), box-shadow 0.32s;
}

@media (hover: hover) {
  .sidebar-card:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(59, 130, 246, 0.3);
  }
}

.sidebar-card h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 10px;
  font-weight: 600;
}

.filter-group { margin-bottom: 12px; }
.filter-group label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
  font-weight: 500;
}

.filter-group input,
.filter-group select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: var(--bg);
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.filter-group input:focus,
.filter-group select:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.quick-stat {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.quick-stat:last-child { border: none; }
.quick-stat span:last-child { font-weight: 600; color: var(--primary); }

main {
  flex: 1;
  padding: 0 0 40px;
  min-width: 0;
}

@media (max-width: 1100px) {
  /* Sidebar visibility handled by mobile.css + JS classes */
}

/* Election navigation */
.election-bar.mode-switch {
  overflow-x: auto;
  flex-wrap: nowrap;
  margin-bottom: 16px;
  scrollbar-width: thin;
}

.election-bar.mode-switch::-webkit-scrollbar { height: 4px; }

.election-bar .mode-btn {
  flex: 0 0 auto;
  min-width: max-content;
  padding: 10px 14px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.election-bar .mode-btn .tab-icon { font-size: 1rem; }

.election-bar .mode-btn.summary-tab:not(.active) {
  background: linear-gradient(160deg, #fff 0%, var(--light) 100%);
  color: var(--primary);
}

/* Views */
.view-panel {
  display: none;
  animation: fadeInUp 0.4s var(--ease-out);
}

.view-panel.active { display: block; }
.sub-panel { display: none; }
.sub-panel.active { display: block; }

/* Hero banners — pastel Vibor panels */
.campaign-hero,
.hero-banner,
.hero {
  background: linear-gradient(160deg, #fff 0%, var(--light) 55%, #eef4ff 100%);
  border: 2px solid var(--primary);
  border-radius: 16px;
  padding: 24px 28px;
  color: var(--text);
  margin-bottom: 20px;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.campaign-hero::before,
.hero-banner::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -8%;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.campaign-hero h1,
.hero-banner h1,
.hero h1 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.25;
  color: var(--primary);
  position: relative;
}

.view-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
  position: relative;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  position: relative;
}

.tag-warn {
  background: #fffbeb !important;
  color: #92400e !important;
  border-color: #fde68a !important;
}

.hero-actions {
  margin-top: 14px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  position: relative;
}

/* KPI — hero-card grid like Vibor */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.kpi-grid.overview-hero .hero-card {
  margin-bottom: 0;
}

.kpi-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.kpi-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  border: 2px solid #fff;
  box-shadow: 0 2px 10px rgba(30, 64, 175, 0.1);
  transition: transform 0.3s var(--ease-spring);
}

@media (hover: hover) {
  .hero-card:hover .kpi-icon-wrap {
    transform: scale(1.08) rotate(-3deg);
  }
}

.tone-blue { background: hsl(220, 75%, 92%); }
.tone-green { background: hsl(152, 60%, 90%); }
.tone-amber { background: hsl(38, 90%, 90%); }
.tone-purple { background: hsl(262, 65%, 92%); }
.tone-pink { background: hsl(330, 70%, 92%); }
.tone-teal { background: hsl(172, 55%, 88%); }
.tone-red { background: hsl(0, 75%, 93%); }
.tone-mint { background: hsl(160, 55%, 90%); }

/* Nav cards metric */
.nav-card-metric {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  margin-top: 8px;
  line-height: 1.1;
}

/* Overview nav spacing */
.overview-nav {
  margin-bottom: 24px;
}

/* Cards / panels */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.summary-charts-row { align-items: stretch; }
.summary-charts-row .card {
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
  min-width: 0;
}

.summary-charts-row .chart-box-lg {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.summary-charts-row .chart-wrap {
  flex: 1;
  min-height: 280px;
  height: 300px;
}

.summary-charts-row .card:has(.uik-history-meta) .chart-wrap.tall {
  min-height: 240px;
  height: 260px;
}

@media (max-width: 1100px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.card,
.card.panel-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  transition: transform 0.32s var(--ease-spring), box-shadow 0.32s, border-color 0.25s;
  animation: fadeInUp 0.45s var(--ease-out) backwards;
}

.card:nth-child(1) { animation-delay: 0.04s; }
.card:nth-child(2) { animation-delay: 0.08s; }
.card:nth-child(3) { animation-delay: 0.12s; }
.card:nth-child(4) { animation-delay: 0.16s; }

@media (hover: hover) {
  .card:hover,
  .card.panel-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(59, 130, 246, 0.35);
  }
}

.card-header .panel-desc,
.card-header .hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.chart-box {
  background: var(--bg);
  border-radius: 10px;
  padding: 14px;
  min-width: 0;
  width: 100%;
  border: 1px solid transparent;
  transition: box-shadow 0.3s, border-color 0.25s;
}

@media (hover: hover) {
  .chart-box:hover {
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.12);
  }
}

.chart-box-lg { min-height: 300px; min-width: 0; }

.chart-wrap { position: relative; height: 260px; min-width: 0; }
.chart-wrap.tall { height: 340px; min-height: 300px; }
.chart-wrap.full { height: 300px; }

.nav-card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
}

.subtabs.period-switch {
  width: fit-content;
  max-width: 100%;
  flex-wrap: wrap;
}

.subtabs .period-btn {
  flex: 0 1 auto;
  min-width: max-content;
  padding: 10px 16px;
}

.vote-subtabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  width: fit-content;
  box-shadow: var(--shadow-sm);
}

.vote-subtabs button {
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  color: var(--muted);
  transition: transform 0.25s var(--ease-spring), background 0.2s, color 0.2s, box-shadow 0.25s;
}

.vote-subtabs button.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
  transform: scale(1.02);
}

.vote-subtabs button:hover:not(.active) {
  background: var(--light);
  color: var(--primary);
}

/* Rankings */
.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
  cursor: pointer;
  border-bottom: none;
}

.rank-item:last-child { margin-bottom: 0; }

.rank-main { flex: 1; min-width: 0; }
.rank-title { font-weight: 600; font-size: 13px; color: var(--text); }
.rank-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.rank-val { text-align: right; }
.rank-score { font-weight: 700; font-size: 15px; }

.rank-num {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
  border: 1px solid var(--border);
  transition: transform 0.25s var(--ease-spring);
}

@media (hover: hover) {
  .rank-item:hover .rank-num { transform: scale(1.1); }
}

.rank-num.gold {
  background: #fef3c7;
  color: #b45309;
  border-color: #fde68a;
}

.formula-box {
  background: var(--light);
  border-radius: 8px;
  padding: 12px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: var(--primary);
  margin: 10px 0;
  border-left: 3px solid var(--primary);
}

/* Tables — Vibor blue headers */
.compare-table-wrap,
.table-scroll,
.vote-matrix-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.table-scroll { max-height: 520px; }
.vote-matrix-wrap { max-height: 70vh; }

.compare-table,
.vote-matrix,
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.compare-table th,
.compare-table td,
.vote-matrix th,
.vote-matrix td,
table th,
table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  text-align: right;
  white-space: nowrap;
}

.compare-table th:first-child,
.compare-table td:first-child {
  text-align: left;
  font-weight: 600;
  position: sticky;
  left: 0;
  background: var(--card);
  z-index: 1;
}

.compare-table thead th,
.table-scroll thead th,
.vote-matrix thead th {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 3;
}

.compare-table thead th:first-child {
  background: var(--primary);
  z-index: 4;
}

.vote-matrix th:first-child,
.vote-matrix td:first-child {
  text-align: left;
  position: sticky;
  left: 0;
  background: var(--card);
  z-index: 2;
  font-weight: 600;
  min-width: 300px;
  max-width: 480px;
  white-space: normal;
  word-break: break-word;
  line-height: 1.35;
  padding-right: 16px;
  box-shadow: 4px 0 8px -4px rgba(0, 0, 0, 0.06);
}

.vote-matrix thead th:first-child {
  background: var(--primary);
  z-index: 4;
}

th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { background: #1e3a8a; }
th.sortable.sorted.asc::after,
th.sortable.sorted.desc::after { font-size: 10px; opacity: 0.85; }
th.sortable.sorted.asc::after { content: ' ▲'; }
th.sortable.sorted.desc::after { content: ' ▼'; }

tr { cursor: pointer; }
tr:hover td { background: var(--light); }

/* UIK history */
.uik-history-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  align-items: center;
}

.uik-filter-btn {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  color: var(--muted);
  transition: all 0.2s;
}

.uik-filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.uik-filter-btn:hover:not(.active) {
  background: var(--light);
  color: var(--primary);
}

.stability-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.stability-badge.stable { background: #d1fae5; color: #047857; }
.stability-badge.moderate { background: #fef3c7; color: #b45309; }
.stability-badge.volatile { background: #fee2e2; color: #b91c1c; }
.stability-badge.single { background: #e2e8f0; color: #64748b; }

.heat-cell {
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 12px;
  font-weight: 600;
}

.uik-history-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.uik-history-meta .tag {
  background: var(--light);
  border: 1px solid #bfdbfe;
  color: var(--primary);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

/* UIK history — collapsible + compact table */
.uik-history-fold {
  margin-bottom: 20px;
}

.uik-history-fold .mfold-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 4px 2px 12px;
  margin: 0;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}

.uik-history-fold .mfold-toggle-text {
  min-width: 0;
  flex: 1;
}

.uik-history-fold .mfold-toggle-title {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.3;
}

.uik-history-fold .mfold-toggle-desc {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.4;
}

.uik-history-fold .mfold-toggle-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 0.25s var(--ease-out), background 0.2s, border-color 0.2s;
}

@media (hover: hover) {
  .uik-history-fold .mfold-toggle:hover .mfold-toggle-icon {
    background: var(--light);
    border-color: var(--secondary);
  }
}

.uik-history-fold.mfold-collapsed .mfold-body {
  display: none;
}

.uik-history-fold.mfold-collapsed .mfold-toggle-icon {
  transform: rotate(-90deg);
}

.uik-history-table-wrap {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.uik-history-table {
  table-layout: fixed;
  width: 100%;
  font-size: 11px;
}

.uik-history-table th,
.uik-history-table td {
  padding: 7px 3px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.uik-history-table thead th {
  font-size: 10px;
  padding: 8px 2px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.uik-history-table th:first-child,
.uik-history-table td:first-child {
  text-align: left;
  padding-left: 8px;
  width: 7%;
  position: static;
  left: auto;
  background: inherit;
  box-shadow: none;
}

.uik-history-table thead th:first-child {
  background: var(--primary);
}

.uik-history-table .uik-num {
  font-weight: 600;
  font-size: 10px;
}

.uik-history-table .heat-compact {
  display: block;
  padding: 2px 1px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 4px;
  line-height: 1.2;
}

.uik-history-table .stability-badge {
  font-size: 9px;
  padding: 2px 5px;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .uik-history-table {
    font-size: 10px;
  }
  .uik-history-table thead th {
    font-size: 9px;
  }
}

.delta-up { color: var(--positive); font-size: 12px; font-weight: 600; }
.delta-down { color: var(--negative); font-size: 12px; font-weight: 600; }

/* Table toolbar */
.table-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.table-toolbar input {
  flex: 1;
  min-width: 180px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  background: var(--bg);
  font-family: inherit;
}

.table-toolbar input:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Badges & efficiency */
.badge-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 600;
}

.badge-pill.high { background: var(--green-bg); color: #047857; }
.badge-pill.mid { background: #fef3c7; color: #b45309; }
.badge-pill.low { background: var(--red-bg); color: #b91c1c; }

.eff-cell { display: flex; align-items: center; gap: 6px; }
.eff-bar {
  flex: 1;
  height: 5px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
  min-width: 40px;
}

.eff-fill { height: 100%; border-radius: 3px; }

.eff-cell .badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg);
  color: var(--text);
  border: none;
}

.eff-cell .badge.high { background: var(--green-bg); color: #047857; }
.eff-cell .badge.mid { background: #fef3c7; color: #b45309; }
.eff-cell .badge.low { background: var(--red-bg); color: #b91c1c; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 8px;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: #1e3a8a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.25);
}

.btn-ghost {
  background: var(--light);
  color: var(--primary);
  border: 1px solid #bfdbfe;
}

.btn-ghost:hover { background: #bfdbfe; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-danger { background: var(--red-bg); color: var(--red); border: 1px solid #fecaca; }

/* Modals & drawers */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.overlay.open { display: flex; }

.modal {
  background: var(--card);
  border-radius: 14px;
  padding: 28px;
  max-width: 500px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  animation: slideIn 0.35s var(--ease-out);
}

.modal h2 {
  font-size: 1.15rem;
  margin-bottom: 6px;
  color: var(--primary);
}

.modal p {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 16px;
}

.dropzone {
  border: 2px dashed var(--border);
  border-radius: 14px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  background: var(--bg);
  transition: all 0.2s;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--secondary);
  background: var(--light);
}

.dropzone .icon { font-size: 2.2rem; margin-bottom: 8px; }
#file-input,
#refresh-file-input { display: none; }

.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  justify-content: flex-end;
}

.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(15, 23, 42, 0.25);
}

.drawer-overlay.open { display: block; }

.drawer {
  position: fixed;
  top: 0;
  right: -400px;
  width: 380px;
  max-width: 100vw;
  height: 100vh;
  background: var(--card);
  z-index: 160;
  box-shadow: var(--shadow-lg);
  transition: right 0.28s ease;
  overflow-y: auto;
  padding: 22px;
  border-left: 1px solid var(--border);
}

.drawer.open { right: 0; }

.drawer-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border: none;
  background: var(--bg);
  border-radius: 8px;
  cursor: pointer;
  color: var(--muted);
}

.metric-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.metric-row span:first-child { color: var(--muted); max-width: 58%; }
.metric-row span:last-child { font-weight: 600; color: var(--primary); }

/* Loading overlay — Vibor style */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: rgba(240, 244, 248, 0.92);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-overlay.hidden { display: none; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 32px;
  color: var(--muted);
  animation: fadeInUp 0.5s var(--ease-out);
  max-width: 520px;
  margin: 40px auto;
}

.empty-icon-wrap {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 18px;
  background: linear-gradient(160deg, var(--light), #eef4ff);
  border: 2px solid #bfdbfe;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: var(--shadow-sm);
  animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.empty-state h2 { color: var(--primary); margin-bottom: 8px; font-weight: 700; font-size: 18px; }
.empty-state p { font-size: 13px; line-height: 1.5; }

/* Drawer — pastel accent */
.drawer {
  border-left: 2px solid var(--primary);
  animation: slideIn 0.35s var(--ease-out);
}

.drawer h2 { color: var(--primary); font-weight: 700; }

/* Sub-panel transitions */
.sub-panel.active { animation: fadeInUp 0.35s var(--ease-out); }

/* Card header restore */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
  gap: 12px;
  flex-wrap: wrap;
}

.card-header h3,
.card-header .panel-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 2px;
}

.card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 6px;
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 900px) {
  .charts-grid { grid-template-columns: 1fr; }
}

/* Remove duplicate loading */
.loading { display: none; }
.spinner { display: none; }

.election-list {
  margin-top: 16px;
  text-align: left;
  max-width: 400px;
  margin-inline: auto;
}

.election-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 13px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.election-list-item:hover {
  border-color: var(--secondary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 300;
  background: var(--text);
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13px;
  transform: translateY(60px);
  opacity: 0;
  transition: all 0.3s var(--ease-out);
  pointer-events: none;
  box-shadow: var(--shadow-md);
}

.toast.show { transform: none; opacity: 1; }
.toast.success { background: var(--positive); }
.toast.error { background: var(--negative); }
