/* --- المتغيرات العامة للنظام --- */
        :root {
            --primary-color: #ff7b00;
            --secondary-color: #d90429;
            --admin-color: #fbbf24;
            --admin-bg: #1e293b;
            --text-dark: #0f172a;
            --text-gray: #475569;
            --text-light: #f8fafc;
            --success-color: #059669;
            --error-color: #dc2626;
            --glass-bg: rgba(255, 255, 255, 0.7);
            --glass-border: rgba(255, 255, 255, 0.5);
            --glass-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
            --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            --border-radius-xl: 30px;
            --border-radius-lg: 20px;
            --border-radius-md: 12px;
        }

        *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Tajawal', sans-serif; }
        
        body {
            min-height: 100vh;
            background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
            display: flex; flex-direction: column; align-items: center; justify-content: center;
            overflow-x: hidden; position: relative;
        }

        #particleCanvas {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            z-index: 0; pointer-events: none; opacity: 0.6;
        }

        .app-container {
            width: 95%; max-width: 1400px; z-index: 10; margin: 2rem auto;
            position: relative; display: flex; flex-direction: column; min-height: 85vh;
        }

        .glass-panel {
            display: flex; flex: 1; background: var(--glass-bg);
            backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px);
            border: 1px solid var(--glass-border); border-radius: var(--border-radius-xl);
            box-shadow: var(--glass-shadow); overflow: hidden; transition: var(--transition-smooth);
        }

        .glass-panel.admin-mode {
            background: rgba(15, 23, 42, 0.85); border-color: rgba(251, 191, 36, 0.3);
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
        }
        .glass-panel.admin-mode .info-section h1, 
        .glass-panel.admin-mode .info-section p,
        .glass-panel.admin-mode .service-item h4 { color: var(--text-light); }
        .glass-panel.admin-mode .service-item { background: rgba(255,255,255,0.05); }

        .info-section {
            flex: 1.3; padding: 4rem; display: flex; flex-direction: column; justify-content: center;
            border-left: 2px solid rgba(255,255,255,0.3); position: relative;
        }

        .logos-container { display: flex; gap: 25px; margin-bottom: 2.5rem; }
        
        .logo-box {
            width: 100px; height: 100px; background: #fff; border-radius: var(--border-radius-lg);
            padding: 15px; display: flex; align-items: center; justify-content: center;
            box-shadow: 0 15px 35px rgba(0,0,0,0.05); transition: var(--transition-smooth);
            border: 2px solid transparent; cursor: pointer; position: relative; overflow: hidden;
        }
        .logo-box::before {
            content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
            background: linear-gradient(45deg, transparent, rgba(255, 123, 0, 0.1), transparent);
            transform: rotate(45deg); transition: 0.6s; opacity: 0;
        }
        .logo-box:hover::before { opacity: 1; transform: rotate(45deg) translate(50%, 50%); }
        .logo-box:hover { transform: translateY(-10px); border-color: var(--primary-color); box-shadow: 0 20px 40px rgba(255,123,0,0.15); }
        .logo-box img { width: 100%; height: 100%; object-fit: contain; z-index: 2; position: relative; }

        .info-section h1 { font-size: 3.5rem; font-weight: 900; line-height: 1.2; margin-bottom: 1.5rem; color: var(--text-dark); }
        .info-section h1 span {
            background: linear-gradient(to left, var(--primary-color), var(--secondary-color));
            -webkit-background-clip: text; -webkit-text-fill-color: transparent;
        }
        .info-section p { font-size: 1.2rem; color: var(--text-gray); margin-bottom: 3rem; line-height: 1.8; max-width: 90%; }

        .services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
        .service-item {
            background: rgba(255, 255, 255, 0.5); padding: 20px; border-radius: var(--border-radius-lg);
            display: flex; align-items: center; gap: 15px; transition: var(--transition-smooth);
            border: 1px solid rgba(255,255,255,0.8);
        }
        .service-item:hover { transform: translateY(-5px) scale(1.02); background: #fff; box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
        .service-icon {
            width: 55px; height: 55px; background: rgba(255, 123, 0, 0.1); border-radius: 15px;
            display: flex; align-items: center; justify-content: center; font-size: 1.8rem;
        }

        .auth-section {
            flex: 1; padding: 4rem; display: flex; flex-direction: column; justify-content: center;
            background: rgba(255, 255, 255, 0.3); transition: var(--transition-smooth);
        }
        .glass-panel.admin-mode .auth-section { background: rgba(0, 0, 0, 0.2); }

        .auth-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
        .auth-header h2 { font-size: 2.2rem; font-weight: 900; color: var(--text-dark); transition: var(--transition-smooth); }
        .glass-panel.admin-mode .auth-header h2 { color: var(--admin-color); }

        .tabs-nav {
            display: flex; background: rgba(0, 0, 0, 0.05); padding: 8px;
            border-radius: var(--border-radius-lg); margin-bottom: 2.5rem; position: relative;
        }
        .glass-panel.admin-mode .tabs-nav { background: rgba(255, 255, 255, 0.1); }
        
        .tab-btn {
            flex: 1; padding: 16px; border: none; background: transparent; color: var(--text-gray);
            font-size: 1.1rem; font-weight: 800; cursor: pointer; z-index: 2; transition: var(--transition-smooth);
        }
        .glass-panel.admin-mode .tab-btn { color: #cbd5e1; }
        .tab-btn.active { color: var(--primary-color); }
        .glass-panel.admin-mode .tab-btn.active { color: var(--admin-color); }
        
        .tab-btn[data-target="adminForm"] { flex: 0.3; color: transparent; text-shadow: 0 0 0 rgba(0,0,0,0.3); }
        .tab-btn[data-target="adminForm"]:hover { text-shadow: 0 0 0 var(--admin-color); }
        .tab-btn[data-target="adminForm"].active { flex: 1; color: var(--admin-color); text-shadow: none; }

        .tab-slider {
            position: absolute; top: 8px; bottom: 8px; width: calc(42.5% - 8px);
            background: #fff; border-radius: 14px; transition: var(--transition-smooth); z-index: 1;
            box-shadow: 0 4px 15px rgba(0,0,0,0.05);
        }
        .glass-panel.admin-mode .tab-slider { background: rgba(255, 255, 255, 0.1); }
        
        .tabs-nav[data-active="login"] .tab-slider { right: 8px; width: calc(42.5% - 8px); }
        .tabs-nav[data-active="register"] .tab-slider { right: 42.5%; width: calc(42.5% - 8px); }
        .tabs-nav[data-active="admin"] .tab-slider { right: 85%; width: calc(15% - 8px); background: var(--admin-color); }
        .tabs-nav[data-active="admin"].admin-expanded .tab-slider { right: 8px; width: calc(100% - 16px); background: rgba(251, 191, 36, 0.2); border: 1px solid var(--admin-color); }

        .form-container { display: none; flex-direction: column; gap: 22px; animation: formEnter 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
        .form-container.active { display: flex; }
        @keyframes formEnter { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

        .input-group { position: relative; }
        .input-group label { display: block; font-size: 1rem; font-weight: 800; margin-bottom: 10px; color: var(--text-dark); transition: 0.3s; }
        .glass-panel.admin-mode .input-group label { color: #e2e8f0; }
        
        .input-wrapper { position: relative; display: flex; align-items: center; }
        .input-wrapper input {
            width: 100%; padding: 20px 50px 20px 20px;
            background: rgba(255, 255, 255, 0.9); border: 2px solid transparent;
            border-radius: var(--border-radius-md); font-size: 1.1rem; font-weight: 600;
            outline: none; transition: var(--transition-smooth); box-shadow: 0 4px 6px rgba(0,0,0,0.02);
        }
        .glass-panel.admin-mode .input-wrapper input { background: rgba(15, 23, 42, 0.6); color: #fff; border-color: rgba(255,255,255,0.1); }
        .input-wrapper input:focus { border-color: var(--primary-color); box-shadow: 0 0 0 5px rgba(255, 123, 0, 0.1); }
        .glass-panel.admin-mode .input-wrapper input:focus { border-color: var(--admin-color); box-shadow: 0 0 0 5px rgba(251, 191, 36, 0.1); }
        
        .input-emoji { position: absolute; right: 18px; font-size: 1.3rem; pointer-events: none; }
        .pwd-toggle { position: absolute; left: 18px; background: none; border: none; font-size: 1.3rem; cursor: pointer; transition: 0.2s; }
        .pwd-toggle:hover { transform: scale(1.2); }

        .error-msg {
            color: var(--error-color); font-size: 0.85rem; font-weight: 700;
            margin-top: 8px; display: flex; align-items: center; gap: 5px;
            opacity: 0; max-height: 0; overflow: hidden; transition: var(--transition-smooth);
        }
        .error-msg.active { opacity: 1; max-height: 30px; }

        .btn-submit {
            width: 100%; padding: 22px; margin-top: 15px;
            background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
            border: none; border-radius: var(--border-radius-md); color: #fff;
            font-size: 1.2rem; font-weight: 900; cursor: pointer;
            transition: var(--transition-smooth); position: relative; overflow: hidden;
            display: flex; justify-content: center; align-items: center;
        }
        .btn-submit::after {
            content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
            background: linear-gradient(to right, transparent, rgba(255,255,255,0.3), transparent);
            transform: skewX(-20deg); transition: 0.5s;
        }
        .btn-submit:hover { transform: translateY(-3px); box-shadow: 0 15px 25px rgba(217, 4, 41, 0.3); }
        .btn-submit:hover::after { left: 150%; }

        #btnAdminLogin { background: linear-gradient(135deg, #d97706, #b45309); }
        #btnAdminLogin:hover { box-shadow: 0 15px 25px rgba(217, 119, 6, 0.3); }

        .spinner {
            display: none; width: 28px; height: 28px;
            border: 4px solid rgba(255,255,255,0.3); border-top-color: #fff;
            border-radius: 50%; animation: spin 1s linear infinite;
        }
        .btn-submit.loading .btn-text { display: none; }
        .btn-submit.loading .spinner { display: block; }
        @keyframes spin { to { transform: rotate(360deg); } }

        .system-footer {
            width: 100%; text-align: center; padding: 20px; z-index: 10;
            color: var(--text-gray); font-size: 1rem; font-weight: 600;
            display: flex; flex-direction: column; gap: 8px; margin-top: auto;
        }
        .system-footer p { margin: 0; }
        .system-footer .highlight { color: var(--primary-color); font-weight: 800; }
        .system-footer .links a { color: var(--text-gray); text-decoration: none; margin: 0 10px; transition: 0.3s; }
        .system-footer .links a:hover { color: var(--primary-color); }
        .glass-panel.admin-mode ~ .system-footer,
        .glass-panel.admin-mode ~ .system-footer a { color: #94a3b8; }

        .toast-container { position: fixed; bottom: 40px; left: 40px; z-index: 9999; display: flex; flex-direction: column; gap: 15px; }
        .toast {
            min-width: 320px; background: #fff; border-radius: var(--border-radius-md);
            padding: 18px 25px; display: flex; align-items: center; gap: 15px;
            box-shadow: 0 15px 35px rgba(0,0,0,0.1); transform: translateX(-150%); opacity: 0;
            transition: var(--transition-smooth); border-right: 6px solid;
        }
        .toast.show { transform: translateX(0); opacity: 1; }
        .toast.success { border-right-color: var(--success-color); }
        .toast.error { border-right-color: var(--error-color); }
        .toast.admin { border-right-color: var(--admin-color); background: var(--admin-bg); color: #fff; }
        .toast-icon { font-size: 1.8rem; }
        .toast-body h4 { margin: 0 0 5px 0; font-size: 1.1rem; }
        .toast-body p { margin: 0; font-size: 0.95rem; opacity: 0.8; }

        /* =========================================
           إضافة أكواد التجاوب (Responsive Design) للهواتف
           ========================================= */
        @media (max-width: 992px) {
            .app-container {
                margin: 1rem auto;
                width: 95%;
            }
            .glass-panel {
                flex-direction: column; /* تحويل العرض ليكون عمودي بدل أفقي */
            }
            .info-section {
                padding: 2.5rem 1.5rem;
                border-left: none;
                border-bottom: 2px solid rgba(255,255,255,0.3);
                text-align: center;
                align-items: center;
            }
            .glass-panel.admin-mode .info-section {
                border-bottom-color: rgba(251, 191, 36, 0.3);
            }
            .logos-container {
                justify-content: center;
                gap: 15px;
                margin-bottom: 1.5rem;
            }
            .logo-box {
                width: 80px;
                height: 80px;
            }
            .info-section h1 {
                font-size: 2.2rem;
                margin-bottom: 1rem;
            }
            .info-section p {
                font-size: 1.1rem;
                margin-bottom: 2rem;
            }
            .services-grid {
                grid-template-columns: 1fr; /* عرض الخدمات تحت بعضها */
                width: 100%;
            }
            .auth-section {
                padding: 2.5rem 1.5rem;
            }
            .auth-header h2 {
                font-size: 1.8rem;
                text-align: center;
                width: 100%;
                margin-bottom: 1.5rem;
            }
            .tabs-nav {
                flex-wrap: wrap; /* السماح للأزرار بالنزول لسطر جديد إذا ضاقت المساحة */
                padding: 5px;
            }
            .tab-btn {
                padding: 12px 5px;
                font-size: 0.95rem;
            }
            .input-wrapper input {
                padding: 15px 45px 15px 15px;
                font-size: 1rem;
            }
            .btn-submit {
                padding: 18px;
                font-size: 1.1rem;
            }
            /* تعديل ظهور الإشعارات على الموبايل */
            .toast-container {
                left: 50%;
                transform: translateX(-50%);
                bottom: 20px;
                width: 90%;
            }
            .toast {
                min-width: unset;
                width: 100%;
                padding: 15px;
            }
            .toast.show {
                transform: translateX(0);
            }
        }

.admin-form-header {
    text-align: center;
    margin-bottom: 10px;
}

.admin-crown {
    font-size: 3rem;
    display: block;
}

.admin-form-subtitle {
    color: var(--admin-color);
    font-weight: 800;
    font-size: 1.2rem;
}