/* ── Shared topographic surface ─────────────────────────────────────────── */
body {
    font-family: 'Nunito Sans', sans-serif;
}

.topo-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.85;
}
.topo-layer { transform: none; }
.topo-map-fill {
    fill: rgba(var(--camp-hero-glow-rgb), 0.08);
    stroke: none;
}
.portal-hero-topo,
.topo-card-topo {
    opacity: 0.55;
}
.topo-grid {
    position: absolute; inset: 0; pointer-events: none; opacity: 0.2;
    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse 75% 65% at 50% 50%, #000 15%, transparent 78%);
}
.topo-vignette {
    position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(ellipse 60% 55% at 50% 48%, transparent 0%, rgba(0, 0, 0, 0.42) 100%);
}

/* ── Portal hero (leader pages) ───────────────────────────────────────── */
.portal-hero, .home-hero-1 {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse 70% 55% at 50% 40%, rgba(var(--camp-hero-glow-rgb, 255, 107, 0), 0.12) 0%, transparent 55%),
        linear-gradient(165deg, var(--camp-hero-from, #1a0c04) 0%, var(--camp-hero-mid, #c24100) 40%, var(--camp-hero-to, #8f3000) 72%, var(--camp-hero-from, #1a0c04) 100%);
}
.portal-hero.d-none { display: none !important; }
@media (min-width: 768px) {
    .portal-hero.d-md-flex { display: flex !important; }
}
/* Logged-in shell and public portal pages: clear the fixed contact bar + navbar */
.site-navbar ~ #router > .portal-hero {
    padding-top: calc(var(--camp-site-contact-bar-height, 38px) + var(--camp-site-nav-height, 76px));
    box-sizing: border-box;
}
.site-navbar ~ #router > .portal-hero.portal-hero--sm { min-height: calc(22vh + 96px); }
.site-navbar ~ #router > .portal-hero.portal-hero--md { min-height: calc(28vh + 96px); }
.site-navbar ~ #router > .portal-hero.portal-hero--lg { min-height: calc(30vh + 96px); }
.site-navbar ~ #router > .portal-hero.portal-hero--xl { min-height: calc(35vh + 96px); }
.portal-hero--sm, .home-hero-1.portal-hero--sm { min-height: 22vh; }
.portal-hero--md, .home-hero-1 { min-height: 28vh; }
.portal-hero--lg { min-height: 30vh; }
.portal-hero--xl { min-height: 35vh; }
.portal-hero-inner {
    position: relative; z-index: 2; text-align: center; color: #fff; padding: 24px 20px;
}
.portal-hero-logo {
    width: 50px; height: auto; margin-bottom: 12px;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}
.portal-hero--sm .portal-hero-logo { width: 44px; margin-bottom: 8px; }
.portal-hero--compact .portal-hero-logo { width: 44px; }
.welcome-card h1,
.yg-hero h1,
.yg-hero-inner h1 {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 800;
}
.welcome-card h1 { font-size: 1.6rem; margin: 0 0 4px; }
.yg-hero h1 { font-size: 1.75rem; margin: 0 0 8px; letter-spacing: -0.01em; }
.portal-hero-title {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 800; letter-spacing: 3px; font-size: 1.8rem; margin: 0;
    text-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.portal-hero--sm .portal-hero-title,
.portal-hero--compact .portal-hero-title { font-size: 1.4rem; letter-spacing: 2px; }
.portal-hero-sub {
    opacity: 0.78; font-size: 0.88rem; margin: 6px 0 0; letter-spacing: 0.04em;
}
.portal-hero-notice {
    margin-top: 14px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

/* Yellow Card safeguarding page hero */
.portal-hero--yellow {
    background:
        radial-gradient(ellipse 70% 55% at 50% 38%, rgba(250, 204, 21, 0.22) 0%, transparent 55%),
        linear-gradient(165deg, #5c3d0a 0%, #78350f 36%, #92400e 68%, #713f12 100%);
}
.portal-hero--yellow .topo-vignette {
    background: radial-gradient(ellipse 68% 62% at 50% 48%, transparent 0%, rgba(66, 32, 6, 0.2) 100%);
}
.portal-hero--yellow .topo-grid {
    opacity: 0.18;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    mask-image: radial-gradient(ellipse 75% 65% at 50% 50%, #000 15%, transparent 78%);
}
.portal-hero--yellow .portal-hero-topo {
    opacity: 0.48;
}
.portal-hero--yellow .topo-map-fill {
    fill: rgba(250, 204, 21, 0.1);
}
.portal-hero--yellow .portal-hero-inner {
    color: #fff;
}
.portal-hero--yellow .portal-hero-logo {
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.22));
}
.portal-hero--yellow .portal-hero-title {
    color: #fef9c3;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.12);
}
.portal-hero--yellow .portal-hero-sub {
    color: rgba(254, 243, 199, 0.9);
    opacity: 1;
}
.portal-hero--yellow .portal-hero-notice {
    background: rgba(255, 255, 255, 0.96);
    border: 1.5px solid rgba(234, 179, 8, 0.55);
    color: #422006;
    box-shadow: 0 8px 24px rgba(66, 32, 6, 0.12);
}
.portal-hero--yellow .portal-hero-notice a {
    color: #92400e;
}
.portal-hero--yellow .portal-hero-notice a:hover {
    color: #78350f;
}

.portal-mobile-bar { display: none !important; }

/* Portal layout — flush to viewport edges */
#router .container-fluid {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

#router .container-fluid > .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

@media (min-width: 768px) {
    #router .container-fluid > .row {
        align-items: flex-start;
    }
}

#router .container-fluid > .row > main.main-content {
    min-width: 0;
}

