        /* ========== شاشة التحميل ========== */
        #splash-screen {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(135deg, #6366f1, #818cf8);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10000;
            transition: opacity 0.5s ease;
            flex-direction: column;
        }
        #splash-screen.hide {
            opacity: 0;
            pointer-events: none;
        }
        .splash-logo {
            text-align: center;
            animation: bounce 1s ease infinite;
        }
        .splash-logo img {
            width: 100px;
            height: 100px;
            border-radius: 25px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.2);
        }
        .splash-logo h1 {
            color: white;
            margin-top: 20px;
            font-size: 1.8rem;
            font-weight: 800;
        }
        .progress-container {
            width: 200px;
            height: 4px;
            background: rgba(255,255,255,0.3);
            border-radius: 10px;
            margin-top: 30px;
            overflow: hidden;
        }
        .progress-bar {
            width: 0%;
            height: 100%;
            background: white;
            border-radius: 10px;
            animation: load 1.5s ease forwards;
        }
        @keyframes load {
            0% { width: 0%; }
            100% { width: 100%; }
        }
        @keyframes bounce {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-10px); }
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Tajawal', sans-serif;
            min-height: 100vh;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        :root {
            --bg: #ffffff;
            --bg2: #f8fafc;
            --t1: #0f172a;
            --t2: #334155;
            --t3: #64748b;
            --t4: #94a3b8;
            --ac: #6366f1;
            --ac2: #818cf8;
            --acD: #4f46e5;
            --acSh: rgba(99, 102, 241, 0.08);
            --gn: #10b981;
            --rd: #ef4444;
            --or: #f59e0b;
            --card: #ffffff;
            --cardBd: #e2e8f0;
            --shadow: 0 10px 25px -5px rgba(0,0,0,0.05), 0 8px 10px -6px rgba(0,0,0,0.02);
            --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        [data-t="dark"] {
            --bg: #0f172a;
            --bg2: #1e293b;
            --t1: #f1f5f9;
            --t2: #cbd5e1;
            --t3: #94a3b8;
            --t4: #64748b;
            --ac: #818cf8;
            --ac2: #a5b4fc;
            --acD: #6366f1;
            --acSh: rgba(129, 140, 248, 0.12);
            --gn: #34d399;
            --rd: #f87171;
            --or: #fbbf24;
            --card: #1e293b;
            --cardBd: #334155;
        }

        body {
            background: var(--bg);
        }

        /* ========== شاشة تسجيل الدخول ========== */
        .login-screen {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: var(--bg);
            z-index: 1000;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
        }
        .login-screen.hide {
            opacity: 0;
            visibility: hidden;
        }
        .login-container {
            width: 100%;
            max-width: 420px;
            margin: 0 auto;
            padding: 20px;
        }
        .compact-card {
            background: var(--card);
            border: 1px solid var(--cardBd);
            border-radius: 28px;
            padding: 30px 25px;
            position: relative;
            overflow: hidden;
            box-shadow: var(--shadow);
        }
        .compact-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, transparent, var(--ac), transparent);
        }
        .logo-area {
            text-align: center;
            margin-bottom: 25px;
        }
        .app-logo-img {
            width: 80px;
            height: 80px;
            border-radius: 20px;
            object-fit: cover;
            margin-bottom: 10px;
            border: 2px solid var(--ac);
            display: none;
        }
        .app-logo-img.show {
            display: block;
            margin: 0 auto 10px auto;
        }
        .logo {
            font-size: 1.8rem;
            font-weight: 900;
            background: linear-gradient(135deg, var(--ac), var(--ac2));
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }
        .sub-logo {
            font-size: 0.7rem;
            color: var(--t4);
            margin-top: 5px;
        }
        .tabs {
            display: flex;
            gap: 10px;
            margin-bottom: 25px;
            background: var(--bg2);
            border-radius: 60px;
            padding: 5px;
        }
        .tab-btn {
            flex: 1;
            padding: 10px;
            background: none;
            border: none;
            font-weight: 700;
            cursor: pointer;
            color: var(--t4);
            font-family: 'Tajawal', sans-serif;
            border-radius: 50px;
            transition: var(--transition);
        }
        .tab-btn.active {
            background: var(--ac);
            color: white;
            box-shadow: var(--shadow);
        }
        .tab-content {
            display: none;
        }
        .tab-content.active {
            display: block;
            animation: fadeIn 0.3s ease;
        }
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .fld {
            margin-bottom: 15px;
        }
        .fld label {
            display: block;
            font-size: 0.75rem;
            font-weight: 700;
            color: var(--t3);
            margin-bottom: 6px;
        }
        .iw {
            position: relative;
        }
        .iw .ic {
            position: absolute;
            right: 14px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 0.9rem;
            color: var(--t4);
        }
        .iw input {
            width: 100%;
            padding: 12px 42px 12px 14px;
            background: var(--bg2);
            border: 1.5px solid var(--cardBd);
            border-radius: 14px;
            color: var(--t1);
            font-size: 0.9rem;
            transition: var(--transition);
            font-family: 'Tajawal', sans-serif;
        }
        .iw input:focus {
            border-color: var(--ac);
            box-shadow: 0 0 0 3px var(--acSh);
            outline: none;
        }
        .sbtn {
            width: 100%;
            padding: 12px;
            border-radius: 14px;
            background: linear-gradient(135deg, var(--ac), var(--acD));
            color: #fff;
            font-size: 0.9rem;
            font-weight: 800;
            cursor: pointer;
            border: none;
            transition: var(--transition);
            margin-top: 10px;
            font-family: 'Tajawal', sans-serif;
        }
        .sbtn:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px var(--acSh);
        }
        .sbtn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }
        .browse-services-btn {
            width: 100%;
            padding: 12px;
            border-radius: 14px;
            background: transparent;
            border: 2px solid var(--ac);
            color: var(--ac);
            font-size: 0.9rem;
            font-weight: 800;
            cursor: pointer;
            transition: var(--transition);
            margin-top: 15px;
            font-family: 'Tajawal', sans-serif;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
        }
        .browse-services-btn:hover {
            background: var(--ac);
            color: #fff;
            transform: translateY(-2px);
        }
        .login-footer-links {
            margin-top: 20px;
            text-align: center;
            border-top: 1px solid var(--cardBd);
            padding-top: 15px;
        }
        .login-footer-links a {
            color: var(--ac);
            text-decoration: none;
            font-size: 0.7rem;
            margin: 0 8px;
            transition: var(--transition);
        }
        .login-footer-links a:hover {
            text-decoration: underline;
        }
        .login-footer-links i {
            margin-left: 4px;
        }
        .msg {
            display: none;
            padding: 10px;
            border-radius: 12px;
            font-size: 0.75rem;
            margin-bottom: 15px;
            text-align: center;
        }
        .msg.err {
            background: rgba(239, 68, 68, 0.1);
            border: 1px solid rgba(239, 68, 68, 0.2);
            color: var(--rd);
        }
        .msg.suc {
            background: rgba(16, 185, 129, 0.1);
            border: 1px solid rgba(16, 185, 129, 0.2);
            color: var(--gn);
        }
        .msg.sh {
            display: block;
        }
        .captcha-container {
            display: flex;
            gap: 10px;
            align-items: center;
            margin-bottom: 15px;
        }
        .captcha-canvas {
            background: #f8fafc;
            border-radius: 14px;
            border: 1.5px solid var(--cardBd);
            cursor: pointer;
            height: 50px;
            width: 100%;
        }
        .refresh-captcha {
            background: var(--bg2);
            border: 1.5px solid var(--cardBd);
            border-radius: 14px;
            width: 50px;
            height: 50px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: var(--transition);
            color: var(--ac);
            font-size: 1.2rem;
        }
        .refresh-captcha:hover {
            background: var(--acSh);
            transform: rotate(15deg);
        }
        .waiting-timer {
            text-align: center;
            font-size: 0.7rem;
            color: var(--or);
            margin-top: 10px;
            display: none;
        }

        /* ========== شاشة التطبيق ========== */
        .app-screen {
            padding-bottom: 80px;
        }
        .bg-glow { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
        .bg-glow .g { position: absolute; border-radius: 50%; filter: blur(150px); opacity: 0.4; }
        .bg-glow .g1 { width: 500px; height: 500px; background: rgba(99, 102, 241, 0.08); top: -150px; right: -80px; }
        .bg-glow .g2 { width: 400px; height: 400px; background: rgba(16, 185, 129, 0.05); bottom: -120px; left: -120px; }
        .bg-grid { position: fixed; inset: 0; z-index: 0; pointer-events: none; background-image: linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px); background-size: 50px 50px; }
        .main-wrapper { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; padding: 20px; }
        .profile-header { text-align: center; margin-bottom: 25px; position: relative; }
        .cover-image { height: 120px; background: linear-gradient(135deg, var(--ac), var(--ac2)); border-radius: 25px; margin-bottom: -40px; position: relative; overflow: hidden; }
        .cover-image::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="15" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="25" fill="rgba(255,255,255,0.08)"/><circle cx="50" cy="80" r="20" fill="rgba(255,255,255,0.06)"/></svg>') repeat; opacity: 0.5; }
        .profile-avatar { width: 90px; height: 90px; background: linear-gradient(135deg, var(--ac), var(--ac2)); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto; border: 4px solid var(--card); box-shadow: var(--shadow); position: relative; z-index: 2; }
        .profile-avatar i { font-size: 3rem; color: white; }
        .profile-name { font-size: 1.4rem; font-weight: 800; margin-top: 12px; color: var(--t1); }
        .profile-email { font-size: 0.8rem; color: var(--t3); margin-top: 4px; display: flex; align-items: center; justify-content: center; gap: 6px; }
        .profile-badge { background: var(--acSh); border-radius: 50px; padding: 4px 12px; font-size: 0.7rem; color: var(--ac); display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; }
        .section-card { background: var(--card); border: 1px solid var(--cardBd); border-radius: 20px; padding: 20px; margin-bottom: 15px; box-shadow: var(--shadow); transition: var(--transition); }
        .section-title { font-size: 0.9rem; font-weight: 800; color: var(--t2); margin-bottom: 15px; display: flex; align-items: center; justify-content: space-between; padding-bottom: 10px; border-bottom: 2px solid var(--cardBd); }
        .section-title i { color: var(--ac); font-size: 1rem; }
        .menu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
        .menu-item { background: var(--bg2); border: 1px solid var(--cardBd); border-radius: 16px; padding: 14px 10px; cursor: pointer; transition: var(--transition); text-align: center; }
        .menu-item:hover { background: var(--ac); border-color: var(--ac); transform: translateY(-3px); }
        .menu-item:hover .menu-icon, .menu-item:hover .menu-text { color: white; }
        .menu-icon { font-size: 1.5rem; color: var(--ac); margin-bottom: 8px; display: block; }
        .menu-text { font-size: 0.75rem; font-weight: 600; color: var(--t2); }
        .share-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
        .share-item { background: var(--bg2); border: 1px solid var(--cardBd); border-radius: 12px; padding: 10px; cursor: pointer; text-align: center; transition: var(--transition); }
        .share-item:hover { transform: translateY(-3px); }
        .share-item i { font-size: 1.3rem; margin-bottom: 5px; display: block; }
        .share-item span { font-size: 0.6rem; }
        .share-item.whatsapp:hover { background: #25D366; color: white; border-color: #25D366; }
        .share-item.facebook:hover { background: #1877F2; color: white; border-color: #1877F2; }
        .share-item.copy:hover { background: var(--gn); color: white; border-color: var(--gn); }
        .share-item.native:hover { background: var(--ac); color: white; border-color: var(--ac); }
        .share-item.email:hover { background: #ea4335; color: white; border-color: #ea4335; }
        .share-item.sms:hover { background: var(--ac2); color: white; border-color: var(--ac2); }
        .edit-form { display: none; }
        .edit-form.show { display: block; animation: slideUp 0.3s ease; }
        @keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
        .form-group { margin-bottom: 16px; }
        .form-group label { display: block; font-size: 0.7rem; font-weight: 700; color: var(--t3); margin-bottom: 6px; }
        .input-wrapper { position: relative; }
        .input-wrapper i { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 0.9rem; color: var(--t4); z-index: 1; }
        .input-wrapper input { width: 100%; padding: 12px 42px 12px 14px; background: var(--bg2); border: 1.5px solid var(--cardBd); border-radius: 14px; color: var(--t1); font-size: 0.9rem; font-family: 'Tajawal', sans-serif; transition: var(--transition); }
        .input-wrapper input:focus { border-color: var(--ac); outline: none; box-shadow: 0 0 0 3px var(--acSh); }
        .btn-group { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
        .btn { border-radius: 50px; padding: 12px; font-weight: 700; font-size: 0.85rem; cursor: pointer; transition: var(--transition); display: flex; align-items: center; justify-content: center; gap: 8px; font-family: 'Tajawal', sans-serif; border: none; }
        .btn-primary { background: var(--ac); color: white; }
        .btn-primary:hover { background: var(--acD); transform: translateY(-2px); }
        .btn-secondary { background: var(--bg2); border: 1px solid var(--cardBd); color: var(--t2); }
        .btn-secondary:hover { background: var(--acSh); }
        .btn-danger { background: rgba(239, 68, 68, 0.1); border: 1px solid var(--rd); color: var(--rd); }
        .btn-danger:hover { background: var(--rd); color: white; }
        .footer { text-align: center; margin-top: 20px; padding: 15px; color: var(--t4); font-size: 0.65rem; }
        .top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
        .user-info { background: var(--card); border: 1px solid var(--cardBd); border-radius: 50px; padding: 6px 16px; display: flex; align-items: center; gap: 10px; font-size: 0.8rem; box-shadow: var(--shadow); }
        .bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; display: flex; justify-content: center; padding: 0; z-index: 1000; }
        .bottom-nav-container { background: var(--card); border: 1px solid var(--cardBd); border-bottom: none; border-radius: 18px 18px 0 0; display: flex; justify-content: space-around; align-items: center; padding: 8px 10px; width: 100%; max-width: 650px; box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08); backdrop-filter: blur(10px); transition: all 0.3s ease; }
        [data-t="dark"] .bottom-nav-container { background: rgba(30, 41, 59, 0.95); backdrop-filter: blur(10px); border-color: #334155; }
        .nav-item { display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; color: var(--t4); transition: all 0.3s ease; font-size: 0.62rem; padding: 6px 10px; border-radius: 10px; position: relative; flex: 1; text-align: center; }
        .nav-item i { font-size: 1.25rem; transition: all 0.3s ease; }
        .nav-item span { font-size: 0.65rem; font-weight: 500; }
        .nav-item.active { color: #6366f1; background: rgba(99, 102, 241, 0.1); }
        .nav-item.active i { transform: translateY(-2px); }
        .nav-item:hover:not(.active) { color: #6366f1; background: rgba(99, 102, 241, 0.08); }
        .nav-badge { position: absolute; top: -4px; right: 18px; background: #ef4444; color: white; font-size: 0.48rem; padding: 2px 5px; border-radius: 30px; min-width: 16px; text-align: center; font-weight: 700; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); }
        @media (max-width: 560px) { .nav-item { padding: 6px 6px; } .nav-badge { right: 6px; } }
        @keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } }
        .nav-badge { animation: pulse 0.5s ease; }
        .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 15px; margin-top: 10px; }
        .card { background: var(--card); border: 1px solid var(--cardBd); border-radius: 16px; padding: 12px 10px; text-align: center; cursor: pointer; transition: var(--transition); }
        .card:hover { transform: translateY(-3px); border-color: var(--ac); box-shadow: 0 8px 20px -10px var(--acSh); }
        .card-image { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; margin: 0 auto 10px; display: block; border: 2px solid var(--cardBd); }
        .card-title { font-weight: 800; font-size: 0.85rem; }
        .back-btn { background: var(--card); border: 1px solid var(--cardBd); border-radius: 40px; padding: 6px 16px; margin-bottom: 15px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; }
        .title { font-size: 1rem; font-weight: 800; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
        .search-bar { background: var(--card); border: 1px solid var(--cardBd); border-radius: 60px; padding: 8px 16px; margin-bottom: 15px; display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow); }
        .search-bar input { flex: 1; background: none; border: none; padding: 8px 0; color: var(--t1); font-size: 0.85rem; font-family: 'Tajawal', sans-serif; }
        .search-results { display: none; background: var(--card); border: 1px solid var(--cardBd); border-radius: 16px; padding: 10px; margin-bottom: 15px; max-height: 300px; overflow-y: auto; }
        .welcome-card { background: linear-gradient(135deg, var(--ac), var(--ac2)); border-radius: 20px; padding: 20px; margin-bottom: 20px; color: white; position: relative; overflow: hidden; transition: transform 0.3s ease; }
        .welcome-card:hover { transform: translateY(-3px); }
        .welcome-card .welcome-btn { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.4); padding: 8px 20px; border-radius: 50px; color: white; text-decoration: none; font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: 0.2s; }
        .welcome-card .welcome-btn:hover { background: rgba(255,255,255,0.3); transform: scale(1.05); }
        .welcome-card .official-link { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.15); padding: 5px 12px; border-radius: 50px; margin-top: 10px; font-size: 0.7rem; color: white; text-decoration: none; cursor: pointer; }
        .welcome-card .official-link:hover { background: rgba(255,255,255,0.25); }
        .top-services-section { background: linear-gradient(135deg, var(--or), #e67e22); border-radius: 16px; padding: 10px 12px; margin-bottom: 15px; color: white; }
        .top-services-title { font-size: 0.8rem; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
        .top-services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
        .top-service-item { background: rgba(255,255,255,0.15); border-radius: 10px; padding: 6px 8px; cursor: pointer; display: flex; align-items: center; gap: 6px; font-size: 0.7rem; transition: 0.2s; }
        .top-service-item:hover { background: rgba(255,255,255,0.25); transform: translateX(-3px); }
        .top-service-rank { background: rgba(255,255,255,0.25); border-radius: 50%; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.75rem; }
        .top-service-name { font-weight: 600; font-size: 0.7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        
        /* ========== تنسيق بطاقات الخدمات ========== */
        .service-card {
            background: var(--card);
            border: 1px solid var(--cardBd);
            border-radius: 16px;
            overflow: hidden;
            transition: 0.2s;
            cursor: pointer;
            position: relative;
        }
        .service-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 20px var(--acSh);
        }
        .service-card.service-unavailable {
            opacity: 0.7;
            filter: grayscale(0.3);
            background: var(--bg2);
            border-color: var(--rd);
        }
        .service-card.service-unavailable .service-img {
            filter: grayscale(0.5) brightness(0.85);
        }
        .service-card.service-unavailable .unavailable-overlay {
            display: flex;
        }
        .unavailable-bar {
            background: var(--rd);
            color: #ffffff;
            text-align: center;
            padding: 6px 12px;
            font-size: 0.7rem;
            font-weight: 700;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            letter-spacing: 0.5px;
        }
        .unavailable-overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(220, 53, 69, 0.7);
            backdrop-filter: blur(2px);
            display: none;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            gap: 6px;
            z-index: 5;
        }
        .unavailable-overlay i {
            font-size: 2.5rem;
            color: #ffffff;
        }
        .unavailable-overlay span {
            color: #ffffff;
            font-weight: 700;
            font-size: 1rem;
        }
        .service-image-wrapper {
            position: relative;
            overflow: hidden;
        }
        .favorite-btn {
            position: absolute;
            top: 8px;
            left: 8px;
            background: rgba(255,255,255,0.95);
            border: none;
            border-radius: 50%;
            width: 32px;
            height: 32px;
            cursor: pointer;
            color: #ff4757;
            font-size: 1rem;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: 0.2s;
            z-index: 10;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        }
        .favorite-btn:hover {
            transform: scale(1.1);
            background: white;
        }
        .favorite-btn.active {
            color: #ff4757;
            background: white;
        }
        .service-img {
            width: 100%;
            aspect-ratio: 1/1;
            object-fit: cover;
            cursor: pointer;
            transition: transform 0.2s;
        }
        .service-img:hover {
            transform: scale(1.02);
        }
        .service-info {
            padding: 10px;
            text-align: center;
        }
        .service-name {
            font-weight: 800;
            font-size: 0.8rem;
            margin-bottom: 3px;
        }
        .service-category {
            font-size: 0.55rem;
            color: var(--ac);
            background: var(--acSh);
            display: inline-block;
            padding: 2px 8px;
            border-radius: 50px;
            margin: 4px 0;
        }
        .service-notes {
            font-size: 0.6rem;
            background: var(--acSh);
            padding: 5px 8px;
            border-radius: 8px;
            margin: 6px 0;
            text-align: right;
            color: var(--t2);
            border-right: 2px solid var(--ac);
        }
        .add-btn {
            background: var(--acSh);
            border: 1px solid var(--ac);
            color: var(--ac);
            padding: 6px;
            border-radius: 40px;
            font-size: 0.6rem;
            cursor: pointer;
            width: 100%;
            transition: 0.2s;
            font-weight: 600;
        }
        .add-btn:hover:not(:disabled) {
            background: var(--ac);
            color: #fff;
        }
        .add-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            background: var(--rd);
            border-color: var(--rd);
            color: white;
        }
        
        .quantity-btn {
            background: var(--acSh);
            border: 1px solid var(--ac);
            border-radius: 6px;
            width: 28px;
            height: 28px;
            cursor: pointer;
            font-weight: bold;
            transition: var(--transition);
        }
        .quantity-btn:hover {
            background: var(--ac);
            color: #fff;
        }
        .quantity-value {
            font-weight: 800;
            font-size: 0.9rem;
            min-width: 30px;
            text-align: center;
        }
        /* السلة والمفضلات صفحتان كاملتان (مثل صفحة "حسابي") يتحكم بظهورهما switchPage()،
           وليستا نافذة جانبية منبثقة فوق المحتوى */
        .cart-sidebar, .favorites-sidebar {
            display: none;
            flex-direction: column;
            max-width: 600px;
            margin: 0 auto;
            padding-bottom: 100px;
        }
        .cart-sidebar.open, .favorites-sidebar.open {
            display: flex;
        }
        
        /* ========== لوحة التحكم ========== */
        .admin-panel {
            position: fixed;
            top: 0;
            right: -550px;
            width: 550px;
            max-width: 95vw;
            height: 100vh;
            background: var(--card);
            border-right: 2px solid var(--ac);
            z-index: 2000;
            transition: right 0.3s ease;
            padding: 20px;
            overflow-y: auto;
            direction: rtl;
        }
        .admin-panel.open {
            right: 0;
        }
        .admin-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 1px solid var(--cardBd);
            flex-wrap: wrap;
            gap: 10px;
        }
        .admin-header h3 {
            color: var(--ac);
        }
        .admin-close {
            background: none;
            border: none;
            font-size: 1.3rem;
            cursor: pointer;
            color: var(--t4);
        }
        .admin-section {
            margin-bottom: 20px;
            padding: 15px;
            border: 1px solid var(--cardBd);
            border-radius: 16px;
        }
        .admin-section h4 {
            margin-bottom: 10px;
            color: var(--ac);
            font-size: 0.9rem;
        }
        .admin-section input, .admin-section select, .admin-section textarea {
            width: 100%;
            padding: 8px 10px;
            margin-bottom: 8px;
            border-radius: 10px;
            border: 1px solid var(--cardBd);
            background: var(--bg2);
            color: var(--t1);
            font-family: 'Tajawal', sans-serif;
            font-size: 0.8rem;
        }
        .admin-section button {
            width: 100%;
            padding: 8px;
            background: var(--ac);
            border: none;
            border-radius: 10px;
            color: white;
            font-weight: 700;
            cursor: pointer;
            font-size: 0.75rem;
        }
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 8px;
            margin-bottom: 12px;
        }
        .stat-card {
            background: var(--bg2);
            border: 1px solid var(--cardBd);
            border-radius: 10px;
            padding: 8px;
            text-align: center;
        }
        .stat-number {
            font-size: 1.2rem;
            font-weight: 800;
            color: var(--ac);
        }
        .stat-label {
            font-size: 0.6rem;
            color: var(--t3);
            margin-top: 3px;
        }
        .file-input-label {
            display: block;
            background: var(--acSh);
            border: 1px dashed var(--ac);
            border-radius: 10px;
            padding: 8px;
            text-align: center;
            cursor: pointer;
            margin-bottom: 8px;
            font-size: 0.7rem;
        }
        .image-preview {
            width: 40px;
            height: 40px;
            border-radius: 8px;
            object-fit: cover;
            margin-top: 5px;
        }
        .items-list {
            max-height: 400px;
            overflow-y: auto;
        }
        .admin-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 8px;
            border-bottom: 1px solid var(--cardBd);
            flex-wrap: wrap;
            gap: 10px;
        }
        .users-list {
            max-height: 250px;
            overflow-y: auto;
        }
        .toast-message {
            position: fixed;
            bottom: 80px;
            right: 20px;
            background: var(--card);
            border: 1px solid var(--ac);
            color: var(--ac);
            padding: 8px 16px;
            border-radius: 50px;
            z-index: 2100;
            font-size: 0.75rem;
            animation: fadeInUp 0.3s;
        }
        @keyframes fadeInUp {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        /* ========== النوافذ المنبثقة ========== */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.85);
            backdrop-filter: blur(8px);
            z-index: 10000;
            display: none;
            align-items: center;
            justify-content: center;
        }
        .modal-overlay.show {
            display: flex;
            animation: fadeIn 0.2s ease;
        }
        .confirm-modal-container {
            background: var(--card);
            border-radius: 24px;
            width: 90%;
            max-width: 400px;
            overflow: hidden;
            animation: slideUp 0.3s ease;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
        }
        .confirm-modal-header {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 20px;
            background: linear-gradient(135deg, var(--ac), var(--ac2));
            color: white;
        }
        .confirm-modal-header i {
            font-size: 1.5rem;
        }
        .confirm-modal-header h3 {
            margin: 0;
            font-size: 1.1rem;
            font-weight: 700;
            color: white;
        }
        .confirm-modal-body {
            padding: 20px;
            text-align: center;
        }
        .confirm-modal-body p {
            font-size: 0.95rem;
            color: var(--t2);
            line-height: 1.5;
        }
        .confirm-modal-body .warning-text {
            color: var(--rd);
            font-weight: bold;
            margin-top: 10px;
        }
        .confirm-modal-footer {
            display: flex;
            gap: 12px;
            padding: 20px;
            border-top: 1px solid var(--cardBd);
        }
        .confirm-btn {
            flex: 1;
            padding: 12px;
            border-radius: 50px;
            font-weight: 700;
            font-size: 0.85rem;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            font-family: 'Tajawal', sans-serif;
            border: none;
        }
        .confirm-btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }
        .confirm-cancel {
            background: var(--bg2);
            border: 1px solid var(--cardBd);
            color: var(--t3);
        }
        .confirm-cancel:hover {
            background: var(--acSh);
            transform: translateY(-2px);
        }
        .confirm-ok {
            background: linear-gradient(135deg, var(--ac), var(--acD));
            color: white;
        }
        .confirm-ok:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
        }
        .confirm-ok.delete {
            background: linear-gradient(135deg, var(--rd), #c0392b);
        }
        .confirm-ok.delete:hover {
            box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
        }
        .delete-password-field {
            margin-top: 10px;
            padding-top: 10px;
            border-top: 1px solid var(--cardBd);
        }
        .delete-password-field label {
            color: var(--t2);
        }
        .modal-input {
            width: 100%;
            padding: 12px 42px 12px 14px;
            border-radius: 12px;
            border: 1.5px solid var(--cardBd);
            background: var(--bg2);
            color: var(--t1);
            font-family: 'Tajawal', sans-serif;
            font-size: 0.85rem;
            transition: var(--transition);
        }
        .modal-input:focus {
            border-color: var(--ac);
            outline: none;
            box-shadow: 0 0 0 3px var(--acSh);
        }
        .delete-password-field .modal-input:focus {
            border-color: var(--rd);
            box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
        }
        .modal-container {
            background: var(--card);
            border-radius: 24px;
            width: 90%;
            max-width: 500px;
            max-height: 90vh;
            overflow-y: auto;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
            animation: slideUp 0.3s ease;
        }
        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px;
            border-bottom: 1px solid var(--cardBd);
        }
        .modal-header h3 {
            color: var(--ac);
            font-size: 1.1rem;
        }
        .modal-close {
            background: none;
            border: none;
            font-size: 1.3rem;
            cursor: pointer;
            color: var(--t4);
            transition: 0.2s;
        }
        .modal-close:hover {
            color: var(--rd);
        }
        .modal-body {
            padding: 20px;
        }
        .modal-footer {
            display: flex;
            gap: 12px;
            padding: 20px;
            border-top: 1px solid var(--cardBd);
        }
        .modal-textarea {
            width: 100%;
            padding: 10px;
            border-radius: 12px;
            border: 1px solid var(--cardBd);
            background: var(--bg2);
            color: var(--t1);
            font-family: 'Tajawal', sans-serif;
            font-size: 0.85rem;
            resize: vertical;
        }
        .image-preview-container {
            margin-top: 10px;
            text-align: center;
        }
        .image-preview-container-modal {
            position: relative;
            max-width: 90vw;
            max-height: 90vh;
        }
        .image-preview-close {
            position: absolute;
            top: -40px;
            left: -40px;
            background: rgba(255,255,255,0.2);
            border: none;
            border-radius: 50%;
            width: 40px;
            height: 40px;
            font-size: 1.2rem;
            cursor: pointer;
            color: white;
            transition: 0.2s;
        }
        .image-preview-close:hover {
            background: rgba(255,255,255,0.4);
            transform: scale(1.1);
        }
        #imagePreviewModal img {
            max-width: 90vw;
            max-height: 90vh;
            object-fit: contain;
            border-radius: 12px;
        }

        /* ============================================================ */
        /* ====== قسم إدارة توفر الخدمات والمنتجات ====== */
        /* ============================================================ */
        .service-status-section {
            border: 2px solid var(--ac);
            background: var(--acSh);
            border-radius: 16px;
            padding: 16px;
        }
        .service-status-section .section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 10px;
            margin-bottom: 12px;
        }
        .service-status-section .section-header h4 {
            color: var(--ac);
            font-size: 1rem;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .service-status-section .section-header h4 small {
            font-size: 0.6rem;
            font-weight: 400;
            color: var(--t3);
        }
        .admin-search-box {
            display: flex;
            gap: 8px;
            align-items: center;
            background: var(--bg2);
            border-radius: 10px;
            padding: 4px 14px;
            border: 1px solid var(--cardBd);
            flex: 1;
            max-width: 350px;
            transition: border-color 0.2s;
        }
        .admin-search-box:focus-within {
            border-color: var(--ac);
        }
        .admin-search-box i {
            color: var(--t4);
            font-size: 0.8rem;
        }
        .admin-search-box input {
            border: none;
            background: transparent;
            padding: 6px 0;
            font-size: 0.75rem;
            width: 100%;
            outline: none;
            font-family: inherit;
            color: var(--t1);
        }
        .admin-search-box input::placeholder {
            color: var(--t4);
        }
        .admin-search-box .clear-btn {
            background: none;
            border: none;
            color: var(--t4);
            cursor: pointer;
            font-size: 0.7rem;
            padding: 0 4px;
            display: none;
        }
        .admin-search-box .clear-btn.visible {
            display: block;
        }
        .admin-search-box .clear-btn:hover {
            color: var(--rd);
        }

        .status-stats {
            display: flex;
            gap: 15px;
            padding: 8px 14px;
            background: var(--bg);
            border-radius: 10px;
            font-size: 0.7rem;
            flex-wrap: wrap;
            margin-bottom: 12px;
        }
        .status-stats span {
            display: flex;
            align-items: center;
            gap: 4px;
        }
        .status-stats .count {
            font-weight: 700;
        }
        .status-stats .available-count {
            color: var(--gn);
        }
        .status-stats .unavailable-count {
            color: var(--rd);
        }

        .status-service-list {
            max-height: 400px;
            overflow-y: auto;
            border-radius: 10px;
            border: 1px solid var(--cardBd);
            background: var(--bg);
        }
        .status-service-list::-webkit-scrollbar {
            width: 6px;
        }
        .status-service-list::-webkit-scrollbar-track {
            background: var(--bg2);
            border-radius: 10px;
        }
        .status-service-list::-webkit-scrollbar-thumb {
            background: var(--t4);
            border-radius: 10px;
        }

        .status-service-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 8px 14px;
            border-bottom: 1px solid var(--cardBd);
            transition: background 0.2s;
        }
        .status-service-item:hover {
            background: var(--bg2);
        }
        .status-service-item:last-child {
            border-bottom: none;
        }
        .status-service-item .info {
            display: flex;
            align-items: center;
            gap: 10px;
            flex: 1;
            min-width: 0;
            flex-wrap: wrap;
        }
        .status-service-item .info .icon {
            font-size: 1rem;
            flex-shrink: 0;
        }
        .status-service-item .info .name {
            font-weight: 600;
            font-size: 0.8rem;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .status-service-item .info .category {
            font-size: 0.55rem;
            color: var(--t3);
            background: var(--bg2);
            padding: 2px 10px;
            border-radius: 12px;
            white-space: nowrap;
            flex-shrink: 0;
        }
        .status-service-item .info .type-badge {
            font-size: 0.5rem;
            padding: 2px 8px;
            border-radius: 10px;
            white-space: nowrap;
            flex-shrink: 0;
        }
        .status-service-item .info .type-badge.service {
            background: rgba(245, 158, 11, 0.2);
            color: var(--or);
        }
        .status-service-item .info .type-badge.product {
            background: rgba(99, 102, 241, 0.15);
            color: var(--ac2);
        }
        .status-service-item .info .status-badge {
            font-size: 0.5rem;
            padding: 2px 10px;
            border-radius: 20px;
            font-weight: 600;
            white-space: nowrap;
            flex-shrink: 0;
        }
        .status-service-item .info .status-badge.available {
            background: #d4edda;
            color: #155724;
        }
        .status-service-item .info .status-badge.unavailable {
            background: #f8d7da;
            color: #721c24;
        }
        .status-service-item .info .extra-info {
            font-size: 0.5rem;
            color: var(--t3);
            white-space: nowrap;
        }

        .toggle-switch {
            position: relative;
            width: 46px;
            height: 24px;
            flex-shrink: 0;
            cursor: pointer;
        }
        .toggle-switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }
        .toggle-slider {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: var(--rd);
            border-radius: 34px;
            transition: 0.3s ease;
        }
        .toggle-slider::before {
            content: "";
            position: absolute;
            height: 18px;
            width: 18px;
            left: 3px;
            bottom: 3px;
            background: #ffffff;
            border-radius: 50%;
            transition: 0.3s ease;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        }
        .toggle-switch input:checked + .toggle-slider {
            background: var(--gn);
        }
        .toggle-switch input:checked + .toggle-slider::before {
            transform: translateX(22px);
        }

        .no-results-status {
            text-align: center;
            padding: 20px;
            color: var(--t4);
            font-size: 0.8rem;
        }
        .no-results-status i {
            font-size: 1.8rem;
            display: block;
            margin-bottom: 8px;
            color: var(--t4);
        }

        .category-header {
            background: var(--acSh);
            padding: 4px 12px;
            margin: 4px 0;
            font-size: 0.7rem;
            font-weight: 700;
            color: var(--ac);
            border-right: 2px solid var(--ac);
        }
        .company-header {
            padding: 2px 16px;
            font-size: 0.6rem;
            color: var(--t3);
            background: var(--bg2);
            border-bottom: 1px solid var(--cardBd);
        }

        /* ===== نافذة تعديل الشركة ===== */
        #editCompanyModal .modal-container {
            max-width: 500px;
        }
        #editCompanyModal .modal-body .form-group {
            margin-bottom: 12px;
        }
        #editCompanyModal .modal-body .form-group label {
            display: block;
            font-size: 0.7rem;
            font-weight: 700;
            color: var(--t3);
            margin-bottom: 4px;
        }

        /* ===== نافذة تعديل معلومات المنتج ===== */
        #editProductInfoModal .modal-container {
            max-width: 550px;
        }
        #editProductInfoModal .modal-body .form-group {
            margin-bottom: 12px;
        }
        #editProductInfoModal .modal-body .form-group label {
            display: block;
            font-size: 0.7rem;
            font-weight: 700;
            color: var(--t3);
            margin-bottom: 4px;
        }
        #editProductInfoModal .file-input-label {
            display: block;
            background: var(--acSh);
            border: 1px dashed var(--ac);
            border-radius: 10px;
            padding: 12px;
            text-align: center;
            cursor: pointer;
            transition: 0.2s;
            font-size: 0.7rem;
        }
        #editProductInfoModal .file-input-label:hover {
            background: var(--ac);
            color: white;
        }

        /* ===== نافذة جدول المنتجات ===== */
        #productsTable {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.75rem;
        }
        #productsTable th {
            padding: 8px;
            text-align: right;
            border-bottom: 2px solid var(--ac);
            background: var(--acSh);
        }
        #productsTable td {
            padding: 8px;
            border-bottom: 1px solid var(--cardBd);
        }
        #productsTable tr:hover {
            background: var(--bg2);
        }

        @media (max-width: 650px) {
            .grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
            .admin-panel { width: 100%; right: -100%; }
            .service-status-section .section-header {
                flex-direction: column;
                align-items: stretch;
            }
            .admin-search-box {
                max-width: 100%;
            }
            .status-service-item {
                flex-wrap: wrap;
                gap: 6px;
            }
            .status-service-item .info {
                flex-wrap: wrap;
            }
            .status-service-item .info .name {
                white-space: normal;
            }
        }
        @media (max-width: 480px) {
            .status-stats {
                gap: 8px;
                font-size: 0.6rem;
            }
            .status-service-item {
                padding: 6px 10px;
            }
            #productsTable th, #productsTable td {
                padding: 4px;
                font-size: 0.6rem;
            }
        }
