
        /* =========================================
           CSS الخاص بقاعدة البيانات المركزية والموحد
           ========================================= */
        :root { --accent: #0c4a6e; --primary: #0c4a6e; --primary-dark: #082f49; }
        #app1-container, #app2-container { font-family: 'Cairo', sans-serif; transition: background 0.3s, color 0.3s; overflow-x: hidden; min-height: 100vh; display: flex; flex-direction: column; }
        
        body.dark { background-color: #020617; color: #f8fafc; }
        .dark .glass { backdrop-filter: blur(16px) saturate(180%); background: rgba(17, 25, 40, 0.75); border: 1px solid rgba(255, 255, 255, 0.125); box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3); }
        .dark input, .dark textarea { background-color: rgba(15, 23, 42, 0.8); color: white; border: 1px solid rgba(255, 255, 255, 0.1); }
        .dark select { background-color: rgba(15, 23, 42, 0.95) !important; color: white !important; border-color: rgba(255,255,255,0.1); }
        .dark select option { background-color: #0f172a !important; color: white !important; }
        
        body.light { background-color: #f1f5f9; color: #0f172a; }
        .light .glass { backdrop-filter: blur(16px) saturate(180%); background: rgba(255, 255, 255, 0.85); border: 1px solid rgba(209, 213, 219, 0.5); box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07); }
        .light input, .light textarea { background-color: #ffffff; color: #0f172a; border: 1px solid rgba(0,0,0,0.1); }
        .light .bg-slate-900 { background-color: #e2e8f0; }
        .light .bg-slate-800 { background-color: #cbd5e1; color: #0f172a; }
        .light .text-white { color: #0f172a; }
        .light .text-white\/50 { color: rgba(15, 23, 42, 0.6); }
        .light select { background-color: #ffffff !important; color: #0f172a !important; border-color: rgba(0,0,0,0.1); }
        .light select option { background-color: #ffffff !important; color: #0f172a !important; }

        .hide { display: none !important; }
        .active-tab { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important; color: white !important; box-shadow: 0 4px 15px rgba(12, 74, 110, 0.4); }
        
        #notif-container { position: fixed; top: 90px; left: 20px; z-index: 99999; display: flex; flex-direction: column; gap: 10px; }
        .notif-card { padding: 15px 25px; border-radius: 12px; background: linear-gradient(135deg, #0c4a6e, #082f49); color: white; box-shadow: 0 10px 20px rgba(12, 74, 110, 0.3); animation: slideInApp1 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
        @keyframes slideInApp1 { from { transform: translateX(-100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

        select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: left 1rem center; background-size: 1em; }

        #top-navbar { transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); will-change: transform; backdrop-filter: blur(20px); }

        /* =========================================
           CSS الخاص بمنصة المهام والأداء (App 2)
           ========================================= */
        #app2-container {
            --bg-body: transparent; --bg-card: rgba(255, 255, 255, 0.04);
            --text-main: inherit; --text-dim: #94a3b8;
            --p-low: #10b981; --p-med: #f59e0b; --p-high: #ef4444;
            --st-pending: #94a3b8; --st-progress: #0c4a6e; --st-submitted: #f59e0b; --st-completed: #8b5cf6;
        }

        body.light #app2-container {
            --bg-card: rgba(255, 255, 255, 0.8);
            --text-dim: #64748b;
        }
        
        /* Solid Dropdown Modifications */
        .solid-dropdown { background-color: #1e293b !important; backdrop-filter: none !important; opacity: 1 !important; }
        body.light .solid-dropdown { background-color: #ffffff !important; box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important; }

        #app2-container * { margin: 0; padding: 0; box-sizing: border-box; transition: all 0.25s ease; }

        #app2-container .auth-container { flex-grow: 1; display: flex; align-items: center; justify-content: center; padding: 20px;}
        #app2-container .auth-card { background: var(--bg-card); padding: 50px; border-radius: 35px; width: 100%; max-width: 480px; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.08); backdrop-filter: blur(20px); }

        #app2-container .app-layout { display: flex; flex-grow: 1; overflow-x: hidden; padding-top: 80px; }
        #app2-container aside { width: 300px; background: var(--bg-card); padding: 30px; border-left: 1px solid rgba(255,255,255,0.05); display: flex; flex-direction: column; position: sticky; top: 80px; height: calc(100vh - 80px); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); backdrop-filter: blur(20px); overflow-y: auto;}
        #app2-container .sidebar-hidden { margin-right: -300px; display: none !important; }
        #app2-container main { flex: 1; padding: 40px; overflow-y: auto; scroll-behavior: smooth; }

        #app2-container .nav-link { padding: 16px 20px; border-radius: 18px; color: var(--text-dim); display: flex; align-items: center; gap: 15px; margin-bottom: 8px; cursor: pointer; font-weight: 700; text-decoration: none; position: relative; overflow: hidden; }
        #app2-container .nav-link:hover { background: rgba(255,255,255,0.05); color: var(--text-main); transform: translateX(-5px); }
        #app2-container .nav-link.active { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: #fff !important; box-shadow: 0 10px 25px -5px rgba(12, 74, 110, 0.4); transform: scale(1.02); }

        #app2-container .card { background: var(--bg-card); padding: 35px; border-radius: 30px; border: 1px solid rgba(255,255,255,0.08); margin-bottom: 30px; position: relative; backdrop-filter: blur(20px); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.2);}
        #app2-container .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 25px; margin-bottom: 35px; }
        #app2-container .stat-item { background: linear-gradient(145deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 100%); padding: 30px 20px; border-radius: 25px; text-align: center; border-bottom: 4px solid var(--primary); border-top: 1px solid rgba(255,255,255,0.05); border-right: 1px solid rgba(255,255,255,0.02); border-left: 1px solid rgba(255,255,255,0.02); box-shadow: 0 8px 20px rgba(0,0,0,0.1); transition: transform 0.3s; }
        #app2-container .stat-item:hover { transform: translateY(-5px); }
        body.light #app2-container .stat-item { background: linear-gradient(145deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.4) 100%); }
        
        #app2-container input, #app2-container select, #app2-container textarea { width: 100%; padding: 16px 20px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.1); background: rgba(0,0,0,0.2); margin-bottom: 18px; outline: none; font-size: 15px; font-weight: 600; transition: all 0.3s; }
        body.light #app2-container input, body.light #app2-container select, body.light #app2-container textarea { background: rgba(255,255,255,0.5); border: 1px solid rgba(0,0,0,0.1); }
        #app2-container input:focus, #app2-container select:focus, #app2-container textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(12, 74, 110, 0.15); background: rgba(0,0,0,0.4); transform: translateY(-2px); }
        body.light #app2-container input:focus, body.light #app2-container select:focus, body.light #app2-container textarea:focus { background: #ffffff; }
        
        #app2-container .btn { padding: 14px 28px; border-radius: 16px; border: none; cursor: pointer; font-weight: 800; display: inline-flex; align-items: center; gap: 10px; justify-content: center; color: white; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); font-family: 'Cairo'; }
        #app2-container .btn-p { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); box-shadow: 0 8px 20px rgba(12, 74, 110, 0.3); }
        #app2-container .btn-p:hover { box-shadow: 0 12px 25px rgba(12, 74, 110, 0.4); transform: translateY(-2px); }
        #app2-container .btn-d { background: linear-gradient(135deg, #ef4444, #dc2626); box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3); }
        #app2-container .btn-sm { padding: 10px 18px; font-size: 13px; border-radius: 12px;}

        #app2-container .search-box { margin-bottom: 25px; position: relative; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
        #app2-container .search-box input { padding-right: 50px; background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%2394a3b8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>'); background-repeat: no-repeat; background-position: right 18px center; flex: 1; }

        .sidebar-search { width: 100%; padding: 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); background: rgba(0,0,0,0.3); color: #fff; transition: all 0.3s; margin-bottom: 15px; outline: none; font-weight: bold; }
        .sidebar-search:focus { border-color: var(--primary); box-shadow: 0 0 10px rgba(12,74,110,0.3); transform: scale(1.02); background: rgba(0,0,0,0.5); }

        #app2-container .task-card { background: linear-gradient(145deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 100%); padding: 25px; border-radius: 22px; border-right: 6px solid #444; margin-bottom: 20px; position: relative; box-shadow: 0 8px 20px rgba(0,0,0,0.1); border-top: 1px solid rgba(255,255,255,0.05); border-left: 1px solid rgba(255,255,255,0.02); border-bottom: 1px solid rgba(255,255,255,0.02); }
        body.light #app2-container .task-card { background: linear-gradient(145deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.4) 100%); }
        #app2-container .task-card:hover { transform: translateY(-3px); box-shadow: 0 12px 25px rgba(0,0,0,0.15); }
        #app2-container .task-status-pending { border-right-color: var(--st-pending); }
        #app2-container .task-status-progress { border-right-color: var(--st-progress); }
        #app2-container .task-status-submitted { border-right-color: var(--st-submitted); }
        #app2-container .task-status-completed { border-right-color: var(--st-completed); opacity: 0.85; }

        #app2-container .member-item { display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,0.03); padding: 18px; border-radius: 20px; margin-bottom: 15px; flex-wrap: wrap; gap: 15px; border: 1px solid rgba(255,255,255,0.05); }
        #app2-container .member-item:hover { background: rgba(255,255,255,0.06); }
        #app2-container .avatar { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; border: 3px solid var(--primary); padding: 3px; box-shadow: 0 4px 10px rgba(12, 74, 110, 0.3); }

        #app2-container .hidden { display: none !important; }
        #app2-container .modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.85); display: flex; align-items: center; justify-content: center; z-index: 11000; backdrop-filter: blur(10px); overflow-y: auto; padding: 20px;}
        #app2-container .modal-box { background: var(--bg-card); padding: 45px; border-radius: 35px; width: 100%; max-width: 650px; position: relative; max-height: 90vh; overflow-y: auto; border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 25px 50px -12px rgba(0,0,0,0.6); backdrop-filter: blur(25px); }
        body.light #app2-container .modal-box { background: rgba(255,255,255,0.95); }
        
        #app2-container .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
        #app2-container .grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
        
        #app2-container .perm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 25px; }
        #app2-container .perm-item { background: rgba(0,0,0,0.2); padding: 15px 20px; border-radius: 15px; display: flex; align-items: center; gap: 12px; border: 1px solid rgba(255,255,255,0.05); transition: background 0.3s; cursor: pointer; }
        #app2-container .perm-item:hover { background: rgba(255,255,255,0.05); }
        #app2-container .perm-item input { width: 20px; height: 20px; margin: 0; cursor: pointer; accent-color: var(--primary); }
        body.light #app2-container .perm-item { background: rgba(255,255,255,0.5); }
        
        #app2-container .disabled-field { opacity: 0.6; cursor: not-allowed; background: rgba(0,0,0,0.4) !important; }

        .notif-bell { position: relative; cursor: pointer; padding: 10px; font-size: 24px; transition: transform 0.3s; }
        .notif-bell:hover { transform: scale(1.1); }
        .notif-badge { position: absolute; top: 0; right: 0; background: #ef4444; color: #fff; font-size: 11px; font-weight: 900; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(239, 68, 68, 0.4); border: 2px solid #1e293b; }
        .notif-dropdown { position: absolute; top: 55px; left: 50%; right: auto; transform: translateX(-50%); background: rgba(30, 41, 59, 0.95); backdrop-filter: blur(20px); width: 420px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 20px 50px rgba(0,0,0,0.5); z-index: 2000; max-height: 80vh; overflow-y: auto; display: none; color: white; text-align: right; }
        body.light .notif-dropdown { background: rgba(255, 255, 255, 0.95); color: #0f172a; border-color: rgba(0,0,0,0.1); }
        .notif-dropdown.show { display: block; animation: fadeInCenter 0.3s ease; }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
        @keyframes fadeInCenter { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }
        .notif-item { padding: 18px; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 14px; white-space: normal; word-wrap: break-word; line-height: 1.6; transition: background 0.3s; text-align: right; }
        .notif-item:hover { background: rgba(255,255,255,0.05); }
        .notif-item:last-child { border-bottom: none; }
        .notif-date { color: var(--text-dim); font-size: 12px; margin-top: 8px; display: block; font-weight: 600; }
        .top-datetime { font-size: 15px; opacity: 0.9; font-weight: 700; background: rgba(255,255,255,0.05); padding: 10px 18px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.05); }

        #app2-container .kanban-board { display: flex; gap: 25px; overflow-x: auto; padding-bottom: 25px; min-height: 65vh; align-items: flex-start; scroll-snap-type: x mandatory; }
        #app2-container .kanban-column { flex: 1; min-width: 300px; background: rgba(255,255,255,0.02); border-radius: 25px; padding: 20px; border-top: 5px solid; display: flex; flex-direction: column; gap: 20px; border-left: 1px solid rgba(255,255,255,0.02); border-right: 1px solid rgba(255,255,255,0.02); border-bottom: 1px solid rgba(255,255,255,0.02); scroll-snap-align: start; }
        #app2-container .kanban-column h4 { margin-bottom: 15px; font-weight: 900; font-size: 16px; letter-spacing: 0.5px;}
        #app2-container .kanban-column.c-pending { border-color: var(--st-pending); }
        #app2-container .kanban-column.c-progress { border-color: var(--st-progress); }
        #app2-container .kanban-column.c-submitted { border-color: var(--st-submitted); }
        #app2-container .kanban-column.c-completed { border-color: var(--st-completed); }
        #app2-container .k-task { cursor: grab; background: var(--bg-card); border-right: 6px solid; margin-bottom: 0; padding: 20px; border-radius: 18px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); border-top: 1px solid rgba(255,255,255,0.05); border-left: 1px solid rgba(255,255,255,0.02); border-bottom: 1px solid rgba(255,255,255,0.02); transition: transform 0.2s, box-shadow 0.2s; }
        #app2-container .k-task:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.15); }
        #app2-container .k-task:active { cursor: grabbing; transform: scale(0.98); }
        
        #scrollTopBtn {
            position: fixed;
            bottom: 30px;
            left: 30px;
            background: var(--primary);
            color: white;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            font-size: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 10px 20px rgba(0,0,0,0.3);
            cursor: pointer;
            z-index: 99999;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s;
        }
        #scrollTopBtn.show {
            opacity: 1;
            visibility: visible;
        }

        @media (max-width: 768px) {
            #app2-container aside { position: fixed; right: -320px; top: 80px; width: 280px; height: calc(100vh - 80px); z-index: 9999; box-shadow: -10px 0 30px rgba(0,0,0,0.3); }
            #app2-container aside.mobile-open { right: 0; }
            #app2-container .sidebar-hidden { display: none !important; }
            #app2-container main { padding: 25px 15px; width: 100%; }
            #app2-container .auth-container { padding: 15px; }
            #app2-container .auth-card { padding: 35px 25px; }
            #app2-container .grid-2, #app2-container .grid-3, #app2-container .perm-grid { grid-template-columns: 1fr; gap: 15px; }
            
            .notif-dropdown { position: fixed; top: 75px; left: 50%; right: auto; width: 92vw; max-width: 380px; transform: translateX(-50%); }

            #app2-container .modal-box { padding: 35px 25px; width: 95%; max-height: 90vh; }
            #app2-container .stats-grid { grid-template-columns: 1fr; }
            #app2-container .task-card { padding: 20px; }
            #app2-container .kanban-board { flex-direction: column; scroll-snap-type: none; }
            #app2-container .kanban-column { min-width: 100%; }
        }

        /* =========================================
           تحسينات الاحترافية الشاملة - النسخة المطورة
           ========================================= */

        /* --- الخلفية المتحركة الديناميكية --- */
        body.dark::before {
            content: '';
            position: fixed;
            inset: 0;
            z-index: -1;
            background:
                radial-gradient(ellipse 80% 60% at 20% 10%, rgba(12, 74, 110, 0.12) 0%, transparent 60%),
                radial-gradient(ellipse 60% 50% at 80% 90%, rgba(99, 102, 241, 0.10) 0%, transparent 60%),
                radial-gradient(ellipse 50% 40% at 50% 50%, rgba(16, 185, 129, 0.05) 0%, transparent 70%),
                #020617;
            animation: bgPulse 12s ease-in-out infinite alternate;
        }
        body.light::before {
            content: '';
            position: fixed;
            inset: 0;
            z-index: -1;
            background:
                radial-gradient(ellipse 80% 60% at 20% 10%, rgba(12, 74, 110, 0.08) 0%, transparent 60%),
                radial-gradient(ellipse 60% 50% at 80% 90%, rgba(99, 102, 241, 0.06) 0%, transparent 60%),
                #f1f5f9;
            animation: bgPulse 12s ease-in-out infinite alternate;
        }
        @keyframes bgPulse {
            0% { opacity: 1; }
            100% { opacity: 0.85; }
        }

        /* --- شبكة النقاط في الخلفية --- */
        body.dark::after {
            content: '';
            position: fixed;
            inset: 0;
            z-index: -1;
            background-image: radial-gradient(circle, rgba(12, 74, 110, 0.08) 1px, transparent 1px);
            background-size: 32px 32px;
            pointer-events: none;
        }

        /* --- شريط التمرير المخصص --- */
        ::-webkit-scrollbar { width: 6px; height: 6px; }
        ::-webkit-scrollbar-track { background: rgba(255,255,255,0.03); border-radius: 10px; }
        ::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #0c4a6e, #075985); border-radius: 10px; }
        ::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #0369a1, #818cf8); }

        /* --- الشريط العلوي المحسّن --- */
        #top-navbar {
            background: rgba(2, 6, 23, 0.82) !important;
            border-bottom: 1px solid rgba(12, 74, 110, 0.15) !important;
            box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(12, 74, 110, 0.1);
        }
        body.light #top-navbar {
            background: rgba(255, 255, 255, 0.88) !important;
            border-bottom: 1px solid rgba(12, 74, 110, 0.12) !important;
            box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
        }
        #top-navbar h1 {
            background: linear-gradient(135deg, #c9a227 0%, #f0d060 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            letter-spacing: -0.3px;
        }

        /* --- شاشة الترحيب المحسّنة --- */
        /* Fullscreen overlays (landing / public inquiry) sit under the fixed top navbar (z-11000).
   fixTopNavOffset tags the navbar with jq-nav-autohide only while an overlay is actually rendered. */
        #top-navbar.jq-nav-autohide { display: none !important; }
        #landing-screen > div {
            border: 1px solid rgba(12, 74, 110, 0.25) !important;
            box-shadow: 0 0 0 1px rgba(12,74,110,0.05), 0 40px 80px -20px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.07) !important;
            animation: cardEntrance 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
        }
        @keyframes cardEntrance {
            from { opacity: 0; transform: translateY(30px) scale(0.96); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }

        /* --- تأثيرات الزجاج المحسّنة --- */
        .dark .glass {
            backdrop-filter: blur(24px) saturate(200%) brightness(1.05) !important;
            background: rgba(15, 23, 42, 0.7) !important;
            border: 1px solid rgba(255, 255, 255, 0.07) !important;
            box-shadow: 0 8px 32px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.06) !important;
        }
        .light .glass {
            backdrop-filter: blur(24px) saturate(200%) !important;
            background: rgba(255, 255, 255, 0.88) !important;
            border: 1px solid rgba(209, 213, 219, 0.4) !important;
            box-shadow: 0 8px 32px rgba(31, 38, 135, 0.06), inset 0 1px 0 rgba(255,255,255,0.9) !important;
        }

        /* --- بطاقات الإحصائيات في App1 المحسّنة --- */
        #page-dash .glass.p-6, #page-dash .glass.p-8 {
            transition: transform 0.35s cubic-bezier(0.34, 1.3, 0.64, 1), box-shadow 0.35s ease !important;
        }
        #page-dash .glass.p-6:hover, #page-dash .glass.p-8:hover {
            box-shadow: 0 20px 50px rgba(0,0,0,0.3), 0 0 0 1px rgba(12,74,110,0.1) !important;
        }
        /* بطاقات الإحصائيات الأربع */
        #page-dash .grid > .glass {
            position: relative;
            overflow: hidden;
        }
        #page-dash .grid > .glass::before {
            content: '';
            position: absolute;
            top: -50%;
            right: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle at center, rgba(255,255,255,0.03) 0%, transparent 60%);
            pointer-events: none;
        }

        /* --- أنيمايشن الأرقام --- */
        #stat-total, #stat-active, #stat-suspended, #stat-blocked {
            background: linear-gradient(135deg, #f8fafc, #94a3b8);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        /* --- جدول قاعدة البيانات المحسّن --- */
        #db-table-body tr {
            transition: background 0.2s ease, transform 0.2s ease !important;
        }
        #db-table-body tr:hover {
            background: rgba(12, 74, 110, 0.05) !important;
            transform: translateX(-2px);
        }
        thead tr th {
            background: rgba(0, 0, 0, 0.25) !important;
            backdrop-filter: blur(10px);
            font-size: 13px !important;
            letter-spacing: 0.8px;
            text-transform: uppercase;
        }

        /* --- أزرار التحكم المحسّنة في App1 --- */
        #admin-tools button, #admin-tools label {
            transition: all 0.3s cubic-bezier(0.34, 1.3, 0.64, 1) !important;
            position: relative;
            overflow: hidden;
        }
        #admin-tools button:hover, #admin-tools label:hover {
            transform: translateY(-2px) scale(1.02) !important;
            box-shadow: 0 10px 25px rgba(0,0,0,0.3) !important;
        }
        #admin-tools button::after, #admin-tools label::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
            opacity: 0;
            transition: opacity 0.3s;
            pointer-events: none;
        }
        #admin-tools button:hover::after, #admin-tools label:hover::after { opacity: 1; }

        /* --- شريط التنقل في App1 المحسّن --- */
        #sidebar nav button {
            transition: all 0.3s cubic-bezier(0.34, 1.2, 0.64, 1) !important;
            position: relative;
            overflow: hidden;
        }
        #sidebar nav button:hover {
            transform: translateX(-4px) !important;
            background: rgba(255, 255, 255, 0.06) !important;
        }
        #sidebar nav button.active-tab {
            box-shadow: 0 8px 25px rgba(12, 74, 110, 0.35), inset 0 1px 0 rgba(255,255,255,0.15) !important;
            transform: scale(1.02) translateX(-2px) !important;
        }
        #sidebar nav button.active-tab::before {
            content: '';
            position: absolute;
            right: 0;
            top: 25%;
            bottom: 25%;
            width: 3px;
            background: white;
            border-radius: 2px 0 0 2px;
            opacity: 0.5;
        }

        /* --- شاشة تسجيل الدخول App1 المحسّنة --- */
        #login-screen > div {
            box-shadow: 0 0 0 1px rgba(12,74,110,0.1), 0 40px 80px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.07) !important;
            animation: cardEntrance 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
        }
        #login-screen input {
            transition: all 0.35s cubic-bezier(0.34, 1.2, 0.64, 1) !important;
        }
        #login-screen input:focus {
            transform: translateY(-2px) !important;
            box-shadow: 0 0 0 3px rgba(12, 74, 110, 0.2), 0 8px 20px rgba(0,0,0,0.3) !important;
            border-color: #0c4a6e !important;
        }
        #login-screen button[onclick="handleLogin()"] {
            position: relative;
            overflow: hidden;
            transition: all 0.3s cubic-bezier(0.34, 1.3, 0.64, 1) !important;
        }
        #login-screen button[onclick="handleLogin()"]:hover {
            transform: translateY(-3px) !important;
            box-shadow: 0 15px 35px rgba(12, 74, 110, 0.45) !important;
        }
        #login-screen button[onclick="handleLogin()"]::after {
            content: '';
            position: absolute;
            top: 0; left: -100%;
            width: 100%; height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
            transition: left 0.5s;
        }
        #login-screen button[onclick="handleLogin()"]:hover::after { left: 100%; }

        /* --- الأزرار الرئيسية في صفحة Landing --- */
        #landing-screen button, #public-search-screen button {
            transition: all 0.3s cubic-bezier(0.34, 1.3, 0.64, 1) !important;
            position: relative;
            overflow: hidden;
        }
        #landing-screen button:hover {
            transform: translateY(-3px) scale(1.01) !important;
        }
        #landing-screen h1 {
            background: linear-gradient(135deg, #082f49 0%, #075985 45%, #d97706 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            background-size: 200% 200%;
        }
        }

        /* --- إشعارات محسّنة --- */
        .notif-card {
            border: 1px solid rgba(255,255,255,0.1);
            box-shadow: 0 15px 35px rgba(12, 74, 110, 0.35), inset 0 1px 0 rgba(255,255,255,0.15) !important;
        }

        /* --- شارة الإشعارات --- */
        .notif-badge {
            animation: badgePulse 2s ease-in-out infinite;
        }
        @keyframes badgePulse {
            0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
            50% { box-shadow: 0 0 0 5px rgba(239, 68, 68, 0); }
        }

        /* --- نافذة الإشعارات المنسدلة المحسّنة --- */
        .notif-dropdown {
            border: 1px solid rgba(12, 74, 110, 0.15) !important;
            box-shadow: 0 25px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04) !important;
        }

        /* --- المودال المحسّن --- */
        #modal-overlay > div {
            animation: modalEntrance 0.45s cubic-bezier(0.34, 1.4, 0.64, 1) both;
            box-shadow: 0 0 0 1px rgba(12,74,110,0.15), 0 40px 80px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.06) !important;
        }
        @keyframes modalEntrance {
            from { opacity: 0; transform: translateY(20px) scale(0.95); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }
        #modal-overlay input, #modal-overlay select, #modal-overlay textarea {
            transition: all 0.3s ease !important;
        }
        #modal-overlay input:focus, #modal-overlay select:focus, #modal-overlay textarea:focus {
            transform: translateY(-1px) !important;
            box-shadow: 0 0 0 3px rgba(12, 74, 110, 0.2) !important;
        }

        /* --- بطاقات القطاعات والمحافظات --- */
        #sector-stats-grid > div, #gov-stats-grid > div {
            transition: all 0.3s cubic-bezier(0.34, 1.3, 0.64, 1) !important;
            cursor: default;
        }
        #sector-stats-grid > div:hover, #gov-stats-grid > div:hover {
            transform: translateY(-4px) scale(1.02) !important;
            box-shadow: 0 15px 35px rgba(0,0,0,0.25) !important;
        }

        /* --- زر الصعود للأعلى المحسّن --- */
        #scrollTopBtn {
            opacity: 1 !important; visibility: visible !important;
            background: linear-gradient(135deg, #0c4a6e, #075985) !important;
            box-shadow: 0 8px 25px rgba(12, 74, 110, 0.4) !important;
            border: 1px solid rgba(255,255,255,0.1);
            transition: all 0.3s cubic-bezier(0.34, 1.4, 0.64, 1) !important;
        }
        #scrollTopBtn:hover {
            transform: translateY(-4px) scale(1.1) !important;
            box-shadow: 0 15px 35px rgba(12, 74, 110, 0.55) !important;
        }

        /* --- الـ Footer المحسّن --- */
        footer {
            background: rgba(2, 6, 23, 0.6) !important;
            backdrop-filter: blur(20px);
            border-top: 1px solid rgba(12, 74, 110, 0.1) !important;
        }
        body.light footer { background: rgba(241, 245, 249, 0.8) !important; }

        /* ================================================
           تحسينات App2 - منصة إدارة المهام والأداء
           ================================================ */

        /* --- بطاقة تسجيل الدخول App2 المحسّنة --- */
        #app2-container .auth-card {
            box-shadow: 0 0 0 1px rgba(12,74,110,0.1), 0 40px 80px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.06) !important;
            border: 1px solid rgba(255,255,255,0.08) !important;
            animation: cardEntrance 0.65s cubic-bezier(0.34, 1.4, 0.64, 1) both;
        }

        /* --- الشريط الجانبي App2 المحسّن --- */
        #app2-container aside {
            border-left: 1px solid rgba(12, 74, 110, 0.08) !important;
            background: rgba(10, 18, 35, 0.75) !important;
            backdrop-filter: blur(30px) saturate(180%) !important;
        }
        body.light #app2-container aside {
            background: rgba(255,255,255,0.85) !important;
            border-left: 1px solid rgba(12, 74, 110, 0.08) !important;
        }

        /* روابط التنقل App2 */
        #app2-container .nav-link {
            transition: all 0.3s cubic-bezier(0.34, 1.2, 0.64, 1) !important;
            border: 1px solid transparent;
        }
        #app2-container .nav-link:hover {
            background: rgba(12, 74, 110, 0.06) !important;
            border-color: rgba(12, 74, 110, 0.1) !important;
            transform: translateX(-5px) !important;
        }
        #app2-container .nav-link.active {
            border: 1px solid rgba(255,255,255,0.1) !important;
            box-shadow: 0 10px 30px rgba(12, 74, 110, 0.35), inset 0 1px 0 rgba(255,255,255,0.15) !important;
        }

        /* --- بطاقات App2 المحسّنة --- */
        #app2-container .card {
            border: 1px solid rgba(255,255,255,0.06) !important;
            box-shadow: 0 10px 40px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.04) !important;
            transition: all 0.35s ease !important;
        }
        #app2-container .card:hover {
            box-shadow: 0 20px 50px rgba(0,0,0,0.28), 0 0 0 1px rgba(12,74,110,0.08) !important;
        }
        body.light #app2-container .card {
            background: rgba(255,255,255,0.85) !important;
            border: 1px solid rgba(0,0,0,0.06) !important;
            box-shadow: 0 8px 30px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.9) !important;
        }

        /* --- إحصائيات App2 المحسّنة --- */
        #app2-container .stat-item {
            transition: all 0.35s cubic-bezier(0.34, 1.3, 0.64, 1) !important;
            position: relative;
            overflow: hidden;
        }
        #app2-container .stat-item::before {
            content: '';
            position: absolute;
            top: 0; right: 0;
            width: 100%; height: 100%;
            background: radial-gradient(circle at 80% 20%, rgba(12,74,110,0.07) 0%, transparent 70%);
            pointer-events: none;
        }
        #app2-container .stat-item:hover {
            transform: translateY(-7px) scale(1.02) !important;
            box-shadow: 0 20px 40px rgba(0,0,0,0.2) !important;
            border-bottom-color: var(--primary) !important;
        }

        /* --- بطاقات المهام App2 المحسّنة --- */
        #app2-container .task-card {
            transition: all 0.3s cubic-bezier(0.34, 1.2, 0.64, 1) !important;
            border-top: 1px solid rgba(255,255,255,0.05) !important;
        }
        #app2-container .task-card:hover {
            transform: translateY(-5px) translateX(-2px) !important;
            box-shadow: 0 18px 40px rgba(0,0,0,0.2) !important;
        }

        /* --- الأزرار App2 المحسّنة --- */
        #app2-container .btn-p {
            position: relative;
            overflow: hidden;
            transition: all 0.3s cubic-bezier(0.34, 1.3, 0.64, 1) !important;
            box-shadow: 0 8px 25px rgba(12, 74, 110, 0.3), inset 0 1px 0 rgba(255,255,255,0.15) !important;
            border: 1px solid rgba(255,255,255,0.1);
        }
        #app2-container .btn-p:hover {
            transform: translateY(-3px) scale(1.01) !important;
            box-shadow: 0 15px 35px rgba(12, 74, 110, 0.45) !important;
        }
        #app2-container .btn-p::after {
            content: '';
            position: absolute;
            top: 0; left: -100%;
            width: 100%; height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
            transition: left 0.5s ease;
        }
        #app2-container .btn-p:hover::after { left: 100%; }
        #app2-container .btn-d {
            transition: all 0.3s cubic-bezier(0.34, 1.3, 0.64, 1) !important;
            box-shadow: 0 8px 20px rgba(239, 68, 68, 0.25) !important;
        }
        #app2-container .btn-d:hover {
            transform: translateY(-2px) !important;
            box-shadow: 0 12px 28px rgba(239, 68, 68, 0.4) !important;
        }

        /* --- مودال App2 المحسّن --- */
        #app2-container .modal-box {
            box-shadow: 0 0 0 1px rgba(12,74,110,0.1), 0 40px 80px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.05) !important;
            animation: modalEntrance 0.4s cubic-bezier(0.34, 1.4, 0.64, 1) both;
        }
        body.light #app2-container .modal-box {
            box-shadow: 0 20px 60px rgba(0,0,0,0.12) !important;
        }

        /* --- لوحة كانبان المحسّنة --- */
        #app2-container .kanban-column {
            transition: all 0.3s ease !important;
        }
        #app2-container .kanban-column:hover {
            background: rgba(255,255,255,0.03) !important;
        }
        #app2-container .k-task {
            transition: all 0.25s cubic-bezier(0.34, 1.2, 0.64, 1) !important;
        }
        #app2-container .k-task:hover {
            transform: translateY(-3px) scale(1.01) !important;
            box-shadow: 0 10px 25px rgba(0,0,0,0.2) !important;
        }

        /* --- عناصر الأعضاء المحسّنة --- */
        #app2-container .member-item {
            transition: all 0.3s ease !important;
            border: 1px solid rgba(255,255,255,0.04) !important;
        }
        #app2-container .member-item:hover {
            background: rgba(12, 74, 110, 0.05) !important;
            border-color: rgba(12, 74, 110, 0.1) !important;
            transform: translateX(-3px);
        }

        /* --- الصورة الرمزية المحسّنة --- */
        #app2-container .avatar {
            box-shadow: 0 0 0 3px rgba(12, 74, 110, 0.3), 0 8px 20px rgba(12, 74, 110, 0.2) !important;
            transition: all 0.3s ease !important;
        }
        #app2-container .avatar:hover {
            transform: scale(1.08) !important;
            box-shadow: 0 0 0 4px rgba(12, 74, 110, 0.5), 0 12px 25px rgba(12, 74, 110, 0.3) !important;
        }

        /* --- بطاقات صفحة "جسر الاجتماع" و"جسر الفعالية" المحسّنة --- */
        #meeting-bridge > div, #event-bridge > div {
            animation: cardEntrance 0.6s cubic-bezier(0.34, 1.4, 0.64, 1) both;
            box-shadow: 0 0 0 1px rgba(12,74,110,0.15), 0 40px 80px rgba(0,0,0,0.6) !important;
        }

        /* --- مربعات الإدخال في جسر الاجتماع --- */
        #bridge-nid, #e-bridge-nid, #bridge-name, #bridge-phone, #e-bridge-name, #e-bridge-phone {
            transition: all 0.3s ease !important;
        }
        #bridge-nid:focus, #e-bridge-nid:focus, #bridge-name:focus, #bridge-phone:focus, #e-bridge-name:focus, #e-bridge-phone:focus {
            transform: translateY(-2px) !important;
            box-shadow: 0 0 0 3px rgba(12,74,110,0.2) !important;
            border-color: #0c4a6e !important;
        }

        /* --- الإدخالات في App1 المحسّنة --- */
        #login-user, #login-pass, #public-search-input {
            transition: all 0.3s ease !important;
        }
        #login-user:focus, #login-pass:focus {
            transform: translateY(-2px) !important;
            box-shadow: 0 0 0 3px rgba(12,74,110,0.2), 0 8px 20px rgba(0,0,0,0.2) !important;
            border-color: #0c4a6e !important;
        }

        /* --- تنسيق الوقت --- */
        .top-datetime {
            background: rgba(12, 74, 110, 0.08) !important;
            border: 1px solid rgba(12, 74, 110, 0.15) !important;
            font-variant-numeric: tabular-nums;
            letter-spacing: 0.5px;
        }
        body.light .top-datetime { background: rgba(12,74,110,0.06) !important; }

        /* --- صورة اللوجو في الشريط العلوي --- */
        #top-navbar img {
            box-shadow: 0 4px 15px rgba(12, 74, 110, 0.25) !important;
            border: 2px solid rgba(12, 74, 110, 0.2) !important;
            transition: all 0.3s ease;
        }
        #top-navbar img:hover { transform: scale(1.08) rotate(3deg); }

        /* --- أزرار تسجيل الخروج والتنقل بين التطبيقين --- */
        #sidebar .mt-6 button {
            transition: all 0.3s cubic-bezier(0.34, 1.2, 0.64, 1) !important;
        }
        #sidebar .mt-6 button:hover {
            transform: translateY(-2px) scale(1.02) !important;
        }

        /* --- الصفحات المحسّنة --- */
        #page-dash, #page-db, #page-suspended, #page-blacklist, #page-logs, #page-admins, #page-profile {
            animation: pageEntrance 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
        }
        @keyframes pageEntrance {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* --- عناوين الأقسام المحسّنة --- */
        #page-dash h2, #page-db h2, #page-logs h2 {
            letter-spacing: -0.5px;
        }

        /* --- الـ Search Box الجانبي المحسّن --- */
        .sidebar-search {
            background: rgba(0,0,0,0.35) !important;
            border: 1px solid rgba(255,255,255,0.08) !important;
            color: white !important;
        }
        .sidebar-search:focus {
            background: rgba(0,0,0,0.5) !important;
            border-color: rgba(12, 74, 110, 0.5) !important;
            box-shadow: 0 0 0 3px rgba(12,74,110,0.12), 0 8px 20px rgba(0,0,0,0.2) !important;
        }

        /* --- قسم الملف الشخصي --- */
        #page-profile .glass {
            box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.08), 0 25px 60px rgba(0,0,0,0.25) !important;
        }
        #page-profile input:focus {
            border-color: #10b981 !important;
            box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
        }

        /* --- تحسين مجموعة الأذونات --- */
        #app2-container .perm-item {
            transition: all 0.25s ease !important;
        }
        #app2-container .perm-item:hover {
            background: rgba(12, 74, 110, 0.08) !important;
            border-color: rgba(12, 74, 110, 0.15) !important;
            transform: translateX(-2px);
        }

        /* --- نبضة للعناصر الجديدة --- */
        .log-badge-pulse {
            animation: badgePulse 2s ease-in-out infinite;
        }
        #log-badge:not(.hide) {
            animation: badgePulse 2s ease-in-out infinite;
        }

        /* --- تحسين بطاقات المدراء (Admins grid) --- */
        #admins-grid > div {
            transition: all 0.3s cubic-bezier(0.34, 1.2, 0.64, 1) !important;
        }
        #admins-grid > div:hover {
            transform: translateY(-5px) !important;
            box-shadow: 0 20px 45px rgba(0,0,0,0.25) !important;
        }

        /* --- موقع زر الهاتف المحمول (☰) --- */
        button[onclick="toggleGlobalSidebar()"] {
            transition: all 0.3s cubic-bezier(0.34, 1.4, 0.64, 1) !important;
        }
        button[onclick="toggleGlobalSidebar()"]:hover {
            transform: scale(1.1) rotate(5deg) !important;
        }

        /* --- زر تغيير المظهر (Theme toggle) --- */
        button[onclick="toggleTheme()"] {
            transition: all 0.4s cubic-bezier(0.34, 1.5, 0.64, 1) !important;
        }
        button[onclick="toggleTheme()"]:hover {
            transform: rotate(25deg) scale(1.1) !important;
            background: rgba(12, 74, 110, 0.2) !important;
        }

        /* --- تأثير shine للبطاقات الزجاجية --- */
        .glass::after {
            content: '';
            position: absolute;
            top: 0; right: 0;
            width: 100%; height: 1px;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
            pointer-events: none;
        }

        /* --- اللوجو في صفحة Landing --- */
        #landing-screen img {
            box-shadow: 0 0 40px rgba(12, 74, 110, 0.3), 0 20px 40px rgba(0,0,0,0.5) !important;
            border: 2px solid rgba(12, 74, 110, 0.25) !important;
            transition: all 0.4s ease;
        }
        #landing-screen img:hover {
            transform: scale(1.05) !important;
            box-shadow: 0 0 60px rgba(12, 74, 110, 0.4), 0 25px 50px rgba(0,0,0,0.6) !important;
        }

        /* --- تحسينات الـ Loading Screen --- */
        @keyframes logoFloat {
            0%, 100% { transform: translateY(0px); }
            50% { transform: translateY(-8px); }
        }
        #landing-screen img { animation: logoFloat 4s ease-in-out infinite; }

        /* --- Table rows animation --- */
        #db-table-body tr, #suspended-table-body tr, #blacklist-table-body tr {
            animation: rowEntrance 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
        }
        @keyframes rowEntrance {
            from { opacity: 0; transform: translateX(10px); }
            to { opacity: 1; transform: translateX(0); }
        }

        /* --- طباعة محسّنة لإحصائيات القطاعات والمحافظات --- */
        .glass h3 { letter-spacing: -0.3px; }

        /* --- تأثير التمييز على الجداول --- */
        .dark table thead tr { 
            background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(10, 18, 35, 0.8)) !important; 
        }
        .light table thead tr { 
            background: linear-gradient(135deg, rgba(226, 232, 240, 0.9), rgba(203, 213, 225, 0.8)) !important; 
        }

        /* --- تحسين checkbox في منصة المهام --- */
        #app2-container .perm-item input[type="checkbox"] {
            width: 20px !important;
            height: 20px !important;
            accent-color: var(--primary);
            cursor: pointer;
        }

        /* --- مؤشر hover لصفوف الجداول --- */
        .dark #db-table-body tr:hover td:first-child { 
            border-right: 3px solid #0c4a6e; 
        }
    
/* v5.9 old-phone performance: no animations, transitions or blur */
*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}

/* v6.8 landing logo breathing room */
#landing-screen > section{padding-top:28px!important}
@media (min-width:1024px){#landing-screen > section{padding-top:64px!important}}
