.sidebar {
    width: var(--sidebar-width);
    height: 100%;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0;
    transition: width var(--transition-slow);
    z-index: 20;
    overflow: hidden;
}

.sidebar:hover {
    width: var(--sidebar-expanded-width);
}

.sidebar-header {
    margin-bottom: 2rem;
    transition: var(--transition-slow);
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    transition: var(--transition-slow);
}

.sidebar:hover .sidebar-logo {
    transform: scale(1.1);
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

.nav-item {
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 calc((var(--sidebar-width) - 24px) / 2);
    text-decoration: none;
    color: var(--text-muted);
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.nav-item i {
    font-size: 1.5rem;
    min-width: 24px;
    display: flex;
    justify-content: center;
}

.nav-text {
    margin-left: 1.5rem;
    font-weight: 500;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-fast);
}

.sidebar:hover .nav-text {
    opacity: 1;
    visibility: visible;
}

.nav-item:hover, .nav-item.active {
    color: var(--primary-color);
    background-color: rgba(4, 120, 87, 0.05);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 15%;
    height: 70%;
    width: 4px;
    background-color: var(--primary-color);
    border-radius: 0 4px 4px 0;
}

.sidebar-footer {
    width: 100%;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
}

.sidebar-icon-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.sidebar-icon-btn:hover {
    color: var(--primary-color);
    transform: rotate(15deg);
}
