/* utilities.css — shared button + form primitives + spacing helpers.
 * Used everywhere; loaded right after glass.css. */

/* ---------- Buttons ---------- */

.vc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--vc-tap);
  padding: 0 16px;
  border: 0;
  border-radius: var(--vc-radius);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 120ms ease, transform 120ms ease, background 120ms ease;
  white-space: nowrap;
}
.vc-btn:active:not(:disabled) { transform: translateY(1px); }
.vc-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.vc-btn:focus-visible {
  outline: 2px solid var(--vc-primary);
  outline-offset: 2px;
}

.vc-btn--primary {
  background: linear-gradient(120deg, var(--vc-primary), var(--vc-accent));
  color: #fff;
}
.vc-btn--primary:hover:not(:disabled) { filter: brightness(1.1); }

.vc-btn--ghost {
  background: transparent;
  border: 1px solid var(--vc-border);
  color: var(--vc-text-high);
}
.vc-btn--ghost:hover:not(:disabled) { border-color: var(--vc-primary); background: var(--vc-bg-glass); }

.vc-btn--danger {
  background: var(--vc-danger);
  color: #fff;
}

.vc-btn--block { width: 100%; }

/* Variant used by long list items (e.g. the booth picker on /voters where
 * names like "PRIMARY SCHOOL ROOM NO. 2 FATHEPUR TANDA" run past the
 * default single-line cap). Wraps text, grows vertically, left-aligns. */
.vc-btn--multiline {
  white-space: normal;
  word-break: break-word;
  text-align: left;
  height: auto;
  min-height: var(--vc-tap);
  padding: 10px 14px;
  line-height: 1.35;
  justify-content: flex-start;
}

/* Vertical stack for picker rows; lets each card occupy its own line with
 * comfortable spacing and full width. */
.vc-picker-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.vc-picker-list > .vc-btn { width: 100%; }

/* ---------- Form controls ---------- */

.vc-input,
.vc-select {
  display: block;
  width: 100%;
  height: var(--vc-tap);
  background: var(--vc-bg-surface);
  color: var(--vc-text-high);
  border: 1px solid var(--vc-border);
  border-radius: var(--vc-radius);
  padding: 0 12px;
  font-size: 15px;
  font-family: inherit;
}
.vc-input:focus,
.vc-select:focus {
  outline: none;
  border-color: var(--vc-primary);
  box-shadow: 0 0 0 3px var(--vc-primary-soft);
}

.vc-link {
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--vc-primary);
  font-size: inherit;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
}
.vc-link:hover { color: var(--vc-accent); text-decoration: underline; }

.vc-label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--vc-text-muted);
  margin: 12px 0 6px;
}

/* ---------- Spacing helpers (Bootstrap5-equivalent, theme-tuned) ---------- */
.vc-mt-1 { margin-top: 4px; }
.vc-mt-2 { margin-top: 8px; }
.vc-mt-3 { margin-top: 12px; }
.vc-mt-4 { margin-top: 16px; }
.vc-mt-5 { margin-top: 24px; }

/* ---------- Pager — First / Prev / page X / Next / Last (global) ---------- */
.vc-pager { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.vc-pager__btn {
  padding: 8px 13px; border-radius: 18px; background: var(--vc-bg-glass);
  border: 1px solid var(--vc-border); color: var(--vc-text-high);
  font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer;
}
.vc-pager__btn:hover:not(:disabled) { border-color: var(--vc-primary); }
.vc-pager__btn:disabled { opacity: .4; cursor: default; }
.vc-pager__info { font-size: 13.5px; padding: 0 6px; font-variant-numeric: tabular-nums; }

/* ---------- Stat strip - small numeric panels. */
.vc-stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  margin: 16px 0;
}
.vc-stat {
  background: var(--vc-bg-glass);
  border: 1px solid var(--vc-border);
  border-radius: var(--vc-radius);
  padding: 12px 14px;
}
.vc-stat__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--vc-text-muted);
}
.vc-stat__value {
  font-size: 24px;
  font-weight: 700;
  color: var(--vc-text-high);
  margin-top: 2px;
}

/* ---------- Roll status pill (SPEC §9.2) ---------- */
.vc-roll-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--vc-bg-glass);
  border: 1px solid var(--vc-border);
  border-radius: var(--vc-radius-pill);
  font-size: 12px;
  color: var(--vc-text-muted);
}
.vc-roll-pill[data-tier="paid"] { color: var(--vc-success); border-color: var(--vc-success); }
.vc-roll-pill[data-tier="free"] { color: var(--vc-warning); border-color: var(--vc-warning); }
.vc-roll-pill__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ---------- Lightweight SVG charts (replaces Syncfusion) ---------- */
.vc-chart {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
.vc-chart--donut { align-items: center; }
/* Scrollable bar chart (e.g. age 18–100) — horizontal scroll with a thin
   themed scrollbar so each bar keeps a readable width. */
.vc-chart--scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--vc-primary) transparent;
}
.vc-chart--scroll::-webkit-scrollbar { height: 8px; }
.vc-chart--scroll::-webkit-scrollbar-thumb { background: var(--vc-primary); border-radius: 4px; }
.vc-chart--scroll::after {
  content: "← swipe to see all →";
  display: block;
  text-align: center;
  font-size: 11px;
  color: var(--vc-text-muted);
  padding-top: 4px;
}
.vc-chart__legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 4px 12px;
  width: 100%;
  font-size: 12px;
  color: var(--vc-text-muted);
}
.vc-chart__legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.vc-chart__legend-val {
  margin-left: auto;
  color: var(--vc-text-high);
}
.vc-chart__swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* ---------- Global page-load progress bar (top-of-viewport) ----------
 * Indeterminate gradient sweep while a click / navigation is in flight;
 * finishes with a quick fade. Visibility controlled by progress-bar.js. */
