<x-guest-layout>
    <h2 class="h5 fw-semibold mb-3">Најави се</h2>

    @if ($errors->any())
        <div class="alert alert-danger py-2 small">{{ $errors->first() }}</div>
    @endif

    <form method="POST" action="{{ route('login') }}" x-data @keydown.enter.prevent="$el.requestSubmit()">
        @csrf
        <div class="mb-3">
            <label for="username" class="form-label small fw-medium">Корисничко име</label>
            <input id="username" name="username" type="text" value="{{ old('username') }}"
                   class="form-control @error('username') is-invalid @enderror"
                   required autofocus autocomplete="username">
        </div>
        <div class="mb-3">
            <label for="password" class="form-label small fw-medium">Лозинка</label>
            <input id="password" name="password" type="password"
                   class="form-control @error('password') is-invalid @enderror"
                   required autocomplete="current-password">
        </div>
        <div class="form-check mb-3">
            <input class="form-check-input" type="checkbox" name="remember" id="remember">
            <label class="form-check-label small" for="remember">Запомни ме</label>
        </div>
        <button type="submit" class="btn btn-primary w-100">Најави се</button>
    </form>
</x-guest-layout>
