<!DOCTYPE html>
<html lang="tr" class="h-full bg-gray-50">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Giriş Yap | Haber CMS</title>
    {{ encore_entry_link_tags('admin') }}
</head>
<body class="h-full">
    <div class="flex min-h-full flex-col justify-center py-12 sm:px-6 lg:px-8">
        <div class="sm:mx-auto sm:w-full sm:max-w-md">
            <h1 class="text-center text-3xl font-bold text-gray-900">
                Haber <span class="text-primary-600">CMS</span>
            </h1>
            <h2 class="mt-4 text-center text-lg text-gray-600">Yönetim Paneli</h2>
        </div>

        <div class="mt-8 sm:mx-auto sm:w-full sm:max-w-md">
            <div class="bg-white px-6 py-8 shadow-lg sm:rounded-lg sm:px-10">
                {% if error %}
                    <div class="mb-4 rounded-md bg-red-50 p-4">
                        <div class="flex">
                            <i class="fas fa-times-circle text-red-400 mt-0.5"></i>
                            <div class="ml-3">
                                <p class="text-sm text-red-700">{{ error.messageKey|trans(error.messageData, 'security') }}</p>
                            </div>
                        </div>
                    </div>
                {% endif %}

                <form method="post" class="space-y-6">
                    <div>
                        <label for="username" class="form-label">E-posta Adresi</label>
                        <input type="email" name="_username" id="username"
                               value="{{ last_username }}" required autofocus
                               class="form-input" placeholder="admin@ornek.com">
                    </div>

                    <div>
                        <label for="password" class="form-label">Şifre</label>
                        <input type="password" name="_password" id="password" required
                               class="form-input" placeholder="Şifrenizi girin">
                    </div>

                    <div class="flex items-center justify-between">
                        <div class="flex items-center">
                            <input type="checkbox" name="_remember_me" id="remember_me"
                                   class="h-4 w-4 rounded border-gray-300 text-primary-600 focus:ring-primary-500">
                            <label for="remember_me" class="ml-2 text-sm text-gray-600">Beni Hatırla</label>
                        </div>
                    </div>

                    <input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">

                    <div>
                        <button type="submit" class="btn-primary w-full justify-center">
                            <i class="fas fa-sign-in-alt mr-2"></i> Giriş Yap
                        </button>
                    </div>
                </form>
            </div>
        </div>
    </div>

    {{ encore_entry_script_tags('admin') }}
</body>
</html>
