:root {
    --sidebar-width: 272px;
    --sidebar-bg: #0b1220;
    --sidebar-bg-2: #101a2f;
    --sidebar-text: #e5edff;
    --sidebar-muted: #8ea1c8;
    --sidebar-active: rgba(255,255,255,0.08);
    --sidebar-border: rgba(255,255,255,0.08);
}

.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background:
        radial-gradient(circle at top, rgba(76, 124, 255, 0.24), transparent 28%),
        linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-2) 100%);
    color: var(--sidebar-text);
    position: sticky;
    top: 0;
    border-right: 1px solid var(--sidebar-border);
    z-index: 1050;
    backdrop-filter: blur(12px);
}

.sidebar__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 16px 12px;
}

.sidebar__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
    min-width: 0;
}

.sidebar__logo {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 20px;
    color: #fff;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.28);
    flex: 0 0 44px;
}

.sidebar__brand-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.sidebar__brand-text strong {
    font-size: 15px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar__brand-text small {
    color: var(--sidebar-muted);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar__label {
    color: var(--sidebar-muted);
    font-size: 11px;
    letter-spacing: 1.5px;
    padding: 12px 20px 8px;
    font-weight: 700;
}

.sidebar__nav {
    padding: 0 12px 18px;
}

.sidebar__item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--sidebar-text);
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 16px;
    margin-bottom: 8px;
    transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
    border: 1px solid transparent;
}

.sidebar__item:hover,
.sidebar__item.is-active {
    background: var(--sidebar-active);
    border-color: rgba(255,255,255,0.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.sidebar__item:hover {
    transform: translateX(2px);
}

.sidebar__icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.08);
    color: #fff;
    flex: 0 0 38px;
}

.sidebar__icon svg {
    width: 18px;
    height: 18px;
}

.sidebar__item span:last-child {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
}

.sidebar__close {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
    color: #fff;
    position: relative;
    cursor: pointer;
    flex: 0 0 40px;
}

.sidebar__close span {
    position: absolute;
    top: 19px;
    left: 11px;
    width: 16px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
}
.sidebar__close span:first-child { transform: rotate(45deg); }
.sidebar__close span:last-child { transform: rotate(-45deg); }

.sidebar-backdrop {
    display: none;
}

@media (max-width: 991px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        max-width: calc(100vw - 44px);
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        box-shadow: 0 20px 50px rgba(0,0,0,0.32);
    }

    .sidebar.is-open {
        transform: translateX(0);
    }

    .sidebar__close {
        display: inline-block;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(10, 18, 32, 0.55);
        z-index: 1040;
        backdrop-filter: blur(2px);
    }

    .sidebar-backdrop.is-show {
        display: block;
    }

    body.menu-open {
        overflow: hidden;
    }
}