.vc-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  background: transparent;
  overflow: hidden;
}
.vc-progress::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    var(--vc-primary, #7c4dff),
    var(--vc-accent,  #ff4d8f),
    var(--vc-primary, #7c4dff));
  background-size: 200% 100%;
  transform: translateX(-100%);
  animation: vc-progress-sweep 1.1s linear infinite;
}
.vc-progress--active {
  opacity: 1;
  transition: opacity 80ms ease;
}
.vc-progress--done::before {
  animation: none;
  transform: translateX(0);
  transition: transform 200ms ease;
}
.vc-progress--done {
  opacity: 0;
  transition: opacity 200ms ease 180ms;
}
@keyframes vc-progress-sweep {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
@media (prefers-reduced-motion: reduce) {
  .vc-progress::before { animation-duration: 2.5s; }
}

/* ---------- /voters page header ---------- */

/* Top strip: roll pill + (optional Buy) + Change Booth.
 * Flex with wrap. Change Booth stays right-anchored via margin-left: auto. */
.vc-voters__top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.vc-voters__change-booth {
  margin-left: auto;
  white-space: nowrap;
}

/* Current Booth banner — compact card with ID - Name */
.vc-voters__booth-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--vc-bg-glass);
  border: 1px solid var(--vc-border);
  border-left: 4px solid var(--vc-primary);
  border-radius: var(--vc-radius);
}
.vc-voters__booth-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--vc-text-muted);
  flex-shrink: 0;
}
.vc-voters__booth-value {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--vc-text-high);
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-wrap: wrap;
}
.vc-voters__booth-id {
  font-size: 16px;
  font-weight: 800;
  color: var(--vc-primary);
  font-variant-numeric: tabular-nums;
}
.vc-voters__booth-sep { color: var(--vc-text-muted); }
.vc-voters__booth-name {
  color: var(--vc-text-high);
  font-weight: 500;
  font-size: 13.5px;
  /* Allow long names like "UPPER PRIMARY SCHOOL ROOM NO. 1 RAHNA"
     to wrap to 2 lines max with ellipsis */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  word-break: break-word;
}

/* Stats — explicit 3-col grid that holds at every width */
.vc-voters__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.vc-voters__stat {
  background: var(--vc-bg-glass);
  border: 1px solid var(--vc-border);
  border-radius: var(--vc-radius);
  padding: 10px 8px;
  text-align: center;
  min-width: 0;
}
.vc-voters__stat-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--vc-text-high);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vc-voters__stat-lbl {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--vc-text-muted);
  margin-top: 2px;
}
.vc-voters__stat--paid .vc-voters__stat-val { color: var(--vc-success); }
.vc-voters__stat--free .vc-voters__stat-val { color: var(--vc-warning); }
.vc-voters__stat--cta {
  padding: 0;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  background: transparent;
  border: 0;
}
.vc-voters__stat--cta > * { flex: 1 1 auto; width: 100%; }
.vc-voters__stat--cta button,
.vc-voters__stat--cta a {
  width: 100%;
  height: 100%;
  border-radius: var(--vc-radius);
}

@media (max-width: 380px) {
  .vc-voters__stat-val { font-size: 16px; }
  .vc-voters__stat-lbl { font-size: 9.5px; }
  .vc-voters__booth-banner { padding: 8px 12px; gap: 8px; }
  .vc-voters__booth-name { font-size: 12.5px; }
}

