<x-guest-layout>
    <div class="mb-6 flex justify-center">
        <img
            src="{{ asset('images/mega-theron-logo.png') }}"
            alt="Mega Theron Group"
            class="h-20 w-auto object-contain"
        />
    </div>

    <h2 class="mb-2 text-center text-lg font-semibold text-gray-800">Set Your New Password</h2>
    <p class="mb-6 text-center text-sm text-gray-600">You must set a new password before you can sign in.</p>

    <x-auth-session-status class="mb-4 text-sm text-gray-700" :status="session('status')" />
    <x-input-error :messages="$errors->get('password')" class="mb-4" />

    <form method="POST" action="{{ route('first-login.password.update', $token) }}" class="space-y-4">
        @csrf

        <div>
            <x-input-label for="password" :value="__('New password')" class="text-gray-700" />
            <x-text-input
                id="password"
                class="block mt-1 w-full rounded-md focus:ring-red-500 focus:border-red-500"
                type="password"
                name="password"
                required
                autofocus
                autocomplete="new-password"
            />
            @if(!empty($passwordHint))
                <p class="mt-1 text-xs text-gray-500">{{ $passwordHint }}</p>
            @endif
        </div>

        <div>
            <x-input-label for="password_confirmation" :value="__('Confirm password')" class="text-gray-700" />
            <x-text-input
                id="password_confirmation"
                class="block mt-1 w-full rounded-md focus:ring-red-500 focus:border-red-500"
                type="password"
                name="password_confirmation"
                required
                autocomplete="new-password"
            />
        </div>

        <div class="flex items-center justify-between pt-2">
            <a
                href="{{ route('login') }}"
                class="text-sm text-gray-600 hover:text-gray-900 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500"
            >
                Back to login
            </a>
            <x-primary-button class="bg-red-600 hover:bg-red-700 focus:bg-red-700 active:bg-red-800 focus:ring-red-500">
                {{ __('Save Password') }}
            </x-primary-button>
        </div>
    </form>
</x-guest-layout>
