<div class="space-y-6">
    <div class="bg-white rounded-xl shadow-sm border border-gray-100 p-6">
        <h3 class="text-lg font-semibold text-gray-800 mb-4">Resultados para "<?= htmlspecialchars($query) ?>"</h3>

        <?php if (empty($results['clients']) && empty($results['servers']) && empty($results['orders']) && empty($results['domains'])): ?>
            <p class="text-gray-500">Nenhum resultado encontrado.</p>
        <?php else: ?>

            <?php if (!empty($results['clients'])): ?>
                <div class="mb-6">
                    <h4 class="text-sm font-bold text-gray-500 uppercase tracking-wider mb-2">Clientes</h4>
                    <ul class="divide-y divide-gray-100">
                        <?php foreach ($results['clients'] as $item): ?>
                            <li class="py-2"><a href="/admin/clients/edit/<?= $item['id'] ?>"
                                    class="text-primary-600 hover:underline"><?= htmlspecialchars($item['name']) ?></a></li>
                        <?php endforeach; ?>
                    </ul>
                </div>
            <?php endif; ?>

            <?php if (!empty($results['servers'])): ?>
                <div class="mb-6">
                    <h4 class="text-sm font-bold text-gray-500 uppercase tracking-wider mb-2">Servidores</h4>
                    <ul class="divide-y divide-gray-100">
                        <?php foreach ($results['servers'] as $item): ?>
                            <li class="py-2"><a href="/admin/servers"
                                    class="text-primary-600 hover:underline"><?= htmlspecialchars($item['name']) ?></a></li>
                        <?php endforeach; ?>
                    </ul>
                </div>
            <?php endif; ?>

            <?php if (!empty($results['orders'])): ?>
                <div class="mb-6">
                    <h4 class="text-sm font-bold text-gray-500 uppercase tracking-wider mb-2">Ordens</h4>
                    <ul class="divide-y divide-gray-100">
                        <?php foreach ($results['orders'] as $item): ?>
                            <li class="py-2"><a href="/admin/orders/view/<?= $item['id'] ?>"
                                    class="text-primary-600 hover:underline"><?= htmlspecialchars($item['name']) ?></a></li>
                        <?php endforeach; ?>
                    </ul>
                </div>
            <?php endif; ?>

            <?php if (!empty($results['domains'])): ?>
                <div class="mb-6">
                    <h4 class="text-sm font-bold text-gray-500 uppercase tracking-wider mb-2">Domínios</h4>
                    <ul class="divide-y divide-gray-100">
                        <?php foreach ($results['domains'] as $item): ?>
                            <li class="py-2"><span class="text-gray-700"><?= htmlspecialchars($item['name']) ?></span></li>
                        <?php endforeach; ?>
                    </ul>
                </div>
            <?php endif; ?>

        <?php endif; ?>
    </div>
</div>