/* Sidebar Layout */
#layout-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

#sidebar {
    width: 255px;
    background: #12151f;
    border-right: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    z-index: 50;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

#main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    margin-left: 255px;
}

/* Sidebar Header */
.sidebar-header {
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(14,165,233,0.3);
}

.sidebar-brand {
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
    letter-spacing: 0.2px;
    line-height: 1.2;
}

.sidebar-sub {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0.03em;
}

/* Sidebar Navigation */
.sidebar-nav {
    padding: 1.25rem 0.875rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.nav-section-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0.75rem 0.75rem 0.375rem;
    margin-top: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem 0.875rem;
    color: var(--text-sub);
    text-decoration: none;
    border-radius: 0.625rem;
    transition: all 0.18s ease;
    font-weight: 500;
    font-size: 0.875rem;
    position: relative;
}

.nav-item .nav-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    flex-shrink: 0;
    transition: all 0.18s ease;
}

.nav-item:hover {
    background: rgba(255,255,255,0.04);
    color: white;
}

.nav-item:hover .nav-icon {
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent);
}

.nav-item.active {
    background: rgba(56, 189, 248, 0.08);
    color: white;
}

.nav-item.active .nav-icon {
    background: rgba(56, 189, 248, 0.15);
    color: var(--accent);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 3px;
    background: var(--accent);
    border-radius: 0 2px 2px 0;
}

/* Topbar */
.topbar {
    height: 64px;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #12151f;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    position: sticky;
    top: 0;
    z-index: 40;
}

/* User profile bottom sidebar */
.user-profile {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: auto;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: white;
    flex-shrink: 0;
}

/* Mobile hamburger */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-sub);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.375rem;
    border-radius: 0.375rem;
    transition: color 0.2s;
}

.mobile-toggle:hover { color: white; }

@media (max-width: 768px) {
    #sidebar {
        position: fixed;
        left: -255px;
        height: 100%;
    }
    #sidebar.show { left: 0; }
    #main-content { margin-left: 0; }
    .mobile-toggle { display: block; }
}
