@model Watcher.ViewModels.DashboardViewModel
@{
    ViewData["Title"] = "Dashboard";
}

<h1 class="text-2xl font-bold mb-4">Dashboard</h1>

<div class="grid grid-cols-2 gap-6">
    <div class="bg-white shadow rounded-2xl p-4">
        <h2 class="text-xl font-semibold mb-2">Server</h2>
        <p>🟢 Online: <strong>@Model.ActiveServers</strong></p>
        <p>🔴 Offline: <strong>@Model.OfflineServers</strong></p>
        <a href="/Servers" class="text-blue-500 hover:underline mt-2 inline-block">→ Zu den Servern</a>
    </div>

    <div class="bg-white shadow rounded-2xl p-4">
        <h2 class="text-xl font-semibold mb-2">Container</h2>
        <p>🟢 Laufend: <strong>@Model.RunningContainers</strong></p>
        <p>🔴 Fehlerhaft: <strong>@Model.FailedContainers</strong></p>
        <a href="/Containers" class="text-blue-500 hover:underline mt-2 inline-block">→ Zu den Containern</a>
    </div>

    <div class="col-span-2 bg-white shadow rounded-2xl p-4">
        <h2 class="text-xl font-semibold mb-2">Uptime letzte 24h</h2>
        <div class="bg-gray-100 h-32 rounded-lg flex items-center justify-center text-gray-500">
            (Diagramm folgt hier)
        </div>
    </div>

    <div class="col-span-2 bg-white shadow rounded-2xl p-4">
        <h2 class="text-xl font-semibold mb-2">Systeminfo</h2>
        <p>Benutzer: <strong>@User.FindFirst("preferred_username")?.Value</strong></p>
        <p>Letzter Login: <strong>@Model.LastLogin.ToString("g")</strong></p>
        <a href="/Auth/Info" class="text-blue-500 hover:underline mt-2 inline-block">→ Account-Verwaltung</a>
    </div>
</div>
