<?php
 
$colorMap = [
    'blue' => 'bg-blue-50 text-blue-600 hover:bg-blue-100',
    'amber' => 'bg-amber-50 text-amber-600 hover:bg-amber-100',
    'pink' => 'bg-pink-50 text-pink-600 hover:bg-pink-100',
    'cyan' => 'bg-cyan-50 text-cyan-600 hover:bg-cyan-100',
    'green' => 'bg-green-50 text-green-600 hover:bg-green-100',
    'gray' => 'bg-gray-50 text-gray-600 hover:bg-gray-100',
];
?>
<div class="grid grid-cols-2 gap-2">
    <?php foreach ($data as $action): ?>
    <?php $classes = $colorMap[$action['color']] ?? $colorMap['gray']; ?>
    <a href="<?= htmlspecialchars($action['url']) ?>"
       class="flex items-center gap-2.5 p-3 rounded-lg border border-transparent <?= $classes ?> transition-all group">
        <i class="fa-solid <?= htmlspecialchars($action['icon']) ?> text-sm"></i>
        <span class="text-xs font-medium"><?= htmlspecialchars($action['label']) ?></span>
    </a>
    <?php endforeach; ?>
</div>
