<!DOCTYPE html>
<html lang="<?php echo e(str_replace('_', '-', app()->getLocale())); ?>">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">

        <title>Iniciar Sesión - DIAGNOSTIKA</title>

        <!-- Fonts -->
        <link rel="preconnect" href="https://fonts.bunny.net">
        <link href="https://fonts.bunny.net/css?family=roboto:400,500,700&display=swap" rel="stylesheet" />

        <!-- Tailwind CSS -->
        <?php if(file_exists(public_path('build/manifest.json')) || file_exists(public_path('hot'))): ?>
            <?php echo app('Illuminate\Foundation\Vite')(['resources/css/app.css', 'resources/js/app.js']); ?>
        <?php else: ?>
            <script src="https://cdn.tailwindcss.com"></script>
        <?php endif; ?>
    </head>
    <body class="min-h-screen bg-gradient-to-b from-blue-900 to-blue-800 font-sans flex items-center justify-center">
        <div class="w-full max-w-md bg-white rounded-lg shadow-xl p-8">
            <!-- Logo -->
            <div class="flex justify-center mb-6">
                <img src="<?php echo e(asset('images/logo.gif')); ?>" alt="DIAGNOSTIKA Logo" class="h-14" />
            </div>

            <h1 class="text-2xl font-bold text-gray-800 mb-6 text-center">Iniciar Sesión</h1>

            <?php if($errors->any()): ?>
                <div class="bg-red-100 text-red-700 px-4 py-3 rounded mb-6">
                    <p class="font-semibold">Error en la validación:</p>
                    <ul>
                        <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <li><?php echo e($error); ?></li>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </ul>
                </div>
            <?php endif; ?>

            <form method="POST" action="<?php echo e(route('login')); ?>" class="space-y-4">
                <?php echo csrf_field(); ?>

                <div>
                    <label for="email" class="block text-sm font-semibold text-gray-700 mb-2">Correo Electrónico</label>
                    <input 
                        type="email" 
                        id="email" 
                        name="email" 
                        required 
                        autofocus 
                        value="<?php echo e(old('email')); ?>"
                        class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:border-blue-900 focus:ring-2 focus:ring-blue-900"
                        placeholder="ejemplo@instituccion.edu"
                    >
                </div>

                <div>
                    <label for="password" class="block text-sm font-semibold text-gray-700 mb-2">Contraseña</label>
                    <input 
                        type="password" 
                        id="password" 
                        name="password" 
                        required 
                        class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:border-blue-900 focus:ring-2 focus:ring-blue-900"
                        placeholder="••••••••"
                    >
                </div>

                <div class="flex items-center">
                    <input 
                        type="checkbox" 
                        id="remember" 
                        name="remember" 
                        class="rounded border-gray-300 text-blue-900 focus:ring-blue-900"
                    >
                    <label for="remember" class="ml-2 text-sm text-gray-600">Recuérdame</label>
                </div>

                <button 
                    type="submit" 
                    class="w-full bg-blue-900 text-white py-2 rounded-lg font-semibold hover:bg-blue-800 transition"
                >
                    Iniciar Sesión
                </button>
            </form>

            <p class="text-center text-gray-600 mt-6">
                ¿No tienes cuenta? <a href="<?php echo e(route('register')); ?>" class="text-blue-900 font-semibold hover:underline">Regístrate aquí</a>
            </p>

            <p class="text-center text-gray-600 mt-4">
                <a href="<?php echo e(route('welcome') ?? '/'); ?>" class="text-blue-900 font-semibold hover:underline">Volver al inicio</a>
            </p>
        </div>
    </body>
</html>
<?php /**PATH D:\proyecto-web\diagnostika\src\resources\views/auth/login.blade.php ENDPATH**/ ?>