<!DOCTYPE html>
<html lang="tr" data-bs-theme="light">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Admin Giriş</title>
    <link href="/assets/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="/admin/css/theme.css" rel="stylesheet">
    <script src="/assets/htmx/htmx.js"></script>
    <script src="https://challenges.cloudflare.com/turnstile/v0/api.js" async defer></script>
    <style>
        body,
        html {
            height: 100%;
        }

        .login-container {
            display: flex;
            align-items: center;
            justify-content: center;
            height: 100%;
            background-color: var(--bg-body);
        }

        .login-card {
            width: 100%;
            max-width: 400px;
            padding: 2rem;
            border-radius: 10px;
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
            background-color: var(--bg-sidebar);
            border: 1px solid var(--border-color);
        }
    </style>
</head>

<body>
    <div class="login-container">
        <div class="login-card">
            <h3 class="text-center mb-4">Admin Giriş</h3>
            <form action="/login" method="POST" hx-post="/login" hx-target="#login-feedback" hx-swap="innerHTML">
                <div class="mb-3">
                    <label for="email" class="form-label">E-posta</label>
                    <input type="email" class="form-control" id="email" name="email" required>
                </div>
                <div class="mb-3">
                    <label for="password" class="form-label">Şifre</label>
                    <input type="password" class="form-control" id="password" name="password" required>
                </div>

                <!-- Cloudflare Turnstile -->
                <div class="cf-turnstile" data-sitekey="0x4AAAAAACHzHKvlEwMamxCM"></div>

                <div id="login-feedback" class="mb-3 text-danger"></div>

                <button type="submit" class="btn btn-primary w-100">Giriş Yap</button>
            </form>
            <div class="mt-3 text-center">
                <a href="/" class="text-decoration-none text-muted">Siteye Dön</a>
            </div>
        </div>
    </div>
</body>

</html>