html:has(body.logged-in) {
    overflow-x: clip;
    max-width: 100%;
}

body.logged-in {
    overflow-x: clip;
    max-width: 100%;
}

body.logged-in #router {
    overflow-x: clip;
    max-width: 100%;
}

@media (max-width: 767.98px) {
    #router #sidebarMenu.sidebar.collapse {
        --sidebar-mobile-top: calc(
            var(--camp-site-contact-bar-height, 38px) + var(--camp-site-nav-height, 56px)
        );
        --sidebar-mobile-height: calc(100dvh - var(--sidebar-mobile-top));
        position: fixed;
        top: var(--sidebar-mobile-top);
        left: 0;
        right: 0;
        z-index: 999;
        height: var(--sidebar-mobile-height) !important;
        max-height: var(--sidebar-mobile-height) !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
        box-sizing: border-box;
        padding-bottom: 12px;
        /* Bypass Bootstrap height collapse — fade/slide overlay instead */
        transition:
            opacity 0.24s ease,
            transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
            visibility 0.28s !important;
        transform: translateY(-10px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    #router #sidebarMenu.sidebar.collapse.show {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    /* Kill Bootstrap .collapsing height jank on the portal overlay */
    #router #sidebarMenu.sidebar.collapsing {
        position: fixed;
        top: calc(var(--camp-site-contact-bar-height, 38px) + var(--camp-site-nav-height, 56px));
        left: 0;
        right: 0;
        z-index: 999;
        height: calc(
            100dvh - var(--camp-site-contact-bar-height, 38px) - var(--camp-site-nav-height, 56px)
        ) !important;
        max-height: calc(
            100dvh - var(--camp-site-contact-bar-height, 38px) - var(--camp-site-nav-height, 56px)
        ) !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden;
        transition:
            opacity 0.24s ease,
            transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
            visibility 0.28s !important;
        transform: translateY(-10px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    #router #sidebarMenu.sidebar.collapse.show > .sidebar-nav-scroll {
        flex: 1 1 0;
        height: 0;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        padding-top: 4px;
    }

    #router #sidebarMenu.sidebar.collapse.show > .sidebar-nav-footer {
        flex-shrink: 0;
        padding-top: 8px;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
    }

    .site-navbar ~ #router > .portal-hero {
        padding-top: 0;
        min-height: auto;
    }
    .site-navbar ~ #router > .portal-hero.portal-hero--md { min-height: auto; }
}

