
            body { 
                background-color: #f1f5f9 !important; 
                font-family: 'Tajawal', sans-serif !important; 
                margin: 0; 
                padding: 0; 
                direction: rtl; 
                display: flex;
                align-items: center;
                justify-content: center;
                min-height: 100vh;
                -webkit-font-smoothing: antialiased;
                box-sizing: border-box;
            }
            *, *:before, *:after { box-sizing: inherit; }
            
            .yt-login-portal-wrapper {
                max-width: 440px !important;
                width: 100% !important;
                background: #ffffff !important;
                padding: 40px 35px !important;
                border-radius: 16px !important;
                box-shadow: 0 20px 40px rgba(15, 23, 42, 0.06) !important;
                border-top: 6px solid #1e5fa8 !important;
                margin: 20px !important;
                text-align: center;
            }
            .yt-login-input {
                width: 100% !important;
                padding: 12px 16px !important;
                border: 1px solid #cbd5e1 !important;
                border-radius: 10px !important;
                font-family: 'Tajawal', sans-serif !important;
                font-size: 14px !important;
                outline: none !important;
                box-sizing: border-box !important;
                transition: all 0.2s ease !important;
                background: #f8fafc !important;
            }
            .yt-login-input:focus {
                border-color: #1e5fa8 !important;
                background: #ffffff !important;
                box-shadow: 0 0 0 3px rgba(30, 95, 168, 0.12) !important;
            }
            .yt-login-btn {
                width: 100% !important;
                background: #1e5fa8 !important;
                color: #ffffff !important;
                border: none !important;
                padding: 14px !important;
                border-radius: 10px !important;
                font-size: 15px !important;
                font-weight: 700 !important;
                cursor: pointer !important;
                transition: all 0.2s ease !important;
                box-shadow: 0 4px 12px rgba(30, 95, 168, 0.2) !important;
                font-family: 'Tajawal', sans-serif !important;
            }
            .yt-login-btn:hover {
                background: #164e8c !important;
                transform: translateY(-1px) !important;
                box-shadow: 0 6px 16px rgba(30, 95, 168, 0.3) !important;
            }
    .yt-booking-search-wrapper {
        position: relative;
        margin-top: 12px;
        width: 100%;
        max-width: 480px; /* مقاس هندسي مريح للعين */
    }

    #ytBookingMasterSearch {
        width: 100%;
        padding: 10px 40px 10px 16px !important; /* مساحة داخلية عشان الأيقونة */
        border: 1px solid #cbd5e1 !important;
        border-radius: 8px !important;
        font-family: 'Tajawal', sans-serif !important;
        font-size: 13px !important;
        font-weight: 500 !important;
        color: #334155 !important;
        outline: none !important;
        background: #ffffff !important;
        box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
        transition: all 0.2s ease-in-out;
    }

    #ytBookingMasterSearch:focus {
        border-color: #1e5fa8 !important; /* قلب اللون الأزرق الرسمي للمنظومة */
        box-shadow: 0 0 0 3px rgba(30, 95, 168, 0.1) !important;
    }

    .yt-search-icon {
        position: absolute;
        top: 50%;
        right: 14px;
        transform: translateY(-50%);
        font-size: 14px;
        color: #94a3b8;
        pointer-events: none; /* عشان متضايقش الماوس وقت الضغط */
    }

    /* تحسين إضافي متوافق مع شاشات الموبايل والتابلت */
    @media (max-width: 768px) {
        .yt-booking-search-wrapper {
            max-width: 100%;
            margin-bottom: 10px;
        }
    }
         /* 🌐 الاستايلات الأساسية والهيكل العام للوحة Ytechia المحدثة تجميلياً */
        body { 
            background-color: #f8fafc !important; 
            font-family: 'Tajawal', sans-serif !important; 
            margin: 0; 
            padding: 25px 20px; 
            direction: rtl; 
            -webkit-font-smoothing: antialiased;
            box-sizing: border-box;
        }
        *, *:before, *:after { box-sizing: inherit; }

        .hospital-dashboard-wrapper { 
            max-width: 1350px; 
            margin: 0 auto; 
            background: transparent; 
            width: 100%;
            overflow: hidden; /* يمنع خروج المحتويات الكبيرة بره الجسم الرئيسي */
        }

        /* كروت الأقسام الرئيسية */
        #tab-bookings > div, #tab-doctors > div, #tab-clinics > div, #tab-fields > div, #tab-settings > div {
            background: #ffffff; 
            padding: 25px; 
            border-radius: 14px; 
            border: 1px solid #e2e8f0;
            box-shadow: 0 4px 18px rgba(15, 23, 42, 0.02);
            margin-bottom: 25px;
            width: 100%;
            box-sizing: border-box;
        }

        /* 📱 [الحل الجذري والعبقري للجدول]: لفافة متجاوبة تحبس الجدول وتمنحه سكرول بالعرض ناعم جداً */
        .yt-table-responsive-wrapper {
            width: 100% !important;
            overflow-x: auto !important;
            -webkit-overflow-scrolling: touch !important;
            margin-top: 15px;
            margin-bottom: 15px;
            border-radius: 10px;
            border: 1px solid #e2e8f0;
            background: #ffffff;
        }
        
        /* 📱 شريط تابات النظام المتطور */
        .ytechia-tabs-container { 
            margin-bottom: 30px; 
            display: flex; 
            gap: 12px; 
            border-bottom: 2px solid #e2e8f0; 
            padding-bottom: 16px; 
            flex-wrap: nowrap; 
            overflow-x: auto; 
            -webkit-overflow-scrolling: touch;
            width: 100%;
        }
        .ytechia-tabs-container::-webkit-scrollbar { height: 5px; }
        .ytechia-tabs-container::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
        
        .ytechia-tab-btn { 
            padding: 14px 28px; 
            font-size: 14px; 
            font-weight: 700; 
            border: none; 
            background: #f1f5f9; 
            color: #64748b; 
            border-radius: 10px; 
            cursor: pointer; 
            transition: all 0.25s ease; 
            font-family: inherit; 
            white-space: nowrap;
        }
        .ytechia-tab-btn:hover {
            background: #e2e8f0;
            color: #334155;
        }
        .ytechia-tab-btn.active { 
            background: #1e5fa8; 
            color: #ffffff; 
            box-shadow: 0 4px 14px rgba(30, 95, 168, 0.25); 
        }
        .ytechia-tab-content { display: none; width: 100%; }
        .ytechia-tab-content.active { display: block; }
        
        /* 🔍 كارت الفلاتر والبحث العصري والمنظم - تم تأمينه هندسياً بالكامل */
        .yt-filter-container-card { 
            background: #f8fafc !important; 
            padding: 20px; 
            border-radius: 12px; 
            border: 1px solid #e2e8f0; 
            margin-bottom: 20px; 
            display: flex; 
            flex-direction: row;
            flex-wrap: wrap; 
            gap: 15px; 
            align-items: center; 
            justify-content: space-between; 
            width: 100%;
            box-sizing: border-box;
        }
        .yt-filter-right-side { 
            display: flex; 
            align-items: center; 
            gap: 12px; 
            flex-wrap: wrap; 
        }
        .booking-filter-bar { 
            display: flex; 
            gap: 4px; 
            background: #e2e8f0; 
            padding: 4px; 
            border-radius: 8px; 
            flex-wrap: wrap;
        }
        .booking-filter-btn { 
            border: none; 
            background: transparent; 
            color: #475569; 
            padding: 8px 16px; 
            font-weight: 700; 
            font-size: 13px; 
            border-radius: 6px; 
            transition: all 0.2s ease; 
            cursor: pointer; 
            font-family: inherit; 
            white-space: nowrap;
        }
        .booking-filter-btn.active { 
            background: #ffffff; 
            color: #1e5fa8; 
            box-shadow: 0 2px 6px rgba(0,0,0,0.06); 
        }
        .yt-custom-date-inputs { 
            display: none; 
            align-items: center; 
            gap: 8px; 
            flex-wrap: wrap;
        }
        .yt-custom-date-inputs.visible { display: flex; }
        .yt-date-field { 
            padding: 8px 12px; 
            border: 1px solid #cbd5e1; 
            border-radius: 8px; 
            outline: none; 
            font-family: inherit; 
            height: 38px; 
            color: #334155; 
            background: #ffffff;
        }
        .yt-btn-filter-submit { 
            background: #1e5fa8; 
            color: #ffffff; 
            border: none; 
            padding: 0 16px; 
            height: 38px; 
            border-radius: 8px; 
            font-weight: 700; 
            cursor: pointer; 
            font-family: inherit; 
            transition: background 0.2s;
        }
        .yt-btn-filter-submit:hover { background: #164e8c; }
        
        .status-filter-select { 
            padding: 8px 15px; 
            border-radius: 8px; 
            border: 1px solid #cbd5e1; 
            outline: none; 
            font-family: inherit; 
            font-size: 13px; 
            cursor: pointer; 
            height: 38px; 
            min-width: 180px; 
            background: #ffffff; 
            font-weight: 700; 
            color: #334155; 
        }

        /* 📊 تصميم الماستر الفولاذي للجداول مع حد أدنى آمن للعرض منعاً لكسر الأعمدة */
        table { 
            width: 100% !important; 
            border-collapse: collapse; 
            background: #ffffff; 
            margin: 0;
            border: none;
            display: table !important; 
            min-width: 1050px !important; /* ضمان ثبات وتناسق الأعمدة عند التمرير الأفقي السلس */
        }
        th, td { 
            padding: 16px 14px; 
            border-bottom: 1px solid #f1f5f9; 
            text-align: right; 
            vertical-align: middle;
            word-break: break-word; /* منع النصوص العملاقة والمرفقات من تدمير عرض الأعمدة */
        }
        th { 
            background-color: #f8fafc; 
            color: #475569; 
            font-weight: 700; 
            font-size: 13px;
            border-bottom: 2px solid #e2e8f0;
        }
        tr:hover td { background-color: #f8fafc; }
        
        /* 🏷️ البادجات والمكونات الداخلية وعناصر الواجهة الشيك */
        .status-badge { 
            display: inline-block; 
            padding: 6px 14px; 
            border-radius: 30px; 
            font-size: 12px; 
            font-weight: 700; 
            text-align: center; 
            white-space: nowrap; 
        }
        .status-pending { background: #fff7e6; color: #d46b08; border: 1px solid #ffd591; }
        .status-confirmed { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
        .status-cancelled { background: #fff1f0; color: #cf1322; border: 1px solid #ffa39e; }
        
        .status-select { 
            padding: 6px 10px; 
            border-radius: 8px; 
            border: 1px solid #cbd5e1; 
            outline: none; 
            font-family: inherit; 
            font-size: 13px; 
            cursor: pointer; 
            background: #ffffff; 
            font-weight: 500;
            color: #334155;
        }
        .meta-list { margin: 0; padding-right: 18px; font-size: 13px; color: #475569; }
        .meta-list li { margin-bottom: 6px; line-height: 1.5; }
        .file-link { display: inline-block; background: #e0f2fe; color: #0369a1; padding: 3px 10px; border-radius: 6px; font-weight: 700; text-decoration: none; font-size: 12px; transition: background 0.2s; }
        .file-link:hover { background: #bae6fd; }
        
        .clinic-tag { 
            background: #eff6ff; 
            color: #1e5fa8; 
            border: 1px solid #bfdbfe; 
            padding: 4px 12px; 
            border-radius: 30px; 
            font-size: 11px; 
            font-weight: 700; 
            margin: 2px 0 2px 5px; 
            display: inline-block; 
        }
        .row-avatar { 
            width: 46px; 
            height: 46px; 
            border-radius: 50%; 
            object-fit: cover; 
            border: 2px solid #f1f5f9; 
            vertical-align: middle; 
            margin-left: 8px; 
            box-shadow: 0 2px 6px rgba(0,0,0,0.04);
        }
        
        /* 🗖 المودالز والملفات المنبثقة المحسنة كلياً */
        .ytechia-modal { 
            display: none; 
            position: fixed !important; 
            z-index: 1000 !important; 
            left: 0; 
            top: 0; 
            width: 100vw; 
            height: 100vh; 
            background: rgba(15, 23, 42, 0.4); 
            backdrop-filter: blur(4px);
            justify-content: center; 
            align-items: center; 
            padding: 15px; 
        }
        .modal-content { 
            background: #ffffff; 
            padding: 30px; 
            border-radius: 16px; 
            width: 100%; 
            max-width: 700px; 
            max-height: 90vh; 
            overflow-y: auto; 
            position: relative; 
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15); 
            text-align: right; 
        }
        .close-modal { 
            position: absolute; 
            top: 15px; 
            left: 20px; 
            font-size: 26px; 
            cursor: pointer; 
            color: #94a3b8; 
            font-weight: bold; 
            transition: color 0.2s ease; 
        }
        .close-modal:hover { color: #ff4d4f; }
        
        /* عناصر الفورم داخل المودالز */
        .modal-content label { font-weight: 700; display: block; margin-bottom: 6px; color: #334155; font-size: 14px; }
        .modal-content input[type="text"], .modal-content input[type="number"], .modal-content input[type="email"], .modal-content textarea {
            width: 100%; padding: 11px 14px; border: 1px solid #cbd5e1; border-radius: 8px; font-family: inherit; font-size: 14px; outline: none; background: #f8fafc; transition: all 0.2s;
        }
        .modal-content input:focus, .modal-content textarea:focus { border-color: #1e5fa8; background: #fff; box-shadow: 0 0 0 3px rgba(30, 95, 168, 0.1); }
        
        .field-type-badge { background: #f1f5f9; color: #475569; padding: 4px 10px; border-radius: 6px; font-size: 12px; border: 1px solid #e2e8f0; font-weight: 700; }
        .ytechia-pagination { display: flex; justify-content: center; gap: 8px; margin-top: 25px; padding: 10px 0; flex-wrap: wrap; }
        .ytechia-pagination button { padding: 8px 16px; border: 1px solid #cbd5e1; border-radius: 6px; color: #475569; background: #ffffff; font-weight: 700; font-size: 14px; cursor: pointer; transition: all 0.2s; }
        .ytechia-pagination button:hover { background: #f1f5f9; }
        .ytechia-pagination button.active { background-color: #1e5fa8; color: #ffffff; border-color: #1e5fa8; box-shadow: 0 2px 8px rgba(30, 95, 168, 0.2); }
        
        .schedule-clinic-group { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px; margin-bottom: 8px; min-width: 200px; }
        .schedule-clinic-header { display: block; font-weight: 700; font-size: 12px; color: #1e5fa8; margin-bottom: 6px; border-bottom: 1px dashed #e2e8f0; padding-bottom: 4px; }
        .schedule-badge-v2 { display: inline-block; background: #f0fdf4; color: #166534; padding: 3px 10px; border-radius: 6px; font-size: 11px; font-weight: 700; margin: 2px; border: 1px solid #bbf7d0; }
        
        .select2-container--default .select2-selection--single { height: 38px !important; border: 1px solid #cbd5e1 !important; border-radius: 8px !important; }
        .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 36px !important; padding-right: 12px !important; font-weight: 700; color: #334155; font-family: 'Tajawal', sans-serif; }

        /* =========================================================================
            📱 ميديا كويري الهاتف المحمول والتابلت الشاملة المحدثة بنسبة 100% 
           ========================================================================= */
        @media (max-width: 991px) {
            body { padding: 15px 10px !important; }
            
            /* تهيئة ترويسة الصفحة للموبايل */
            .hospital-dashboard-wrapper > div:first-child {
                flex-direction: column !important;
                align-items: stretch !important;
                gap: 14px;
                padding-bottom: 16px !important;
            }
            .hospital-dashboard-wrapper > div:first-child > div {
                justify-content: space-between;
                width: 100%;
            }
            
            /* 🛠️ الحل الحاسم لخروج كارت الفلاتر: تحويل التوزيع إلى عمودي محمي داخل حواف الديف */
            .yt-filter-container-card {
                flex-direction: column !important;
                align-items: stretch !important;
                padding: 15px !important;
                gap: 15px !important;
            }
            .yt-filter-right-side {
                flex-direction: column !important;
                align-items: stretch !important;
                width: 100% !important;
                gap: 12px !important;
            }
            .booking-filter-bar {
                display: grid !important;
                grid-template-columns: repeat(2, 1fr) !important; /* توزيع الأزرار بشكل متساو شبكي يمنع خروجها */
                gap: 6px !important;
                width: 100% !important;
                background: #e2e8f0;
                padding: 6px !important;
                border-radius: 10px;
            }
            .booking-filter-btn {
                width: 100% !important;
                text-align: center !important;
                padding: 10px 4px !important;
                font-size: 12px !important;
                box-sizing: border-box;
            }
            .yt-custom-date-inputs {
                flex-direction: column !important;
                align-items: stretch !important;
                width: 100% !important;
                gap: 8px !important;
                background: #ffffff;
                padding: 12px;
                border-radius: 8px;
                border: 1px solid #e2e8f0;
            }
            .yt-date-field { width: 100% !important; box-sizing: border-box; }
            .yt-btn-filter-submit { width: 100% !important; text-align: center; }
            .status-filter-select { width: 100% !important; box-sizing: border-box; min-width: 100% !important; }
            
            /* تعديلات قسم الأطباء للموبايل */
            #tab-doctors > div > div:first-child {
                flex-direction: column !important;
                align-items: stretch !important;
            }
            #tab-doctors > div > div:first-child > div:first-child {
                flex-direction: column !important;
                align-items: stretch !important;
                gap: 10px;
            }
            #tab-doctors > div > div:first-child > div:last-child {
                flex-direction: column !important;
                align-items: stretch !important;
                margin-top: 12px;
                gap: 10px;
            }
            #ytDoctorSearch, .select2-container { width: 100% !important; }
            
            /* أسطر فترات ومواعيد العمل بالمودال */
            .schedule-row-item {
                flex-wrap: wrap !important;
                background: #ffffff;
                padding: 12px;
                border-radius: 8px;
                border: 1px solid #cbd5e1;
                margin-bottom: 12px !important;
                gap: 8px !important;
            }
            .schedule-row-item select, .schedule-row-item input {
                flex: 1 1 calc(50% - 4px) !important;
                min-width: 110px;
                height: 38px;
            }
            .schedule-row-item button {
                flex: 1 1 100% !important;
                margin-top: 4px;
                height: 38px;
                display: flex;
                align-items: center;
                justify-content: center;
            }
        }
        /* 👤 تنسيقات مودال الأطباء المطور تجميلياً */
.yt-form-row-flexible {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    margin-bottom: 15px;
    width: 100%;
}
.yt-form-col-main {
    flex: 1;
}
.yt-form-col-short {
    width: 110px; /* جعل حقل الترتيب صغير ومناسب جداً */
    flex-shrink: 0;
}

/* 📱 توزيع كروت التشيك بوكس بالتساوي 2 أو 3 في الصف */
.yt-doctor-clinics-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important; /* 3 عيادات في الصف الواحد */
    gap: 10px !important;
    max-height: 180px;
    overflow-y: auto;
    border: 1px solid #cbd5e1;
    padding: 14px;
    border-radius: 8px;
    background: #f8fafc;
    box-sizing: border-box;
}

/* ضبط مرونة المودال على الشاشات الصغيرة */
@media (max-width: 580px) {
    .yt-form-row-flexible {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 15px;
    }
    .yt-form-col-short {
        width: 100% !important;
    }
    .yt-doctor-clinics-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* عيادتين في الصف للموبايل */
    }
}