/* ---------- Voter card — legacy-inspired booth-header + icons + banner layout ---------- */
.vc-vcard {
  display: block;
  background: var(--vc-bg-glass);
  border: 1px solid var(--vc-border);
  border-radius: 14px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.vc-vcard:focus-visible { outline: 2px solid var(--vc-primary); outline-offset: 2px; }
.vc-vcard:hover { border-color: var(--vc-primary); }

.vc-vcard__top {
  background: var(--vc-bg-surface);
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--vc-border);
}
.vc-vcard__booth {
  text-align: center;
  font-size: 14px;
  color: var(--vc-primary);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
  /* Allow long booth names to wrap cleanly */
  display: block;
  word-break: break-word;
  line-height: 1.3;
}
.vc-vcard__booth-name {
  color: var(--vc-text-muted);
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: 0;
}
.vc-vcard__icons {
  display: flex;
  justify-content: space-around;
  gap: 8px;
  flex-wrap: wrap;
}
.vc-vcard__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--vc-bg-elevated);
  border: 1px solid var(--vc-border);
  color: #fff;
  font-size: 18px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms ease, filter 120ms ease;
}
.vc-vcard__icon:active { transform: translateY(1px); }
.vc-vcard__icon:hover { filter: brightness(1.15); }
.vc-vcard__icon--phone { background: #2196f3; }   /* blue */
.vc-vcard__icon--sms   { background: #f97316; }   /* orange envelope */
.vc-vcard__icon--wa    { background: #25d366; }   /* WhatsApp green */
.vc-vcard__icon--mail  { background: #fbbc05; color: #2a1a00; }
.vc-vcard__icon--rel   { background: #ff8c00; color: #fff; }
.vc-vcard__icon--loc   { background: #10b981; }  /* location green */
.vc-vcard__icon--email { background: #f59e0b; color: #2a1a00; }
.vc-vcard__icon--info     { background: #6366f1; cursor: default; }  /* display-only indicator */
.vc-vcard__icon--religion { background: #f59e0b; }                    /* religion saffron */
.vc-vcard__icon--party    { background: #6366f1; }                    /* party indigo */
.vc-vcard__icon--gender.vc-vcard__icon--male   { background: #3b82f6; }  /* male blue */
.vc-vcard__icon--gender.vc-vcard__icon--female { background: #ec4899; }  /* female pink */
.vc-vcard__icon--gender.vc-vcard__icon--other  { background: #8b5cf6; }  /* other purple */
.vc-vcard__icon { overflow: hidden; padding: 0; }
.vc-vcard__icon svg { width: 22px; height: 22px; display: block; }
.vc-vcard__icon img { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: 50%; }
.vc-vcard__icon--religion, .vc-vcard__icon--party, .vc-vcard__icon--gender,
.vc-vcard__icon--img { background: #fff; }
.vc-vcard__icon--img img { object-fit: cover; padding: 0; }
.vc-vcard__icon--off   {
  background: transparent;
  border-style: dashed;
  color: var(--vc-text-muted);
  filter: none;
  cursor: default;
}

/* Bootstrap-icon action buttons (SMS, Location, Email) */
.vc-vcard__ibtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  color: #fff; font-size: 17px; text-decoration: none;
  transition: filter .15s, transform .1s;
}
.vc-vcard__ibtn:hover  { filter: brightness(1.2); }
.vc-vcard__ibtn:active { transform: translateY(1px); }
.vc-vcard__ibtn--gmap {
  background: #34a853; border: none; cursor: pointer; padding: 0;
  color: #fff; font-size: 17px;
}
.vc-vcard__ibtn--off {
  background: transparent; border: 1.5px dashed var(--vc-border);
  color: var(--vc-text-muted); cursor: default; font-size: 15px;
}
.vc-vcard__ibtn--off:hover { filter: none; }

/* ---- Name banner (the blue stripe with white text) ---- */
.vc-vcard__name {
  display: block;
  width: 100%;
  padding: 12px 14px;
  background: linear-gradient(120deg, var(--vc-primary), var(--vc-accent));
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  border: 0;
  cursor: pointer;
  text-transform: uppercase;
}
.vc-vcard__name:hover { filter: brightness(1.05); }
.vc-vcard__name-sub {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  opacity: 0.92;
}

/* ---- Detail rows ---- */
.vc-vcard__body {
  padding: 12px 14px 4px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--vc-text-high);
}
.vc-vcard__row { margin-bottom: 6px; }
.vc-vcard__row strong { color: var(--vc-text-high); font-weight: 700; }

/* ---- Phone field: view → edit → save flow ---- */
.vc-vcard__phone {
  padding: 8px 14px 8px;
  border-top: 1px dashed var(--vc-border);
}
.vc-vcard__phone-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--vc-text-muted);
  margin-bottom: 4px;
}

/* View mode: number + Edit button */
.vc-vcard__phone-display {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--vc-bg-surface);
  border: 1px solid var(--vc-border);
  border-radius: var(--vc-radius);
}
.vc-vcard__phone-value {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: var(--vc-text-high);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.vc-vcard__phone-value--empty {
  color: var(--vc-text-muted);
  font-weight: 400;
  font-style: italic;
}
.vc-vcard__phone-edit {
  background: transparent;
  border: 1px solid var(--vc-border);
  color: var(--vc-primary);
  border-radius: var(--vc-radius);
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
}
.vc-vcard__phone-edit:hover {
  border-color: var(--vc-primary);
  background: var(--vc-primary-soft);
}

/* Edit mode: input + Save + Cancel */
.vc-vcard__phone-row {
  display: flex;
  gap: 6px;
  align-items: center;
}
.vc-vcard__phone-input {
  flex: 1;
  min-width: 0;
  background: var(--vc-bg-surface);
  border: 1px solid var(--vc-primary);
  border-radius: var(--vc-radius);
  color: var(--vc-text-high);
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  box-shadow: 0 0 0 2px var(--vc-primary-soft);
}
.vc-vcard__phone-input:focus {
  outline: none;
  border-color: var(--vc-primary);
}
.vc-vcard__phone-save {
  background: var(--vc-primary);
  color: #fff;
  border: 0;
  border-radius: var(--vc-radius);
  padding: 0 14px;
  height: 38px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
  transition: filter 120ms ease;
}
.vc-vcard__phone-save:hover:not(:disabled) { filter: brightness(1.1); }
.vc-vcard__phone-save:disabled {
  background: var(--vc-bg-elevated);
  color: var(--vc-text-muted);
  cursor: default;
}
.vc-vcard__phone-cancel {
  background: transparent;
  color: var(--vc-text-muted);
  border: 1px solid var(--vc-border);
  border-radius: var(--vc-radius);
  padding: 0 12px;
  height: 38px;
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  flex-shrink: 0;
}
.vc-vcard__phone-cancel:hover { color: var(--vc-text-high); border-color: var(--vc-text-muted); }

/* Notification toast under the field */
.vc-vcard__phone-toast {
  margin-top: 6px;
  padding: 6px 10px;
  background: color-mix(in srgb, var(--vc-success) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--vc-success) 35%, transparent);
  border-radius: var(--vc-radius);
  color: var(--vc-success);
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
  animation: vc-fade-in 180ms ease;
}
@keyframes vc-fade-in {
  from { opacity: 0; transform: translateY(-3px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Compact voter card (.vc-vc2) — phone-book row + expand.
   ============================================================ */
.vc-vc2 {
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015));
  border: 1px solid var(--vc-border);
  border-radius: 16px;
  margin-bottom: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
  transition: border-color .15s ease, box-shadow .15s ease, transform .12s ease;
}
.vc-vc2:hover { border-color: rgba(124,77,255,.5); box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.vc-vc2--open { border-color: var(--vc-primary); box-shadow: 0 8px 22px rgba(0,0,0,.4); }

.vc-vc2__head { display: flex; align-items: stretch; gap: 12px; padding: 12px 14px; }
.vc-vc2__main { flex: 1; min-width: 0; }

/* Left avatar — photo or gender-tinted initials */
.vc-vc2__avatar {
  flex-shrink: 0; width: 52px; height: 52px; border-radius: 50%;
  border: 2px solid var(--vc-border); overflow: hidden; padding: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,.3);
  background: rgba(255,255,255,.05);
}
.vc-vc2__avatar img { width: 100%; height: 100%; object-fit: cover; }
.vc-vc2__avatar-ini { font-size: 16px; font-weight: 800; letter-spacing: .02em; }
.vc-vc2__avatar--male   { border-color: #5b8def; background: rgba(91,141,239,.16); }
.vc-vc2__avatar--male   .vc-vc2__avatar-ini { color: #5b8def; }
.vc-vc2__avatar--female { border-color: #ff6fa3; background: rgba(233,30,99,.16); }
.vc-vc2__avatar--female .vc-vc2__avatar-ini { color: #ff6fa3; }
.vc-vc2__avatar--other  { border-color: #b794f6; background: rgba(139,92,246,.16); }
.vc-vc2__avatar--other  .vc-vc2__avatar-ini { color: #b794f6; }

/* Row 1 — name */
.vc-vc2__name {
  display: block; width: 100%; text-align: left; background: none; border: none; padding: 0;
  color: var(--vc-text-high); font-family: inherit; font-size: 16px; font-weight: 800;
  line-height: 1.2; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vc-vc2__name-sub { font-weight: 500; font-size: 13px; color: var(--vc-text-muted); margin-left: 4px; }

/* Row 2 — cast · gender · age chips */
.vc-vc2__meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.vc-vc2__chip {
  font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 10px;
  background: rgba(255,255,255,.05); color: var(--vc-text-muted);
}
.vc-vc2__chip--male   { background: rgba(91,141,239,.16); color: #5b8def; }
.vc-vc2__chip--female { background: rgba(233,30,99,.16);  color: #ff6fa3; }
.vc-vc2__chip--other  { background: rgba(139,92,246,.16); color: #b794f6; }
.vc-vc2__chip--srno   {
  background: rgba(124,77,255,.14);
  color: var(--vc-primary);
  border: 1px solid rgba(124,77,255,.40);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}

/* Row 3 wrapper — stretches back under the avatar (avatar 52 + head gap 12 = 64)
   so the separate Expand circle lands under the avatar, and the pill takes the
   remaining horizontal space to its right. */
.vc-vc2__row3 { display: flex; align-items: center; gap: 10px; margin: 10px 4px 0 -64px; }

/* Phone pill — number + Edit only (Expand is now a separate sibling) */
.vc-vc2__phone {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 8px;
  padding: 5px 6px 5px 14px;
  border: 1px solid var(--vc-border); border-radius: 999px;
  background: rgba(255,255,255,.025);
}
.vc-vc2__ph-val {
  flex: 1; min-width: 0;
  font-size: 15px; font-weight: 800; letter-spacing: .3px;
  font-variant-numeric: tabular-nums; color: var(--vc-text-high);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.vc-vc2__ph-val--empty { font-size: 13px; font-weight: 600; font-style: italic; letter-spacing: 0; color: var(--vc-text-muted); }
/* Expand circle — separate sibling of the pill, lands under the avatar.
   Matches the Call/WhatsApp button size (38px) so all 3 read as one set. */
.vc-vc2__ph-exp {
  flex: none; width: 38px; height: 38px; margin-left: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(124,77,255,.18);
  border: 1.5px solid rgba(124,77,255,.55);
  color: var(--vc-primary);
  font-family: inherit; font-size: 16px; font-weight: 700; line-height: 1;
  cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.3);
  transition: background .15s ease, border-color .15s ease, transform .12s ease;
}
.vc-vc2__ph-exp:hover { background: rgba(124,77,255,.30); border-color: var(--vc-primary); transform: scale(1.06); }
.vc-vc2 .vc-vc2__ph-exp[aria-expanded="True"] { background: var(--vc-primary); color: #fff; border-color: var(--vc-primary); }
.vc-vc2__ph-edit {
  flex: none; display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 12px; border-radius: 999px;
  background: rgba(124,77,255,.14); border: 1px solid rgba(124,77,255,.45);
  color: var(--vc-primary); font-family: inherit; font-size: 12.5px; font-weight: 700;
  cursor: pointer; transition: background .15s ease, border-color .15s ease;
}
.vc-vc2__ph-edit:hover { background: rgba(124,77,255,.22); border-color: rgba(124,77,255,.65); }
.vc-vc2__ph-edit-ico { font-size: 12px; line-height: 1; transform: translateY(.5px); }
.vc-vc2__ph-input {
  flex: 1; min-width: 0; padding: 5px 10px; font-size: 14px; font-weight: 700;
  font-family: inherit; font-variant-numeric: tabular-nums;
  background: var(--vc-bg-base); border: 1px solid var(--vc-border); border-radius: 999px; color: var(--vc-text-high);
}
.vc-vc2__ph-input:focus { outline: none; border-color: var(--vc-primary); box-shadow: 0 0 0 3px var(--vc-primary-soft); }
.vc-vc2__ph-save { flex: none; background: var(--vc-primary); color: #fff; border: none; border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 700; font-family: inherit; cursor: pointer; }
.vc-vc2__ph-save:disabled { opacity: .6; cursor: default; }
.vc-vc2__ph-cancel {
  flex: none; min-width: 44px; min-height: 44px; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.06); color: var(--vc-text-muted);
  border: 1px solid var(--vc-border); border-radius: 999px; font-family: inherit; font-size: 11px; cursor: pointer;
}
.vc-vc2__toast { margin: 5px 0 0; font-size: 12px; font-weight: 600; color: var(--vc-success); padding-left: 12px; }

/* Compact buttons — call + expand */
.vc-vc2__btns { display: flex; flex-direction: column; gap: 6px; justify-content: space-between; flex-shrink: 0; }
.vc-vc2__cbtn {
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: 17px; border: 1px solid var(--vc-border);
  background: rgba(255,255,255,.04); color: var(--vc-text-high); text-decoration: none; cursor: pointer;
}
.vc-vc2__cbtn--call {
  background: linear-gradient(180deg, #4FC3F7 0%, #29B6F6 35%, #1E88E5 70%, #1565C0 100%);
  border-color: transparent; color: #fff;
  box-shadow: 0 3px 10px rgba(21,101,192,.45), inset 0 1px 1px rgba(255,255,255,.25);
}
.vc-vc2__cbtn--call:hover { filter: brightness(1.06); }
.vc-vc2__cbtn--wa   { background: #25d366; border-color: transparent; color: #fff; }
.vc-vc2__cbtn--exp { font-size: 12px; }
.vc-vc2__cbtn--off { opacity: .35; cursor: default; }
.vc-vc2__cbtn-svg  { width: 18px; height: 18px; display: block; }

/* Expanded detail */
.vc-vc2__detail { padding: 0 12px 12px; border-top: 1px solid var(--vc-border); }
.vc-vc2__booth { font-size: 12.5px; color: var(--vc-primary); font-weight: 600; padding: 10px 0 8px; }
.vc-vc2__icons { display: flex; gap: 10px; margin-bottom: 10px; }
.vc-vc2__icon {
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1px solid var(--vc-border); background: rgba(255,255,255,.04);
  font-size: 17px; color: var(--vc-text-high); text-decoration: none;
}
.vc-vc2__icon--male { color: #5b8def; } .vc-vc2__icon--female { color: #ff6fa3; } .vc-vc2__icon--other { color: #b794f6; }
.vc-vc2__rows { display: grid; gap: 4px; font-size: 13.5px; color: var(--vc-text-high); margin-bottom: 12px; }
.vc-vc2__rows strong { color: var(--vc-text-muted); font-weight: 600; }

/* ---- Action-button footer (8 buttons → 4×2 grid) ---- */
.vc-vcard__actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 10px 12px;
  border-top: 1px dashed var(--vc-border);
}
.vc-vcard__section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--vc-primary);
  padding: 6px 2px 2px;
}
.vc-vcard__section-label:first-child { padding-top: 0; }
.vc-vcard__action-group {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.vc-vcard__action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 4px;
  background: transparent;
  border: 1px solid var(--vc-border);
  border-radius: var(--vc-radius);
  color: var(--vc-text-high);
  font-size: 10.5px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
  min-height: 56px;
}
.vc-vcard__action:hover { border-color: var(--vc-primary); background: var(--vc-bg-surface); }
.vc-vcard__action:active { transform: translateY(1px); }
.vc-vcard__action > :first-child { font-size: 18px; line-height: 1; }
.vc-vcard__action > :last-child {
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Highlighted variant — primary tint background to call out Overview/Analysis */
.vc-vcard__action--accent {
  background: color-mix(in srgb, var(--vc-primary) 10%, transparent);
  border-color: color-mix(in srgb, var(--vc-primary) 40%, var(--vc-border));
}
.vc-vcard__action--accent:hover {
  background: color-mix(in srgb, var(--vc-primary) 18%, transparent);
  border-color: var(--vc-primary);
}

/* Tighten on very narrow screens — keep 4 columns but trim padding */
@media (max-width: 380px) {
  .vc-vcard__actions { gap: 3px; padding: 8px 8px 10px; }
  .vc-vcard__action-group { gap: 4px; }
  .vc-vcard__action { padding: 8px 2px; font-size: 9.5px; min-height: 48px; }
  .vc-vcard__action > :first-child { font-size: 16px; }
}

/* ---------- Dashboard layout — sectioned tile grid ---------- */
.vc-dash__hero {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 16px;
  margin: 8px 0 4px;
  border-radius: var(--vc-radius-lg);
  background:
    radial-gradient(120% 80% at 0% 0%,
      color-mix(in srgb, var(--vc-primary) 22%, transparent), transparent 60%),
    radial-gradient(120% 80% at 100% 100%,
      color-mix(in srgb, var(--vc-accent) 18%, transparent), transparent 60%),
    var(--vc-bg-glass);
  border: 1px solid var(--vc-border);
}
.vc-dash__greet-hi {
  font-size: 18px;
  font-weight: 700;
  color: var(--vc-text-high);
}
.vc-dash__greet-ac {
  font-size: 13px;
  color: var(--vc-text-muted);
  margin-top: 2px;
}
.vc-dash__greet-ac strong { color: var(--vc-primary); }

/* Stats inside hero — 3-col compact tiles */
.vc-dash__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.vc-dash__stat {
  background: var(--vc-bg-surface);
  border: 1px solid var(--vc-border);
  border-radius: var(--vc-radius);
  padding: 10px 8px;
  text-align: center;
}
.vc-dash__stat-val {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
  background: linear-gradient(120deg, var(--vc-primary), var(--vc-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.vc-dash__stat-lbl {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--vc-text-muted);
  margin-top: 2px;
}

/* Sections */
.vc-dash__section { margin: 22px 0 4px; }
.vc-dash__section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--vc-text-muted);
  margin: 0 0 10px;
}
.vc-dash__section-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--vc-primary);
}
.vc-dash__section-dot[data-tone="accent"]  { background: var(--vc-accent); }
.vc-dash__section-dot[data-tone="success"] { background: var(--vc-success); }
.vc-dash__section-dot[data-tone="muted"]   { background: var(--vc-text-muted); }

/* 2-col tile grid; auto-fills as space allows */
.vc-dash__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 540px) {
  .vc-dash__grid { grid-template-columns: repeat(3, 1fr); }
}

.vc-dash__tile {
  display: block;
  background: var(--vc-bg-glass);
  border: 1px solid var(--vc-border);
  border-radius: var(--vc-radius-lg);
  padding: 14px 12px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}
.vc-dash__tile:hover,
.vc-dash__tile:focus-visible {
  transform: translateY(-2px);
  border-color: var(--vc-primary);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--vc-primary) 18%, transparent);
}
.vc-dash__tile-icon {
  font-size: 22px;
  line-height: 1;
  margin-bottom: 6px;
}
.vc-dash__tile-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--vc-text-high);
  line-height: 1.25;
}
.vc-dash__tile-sub {
  font-size: 11.5px;
  color: var(--vc-text-muted);
  margin-top: 3px;
  line-height: 1.35;
}

/* Highlighted tiles per section */
.vc-dash__tile--primary {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--vc-primary) 20%, var(--vc-bg-glass)),
    var(--vc-bg-glass));
  border-color: color-mix(in srgb, var(--vc-primary) 40%, var(--vc-border));
}
.vc-dash__tile--accent {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--vc-accent) 18%, var(--vc-bg-glass)),
    var(--vc-bg-glass));
  border-color: color-mix(in srgb, var(--vc-accent) 40%, var(--vc-border));
}

/* Touch refinement */
@media (hover: none) and (pointer: coarse) {
  .vc-dash__tile:hover { transform: none; box-shadow: none; }
}

/* ---------- Bootstrap5 mb-* shim (we keep Bootstrap loaded but theme-tune the values) ---------- */
.mb-1 { margin-bottom: 4px !important; }
.mb-2 { margin-bottom: 8px !important; }
.mb-3 { margin-bottom: 12px !important; }
.mb-4 { margin-bottom: 16px !important; }
.mb-5 { margin-bottom: 24px !important; }

/* ---------- Slips (DV-01 — SPEC §10.1 Slips/) ---------- */

/* Card grid that renders one printable slip per recipient. The grid auto-fills
 * down to 220px cards on small viewports and lays out 3-up on desktop. */
.vc-slip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.vc-slip-card {
  border: 1px solid var(--vc-border);
  border-radius: var(--vc-radius);
  padding: 12px 14px;
  background: var(--vc-bg-glass);
}
.vc-slip-card__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}
.vc-slip-card__row {
  display: flex;
  gap: 8px;
  font-size: 13px;
  margin-top: 2px;
}
.vc-slip-card__label {
  color: var(--vc-text-muted);
  min-width: 56px;
}

/* Lightweight HTML table used on the delivery list — borrowing the glass
 * background so it doesn't fight the rest of the card chrome. */
.vc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.vc-table th,
.vc-table td {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--vc-border);
}
.vc-table thead th {
  font-weight: 600;
  color: var(--vc-text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Print mode: hide chrome (top bar, drawer, toolbars, delivery table) and let
 * the slip grid flow naturally. Layout shell adds these print rules in tandem. */
@media print {
  .vc-no-print { display: none !important; }
  .vc-slip-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .vc-slip-card {
    page-break-inside: avoid;
  }
}

/* =====================================================
/* ---------- Pager card (Voters tab) — round nav buttons + jump-to-page input ---------- */
.vc-pager-card {
  background: var(--vc-bg-glass);
  border: 1px solid var(--vc-border);
  border-radius: var(--vc-radius);
  padding: 12px 14px;
  display: grid;
  gap: 8px;
}
.vc-pager-card__row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.vc-pager-card__nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--vc-border);
  background: var(--vc-bg-elevated);
  color: var(--vc-text-high);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
}
.vc-pager-card__nav:hover:not(:disabled) {
  background: rgba(91, 141, 239, 0.16);
  border-color: var(--vc-primary);
}
.vc-pager-card__nav:disabled {
  opacity: 0.35;
  cursor: default;
}
.vc-pager-card__jump {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
}
.vc-pager-card__input {
  width: 54px;
  height: 36px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid var(--vc-border);
  background: var(--vc-bg-elevated);
  color: var(--vc-text-high);
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
  appearance: textfield;
}
.vc-pager-card__input::-webkit-outer-spin-button,
.vc-pager-card__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.vc-pager-card__input:focus {
  outline: none;
  border-color: var(--vc-primary);
  box-shadow: 0 0 0 2px rgba(91, 141, 239, 0.25);
}
.vc-pager-card__total {
  font-size: 13px;
  color: var(--vc-text-muted);
  font-variant-numeric: tabular-nums;
}
.vc-pager-card__info {
  text-align: center;
  font-size: 12px;
  color: var(--vc-text-muted);
}
.vc-pager-card__go {
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--vc-primary);
  background: linear-gradient(120deg, var(--vc-primary), var(--vc-accent));
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.vc-pager-card__go:hover:not(:disabled) { filter: brightness(1.12); }
.vc-pager-card__go:disabled { opacity: 0.35; cursor: default; filter: none; }
.vc-voters__stat-of {
  font-size: 13px;
  font-weight: 600;
  color: var(--vc-text-muted);
  margin-left: 2px;
}

/* ---------- Voter Page Header (shared across all /voters/{section} pages) ---------- */
.vc-vph {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 8px; /* shorter — .vc-voter-body padding-top adds the rest */
}
/* Top strip — back button + crumb. Lifted onto a glassy mini-card so it
 * reads as intentional app chrome instead of two stray elements. */
.vc-vph__topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border: 1px solid var(--vc-border);
  border-radius: 14px;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--vc-bg-elevated) 80%, transparent),
    var(--vc-bg-glass));
  box-shadow: 0 6px 14px -10px rgba(0, 0, 0, 0.55);
}
.vc-vph__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--vc-primary) 35%, var(--vc-border));
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--vc-primary) 18%, var(--vc-bg-elevated)),
    var(--vc-bg-elevated));
  color: var(--vc-text-high);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 4px 10px -6px color-mix(in srgb, var(--vc-primary) 60%, transparent),
              inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
  -webkit-tap-highlight-color: transparent;
}
.vc-vph__back:active { transform: translateY(1px); }
@media (hover: hover) and (pointer: fine) {
  .vc-vph__back:hover {
    border-color: var(--vc-primary);
    box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--vc-primary) 70%, transparent);
  }
}
.vc-vph__crumb {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  color: var(--vc-text-muted);
  font-variant-numeric: tabular-nums;
}
.vc-vph__crumb-id { color: var(--vc-primary); font-weight: 700; }
.vc-vph__crumb-name { color: var(--vc-text-high); font-weight: 600; }