/* ── Public home hero ───────────────────────────────────────────────────── */
html:not([data-theme="dark"]) .home-hero {
    min-height: 92vh;
    background:
        radial-gradient(ellipse 70% 55% at 50% 0%, rgba(255, 107, 0, 0.14) 0%, transparent 58%),
        linear-gradient(180deg, #0f1115 0%, #12151a 55%, #1a1d24 100%) !important;
}
.home-hero::before, .home-hero::after { display: none; }
.home-hero .hero-inner { position: relative; z-index: 2; }

/* ── Sidebar ────────────────────────────────────────────────────────────── */
.sidebar {
    background:
        radial-gradient(ellipse 80% 40% at 50% 0%, rgba(var(--camp-hero-glow-rgb), 0.08) 0%, transparent 60%),
        linear-gradient(180deg, var(--camp-sidebar-from) 0%, var(--camp-sidebar-mid) 55%, var(--camp-sidebar-to) 100%) !important;
    min-height: 0;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

#router #sidebarMenu.sidebar {
    --sidebar-scrollbar-size: 6px;
    --sidebar-scrollbar-track: rgba(255, 255, 255, 0.05);
    --sidebar-scrollbar-thumb: rgba(var(--camp-hero-glow-rgb, 255, 107, 0), 0.72);
    --sidebar-scrollbar-thumb-hover: color-mix(in srgb, var(--camp-brand-primary-dark, #c24100) 92%, transparent);
    --sidebar-scrollbar-thumb-active: color-mix(in srgb, var(--camp-brand-primary-dark, #c24100) 92%, #000);
}

#router #sidebarMenu.sidebar > .sidebar-nav-scroll,
#router #sidebarMenu.sidebar.collapse.show > .sidebar-nav-scroll {
    scrollbar-width: thin;
    scrollbar-color: var(--sidebar-scrollbar-thumb) var(--sidebar-scrollbar-track);
}

#router #sidebarMenu.sidebar > .sidebar-nav-scroll::-webkit-scrollbar,
#router #sidebarMenu.sidebar.collapse.show > .sidebar-nav-scroll::-webkit-scrollbar {
    width: var(--sidebar-scrollbar-size);
}

#router #sidebarMenu.sidebar > .sidebar-nav-scroll::-webkit-scrollbar-track,
#router #sidebarMenu.sidebar.collapse.show > .sidebar-nav-scroll::-webkit-scrollbar-track {
    background: var(--sidebar-scrollbar-track);
    border-radius: 999px;
    margin: 16px 0;
}

#router #sidebarMenu.sidebar > .sidebar-nav-scroll::-webkit-scrollbar-thumb,
#router #sidebarMenu.sidebar.collapse.show > .sidebar-nav-scroll::-webkit-scrollbar-thumb {
    background: var(--sidebar-scrollbar-thumb);
    border-radius: 999px;
    border: none;
    min-height: 40px;
}

#router #sidebarMenu.sidebar > .sidebar-nav-scroll::-webkit-scrollbar-thumb:hover,
#router #sidebarMenu.sidebar.collapse.show > .sidebar-nav-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--sidebar-scrollbar-thumb-hover);
}

#router #sidebarMenu.sidebar > .sidebar-nav-scroll::-webkit-scrollbar-thumb:active,
#router #sidebarMenu.sidebar.collapse.show > .sidebar-nav-scroll::-webkit-scrollbar-thumb:active {
    background: var(--sidebar-scrollbar-thumb-active);
}

@media (min-width: 768px) {
    #router #sidebarMenu.sidebar {
        --sidebar-viewport-height: calc(100dvh - var(--camp-site-nav-height, 96px));
        display: flex !important;
        flex-direction: column !important;
        height: var(--sidebar-viewport-height) !important;
        max-height: var(--sidebar-viewport-height) !important;
        min-height: 0 !important;
        position: sticky;
        top: var(--camp-site-nav-height, 96px);
        align-self: flex-start;
        overflow: hidden !important;
        box-sizing: border-box;
    }

    #router #sidebarMenu.sidebar .sidebar-brand,
    #router #sidebarMenu.sidebar .sidebar-offline-banner,
    #router #sidebarMenu.sidebar .sidebar-rail-toggle,
    #router #sidebarMenu.sidebar > .sidebar-nav-footer {
        flex: 0 0 auto;
        flex-shrink: 0;
    }

    #router #sidebarMenu.sidebar > .sidebar-nav-scroll {
        flex: 1 1 0;
        height: 0;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        touch-action: pan-y;
        position: relative;
        z-index: 2;
    }

    #router #sidebarMenu.sidebar > .sidebar-nav-scroll > .nav {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
    }

    #router #sidebarMenu.sidebar > .sidebar-nav-footer {
        margin-top: 0;
        padding-top: 10px;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        position: relative;
        z-index: 2;
    }

    #router #sidebarMenu.sidebar > .sidebar-nav-footer .nav {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

}
.sidebar::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
    mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}
