@extends('layouts.guest')

@section('title', __('Login'))

@section('guest_tagline')
    {{ __('Sign in to manage your account') }}
@endsection

@section('content')
    <h2>{{ __('Login') }}</h2>
    <form method="POST" action="{{ route('login') }}" novalidate>
        @csrf

        <div class="field">
            <label for="email">{{ __('Email address') }}</label>
            <input
                id="email"
                type="email"
                name="email"
                value="{{ old('email') }}"
                required
                autocomplete="email"
                autofocus
                @if($errors->has('email')) aria-invalid="true" aria-describedby="email-error" @endif
            >
            @error('email')
                <p class="error" id="email-error" role="alert">{{ $message }}</p>
            @enderror
        </div>

        <div class="field">
            <label for="password">{{ __('Password') }}</label>
            <input
                id="password"
                type="password"
                name="password"
                required
                autocomplete="current-password"
                @if($errors->has('password')) aria-invalid="true" @endif
            >
            @error('password')
                <p class="error" role="alert">{{ $message }}</p>
            @enderror
        </div>

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

        <button type="submit" class="btn-submit">{{ __('Sign in') }}</button>

        <div class="guest-links">
            @if (Route::has('password.request'))
                <a href="{{ route('password.request') }}">{{ __('Forgot password?') }}</a>
            @endif
            @if (Route::has('register'))
                <a href="{{ route('register') }}">{{ __('Create an account') }}</a>
            @endif
        </div>
    </form>
@endsection
