<x-layouts.guest title="Nova senha" heading="Defina uma nova senha"
                sub="Escolha uma senha com no mínimo 8 caracteres, contendo letras e números.">
    <form method="POST" action="{{ route('password.update') }}" class="space-y-5">
        @csrf
        <input type="hidden" name="token" value="{{ $token }}">

        @if ($errors->any())
            <div class="rounded-lg border border-rose-200 bg-rose-50 px-4 py-3 text-sm text-rose-800">
                {{ $errors->first() }}
            </div>
        @endif

        <div>
            <label for="email" class="label">E-mail</label>
            <input id="email" name="email" type="email" value="{{ old('email', $email) }}" required
                   class="input @error('email') input-error @enderror">
        </div>

        <div>
            <label for="password" class="label">Nova senha</label>
            <input id="password" name="password" type="password" required autocomplete="new-password"
                   class="input @error('password') input-error @enderror">
        </div>

        <div>
            <label for="password_confirmation" class="label">Confirme a nova senha</label>
            <input id="password_confirmation" name="password_confirmation" type="password" required
                   autocomplete="new-password" class="input">
        </div>

        <button type="submit" class="btn-primary w-full">Redefinir senha</button>
    </form>
</x-layouts.guest>