/* Gradient name banner */
.vc-vph__banner {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-radius: 12px;
  background: linear-gradient(120deg, var(--vc-primary), var(--vc-accent));
  color: #fff;
  text-align: center;
}
.vc-vph__banner-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.vc-vph__banner-sub {
  font-size: 14px;
  font-weight: 500;
  opacity: 0.92;
}

/* Detail rows — card-styled identity panel rendered on every voter sub-page */
.vc-vph__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
}
.vc-vph__body-title {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--vc-text-muted);
  margin-bottom: 6px;
}
.vc-vph__row {
  font-size: 14px;
  line-height: 1.4;
  color: var(--vc-text-high);
}
.vc-vph__row strong { font-weight: 700; }

/* Sectioned tile grid — wrapped in a panel that visually flows into the
 * body content below (no harsh dark gap between nav and the first card). */
.vc-vph__nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
  padding: 10px 10px 12px;
  border: 1px solid var(--vc-border);
  border-radius: 14px;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--vc-bg-elevated) 70%, transparent),
    transparent 95%);
  position: relative;
}
/* Soft connector — a faint divider/notch under the nav grid pointing
 * into the body, so the nav reads as the "header" of the content below. */
.vc-vph__nav::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%) rotate(45deg);
  width: 10px; height: 10px;
  background: color-mix(in srgb, var(--vc-primary) 24%, var(--vc-bg-elevated));
  border-right: 1px solid var(--vc-border);
  border-bottom: 1px solid var(--vc-border);
  border-bottom-right-radius: 2px;
}

