/* ================================================================
   SIMULADOR PLRA 2026 — Mariano Roque Alonso
   Estilos principales — v2
   ================================================================ */

/* ── PANTALLA LOADING ───────────────────────────────────────────── */
.screen-loading.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #0d2137;
  color: #fff;
  gap: 20px;
}
.loading-spinner {
  width: 56px; height: 56px;
  border: 5px solid rgba(255,255,255,.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 18px; opacity: .8; }

/* ── RESET ──────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── BODY ───────────────────────────────────────────────────────── */
html, body {
  background: #ffffff;
  overflow: hidden;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
}

/* ── CANVAS PRINCIPAL 1366×768 ──────────────────────────────────── */
#app-canvas {
  width: 1366px;
  height: 768px;
  position: fixed;
  top: 0;
  left: 0;
  transform-origin: top left;
  background: #f0f0f0;
  overflow: hidden;
}

/* ── PANTALLAS ──────────────────────────────────────────────────── */
.screen {
  display: none;
  width: 1366px;
  height: 768px;
  flex-direction: column;
  position: absolute;
  top: 0;
  left: 0;
}
.screen.active { display: flex; }

/* ================================================================
   BARRA SUPERIOR — HEADER ELECCIÓN (pantallas de votación)
   Two-tone: logo cells (white) | gray info row + black title row
   ================================================================ */
.election-header {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  flex-shrink: 0;
  height: 80px;
}

/* Celdas laterales de logo — fondo blanco, altura completa */
.header-logo-cell {
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  flex-shrink: 0;
}
.header-logo {
  height: 62px;
  width: auto;
  object-fit: contain;
}
.header-logo-right {
  height: 52px;
  width: auto;
  object-fit: contain;
}

/* Centro: columna con fila gris (info) + fila negra (título) */
.header-center {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Fila superior gris — información de la elección */
.header-info-row {
  background: #888888;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 3px 12px;
  flex-shrink: 0;
}
.election-info {
  color: #111111;
  font-size: 11px;
  text-align: center;
  line-height: 1.4;
}
.election-info strong { font-size: 11.5px; }

/* Fila inferior negra — título de la categoría */
.header-title-row {
  background: #000000;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
}
.title-bar-main {
  font-size: 20px;
  font-weight: bold;
  color: #ffffff;
  letter-spacing: 0.4px;
  text-align: center;
}
.title-bar-sub {
  font-size: 13px;
  color: #ccd6e0;
  margin-top: 3px;
  text-align: center;
}

/* ================================================================
   BARRA DE ACCIÓN (inferior)
   ================================================================ */
.action-bar {
  height: 50px;
  background: #ffffff;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 10px;
  border-top: 1px solid #ddd;
  flex-shrink: 0;
}

/* ================================================================
   BOTONES BASE
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 18px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  border-radius: 3px;
  white-space: nowrap;
  user-select: none;
}
.btn:active { opacity: 0.85; }
.btn-dark   { background: #37474f; color: #ffffff; }
.btn-blue   { background: #1565c0; color: #ffffff; }
.btn-green  { background: #2e7d32; color: #ffffff; }
.btn-orange { background: #e65100; color: #ffffff; }

/* ================================================================
   FOTO CON FALLBACK SVG
   ================================================================ */
.photo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #eceff1;
  flex-shrink: 0;
}
.photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-wrap svg {
  width: 100%;
  height: 100%;
}

/* ================================================================
   PANTALLAS 1 / 1b / 1c — BIENVENIDA E INSTRUCCIONES
   ================================================================ */
#screen-bienvenida,
.intro-screen {
  background: #ffffff;
}

/* Header de bienvenida/intro */
.welcome-header {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid #e0e0e0;
  flex-shrink: 0;
  background: #ffffff;
}
.welcome-header-logo { height: 56px; width: auto; object-fit: contain; }
.welcome-header-title {
  font-size: 15px;
  font-weight: bold;
  color: #333333;
  text-align: center;
  flex: 1;
  padding: 0 16px;
}

