/* Modern Sidebar Custom Styles */

/* Sidebar Overrides with !important to ensure reset */
.offcanvas-start  {
    border-right: none !important;
    box-shadow: 0 0 40px rgba(0,0,0,0.1) !important;
    width: 300px !important; /* Slightly wider */
    background-color: #ffffff !important;
}

.offcanvas-header {
    padding: 1.5rem !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%) !important;
    border-bottom: 1px solid rgba(0,0,0,0.05) !important;
}

.offcanvas-title {
    font-size: 1.1rem !important; 
    color: var(--primary-color) !important;
}

.offcanvas-body {
    padding: 1rem 0.75rem !important;
}

/* List Group Customization */
.list-group-flush .list-group-item {
    border: none !important;
    padding: 0.85rem 1rem !important;
    margin-bottom: 0.5rem !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    color: #475569 !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex !important;
    align-items: center !important;
}

.list-group-item i {
    width: 24px !important;
    text-align: center !important;
    font-size: 1.1rem !important;
    transition: transform 0.2s !important;
}

/* Hover State */
.list-group-item:hover,
.list-group-item:focus {
    background-color: #f1f5f9 !important;
    color: var(--primary-color) !important;
    padding-right: 1.25rem !important; /* Slight shift */
    transform: translateX(-4px) !important; /* RTL shift */
}

.list-group-item:hover i {
    transform: scale(1.1) !important;
}

/* Active State */
.list-group-item.active {
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.1), transparent) !important;
    color: var(--primary-color) !important;
    border-right: 3px solid var(--primary-color) !important;
    border-radius: 4px 12px 12px 4px !important; /* Flat left for indicator */
}

/* Headers */
.sidebar-header {
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: #94a3b8 !important;
    padding: 0.5rem 1rem !important;
    margin-top: 1rem !important;
    font-weight: 700 !important;
}

/* User/Profile Section at Top */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px dashed #e2e8f0;
}

.sidebar-brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), #818cf8);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
}

.sidebar-brand-text {
    line-height: 1.2;
}

.sidebar-brand-title {
    font-weight: 800;
    color: var(--text-main);
    font-size: 1rem;
}

.sidebar-brand-subtitle {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* Close button styling */
.btn-close {
    background-size: 0.8rem !important;
    opacity: 0.5 !important;
    transition: opacity 0.2s !important;
}
.btn-close:hover {
    opacity: 1 !important;
}

/* RTL specific fixes if needed, though mostly handled by Bootstrap RTL */
html[dir="rtl"] .list-group-item:hover {
    transform: translateX(-4px); 
}
