

    :root {

        --primary: #d3692d;

        --bg-overlay: rgba(15, 23, 42, 0.97);

        --glass: rgba(255, 255, 255, 0.05);

        --glass-border: rgba(255, 255, 255, 0.1);

        --text: #f8fafc;

        --drop-bg: rgba(30, 41, 59, 0.98);

    }



    .light-mode {

        --bg-overlay: rgba(241, 245, 249, 0.98);

        --glass: rgba(0, 0, 0, 0.05);

        --glass-border: rgba(0, 0, 0, 0.1);

        --text: #1e293b;

        --drop-bg: rgba(255, 255, 255, 0.98);

    }



    ::-webkit-scrollbar {

        width: 8px;

        height: 8px;

    }



    ::-webkit-scrollbar-track {

        background: rgba(0, 0, 0, 0.1);

    }



    ::-webkit-scrollbar-thumb {

        background:#e99527;

        border-radius: 10px;

    }



    ::-webkit-scrollbar-thumb:hover {

        background: #e99527;

    }



    * {

        box-sizing: border-box;

        transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    }

.clock {

    background: rgba(255, 255, 255, 0.05);


    border-radius: 8px;

    color: #333; 

    font-family: 'Tajawal', sans-serif;

    font-weight: bold;

    display: inline-flex;

    align-items: center;

    gap: 8px;

    border: 1px solid rgba(255, 255, 255, 0.1);

}



.clock .time {

    font-size: 1.1rem;

}



.clock .date {

    font-size: 0.9rem;

    opacity: 0.8;

}



.pagesmain h3 {

padding: 0px;

    margin: 0px;

    

}

.custom-alert-warning {
    grid-column: 1 / -1; /* 🎯 تجعل العنصر يمتد من أول عمود لآخر عمود في الـ Grid */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    padding: 24px;
    margin: 15px 0;
    
    background: rgba(211, 105, 45, 0.06);
    border: 1px solid rgba(211, 105, 45, 0.2); 
    border-radius: 14px;
    transition: all 0.3s ease;
}

/* حركة تفاعلية ناعمة عند مرور الماوس */
.custom-alert-warning:hover {
    background: rgba(211, 105, 45, 0.1);
    border-color: rgba(211, 105, 45, 0.3);
}

/* تنسيق الأيقونة */
.custom-alert-warning .alert-icon {
    font-size: 2.2rem;
    color: #d3692d; /* لون برتقالي دافئ متناسق مع ستايل الجدول وحقولك */
    margin-bottom: 12px;
    filter: drop-shadow(0 2px 4px rgba(211, 105, 45, 0.2));
}

/* تنسيق النص المكتوب */
.custom-alert-warning .alert-text {
    font-family: 'Tajawal', sans-serif;
    font-size: 0.95rem;
    color: #454545;
    font-weight: 500;
    line-height: 1.6;
    margin: 0;
}


.main-card {





flex: 1;





    padding: 20px;

    background: rgb(255 255 255);

    border: 1px solid rgb(91 91 91 / 10%);

    border-radius: 20px;

    backdrop-filter: blur(10px);

    margin:20px;

        overflow-y: auto;



}











.card-header {

    border-bottom:5px solid rgb(211 105 45);

    padding: 12px;

    

}

.card-header i {

color: #d3692d;

}





.btn{

        font-family: 'Tajawal', sans-serif;

 font-size: 14px;

}



    button {

    font-family: 'Tajawal', sans-serif !important;

    }

.btn-save {

    background: #f58b4d;/* اللون الأزرق الخاص بك */

    color: #fff;

    border: none;

    padding: 12px 25px;

    border-radius: 8px;

    cursor: pointer;

    font-weight: bold;

    transition: 0.3s;

    font-family: 'Tajawal', sans-serif;



}



.btn-save:hover {

    filter: brightness(1.2);

    box-shadow: 0 5px 15px rgba(79, 172, 254, 0.4);

}

.file-upload-wrapper {

    width: 100%;

    margin-top: 10px;

}



.custom-file-upload {

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    padding: 30px;

    background: rgba(255, 255, 255, 0.05); /* شفافية بسيطة */

    border: 2px dashed rgb(204 204 204);

    border-radius: 20px;

    cursor: pointer;

    transition: all 0.3s ease;

    text-align: center;

}



.custom-file-upload:hover {

    background: rgba(255, 255, 255, 0.1);

    border-color: var(--primary); /* اللون البرتقالي في شعارك */

    transform: translateY(-2px);

}



.upload-icon i {

    font-size: 3rem;

    color: #f36f21;

    margin-bottom: 15px;

    opacity: 0.8;

}



.upload-text strong {

    display: block;

    color: #fff;

    font-size: 1.1rem;

    margin-bottom: 5px;

}



.upload-text span {

    color: #a0aec0;

    font-size: 0.9rem;

}



/* إخفاء الإنبوت الأصلي */

input[type="file"] {

    display: none;

}



.file-name-display {

    margin-top: 10px;

    font-size: 0.85rem;

    color: var(--primary);

    font-weight: bold;

    text-align: center;

}

#image-preview {

    max-height: 120px;

    object-fit: contain;

    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.3));

    transition: transform 0.3s ease;

}



.custom-file-upload:hover #image-preview {

    transform: scale(1.05); /* حركة بسيطة عند تمرير الماوس */

}





















/* لون خاص لزر الصلاحيات (الدرع) */

.btn-action.edit-perms {

    color: #d3692d; /* اللون البرتقالي بتاعك */

}



.btn-action.edit-perms:hover {

    background: #d3692d;

    color: #fff;

}



/* لون خاص لزر الحذف */

.btn-action.delete {

    color: #ff4b2b;

}



.btn-action.delete:hover {

    background: #ff4b2b;

    color: #fff;

}



/* شارة تعريفية (Badge) */

.role-badge {

    background: rgba(211, 105, 45, 0.1);

    color: #d3692d;

    padding: 4px 12px;

    border-radius: 20px;

    font-size: 12px;

    border: 1px solid rgba(211, 105, 45, 0.2);

}

.btn-primary {

    background: linear-gradient(135deg, #d3692d 0%, #b3521e 100%); /* تدرج برتقالي احترافي */

    color: #fff;

    border: none;

    padding: 10px 20px;

    border-radius: 12px;

    cursor: pointer;

    font-weight: 600;

    font-family: 'Tajawal', sans-serif;

    display: inline-flex;

    align-items: center;

     margin-top: 8px;

    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

}











.btn-primary:hover {

    transform: translateY(-2px); /* حركة خفيفة للأعلى */

    filter: brightness(1.1);

}



.btn-primary:active {

    transform: translateY(0); /* تأثير الضغط */

}



.btn-primary i {

    font-size: 0.9rem;

    transition: 0.3s;

}



.btn-primary:hover i {

    transform: rotate(15px); /* حركة بسيطة للأيقونة عند الهوفر */

}





.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    table-layout: fixed; /* 🎯 إجبار الأعمدة على احترام مساحاتها المحددة دون عشوائية */
}

/* توزيع مساحات الأعمدة بدقة لمنع التشوه */
.custom-table th:nth-child(1), .custom-table td:nth-child(1) { width: 90px; text-align: center; } /* العمود 1 */
.custom-table th:nth-child(2), .custom-table td:nth-child(2) { width: 210px; } /* العمود 2 */
.custom-table th:nth-child(3), .custom-table td:nth-child(3) { width: 180px; } /* العمود 3 */
.custom-table th:nth-child(4), .custom-table td:nth-child(4) { width: 200px; } /* العمود 4 */
.custom-table th:nth-child(5), .custom-table td:nth-child(5) { width: 200px; } /* العمود 5 - مساحة أكبر */
.custom-table th:nth-child(6), .custom-table td:nth-child(6) { width: 140px; } /* العمود 6 */
.custom-table th:nth-child(7), .custom-table td:nth-child(7) { width: 140px; } /* العمود 7 */
.custom-table th:nth-child(8), .custom-table td:nth-child(8) { width: 110px; text-align: center; } /* العمود 8 */

/* الهيدر الخاص بالجدول */
.custom-table th {
    background-color: #f8fafc;
    color: #64748b;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 14px 16px;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

/* الصفوف والخلايا - ضبط المحاذاة العمودية بدقة والتعامل مع النصوص الطويلة */
.custom-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* 🎯 تحويل النصوص الزائدة لنقاط بشكل احترافي */
    vertical-align: middle; /* 🎯 ضبط كل عناصر الصف على خط استواء واحد منتصف عمودياً */
}

/* تأثير تفاعلي راقٍ عند مرور الماوس على الصف */
.custom-table tbody tr {
    transition: background-color 0.15s ease;
}

.custom-table tbody tr:hover {
    background-color: #f8fafc;
}

/* تصميم لتأطير المعرفات أو الأرقام كبادج (اختياري يمكنك استخدامه داخل الخلايا) */
.custom-id-badge {
    background: #f1f5f9;
    color: #334155;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.82rem;
    display: inline-block;
}

/* ستايل إبراز النصوص الهامة داخل الجدول (مثل الفروع أو الأسماء) */
.custom-text-highlight {
    font-weight: 600;
    color: #1e293b;
}



.module-permission-card

{

  background: rgba(255,255,255,0.02);

  padding: 15px ;

  border-radius: 12px;

  border: 1px solid #eee;

}





/* 🔴 البادج الأول (مثال: العمليات الهامة، الحذف، أو التنبيهات) */
.badge {
    background-color: #fef2f2; /* خلفية حمراء ناعمة جداً وراقية */
    color: #ef4444; /* نص أحمر واضح ومريح للعين */
    padding: 6px 14px; /* مساحات هندسية متناسقة ومريحة للنص */
    border-radius: 6px; /* حواف ناعمة وعصرية متناسقة مع لغة التصميم */
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid rgba(239, 68, 68, 0.12); /* حدود شفافة لتعزيز المظهر الاحترافي */
    transition: all 0.2s ease;
    cursor: pointer;
}

/* تأثير تفاعلي عند مرور الماوس إذا كانت أزرار عمليات */
.badge:hover {
    background-color: #fee2e2;
    transform: translateY(-1px);
}

/* 🟢 البادج الثاني (مثال: العمليات الناجحة، الإضافة، أو التفعيل) */
.badge2 {
    background-color: #f0fdf4; /* خلفية خضراء ناعمة وهادئة */
    color: #16a34a; /* نص أخضر واضح */
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid rgba(22, 163, 74, 0.12);
    transition: all 0.2s ease;
    cursor: pointer;
}

.badge2:hover {
    background-color: #dcfce7;
    transform: translateY(-1px);
}

.action-wrapper {

    display: flex;

    gap: 8px;

    justify-content: center;

}



.btn-action {

    width: 38px;

    height: 38px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 10px;

    border: 1px solid rgb(238, 238, 238);

    background:#fff;

    color: #fff;

    transition: 0.3s;

    cursor: pointer;

    text-decoration: none;

}



/* زر الصلاحيات - درع */

