<!-- Dashboard -->
<div class="bg-white rounded-lg shadow p-6">
    <div class="mb-6">
        <h1 class="text-2xl font-bold text-slate-800">Bienvenido{{if .user}}, {{index .user "name"}}{{end}}</h1>
        <p class="text-sm text-slate-500 mt-1">Panel de administración · U-site</p>
    </div>

    <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4">
        <!-- Acceso rápido a módulos -->
        {{if .modules}}
        {{range .modules}}
        <a href="{{.url}}" class="flex items-center gap-3 p-4 rounded-lg border border-slate-200 hover:border-[#8eb02f] hover:shadow-sm transition-all group">
            <div class="w-9 h-9 rounded-lg flex items-center justify-center bg-[#8eb02f]/10 group-hover:bg-[#8eb02f]/20 transition-colors">
                <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 text-[#8eb02f]" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5">
                    <path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6A2.25 2.25 0 016 3.75h2.25A2.25 2.25 0 0110.5 6v2.25a2.25 2.25 0 01-2.25 2.25H6a2.25 2.25 0 01-2.25-2.25V6zM3.75 15.75A2.25 2.25 0 016 13.5h2.25a2.25 2.25 0 012.25 2.25V18a2.25 2.25 0 01-2.25 2.25H6A2.25 2.25 0 013.75 18v-2.25zM13.5 6a2.25 2.25 0 012.25-2.25H18A2.25 2.25 0 0120.25 6v2.25A2.25 2.25 0 0118 10.5h-2.25a2.25 2.25 0 01-2.25-2.25V6zM13.5 15.75a2.25 2.25 0 012.25-2.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-2.25A2.25 2.25 0 0113.5 18v-2.25z" />
                </svg>
            </div>
            <span class="text-sm font-medium text-slate-700 group-hover:text-[#6d8c24]">{{.nombre}}</span>
        </a>
        {{end}}
        {{else}}
        <div class="col-span-full text-center py-12 text-slate-400 text-sm">
            No hay módulos asignados a tu perfil.
        </div>
        {{end}}
    </div>
</div>
