<?php $__env->startSection('title', 'Login - ' . \App\Models\SiteSetting::getSiteName()); ?>

<?php $__env->startSection('content'); ?>
<div class="min-h-screen flex items-start justify-center pt-20" style="background: linear-gradient(180deg, #E8F0F8 0%, #D1E0ED 100%);">
    <div class="max-w-lg w-full space-y-6">
        <div class="bg-white rounded-lg shadow-lg p-8">
            <div class="text-center mb-8">
                <div class="mx-auto h-24 w-24 flex items-center justify-center mb-4">
                    <img src="<?php echo e(asset('assets/images/icon/htl.webp')); ?>" alt="">
                </div>
                <h2 class="text-2xl font-bold text-gray-800 mb-2">
                    <?php echo e(\App\Models\SiteSetting::getSiteName()); ?>

                </h2>
                <p class="text-sm text-gray-600">
                    Sign in to your account
                </p>
            </div>
            
            <?php if(session('error')): ?>
                <div class="bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded mb-6">
                    <?php echo e(session('error')); ?>

                </div>
            <?php endif; ?>
            
            <form class="space-y-6" action="<?php echo e(route('login.post')); ?>" method="POST">
                <?php echo csrf_field(); ?>
                <div class="space-y-4">
                    <div>
                        <label for="email" class="block text-sm font-medium text-gray-700 mb-2">Username or Email</label>
                        <input id="email" name="email" type="text" required 
                               class="w-full px-4 py-3 border border-gray-300 rounded-md focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500 text-gray-900 placeholder-gray-500" 
                               placeholder="Username or email">
                    </div>
                    <div>
                        <label for="password" class="block text-sm font-medium text-gray-700 mb-2">Password</label>
                        <input id="password" name="password" type="password" required 
                               class="w-full px-4 py-3 border border-gray-300 rounded-md focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500 text-gray-900 placeholder-gray-500" 
                               placeholder="Enter password">
                    </div>
                </div>

                <div class="pt-4">
                    <button type="submit" id="loginBtn"
                            class="w-full py-3 px-4 border border-transparent text-sm font-medium rounded-md text-white bg-gray-400 cursor-not-allowed transition duration-200" 
                            disabled>
                        LOGIN
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?> 

<?php $__env->startPush('script'); ?>
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            const emailInput = document.getElementById('email');
            const passwordInput = document.getElementById('password');
            const loginBtn = document.getElementById('loginBtn');
            
            function checkFormValidity() {
                const emailValue = emailInput.value.trim();
                const passwordValue = passwordInput.value.trim();
                
                if (emailValue && passwordValue) {
                    // Enable button
                    loginBtn.disabled = false;
                    loginBtn.classList.remove('bg-gray-400', 'cursor-not-allowed');
                    loginBtn.classList.add('bg-blue-600', 'hover:bg-blue-700', 'focus:ring-2', 'focus:ring-offset-2', 'focus:ring-blue-500');
                } else {
                    // Disable button
                    loginBtn.disabled = true;
                    loginBtn.classList.remove('bg-blue-600', 'hover:bg-blue-700', 'focus:ring-2', 'focus:ring-offset-2', 'focus:ring-blue-500');
                    loginBtn.classList.add('bg-gray-400', 'cursor-not-allowed');
                }
            }
            
            // Add event listeners to both input fields
            emailInput.addEventListener('input', checkFormValidity);
            passwordInput.addEventListener('input', checkFormValidity);
            
            // Initial check
            checkFormValidity();
        });
    </script>
<?php $__env->stopPush(); ?>
<?php echo $__env->make('backend.layouts.guest', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home4/lvwxwpmy/public_html/hotelms/resources/views/auth/login.blade.php ENDPATH**/ ?>