/* EPIC UI-01 — Fixed application shell.
   Topbar is a sibling of .na-main, not a child of the scrolling content. */

:root {
    --na-effective-topbar-height: var(--na-topbar-height, 66px);
}

html,
body {
    min-height: 100%;
}

body {
    overflow-x: hidden;
}

/* Reserve topbar space globally. This remains valid even if another stylesheet
   changes .na-main display or page widths. */
.na-main {
    padding-top: var(--na-effective-topbar-height) !important;
}

@media (min-width: 1121px) {
    .na-shell {
        display: block;
        min-height: 100vh;
        padding-left: var(--na-sidebar-width);
    }

    .na-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 900;
        width: var(--na-sidebar-width);
        height: 100dvh;
        min-height: 0;
        overflow: hidden;
        padding: 14px 10px 12px;
        gap: 12px;
    }

    .na-brand {
        flex: 0 0 auto;
    }

    .na-brand-logo {
        width: min(138px, calc(var(--na-sidebar-width) - 32px));
        max-height: 116px;
    }

    .na-sidebar .na-nav {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior: contain;
        scrollbar-gutter: stable;
        padding-right: 4px;
    }

    .na-sidebar .na-nav::-webkit-scrollbar {
        width: 7px;
    }

    .na-sidebar .na-nav::-webkit-scrollbar-track {
        background: transparent;
    }

    .na-sidebar .na-nav::-webkit-scrollbar-thumb {
        background: rgba(143, 92, 246, .28);
        border-radius: 999px;
    }

    .na-sidebar .na-nav::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 45, 141, .42);
    }

    .na-sidebar-footer {
        flex: 0 0 auto;
        margin-top: 0;
        background: rgba(7, 7, 12, .88);
        backdrop-filter: blur(12px);
    }

    .na-main {
        width: 100%;
        min-width: 0;
        min-height: 100vh;
    }

    .na-content {
        width: min(1320px, calc(100vw - var(--na-sidebar-width) - 48px));
    }

    .na-footer {
        position: relative;
        z-index: 1;
    }
}

@media (max-width: 1120px) {
    :root {
        --na-effective-topbar-height: 92px;
    }

    .na-shell {
        padding-left: 0;
    }

    .na-sidebar {
        overflow: visible;
    }

    .na-sidebar .na-nav {
        overflow: visible;
    }
}

@media (max-width: 760px) {
    :root {
        --na-effective-topbar-height: 138px;
    }
}