/* Pantalla de bienvenida */
.welcome-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 20px;
}
.welcome-machine {
  height: 310px;
  max-width: 580px;
  object-fit: contain;
}
.welcome-title {
  font-size: 24px;
  font-weight: bold;
  color: #222222;
  text-align: center;
}
.btn-comenzar {
  height: 48px;
  padding: 0 50px;
  font-size: 18px;
  border-radius: 4px;
  margin-top: 6px;
}

/* ── PANTALLA ZONA ──────────────────────────────────────────────── */
.zona-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  padding: 24px 60px;
  overflow-y: auto;
}
.zona-title {
  font-size: 28px;
  font-weight: bold;
  color: #111111;
  text-align: center;
  flex-shrink: 0;
}
.zona-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
  width: 100%;
  max-width: 900px;
}
.zona-btn {
  background: #ffffff;
  border: 1px solid #cccccc;
  border-radius: 4px;
  padding: 18px 24px;
  font-size: 18px;
  font-family: Arial, Helvetica, sans-serif;
  color: #111111;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.zona-btn:hover {
  background: #f0f0f0;
  border-color: #999999;
}

/* Pantallas de instrucción (cedula, boletin) */
.intro-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 30px 60px;
}
.intro-graphic {
  max-height: 280px;
  max-width: 600px;
  object-fit: contain;
}
.intro-text {
  font-size: 19px;
  text-align: center;
  color: #333333;
  max-width: 720px;
  line-height: 1.55;
}
.btn-intro-continuar {
  height: 48px;
  padding: 0 50px;
  font-size: 17px;
  border-radius: 4px;
}

/* ================================================================
   ÁREA DE CANDIDATOS — SPLIT PANELS (pantallas 2 y 3)
   ================================================================ */

/* Contenedor general */
.candidates-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Fila horizontal de paneles */
.split-panels-row {
  flex: 1;
  display: flex;
  flex-direction: row;
  overflow: hidden;
}

/* Panel genérico — sin candidato */
.split-panel {
  flex: 1;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  border-right: 2px solid #d0d0d0;
  overflow: hidden;
}
.split-panel:last-child { border-right: none; }

/* El div contenedor generado por JS llena todo el panel */
.split-panel:not(.voto-blanco) > div:not(.junta-listas-grid) {
  display: flex;
  width: 100%;
  height: 100%;
}

/* Grid 2 columnas para SELECCIÓN de listas de junta (incluye BLC) */
.junta-listas-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  height: 100%;
}
.junta-listas-grid .lista-card {
  border: none;
  border-right: 2px solid #d0d0d0;
  border-bottom: 2px solid #d0d0d0;
  border-radius: 0;
  width: auto;
  height: auto;
}
.junta-listas-grid .lista-card:nth-child(2n) {
  border-right: none;
}
.junta-listas-grid .lista-card.lista-card-blc {
  font-size: 36px;
  font-weight: bold;
}

/* VOTO EN BLANCO como panel — centrado */
.split-panel.voto-blanco {
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: bold;
  color: #111111;
  cursor: pointer;
  background: #ffffff;
  border-left: 2px solid #d0d0d0;
  user-select: none;
  transition: background 0.15s;
}
.split-panel.voto-blanco:hover { background: #f5f5f5; }
.split-panel.voto-blanco.selected {
  outline: 3px solid #000000;
  outline-offset: -3px;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.12);
}

/* ================================================================
   CARD DE CANDIDATO A INTENDENTE
   ================================================================ */
.candidate-card {
  background: #ffffff;
  border: 2px solid #c0c7c0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  padding: 20px 24px;
  width: 100%;
  height: 100%;
  transition: border-color 0.15s, box-shadow 0.15s, opacity 0.15s;
  user-select: none;
}
.candidate-card:hover { border-color: #888; }
.candidate-card.selected {
  border: 3px solid #000000;
  box-shadow: 0 0 22px rgba(0, 0, 0, 0.35);
}
.candidate-card.dimmed { opacity: 0.45; }

/* Nombre del movimiento/lista (arriba del card) */
.card-list-name {
  font-size: 35px;
  font-weight: bold;
  text-align: center;
  color: #111111;
  line-height: 1.25;
}

/* Fila horizontal: foto a la izquierda, info de lista a la derecha */
.card-body-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 24px;
  width: 100%;
}

