@page
@model AsadiTools.Pages.Admin.LoginModel
@{ ViewData["Title"] = "ورود به پنل مدیریت"; Layout = null; }

<!DOCTYPE html>
<html lang="fa" dir="rtl">
<head>
    <meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>ورود | پنل مدیریت آساد ابزار</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <style>
        @@font-face { font-family:"Vazirmatn"; src:url("https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@@v33.003/fonts/webfonts/Vazirmatn-Regular.woff2") format("woff2"); font-display:swap; }
        @@font-face { font-family:"Vazirmatn"; src:url("https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@@v33.003/fonts/webfonts/Vazirmatn-Bold.woff2") format("woff2"); font-weight:700; font-display:swap; }
        * { font-family:"Vazirmatn",Tahoma,sans-serif !important; }
    </style>
</head>
<body class="min-h-screen bg-gray-50 flex items-center justify-center px-4">
    <div class="w-full max-w-md">
        <div class="text-center mb-8">
            <div class="bg-blue-700 text-white rounded-2xl p-4 inline-flex text-2xl mb-4">🔧</div>
            <h1 class="text-2xl font-extrabold text-gray-900">پنل مدیریت</h1>
            <p class="text-gray-500 text-sm mt-1">آساد ابزار کرج</p>
        </div>
        <form method="post" class="bg-white rounded-2xl shadow-sm border border-gray-100 p-8 space-y-5">
            @Html.AntiForgeryToken()
            <div>
                <label class="text-sm font-medium text-gray-700 mb-1.5 block">نام کاربری</label>
                <input asp-for="Input.Username" dir="ltr" placeholder="admin"
                       class="w-full border border-gray-200 rounded-xl px-4 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500" />
            </div>
            <div>
                <label class="text-sm font-medium text-gray-700 mb-1.5 block">رمز عبور</label>
                <input asp-for="Input.Password" type="password" dir="ltr" placeholder="••••••••"
                       class="w-full border border-gray-200 rounded-xl px-4 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500" />
            </div>
            @if (!string.IsNullOrEmpty(Model.ErrorMessage))
            {
                <div class="bg-red-50 border border-red-200 text-red-700 text-sm px-4 py-3 rounded-xl">@Model.ErrorMessage</div>
            }
            <button type="submit" class="w-full bg-blue-700 text-white py-3.5 rounded-xl font-bold hover:bg-blue-800 transition-colors">
                🔒 ورود
            </button>
            <p class="text-xs text-gray-400 text-center">رمز پیش‌فرض: admin / admin1234</p>
        </form>
    </div>
</body>
</html>
