<x-guest-layout>
    <style>
        .login-container {
            display: flex;
            min-height: 100vh;
            width: 100%;
            background-color: #0a0a0a;
        }
        .image-side {
            display: none;
            width: 50%;
            background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('{{ asset("images/login-bg.png") }}');
            background-size: cover;
            background-position: center;
            position: relative;
        }
        .form-side {
            width: 100%;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            padding: 2rem;
            color: white;
        }
        @media (min-width: 768px) {
            .image-side { display: flex; align-items: center; justify-content: center; }
            .form-side { width: 50%; padding: 4rem; }
        }
        .custom-input {
            background-color: #111 !important;
            border: 1px solid #333 !important;
            color: white !important;
            width: 100%;
            padding: 0.75rem;
            border-radius: 0.5rem;
            margin-top: 0.5rem;
        }
        .custom-input:focus {
            border-color: #d4af37 !important;
            outline: none;
            box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
        }
        .gold-button {
            background: linear-gradient(to right, #d4af37, #b08d2a);
            color: black;
            font-weight: bold;
            padding: 0.75rem;
            border-radius: 0.5rem;
            width: 100%;
            transition: 0.3s;
            border: none;
            cursor: pointer;
        }
        .gold-button:hover {
            opacity: 0.9;
            transform: translateY(-1px);
        }
    </style>

    <div class="login-container" dir="rtl">
        <!-- Image Side -->
        <div class="image-side">
            <div class="text-center p-12">
                <div class="mb-4">
                    <span class="text-4xl font-bold text-white uppercase tracking-wider">TQ <span style="color: #d4af37;">CARS</span></span>
                </div>
                <h2 class="text-3xl font-bold text-white mb-8" style="line-height: 1.5;">
                    اكتشف عالم الفخامة والتميز في قيادة السيارات
                </h2>
                <div style="display: flex; justify-content: center; gap: 1.5rem;">
                    <div style="background: rgba(212,175,55,0.15); border: 1px solid rgba(212,175,55,0.4); padding: 0.6rem 1.8rem; border-radius: 99px; color: #d4af37; font-size: 1rem; display: flex; align-items: center; gap: 0.5rem;">
                        <span>سرعة</span>
                    </div>
                    <div style="background: rgba(212,175,55,0.15); border: 1px solid rgba(212,175,55,0.4); padding: 0.6rem 1.8rem; border-radius: 99px; color: #d4af37; font-size: 1rem; display: flex; align-items: center; gap: 0.5rem;">
                        <span>فخامة</span>
                    </div>
                    <div style="background: rgba(212,175,55,0.15); border: 1px solid rgba(212,175,55,0.4); padding: 0.6rem 1.8rem; border-radius: 99px; color: #d4af37; font-size: 1rem; display: flex; align-items: center; gap: 0.5rem;">
                        <span>تميز</span>
                    </div>
                </div>
            </div>
        </div>

        <!-- Form Side -->
        <div class="form-side">
            <div class="md:hidden text-center mb-8">
                <h1 class="text-3xl font-bold text-white">
                    TQ <span style="color: #d4af37;">CARS</span>
                </h1>
            </div>

            <div style="max-width: 400px; width: 100%; margin: auto;">
                <div style="margin-bottom: 2.5rem;">
                    <h2 class="text-3xl font-bold mb-2">تسجيل الدخول</h2>
                    <p style="color: #999;">مرحباً بك مجدداً في لوحة التحكم</p>
                </div>

                <x-auth-session-status class="mb-4" :status="session('status')" />

                <form method="POST" action="{{ route('login') }}">
                    @csrf

                    <div style="margin-bottom: 1.5rem;">
                        <label style="color: #ccc; font-size: 0.875rem;">البريد الإلكتروني</label>
                        <input id="email" class="custom-input" type="email" name="email" value="{{ old('email') }}" required autofocus />
                        <x-input-error :messages="$errors->get('email')" class="mt-2" />
                    </div>

                    <div style="margin-bottom: 1.5rem;">
                        <label style="color: #ccc; font-size: 0.875rem;">كلمة المرور</label>
                        <input id="password" class="custom-input" type="password" name="password" required />
                        <x-input-error :messages="$errors->get('password')" class="mt-2" />
                    </div>

                    <div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem;">
                        <label style="display: flex; align-items: center; cursor: pointer;">
                            <input type="checkbox" name="remember" style="accent-color: #d4af37;">
                            <span style="margin-right: 0.5rem; font-size: 0.875rem; color: #999;">تذكرني</span>
                        </label>
                        @if (Route::has('password.request'))
                            <a href="{{ route('password.request') }}" style="color: #d4af37; font-size: 0.875rem; text-decoration: none;">نسيت كلمة المرور؟</a>
                        @endif
                    </div>

                    <button type="submit" class="gold-button">
                        دخول النظام
                    </button>
                </form>
            </div>

            <div style="text-align: center; color: #666; font-size: 0.875rem; border-top: 1px solid #222; padding-top: 1.5rem; margin-top: 2rem;">
                <p>البرنامج يعمل بنسخة 1.0.0 إحدى مشاريع تطبيق كلاود</p>
                <p style="margin-top: 0.25rem;">&copy; {{ date('Y') }} جميع الحقوق محفوظة</p>
            </div>
        </div>
    </div>
</x-guest-layout>
