/* ========== SIDEBAR - RESPONSIVE ========== */

/* ---- Sidebar Container ---- */
#sidebar {
    background: #ffffff;
    border-left: 1px solid #e5e7eb;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.02);
    width: 280px;
    max-width: 85vw;
}

/* ---- Sidebar Overlay ---- */
#sidebarOverlay {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 40;
}

/* ---- Logo ---- */
.sidebar-logo {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 16px;
    margin-bottom: 16px;
}

.sidebar-logo h1 {
    color: #1a2332;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.sidebar-logo p {
    color: #8a9aaa;
    font-size: 10px;
    line-height: 1.3;
}

/* ---- Sidebar Items ---- */
.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 8px;
    color: #4a5a6e;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.sidebar-item i {
    color: #9ca3af;
    transition: all 0.2s ease;
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.sidebar-item:hover {
    background: #f3f4f6;
    color: #1a2332;
}

.sidebar-item:hover i {
    color: #2563eb;
}

.sidebar-active {
    background: #eff6ff !important;
    color: #2563eb !important;
    border-right: 3px solid #2563eb;
}

.sidebar-active i {
    color: #2563eb !important;
}

/* ---- Badge ---- */
.badge-count {
    background: #eff6ff;
    color: #2563eb;
    font-size: 11px;
    padding: 1px 10px;
    border-radius: 20px;
    margin-right: auto;
    font-weight: 600;
}

/* ---- Divider ---- */
.sidebar-divider {
    border-color: #f0f0f0;
    margin: 12px 0;
}

/* ---- Logout Button ---- */
.sidebar-item.logout-btn {
    color: #9ca3af;
}

.sidebar-item.logout-btn i {
    color: #9ca3af;
}

.sidebar-item.logout-btn:hover {
    background: #fef2f2;
    color: #ef4444;
}

.sidebar-item.logout-btn:hover i {
    color: #ef4444;
}

/* ===== Responsive ===== */

/* موبایل (< 768px) */
@media (max-width: 767px) {
    #sidebar {
        width: 280px;
        max-width: 80vw;
        border-left: none;
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.15);
    }
}

/* تبلت (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    #sidebar {
        width: 240px;
    }
}

/* دسکتاپ (>= 1024px) */
@media (min-width: 1024px) {
    #sidebar {
        transform: translateX(0) !important;
        position: relative !important;
        box-shadow: none !important;
    }

    #sidebarOverlay {
        display: none !important;
    }

    #sidebarCloseBtn {
        display: none !important;
    }
}