<x-guest-layout>
    <div class="mb-8">
        <p class="text-sm font-semibold uppercase tracking-[0.24em] text-sky-600">{{ __('Account Login') }}</p>
        <h2 class="mt-3 text-3xl font-bold text-slate-950">{{ __('Sign in to continue') }}</h2>
        <p class="mt-3 text-sm leading-6 text-slate-500">{{ __('Access your dashboard using your registered email and password.') }}</p>
    </div>

    <x-auth-session-status class="mb-5 rounded-2xl border border-emerald-100 bg-emerald-50 px-4 py-3 text-sm text-emerald-700" :status="session('status')" />

    <form method="POST" action="{{ route('login') }}" class="space-y-5">
        @csrf

        <div>
            <x-input-label for="email" :value="__('Email address')" class="text-sm font-semibold text-slate-700" />
            <x-text-input id="email" class="mt-2 block w-full rounded-2xl border-slate-200 bg-slate-50 px-4 py-3 text-base shadow-none transition focus:border-sky-400 focus:bg-white focus:ring-sky-200" type="email" name="email" :value="old('email')" required autofocus autocomplete="username" placeholder="name@example.com" />
            <x-input-error :messages="$errors->get('email')" class="mt-2" />
        </div>

        <div>
            <div class="flex items-center justify-between gap-4">
                <x-input-label for="password" :value="__('Password')" class="text-sm font-semibold text-slate-700" />

                @if (Route::has('password.request'))
                    <a class="text-sm font-medium text-sky-600 transition hover:text-sky-700 focus:outline-none focus:ring-2 focus:ring-sky-400 focus:ring-offset-2" href="{{ route('password.request') }}">
                        {{ __('Forgot password?') }}
                    </a>
                @endif
            </div>

            <x-text-input id="password" class="mt-2 block w-full rounded-2xl border-slate-200 bg-slate-50 px-4 py-3 text-base shadow-none transition focus:border-sky-400 focus:bg-white focus:ring-sky-200"
                            type="password"
                            name="password"
                            required autocomplete="current-password" placeholder="Enter your password" />

            <x-input-error :messages="$errors->get('password')" class="mt-2" />
        </div>

        <div class="flex items-center justify-between gap-4">
            <label for="remember_me" class="inline-flex items-center gap-2">
                <input id="remember_me" type="checkbox" class="rounded border-slate-300 text-sky-600 shadow-sm focus:ring-sky-500" name="remember">
                <span class="text-sm text-slate-600">{{ __('Remember me') }}</span>
            </label>
        </div>

        <div class="space-y-4 pt-2">
            <x-primary-button class="flex w-full justify-center rounded-2xl border-0 bg-gradient-to-r from-sky-500 to-violet-500 px-5 py-3 text-sm font-bold normal-case tracking-normal shadow-lg shadow-sky-200 transition hover:from-sky-600 hover:to-violet-600 focus:bg-sky-600 focus:ring-sky-300 active:bg-sky-700">
                {{ __('Log in') }}
            </x-primary-button>

            @if (Route::has('register'))
                <p class="text-center text-sm text-slate-600">
                    {{ __("Don't have an account?") }}
                    <a href="{{ route('register') }}" class="font-semibold text-rose-500 transition hover:text-rose-600 focus:outline-none focus:ring-2 focus:ring-rose-300 focus:ring-offset-2">
                        {{ __('Create one') }}
                    </a>
                </p>
            @endif
        </div>
    </form>
</x-guest-layout>