.btn-action.perms { color: #d3692d; }

.btn-action.perms:hover { background: #d3692d; color: #fff; }



/* زر التعديل - قلم */

.btn-action.edit { color: #4facfe; }

.btn-action.edit:hover { background: #4facfe; color: #fff; }



/* زر الحذف - سلة */

.btn-action.delete { color: #ff4b2b; }

.btn-action.delete:hover { background: #ff4b2b; color: #fff; }

body {

    font-family: 'Tajawal', sans-serif;

            background: var(--bg-dark);

    background-size: cover;

    margin: 0;

    display: flex;

    justify-content: center;

    /* align-items: center;  <-- احدث هذا السطر أو غيره لـ flex-start */

    align-items: flex-start; 

    color: #6a6a6a;

    /* height: 100vh; <-- احذف هذا السطر فوراً */

    min-height: 100vh; 

    /* overflow: hidden; <-- احذف هذا السطر لتسمح بظهور الفوتر بالأسفل */

    overflow-y: auto;

}



.app-container {

    width: 100%;

    /* height: 100%; <-- احذف الطول الثابت */

    min-height: 100vh; 

    background: var(--bg-overlay);

    border: 1px solid var(--glass-border);

    display: flex;

    /* overflow: hidden; <-- شيل السطر ده عشان الفوتر يبان لما تنزل */

    overflow: visible; 

    position: relative;

}



    body.full-mode .app-container {

        width: 100%;

        height: 100vh;

        max-width: 100%;

        border-radius: 0;

    }



  /* ==========================================
   ⚙️ المظهر الاحترافي المطور للقائمة الجانبية (Sidebar)
   ========================================== */

.sidebar {
    width: 260px; /* حجم هندسي متناسق ومريح للشاشات */
    background: #1e293b; /* لون Slate داكن فاخر بدلاً من الرمادي التقليدي الصامت */
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

[dir="ltr"] .sidebar {
    border-left: none;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

/* 👤 منطقة شعار البراند أو لوجو الشركة */
.sidebar-logo-area {
    text-align: center;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 20px;
}

/* 🔗 اللينك الرئيسي في القائمة */
.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #94a3b8; /* لون نص هادئ غير فاقع ومريح جداً للعين */
    text-decoration: none;
    font-weight: 650;
    font-size: 16px;
    border-radius: 8px; /* حواف ناعمة متناسقة مع الكروت */
    direction: rtl;
    justify-content: flex-start;
    margin-top: 4px;
    transition: all 0.2s ease-in-out;
    position: relative;
}

/* توحيد وضبط الأيقونات الأساسية */
.nav-link i:first-child {
    width: 22px;
    text-align: center;
    font-size: 1.05rem;
    color: #64748b; /* لون أيقونة هادئ يتغير عند النشاط */
    transition: color 0.2s ease;
}

/* 🔥 حالة الوقوف (Hover) والنشاط (Active) للعنصر الرئيسي */
.nav-link:hover {
    background: rgba(255, 255, 255, 0.04); /* تأثير زجاجي ناعم للغاية */
    color: #ffffff;
}

.nav-link:hover i:first-child {
    color: #f1f5f9;
}

/* العنصر النشط حالياً (الرئيسية مثلاً) */
.nav-link.active {
    background: #334155; /* خلفية مميزة تبرز العنصر النشط */
    color: #ffffff;
    font-weight: 600;
}

.nav-link.active i:first-child {
    color: #3b82f6; /* إضاءة زرقاء ذكية للأيقونة النشطة */
}

/* زق سهم المنسدلات لأقصى اليسار في العربي */
.nav-link .fa-chevron-down {
    margin-right: auto;
    font-size: 0.75rem;
    color: #475569;
    transition: transform 0.3s ease;
}

/* تدوير السهم بسلاسة عند فتح الجروب */
.nav-group.open .nav-link .fa-chevron-down {
    transform: rotate(180deg);
    color: #ffffff;
}

/* 📂 القائمة الفرعية المنسدلة (Sub Menu) */
.sub-menu {
    height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding-right: 14px; /* إزاحة جهة اليمين لتعطي عمقاً شجرياً للتصميم */
    border-right: 1px solid rgba(255, 255, 255, 0.06); /* خط شجري خفيف ينظم العناصر فرعياً */
    margin-right: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-group.open .sub-menu {
    height: auto;
    margin-top: 4px;
    margin-bottom: 8px;
}

/* روابط القائمة الفرعية الداخلية */
.sub-menu a {
    margin: 2px 0;
    padding: 9px 16px;
    color: #94a3b8;
    text-decoration: none;
    font-size:16px;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.2s ease;
}

/* 🟢 تأثير تفاعلي ناعم وراقٍ جداً للروابط الفرعية بدلاً من التدرج البرتقالي الحاد */
.sub-menu a:hover {
    background: rgba(255, 255, 255, 0.03);
    color: #3b82f6; /* يتحول النص للون الأزرق الذكي بدلاً من تغيير لون الخلفية بالكامل */
    padding-right: 20px; /* تأثير حركة اندفاعية خفيفة لليمين لإحساس بالتفاعل */
}

/* إذا كان اللينك الفرعي هو النشط حالياً */
.sub-menu a.active {
    color: #3b82f6;
    font-weight: 700;
}



.main-wrapper {

    flex: 1;

    display: flex;

    flex-direction: column;

    min-height: 100vh; /* يضمن أن الطول لا يقل عن طول الشاشة */

    overflow-y: auto; /* يسمح بالتمرير لأسفل لرؤية الفوتر */

    background-color: #e8e7e7;

}



#pages {

    flex: 1; /* يجعل منطقة المحتوى تتمدد لتزق الفوتر لآخر الصفحة دائماً */

}

    /* Header & Dropdowns - Fixed */

  .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    height: 65px;
    background: #ffffff; /* أبيض صريح يريح العين */
    border-bottom: 1px solid #edf2f7;
    flex-shrink: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.015);
    box-sizing: border-box;
    direction: rtl; /* دعم كامل ومحاذاة ممتازة للغة العربية */
}

.header-right-side, .header-left-side {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* 🎯 أزرار التحكم (مثل الفول سكرين) */
.h-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.h-btn:hover {
    background: #f1f5f9;
    color: #1e293b;
    transform: translateY(-1px);
}

/* 🟢 كبسولة حالة الاتصال (Online / Offline Toggle) */
.online-status-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    padding: 6px 14px;
    border-radius: 30px;
    border: 1px solid #edf2f7;
}

.status-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
}

/* البادج الذكي المرافق لحالة الاتصال */
.status-text-badge {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
}
.status-text-badge.is-online {
    background-color: #ecfdf5;
    color: #059669;
}
.status-text-badge.is-offline {
    background-color: #fdf2f2;
    color: #dc2626;
}

/* 🎛️ هندسة الـ Switch Toggle ليكون ناعماً وعصرياً */
.switch-toggle {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
}
.switch-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider-round {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 34px;
}
.slider-round:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
input:checked + .slider-round {
    background-color: #10b981; /* لون أخضر براند ناصع عند التفعيل */
}
input:checked + .slider-round:before {
    transform: translateX(18px);
}

/* 👤 الحاوية الفاخرة لبيانات الحساب الشخصي (Trigger) */
.user-profile-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    padding: 5px 6px 5px 14px; /* مسافة مريحة ومحسوبة هندسياً للـ Avatar */
    border-radius: 30px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-profile-trigger:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

/* بادج الرتبة (Admin / موظف) */
.user-profile-trigger .role-badge {
    background-color: #fff4e5; /* برتقالي باهت مريح جداً وبديل للأسود القاتم */
    font-size: 0.78rem;
    color: #b45309; /* لون بني ذهبي فاخر متناسق مع لون بون أبيتيه */
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
}

.user-profile-trigger .name-text {
    font-size: 0.85rem;
    color: #1e293b;
    font-weight: 600;
}

.user-avatar-img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* 📂 تصميم الـ Dropdown Menu المعلق الفاخر */
.drop-zone {
    position: relative;
    display: inline-block;
}

/* 🎯 تنسيق زر البروفايل الفاخر المتوافق مع التصميم الجديد */
.user-profile-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc; /* خلفية رمادية هادئة تناسب البار الأبيض */
    padding: 6px 6px 6px 14px;
    border-radius: 30px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-profile-trigger:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

/* بادج الرتبة (مثل: مدير النظام / موظف) */
.user-profile-trigger .role-badge {
    background-color: #fff4e5; /* لون كريمي ناعم مريح */
    font-size: 0.78rem;
    color: #b45309; /* نص بني ذهبي فخم */
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
}

/* نص الاسم */
.user-profile-trigger .name-text {
    font-size: 0.85rem;
    color: #1e293b;
    font-weight: 600;
}

/* صورة المستخدم */
.user-avatar-img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* 📂 تصميم الـ Dropdown Menu المعلق الآمن */
.drop-zone .drop-menu {
    position: absolute !important;
    top: 100% !important; /* ملتصق تماماً بأسفل كبسولة البروفايل لعدم حدوث فجوة */
    left: 0 !important;
    right: auto !important;
    background: #ffffff !important;
    border: 1px solid #edf2f7 !important;
    min-width: 190px !important;
    border-radius: 12px !important;
    display: none !important; /* مخفي افتراضياً */
    padding: 6px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
    z-index: 999999 !important;
    margin-top:2px; /* مسافة أمان لتنفس التصميم */
}

/* 🔥 تفعيل الهوفر بشكل قاطع وصارم */
.drop-zone:hover .drop-menu {
    display: block !important;
    animation: dropInNav 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* تأمين استقرار القائمة عند التحرك بالماوس بداخلها */
.drop-menu:hover {
    display: block !important;
}

/* تنسيق روابط القائمة الداخلية */
.drop-menu a {
    color: #475569 !important;
    padding: 10px 14px !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    border-radius: 8px !important;
    font-size: 0.88rem !important;
    font-weight: 500 !important;
    transition: all 0.15s ease !important;
}

.drop-menu a:hover {
    background: #f1f5f9 !important;
    color: #1e293b !important;
}

/* زر تسجيل الخروج الخاص بالتنبيه */
.drop-menu a.logout-link:hover {
    background: #fef2f2 !important;
    color: #dc2626 !important;
}

/* الفاصل الداخلي */
.dropdown-divider {
    border: 0 !important;
    height: 1px !important;
    background: #f1f5f9 !important;
    margin: 4px 0 !important;
}

/* حركة الظهور الإنسيابية الناعمة */
@keyframes dropInNav {
    from {
        opacity: 0;
        transform: translateY(6px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

    /* News Ticker */

    .news-ticker {

        background: rgba(0, 0, 0, 0.2);

        height: 40px;

        overflow: hidden;

        border-bottom: 1px solid var(--glass-border);

        flex-shrink: 0;

        display: flex;

        align-items: center;

    }



    .ticker-label {

        background: var(--primary);

        color: white;

        padding: 0 20px;

        height: 100%;

        display: flex;

        align-items: center;

        gap: 8px;

        font-weight: 900;

        font-size: 0.85rem;

        z-index: 10;

        white-space: nowrap;

    }



    .ticker-window {

        flex: 1;

        height: 100%;

        overflow: hidden;

        position: relative; /* تأمين إضافي للتحريك */

    }



    /* 🌟 شيلنا الأنيميشن القديم وخليناه نظيف وجاهز للجافا سكريبت */

    .ticker-wrap {

        position: relative;

        margin: 0;

        padding: 0;

        list-style: none;

    }



    .ticker-item {

        height: 40px;

        display: flex;

        align-items: center;

        padding-right: 20px;

        color: var(--text);

        font-weight: bold;

        font-size: 0.9rem;

    }



    /* 🌟 الأنيميشن السلس الأفقي الثابت السرعة */

    @keyframes ticker-smooth-move {

        0% {

            transform: translate3d(20%, 0, 0);

        }

        100% {

            transform: translate3d(-100%, 0, 0);

        }

    }

.ticker-btn {
    transition: transform 0.2s ease, opacity 0.2s ease;
    opacity: 0.7;
}
.ticker-btn:hover {
    transform: scale(1.2);
    opacity: 1;
}

    /* Stats Grid */

    .stats-grid {

        display: grid;

        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));

        gap: 12px;

        padding: 15px 20px;

        flex-shrink: 0;

    }



    .stat-card {

        padding: 12px;

        border-radius: 15px;

        color: white;

        text-align: center;

        border: 1px solid transparent;

    }



    .stat-card h3 {

        margin: 2px 0 0;

        font-size: 1.1rem;

        font-weight: 900;

    }



    .c1 {     display: flex;

    flex-direction: column;

    justify-content: space-between;

    padding: 12px;background: linear-gradient(135deg, #ff416c, #ff4b2b);width:70% }

    .c2 {     display: flex;

    flex-direction: column;

    justify-content: space-between;

    padding: 12px;background: linear-gradient(135deg, #4facfe, #00f2fe);width:70% }

    .c3 {     display: flex;

    flex-direction: column;

    justify-content: space-between;

    padding: 12px;background: linear-gradient(135deg, #667eea, #764ba2);width:70% }

    .c4 {     display: flex;

    flex-direction: column;

    justify-content: space-between;

    padding: 12px;background: linear-gradient(135deg, #11998e, #38ef7d);width:70% }

    .c5 {     display: flex;

    flex-direction: column;

    justify-content: space-between;

    padding: 12px;background: linear-gradient(135deg, #f2994a, #f2c94c);width:70% }



    .stat-card.action-card {

        cursor: pointer;

        animation: flash-card 2s infinite ease-in-out;

    }



    .c-chat { background: linear-gradient(135deg, #00c6ff, #0072ff); }

    .c-report { background: linear-gradient(135deg, #f093fb, #f5576c); }



    @keyframes flash-card {

        0%, 100% { opacity: 1; }

        50% { opacity: 0.8; box-shadow: 0 0 15px var(--primary); }

    }



    .body-content {

        display: flex;

        flex: 1;

        overflow: hidden;

        padding: 0 20px 10px;

    }



    .branch-column {

   width: 250px; 

    height:auto;

    overflow-y: auto;

    flex-direction: column;

    gap: 10px;

    padding-right: 10px;

    user-select: none;

    direction: ltr;

    padding-left: 5px;

    background: #fff;

    padding: 10px;

    margin-left: 10px;

    border-radius: 25px;

    padding: 10px;

    border:1px solid #eee;

    }



    .branch-column:active {

        cursor: grabbing;

    }



    .view-panel {

        flex: 1;

        background: #fff;

        border: 0px solid var(--glass-border);

        border-radius: 25px;

        padding:10px;

        overflow-y: auto;

    }

.no-click {

    cursor: default !important; /* الماوس يفضل سهم عادي مش إيد */

    pointer-events: none; /* يمنع أي ضغط أو تفاعل نهائياً */

    user-select: none; /* يمنع تحديد النص */

    opacity: 0.9; /* تعطي إيحاء بسيط إنه عنصر عرض مش زرار تفاعلي */

}



/* تعديل بسيط للـ active-branch عشان يشيل تأثير الـ hover لو كان موجود */

.active-branch.no-click:hover {

    transform: none !important;

    filter: none !important;

    background: #d37133 !important; 

}

    .branch-btn {

        background: var(--glass);

        border: 1px solid var(--glass-border);

        padding: 12px;

        border-radius: 10px;

        cursor: pointer;

        text-align: center;

        font-weight: 400;

        font-size:15px;

        color: var(--text);

    }

.active-branch {

    background: #ddd !important; 

    color: #333 !important;

    border: none;

    box-shadow: 0 4px 15px rgba(211, 113, 51, 0.3);

}

    .branch-btn:hover,

    .branch-btn.active {

        background: var(--primary);

        color: white;

    }



.footer {
    padding: 12px 24px;
    background: #ffffff; /* خلفية بيضاء نظيفة تفصل الفوتر عن محتوى البوكس */
    border-top: 1px solid #edf2f7; /* خط فاصل ناعم جداً بدلاً من #eee التقليدي */
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0; /* حافظنا عليها لمنع الانكماش */
    font-size: 0.85rem;
    color: #64748b; /* لون نص هادئ ومتناسق */
}

.whatsapp-btn {
    background: #25d366;
    color: #ffffff;
    text-decoration: none;
    padding: 6px 16px; /* بادينج متناسق هندسياً لجعل الزر مستطيلاً بحواف دائرية ناعمة */
    border-radius: 8px; /* حواف عصرية متناسقة مع لغة التصميم الجديدة */
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2); /* تأثير توهج خفيف وراقي */
    transition: all 0.2s ease-in-out;
}

/* تأثيرات تفاعلية مبهرة عند مرور الماوس (Hover) */
.whatsapp-btn:hover {
    background: #20ba5a; /* درجة أغمق قليلاً عند الوقوف */
    transform: translateY(-1px); /* حركة رفع طفيفة جداً لتعطي شعوراً بالتفاعل */
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.35); /* زيادة التوهج بشكل ناعم */
}

.whatsapp-btn:active {
    transform: translateY(0); /* إعادة الزر لوضعه الطبيعي عند الضغط */
}

/* أيقونة الواتساب داخل الزر */
.whatsapp-btn i {
    font-size: 1rem;
}



    /* Alert Styles */

	#serverIpDisplay {

    transition: all 0.3s ease;

    display: inline-block;

    width: 100%;

}



/* كلاس الحركة - سنضيفه ونزيله بالـ JS */

.ping-slide {

    animation: slideInOut 0.5s ease-in-out;

}



@keyframes slideInOut {

    0% {

        opacity: 0;

        transform: translateY(-10px);

    }

    50% {

        opacity: 1;

        transform: translateY(0);

    }

    100% {

        opacity: 1;

        transform: translateY(0);

    }

}



/* الألوان بناءً على الحالة */

.status-online { color: #2ecc71; font-weight: bold; }

.status-offline { color: #f1c40f; font-weight: bold; }

.status-error { color: #ff4b2b; font-weight: bold; }

.custom-alert.closed {

    display: none !important;

}

.alert-container {

    display: grid;

    grid-template-columns: 1fr;

    width: 100%;             /* العرض الكامل */

    margin: 10px 0;          /* مسافة فوق وتحت فقط */

    padding: 0 20px 10px;          /* صفر بادينج عشان م تخرجش بره */

    overflow: hidden;        /* قص أي زيادة */

    position: relative;

    box-sizing: border-box;

}



/* التنبيه نفسه */

.alert-container.empty {

    display: none !important;

}.custom-alert.closed {

    display: none !important;

}

.custom-alert {

    grid-area: 1 / 1 / 2 / 2;

    /* السر هنا: طرح عرض البرواز من العرض الكلي */

    width: calc(100% - 2px); 

    margin: 0 auto;          /* سنترة الإشعار */

    display: flex;

    align-items: center;

    background: rgba(255, 65, 108, 0.1);

    border: 1px solid rgba(255, 65, 108, 0.2);

    padding: 12px 20px;

    min-height: 60px;

    box-sizing: border-box;  /* بيخلي البادينج يتحسب من جوه */

    backdrop-filter: blur(10px);

    border-radius: 15px;

    

    /* الأنيميشن */

pointer-events: none;

    

    /* الحالة الابتدائية: خارج الشاشة يميناً مع شفافية */

    opacity: 0;

    transform: translateX(100px) scale(0.9) skewX(-10deg);

    

    /* سرعة الحركة مع منحنى ارتداد (Elastic) */

    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);

    

    /* لمسات جمالية إضافية */

    backdrop-filter: blur(15px);

    border-right: 4px solid var(--primary); /* خط ملون من جهة الدخول */

}



/* حالة الظهور */

.custom-alert.show {

    opacity: 1;

    pointer-events: auto;

    transform: translateY(0);

}



/* حالة الإشعار أثناء الخروج */

.custom-alert.hide {

    opacity: 0;

    pointer-events: none;

    transform: translateY(-15px);

    z-index: 1;

}



/* الوقف عند مرور الماوس */

.alert-container:hover .custom-alert.show {

    border-color: var(--primary);

}



/* تنسيقات المحتوى */

.alert-icon { color: var(--primary); margin-left: 15px; flex-shrink: 0; font-size: 1.2rem; }

.alert-text { flex: 1; font-size: 0.9rem; color: var(--text); line-height: 1.4; }

.alert-close { background: none; border: none; color: var(--text); cursor: pointer; font-size: 1.5rem; opacity: 0.5; padding: 0 5px; }

.alert-close:hover { opacity: 1; color: #ff4b2b; }



    /* Dashboard Styles */

    .dashboard-overview {

        display: grid;

        grid-template-columns: 1fr 1fr;

        gap: 20px;

        margin-top: 25px;

    }



    .chart-container {

        background: var(--glass);

        border: 1px solid var(--glass-border);

        border-radius: 20px;

        padding: 20px;

        min-height: 300px;

    }



    .branch-status-box {

        grid-column: span 2;

        display: flex;

        gap: 15px;

        flex-wrap: wrap;

        margin-bottom: 20px;

    }



    .status-tag {

        padding: 8px 15px;

        border-radius: 10px;

        font-size: 0.85rem;

        display: flex;

        align-items: center;

        gap: 8px;

        background: var(--glass);

        border: 1px solid var(--glass-border);

    }



    .status-tag.online i { color: #2ecc71; animation: pulse 1.5s infinite; }

    .status-tag.busy i { color: #f1c40f; }



    .best-worst-grid {

        display: grid;

        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));

        gap: 15px;

        grid-column: span 2;

        margin-bottom: 20px;

    }



    .info-card {

        background: var(--glass);

        border: 1px solid var(--glass-border);

        padding: 15px;

        border-radius: 15px;

        align-items: center;

        gap: 15px;

    }



    .info-card i {  opacity: 0.8; }

    .info-card.top i { color: #2ecc71; }

    .info-card.low i { color: var(--primary); }



    @keyframes pulse {

        0% { opacity: 1; }

        50% { opacity: 0.4; }

        100% { opacity: 1; }

    }



    .status-summary-grid {

        display: grid;

        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));

        gap: 10px;

        margin-bottom: 20px;

    }



    .status-box {

        padding: 15px;

        border-radius: 15px;

        background: var(--glass);

        border: 1px solid var(--glass-border);

        text-align: center;

    }



    .status-box i { font-size: 1.5rem; margin-bottom: 5px; display: block; }

    .status-box.online i { color: #2ecc71; }

    .status-box.busy i { color: #f1c40f; }

    .status-box.offline i { color: #e74c3c; }



  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  .tickets-section {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    border: 1px solid #edf2f7;
    margin-top: 24px;
    padding: 0;
    overflow: hidden;
    direction: rtl;
}

/* الرأس الاحترافي */
.stats-header {
    background: #ffffff;
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
}

.stats-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #1e293b;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-icon-style {
    color: #e46a25;
    background: #fff3eb;
    padding: 8px;
    border-radius: 8px;
    font-size: 1rem;
}

/* الحاوية المرنة */
.table-responsive-container {
    width: 100%;
    overflow-x: auto;
    background: #ffffff;
}

/* التنسيق الهندي والأساسي للجدول */
.ticket-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    table-layout: fixed; /* 🎯 إجبار الأعمدة على احترام مساحاتها المحددة دون عشوائية */
}

/* توزيع مساحات الأعمدة بدقة لمنع التشوه */
.ticket-table th:nth-child(1), .ticket-table td:nth-child(1) { width: 90px; text-align: center; } /* رقم التذكرة */
.ticket-table th:nth-child(2), .ticket-table td:nth-child(2) { width: 210px; } /* الفرع */
.ticket-table th:nth-child(3), .ticket-table td:nth-child(3) { width: 180px; } /* المنشئ */
.ticket-table th:nth-child(4), .ticket-table td:nth-child(4) { width: 200px; } /* التصنيف */
.ticket-table th:nth-child(5), .ticket-table td:nth-child(5) { width: 200px; } /* المشكلة - مساحة أكبر */
.ticket-table th:nth-child(6), .ticket-table td:nth-child(6) { width: 140px; } /* التوقيت */
.ticket-table th:nth-child(7), .ticket-table td:nth-child(7) { width: 140px; } /* آخر تحديث */
.ticket-table th:nth-child(8), .ticket-table td:nth-child(8) { width: 110px; text-align: center; } /* الحالة */

/* الهيدر الخاص بالجدول */
.ticket-table th {
    background-color: #f8fafc;
    color: #64748b;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 14px 16px;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

/* الصفوف والخلايا - ضبط المحاذاة العمودية بدقة */
.ticket-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* 🎯 تحويل النصوص الزائدة لنقاط بشكل احترافي */
    vertical-align: middle; /* 🎯 ضبط كل عناصر الصف على خط استواء واحد منتصف عمودياً */
}

/* تأثير تفاعلي راقٍ عند مرور الماوس */
.ticket-table tbody tr {
    transition: background-color 0.15s ease;
}

.ticket-table tbody tr:hover {
    background-color: #f8fafc;
}

/* تصميم رقم التذكرة */
.ticket-id-badge {
    background: #f1f5f9;
    color: #334155;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.82rem;
    display: inline-block;
}

/* اسم الفرع */
.branch-text-style {
    font-weight: 600;
    color: #1e293b;
}

/* خلية المنشئ */
.user-info-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.icon-user-avatar {
    color: #e46a25;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* تصنيفات التذاكر (Badges) */
.sections-badge-new {
    background: #eff6ff;
    color: #2563eb;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(37, 99, 235, 0.1);
}

/* خلية شرح المشكلة لتبدو مهندمة ومقصوصة باحترافية */
.subject-cell-style {
    color: #475569;
    font-weight: 400;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* عند الوقوف بالماوس يظهر النص كاملاً كتلميح ذكي */
.subject-cell-style:hover {
    overflow: visible;
    white-space: normal;
    position: relative;
    background: #f8fafc;
    z-index: 10;
}

/* خلايا التوقيت */
.time-cell {
    font-size: 0.8rem;
    color: #64748b;
}

.no-update {
    color: #94a3b8;
    font-style: italic;
}

/* كبسولات الحالات (Pills) */
.custom-status-pill {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    display: inline-block;
    text-align: center;
    width: 80px;
}

.pill-open { background-color: #fff3eb; color: #e46a25; border: 1px solid rgba(228, 106, 37, 0.15); }
.pill-progress { background-color: #eff6ff; color: #2563eb; border: 1px solid rgba(37, 99, 235, 0.15); }
.pill-resolved { background-color: #ecfdf5; color: #059669; border: 1px solid rgba(5, 150, 105, 0.15); }

/* حالة الجدول الفارغ */
.empty-table-state {
    text-align: center !important;
    padding: 32px 16px !important;
    color: #94a3b8;
}
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  



    /* Chat Section */

	.chats-dock {

    position: fixed;

    bottom: 0;

    right: 100px;

    display: flex;

    flex-direction: row-reverse; /* عشان يبدأوا من اليمين */

    gap: 15px;

    z-index: 9999;

    pointer-events: none; /* عشان ميغطيش على اللي وراه إلا لو فيه شات */

}

.ai-chat-container {

    pointer-events: auto; /* رجوع اللمس للشات نفسه */

    width: 450px;

    background: #162a61;

    border-radius: 12px 12px 0 0;

    display: flex;

    flex-direction: column;

    box-shadow: 0 -5px 20px rgba(0,0,0,0.3);

    transition: transform 0.3s ease;

}

.ai-chat-container.minimized {

transform: translateY(calc(100% - 55px));

margin-bottom: 15px;

width:280px !important;



	/* يختفي ويتبقى الهيدر */

}



.ai-chat-container.minimized .chat-body,

.ai-chat-container.minimized .chat-footer,

.ai-chat-container.minimized .chat-info-bar {

    display: none; /* إخفاء المحتوى تماماً عند التصغير */

}

.header-actions {

    display: flex;

    gap: 5px;

}



.min-btn {

background: var(--glass);

    border: 1px solid var(--glass-border);

    color: white;

    width: 30px;

    height: 30px;

    border-radius: 10px;

    cursor: pointer;

    display: flex;

    align-items: center;

    justify-content: center;

}



.min-btn:hover { background: var(--primary);		        ;

 }

    .chat-card-clean {

        width: 100%;

        background: #162a61;

        display: flex;

        flex-direction: column;

        height: calc(100vh - 150px);

        border: none;

        padding: 10px;

        border-radius: 10px;

        font-size: 20px;



    }



.chat-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    padding: 10px 5px; /* قللنا الـ padding شوية عشان يناسب حجم النافذة العائمة */

    background: rgba(255, 255, 255, 0.07); /* زودنا الوضوح حاجة بسيطة */

    border-bottom: 1px solid var(--glass-border);

    border-radius: 12px 12px 0 0;

    cursor: pointer; /* عشان التفاعل مع الـ Minimize */

    user-select: none; /* منع تحديد النص أثناء الضغط المتكرر */

    min-height: 55px;

	

}



/* حاوية الأزرار (إغلاق وتصغير) */

.header-actions {

    display: flex;

    align-items: center;

    gap: 8px;

}



/* تنسيق موحد للأزرار الصغيرة في الهيدر */

.header-btn {

    background: var(--glass);

    border: 1px solid var(--glass-border);

    color: var(--text);

    width: 30px;

    height: 30px;

    border-radius: 8px;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 0.8rem;

    transition: 0.3s;

}



.header-btn:hover {

    background: var(--primary);

    color: white;

    border-color: var(--primary);

}



.header-btn.close-x:hover {

    background: #e74c3c; /* لون أحمر عند المسح لقفل الشات */

    border-color: #e74c3c;

}



    .header-main-info {

        display: flex;

        align-items: center;

        gap: 5px;

    }



    .back-btn {

        background: var(--glass);

        border: 1px solid var(--glass-border);

        color: white;

        width: 30px;

        height: 30px;

        border-radius: 10px;

        cursor: pointer;

        display: flex;

        align-items: center;

        justify-content: center;

    }



    .back-btn:hover {

        background: var(--primary);

        border-color: var(--primary);

        

    }



    .ticket-titles h3 {

        margin: 0;

        font-size: 1.1rem;

        color: var(--primary);

        font-weight: 600;

    }



    .ticket-titles small {

        display: block;

        color: rgba(255, 255, 255, 0.6);

        font-size: 0.85rem;

        margin-top: 2px;

    }



    .status-pill {

        padding: 6px 14px;

        border-radius: 20px;

        font-size: 0.8rem;

        font-weight: bold;

        letter-spacing: 0.5px;

    }



    .status-open {

        background: rgba(46, 204, 112, 0.712);

        color: #ffffff;
white-space: nowrap;
    }



    .status-pending {

        background: rgba(224, 10, 10, 0.67);

        color: #ffffff;
white-space: nowrap;
    }

    .status-shipping {

        background: rgba(10, 134, 224, 0.72);

        color: #ffffff;
white-space: nowrap;
    }

  .status-resolved {

background: #333;
white-space: nowrap;
  color: #ffffff;

    }
.status-open, .status-pending, .status-shipping, .status-resolved {
    padding: 5px 12px;
    border-radius: 6px; /* حواف دائرية ناعمة وعصرية */
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    text-align: center;
    min-width: 85px;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

/* جديدة (Open) */
.status-open {
    background: rgba(46, 204, 112, 0.15); /* جعل الخلفية هادئة مريحة للعين */
    color: #2ecc71; /* نصوص حادة وواضحة */
    border: 1px solid rgba(46, 204, 112, 0.25);
}

/* قيد التنفيذ (Pending) */
.status-pending {
    background: rgba(224, 10, 10, 0.1);
    color: #e00a0a;
    border: 1px solid rgba(224, 10, 10, 0.2);
}

/* الشحن أو التحديث الآخر (Shipping) */
.status-shipping {
    background: rgba(10, 134, 224, 0.1);
    color: #0a86e0;
    border: 1px solid rgba(10, 134, 224, 0.2);
}

/* تم الحل (Resolved) */
.status-resolved {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}


    



    .chat-info-bar {

        display: flex;

        flex-wrap: wrap;

        gap: 20px;

        padding: 15px 10px;

        background: rgb(0 0 0 / 69%);

        border-radius: 10px;

        margin-top: 10px;

    }



    .info-item {

        font-size: 0.85rem;

        white-space: nowrap;

    }



    .chat-body {

        flex: 1;

        overflow-y: auto;

        display: flex;

        flex-direction: column;

        gap: 15px;

        padding: 20px;

        border-radius: 10px;

        margin: 2px;

        background-image: url('../images/bg.jpg');

        background-repeat: repeat;

        background-size: 600px;

        background-color: #69759b;

        background-blend-mode: overlay;

        margin-top: 5px;

        color: #333;

        font-weight: 700;

    }

	.dash-section {

		margin:auto;

			text-align:center;

;

        }





        .dash-section i {

			text-align:center;

            font-size: 3rem;

            color: var(--primary);

            margin-bottom: 10px;

            filter: drop-shadow(0 0 10px var(--primary));

        }



        .dash-section h2 {

            color: white;

            margin: 0 0 0px 0;

            font-weight: 300;

            letter-spacing: 2px;

        }

    .bubble {

        max-width: 90%;

        word-wrap: break-word;

        padding: 12px 16px;

        border-radius: 12px;

        font-size: 0.98rem;

        line-height: 1.4;

        color: #000;

    }



    .bubble small {

        display: block;

        font-weight: 900;

        margin-bottom: 6px;

        font-size: 0.75rem;

        opacity: 0.7;

    }



    .chat-attachment img {

        max-width: 100%;

        height: auto;

        border-radius: 10px;

        margin-top: 8px;

    }



    .chat-footer {

        padding: 10px;

        background: rgb(0 0 0 / 39%);

        border-top: 1px solid var(--glass-border);

        border-radius: 10px;

        margin: 2px;

        margin-top: 5px;

        color: #000 !important;

    }



    button.send-btn-pro {

        background: #ff416c !important;

        background: linear-gradient(45deg, #ff416c, #ff4b2b) !important;

        color: #ffffff !important;

        width: 45px !important;

        height: 45px !important;

        border: none !important;

        border-radius: 12px !important;

        cursor: pointer !important;

        display: flex !important;

        align-items: center !important;

        justify-content: center !important;

        transition: 0.3s all ease !important;

        box-shadow: 0 4px 15px rgba(255, 65, 108, 0.4) !important;

        outline: none !important;

        padding: 0 !important;

    }



    button.send-btn-pro:hover {

        transform: translateY(-2px) scale(1.05) !important;

        box-shadow: 0 6px 20px rgba(255, 65, 108, 0.6) !important;

        filter: brightness(1.1);

    }



    button.send-btn-pro i {

        font-size: 1.2rem !important;

        color: white !important;

    }



    .msg {

        display: flex;

        gap: 12px;

        max-width: 85%;

        position: relative;

    }



    .user-avatar {

        width: 38px;

        height: 38px;

        border-radius: 8px;

        object-fit: cover;

        border: 1px solid var(--glass-border);

    }



    .support-msg .bubble {

        background: rgb(129 182 220 / 61%);

        border: 1px solid rgb(99 136 164);

        float: left !important;

    }



    .branch-msg .bubble {

        background: rgb(41 128 185 / 46%);

        border: 1px solid rgb(41 43 45 / 30%);

    }



    .admin-msg {

        align-self: flex-end;

        flex-direction: row-reverse;

    }



    .admin-msg .bubble {

        background: var(--primary);

        border: none;

    }



    .chat-attachment {

        margin-top: 10px;

        border-radius: 8px;

        overflow: hidden;

        border: 1px solid rgba(255, 255, 255, 0.1);

    }



    .attached-img {

        width: 100%;

        max-width: 250px;

        display: block;

        cursor: zoom-in;

        transition: 0.3s;

    }



    .attached-img:hover {

        transform: scale(1.02);

    }



    .input-group-pro {

        display: flex;

        align-items: center;

        background: rgb(255 255 255);

        border: 1px solid var(--glass-border);

        border-radius: 12px;

        padding: 5px 15px;

    }



    .input-group-pro input {

        font-size: 18px;

        flex: 1;

        background: transparent;

        border: none;

        color: #000; /* تم تعديله من white ليظهر على خلفية بيضاء */

        padding: 12px;

        outline: none;

    }



    .attach-action {

        background: none;

        border: none;

        color: #aaa;

        font-size: 1.2rem;

        cursor: pointer;

        transition: 0.3s;

    }



    .attach-action:hover {

        color: var(--primary);

    }



    /* Media Queries */

    @media (max-width: 992px) {

        #menuBtn { display: flex; }

        .sidebar {

            position: fixed;

            right: -300px;

            top: 0;

            bottom: 0;

            background: rgb(57 48 48);

            backdrop-filter: blur(20px);

            z-index: 100000;

        }

        .sidebar.active { right: 0; }

        #closeMenuBtn {

            display: flex !important;

            background: var(--primary);

            color: white;

            border: none;

            width: 35px;

            height: 35px;

            border-radius: 10px;

            align-items: center;

            justify-content: center;

        }

        .body-content { flex-direction: column; }

        .branch-column {

            width: 100%;

            flex-direction: row;

            overflow-x: auto;

            height: auto;

            padding: 0 0 10px 0;

        }

        .branch-btn { min-width: 120px; }

        .stats-grid { grid-template-columns: repeat(3, 1fr); }



    }



    @media (max-width: 768px) {

        .chat-info-bar { flex-direction: column; gap: 8px; }

        .chat-header {

            flex-direction: column;

            align-items: flex-start;

            gap: 10px;

            padding: 10px 15px;

        }

        .ticket-titles h3 { font-size: 1rem; }

        .status-pill {

            padding: 4px 10px;

            font-size: 0.75rem;

            align-self: flex-start;

        }

        .msg { max-width: 100%; }

        .dashboard-overview { grid-template-columns: 1fr; }

    }

	.locked-products-box {

    margin-top: auto;

    background: rgba(255, 65, 108, 0.1);

    border: 1px solid rgba(255, 65, 108, 0.2);

    border-radius: 15px;

    padding: 12px;

    overflow: hidden;

}



.lp-header {

    display: flex;

    align-items: center;

    gap: 8px;

    font-size: 0.8rem;

    font-weight: 900;

    color: var(--primary);

    margin-bottom: 8px;

    border-bottom: 1px solid rgba(255, 65, 108, 0.1);

    padding-bottom: 5px;

}



#lockIcon {

    animation: lockPulse 1.5s infinite;

}



.lp-content {

    height: 30px; /* يعرض سطر واحد فقط */

    overflow: hidden;

    position: relative;

}



.lp-slider {

    animation: slideUpList 8s infinite ease-in-out;

}



.lp-item {

    height: 30px;

    display: flex;

    align-items: center;

    font-size: 0.85rem;

    color: var(--text);

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;

}

@media (max-width: 992px) {

    /* جعل الحاوية تملأ الشاشة بالكامل في الموبايل */

    .app-container {

        width: 100% !important;

        height: 100vh !important;

        max-width: 100% !important;

        border-radius: 0 !important; /* إلغاء الحواف المستديرة لتبدو كأنها شاشة كاملة */

        border: none !important;

    }



    /* إلغاء الفراغات حول جسم الصفحة في الموبايل */

    body {

        padding: 0 !important;

        display: block !important; /* تغيير من flex لضمان الثبات */

    }



    /* إخفاء الأزرار اللي طلبنا إخفاءها سابقاً */

    #fullScreenBtn, #boxedBtn {

        display: none !important;

    }

}

/* حركة القفل */

@keyframes lockPulse {

    0% { transform: scale(1); opacity: 1; }

    50% { transform: scale(1.2); opacity: 0.7; }

    100% { transform: scale(1); opacity: 1; }

}



/* حركة النصوص من الأسفل للأعلى */

@keyframes slideUpList {

    0%, 20% { transform: translateY(0); }

    25%, 45% { transform: translateY(-30px); }

    50%, 70% { transform: translateY(-60px); }

    75%, 95% { transform: translateY(-90px); }

    100% { transform: translateY(0); }

}















.branch-details-wrapper {

    padding: 10px;

    color: var(--text);

}



.branch-header-glass {

    background: rgb(57 48 48);

    border: 1px solid var(--glass-border);

    padding: 20px;

    border-radius: 20px;

    text-align: center;

    margin-bottom: 20px;

    backdrop-filter: blur(10px);

}





/* تصميم التابات */

.tabs-nav {

    display: flex;

    gap: 10px;

    margin-bottom: 15px;

}



.t-btn {

    background: rgb(232 231 231);

    border: 1px solid var(--glass-border);

    color: #2b2b2c;

    padding: 10px 20px;

    border-radius: 12px;

    cursor: pointer;

    flex: 1;

    transition: 0.3s;

    font-family: 'Tajawal', sans-serif;

    font-weight: bold;

    font-size: 14px;

}



.t-btn.active {

background: #f36f21;

    border-color: #c55818;

    color:#fff;

}



.tab-pane {
    display: none;
    animation: fadeIn 0.4s ease;
    font-size: 14px;
    overflow: visible; /* تأكد من إضافة هذه السطر */
}

.tab-pane.active {
    display: block;
}



/* كروت المنيو الزجاجية */

.food-item-glass {

display: flex;

    justify-content: space-between;

    align-items: center;

   background: rgb(232 231 231) !important;

    padding: 15px 20px;

    border-radius: 15px;

    border-right: 4px solid #f36f21;

    color: #333;

    font-weight: bold;

}



.food-price {

    color: var(--primary);

    font-weight: bold;

    display: block;

    margin-top: 10px;

}



@keyframes fadeIn {

    from { opacity: 0; transform: translateY(10px); }

    to { opacity: 1; transform: translateY(0); }

}

@keyframes fadeIn {

    from { opacity: 0; transform: translateY(10px); }

    to { opacity: 1; transform: translateY(0); }

}

.info-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; }

.info-card-mini { 

    background: rgb(232 231 231);

    border: 1px solid var(--glass-border);

    padding: 15px;

    border-radius: 12px;

    display: flex;

    align-items: center;

    gap: 15px;

    flex: 1 1 calc(50% - 10px);

    color: #333;

}

.info-card-mini-custom {

    direction: rtl;

    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, arial;

    background: #ffffff;

    border-radius: 12px;

    padding: 15px;

    border: 1px solid rgba(211, 105, 45, 0.15);

    display: flex;

    align-items: center;

    gap: 15px;

    transition: all 0.3s ease;

    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);

    /* مرونة العرض لتتوافق مع أي حاوية محيطة */

    flex: 1 1 calc(26% - 15px); 

    min-width: 250px;

}



.info-card-mini-custom:hover {

    transform: translateY(-3px);

    border-color: rgba(211, 105, 45, 0.4);

    box-shadow: 0 10px 15px -3px rgba(211, 105, 45, 0.08);

}



/* تصميم الأيقونة الشخصية (تعديل طفيف: أضفنا position: relative) */

.info-card-mini-custom .user-avatar-icon {

    position: relative; /* مهم جداً لضبط موقع نقطة الحالة بالزاوية */

    font-size: 1.5rem; /* تم تصغير حجم الفونت قليلاً ليتناسق مع الحجم الإجمالي 45px */

    color: #d3692d;

    background: rgba(211, 105, 45, 0.08);

    border-radius: 50%;

    display: flex;

    align-items: center;

    justify-content: center;

    width: 45px;

    height: 45px;

    flex-shrink: 0; /* تمنع انضغاط الدائرة إذا كان النص طويلاً */

}



/* =================================================== */

/* 🌟 إضافة كود نقطة الحالة (متصل / غير متصل) الذكي */

/* =================================================== */

.info-card-mini-custom .status-dot-mini {

    position: absolute;

    bottom: 0px;

    right: 0px;

    width: 12px;

    height: 12px;

    border-radius: 50%;

    border: 2px solid #ffffff; /* يصنع حلقة بيضاء تفصل النقطة عن خلفية الدائرة لتبدو احترافية */

    background-color: #95a5a6; /* اللون الافتراضي: رمادي (غير متصل) */

    transition: all 0.3s ease;

    z-index: 2;

}



/* عندما يكون العضو متصل (يتحول للأخضر النبّاض) */

.info-card-mini-custom .status-dot-mini.online {

    background-color: #2ecc71;

    box-shadow: 0 0 6px #2ecc71, 0 0 12px #2ecc71;

    animation: miniGlow 1.8s infinite ease-in-out;

}



/* أنيميشن التوهج والنبض اللطيف */

@keyframes miniGlow {

    0% {

        transform: scale(0.92);

        box-shadow: 0 0 4px #2ecc71, 0 0 8px #2ecc71;

    }

    50% {

        transform: scale(1.1);

        box-shadow: 0 0 8px #2ecc71, 0 0 16px #2ecc71;

    }

    100% {

        transform: scale(0.92);

        box-shadow: 0 0 4px #2ecc71, 0 0 8px #2ecc71;

    }

}

/* =================================================== */



/* =========================================================================
   تنسيق كروت الموظفين الجديدة - النمط العمودي مع الشريط المائل
   ========================================================================= */

/* الحاوية الرئيسية للكارت */
/* الكارد الرئيسي */
.info-card-mini-custom {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid #eee;
    position: relative; 
    background: #fff;
    border-radius: 8px;
    margin-bottom: 5px;
    /* التأكد من عدم قص المحتوى الأساسي */
    overflow: hidden; 
}
.info-card-mini-custom {
    /* ... التنسيقات السابقة ... */
    backface-visibility: hidden; /* يمنع مشاكل الرندر في العناصر المتحركة */
    perspective: 1000px;         /* يضمن تحديث الطبقات فوراً */
}
/* الحاوية التي تقص الشريط داخل حدود الكارد */
.ribbon-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 80px;  /* حجم المنطقة التي سيظهر فيها الشريط */
    height: 80px;
    overflow: hidden; /* هذا السطر هو السر: يقص أي شيء خارج حدود الـ 80x80 */
    pointer-events: none; /* لا يعيق الضغط على الكارد */
}

/* تنسيق الشريط المائل نفسه */
.status-ribbon {
    position: absolute; 
    top: 10px; 
    left: -39px; /* نفس إزاحة الـ offer-badge */
    width: 120px; /* لضمان ثبات العرض */
    padding: 5px 0; /* تحسين التوسيط */
    transform: rotate(-45deg); 
    font-size: 0.7rem; 
    font-weight: bold;
    text-align: center;
    color: #fff;
    z-index: 100 !important; /* رفع الأولوية لأقصى درجة */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.status-ribbon.online { background-color: #2ecc71; }
.status-ribbon.offline { background-color: #718096; }

/* باقي التنسيقات */
.card-details-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}
.role-label { font-size: 0.75rem; color: #a0aec0; font-weight: 600; text-transform: uppercase; }
.user-fullname { margin: 0; font-size: 13px; font-weight: 700; color: #2d3748; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phone-wrapper { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; color: #d3692d; font-weight: 500; }


/* تنسيقات المنيو */

.menu-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 15px; 
    width: 100%;
}






.food-item-glass { 
display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-radius: 15px;
  border: 1px solid #e8e7e7;
  box-sizing: border-box;
  background: #eafff3 !important;
}
.food-info h4 { text-align: center;font-size: 18px; margin: 0; color: #f36f21; }

.food-info p {width:100%; margin: 5px 0; font-size: 0.85rem; opacity: 0.8; }

.food-price { font-weight: bold; color: #1dc208;font-size:18px; background: rgba(255,255,255,0.1); padding: 2px 8px; border-radius: 5px; }



/* التوافر */

.food-status { font-size: 0.75rem; padding:13px; border-radius: 20px; }

.food-status.available { background: rgba(46, 204, 113, 0.2); color: #2ecc71; border: 1px solid #2ecc71; }

.food-status.out-of-stock { background: rgba(231, 76, 60, 0.2); color: #e74c3c; border: 1px solid #e74c3c; }



/* كارت العروض */

.offer-card-glass { 

    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,65,108,0.1)); 

    border: 1px solid var(--primary); 

    padding: 20px; 

    border-radius: 20px; 

    position: relative;

    overflow: hidden;

}

.offer-badge { 

    position: absolute; top: 10px; left: -30px; 

    background: var(--primary); color: #fff; 

    padding: 5px 40px; transform: rotate(-45deg); font-size: 0.7rem; 

}

.offer-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 15px; border-top: 1px solid var(--glass-border);  }

.offer-expiry { font-size: 0.75rem; color: #f1c40f; }

.branch-header-glass {

    position: relative; 

        background: rgb(57 48 48);

    border: 1px solid var(--glass-border);

    padding: 30px 20px;

    border-radius: 20px;

    overflow: hidden;

    display: flex;

    justify-content: center;

    align-items: center;

    backdrop-filter: blur(15px);

    -webkit-backdrop-filter: blur(15px);

    margin-bottom: 25px;

}



/* صورة الخلفية الشفافة */

.header-bg-overlay {

    position: absolute;

    top: 0;

    left: 0;

    width: 100%;

    height: 100%;

    /* استبدل الرابط بصورة لوجو مطعمك أو صورة أكل */

    background-image: url('https://www.transparenttextures.com/patterns/black-paper.png'), 

                      url('https://images.unsplash.com/photo-1517248135467-4c7edcad34c4?q=80&w=500'); 

    background-size: cover;

    background-position: center;

    opacity: 0.15; /* درجة شفافية الصورة خلف النص */

    z-index: 1;

}



/* ترتيب المحتوى فوق الصورة */

.header-content {

    position: relative;

    z-index: 2; /* لضمان ظهور النص فوق الصورة */

    text-align: center;

    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 10px;

}



.branch-title-row {

    display: flex;

    align-items: center;

    gap: 15px; /* مسافة بين الأيقونة والاسم */

}



.branch-icon {

    font-size: 1.8rem;

    color: #f8e081;

    filter: drop-shadow(0 0 8px rgba(255, 65, 108, 0.4));

}



.header-content h2 {

    margin: 0;

    font-size: 1.6rem;

    letter-spacing: 1px;

    color: var(--text);

}



/* مؤشر الحالة */

.status-indicator {

    display: flex;

    align-items: center;

    gap: 8px;

    background: rgba(0, 0, 0, 0.2);

    padding: 5px 15px;

    border-radius: 30px;

    font-size: 0.85rem;

}



.status-indicator.open { color: #2ecc71; border: 1px solid #2ecc71; }

.status-indicator.closed { color: #616161; border: 1px solid #616161; }

.status-indicator.busy { color: #e2df10; border: 1px solid #e2df10; }





/* النقطة اللي بتنور (Pulse) */

.pulse-dot.open {

    width: 8px;

    height: 8px;

    border-radius: 50%;

    background: #2ecc71;

    display: inline-block;

    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);

    animation: pulse-green 2s infinite;

}

.pulse-dot.closed {

    width: 8px;

    height: 8px;

        background: #9a9b9a;



    border-radius: 50%;

    display: inline-block;

    box-shadow: 0 0 0 0 rgba(81, 83, 82, 0.7);

    animation: pulse-black 2s infinite;

}

.pulse-dot.busy {

    width: 8px;

    height: 8px;

    border-radius: 50%;

    display: inline-block;

    background: #eccc3d;

    box-shadow: 0 0 0 0 rgba(240, 194, 43, 0.7);

    animation: pulse-yellow 2s infinite;

}

@keyframes pulse-green {

    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7); }

    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(46, 204, 113, 0); }

    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }

}

@keyframes pulse-black {

    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(79, 80, 80, 0.7); }

    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(46, 204, 113, 0); }

    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }

}

@keyframes pulse-yellow {

    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(226, 223, 28, 0.7); }

    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(46, 204, 113, 0); }

    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }

}



.unavailable-products-carousel {

    padding: 20px;

    background: var(--glass);

    border: 1px solid var(--glass-border);

    border-radius: 20px;

    backdrop-filter: blur(10px);

    overflow: hidden;

}



.stats-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 0px;

}



/* أزرار التحكم */

.carousel-controls {

    display: flex;

    gap: 10px;

}



.control-btn {

    background: var(--glass);

    border: 1px solid var(--glass-border);

    color: var(--text);

    width: 35px;

    height: 35px;

    border-radius: 50%;

    cursor: pointer;

    transition: 0.3s;

    display: flex;

    align-items: center;

    justify-content: center;

}



.control-btn:hover {

    background: var(--primary);

    border-color: var(--primary);

    transform: scale(1.1);

}



/* منطقة العرض */

.carousel-viewport {

    overflow-x: hidden;

    cursor: grab;

    user-select: none; /* يمنع تحديد النص */

    -webkit-user-drag: none; /* يمنع سحب الصور الافتراضي */

    touch-action: pan-y; /* يسمح بالسكول العمودي ويمنع الأفقي للموبايل */

}

.carousel-viewport:active {

    cursor: grabbing;

}



/* تأكد إن الكروت مفيش حاجة بتعطل سحبها */

.product-status-card {

    pointer-events: auto;

    user-select: none;

}

.carousel-track {

    display: flex;

    gap: 15px;

    transition: transform 0.5s ease-in-out;

    will-change: transform;

    /* مهم جداً يبدأ من اليمين */

    transform: translateX(0); 

}



/* الكروت داخل السلايدر */

.product-status-card {

    min-width: calc(33.33% - 10px); /* يعرض 3 كروت في الصف */

    background: rgba(0, 0, 0, 0.2);

    border: 1px solid var(--glass-border);

    padding: 15px;

    border-radius: 15px;

    box-sizing: border-box;

}



/* للموبايل: عرض كارت واحد */

@media (max-width: 768px) {

    .product-status-card { min-width: 100%; }

}







.unavailable-products-container {

padding: 20px;

    background: rgb(232 231 231);

    border: 1px solid rgb(148 143 143 / 10%);

    border-radius: 20px;

    backdrop-filter: blur(10px);

    margin-top: 0px;

}



.stats-header h3 {

    color: var(--text);

    font-size: 1.2rem;

   

    display: flex;

    align-items: center;

    gap: 10px;

    color: #4b4c4d;

}



.stats-header i {

    color: #ff4b2b; /* لون تنبيهي */

}



/* شبكة المنتجات */

.unavailable-grid {

    display: grid;

    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));

    gap: 15px;

}

.unavailable-grid2 {

    display: grid;

    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));

    gap: 15px;

}



/* كرت المنتج الواحد */

.product-status-card {

    background: rgba(0, 0, 0, 0.2);

    border: 1px solid var(--glass-border);

    padding: 15px;

    border-radius: 15px;

    transition: transform 0.3s ease;

}



.product-status-card:hover {

    transform: translateY(-5px);

    border-color: var(--primary);

}



/* هيدر الكرت */

.product-info-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 12px;

}



.product-name {

    font-weight: bold;

    color: var(--text);

    font-size: 0.95rem;

}



/* علامات الحالة */

.status-label {

    font-size: 0.75rem;

    padding: 4px 10px;

    border-radius: 8px;

}

.status-label.available {

    background: rgba(114, 211, 170, 0.822);

    color: #000000;

    border: 1px solid #47d33b;

}

.status-label.out-of-stock {

    background: rgba(231, 76, 60, 0.2);

    color: #000000;

    border: 1px solid #e74c3c;

}



.status-label.limited {

    background: rgba(241, 196, 15, 0.2);

    color: #3a3935;

    border: 1px solid #f1c40f;

}



/* الفروع المتأثرة */

.affected-branches {

    display: flex;

    align-items: center;

    gap: 8px;

    font-size: 0.85rem;

    color: rgba(255, 255, 255, 0.6);

}



.affected-branches i {

    font-size: 0.9rem;

    color: var(--primary);

}

.menu-search-container {

    margin-bottom: 20px;

}



.search-wrapper {

    position: relative;

    background: #fff;

        border: 1px solid rgb(232 231 231);

    border-radius: 15px;

    display: flex;

    align-items: center;

    padding: 5px 15px;

    backdrop-filter: blur(10px);

    color:#333;

}



.search-icon {

    color: var(--primary);

    margin-left: 10px;

}



#menuSearchInput {

    background: none;

    border: none;

    color:#333;

    padding: 10px;

    width: 100%;

    font-size: 1rem;

    outline: none;

}



#menuSearchInput::placeholder {

    color: rgba(255, 255, 255, 0.5);

}

#closeSearchInput {

    background: none;

    border: none;

    color:#333;

    padding: 10px;

    width: 100%;

    font-size: 1rem;

    outline: none;

}



#closeSearchInput::placeholder {

    color: rgba(255, 255, 255, 0.5);

}

/* تأثير عند التركيز على البحث */

.search-wrapper:focus-within {

    border-color: var(--primary);

    box-shadow: 0 0 10px rgba(255, 65, 108, 0.3);

}



:root {

    --ticker-bg: rgba(255, 255, 255, 0.05);

    --ticker-border: rgba(255, 255, 255, 0.1);

}



.modern-ticker-container {
    display: flex;
    align-items: center;
    background: #f8fafc; /* خلفية ناعمة جداً ومطابقة لكبسولات النظام العلوية */
    border: 1px solid #edf2f7; /* حدود رمادية خفيفة تمنع التشتت */
    border-radius: 30px; /* زوايا دائرية كاملة (كبسولة) متناسقة مع كبسولة حالة الاتصال */
    overflow: hidden;
    margin: 15px 20px; /* تقليص الهوامش لتوفير مساحة رأسية مريحة */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03); /* ظلال ناعمة غير مزعجة للعين */
    position: relative;
    height: 44px; /* ارتفاع متناسق وأنيق */
    direction: rtl;
}

/* 🏷️ صندوق التسمية (تنبيهات فورية) */
.ticker-label-box {
    background: linear-gradient(135deg, #f36f21, #ff8c42); /* تدرج برتقالي حيوي لبراند بون أبيتيه */
    color: white;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    z-index: 10;
    box-shadow: -4px 0 15px rgba(243, 111, 33, 0.2);
    border-radius: 0 30px 30px 0; /* دائرية متوافقة مع قفل الكبسولة من اليمين */
    flex-shrink: 0;
    height: 100%;
}

.ticker-label-box i {
    font-size: 0.95rem;
    animation: flash 1s infinite alternate;
}

/* 🎛️ صندوق أزرار التحكم (التحكم اليدوي) */
.ticker-manual-controls {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 18px;
    background: #f8fafc; /* نفس خلفية الشريط تماماً لانصهار تام */
    height: 100%;
    align-self: stretch;
    z-index: 9;
    /* التدرج اللوني المخفي للنص قادم من اليسار إلى اليمين بطريقة احترافية */
    box-shadow: -15px 0 20px #f8fafc; 
    border-radius: 30px 0 0 30px; /* دائرية متوافقة مع قفل الكبسولة من اليسار */
    flex-shrink: 0;
}

/* 🎯 تنسيق أزرار التحكم الصغيرة */
.ticker-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    padding: 4px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease-in-out;
    color: #94a3b8; /* رمادي هادئ وأنيق في الحالة الافتراضية */
}

.ticker-btn:hover {
    transform: scale(1.25);
}

/* الألوان الذكية للأزرار عند الهوفر أو التفعيل */
.ticker-btn.text-danger:hover { color: #ef4444 !important; }   /* أحمر براند ناصع */
.ticker-btn.text-success:hover { color: #10b981 !important; }  /* أخضر متصل */
.ticker-btn.text-info:hover { color: #3b82f6 !important; }     /* أزرق معلوماتي */
.ticker-btn.text-muted:hover { color: #64748b !important; }

/* 📺 نافذة العرض لمنع التداخل */
.ticker-content-window {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    z-index: 1;
    position: relative;
    height: 100%;
    /* قناع حجب شفاف ناعم جهة اليسار ليختفي النص تدريجياً قبل لمس الأزرار */
    -webkit-mask-image: linear-gradient(to left, transparent 0%, #000 30px);
    mask-image: linear-gradient(to left, transparent 0%, #000 30px);
}

/* 🔄 شريط الحركة والنصوص */
.ticker-scroller {
    display: flex;
    white-space: nowrap;
    animation: tickerLoop 2500s linear infinite;
    color: #334155; /* لون نص داكن مريح جداً للقراءة فوق الخلفية الفاتحة */
    font-weight: 600;
}

.ticker-scroller:hover {
    animation-play-state: paused;
    cursor: default;
}

.ticker-msg {
    padding: 0 35px;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* التنسيق الداخلي لبادجات الفروع أو الحالات داخل التيكر نفسه */
.ticker-msg strong, .ticker-msg span {
    font-weight: 700;
}

/* 🔄 أنيميشن الحركة اللانهائية */
@keyframes tickerLoop {
    0% { transform: translateX(0); }
    100% { transform: translateX(100%); }
}

/* ⚡ أنيميشن نبض أيقونة التنبيه */
@keyframes flash {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0.4; transform: scale(1.08); }
}


.btn-update-branch-status {

    border: none;

    background: #ffffff; /* لون رمادي فاتح للأزرار غير النشطة */

    padding: 8px 14px;

    border-radius: 6px;

    cursor: pointer;

    transition: all 0.3s ease;

    color: #555555; /* لون أيقونة باهت */

border:1px solid #eee;   

    display: inline-flex;

    align-items: center;

    justify-content: center;

}



/* تأثير عند المرور بالماوس */

.btn-update-branch-status:hover:not(:disabled) {

    transform: translateY(-2px);

}





.btn-update-branch-status.active { 

    background: #28a745 !important; 

    color: #fff !important; 

}



/* حالة المنتج: كمية محدودة (Limited) - عندما يكون نشطاً */

.btn-update-branch-status.limited.active { 

    background: #ffc107 !important; 

    color: #212529 !important; 

}



/* حالة المنتج: غير متاح (Out) - عندما يكون نشطاً */

.btn-update-branch-status.out.active { 

    background: #dc3545 !important; 

    color: #fff !important; 

}



/* تأثير أثناء المعالجة (Spinner) وتعطيل الزر */

.btn-update-branch-status:disabled {

    cursor: not-allowed;

    opacity: 0.6;

}

.branch-main-status-wrapper {

    display: flex;

    align-items: center;

    gap: 15px;

    background: rgba(0,0,0,0.03);

    padding: 5px 15px;

    border-radius: 50px;

}



.status-label-text {

    font-weight: bold;

    font-size: 0.9rem;

    color: #d3692d;

}



/* توحيد استايل أزرار حالة الفرع مع أزرار الجدول */

.btn-branch-toggle {

    border: none;

    background: #e0e0e0;

    padding: 6px 15px;

    border-radius: 20px; /* جعلها دائرية لتختلف قليلاً عن أزرار المنتجات */

    cursor: pointer;

    font-size: 0.85rem;

    font-weight: 600;

    transition: all 0.3s ease;

    color: #333;

    margin: 0 2px;

        font-family: 'Tajawal', sans-serif;



}



/* الألوان عند التفعيل (نفس روح ألوان الجدول) */

.btn-branch-toggle.available.active { background: #28a745 !important; color: #fff !important; }

.btn-branch-toggle.limited.active { background: #ffc107 !important; color: #212529 !important;  }

.btn-branch-toggle.out.active { background: #dc3545 !important; color: #fff !important;  }



.btn-branch-toggle:hover:not(.active) {

    background: #ffc107;

    color:#000;

    transform: translateY(-1px);

}







/* تنسيق البطاقة الخاصة بكل قسم */

.section-check-card {

    position: relative;

    cursor: pointer;

    background: rgb(255, 254, 254);

    border: 1px solid rgba(255, 255, 255, 0.1);

    border-radius: 8px;

    padding: 10px 15px;

    transition: all 0.3s ease;

    user-select: none;

    display: block;

}



/* إخفاء الـ Checkbox الأصلي */

.section-check-card input {

    position: absolute;

    opacity: 0;

    cursor: pointer;

}



/* محتوى البطاقة */

.check-content {

    display: flex;

    align-items: center;

    gap: 10px;

    color: #333;

    font-size: 15px;

    font-weight: bold;

}



.check-icon { display: none; color: #d3692d; }

.uncheck-icon { color: #666; }



/* تأثير عند تمرير الماوس */

.section-check-card:hover {

    background: rgba(211, 105, 45, 0.1);

    border-color: rgba(211, 105, 45, 0.4);

}



/* تأثير عند الاختيار */

.section-check-card input:checked + .check-content {

    color: #333;

}



.section-check-card input:checked + .check-content .check-icon {

    display: inline-block;

}



.section-check-card input:checked + .check-content .uncheck-icon {

    display: none;

}



.section-check-card input:checked {

    background: rgba(211, 105, 45, 0.2); /* لا تعمل على input لكن للتوضيح */

}



/* تلوين الحدود عند الاختيار */

.section-check-card:has(input:checked) {

    border-color: #d3692d;

    background: rgba(211, 105, 45, 0.15);

    box-shadow: 0 0 10px rgba(211, 105, 45, 0.1);

}

.user-role

{



    font-size: 13px;

    background: rgba(211, 105, 45, 0.15);

    padding: 2px 8px;

    border-radius: 10px;

    color: #d3692d;

    border: 1px solid rgba(211, 105, 45, 0.3);

    white-space: nowrap;

    padding: 9px;





}

/* حاوية المنشن الرئيسية */

.tribute-container {

    position: absolute;

    top: 0;

    left: 0;

    height: auto;

    max-height: 250px;

    max-width: 450px;

    overflow-y: auto;

    background: #1e1e1e!important;

    border: 1px solid #393030!important;

    border-radius: 10px;

    box-shadow: 0 10px 30px rgba(0,0,0,0.5);

    z-index: 999999 !important;

    padding:5px!important;

}



.tribute-container ul {

    margin-top: 0px !important;

    margin: 0!important;

    list-style: none;

}



.tribute-container li {

    cursor: pointer;

    color: #e0e0e0!important;

    background: #120b0b !important;

    border-bottom: 1px solid #333!important;

    display: flex;

    justify-content: space-between;

    align-items: center;

    transition: all 0.2s ease;

    padding: 10px !important;

    font-size: 14px !important;

}

.role {

    

    color: #f18810!important;

    

}

/* حالة الوقوف على الاسم */

.tribute-container li.highlight, 

.tribute-container li:hover {

  background: #393030 !important;

    color: #ffffff !important;

}



/* تنسيق اسم المجموعة (Role) */

.tribute-container li .user-role {

font-size: 15px !important;

background: rgb(255 255 255 / 0%)!important;

    border-radius: 10px;

    color: #d3692d!important;

    border: 1px solid rgb(57 48 48 / 0%)!important;

    white-space: nowrap;

    padding: 9px !important;

}



.tribute-container li.highlight .user-role {

    color: #fff;

    background: rgba(0, 0, 0, 0.2);

}

.image-modal {

    display: none; 

    position: fixed; 

    z-index: 9999; 

    padding-top: 50px; 

    left: 0; top: 0;

    width: 100%; height: 100%; 

    background-color: rgba(0,0,0,0.9);

}

.modal-content {

    margin: auto;

    display: block;

    max-width: 80%;

    max-height: 80%;

    border: 2px solid #d3692d;

    border-radius: 8px;

}

.close-modal {

    top: 20px; 

    color: #eceed6;

    font-size: 40px;

    font-weight: bold;

    cursor: pointer;

}

.custom2-alert {

    background-color: #fff5f5;

    width: 100% !important;

    align-items: center;

    margin: 10px 0;

    border-radius: 8px;

}



.custom2-alert.error {

background-color: #fff;

  color: #000000;

  font-weight: bold;

  margin: auto;

  width: auto;

  text-align: center;

}



.custom2-alert i {

    margin-left: 15px; /* Spacing for RTL */

    font-size: 1.2rem;

}

.c1 {

    display: flex;

    flex-direction: column;

    justify-content: space-between;

    padding: 12px;

}



.stat-main-info {

    margin-bottom: 8px;

    font-size:20px;

}

.stat-sub-details {

    display: flex;

    justify-content: space-between;

    gap: 4px;

    font-size: 13px;

    font-weight: bold;

    border-top: 1px solid rgba(0, 0, 0, 0.15);

    padding-top: 6px;

    width: 100%;

        color: #000000;



}

.sub-stat {

    opacity: 0.9;

}

.sub-stat b {

    font-weight: 900;

}

/* ألوان اختيارية خفيفة للتفريق بين الحالات */



.t-open b { color: #000000; }       /* أصفر للمفتوح */

.t-progress b { color: #000000; }   /* أخضر فاتح لقيد التقدم */

.t-resolved b { color: #000000; }   /* رمادي للمغلق */







.branch-btn {

    direction: rtl;

    display: flex;

    justify-content: space-between;

    align-items: center;

    padding: 12px 15px;

    margin-bottom: 8px;

    border-radius: 6px;

    cursor: pointer;

    transition: all 0.2s ease-in-out;

    border-right: 4px solid transparent;

    background: #2d3238; /* لون افتراضي غامق متناسق مع الداشبورد */

    color: #3d3c3c;

}



.branch-btn:hover {

    filter: brightness(1.2);

    color:#333;

}



/* 🟢 كلاس الفرع المتصل / المفتوح */

.branch-btn.b-status-open {

    border-right-color: #2ecc71;

    background: rgba(46, 204, 112, 0.596);

}

.branch-btn.b-status-open .connection-status { color: #333; }



/* 🟡 كلاس الفرع المشغول */

.branch-btn.b-status-busy {

    border-right-color: #f1c40f;

    background: rgba(241, 196, 15, 0.527);

}

.branch-btn.b-status-busy .connection-status { color: #333; }



/* 🔴 كلاس الفرع المغلق */

.branch-btn.b-status-closed {

    border-right-color: #e74c3c;

    background: #eee;

}

.branch-btn.b-status-closed .connection-status { color: #333; }





/* 🔵 كلاس الفرع النشط حالياً (الذي يتصفحه المستخدم الآن) */

.branch-btn.active-branch {

    background: #555555 !important; /* لون أزرق مميز للنظام */

    border-right-color: #fff !important;

    color: #fff !important;

    pointer-events: none; /* يمنع الضغط عليه مرة أخرى طالما مفتوح */

}

.branch-btn.active-branch .connection-status {

    color: #333 !important;

}



.btn-main-content i {

    margin-left: 8px;

}

.custom-actions-wrapper {

    display: flex;

    gap: 12px;

}



.custom-actions-wrapper .stat-card {



    flex-direction: column;

    justify-content: space-between;

    align-items: center;

    padding: 15px 20px;

    border-radius: 12px;

    color: #fff;

    text-decoration: none;

    transition: all 0.3s ease;

    border: 1px solid rgba(255, 255, 255, 0.1);

    cursor: pointer;

}



.custom-actions-wrapper .stat-card i {

    font-size: 24px;

    margin-left: 15px;

    opacity: 0.9;

}



.custom-actions-wrapper .stat-card-text h3 { 

    margin: 0; 

    font-size: 15px; 

    font-weight: 600;

}



.custom-actions-wrapper .stat-card-text p { 

    margin: 2px 0 0 0; 

    opacity: 0.8; 

    font-size: 11px;

}



/* الألوان داخل النطاق */

.custom-actions-wrapper .c-report {

    background: linear-gradient(135deg, #10b981 0%, #059669 100%);

}



.custom-actions-wrapper .c-chat {

    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);

}



/* هوفر داخل النطاق */

.custom-actions-wrapper .stat-card:hover {

    transform: translateY(-3px);

    box-shadow: 0 5px 15px rgba(0,0,0,0.2);

}







.logs-container { margin-bottom: 25px;  direction: rtl; }

.logs-card {  border-radius: 10px; padding: 20px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); margin-bottom: 20px; }





/* المودال والنافذة المنبثقة */

.logs-modal-overlay {

    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;

    background: rgba(0,0,0,0.6); backdrop-filter: blur(5px);

    z-index: 9999; justify-content: center; align-items: center;

}

.logs-modal-box {

    background: #fff; width: 600px; padding: 25px; border-radius: 15px;

    box-shadow: 0 10px 25px rgba(0,0,0,0.2); color: #333;

    max-height: 90vh; overflow-y: auto; animation: logsFadeIn 0.3s ease;

}

@keyframes logsFadeIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }



.logs-close-btn {

    width: 100%; padding: 14px; margin-top: 20px; border: none; border-radius: 10px;

    background: linear-gradient(135deg, #ff416c, #ff4b2b); color: white;

    font-weight: bold; cursor: pointer; transition: 0.3s;

}

.logs-close-btn:hover { box-shadow: 0 5px 15px rgba(255, 75, 43, 0.5); }



.import-export-card {

    background: #ffffff;

    border-radius: 12px;

    box-shadow: 0 4px 15px rgba(0,0,0,0.05);

    border: 1px solid #eef2f7;

    margin-bottom: 20px;

}



/* تنسيق الأيقونات داخل الأزرار */

.btn i {

    margin-left: 8px; /* مسافة بين الأيقونة والنص */

    transition: transform 0.3s ease;

}



/* تأثير عند المرور بالفأرة (Hover Effect) */

.btn-success:hover i {

    transform: translateY(-2px); /* الأيقونة ترتفع قليلاً */

}



.btn-outline-primary:hover i {

    transform: scale(1.1); /* الأيقونة تكبر قليلاً */

}



/* تنسيق حقل الملف ليظهر بشكل عصري */

.custom-file-input {

    border: 2px dashed #cbd5e0;

    padding: 10px;

    border-radius: 8px;

    transition: border-color 0.3s;

}



.custom-file-input:hover {

    border-color: #4a90e2;

}

.actions-container {

    display: flex;

    gap: 20px;

    padding: 20px;

}



/* البطاقات المتساوية */

.action-card {

flex: 1;

  padding: 25px;

  border-radius: 16px;

  border: 1px solid #e8e7e7;

  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);

  display: flex;

  flex-direction: column;

  align-items: center;

  text-align: center;

  transition: transform 0.2s;

  background: #fff;

}

.action-card:hover { transform: translateY(-5px); }



/* الأيقونات */

.icon-box {

    font-size: 2.5rem;

    margin-bottom: 15px;

}




.custom-input {
        width: 100% !important; /* نغيرها لـ 100% لتأخذ عرض الحاوية */
        background: rgba(0, 0, 0, 0.05); /* جعل الخلفية أفتح قليلاً للوضوح */
        border: 1px solid rgba(0,0,0,0.1);
        border-radius: 12px;
        color: rgb(41, 40, 40);
        font-family: 'Tajawal', sans-serif;
        font-size: 1rem;
        outline: none;
        transition: 0.3s;
        box-sizing: border-box;
        padding: 12px 15px;
        display: block; /* بدلاً من inherit لضمان التنسيق */
    }
/* التنسيق العام للـ select */

.custom-input:focus {
        background: rgba(0, 0, 0, 0.1);
        border-color: #d3692d;
    }


 :root {

            --primary: #ff416c;

            --secondary: #ff4b2b;

            --glass: rgba(255, 255, 255, 0.05);

            --glass-border: rgba(255, 255, 255, 0.1);

            --bg-dark: #0f0f0f;

        }







        /* خلفية متحركة لإضفاء طابع مميز */

      .background-blobs {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1; /* طبقة خلفية منخفضة */
    background: #0f172a;
    overflow: hidden;
    pointer-events: none; /* تمنع التداخل مع ضغطات الماوس بالحقول */
}

/* الأشكال الهلامية الداخلية */
.background-blobs::before {
    content: '';
    position: absolute;
    width: 450px;
    height: 450px;
    top: -10%;
    left: -10%;
    background: radial-gradient(circle, rgba(243, 111, 33, 0.15) 0%, transparent 70%);
    border-radius: 43% 57% 41% 59% / 57% 45% 55% 43%;
    animation: blobTransform 12s infinite alternate ease-in-out;
}

.background-blobs::after {
    content: '';
    position: absolute;
    width: 550px;
    height: 550px;
    bottom: -10%;
    right: -5%;
    background: radial-gradient(circle, rgba(51, 65, 85, 0.35) 0%, transparent 70%);
    border-radius: 50% 40% 60% 40% / 40% 50% 30% 60%;
    animation: blobTransform 16s infinite alternate-reverse ease-in-out;
}

/* 🔄 أنيميشن حركة الخلفية */
@keyframes blobTransform {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); }
    50% { transform: translate(60px, 40px) rotate(90deg) scale(1.05); }
    100% { transform: translate(-30px, 20px) rotate(180deg) scale(0.95); }
}

/* ========================================================
   📦 الحاوية والكارت (رفع الطبقة لحل مشكلة الاختفاء)
   ======================================================== */
.login-container {
    position: relative;
    z-index: 999; /* 🌟 رفع الطبقة لأعلى قيمة ليظهر الكارت فوق الخلفية مجدداً */
    width: 100%;
    max-width: 420px;
    padding: 20px;
    box-sizing: border-box;
}

/* كارت الجلاس مورفيزم الفخم */
.login-card {
    position: relative;
    z-index: 1000; /* تأكيد الطبقة العليا للكارت محتوياً على حقول الإدخال */
    background: rgba(30, 41, 59, 0.5); /* زيادة عتامة الزجاج قليلاً للوضوح */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
    animation: fadeInScale 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 🖼️ شعار النظام والـ Glow الملحق به */
.logo-container {
    position: relative;
    width: 90px;
    height: 90px;
    margin: 0 auto 15px auto;
}

.logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 16px;
    filter: drop-shadow(0 8px 16px rgba(243, 111, 33, 0.25));
    position: relative;
    z-index: 5; /* اللوجو فوق حلقة الضياء الخاصة به */
    animation: logoFloat 4s infinite ease-in-out;
}

.logo-glow-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: rgba(243, 111, 33, 0.25);
    border-radius: 50%;
    filter: blur(15px);
    z-index: 1;
    animation: logoPulseGlow 3s infinite ease-in-out;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes logoPulseGlow {
    0%, 100% { transform: translate(-50%, -50%) scale(0.85); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.8; }
}

/* ✍️ الحقول التفاعلية */
.input-group {
    position: relative;
    margin-bottom: 22px;
    text-align: right;
}

.input-group input {
    width: 100%;
    padding: 14px 48px 14px 16px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #ffffff;
    font-family: 'Tajawal', sans-serif !important;
    font-size: 0.95rem;
    font-weight: 500;
    outline: none;
    transition: all 0.25s ease;
    box-sizing: border-box;
}

.input-group i {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 1.05rem;
    transition: all 0.25s ease;
    pointer-events: none;
}

.input-group input:focus {
    border-color: #f36f21;
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 3px rgba(243, 111, 33, 0.15);
}

.input-group input:focus + i {
    color: #f36f21;
}

/* 🎯 زر الدخول */
.login-btn {
    width: 100%;
    padding: 14px;
    background: #f36f21;
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-family: 'Tajawal', sans-serif !important;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(243, 111, 33, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-btn:hover {
    background: #e05e1a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(243, 111, 33, 0.35);
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@media (max-width: 480px) {
    .login-card { padding: 35px 22px; border-radius: 20px; }
    .login-container { max-width: 95%; }
}
       
 .switch-toggle {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
  
}
.switch-toggle input { 
  opacity: 0;
  width: 0;
  height: 0;
}
.slider-round {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: .3s;
  border-radius: 24px;
}
.slider-round:before {
  position: absolute;
  content: "";
  height: 16px; width: 16px;
  left: 4px; bottom: 4px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}
input:checked + .slider-round {
  background-color: #28a745; /* اللون الأخضر عند التفعيل */
}
input:checked + .slider-round:before {
  transform: translateX(26px);
}
/* ========================================================
   📜 1. حاوية السكرول الذكية (التمرير للأعلى والأسفل)
   ======================================================== */
.online-users-scroll-wrapper {
    max-height: 490px; /* الارتفاع الأقصى للشبكة قبل تفعيل السكرول (يستوعب حوالي صفين كاملين) */
    overflow-y: auto;  /* تفعيل التمرير الرأسي تلقائياً عند زيادة عدد الكروت */
    padding: 8px 4px;  /* مسافة أمان لمنع قص الظلال عند حركة الكروت */
    direction: rtl;    /* الحفاظ على اتجاه تمرير النظام الفاخر */
}

/* ✨ تخصيص وتنعيم شكل شريط السكرول ليكون رفيعاً ومتناسقاً */
.online-users-scroll-wrapper::-webkit-scrollbar {
    width: 6px; /* عرض شريط السكرول ناعم جداً ولا يشغل مساحة */
}

.online-users-scroll-wrapper::-webkit-scrollbar-track {
    background: #f8fafc; /* خلفية مجرى السكرول الناعمة */
    border-radius: 20px;
}

.online-users-scroll-wrapper::-webkit-scrollbar-thumb {
    background: #cbd5e1; /* لون مقبض التمرير المنسجم مع الواجهة */
    border-radius: 20px;
}

.online-users-scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background: #94a3b8; /* تغميق خفيف للمقبض عند تفاعل الماوس */
}

/* ========================================================
   🌐 2. شبكة الكروت والكروت المتجاوبة
   ======================================================== */
.online-users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    width: 100%;
}

.online-user-card {
    background: #ffffff;
    border: 1px solid #edf2f7; /* حدود ناعمة وخفيفة متناسقة مع الهوية الجديدة */
    border-radius: 12px;
    padding: 16px;
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.online-user-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.04);
}

.card-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

/* 🏷️ تاجات الرتب المحدثة بنظام الكبسولات السحابية الفاخرة */
.user-role-tag {
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 20px; /* تحويلها لكبسولة دائرية ناعمة */
    font-weight: 700;
    display: inline-block;
    margin-top: 5px;
    width: fit-content;
}
.role-admin { background: #fff1f2; color: #e11d48; border: 1px solid #ffe4e6; }
.role-leader { background: #fff7ed; color: #ea580c; border: 1px solid #ffedd5; }
.role-default { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }

/* 📍 صندوق الفروع */
.card-branches-box {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.8rem;
    color: #475569;
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.4;
}

.card-branches-box i { 
    color: #f36f21; /* توحيد الأيقونة بلون البراند الرئيسي */
    margin-top: 3px; 
}

.branches-text-limited {
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical;  
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

/* 📊 فوتر الكارت وبادج الحالة */
.card-footer-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px dashed #edf2f7;
    padding-top: 10px;
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

.glow-online-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981; /* أخضر ناصع متناسق */
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px #10b981;
    animation: glowPulse 1.8s infinite ease-in-out;
}

@keyframes glowPulse {
    0% { transform: scale(0.9); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.6; box-shadow: 0 0 12px #10b981; }
    100% { transform: scale(0.9); opacity: 1; }
}

.status-mini-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(16, 185, 129, 0.08);
    padding: 3px 10px;
    border-radius: 12px;
    color: #059669;
    font-weight: 700;
}

/* ❌ تم حذف كود .ticker-pagination بالكامل لعدم الحاجة إليه بعد الآن */






.msg-card { font-family: 'Tajawal', sans-serif;
    background: #eee;
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 20px;
    border-right: 6px solid #d3692d; /* لون البرتقالي الخاص بك */
       transition: transform 0.2s;
}

.msg-card:hover {
    background: #eee;
      border-right: 6px solid green; /* لون البرتقالي الخاص بك */
}

/* ترويسة الرسالة */
.msg-header {
    display: flex;
    margin-bottom: 15px;
}

.user-name {
    display: flex;
    align-items: center;
    gap: 8px;
    
    
    
    
    background-color: #fff; /* لون أزرق هادئ للصلاحية */
    color: #333;
    padding: 4px 10px;   
    font-size: 16px !important;
    border-radius: 12px;
    font-size: 10px;
    font-weight: bold;
    
    
    
    
    
    
}
.user-name i {
    font-weight: 700;
    color: red;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
}
/* تنسيق الفرع (شكل "Badge" صغير وأنيق) */
.msg-meta {
font-size: 16px;
    color: #d3692d;
    background: #fff5ef;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
        margin-right: 10px;    display: flex;
    align-items: center;
}

/* نص الرسالة */
.msg-body p {
    font-size: 1rem;
    color: #555;
    line-height: 1.5;
    margin: 0;
}

/* تنسيق الرسالة المثبتة */
.pinned {
    background: #fffdf5;
    border-right-color: #f39c12;
}
    /* تنسيق النص */
    .msg-card strong { color: #333; font-size: 1.1em; }
    .msg-card small { color: #777; margin-right: 10px; }
    
    /* تنسيق الأزرار */
    .ticker-controls {font-family: 'Tajawal', sans-serif;
    margin-top: 10px; text-align:left; gap: 10px; 
        
    }
    .ticker-controls button {
        background: #f4f4f4;
        border: 1px solid #ddd;
        padding: 6px 15px;
        border-radius: 5px;
        cursor: pointer;
        transition: 0.3s;
    }
    
    .btn.btn-secondary {
        background: #333;
         color: #fff;
        border: 1px solid #333;
        padding: 6px 15px;
        border-radius: 5px;
        cursor: pointer;
        transition: 0.3s;
    }
    .badge-role {
background-color: #3498db7d;
    color: #1b6287;
    padding: 4px 10px;   
    font-size: 16px !important;
    border-radius: 12px;
    font-size: 10px;
    margin-right: 5px;
    font-weight: bold;
    text-transform: uppercase;
}
    
    .ticker-controls button:hover { background: #d3692d; color: #fff; }

    /* تأثير الحركة */
    .animated-fade { animation: slideDown 0.2s ease-out; }
    @keyframes slideDown {
        from { transform: translateY(-15px); opacity: 0; }
        to { transform: translateY(0); opacity: 1; }
    }
    .ticker-controls button, 
#addMsgToggleBtn,
#prevBtn,
#toggleBtn,
#nextBtn {
    padding: 6px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
    border: none; /* إزالة الحدود الافتراضية المزعجة */
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* 1. زر إضافة رسالة جديدة (البرتقالي الدافئ) */
#addMsgToggleBtn {
    background-color: #e67e22;
    color: #fff;
}
#addMsgToggleBtn:hover {
    background-color: #d35400;
}

/* 2. زر السابق (الأزرق الهادئ) */
#prevBtn {
    background-color: #3498db;
    color: #fff;
}
#prevBtn:hover {
    background-color: #2980b9;
}

/* 3. زر إيقاف / تشغيل التلقائي (الأحمر الناري للتحذير والإيقاف) */
#toggleBtn {
    background-color: #e74c3c;
    color: #fff;
}
#toggleBtn:hover {
    background-color: #c0392b;
}

/* 4. زر التالي (الأخضر المريح للمتابعة) */
#nextBtn {
    background-color: #2ecc71;
    color: #fff;
}
#nextBtn:hover {
    background-color: #27ae60;
}
        /* =========================================================================
   9. كروت الأكشن والمؤثرات الزجاجية الإضافية (Glassmorphism Cards)
   ========================================================================= */
.custom-pos-action-card {
    position: relative; display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px; background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.04); text-decoration: none !important;
    overflow: hidden; transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); direction: rtl;
}

.pos-card-glass-glow {
    position: absolute; top: -50%; right: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(213, 105, 45, 0.08) 0%, transparent 60%);
    opacity: 0; transition: opacity 0.4s ease; pointer-events: none; z-index: 1;
}

.custom-pos-action-card .action-card-content { display: flex; align-items: center; gap: 16px; z-index: 2; }

.custom-pos-action-card .action-icon-wrapper {
    display: flex; align-items: center; justify-content: center; width: 54px; height: 54px;
   background: linear-gradient(135deg, #d32d2d 0%, #f38141 100%) !important;
   
   border-radius: 12px;
    color: #fff; font-size: 1.4rem; box-shadow: 0 6px 16px rgba(213, 105, 45, 0.25); transition: transform 0.3s ease;
}

.custom-pos-action-card .action-text h3 { margin: 0 0 4px 0; font-size: 1.15rem; font-weight: 700; color: #2c3e50; transition: color 0.3s ease; }
.custom-pos-action-card .action-text p { margin: 0; font-size: 0.85rem; color: #7f8c8d; }
.custom-pos-action-card .card-arrow-indicator { font-size: 0.95rem; color: #bdc3c7; z-index: 2; transition: all 0.3s ease; }

.custom-pos-action-card:hover { transform: translateY(-4px); background: rgba(255, 255, 255, 0.95); border-color: rgba(213, 105, 45, 0.3); box-shadow: 0 12px 24px rgba(213, 105, 45, 0.08); }
.custom-pos-action-card:hover .pos-card-glass-glow { opacity: 1; }
.custom-pos-action-card:hover .action-icon-wrapper { transform: scale(1.05) rotate(-5deg); }
.custom-pos-action-card:hover .action-text h3 { color: #d3692d; }
.custom-pos-action-card:hover .card-arrow-indicator { color: #d3692d; transform: translateX(-4px); }

@keyframes pulse-soft {
    0% { box-shadow: 0 6px 16px rgba(213, 105, 45, 0.25); }
    50% { box-shadow: 0 6px 24px rgba(213, 105, 45, 0.4); }
    100% { box-shadow: 0 6px 16px rgba(213, 105, 45, 0.25); }
}
.animate-pulse { animation: pulse-soft 2s infinite ease-in-out; }

.pos-no-data { text-align: center; padding: 40px; color: #777; grid-column: 1 / -1; }