<x-layouts.guest
    title="Welcome Back"
    subtitle="Sign in to track orders, manage your wishlist, and check out faster."
>
    @if (session('status'))
        <x-frontend.alert type="success" class="mb-5">{{ session('status') }}</x-frontend.alert>
    @endif

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

        <div>
            <x-input-label for="email" value="Email Address" />
            <x-text-input id="email" type="email" name="email" :value="old('email')" required autofocus autocomplete="username" />
            <x-input-error :messages="$errors->get('email')" />
        </div>

        <div>
            <x-input-label for="password" value="Password" />
            <x-text-input id="password" type="password" name="password" required autocomplete="current-password" />
            <x-input-error :messages="$errors->get('password')" />
        </div>

        <div class="flex items-center justify-between text-sm">
            <label class="flex items-center gap-2 text-cream/70">
                <x-checkbox name="remember" />
                Remember me
            </label>

            @if (Route::has('password.request'))
                <a href="{{ route('password.request') }}" class="text-champagne transition hover:text-champagne-light">
                    Forgot password?
                </a>
            @endif
        </div>

        <x-primary-button>Sign In</x-primary-button>
    </form>

    <p class="mt-6 text-center text-sm text-cream/60">
        New to {{ config('niyarasa.brand_name') }}?
        <a href="{{ route('register') }}" class="font-medium text-champagne transition hover:text-champagne-light">
            Create an account
        </a>
    </p>
</x-layouts.guest>