/* Section pill row (top) — one row of 4 toggles. Active = elevated, others
   sit on the muted track background. Tapping a pill just swaps the tab row
   below, it does NOT navigate. */
.vc-vph__pillrow {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--vc-bg-glass);
  border: 1px solid var(--vc-border);
  border-radius: 999px;
}
.vc-vph__pill {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--vc-text-muted);
  padding: 6px 4px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
  transition: background 120ms ease, color 120ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .vc-vph__pill:hover { color: var(--vc-text-high); }
}
.vc-vph__pill { -webkit-tap-highlight-color: transparent; }
.vc-vph__pill:focus,
.vc-vph__pill:focus-visible { outline: none; }
.vc-vph__pill--active {
  background: var(--vc-bg-elevated);
  color: var(--vc-text-high);
  box-shadow: 0 0 0 1px var(--vc-primary);
}

/* The old per-section vertical stack — kept the classes around in case
   anything else uses them, but the header no longer renders them. */
.vc-vph__nav-section { display: flex; flex-direction: column; gap: 5px; }
.vc-vph__nav-label {
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--vc-primary);
  font-weight: 800;
  padding: 0 2px;
}
.vc-vph__nav-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.vc-vph__nav-tile {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 4px;
  border-radius: 7px;
  border: 1px solid var(--vc-border);
  background: var(--vc-bg-elevated);
  color: var(--vc-text-high);
  text-decoration: none;
  font-size: 10.5px;
  font-weight: 600;
  text-align: center;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
  min-height: 28px;
}
/* Pointer-only hover — on touch devices the WebView leaves a sticky
 * hover state on the last-tapped tile, which then looks identical to
 * the --active tile and makes two tabs appear selected at once. */
