@extends('layouts.app')

@section('title', 'Login - Al-wasi Soft Tech')

@section('content')
<div class="min-h-screen bg-gray-100 flex">
    <div class="hidden lg:block relative w-0 flex-1 bg-gray-800">
        <img class="absolute inset-0 h-full w-full object-cover" src="https://images.unsplash.com/photo-1587560699334-bea93391d69a?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1950&q=80" alt="">
        <div class="absolute inset-0 bg-gray-900 bg-opacity-50"></div>
        <div class="absolute inset-0 flex items-center justify-center text-white text-center p-8">
            <div>
                <h1 class="text-4xl font-bold">Al-wasi Soft Tech</h1>
                <p class="mt-2 text-lg">Your trusted courier partner</p>
            </div>
        </div>
    </div>
    <div class="flex-1 flex flex-col justify-center py-12 px-4 sm:px-6 lg:flex-none lg:px-20 xl:px-24">
        <div class="mx-auto w-full max-w-sm lg:w-96">
            <div>
                <h2 class="mt-6 text-3xl font-extrabold text-gray-900">Sign in to your account</h2>
                <p class="mt-2 text-sm text-gray-600">
                    Or
                    <a href="{{ route('register') }}" class="font-medium text-blue-600 hover:text-blue-500">
                        create a new account
                    </a>
                </p>
            </div>

            <div class="mt-8">
                <form action="{{ route('login') }}" method="POST" class="space-y-6">
                    @csrf
                    <div>
                        <label for="email" class="block text-sm font-medium text-gray-700">Email address</label>
                        <div class="mt-1">
                            <input id="email" name="email" type="email" autocomplete="email" required class="appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm" value="{{ old('email') }}">
                        </div>
                    </div>

                    <div>
                        <label for="password" class="block text-sm font-medium text-gray-700">Password</label>
                        <div class="mt-1">
                            <input id="password" name="password" type="password" autocomplete="current-password" required class="appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm">
                        </div>
                    </div>

                    @error('email')
                        <div class="text-red-600 text-sm">{{ $message }}</div>
                    @enderror

                    <div class="flex items-center justify-between">
                        <div class="flex items-center">
                            <input id="remember" name="remember" type="checkbox" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
                            <label for="remember" class="ml-2 block text-sm text-gray-900">Remember me</label>
                        </div>
                    </div>

                    <div>
                        <button type="submit" class="w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500">
                            Sign in
                        </button>
                    </div>

                    <div class="text-sm text-center text-gray-600">
                        <p class="mb-2">Demo Accounts:</p>
                        <p><strong>Seller:</strong> catherine@chicboutique.com / password</p>
                        <p><strong>Admin:</strong> admin@alwasisofttech.com / password</p>
                        <p><strong>Branch:</strong> branch.multan@alwasisofttech.com / password</p>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
@endsection
