<!DOCTYPE html>
<html lang="ar" dir="rtl">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>تسجيل الدخول - النخبة للحوالات</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.rtl.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
    <style>
        :root {
            --primary-color: #2c3e50;
            --secondary-color: #3498db;
            --success-color: #27ae60;
            --warning-color: #f39c12;
            --card-bg: #ffffff;
            --text-color: #2c3e50;
            --input-bg: #ffffff;
            --input-border: #e0e0e0;
        }
        [data-theme="dark"] {
            --card-bg: #16213e;
            --text-color: #eaeaea;
            --input-bg: #1a1a2e;
            --input-border: #2d3748;
        }
        * { box-sizing: border-box; }
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #1a252f 0%, #2c3e50 50%, #34495e 100%);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-color);
            transition: all 0.3s ease;
            margin: 0;
        }
        .login-container {
            width: 100%;
            max-width: 420px;
            padding: 20px;
        }
        .login-card {
            background: var(--card-bg);
            border-radius: 20px;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
            overflow: hidden;
            animation: slideUp 0.5s ease-out;
            transition: background 0.3s ease;
        }
        @keyframes slideUp {
            from { opacity: 0; transform: translateY(30px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .login-header {
            background: linear-gradient(135deg, var(--primary-color) 0%, #1a252f 100%);
            padding: 40px 30px;
            text-align: center;
            color: white;
        }
        .login-header h2 { margin: 0; font-weight: 600; }
        .login-header p { margin: 10px 0 0; opacity: 0.8; font-size: 14px; }
        .login-body { padding: 40px 30px; }
        .form-group { margin-bottom: 25px; position: relative; }
        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
            color: var(--text-color);
        }
        .form-control {
            border: 2px solid var(--input-border);
            border-radius: 10px;
            padding: 14px 16px;
            padding-right: 45px;
            font-size: 16px;
            transition: all 0.3s ease;
            background: var(--input-bg);
            color: var(--text-color);
        }
        .form-control:focus {
            border-color: var(--secondary-color);
            box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.15);
            background: var(--input-bg);
            color: var(--text-color);
        }
        .input-icon {
            position: absolute;
            right: 16px;
            bottom: 14px;
            color: #aaa;
            font-size: 18px;
        }
        .btn-login {
            background: linear-gradient(135deg, var(--secondary-color) 0%, #2980b9 100%);
            border: none;
            border-radius: 10px;
            padding: 14px;
            font-size: 18px;
            font-weight: 600;
            color: white;
            cursor: pointer;
            transition: all 0.3s ease;
            width: 100%;
        }
        .btn-login:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
        }
        .divider {
            text-align: center;
            margin: 25px 0;
            position: relative;
        }
        .divider::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 0;
            right: 0;
            height: 1px;
            background: var(--input-border);
        }
        .divider span {
            background: var(--card-bg);
            padding: 0 15px;
            position: relative;
            color: #888;
            font-size: 14px;
        }
        .register-link {
            text-align: center;
            color: #666;
        }
        .register-link a {
            color: var(--secondary-color);
            text-decoration: none;
            font-weight: 600;
        }
        .alert-danger {
            background: rgba(231, 76, 60, 0.1);
            border: 1px solid rgba(231, 76, 60, 0.3);
            color: #c0392b;
            border-radius: 10px;
            padding: 12px 15px;
        }
        .floating-shapes {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            overflow: hidden;
            z-index: -1;
        }
        .floating-shapes .shape {
            position: absolute;
            opacity: 0.1;
            animation: float 15s infinite;
        }
        .floating-shapes .shape:nth-child(1) { top: 20%; left: 10%; font-size: 80px; animation-delay: 0s; }
        .floating-shapes .shape:nth-child(2) { top: 60%; right: 10%; font-size: 60px; animation-delay: -5s; }
        .floating-shapes .shape:nth-child(3) { bottom: 20%; left: 30%; font-size: 70px; animation-delay: -10s; }
        @keyframes float {
            0%, 100% { transform: translateY(0) rotate(0deg); }
            50% { transform: translateY(-30px) rotate(10deg); }
        }
        .theme-toggle {
            position: fixed;
            top: 20px;
            left: 20px;
            background: rgba(255,255,255,0.1);
            border: 1px solid rgba(255,255,255,0.2);
            color: white;
            padding: 10px 15px;
            border-radius: 10px;
            cursor: pointer;
            font-size: 18px;
            transition: all 0.3s ease;
        }
        .theme-toggle:hover {
            background: rgba(255,255,255,0.2);
        }
        @media (max-width: 480px) {
            .login-header { padding: 30px 20px; }
            .login-body { padding: 30px 20px; }
            .login-card { border-radius: 15px; }
        }
    </style>
</head>
<body>
    <button class="theme-toggle" id="themeToggle">
        <i class="fas fa-moon"></i>
    </button>

    <div class="floating-shapes">
        <div class="shape"><i class="fas fa-exchange-alt"></i></div>
        <div class="shape"><i class="fas fa-wallet"></i></div>
        <div class="shape"><i class="fas fa-coins"></i></div>
    </div>

    <div class="login-container">
        <div class="login-card">
            <div class="login-header">
                <h2><i class="fas fa-exchange-alt"></i> النخبة للحوالات</h2>
                <p>مرحباً بك مجدداً - سجل دخولك للمتابعة</p>
            </div>
            <div class="login-body">
                @if($errors->any())
                    <div class="alert-danger mb-4">
                        <i class="fas fa-exclamation-circle me-2"></i>
                        {{ $errors->first() }}
                    </div>
                @endif

                <form method="POST" action="{{ route('login') }}">
                    @csrf
                    <div class="form-group">
                        <label>البريد الإلكتروني</label>
                        <input type="email" name="email" class="form-control" placeholder="example@email.com" required autofocus>
                        <i class="fas fa-envelope input-icon"></i>
                    </div>
                    <div class="form-group">
                        <label>كلمة المرور</label>
                        <input type="password" name="password" class="form-control" placeholder="••••••••" required>
                        <i class="fas fa-lock input-icon"></i>
                    </div>
                    <button type="submit" class="btn btn-login">
                        <i class="fas fa-sign-in-alt me-2"></i>
                        تسجيل الدخول
                    </button>
                </form>

                <p class="register-link text-center mt-4">
                    <i class="fas fa-shield-alt me-2"></i>
                    التسجيل متاح للمدراء فقط
                </p>
            </div>
        </div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
    <script>
        const themeToggle = document.getElementById('themeToggle');
        const savedTheme = localStorage.getItem('theme') || 'dark';
        document.documentElement.setAttribute('data-theme', savedTheme);
        updateThemeIcon(savedTheme);

        themeToggle.addEventListener('click', () => {
            const current = document.documentElement.getAttribute('data-theme');
            const newTheme = current === 'dark' ? 'light' : 'dark';
            document.documentElement.setAttribute('data-theme', newTheme);
            localStorage.setItem('theme', newTheme);
            updateThemeIcon(newTheme);
        });

        function updateThemeIcon(theme) {
            const icon = themeToggle.querySelector('i');
            icon.className = theme === 'dark' ? 'fas fa-sun' : 'fas fa-moon';
        }
    </script>
</body>
</html>