.sidebar::after {
    content: '';
    position: absolute; bottom: -20px; left: -10%; right: -10%; height: 120px;
    background: repeating-linear-gradient(
        0deg,
        transparent, transparent 8px,
        rgba(var(--camp-hero-glow-rgb), 0.06) 8px, rgba(var(--camp-hero-glow-rgb), 0.06) 9px
    );
    border-radius: 50% 50% 0 0;
    pointer-events: none;
    opacity: 0.6;
}
.sidebar .nav-link {
    color: rgba(255,255,255,0.82) !important;
    padding: 10px 14px; border-radius: 8px; margin-bottom: 3px;
    font-size: 0.88rem; transition: background 0.15s, color 0.15s;
    position: relative; z-index: 1;
}
.sidebar .nav-link:hover { background: rgba(255,255,255,0.1); color: #fff !important; }
.sidebar .nav-link.active {
    background: rgba(var(--camp-hero-glow-rgb), 0.18); color: #fff !important; font-weight: 700;
    box-shadow: inset 3px 0 0 rgba(var(--camp-hero-glow-rgb), 0.6);
}
.sidebar hr { border-color: rgba(255,255,255,0.12); position: relative; z-index: 1; }
.sidebar .nav-section { list-style: none; }
.sidebar-section-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 4px 6px;
    position: relative;
    z-index: 1;
}
.sidebar-section-divider::before,
.sidebar-section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.12);
}
.sidebar-section-tag {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.42);
    white-space: nowrap;
    flex-shrink: 0;
}
.sidebar-mobile-section {
    list-style: none;
    position: relative;
    z-index: 1;
    margin-top: 4px;
}

.sidebar-module-box {
    list-style: none;
    margin: 5px 0 3px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    overflow: hidden;
}

.sidebar-module-box .sidebar-section-toggle {
    margin: 0;
    padding: 5px 10px;
    min-height: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    border-bottom: 1px solid transparent;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.25;
    gap: 6px;
}

.sidebar-module-box .sidebar-section-toggle .bi,
.sidebar-module-box .sidebar-section-toggle__chev {
    font-size: 0.72rem;
}

.sidebar-module-box.is-open .sidebar-section-toggle__chev {
    transform: rotate(180deg);
}

.sidebar-module-box.is-open .sidebar-section-toggle {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.sidebar-module-box.is-open .sidebar-section-toggle__chev {
    transform: rotate(180deg);
}

.sidebar-module-box__items {
    list-style: none;
    padding: 2px 4px 5px;
    margin: 0;
    display: none;
}

.sidebar-module-box.is-open .sidebar-module-box__items {
    display: block;
}

.sidebar-module-box__items .nav-item {
    margin: 0;
}

.sidebar-module-box__items .nav-link {
    padding: 6px 8px 6px 10px;
    margin-bottom: 1px;
    font-size: 0.8rem;
    border-radius: 6px;
}

/* Pinned top links (Dashboard, Your Group, My Section) — match module box item size */
.sidebar-nav-scroll > .nav > .nav-item:not(.sidebar-module-box) .nav-link {
    padding: 6px 8px 6px 10px;
    margin-bottom: 1px;
    font-size: 0.8rem;
    border-radius: 6px;
}

.sidebar-nav-scroll > .nav > .nav-item:first-child .nav-link {
    margin-top: 2px;
}

/* Module reorder controls — always loaded (arrows are shown to every leader). */
.sidebar-module-box__head {
    display: flex;
    align-items: stretch;
    gap: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-module-box__head .sidebar-section-toggle {
    flex: 1;
    min-width: 0;
    width: auto;
    margin: 0;
    border-bottom: none;
    border-radius: 0;
}

.sidebar-module-reorder-btns {
    flex-shrink: 0;
    display: inline-flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-module-move-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    min-height: 14px;
    padding: 0;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.62rem;
    line-height: 1;
    transition: color 0.15s, background 0.15s;
}

.sidebar-module-move-btn:hover:not(:disabled),
.sidebar-module-move-btn:focus-visible:not(:disabled) {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-module-move-btn:disabled {
    opacity: 0.25;
    cursor: default;
}

.sidebar-section-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 10px 0 4px;
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.88);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.sidebar-section-toggle:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.22);
}
.sidebar-section-toggle .bi {
    font-size: 0.85rem;
    opacity: 0.75;
    transition: transform 0.2s ease;
}
.sidebar-section-toggle.is-open .bi {
    transform: rotate(180deg);
}

.nav-item.sidebar-section-item--hidden {
    display: none !important;
}

body.sidebar-rail-mode .sidebar-mobile-section:not(.sidebar-module-box) {
    display: none !important;
}

body.sidebar-rail-mode .nav-item.sidebar-section-item--hidden {
    display: list-item !important;
}

