:root {
    --endpoint-sidebar-width: min(84vw, 320px);
}

.hidden {
    display: none !important;
}

body.endpoint-sidebar-open {
    overflow: hidden;
}

.endpoint-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.66);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1400;
}

.endpoint-sidebar-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.endpoint-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--endpoint-sidebar-width);
    background: linear-gradient(165deg, #0f172a 0%, #0b1324 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 48px rgba(2, 6, 23, 0.5);
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    z-index: 1401;
    display: flex;
    flex-direction: column;
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
}

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

.endpoint-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 12px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.endpoint-sidebar-brand {
    font-size: 14px;
    font-weight: 700;
    color: #dbeafe;
    letter-spacing: 0.3px;
}

.endpoint-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    flex-shrink: 0;
}

.endpoint-icon-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.endpoint-icon-btn svg {
    width: 17px;
    height: 17px;
}

.endpoint-nav {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
}

.endpoint-nav-link {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    color: #e2e8f0;
    text-decoration: none;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.2;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.endpoint-nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.endpoint-nav-link.is-active {
    background: rgba(56, 189, 248, 0.2);
    border-color: rgba(56, 189, 248, 0.45);
    color: #e0f2fe;
}

.endpoint-nav-note {
    padding: 10px 14px;
    color: rgba(226, 232, 240, 0.7);
    font-size: 12px;
}

@media (max-width: 640px) {
    .endpoint-icon-btn {
        width: 34px;
        height: 34px;
    }
}
