/* Sidebar Toggle (Accordion Header) */
.sidebar-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1rem;
    color: #94a3b8;
    cursor: pointer;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease-in-out;
    margin-top: 0.25rem;
    user-select: none;
}

.sidebar-toggle:hover {
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--text-light);
}

.sidebar-toggle.open {
    color: var(--text-light);
}

.toggle-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-content i {
    width: 24px;
    text-align: center;
    color: #64748b;
    transition: var(--transition);
}

.sidebar-toggle:hover .toggle-content i,
.sidebar-toggle.open .toggle-content i {
    color: var(--accent-color);
}

.toggle-icon {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.sidebar-toggle.open .toggle-icon {
    transform: rotate(90deg);
}

/* Sidebar Submenu */
.sidebar-submenu {
    list-style: none;
    padding-left: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    opacity: 0;
}

.sidebar-submenu.open {
    max-height: 500px;
    /* Arbitrary large height */
    opacity: 1;
    transition: max-height 0.5s ease-in, opacity 0.5s ease-in;
}

.sidebar-submenu li a {
    padding-left: 3.5rem;
    /* Indent child items */
    font-size: 0.9rem;
    padding-top: 0.65rem;
    /* Tighter than main links */
    padding-bottom: 0.65rem;
}

.sidebar-submenu li a::before {
    /* Optional: hierarchical dotted line could go here */
}