@media (max-width: 767.98px) {
    .sidebar-mobile-section {
        margin-top: 3px;
    }

    /* Larger module dropdown headers + items on mobile */
    .sidebar-module-box {
        margin: 8px 0 6px;
        border-radius: 10px;
    }

    .sidebar-module-box__head .sidebar-section-toggle {
        padding: 12px 14px;
        min-height: 48px;
        font-size: 0.82rem;
        letter-spacing: 0.05em;
    }

    .sidebar-module-box .sidebar-section-toggle__label {
        font-size: 0.82rem;
        line-height: 1.3;
    }

    .sidebar-module-box .sidebar-section-toggle__chev {
        font-size: 0.95rem;
    }

    .sidebar-module-settings-btn {
        width: 44px;
        min-height: 48px;
        font-size: 1rem;
    }

    .sidebar-module-reorder-btns {
        border-right-color: rgba(255, 255, 255, 0.12);
    }

    .sidebar-module-move-btn {
        width: 36px;
        min-height: 22px;
        font-size: 0.85rem;
    }

    .sidebar-module-box__items {
        padding: 6px 8px 10px;
    }

    .sidebar-module-box__items .nav-link {
        padding: 11px 12px 11px 14px;
        margin-bottom: 4px;
        font-size: 0.92rem;
        line-height: 1.35;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .sidebar-module-box__items .nav-link .sidebar-link-icon {
        font-size: 1rem;
        width: 1.25rem;
    }

    .sidebar-nav-scroll > .nav > .nav-item:not(.sidebar-module-box) .nav-link {
        padding: 11px 12px 11px 14px;
        margin-bottom: 4px;
        font-size: 0.92rem;
        min-height: 44px;
    }

    /* Mobile quick actions — 4 swappable shortcuts above nav list */
    .sidebar-quick-actions {
        margin: 2px 0 12px;
        padding: 10px 10px 8px;
        border: 1px solid rgba(255, 255, 255, 0.14);
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.06);
    }

    .sidebar-qa-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        margin-bottom: 8px;
    }

    .sidebar-qa-title {
        font-size: 0.68rem;
        font-weight: 800;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.5);
    }

    .sidebar-qa-edit-btn {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        padding: 4px 10px;
        border: 1px solid rgba(255, 255, 255, 0.18);
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.08);
        color: rgba(255, 255, 255, 0.85);
        font-size: 0.72rem;
        font-weight: 700;
        line-height: 1.2;
        cursor: pointer;
    }

    .sidebar-qa-edit-btn:hover,
    .sidebar-qa-edit-btn:focus-visible {
        background: rgba(255, 107, 0, 0.22);
        border-color: rgba(255, 107, 0, 0.45);
        color: #fff;
        outline: none;
    }

    .sidebar-qa-edit-btn .bi {
        font-size: 0.78rem;
    }

    .sidebar-qa-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
    }

    .sidebar-qa-slot {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        min-height: 64px;
        padding: 8px 4px;
        border: 1px solid transparent;
        border-radius: 10px;
        background: rgba(0, 0, 0, 0.18);
        color: #fff;
        text-decoration: none;
        text-align: center;
        cursor: pointer;
        transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
    }

    .sidebar-qa-slot:hover,
    .sidebar-qa-slot:focus-visible {
        background: rgba(255, 107, 0, 0.22);
        border-color: rgba(255, 107, 0, 0.35);
        color: #fff;
        outline: none;
    }

    .sidebar-qa-slot .bi {
        font-size: 1.2rem;
        line-height: 1;
        color: #ff8a3d;
    }

    .sidebar-qa-slot span {
        display: block;
        max-width: 100%;
        font-size: 0.62rem;
        font-weight: 700;
        line-height: 1.2;
        letter-spacing: 0.01em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        color: rgba(255, 255, 255, 0.88);
    }

    .sidebar-quick-actions.is-editing .sidebar-qa-slot {
        border-style: dashed;
        border-color: rgba(255, 255, 255, 0.22);
    }

    .sidebar-qa-slot.is-active {
        background: rgba(255, 107, 0, 0.28);
        border-color: rgba(255, 107, 0, 0.7);
        border-style: solid;
        transform: translateY(-1px);
    }

    .sidebar-qa-picker {
        margin-top: 10px;
        padding-top: 8px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .sidebar-qa-picker-hint {
        margin: 0 0 8px;
        font-size: 0.72rem;
        line-height: 1.35;
        color: rgba(255, 255, 255, 0.55);
    }

    .sidebar-qa-picker-list {
        display: flex;
        flex-direction: column;
        gap: 4px;
        max-height: min(42vh, 280px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        margin-bottom: 8px;
    }

    .sidebar-qa-option {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        padding: 10px 12px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        background: rgba(0, 0, 0, 0.16);
        color: rgba(255, 255, 255, 0.92);
        font-size: 0.84rem;
        font-weight: 600;
        text-align: left;
        cursor: pointer;
    }

    .sidebar-qa-option:hover,
    .sidebar-qa-option:focus-visible {
        background: rgba(255, 107, 0, 0.2);
        border-color: rgba(255, 107, 0, 0.4);
        outline: none;
    }

    .sidebar-qa-option.is-selected {
        background: rgba(255, 107, 0, 0.28);
        border-color: rgba(255, 107, 0, 0.55);
    }

    .sidebar-qa-option .bi {
        font-size: 1rem;
        color: #ff8a3d;
        flex-shrink: 0;
    }

    .sidebar-qa-picker-empty {
        margin: 0;
        padding: 8px 4px;
        font-size: 0.75rem;
        color: rgba(255, 255, 255, 0.5);
    }

    .sidebar-qa-reset-btn {
        display: block;
        width: 100%;
        padding: 8px 10px;
        border: none;
        border-radius: 8px;
        background: transparent;
        color: rgba(255, 255, 255, 0.55);
        font-size: 0.74rem;
        font-weight: 600;
        text-decoration: underline;
        text-underline-offset: 2px;
        cursor: pointer;
    }

    .sidebar-qa-reset-btn:hover,
    .sidebar-qa-reset-btn:focus-visible {
        color: rgba(255, 255, 255, 0.9);
        outline: none;
    }
}

body.sidebar-rail-mode .sidebar-quick-actions {
    display: none !important;
}

.sidebar-brand {
    text-align: center; padding: 24px 0 16px; position: relative; z-index: 1;
}
.sidebar-brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0 auto;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.35rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
.sidebar-brand h6 {
    font-weight: 800; letter-spacing: 2px; color: #fff;
    font-size: 0.78rem; margin: 8px 0 0;
}
.sidebar-brand img { filter: drop-shadow(0 2px 6px rgba(0,0,0,0.25)); }

/* Desktop icon rail (collapsed sidebar) */
.sidebar-rail-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 4;
    width: 22px;
    height: 22px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.72);
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}
#router #sidebarMenu.sidebar:hover .sidebar-rail-toggle {
    color: rgba(255, 255, 255, 0.88);
    background: rgba(255, 255, 255, 0.1);
}
.sidebar-rail-toggle:hover,
.sidebar-rail-toggle:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    outline: none;
}
.sidebar-rail-toggle .bi {
    font-size: 0.74rem;
    line-height: 1;
}

