<x-auth-layout>
    <div class="card">

        <div class="card-body p-4">
            <div class="text-center mt-2">
                <h5 class="text-primary">Login</h5>
                <p class="text-muted">Sign in to continue to {{ config('app.name') }}.</p>
            </div>
            <div class="p-2 mt-4">
                <form method="POST" action="{{ route('login') }}">
                    @csrf

                    <div class="mb-3">
                        <label class="form-label" for="username">Username</label>
                        <input type="text" class="form-control @error('username') is-invalid @enderror"
                               name="username" value="{{ old('username') }}" id="username"
                               placeholder="Enter username">
                        @error('username')
                        <span class="invalid-feedback" role="alert">
                            <strong>{{ $message }}</strong>
                        </span>
                        @enderror
                    </div>

                    <div class="mb-3">
                        <div class="float-end">
                            @if (Route::has('password.request'))
                                <a wire:navigate href="{{ route('password.request') }}" class="text-muted">Forgot
                                    password?</a>
                            @endif
                        </div>
                        <label class="form-label" for="userpassword">Password</label>
                        <input type="password" class="form-control @error('password') is-invalid @enderror"
                               name="password" id="userpassword" placeholder="Enter password">
                        @error('password')
                        <span class="invalid-feedback" role="alert">
                                                <strong>{{ $message }}</strong>
                                            </span>
                        @enderror
                    </div>

                    <div class="form-check">
                        <input type="checkbox" class="form-check-input" id="auth-remember-check"
                               name="remember" {{ old('remember') ? 'checked' : '' }}>
                        <label class="form-check-label" for="auth-remember-check">Remember me</label>
                    </div>

                    <div class="mt-3 text-end">
                        <button class="btn btn-primary w-sm waves-effect waves-light" type="submit">Login</button>
                    </div>
                </form>
            </div>

        </div>
    </div>
</x-auth-layout>
