<div class="d-flex flex-wrap align-items-center justify-content-between gap-2 mb-3">
    <div>
        <h2 class="mb-1"><?= h(t('admin.export_data')) ?></h2>
        <div class="text-muted"><?= h(t('admin.exports_help')) ?></div>
    </div><a class="btn btn-outline-secondary" href="/admin/register">← <?= h(t('admin.back')) ?></a>
</div>
<div class="alert alert-warning"><strong><?= h(t('admin.sensitive')) ?></strong> <?= h(t('admin.sensitive_help')) ?>
</div>
<div class="card mb-4 overflow-hidden">
    <div class="card-status-top bg-primary"></div>
    <div class="card-body d-flex flex-wrap align-items-center gap-3">
        <div class="me-auto">
            <h3 class="mb-1"><?= h(t('admin.portability')) ?></h3>
            <div class="text-muted"><?= h(t('admin.portability_help')) ?></div>
        </div><a class="btn btn-primary" href="/admin/exports/download?type=all">⬇ <?= h(t('admin.download_all')) ?></a>
    </div>
</div>
<div class="row row-cards"><?php foreach ($datasets as $key => $dataset): ?><div class="col-sm-6 col-lg-4">
        <div class="card h-100">
            <div class="card-body">
                <div class="d-flex align-items-start gap-3"><span class="avatar bg-blue-lt">CSV</span>
                    <div>
                        <h3 class="card-title mb-1"><?= h($dataset['label']) ?></h3>
                        <div class="text-muted small"><?= h($dataset['filename']) ?></div>
                    </div>
                </div>
            </div>
            <div class="card-footer"><a class="btn btn-outline-primary w-100"
                    href="/admin/exports/download?type=<?= h($key) ?>"><?= h(t('common.download')) ?></a></div>
        </div>
    </div><?php endforeach; ?></div>
<div class="card mt-4">
    <div class="card-body">
        <h3 class="card-title"><?= h(t('admin.compatibility')) ?></h3>
        <p class="text-muted mb-0"><?= h(t('admin.compatibility_help')) ?></p>
    </div>
</div>