@media (min-width: 768px) {
    .sidebar-rail-toggle {
        display: inline-flex;
    }

    body.sidebar-rail-mode #router .container-fluid {
        overflow-x: clip;
        max-width: 100%;
    }

    body.sidebar-rail-mode #router .container-fluid > .row {
        flex-wrap: nowrap;
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    body.sidebar-rail-mode #router #sidebarMenu.sidebar {
        display: flex !important;
        flex-direction: column !important;
        flex: 0 0 56px !important;
        width: 56px !important;
        max-width: 56px !important;
        min-width: 56px !important;
        padding: 12px 6px !important;
        overflow: hidden;
    }

    body.sidebar-rail-mode #router #sidebarMenu.sidebar > .sidebar-nav-scroll {
        overflow-x: hidden;
        overflow-y: auto;
    }

    body.sidebar-rail-mode #router #sidebarMenu.sidebar > .sidebar-nav-footer {
        overflow: hidden;
    }

    body.sidebar-rail-mode #router #sidebarMenu.sidebar > .sidebar-nav-scroll > .nav,
    body.sidebar-rail-mode #router #sidebarMenu.sidebar > .sidebar-nav-footer .nav {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    body.sidebar-rail-mode #router #sidebarMenu.sidebar[class*="col-"] {
        flex: 0 0 56px !important;
        width: 56px !important;
        max-width: 56px !important;
    }

    body.sidebar-rail-mode #router #sidebarMenu.sidebar .sidebar-brand {
        padding: 12px 0 8px;
    }

    body.sidebar-rail-mode #router #sidebarMenu.sidebar .sidebar-brand h6,
    body.sidebar-rail-mode #router #sidebarMenu.sidebar .sidebar-brand hr,
    body.sidebar-rail-mode #router #sidebarMenu.sidebar .sidebar-link-label,
    body.sidebar-rail-mode #router #sidebarMenu.sidebar .sidebar-section-tag,
    body.sidebar-rail-mode #router #sidebarMenu.sidebar .sidebar-section-toggle,
    body.sidebar-rail-mode #router #sidebarMenu.sidebar .sidebar-offline-banner {
        display: none !important;
    }

    body.sidebar-rail-mode #router #sidebarMenu.sidebar .sidebar-module-reorder-btns {
        display: none !important;
    }

    body.sidebar-rail-mode #router #sidebarMenu.sidebar .sidebar-module-box {
        border: none;
        background: transparent;
        margin: 0;
        overflow: visible;
    }

    body.sidebar-rail-mode #router #sidebarMenu.sidebar .sidebar-module-box__items {
        display: block !important;
        padding: 0;
    }

    body.sidebar-rail-mode #router #sidebarMenu.sidebar .sidebar-brand-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
        border-radius: 8px;
        margin-bottom: 0;
    }

    body.sidebar-rail-mode #router #sidebarMenu.sidebar .sidebar-brand img {
        width: 28px;
        height: auto;
    }

    body.sidebar-rail-mode #router #sidebarMenu.sidebar > .sidebar-nav-footer {
        border-top-color: rgba(255, 255, 255, 0.1);
    }

    body.sidebar-rail-mode #router #sidebarMenu.sidebar hr {
        display: none !important;
    }

    body.sidebar-rail-mode #router #sidebarMenu.sidebar .nav-link {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 10px 8px;
        margin-bottom: 4px;
        position: relative;
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
    }

    body.sidebar-rail-mode #router #sidebarMenu.sidebar .sidebar-link-icon {
        margin-right: 0 !important;
        font-size: 1.05rem;
    }

    body.sidebar-rail-mode #router #sidebarMenu.sidebar .sidebar-section-divider {
        padding: 8px 0 4px;
    }

    body.sidebar-rail-mode #router #sidebarMenu.sidebar .sidebar-section-divider::before,
    body.sidebar-rail-mode #router #sidebarMenu.sidebar .sidebar-section-divider::after {
        flex: 1;
    }

    body.sidebar-rail-mode #router #sidebarMenu.sidebar .nav-link.active {
        box-shadow: inset 0 0 0 2px rgba(163, 232, 122, 0.55);
    }

    body.sidebar-rail-mode #router #sidebarMenu.sidebar .nav-link[data-sidebar-label]::after {
        content: none;
        position: absolute;
        left: calc(100% + 10px);
        top: 50%;
        transform: translateY(-50%);
        padding: 6px 10px;
        border-radius: 8px;
        background: rgba(15, 24, 14, 0.96);
        border: 1px solid rgba(255, 255, 255, 0.14);
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
        color: #fff;
        font-size: 0.78rem;
        font-weight: 700;
        line-height: 1.2;
        white-space: nowrap;
        pointer-events: none;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.12s ease, visibility 0.12s ease;
        z-index: 3000;
    }

    body.sidebar-rail-mode #router #sidebarMenu.sidebar .nav-link[data-sidebar-label]:hover::after,
    body.sidebar-rail-mode #router #sidebarMenu.sidebar .nav-link[data-sidebar-label]:focus-visible::after {
        content: attr(data-sidebar-label);
        opacity: 1;
        visibility: visible;
    }

    body.sidebar-rail-mode #router .container-fluid > .row > main.main-content {
        flex: 1 1 0% !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    body.sidebar-rail-mode #router .container-fluid > .row > main.main-content[class*="col-"] {
        flex: 1 1 0% !important;
        width: auto !important;
        max-width: 100% !important;
    }
}

