<!doctype html>
<html lang="es">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Nueva contraseña</title>
    @vite(['resources/css/app.css', 'resources/js/app.js'])
</head>
<body class="bg-light">
    <main class="container py-5">
        <div class="row justify-content-center">
            <div class="col-12 col-sm-10 col-md-8 col-lg-5">
                <div class="card shadow-sm border-0">
                    <div class="card-body p-4 p-md-5">
                        <h1 class="h4 mb-1 text-center">Nueva contraseña</h1>
                        <p class="text-muted text-center small mb-4">Ingresá tu nueva contraseña y confirmala para continuar.</p>

                        @if($errors->any())
                            <div class="alert alert-danger" role="alert">
                                <ul class="mb-0 ps-3">
                                    @foreach($errors->all() as $error)
                                        <li>{{ $error }}</li>
                                    @endforeach
                                </ul>
                            </div>
                        @endif

                        <form method="POST" action="/cliente/recuperar-credenciales/{{ $token }}" class="d-grid gap-3">
                            @csrf
                            <div>
                                <label class="form-label" for="contra">Nueva contraseña</label>
                                <input class="form-control" id="contra" name="contra" type="password" required autofocus minlength="6" maxlength="30">
                            </div>
                            <div>
                                <label class="form-label" for="contra_confirmation">Confirmar contraseña</label>
                                <input class="form-control" id="contra_confirmation" name="contra_confirmation" type="password" required minlength="6" maxlength="30">
                            </div>
                            <button class="btn btn-primary" type="submit">Guardar contraseña</button>
                        </form>

                        <hr class="my-4">
                        <div class="d-grid">
                            <a href="/login/cliente" class="btn btn-outline-secondary">Volver al login</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </main>
</body>
</html>