@media (hover: hover) and (pointer: fine) {
  .vc-vph__nav-tile:hover {
    border-color: var(--vc-primary);
    background: rgba(91, 141, 239, 0.08);
    transform: translateY(-1px);
  }
}
.vc-vph__nav-tile:focus,
.vc-vph__nav-tile:focus-visible {
  outline: none;
}
.vc-vph__nav-tile { -webkit-tap-highlight-color: transparent; }
/* Lock visited / link color states to the normal tile color — browsers
 * default :visited to purple/red, which made tabs the user had opened
 * before (e.g. "Beneficiary") look highlighted while another tab was
 * actually active. */
.vc-vph__nav-tile,
.vc-vph__nav-tile:link,
.vc-vph__nav-tile:visited {
  color: var(--vc-text-high);
  text-decoration: none;
}
.vc-vph__nav-tile--active {
  border-color: #2ecc71;
  background: linear-gradient(135deg,
    color-mix(in srgb, #2ecc71 32%, var(--vc-bg-elevated)),
    color-mix(in srgb, #2ecc71 10%, var(--vc-bg-elevated)));
  box-shadow: 0 4px 14px -6px rgba(46, 204, 113, 0.55);
  color: #ffffff;
}
.vc-vph__nav-icon { font-size: 13px; line-height: 1; }
.vc-vph__nav-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* ---------- Voter detail body wrapper ----------
 * Adds breathing room around each /voters/{section} page so the section
 * cards don't sit flush to the screen edges (mobile WebView default).
 * Padding-top deliberately small so the nav-grid above feels visually
 * connected to the first body card. */
.vc-voter-body {
  padding: 8px 12px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.vc-voter-body > * + * { margin-top: 0; }
@media (min-width: 480px) {
  .vc-voter-body { padding: 10px 16px 32px; gap: 16px; }
}

/* ---------- Key-Value Table (2-col bordered) ---------- */

.vc-kv-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.vc-kv-table col { width: 50%; }
.vc-kv-table td {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, .1);
  word-wrap: break-word;
  overflow-wrap: break-word;
  font-size: 14px;
  line-height: 1.4;
}
.vc-kv-table .vc-kv-label {
  font-size: 12px;
  color: var(--vc-muted);
}

/* ---------- Stat cards ---------- */

.vc-stat-card {
  background: var(--vc-surface, rgba(255,255,255,0.04));
  border: 1px solid var(--vc-border);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}
.vc-stat-card__value {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}
.vc-stat-card__label {
  font-size: 11px;
  color: var(--vc-muted);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ---------- Progress bar ---------- */

.vc-progress-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--vc-border);
  overflow: hidden;
}
.vc-progress-bar__fill {
  height: 100%;
  border-radius: 3px;
  background: var(--vc-primary, #6366f1);
  transition: width 0.3s ease;
}

/* ---------- Booth Analytics — grouped section cards (ba-*) ---------- */
.ba-section {
    margin-top: 14px;
    padding: 16px 14px 14px;
    background: linear-gradient(145deg, color-mix(in srgb, var(--sec) 8%, transparent) 0%, rgba(0,0,0,0) 100%),
                var(--vc-bg-surface, #161b22);
    border: 1px solid color-mix(in srgb, var(--sec) 25%, var(--vc-border, #30363d));
    border-radius: 18px;
    box-shadow: 0 0 30px color-mix(in srgb, var(--sec) 5%, transparent) inset, 0 2px 6px rgba(0,0,0,.2);
}
.ba-section__head { display:flex; align-items:center; gap:12px; margin-bottom:14px; }
.ba-section__icon { font-size:28px; color:var(--sec); }
.ba-section__title { font-size:16px; font-weight:800; color:var(--vc-text-high,#e6edf3); margin:0; line-height:1.2; }
.ba-section__sub { font-size:11px; color:var(--vc-text-muted,#8b949e); margin:2px 0 0; font-weight:500; }
.ba-section__count {
    margin-left:auto; font-size:11px; font-weight:700;
    color:var(--vc-text-muted,#8b949e); background:rgba(255,255,255,.06);
    padding:2px 10px; border-radius:999px;
}
.ba-section__grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.ba-chip {
    position:relative; display:flex; flex-direction:column; align-items:center; gap:6px;
    padding:14px 6px 10px; text-decoration:none;
    background:linear-gradient(160deg, color-mix(in srgb, var(--chip) 10%, transparent), rgba(255,255,255,.02));
    border:1px solid color-mix(in srgb, var(--chip) 20%, var(--vc-border,#30363d));
    border-radius:14px; overflow:hidden;
    transition:transform .15s, border-color .15s, box-shadow .15s;
}
.ba-chip:hover { transform:translateY(-2px); border-color:var(--chip); box-shadow:0 6px 24px color-mix(in srgb, var(--chip) 20%, transparent); }
.ba-chip__glow {
    position:absolute; top:-18px; left:50%; transform:translateX(-50%);
    width:44px; height:44px;
    background:radial-gradient(circle, color-mix(in srgb, var(--chip) 12%, transparent), transparent 70%);
    border-radius:50%; pointer-events:none;
}
.ba-chip__icon { font-size:26px; color:var(--chip); z-index:1; }
.ba-chip__label { font-size:11.5px; font-weight:600; text-align:center; line-height:1.2; z-index:1; color:var(--vc-text-high,#e6edf3); }
.ba-chip__sub { font-size:9px; font-weight:500; color:var(--vc-text-muted,#8b949e); text-align:center; z-index:1; }