/* Offline sidebar mode */
.sidebar-offline-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
    padding: 12px 12px;
    border-radius: 12px;
    background: rgba(217, 119, 6, 0.18);
    border: 1.5px solid rgba(251, 191, 36, 0.35);
    color: #fef3c7;
    position: relative;
    z-index: 1;
}
.sidebar-offline-banner i {
    font-size: 1.1rem;
    color: #fbbf24;
    flex-shrink: 0;
    margin-top: 2px;
}
.sidebar-offline-banner strong {
    display: block;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.3;
}
.sidebar-offline-banner span {
    display: block;
    font-size: 0.68rem;
    opacity: 0.85;
    line-height: 1.35;
    margin-top: 2px;
}
.sidebar .nav-item.offline-hidden,
.sidebar .nav-section.offline-hidden,
.sidebar .sidebar-mobile-section.offline-hidden,
.sidebar .sidebar-module-box.offline-hidden,
.sidebar .sidebar-qa-slot.offline-hidden {
    display: none !important;
}

body.camp-offline .site-navbar .nav-links .nav-item:not(.nav-offline-keep):not(.nav-offline-keep-logout) {
    display: none;
}
body.camp-offline .site-navbar .nav-links .nav-divider {
    display: none;
}
body.camp-offline .site-navbar .nav-greeting {
    display: none;
}
body.camp-offline #navMobileMenu .mobile-profile,
body.camp-offline #navMobileMenu .mobile-divider {
    display: none;
}

