/* ===== SIDEBAR COMPONENT STYLES ===== */

.sidebar-component {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    background: var(--sidebar-bg);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    overflow: hidden;
    width: var(--sidebar-width);
    z-index: 1001;
    box-shadow: 1px 0 3px rgba(0, 0, 0, 0.1);
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; /* CSMS */
    font-size: 14px; /* CSMS */
    font-weight: 200; /* CSMS */
}

.sidebar-component:hover {
    width: var(--sidebar-expanded-width);
}

.sidebar-header {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-brand {
    color: white;
    font-weight: 600;
    font-size: 1.125rem;
    opacity: 0;
    transition: var(--transition);
}

.sidebar-component:hover .sidebar-brand {
    opacity: 1;
}

.sidebar-nav {
    flex: 1;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem; /* CSMS spacing */
    margin: 0;
    border-radius: 0;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
    min-height: 48px; /* CSMS height */
    height: 48px; /* CSMS height */
    width: 100%;
    position: relative;
    box-sizing: border-box;
}

.sidebar-component:hover .nav-item {
    justify-content: flex-start;
    padding: 0.875rem 0.75rem;
    width: 100%;
    min-width: 200px;
}

.nav-item:hover {
    background: rgba(107, 114, 128, 0.2); /* CSMS hover */
    color: #ffffff;
    text-decoration: none;
}

.nav-item.active {
    background: #4d1bb84d; /* CSMS active bg */
    color: #ffffff;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 100%; /* full height marker like CSMS */
    background: #4d1bb8; /* CSMS primary */
    border-radius: 0 2px 2px 0;
}

.nav-icon {
    width: 18px;
    text-align: center;
    font-size: 1.1rem; /* CSMS */
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff; /* CSMS */
}

/* Ensure FA icons inside links are white like CSMS */
.nav-item .fas,
.nav-item .nav-icon {
    color: #ffffff;
    width: 20px; /* CSMS */
    height: 20px; /* CSMS */
}

.nav-text {
    margin-left: 0.75rem;
    font-weight: 200; /* CSMS light */
    font-size: 0.875rem;
    color: #ffffff; /* CSMS */
    opacity: 0;
    width: 0;
    overflow: hidden;
    transition: var(--transition);
    margin-top: 0;
    margin-bottom: 0;
    margin-right: 0;
    white-space: nowrap;
}

.sidebar-component:hover .nav-text {
    opacity: 1;
    width: auto;
}

.sidebar-footer {
    padding: 1rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-version {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    opacity: 0;
    transition: var(--transition);
}

.sidebar-component:hover .sidebar-version {
    opacity: 1;
}

/* Mobile sidebar */
@media (max-width: 768px) {
    .sidebar-component {
        transform: translateX(-100%);
        transition: transform var(--transition);
    }

    .sidebar-component.mobile-open {
        transform: translateX(0);
    }
    
    .sidebar-component:hover {
        width: var(--sidebar-width);
    }
    
    .sidebar-component.mobile-open:hover {
        width: var(--sidebar-expanded-width);
    }
}
