<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
    <title>Sign in — Southend School</title>
    @include('components.partials.theme-boot')
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
    @vite(['resources/css/app.css', 'resources/js/app.js'])
    <style>
        html, body { height: auto; overflow: auto; display: block; }
    </style>
</head>
<body class="auth-page">
    <div class="ambient-bg" aria-hidden="true"></div>

    <div style="position: fixed; top: max(24px, env(safe-area-inset-top)); right: max(24px, env(safe-area-inset-right)); z-index: 10;">
        <x-theme-toggle />
    </div>

    <div class="auth-card page-enter">
        <div class="auth-logo">
            <div class="brand-name">Southend<span> School</span></div>
            <div style="font-size: 13px; color: var(--text2); margin-top: 8px;">School management portal</div>
        </div>

        @if ($errors->any())
            <div class="alert alert-error" style="margin-bottom: 16px;">
                {{ $errors->first() }}
            </div>
        @endif

        <form method="POST" action="{{ route('login') }}">
            @csrf
            <div class="form-group" style="margin-bottom: 16px;">
                <label class="form-label" for="email">Email address</label>
                <input class="input" type="email" id="email" name="email" value="{{ old('email') }}" required autofocus autocomplete="username">
            </div>
            <div class="form-group" style="margin-bottom: 16px;">
                <label class="form-label" for="password">Password</label>
                <input class="input" type="password" id="password" name="password" required autocomplete="current-password">
            </div>
            <label style="display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text2); margin-bottom: 20px;">
                <input type="checkbox" name="remember" value="1">
                Remember me
            </label>
            <button type="submit" class="btn btn-primary" style="width: 100%;">Sign in</button>
        </form>
    </div>
</body>
</html>
