/* Sidebar Brand */
#app-sidebar .sidebar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 1rem;
    border-bottom: 1px solid var(--color-gray3);
    position: relative;
}
#app-sidebar .sidebar-brand .brand-icon {
    font-size: 1.4rem;
    color: var(--color-main);
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
#app-sidebar .sidebar-brand .brand-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}
#app-sidebar .sidebar-brand .brand {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

/* App Launcher */
.app-launcher {
    position: relative;
    flex-shrink: 0;
    margin-left: auto;
}
.app-launcher-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: var(--color-gray6);
    font-size: 1.2rem;
    border-radius: 6px;
    transition: all 200ms ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
}
.app-launcher-btn:hover {
    background: var(--color-gray1);
    color: var(--color-main);
}
.app-launcher-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: var(--color-white);
    border: 1px solid var(--color-gray3);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14);
    z-index: 200;
    padding: 12px;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 4px;
    width: 340px;
    max-height: 400px;
    overflow-y: auto;
}
.app-launcher-menu.open {
    display: grid;
}
.app-launcher-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 6px;
    border-radius: 6px;
    color: var(--color-black);
    text-decoration: none;
    transition: all 200ms ease;
    text-align: center;
}
.app-launcher-item:hover {
    background: rgba(12, 77, 162, 0.08);
    color: var(--color-main);
}
.app-launcher-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: rgba(12, 77, 162, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-main);
    flex-shrink: 0;
    font-size: 1.2rem;
    overflow: hidden;
}
.app-launcher-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
}
.app-launcher-label {
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.2;
}

/* Sidebar Footer — User Profile */
.sidebar-footer {
    margin-top: auto;
    border-top: 1px solid var(--color-gray2);
    padding: 8px;
    position: relative;
}
.sidebar-user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px;
    background: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: var(--color-gray7);
    font-size: 0.88rem;
    transition: background 200ms ease;
}
.sidebar-user-btn:hover {
    background: rgba(12, 77, 162, 0.08);
}
.sidebar-user-btn i {
    font-size: 1.1rem;
    color: var(--color-main);
}
.sidebar-user-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sidebar-user-dropdown {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 8px;
    right: 8px;
    background: var(--color-white);
    border: 1px solid var(--color-gray3);
    border-radius: 8px;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
    padding: 4px;
    z-index: 200;
}
.sidebar-user-dropdown.open {
    display: block;
}
.sidebar-user-dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--color-black);
    text-decoration: none;
    font-size: 0.85rem;
    transition: background 200ms ease;
}
.sidebar-user-dropdown a:hover {
    background: rgba(12, 77, 162, 0.08);
    color: var(--color-main);
}
.sidebar-user-dropdown a i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

/* Nav Sections */
#app-sidebar .nav-section + .nav-section {
    border-top: 1px solid var(--color-gray2);
    margin-top: .3rem;
    padding-top: .3rem;
}
#app-sidebar .nav-section-label {
    display: block;
    padding: .6rem 1rem .2rem;
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--color-gray6);
    user-select: none;
}
