body.has-sidebar {
    display: block;
    min-height: 100vh;
    background-image:
        radial-gradient(ellipse at top left, #0a1a2a 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, #1a0a2a 0%, transparent 60%);
    background-attachment: fixed;
}
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 240px;
    background: rgba(5, 7, 10, 0.92);
    backdrop-filter: blur(12px);
    border-right: 1px solid var(--border);
    padding: 24px 16px 16px;
    display: flex;
    flex-direction: column;
    z-index: 50;
    overflow-y: auto;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.sb-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    padding: 0 8px 20px;
    text-decoration: none;
}
.sb-brand-text { white-space: nowrap; }
.sb-logo { width: 32px; height: 32px; object-fit: contain; }
.sb-sep { height: 1px; background: var(--border); margin-bottom: 20px; }

.sb-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}
.sb-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 8px;
    color: var(--text-dim);
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.15s ease;
}
.sb-link:hover { background: var(--panel-2); color: var(--text); }
.sb-link.active {
    background: linear-gradient(90deg, var(--neon)22 0%, transparent 100%);
    color: var(--neon);
    box-shadow: inset 3px 0 0 var(--neon);
}
.sb-ico { font-size: 16px; width: 20px; text-align: center; }

.sb-user {
    padding: 16px 8px 0;
    border-top: 1px solid var(--border);
    margin-top: auto;
}
.sb-user-name {
    color: var(--text);
    font-size: 13px;
    padding: 0 0 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.main {
    margin-left: 240px;
    padding: 32px 40px 60px;
    min-width: 0;
}
.page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}
.page-head h2 { margin: 0; }

.stat-row-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}
@media (max-width: 1280px) {
    .stat-row-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
    .stat-row-5 { grid-template-columns: repeat(2, 1fr); }
    .sidebar { width: 72px; }
    .main { margin-left: 72px; padding: 24px 20px 60px; }
    .sb-brand-text, .sb-link span:not(.sb-ico), .sb-user-name { display: none; }
    .sb-brand { justify-content: center; padding: 0 0 20px; }
    .sb-user .btn { padding: 6px; font-size: 11px; }
}