/* Foto del candidato dentro de card-body-row */
.card-photo-wrap {
  width: 200px;
  height: 250px;
  border-radius: 4px;
  flex-shrink: 0;
  background: #ffffff;
}
.card-photo-wrap img {
  object-fit: contain;
  object-position: center top;
}

/* Columna: LISTA / número / sigla */
.card-lista-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.card-lista-label {
  font-size: 50px;
    font-weight: bold;
    color: #111111;
    line-height: 1;
    display: block;
    text-align: center;
}
.card-lista-number {
  font-size: 96px;
  font-weight: bold;
  color: #111111;
  line-height: 1;
  display: block;
  text-align: center;
}
.card-sigla {
  font-size: 50px;
    font-weight: bold;
    color: #111111;
    line-height: 1;
    display: block;
    text-align: center;
}

/* Nombre del candidato (abajo del card) */
.card-candidate-name {
  font-size: 50px;
  color: #111111;
  font-weight: bold;
  text-align: center;
  line-height: 1.3;
}

/* ================================================================
   CARD DE LISTA (pantalla de selección Junta Municipal)
   ================================================================ */
.lista-card {
  background: #ffffff;
  border: 2px solid #c0c7c0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 30px;
  width: 100%;
  height: 100%;
  gap: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
  user-select: none;
}
.lista-card:hover { border-color: #888; }
.lista-card.selected {
  border: 3px solid #000000;
  box-shadow: 0 0 22px rgba(0, 0, 0, 0.35);
}
.lista-card .card-list-name { font-size: 22px; }
.lista-card .card-sigla     { font-size: 17px; }

/* Fila LISTA + número (dentro de lista-card) */
.lista-num-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* Tamaños de texto específicos para lista-card (más grandes que intendente) */
.lista-card .card-lista-label  { font-size: 28px; }
.lista-card .card-lista-number { font-size: 130px; line-height: 0.9; }
.lista-card .card-list-name    { font-size: 32px; }
.lista-card .card-sigla        { font-size: 22px; }

/* ================================================================
   GRILLA 4×3 — CANDIDATOS A JUNTA MUNICIPAL
   ================================================================ */
.junta-grid {
  flex: 1;
  display: grid;
  gap: 8px;
  padding: 10px 18px;
  overflow: hidden;
}

/* Layout idéntico al original exe:
   fila superior: foto (izq) | Opción N (der)
   fila inferior: nombre (ancho completo) */
.junta-card {
  background: #ffffff;
  border: 2px solid #c0c7c0;
  cursor: pointer;
  display: grid;
  grid-template-areas: "foto opcion" "nombre nombre";
  grid-template-columns: 1fr 1fr;
  grid-template-rows: minmax(50%, 2fr) 1fr;
  align-items: center;
  padding: 4px 6px;
  transition: border-color 0.15s, box-shadow 0.15s;
  user-select: none;
  overflow: hidden;
}
.junta-card:hover { border-color: #888; }
.junta-card.selected {
  border: 3px solid #000000;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}
.junta-card.dimmed { opacity: 0.4; }

/* Foto — ocupa área "foto" del grid */
.junta-card-photo {
  grid-area: foto;
  width: 100%;
  height: 100%;
  flex-shrink: unset;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
}
.junta-card-photo img {
  object-fit: contain !important;
  width: 100%;
  height: 100%;
}

/* "Opción N" — ocupa área "opcion" del grid */
.junta-card-option {
  grid-area: opcion;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  text-align: center;
  line-height: 1;
}
.opcion-word {
  font-size: 20px;
  color: #333333;
  font-weight: bold;
}
.opcion-num {
  font-size: 40px;
  font-weight: bold;
  color: #111111;
  line-height: 1;
}

/* Nombre del candidato — ocupa área "nombre", ancho completo */
.junta-card-name {
  grid-area: nombre;
  font-size: 20px;
  color: #111111;
  /* font-weight: bold; */
  text-align: center;
  line-height: 1.2;
  width: 100%;
}

/* Directorio Nacional: 6 columnas × 5 filas para 30 candidatos */
#screen-directorio-candidatos .junta-grid {
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(5, 1fr);
}

/* DCD lista: 2 columnas × 2 filas (3 listas + VOTO EN BLANCO) */
#screen-directorio-dpto-lista .directorio-grid {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
}

/* COM lista: 2 columnas × 1 fila (1 lista + VOTO EN BLANCO, ocupa todo) */
#screen-comite-lista .directorio-grid {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: 1fr;
}

