/* ===== SIDEBAR STYLES ===== */
:root {
    /* Sidebar specific variables */
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 60px;
    --sidebar-background: #1a1a1a;
    --sidebar-hover: #2a2a2a;
    --sidebar-active: #3a3a3a;
}

/* Sidebar Container */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background-color: var(--sidebar-background);
    transition: width 0.3s ease;
    z-index: 1000;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
}

/* Logo Container */
.sidebar-logo {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo img {
    width: 30px;
    height: 30px;
    margin-right: 15px;
}

.sidebar-logo-text {
    color: var(--text-color);
    font-size: var(--font-lg);
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
}

/* Navigation Menu */
.sidebar-nav {
    padding: 20px 0;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.sidebar-nav-item:hover {
    background-color: var(--sidebar-hover);
}

.sidebar-nav-item.active {
    background-color: var(--sidebar-active);
    border-left: 4px solid var(--primary-color);
}

.sidebar-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
    margin-right: 15px;
}

.sidebar-text {
    white-space: nowrap;
    overflow: hidden;
}

/* Main Content Adjustment */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 0;
    transition: margin-left 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: var(--sidebar-collapsed-width);
    }
    
    .sidebar-logo-text,
    .sidebar-text {
        display: none;
    }
    
    .sidebar-logo {
        justify-content: center;
    }
    
    .sidebar-logo img {
        margin-right: 0;
    }
    
    .sidebar-icon {
        margin-right: 0;
    }
    
    .main-content {
        margin-left: var(--sidebar-collapsed-width);
    }
    
    /* Show sidebar on hover for mobile */
    .sidebar:hover {
        width: var(--sidebar-width);
    }
    
    .sidebar:hover .sidebar-logo-text,
    .sidebar:hover .sidebar-text {
        display: block;
    }
    
    .sidebar:hover .sidebar-logo {
        justify-content: flex-start;
    }
    
    .sidebar:hover .sidebar-logo img {
        margin-right: 15px;
    }
    
    .sidebar:hover .sidebar-icon {
        margin-right: 15px;
    }
}

/* Toggle Button for Mobile */
.sidebar-toggle {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1001;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

@media (max-width: 480px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .sidebar-toggle {
        display: flex;
    }
    
    .main-content {
        margin-left: 0;
    }
}
