{{-- ── CABECERA ── --}}
{{ $empresa }} — Panel de Control
RESUMEN DEL SISTEMA
Vista general del proceso electoral — {{ $filtroLabel }}
Generado
{{ now()->format('d/m/Y') }}
{{ now()->format('H:i:s') }}
{{-- CUERPO --}}
{{-- ── INDICADORES PRINCIPALES ── --}} @php $cobPct = $stats['cobertura_pct'] ?? 0; $cobFill = min((int)$cobPct, 100); @endphp
Indicadores del Sistema
{{-- Cobertura + métricas en tabla --}} {{-- Bloque de cobertura --}} {{-- Métricas secundarias --}}
Cobertura Electoral
{{ $cobPct }}%
{{ number_format($stats['mesas_procesadas']) }} de {{ number_format($stats['total_mesas']) }} mesas procesadas
@if($cobFill > 0)@endif @if($cobFill < 100)@endif
{{ number_format($stats['total_votos']) }} Votos Válidos {{ number_format($stats['registros']) }} Actas Registradas
{{ number_format($stats['votos_nulos']) }} Votos Nulos {{ number_format($stats['votos_impugnados']) }} Impugnados
{{-- ── RANKING DE CANDIDATOS ── --}} @php $maxV = $totalesPorCandidato->max('detalle_votos_sum_cantidad_votos') ?: 1; $totalV = $totalesPorCandidato->sum('detalle_votos_sum_cantidad_votos'); $palette = ['#312e81','#166534','#1e3a5f','#7c2d12','#134e4a','#831843']; @endphp @if(!empty($ganadores))
Quién va ganando por columna de la cédula
@foreach($ganadores as $i => $g) @endforeach
Columna Va ganando Votos % Ventaja Mesas
{{ $g['columna'] }} {{ $g['ganador']['nombre'] ?? 'Sin votos aún' }} {{ $g['ganador'] ? number_format($g['ganador']['votos']) : '—' }} {{ $g['ganador'] ? $g['ganador']['pct'] . '%' : '—' }} {{ $g['ganador'] ? ($g['ganador']['empate'] ? 'Empate' : number_format($g['ganador']['ventaja'])) : '—' }} {{ $g['mesas'] }} / {{ $g['total_mesas'] }}
@endif @if($totalesPorCandidato->isNotEmpty())
{{ $esErm ? 'Ranking de Organizaciones Políticas' : 'Ranking de Candidatos' }} @if(count($tiposActa) > 1)· {{ $tiposActa[$tipoActa] }}@endif
@foreach($totalesPorCandidato as $i => $c) @php $votos = $c->detalle_votos_sum_cantidad_votos ?? 0; $pct = $totalV > 0 ? round(($votos / $totalV) * 100, 1) : 0; $pctBar = $maxV > 0 ? round(($votos / $maxV) * 100) : 0; $color = ($c->partido?->color && $c->partido->color !== '') ? $c->partido->color : $palette[$i % count($palette)]; $isTop = $i === 0 && $votos > 0; $trClass = $isTop ? 'top1' : ($i % 2 === 1 ? 'odd' : ''); @endphp @endforeach
# {{ $esErm ? 'Organización política' : 'Candidato' }} {{ $esErm ? 'Siglas' : 'Partido' }} Votos % Distribución
{{ $i + 1 }} @if(isset($c->foto_b64) && $c->foto_b64) @elseif($c->es_partido && ($c->logo_b64 ?? null)) @else {{ strtoupper(substr($c->nombre, 0, 1)) }} @endif {{ $c->nombre }} @if($isTop) 1° LUGAR @endif @if($c->es_partido) {{ $c->siglas ?: '—' }} @elseif(isset($c->partido) && $c->partido) @if(isset($c->partido->logo_b64) && $c->partido->logo_b64) @endif {{ $c->partido->nombre }} @else Independiente @endif {{ number_format($votos) }} {{ $pct }}% @if($pctBar > 0)@endif @if($pctBar < 100)@endif
@endif {{-- ── COBERTURA POR LOCAL ── --}} @if($coberturaLocales->isNotEmpty())
Cobertura por Local de Votación
@foreach($coberturaLocales as $i => $l) @php $covPct = $l->total_mesas > 0 ? round(($l->mesas_procesadas / $l->total_mesas) * 100) : 0; $covFill = min($covPct, 100); $barColor = $covPct >= 80 ? '#059669' : ($covPct >= 50 ? '#b45309' : '#dc2626'); @endphp @endforeach
Local de Votación Procesadas Total Cobertura %
{{ $l->nombre }} {{ $l->mesas_procesadas }} {{ $l->total_mesas }} @if($covFill > 0)@endif @if($covFill < 100)@endif
{{ $covPct }}%
@endif
{{-- fin padding --}} {{-- ── PIE FIJO ── --}}