<!doctype html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Bicicletería Lauck - Inicio de sesión</title>
    <script src="https://cdn.tailwindcss.com"></script>
</head>

<body class="bg-gradient-to-br from-blue-500 to-blue-700 flex items-center justify-center min-h-screen px-4">
    <div class="flex flex-col items-center space-y-6 w-full max-w-lg">
        <!-- Título -->
        <h1 class="text-4xl font-bold text-white text-center drop-shadow-lg"> Bicicletería Lauck </h1>

        <!-- Formulario -->
        <div class="bg-white p-8 rounded-xl shadow-lg w-full max-w-md">
            <form action="{{ route('login.attempt') }}" method="POST" class="space-y-5">
                @csrf
{{-- No muestra los errores, ver --}}
                @if ($errors->any())
                    <div>
                        <ul>
                            @foreach ($errors->all() as $error)
                                <li>{{ $error }}</li>
                            @endforeach
                        </ul>
                    </div>
                @endif

                <div>
                    <label class="block text-sm font-medium text-gray-700 mb-1">Correo electrónico</label>
                    <input type="email" name="email" required
                        class="w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-400">
                </div>

                <div>
                    <label class="block text-sm font-medium text-gray-700 mb-1">Contraseña</label>
                    <input type="password" name="password" required
                        class="w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-400">
                </div>

                <div>
                    <input type="submit" name="submit" value="Iniciar sesión"
                        class="w-full bg-blue-600 text-white py-2 rounded-md hover:bg-blue-700 transition-colors">
                </div>

                <p class="text-center text-sm text-gray-600">
                    ¿No tienes una cuenta? <a href="register" class="text-blue-600 hover:underline">Regístrate acá</a>.
                </p>
            </form>
        </div>
    </div>

</body>

</html>
