<div class="section-title">{{ __('Resumen Ejecutivo') }}</div>

<div class="stats-grid">
    <div class="stat-card">
        <div class="stat-value">{{ $summary['total_features'] }}</div>
        <div class="stat-label">{{ __('Total elementos') }}</div>
    </div>
    <div class="stat-card">
        <div class="stat-value" style="color:#22c55e;">{{ $summary['completed_features'] }}</div>
        <div class="stat-label">{{ __('Completados') }}</div>
    </div>
    <div class="stat-card">
        <div class="stat-value" style="color:#f59e0b;">{{ $summary['completion_rate'] }}%</div>
        <div class="stat-label">{{ __('Tasa completitud') }}</div>
    </div>
    <div class="stat-card">
        <div class="stat-value" style="color:#3b82f6;">{{ $summary['avg_planned_progress'] }}%</div>
        <div class="stat-label">{{ __('Progreso planificado') }}</div>
    </div>
    <div class="stat-card">
        <div class="stat-value" style="color:#10b981;">{{ $summary['avg_actual_progress'] }}%</div>
        <div class="stat-label">{{ __('Progreso real') }}</div>
    </div>
    <div class="stat-card">
        <div class="stat-value" style="color: {{ ($summary['overall_spi'] ?? 0) >= 1 ? '#10b981' : '#ef4444' }};">
            {{ $summary['overall_spi'] ?? 'N/A' }}
        </div>
        <div class="stat-label">{{ __('SPI Global') }}</div>
    </div>
    <div class="stat-card">
        <div class="stat-value" style="color:#6366f1;">{{ $summary['total_inspections'] }}</div>
        <div class="stat-label">{{ __('Inspecciones') }}</div>
    </div>
    <div class="stat-card">
        <div class="stat-value" style="color:#10b981;">{{ $summary['passed_inspections'] }}</div>
        <div class="stat-label">{{ __('Aprobadas') }}</div>
    </div>
    <div class="stat-card">
        <div class="stat-value" style="color:#ef4444;">{{ $summary['failed_inspections'] }}</div>
        <div class="stat-label">{{ __('Fallidas') }}</div>
    </div>
    <div class="stat-card">
        <div class="stat-value" style="color:#f59e0b;">{{ $summary['pass_rate'] }}%</div>
        <div class="stat-label">{{ __('Tasa aprobación') }}</div>
    </div>
    <div class="stat-card">
        <div class="stat-value">{{ $summary['open_issues'] }}</div>
        <div class="stat-label">{{ __('Issues abiertos') }}</div>
    </div>
    <div class="stat-card">
        <div class="stat-value">{{ $summary['closed_issues'] }}</div>
        <div class="stat-label">{{ __('Issues cerrados') }}</div>
    </div>
    <div class="stat-card">
        <div class="stat-value">{{ $summary['total_tasks'] }}</div>
        <div class="stat-label">{{ __('Total tareas') }}</div>
    </div>
    <div class="stat-card">
        <div class="stat-value">{{ $summary['completed_tasks'] }}</div>
        <div class="stat-label">{{ __('Tareas completadas') }}</div>
    </div>
    <div class="stat-card">
        <div class="stat-value" style="color:{{ ($summary['task_completion_rate'] ?? 0) >= 80 ? '#10b981' : '#f59e0b' }};">
            {{ $summary['task_completion_rate'] ?? 0 }}%
        </div>
        <div class="stat-label">{{ __('Completitud tareas') }}</div>
    </div>
    <div class="stat-card">
        <div class="stat-value" style="color:#10b981;">{{ $summary['phases_on_track'] }}</div>
        <div class="stat-label">{{ __('Fases en plazo') }}</div>
    </div>
    <div class="stat-card">
        <div class="stat-value" style="color:#ef4444;">{{ $summary['phases_delayed'] }}</div>
        <div class="stat-label">{{ __('Fases retrasadas') }}</div>
    </div>
</div>