/* Sanborja Administración - Consultas y votaciones (5.20.0).
   Todos los selectores llevan prefijo vot- o acta- (o son clases ya existentes). Sin estilos en línea: la política de seguridad los bloquea.
   Este archivo se carga como CSS opcional (ver la lista de CSS opcionales en pagina_inicio, cfeliz_privado/src/vista.php). */

/* ------------------------------------------------------------------ Listas y tarjetas */
.vot-subtitulo { font-size: 1.15rem; margin: 28px 0 12px; color: var(--tinta); }
.vot-tarjetas { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 20px; margin-bottom: 24px; }
.vot-tarjeta { margin: 0; min-width: 0; }
.vot-tarjeta .panel-cuerpo { padding-top: 20px; display: grid; gap: 10px; align-content: start; }
.vot-tarjeta-titulo { font-size: 1.1rem; margin: 0; overflow-wrap: anywhere; }
.vot-tarjeta-titulo a { color: var(--tinta); text-decoration: none; }
.vot-tarjeta-titulo a:hover { color: var(--enlace); text-decoration: underline; }
.vot-insignias { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.vot-plazo { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--suave); }
.vot-plazo .i { flex: none; }
.vot-mini { display: block; width: 100%; height: 10px; border-radius: 6px; overflow: hidden; }
.vot-tarjeta .ayuda { margin: 0; }
.vot-estados { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.vot-estados li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.vot-nota { margin: -8px 0 24px; }

/* ------------------------------------------------------------------ Barras (SVG con atributos) */
.vot-fondo { fill: #e6ecf4; }
.vot-relleno { fill: var(--primario); }
.vot-c0 { fill: #aab6c8; }
.vot-c1 { fill: #0074c7; }
.vot-c2 { fill: #0b7a63; }
.vot-c3 { fill: #d98a00; }
.vot-c4 { fill: #e0644a; }
.vot-c5 { fill: #1ba3c6; }
.vot-c6 { fill: #7a5bd0; }
.vot-c7 { fill: #8a5300; }
.vot-c8 { fill: #5a6a85; }
.vot-medida { fill: var(--primario); }
.vot-medida-ok { fill: var(--exito); }
.vot-marca { stroke: var(--tinta); stroke-width: 3; }
.vot-grafico { margin: 8px 0 12px; }
.vot-barras { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.vot-barra-fila { min-width: 0; }
.vot-barra-texto { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.vot-barra-nombre { overflow-wrap: anywhere; font-weight: 600; }
.vot-barra-texto strong { white-space: nowrap; font-size: 1.1rem; }
.vot-barra { display: block; width: 100%; height: 18px; border-radius: 9px; overflow: hidden; }
.vot-barra-detalle { margin: 4px 0 0; font-size: .88rem; color: var(--suave); }
.vot-gana .vot-barra-nombre { color: var(--tinta); }
.vot-medidor { margin: 8px 0 20px; }
.vot-medidor-svg { display: block; width: 100%; height: 22px; border-radius: 11px; overflow: hidden; }
.vot-medidor-leyenda { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin: 8px 0 0; }
.vot-veredicto { font-size: 1.05rem; margin: 0 0 12px; }
.vot-kpis { margin-bottom: 24px; }

/* ------------------------------------------------------------------ Ficha de la consulta */
.vot-ficha .panel-cuerpo { padding-top: 20px; display: grid; gap: 14px; }
.vot-cuenta { color: var(--tinta); }
.vot-descripcion { overflow-wrap: anywhere; max-width: 70ch; }
.vot-lista-opciones { margin: 0 0 16px; padding-left: 22px; }
.vot-lista-opciones li { margin-bottom: 4px; overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ Asistente de creación */
.vot-pasos { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; padding: 0; }
.vot-pasos li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; min-height: 44px; border-radius: 999px; background: var(--superficie); color: var(--suave); font-weight: 600; box-shadow: var(--sombra-tarjeta); }
.vot-paso-num { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #e6ecf4; color: var(--tinta-texto); font-weight: 800; }
.vot-pasos li.vot-paso-actual { background: var(--primario); color: #fff; }
.vot-pasos li.vot-paso-actual .vot-paso-num { background: #fff; color: var(--primario-hover); }
.vot-pasos li.vot-paso-hecho .vot-paso-num { background: var(--exito-suave); color: var(--exito); }
.vot-tipos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; border: 0; padding: 0; margin: 0; min-width: 0; }
.vot-tipo { position: relative; display: block; cursor: pointer; min-width: 0; }
.vot-tipo input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.vot-tipo-caja { display: grid; gap: 8px; height: 100%; padding: 20px; border: 2px solid var(--borde-campo); border-radius: var(--radio); background: var(--superficie); min-width: 0; }
.vot-tipo-caja strong { font-size: 1.1rem; color: var(--tinta); }
.vot-tipo-caja ul { margin: 0; padding-left: 20px; color: var(--suave); font-size: .93rem; }
.vot-tipo-caja > span { overflow-wrap: anywhere; }
.vot-tipo-icono { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--primario-suave); color: var(--enlace); }
.vot-tipo:hover .vot-tipo-caja { border-color: var(--borde-fuerte); }
.vot-tipo:has(input:checked) .vot-tipo-caja { border-color: var(--primario); background: var(--primario-suave); }
.vot-tipo:has(input:focus-visible) .vot-tipo-caja { outline: 3px solid var(--foco); outline-offset: 2px; }
.vot-tipos.con-error .vot-tipo-caja { border-color: var(--peligro); }
.vot-opciones { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 12px; }
.vot-opciones legend { font-weight: 600; padding: 0; margin-bottom: 6px; }
.vot-opciones .campo { margin: 0; }
.vot-opciones .btn { justify-self: start; }
.vot-resumen .datos { margin: 0 0 12px; }
.vot-error-paso { margin-top: 12px; }
.vot-acciones-form { margin-bottom: 24px; }
.vot-final { display: inline-flex; flex-wrap: wrap; gap: 10px; }

/* ------------------------------------------------------------------ Votar */
.vot-voto .panel-cuerpo { padding-top: 16px; display: grid; gap: 14px; }
.vot-formulario-voto { display: grid; gap: 16px; }
.vot-elegir { border: 0; padding: 0; margin: 0; min-width: 0; }
.vot-elegir legend { font-weight: 700; padding: 0; margin-bottom: 10px; font-size: 1.05rem; }
.vot-elegir .opciones-radio { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.vot-opcion-tarjeta { min-height: 64px; align-items: center; padding: 14px 16px; border-width: 2px; font-size: 1.05rem; }
.vot-opcion-tarjeta:has(input:focus-visible) { outline: 3px solid var(--foco); outline-offset: 2px; }
.vot-opcion-tarjeta span strong { color: var(--tinta); }
.vot-codigo { font-size: 1.25rem; letter-spacing: .08em; font-variant-numeric: tabular-nums; color: var(--tinta); }

/* ------------------------------------------------------------------ Solicitudes y autorización */
.vot-lista { display: grid; gap: 14px; }
.vot-solicitud { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 20px; padding: 14px 16px; border: 1px solid var(--borde-campo); border-radius: var(--radio-chico); }
.vot-solicitud > div:first-child { flex: 1 1 280px; min-width: 0; overflow-wrap: anywhere; }
.vot-solicitud p { margin: 0 0 4px; }
.vot-texto-legal { padding: 14px 16px; margin-bottom: 12px; border-left: 4px solid var(--primario); background: var(--primario-suave); border-radius: 0 var(--radio-chico) var(--radio-chico) 0; overflow-wrap: anywhere; line-height: 1.55; }
dialog.vot-dialogo { width: min(620px, calc(100vw - 32px)); }

/* ------------------------------------------------------------------ Celulares */
@media (max-width: 600px) {
  .vot-tarjetas { grid-template-columns: minmax(0, 1fr); }
  .vot-pasos li { padding-right: 10px; font-size: .9rem; }
  .vot-barra-texto { flex-wrap: wrap; }
  .vot-acciones-form .btn, .vot-final .btn { flex: 1 1 100%; justify-content: center; }
  .vot-solicitud .acciones, .vot-solicitud .acciones form, .vot-solicitud .acciones .btn { width: 100%; }
}

/* ------------------------------------------------------------------ Documento para el acta (hoja carta, vertical) */
.cuerpo-acta main#contenido { max-width: none; padding: 24px 16px 64px; }
.hoja-acta { font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; background: #fff; color: #1b2a36; max-width: 216mm; margin: 0 auto 24px; padding: 14mm 14mm 12mm; box-shadow: 0 2px 10px rgba(23, 52, 77, .15); font-size: 10.5pt; line-height: 1.4; }
.acta-cabeza { display: flex; justify-content: space-between; gap: 16px; border-bottom: 3px solid var(--boleta-tinta, #17344d); padding-bottom: 10px; margin-bottom: 12px; }
.acta-cabeza h1 { font-size: 16pt; margin: 0 0 2px; }
.acta-cabeza p { margin: 0; }
.acta-logo { width: 80px; height: 80px; object-fit: contain; }
.acta-provisorio { border: 2px solid var(--atencion-borde); background: var(--atencion-suave); color: #5e3a00; border-radius: 6px; padding: 8px 12px; margin-bottom: 12px; font-weight: 600; }
.acta-bloque { margin-bottom: 12px; break-inside: avoid; }
.acta-bloque h2 { font-size: 11pt; background: var(--boleta-tinta, #17344d); color: #fff; padding: 4px 10px; border-radius: 4px; margin: 0 0 6px; }
.acta-bloque p { margin: 4px 0; overflow-wrap: anywhere; }
.acta-datos { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 14px; margin: 0; }
.acta-datos dt { color: #4f6272; }
.acta-datos dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.acta-tabla { width: 100%; border-collapse: collapse; }
.acta-tabla th, .acta-tabla td { padding: 3px 8px; border-bottom: 1px solid #e3e9ee; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.acta-tabla th { font-size: 9pt; color: #4f6272; }
.acta-tabla .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.acta-tabla thead { display: table-header-group; }
.acta-tabla tr { break-inside: avoid; }
.acta-resultado { border: 2px solid var(--boleta-tinta, #17344d); border-radius: 6px; padding: 8px 12px; font-size: 12pt; font-weight: 700; margin-top: 8px; }
.acta-texto-aut { font-size: 9pt; color: #33414e; margin: 2px 0 6px; }
.acta-firmas { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 36mm; break-inside: avoid; }
.acta-firma { border-top: 1px solid #1b2a36; padding-top: 6px; text-align: center; }
.acta-firma p { margin: 0; }
.acta-pie { border-top: 1px solid #d3dde4; padding-top: 8px; margin-top: 16px; color: #4f6272; font-size: 9pt; text-align: center; }
@media (max-width: 600px) {
  .hoja-acta { padding: 14px; font-size: 10pt; }
  .acta-cabeza { flex-direction: column; }
  .acta-datos { grid-template-columns: minmax(0, 1fr); }
  .acta-datos dd { margin-bottom: 6px; }
  .acta-tabla thead { display: none; }
  .acta-tabla, .acta-tabla tbody, .acta-tabla tr, .acta-tabla td, .acta-tabla th { display: block; width: 100%; }
  .acta-tabla tr { border-bottom: 1px solid #e3e9ee; padding: 6px 0; }
  .acta-tabla td, .acta-tabla th { border: 0; padding: 2px 0; }
  .acta-tabla td[data-etiqueta]::before, .acta-tabla th[data-etiqueta]::before { content: attr(data-etiqueta) ": "; color: #4f6272; font-weight: 600; }
  .acta-tabla .num { text-align: left; }
  .acta-firmas { grid-template-columns: minmax(0, 1fr); gap: 36px; margin-top: 24mm; }
}
@media print {
  @page { size: letter portrait; margin: 14mm; }
  body.cuerpo-acta { background: #fff; }
  .no-imprimir, .saltar, dialog { display: none !important; }
  .cuerpo-acta main#contenido { padding: 0; }
  .hoja-acta { box-shadow: none; margin: 0; max-width: none; padding: 0; }
  .acta-bloque h2 { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .acta-tabla thead { display: table-header-group; }
  .acta-tabla, .acta-tabla tbody { display: table-row-group; }
  .acta-tabla { display: table; }
  .acta-tabla tr { display: table-row; }
  .acta-tabla td, .acta-tabla th { display: table-cell; width: auto; }
  .acta-tabla td[data-etiqueta]::before, .acta-tabla th[data-etiqueta]::before { content: none; }
  .acta-datos { grid-template-columns: max-content minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .vot-relleno, .vot-opcion-tarjeta, .vot-tipo-caja { transition: none !important; }
}