/* Directorio Departamental candidatos: 2 columnas × 2 filas para 3 candidatos */
#screen-directorio-dpto-candidatos .junta-grid {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
}

/* Comité Local candidatos: 5 columnas × 3 filas para 13 candidatos */
#screen-comite-candidatos .junta-grid {
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(3, 1fr);
}

/* Header de la pantalla de candidatos junta:
   sub = "Lista N" (pequeño, arriba) → order:-1
   main = nombre del partido (grande, abajo) */
#screen-junta-candidatos .title-bar-main {
  font-size: 28px;
  order: 2;
}
#screen-junta-candidatos .title-bar-sub {
  order: 1;
  font-size: 15px;
  color: #cccccc;
  margin-top: 0;
  font-weight: normal;
}

/* ================================================================
   GRILLA DIRECTORIO NACIONAL — 4×2
   ================================================================ */
.directorio-grid {
  flex: 1;
  display: flex;
  padding: 10px 18px;
  overflow: hidden;
}
.directorio-grid-inner {
  display: grid;
  gap: 8px;
  width: 100%;
  height: 100%;
}

.directorio-card {
  background: #ffffff;
  border: 1px solid #c0c7c0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 8px;
  text-align: center;
  transition: background .15s;
  user-select: none;
  overflow: hidden;
}
.directorio-card:hover { background: #f5f5f5; }
.directorio-card.selected { outline: 3px solid #000; outline-offset: -3px; box-shadow: inset 0 0 20px rgba(0,0,0,.12); }

.directorio-card-num {
  font-size: 18px;
  font-weight: bold;
  color: #111;
  letter-spacing: .5px;
}
.directorio-card-num span {
  font-size: 72px;
  display: block;
  line-height: 1;
}
.directorio-card-nombre {
  font-size: 28px;
  font-weight: bold;
  color: #111;
  line-height: 1.2;
}
.directorio-card-sigla {
  font-size: 20px;
  color: #333;
}

/* CNV card — standalone flexbox, does NOT extend junta-card */
.cnv-card {
  background: #ffffff;
  border: 2px solid #c0c7c0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px;
  gap: 4px;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
  user-select: none;
}
.cnv-card:hover { border-color: #888; }
.cnv-card.selected {
  border: 3px solid #000000;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}
.cnv-card-blc {
  justify-content: center;
  font-size: 28px;
  font-weight: bold;
  min-height: 80px;
}
.cnv-agrup-name {
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  padding: 4px 6px;
  width: 100%;
}
.cnv-middle {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 0 8px;
}
.cnv-foto img {
  width: 90px;
  height: 110px;
  object-fit: cover;
}
.cnv-foto svg {
  width: 90px;
  height: 110px;
}
.cnv-lista-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.cnv-lista-label { font-size: 18px; font-weight: normal; }
.cnv-lista-num   { font-size: 52px; font-weight: bold; line-height: 1; }
.cnv-lista-sigla { font-size: 18px; }
.cnv-cand-name {
  font-size: 22px;
  color: #111111;
  text-align: center;
  line-height: 1.2;
  width: 100%;
}
.cnv-opcion {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  text-align: center;
  line-height: 1;
}
.cnv-opcion .opcion-word { font-size: 16px; }
.cnv-opcion .opcion-num  { font-size: 28px; }

.directorio-card.directorio-card-blc,
.lista-dpto-card.lista-dpto-card-blc {
  font-size: 32px;
  font-weight: bold;
  background: #f5f5f5;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.directorio-card-blanco {
  background: #f5f5f5;
  border: 1px solid #c0c7c0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: background .15s;
  user-select: none;
}
.directorio-card-blanco:hover { background: #e0e0e0; }
.directorio-card-blanco.selected { outline: 3px solid #000; outline-offset: -3px; }

/* Lista header inside candidatos screens (CND, etc.) */
.candidatos-lista-header {
  text-align: center;
  padding: 8px 16px 4px;
  border-bottom: 1px solid #ddd;
}
.candidatos-lista-num {
  font-size: 28px;
  font-weight: bold;
  color: #111;
}
.candidatos-lista-nombre {
  font-size: 32px;
  font-weight: bold;
  color: #111;
  line-height: 1.2;
}

/* ================================================================
   CARDS LISTA-DPTO — versión 2 columnas (DCD, COM)
   Igual estructura que directorio-card pero fuentes más grandes
   ================================================================ */
.lista-dpto-card {
  background: #ffffff;
  border: 1px solid #c0c7c0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 12px;
  text-align: center;
  transition: background .15s;
  user-select: none;
  overflow: hidden;
}
.lista-dpto-card:hover { background: #f5f5f5; }
.lista-dpto-card.selected { outline: 3px solid #000; outline-offset: -3px; box-shadow: inset 0 0 20px rgba(0,0,0,.12); }

.lista-dpto-card-num {
  font-size: 24px;
  font-weight: bold;
  color: #111;
  letter-spacing: .5px;
}
.lista-dpto-card-num span {
  font-size: 64px;
  display: block;
  line-height: 1;
}
.lista-dpto-card-nombre {
  font-size: 24px;
  font-weight: bold;
  color: #111;
  line-height: 1.2;
}
.lista-dpto-card-sigla {
  font-size: 20px;
  color: #333;
}

.lista-dpto-card-blanco {
  background: #f5f5f5;
  border: 1px solid #c0c7c0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: bold;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: background .15s;
  user-select: none;
}
.lista-dpto-card-blanco:hover { background: #e0e0e0; }
.lista-dpto-card-blanco.selected { outline: 3px solid #000; outline-offset: -3px; }

/* ================================================================
   GRILLA PRESIDENTE PLRA — 4×2
   ================================================================ */
.presidente-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 8px;
  padding: 10px 18px;
  overflow: hidden;
}

.presidente-card {
  background: #fff;
  border: 2px solid #c0c7c0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  padding: 4px 6px;
  transition: border-color .15s, box-shadow .15s;
  user-select: none;
  overflow: hidden;
}
.presidente-card:hover { border-color: #888; }
.presidente-card.selected { border: 3px solid #000; box-shadow: 0 0 10px rgba(0,0,0,.4); }
.presidente-card.dimmed { opacity: .4; }

.prp-card-title {
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  text-transform: uppercase;
  line-height: 1.2;
  padding: 2px 0 4px;
  flex-shrink: 0;
}

.prp-card-middle {
  display: flex;
  flex: 1;
  overflow: hidden;
  gap: 4px;
}

.prp-fotos {
  flex: 1;
  display: flex;
  gap: 3px;
  overflow: hidden;
}

.prp-foto {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
}
.prp-foto img { object-fit: contain; width: 100%; height: 100%; }
.prp-foto svg { width: 100%; height: 100%; }

.prp-lista-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  text-align: center;
  flex-shrink: 0;
  width: 48px;
}
.prp-lista-label { font-size: 11px; color: #555; }
.prp-lista-num   { font-size: 26px; color: #000; line-height: 1; }
.prp-lista-sigla { font-size: 10px; color: #333; }

.prp-card-names {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
  padding-top: 3px;
  border-top: 1px solid #ddd;
}

.prp-name-col {
    flex: 1;
    text-align: center;
    font-size: 12px;
    line-height: 1.2;
    overflow: hidden;
    word-break: break-word;
    font-weight: 700;
}
.prp-name-col strong { font-size: 10px; color: #666; display: block; }

.presidente-card-blanco {
  background: #f5f5f5;
  border: 2px solid #c0c7c0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: bold;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: background .15s;
  user-select: none;
}
.presidente-card-blanco:hover { background: #e0e0e0; }
.presidente-card-blanco.selected { border: 3px solid #000; background: #e8e8e8; }

/* ================================================================
   PANTALLA 5 — OPCIONES SELECCIONADAS
   ================================================================ */
.confirmacion-content {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.summary-area {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 6px;
  padding: 8px 10px;
  overflow: hidden;
}

/* Tarjeta genérica — mismo tamaño para todas */
.summary-card {
  border: 1px solid #cccccc;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
}
.summary-card.empty { opacity: 0.38; }

/* Header activo: fondo blanco, texto negro, línea inferior */
.summary-card-header {
  color: #111111;
  font-size: 11px;
  font-weight: bold;
  padding: 7px 6px 5px;
  text-align: center;
  border-bottom: 2px solid #333333;
  flex-shrink: 0;
  letter-spacing: 0.3px;
  line-height: 1.3;
}
/* Header de categoría vacía: fondo oscuro */
.summary-card.empty .summary-card-header {
  background: #1a1a2e;
  color: #ffffff;
  border-bottom: none;
}

.summary-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  padding: 5px 6px;
  gap: 2px;
}

.summary-card-lista-name {
  font-size: 11px;
  font-weight: bold;
  color: #111111;
  text-align: center;
  line-height: 1.2;
}

.summary-card-lista-num {
  font-size: 13px;
  font-weight: bold;
  color: #111111;
  text-align: center;
  letter-spacing: 2px;
}

.summary-card-photo {
  width: 60px;
  height: 60px;
  border-radius: 3px;
  flex-shrink: 0;
}

.summary-card-cand-name {
  font-size: 12px;
  font-weight: bold;
  color: #111111;
  text-align: center;
  line-height: 1.2;
}

.summary-card-opcion {
  font-size: 11px;
  color: #444444;
  text-align: center;
}

.btn-modificar {
  font-size: 11px;
  padding: 4px 14px;
  height: auto;
  background: #444444;
  color: #ffffff;
  border: none;
  cursor: pointer;
  border-radius: 3px;
  font-weight: bold;
}
.btn-modificar:hover { background: #222222; }

/* Columna de botones de acción (Reiniciar + Imprimir) */
.confirm-actions {
  width: 210px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0;
  flex-shrink: 0;
}
.btn-confirm-action {
  width: 100%;
  flex: 1;
  font-size: 22px;
  font-weight: bold;
  flex-direction: column;
  gap: 14px;
  border-radius: 0;
  line-height: 1.3;
  text-align: center;
  white-space: normal;
  padding: 20px 10px;
}
.btn-confirm-icon {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
}

/* ================================================================
   PANTALLA 6 — AGRADECIMIENTO
   ================================================================ */
#screen-agradecimiento { background: #f5f5f5; }

.thanks-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 20px;
}
.thanks-democracia {
  max-width: 700px;
  max-height: 310px;
  object-fit: contain;
}
.thanks-text {
  font-size: 18px;
  text-align: center;
  color: #333333;
  max-width: 620px;
  line-height: 1.5;
}
.btn-reiniciar-final {
  height: 48px;
  padding: 0 46px;
  font-size: 17px;
  border-radius: 4px;
  margin-top: 6px;
}

/* ================================================================
   ALTO CONTRASTE
   ================================================================ */
#app-canvas[data-contraste="alto"] {
  filter: grayscale(1) contrast(2) invert(1);
}

/* ================================================================
   INPUT DE CÉDULA — pantalla screen-cedula
   ================================================================ */
.cedula-input-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 380px;
}

.cedula-label {
  font-size: 15px;
  font-weight: bold;
  color: #333333;
  text-align: center;
}

.cedula-input {
  width: 100%;
  height: 52px;
  font-size: 22px;
  font-weight: bold;
  text-align: center;
  border: 2px solid #bbbbbb;
  border-radius: 4px;
  padding: 0 16px;
  outline: none;
  color: #111111;
  transition: border-color 0.15s;
  /* ocultar flechas de input[type=number] */
  -moz-appearance: textfield;
  appearance: textfield;
}
.cedula-input::-webkit-outer-spin-button,
.cedula-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.cedula-input:focus {
  border-color: #1565c0;
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.18);
}
.cedula-input.cedula-input--error {
  border-color: #c62828;
  box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.15);
}
.cedula-input.cedula-input--error:focus {
  border-color: #c62828;
}

.cedula-error {
  display: none;
  font-size: 13px;
  color: #c62828;
  font-weight: bold;
  text-align: center;
  background: #ffebee;
  border: 1px solid #ef9a9a;
  border-radius: 4px;
  padding: 8px 14px;
  max-width: 380px;
}

#btn-buscar-cedula:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#btn-continuar-cedula:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.padron-resultados {
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 500px;
}

.padron-resultados-info {
  background: #e3f2fd;
  border: 1px solid #90caf9;
  border-radius: 8px;
  padding: 16px 24px;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
}

.padron-resultados-info p {
  margin: 4px 0;
  font-size: 16px;
  color: #1a237e;
}

.padron-resultados-info p:first-child {
  font-size: 20px;
  font-weight: bold;
  text-transform: uppercase;
}

/* ================================================================
   MOBILE PORTRAIT — intro screens responsivas
   ================================================================ */
@media (max-width: 767px) and (orientation: portrait) {
  body.on-intro-screen #app-canvas {
    width: 100vw;
    height: 100vh;
  }

  body.on-intro-screen .screen {
    width: 100vw;
    height: 100vh;
  }

  body.on-intro-screen .welcome-header {
    height: auto;
    padding: 10px 14px;
    gap: 10px;
  }
  body.on-intro-screen .welcome-header-logo  { height: 36px; }
  body.on-intro-screen .welcome-header-title { font-size: 11px; padding: 0 8px; }

  body.on-intro-screen .welcome-main {
    gap: 20px;
    padding: 24px 20px;
    justify-content: center;
  }
  body.on-intro-screen .welcome-machine {
    height: auto;
    max-height: 52vh;
    max-width: 100%;
  }
  body.on-intro-screen .welcome-title  { font-size: 17px; }
  body.on-intro-screen .btn-comenzar   { width: 75%; height: 52px; font-size: 18px; }

  body.on-intro-screen .intro-main {
    padding: 20px 20px 100px;
    gap: 16px;
    justify-content: flex-start;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  body.on-intro-screen .intro-graphic {
    max-height: 44vh;
    max-width: 100%;
  }
  body.on-intro-screen .intro-text {
    font-size: 15px;
    max-width: 100%;
    line-height: 1.5;
  }
  body.on-intro-screen .btn-intro-continuar { width: 75%; height: 52px; font-size: 17px; }

  body.on-intro-screen .cedula-input-group  { max-width: 100%; width: 90%; }
  body.on-intro-screen .cedula-input        { font-size: 20px; height: 52px; }
  body.on-intro-screen .padron-resultados   { width: 90%; }

  body.on-intro-screen .zona-main  { padding: 16px 16px 100px; gap: 16px; }
  body.on-intro-screen .zona-title { font-size: 20px; }
  body.on-intro-screen .zona-grid  {
    grid-template-columns: 1fr;
    max-width: 100%;
    padding: 0 8px;
  }
  body.on-intro-screen .zona-btn   { font-size: 16px; padding: 14px 16px; }
}