.main-content { background: #eef1ee; min-height: 100vh; }
@media (min-width: 768px) {
    .main-content:not(.mb-main):not(.kb-main) {
        --main-content-pad-y: 36px;
        --main-content-pad-x: 32px;
        padding: var(--main-content-pad-y) var(--main-content-pad-x);
    }
}
#router .container-fluid > .row > main.main-content.mb-main {
    padding: 0 !important;
    overflow-x: clip;
}
@media (max-width: 767.98px) {
    .sidebar { min-height: auto; overflow: visible; }
    .main-content:not(.mb-main):not(.kb-main) {
        --main-content-pad-y: 20px;
        --main-content-pad-x: 14px;
        padding: var(--main-content-pad-y) var(--main-content-pad-x);
    }
    #router .container-fluid > .row > main.main-content {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
    }
    #router .container-fluid > .row > .sidebar.collapse:not(.show) {
        height: 0;
        overflow: hidden;
        padding: 0 !important;
        min-height: 0 !important;
    }
}

/* ── Dashboard / GLV topo cards ─────────────────────────────────────────── */
.topo-card, .welcome-card, .yg-hero {
    position: relative; overflow: hidden; color: #fff;
    background:
        radial-gradient(ellipse 60% 80% at 80% 20%, rgba(var(--camp-hero-glow-rgb), 0.15) 0%, transparent 50%),
        linear-gradient(135deg, var(--camp-hero-from) 0%, var(--camp-hero-mid) 45%, var(--camp-brand-primary-light) 100%) !important;
    box-shadow: 0 8px 28px color-mix(in srgb, var(--camp-brand-primary-dark) 28%, transparent);
}
.topo-card { border-radius: 18px; }
.welcome-card { border-radius: 16px; padding: 28px 32px; margin-bottom: 28px;
    display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.yg-hero { border-radius: 20px; padding: 28px 24px; margin-bottom: 20px; }
.yg-hero::before, .yg-hero::after { display: none; }

.topo-card-topo { opacity: 0.55; }
.topo-card-grid { opacity: 0.2; mask-image: radial-gradient(ellipse 90% 80% at 30% 50%, #000 10%, transparent 70%); }
.topo-card-vignette { background: radial-gradient(ellipse 70% 60% at 20% 50%, transparent 0%, rgba(10,20,8,0.35) 100%); }
.topo-card-inner, .yg-hero-inner { position: relative; z-index: 2; }
.welcome-card > *:not(.topo-svg):not(.topo-grid):not(.topo-vignette) { position: relative; z-index: 2; }

.welcome-card p { opacity: 0.82; font-size: 0.88rem; margin: 0; }
.level-chip {
    background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.28);
    border-radius: 20px; padding: 6px 16px; font-size: 0.78rem; font-weight: 700;
    color: #fff; white-space: nowrap; position: relative; z-index: 2;
}

.glv-hub-promo {
    position: relative; overflow: hidden;
    background:
        radial-gradient(ellipse 50% 80% at 100% 0%, rgba(var(--camp-hero-glow-rgb), 0.12) 0%, transparent 55%),
        linear-gradient(135deg, var(--camp-hero-mid) 0%, var(--camp-brand-primary-mid) 50%, var(--camp-brand-primary) 100%) !important;
    border: 1.5px solid rgba(var(--camp-hero-glow-rgb), 0.25);
}

/* ── 404 page ─────────────────────────────────────────────────────────────── */
.error-page-wrap { min-height: 55vh; display: flex; align-items: center; justify-content: center; }
.error-page-inner { text-align: center; max-width: 480px; padding: 2rem; position: relative; z-index: 2; }
.error-page-code {
    font-size: 7rem; font-weight: 800; line-height: 1; letter-spacing: -4px;
    background: linear-gradient(180deg, var(--camp-brand-primary-light) 0%, var(--camp-brand-primary-dark) 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    opacity: 0.85;
}
.error-page-title { font-weight: 800; color: var(--camp-brand-primary-dark); margin: 0.25rem 0 0.5rem; }
.error-page-text { color: #888; font-size: 0.95rem; margin-bottom: 2rem; }
.error-page-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.btn-topo-primary {
    background: linear-gradient(135deg, var(--camp-brand-primary), var(--camp-brand-primary-dark)); color: #fff !important;
    border: none; border-radius: 10px; padding: 10px 24px; font-size: 13px; font-weight: 700;
    text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.btn-topo-primary:hover { color: #fff; background: linear-gradient(135deg, var(--camp-brand-primary-mid), var(--camp-hero-from)); }
.btn-topo-outline {
    background: #fff; color: var(--camp-brand-primary); border: 1.5px solid var(--camp-brand-primary); border-radius: 10px;
    padding: 10px 24px; font-size: 13px; font-weight: 700; cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px;
}
.btn-topo-outline:hover { background: #fff7ed; }
