<x-guest-layout>
    <div class="mb-7">
        <span class="inline-flex items-center gap-2 rounded-lg bg-indigo-50 px-3 py-1.5 text-xs font-black uppercase text-indigo-600 dark:bg-indigo-500/10 dark:text-indigo-300">
            <span class="material-symbols-outlined text-base">lock_open</span>
            Welcome back
        </span>
        <h1 class="mt-4 text-3xl font-black leading-tight text-slate-950 dark:text-white" style="font-family: Manrope, Inter, sans-serif;">Log in to your workspace</h1>
        <p class="urless-auth-muted mt-3 text-sm font-semibold leading-6 text-slate-600 dark:text-zinc-300">Manage short links, interstitial ads, realtime analytics, and subscription settings.</p>
    </div>

    <x-auth-session-status class="mb-4" :status="session('status')" />

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

        <div>
            <x-input-label for="email" :value="__('Email')" />
            <div class="relative mt-2">
                <span class="material-symbols-outlined pointer-events-none absolute left-4 top-1/2 -translate-y-1/2 text-xl text-slate-400">mail</span>
                <x-text-input id="email" class="block w-full pl-12" type="email" name="email" :value="old('email')" required autofocus autocomplete="username" placeholder="you@example.com" />
            </div>
            <x-input-error :messages="$errors->get('email')" class="mt-2" />
        </div>

        <div>
            <x-input-label for="password" :value="__('Password')" />

            <div x-data="{ showPassword: false }" class="relative mt-2">
                <span class="material-symbols-outlined pointer-events-none absolute left-4 top-1/2 -translate-y-1/2 text-xl text-slate-400">key</span>
                <x-text-input id="password" class="block w-full pl-12 pr-14"
                                x-bind:type="showPassword ? 'text' : 'password'"
                                name="password"
                                placeholder="Enter your password"
                                required autocomplete="current-password" />
                <button type="button" class="absolute right-3 top-1/2 inline-flex h-10 w-10 -translate-y-1/2 items-center justify-center rounded-lg text-slate-500 transition-colors hover:bg-slate-100 hover:text-primary focus:outline-none focus:ring-2 focus:ring-primary/20 dark:text-zinc-300 dark:hover:bg-zinc-800 dark:hover:text-white" x-on:click="showPassword = ! showPassword" x-bind:aria-label="showPassword ? 'Hide password' : 'Show password'">
                    <span class="sr-only" x-text="showPassword ? 'Hide password' : 'Show password'">Show password</span>
                    <span class="material-symbols-outlined text-xl" x-text="showPassword ? 'visibility_off' : 'visibility'">visibility</span>
                </button>
            </div>

            <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">
                <input id="remember_me" type="checkbox" class="rounded border-slate-300 text-indigo-600 shadow-sm focus:ring-indigo-500 dark:border-zinc-700 dark:bg-zinc-950 dark:focus:ring-indigo-500 dark:focus:ring-offset-zinc-900" name="remember">
                <span class="urless-auth-muted ms-2 text-sm font-semibold text-slate-600 dark:text-zinc-300">{{ __('Remember me') }}</span>
            </label>

            @if (Route::has('password.request'))
                <a class="rounded-md text-sm font-bold text-indigo-600 hover:text-indigo-800 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 dark:text-indigo-300 dark:hover:text-white dark:focus:ring-offset-zinc-900" href="{{ route('password.request') }}">
                    {{ __('Forgot your password?') }}
                </a>
            @endif
        </div>

        <x-primary-button class="w-full rounded-lg bg-indigo-600 py-4 text-base shadow-lg shadow-indigo-600/20 hover:bg-indigo-700">
            {{ __('Log in') }}
        </x-primary-button>

    </form>

    <p class="urless-auth-muted mt-7 text-center text-sm font-semibold text-slate-600 dark:text-zinc-300">
        New to urless?
        <a href="{{ route('register') }}" class="font-extrabold text-indigo-600 hover:text-indigo-800 dark:text-indigo-300">Create an account</a>
    </p>
</x-guest-layout>
