/* css/components/_sidebar.css */

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0 0.75rem;
}

.nav-label {
    padding: 1rem 1rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-item, .nav-group-trigger {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: var(--secondary-color);
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
}

.nav-item i, .nav-group-trigger i:first-child {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.nav-item:hover, .nav-group-trigger:hover {
    background-color: var(--input-bg-color);
    color: var(--text-color);
}

.nav-item.active {
    background-color: rgba(0, 102, 204, 0.1);
    color: var(--primary-color);
    font-weight: 600;
}

/* Accordion Logic */
.nav-group-trigger .arrow {
    margin-left: auto;
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}
.nav-group.expanded .arrow { transform: rotate(90deg); }
.nav-group.expanded .nav-group-trigger { color: var(--text-color); }

.nav-group-content {
    display: none; /* Hidden by default */
    flex-direction: column;
    gap: 0.15rem;
    padding-left: 0.75rem; /* Indent sub-items */
    margin-top: 0.25rem;
    position: relative;
}
.nav-group-content::before {
    content: ''; position: absolute; left: 1.6rem; top: 0; bottom: 0;
    width: 1px; background: var(--border-color);
}
.nav-group.expanded .nav-group-content { display: flex; animation: slideDown 0.2s ease-out; }

/* Sub-items specific style */
.nav-group-content .nav-item {
    padding: 0.5rem 1rem 0.5rem 1.5rem;
    font-size: 0.9rem;
}
.nav-group-content .nav-item.active {
    background: transparent;
    color: var(--primary-color);
    border-right: 3px solid var(--primary-color);
    border-radius: 0;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}
.user-profile {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
}
.user-profile:hover { background-color: var(--input-bg-color); }
.user-avatar {
    width: 36px; height: 36px;
    background: var(--secondary-color);
    color: white; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.user-info { display: flex; flex-direction: column; font-size: 0.85rem; }
.user-name { font-weight: 600; }
.user-role { font-size: 0.75rem; color: var(--secondary-color); }

@keyframes slideDown { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }