/* إصلاح مشكلة التمرير بشكل متوافق مع جميع الصفحات */
html, body {
    overflow-x: auto;
    overflow-y: auto;
    height: 100%;
    scroll-behavior: smooth;
}

.content {
    overflow-y: auto;
    height: auto;
    min-height: calc(100vh - 70px);
    max-height: none;
    position: relative;
}

.sidebar {
    overflow-y: auto;
    height: calc(100vh - 70px);
    max-height: calc(100vh - 70px);
    position: fixed;
}

.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.form-container {
    overflow: visible;
    height: auto;
}

.table-container {
    overflow-x: auto;
    overflow-y: visible;
    max-height: none;
}

.dropdown-menu,
.profile-dropdown-menu {
    max-height: 300px;
    overflow-y: auto;
}

@media (max-width: 768px) {
    .content {
        margin-right: 0;
        margin-top: 60px;
        padding: 15px;
        overflow-y: auto;
    }
    .sidebar {
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }
    .sidebar.open {
        transform: translateX(0);
    }
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
* {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}
body {
    position: relative;
    min-height: 100vh;
}

/* إصلاح التمرير في العناصر المطلقة */
.absolute {
    position: absolute !important;
}

.fixed {
    position: fixed !important;
}

.relative {
    position: relative !important;
}

/* إصلاح التمرير في العناصر المخفية */
.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* إصلاح التمرير في العناصر المحددة */
.selected {
    background-color: var(--primary) !important;
    color: white !important;
}

/* إصلاح التمرير في العناصر المعطلة */
.disabled {
    opacity: 0.6 !important;
    pointer-events: none !important;
}

/* إصلاح التمرير في العناصر النشطة */
.active {
    background-color: var(--primary) !important;
    color: white !important;
}

/* إصلاح التمرير في العناصر المحددة */
.focus {
    outline: 2px solid var(--primary) !important;
    outline-offset: 2px !important;
}

/* إصلاح التمرير في العناصر المطلوبة */
.required {
    border-color: var(--danger) !important;
}

/* إصلاح التمرير في العناصر الصحيحة */
.valid {
    border-color: var(--success) !important;
}

/* إصلاح التمرير في العناصر الخاطئة */
.invalid {
    border-color: var(--danger) !important;
}

/* إصلاح التمرير في العناصر المحملة */
.loading {
    opacity: 0.7 !important;
    pointer-events: none !important;
}

/* إصلاح التمرير في العناصر المكتملة */
.completed {
    background-color: var(--success) !important;
    color: white !important;
}

/* إصلاح التمرير في العناصر المعلقة */
.pending {
    background-color: var(--warning) !important;
    color: white !important;
}

/* إصلاح التمرير في العناصر المرفوضة */
.rejected {
    background-color: var(--danger) !important;
    color: white !important;
}

/* إصلاح التمرير في العناصر المقبولة */
.approved {
    background-color: var(--success) !important;
    color: white !important;
}

/* إصلاح التمرير في العناصر المحذوفة */
.deleted {
    opacity: 0.5 !important;
    text-decoration: line-through !important;
}

/* إصلاح التمرير في العناصر المحفوظة */
.saved {
    background-color: var(--info) !important;
    color: white !important;
}

/* إصلاح التمرير في العناصر المحدثة */
.updated {
    background-color: var(--warning) !important;
    color: white !important;
}

/* إصلاح التمرير في العناصر المضافة */
.added {
    background-color: var(--success) !important;
    color: white !important;
}

/* إصلاح التمرير في العناصر المحذوفة */
.removed {
    background-color: var(--danger) !important;
    color: white !important;
}

/* إصلاح التمرير في العناصر المحددة */
.checked {
    background-color: var(--primary) !important;
    color: white !important;
}

/* إصلاح التمرير في العناصر غير المحددة */
.unchecked {
    background-color: var(--text-muted) !important;
    color: white !important;
}

/* إصلاح التمرير في العناصر المفتوحة */
.open {
    display: block !important;
}

/* إصلاح التمرير في العناصر المغلقة */
.closed {
    display: none !important;
}

/* إصلاح التمرير في العناصر المطوية */
.collapsed {
    height: 0 !important;
    overflow: hidden !important;
}

/* إصلاح التمرير في العناصر الممدودة */
.expanded {
    height: auto !important;
    overflow: visible !important;
}

/* إصلاح التمرير في العناصر المحددة */
.selected {
    background-color: var(--primary) !important;
    color: white !important;
}

/* إصلاح التمرير في العناصر غير المحددة */
.unselected {
    background-color: transparent !important;
    color: var(--text) !important;
}

/* إصلاح التمرير في العناصر المطلوبة */
.required {
    border-color: var(--danger) !important;
}

/* إصلاح التمرير في العناصر الاختيارية */
.optional {
    border-color: var(--text-muted) !important;
}

/* إصلاح التمرير في العناصر المطلوبة */
.mandatory {
    border-color: var(--danger) !important;
}

/* إصلاح التمرير في العناصر الاختيارية */
.optional {
    border-color: var(--text-muted) !important;
}

/* إصلاح التمرير في العناصر المطلوبة */
.required {
    border-color: var(--danger) !important;
}

/* إصلاح التمرير في العناصر الاختيارية */
.optional {
    border-color: var(--text-muted) !important;
} 