<x-filament::section>
    <div class="grid gap-3">
        <div class="grid grid-cols-2 gap-3">
            <div>
                <div class="text-sm font-medium">Scheduled for</div>
                <div class="text-sm text-gray-600 dark:text-gray-300">{{ optional($run->scheduled_for)->toDateTimeString() ?? '—' }}</div>
            </div>
            <div>
                <div class="text-sm font-medium">Status</div>
                <div class="text-sm text-gray-600 dark:text-gray-300">{{ $run->status ?? '—' }}</div>
            </div>
        </div>

        <div class="grid grid-cols-2 gap-3">
            <div>
                <div class="text-sm font-medium">Started at</div>
                <div class="text-sm text-gray-600 dark:text-gray-300">{{ optional($run->started_at)->toDateTimeString() ?? '—' }}</div>
            </div>
            <div>
                <div class="text-sm font-medium">Finished at</div>
                <div class="text-sm text-gray-600 dark:text-gray-300">{{ optional($run->finished_at)->toDateTimeString() ?? '—' }}</div>
            </div>
        </div>

        <div class="grid grid-cols-2 gap-3">
            <div>
                <div class="text-sm font-medium">Error code</div>
                <div class="text-sm text-gray-600 dark:text-gray-300">{{ $run->error_code ?: '—' }}</div>
            </div>
            <div>
                <div class="text-sm font-medium">Backup set</div>
                <div class="text-sm text-gray-600 dark:text-gray-300">{{ $run->backup_set_id ?: '—' }}</div>
            </div>
        </div>

        <div>
            <div class="text-sm font-medium">Error message</div>
            <div class="text-sm text-gray-600 dark:text-gray-300">{{ $run->error_message ?: '—' }}</div>
        </div>

        <div>
            <div class="text-sm font-medium">Summary</div>
            <div class="rounded-lg bg-gray-50 p-3 text-xs text-gray-700 dark:bg-gray-900/40 dark:text-gray-200">
                <pre class="whitespace-pre-wrap">{{ json_encode($run->summary ?? [], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) }}</pre>
            </div>
        </div>
    </div>
</x-filament::section>
