/* Keep the whole operator row truthful; MudBlazor otherwise colors only the icon. */
.cafe-control-on,
.cafe-control-on .mud-list-item-text,
.cafe-control-on .mud-menu-item-icon,
.cafe-control-on .mud-icon-root {
    color: var(--mud-palette-warning) !important;
}

.cafe-control-skeleton {
    min-height: 40px;
}

/* One clipped application frame gives every route the same scroll owner and drawer geometry. */
html:has(.unified-shell), body:has(.unified-shell) { width: 100%; height: 100%; overflow: hidden !important; }
.unified-shell { width: 100%; height: 100dvh; min-height: 0; overflow: hidden !important; background: #05070b; }
.shell-frame { width: 100%; height: 100dvh; overflow: hidden !important; position: relative; color: #f7f7fb; background: #05070b; }
.shell-drawer-container { display: flex; width: 100%; height: 100%; min-height: 0; overflow: hidden !important; }

/* Desktop keeps a full-width persistent tree; compact layouts remove the closed drawer entirely. */
.unified-shell .vscode-sidebar.mud-drawer { position: relative; z-index: 2; height: 100%; flex: 0 0 auto; border-right: 1px solid rgba(155,164,187,.15); background: linear-gradient(180deg,#080a10,#05070b 70%); }
.unified-shell .vscode-sidebar .mud-drawer-content { display: flex; height: 100%; flex-direction: column; overflow: hidden !important; background: transparent; color: #f7f7fb; }
.shell-drawer-header { display: flex; min-height: 70px; align-items: center; justify-content: center; gap: .55em; padding: 0 .45em; border-bottom: 1px solid rgba(155,164,187,.15); }
.shell-drawer-header .mud-icon-button { display: none; flex: 0 0 auto; }
.shell-menu-toggle.mud-icon-button { box-sizing: border-box; width: 46px; height: 46px; min-width: 46px; padding: 3px; border-radius: 10px; background-color: transparent !important; }
.shell-menu-toggle.mud-icon-button:hover, .shell-menu-toggle.mud-icon-button:active, .shell-menu-toggle.mud-icon-button:focus { background-color: transparent !important; }
.shell-menu-toggle.mud-ripple::after { display: none; }
.shell-menu-toggle-visual { display: flex; width: 100%; height: 100%; flex-direction: column; align-items: center; justify-content: center; gap: 5px; color: #fff; }
.shell-menu-toggle-bars { position: relative; display: flex; width: 37px; height: 30px; flex-direction: column; justify-content: space-between; }
.shell-menu-toggle-bars span { display: block; width: 100%; height: 3px; flex: 0 0 3px; border-radius: 999px; background: currentColor; box-shadow: 0 0 9px rgb(228 219 255 / 52%); transition: transform .32s cubic-bezier(.2,.8,.2,1), opacity .2s ease; }
.shell-menu-toggle-label { font-size: .5rem; font-weight: 900; line-height: 1; letter-spacing: .2em; transition: opacity .18s ease, letter-spacing .28s ease; }
.shell-menu-toggle-visual.is-open .shell-menu-toggle-bars { width: 34px; height: 34px; }
.shell-menu-toggle-visual.is-open .shell-menu-toggle-bars span { position: absolute; top: 50%; left: 0; width: 34px; }
.shell-menu-toggle-visual.is-open .shell-menu-toggle-bars span:first-child { transform: translateY(-50%) rotate(45deg); }
.shell-menu-toggle-visual.is-open .shell-menu-toggle-bars span:nth-child(2) { opacity: 0; }
.shell-menu-toggle-visual.is-open .shell-menu-toggle-bars span:last-child { transform: translateY(-50%) rotate(-45deg); }
.shell-menu-toggle-visual.is-open .shell-menu-toggle-label { display: none; }
.shell-brand { overflow: hidden; color: var(--mud-palette-primary); font-size: 16px !important; font-weight: 800; letter-spacing: .08em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.shell-brand-link { color: inherit !important; }
.shell-mobile-menu-bar { display: none; }
.unified-shell .vscode-sidebar .mud-navmenu { padding: .2em 0 1em; scrollbar-color: #383341 #080a10; }
/* Only the outer tree owns a scroll port; the footer stays outside its scrolling area. */
.unified-shell .vscode-sidebar .shell-nav-tree { flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
/* MudNavGroup creates nested menus with scroll containment. Let wheel/touch input reach the outer tree instead. */
.unified-shell .vscode-sidebar .shell-nav-tree .mud-navmenu { flex: none; overflow: visible; overscroll-behavior: auto; }
/* MudBlazor makes expanded collapse wrappers scrollable; keep the tree as the only menu scroll owner. */
.unified-shell .vscode-sidebar .mud-nav-group .mud-collapse-entered .mud-collapse-wrapper { overflow: visible !important; }
.unified-shell .vscode-sidebar .mud-nav-link,
.unified-shell .vscode-sidebar .mud-nav-group > .mud-nav-link { min-height: 58px; align-items: center; color: #c8cad3; }
/* Keep the neon readable without pushing its shadow into the nav scrollport clipping edge. */
.unified-shell .vscode-sidebar .mud-navmenu .mud-nav-link .mud-nav-link-icon,
.unified-shell .vscode-sidebar .mud-navmenu .mud-nav-group > .mud-nav-link .mud-nav-link-icon {
    box-sizing: border-box;
    display: inline-flex;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px;
    flex: 0 0 32px;
    align-items: center;
    justify-content: center;
    margin-inline: 0 .7rem !important;
    overflow: visible;
    font-size: 32px !important;
    line-height: 1;
    filter: drop-shadow(0 0 2px color-mix(in srgb, var(--nav-accent) 82%, white)) drop-shadow(0 0 6px color-mix(in srgb, var(--nav-accent) 78%, #387cff));
    transition: filter .22s ease;
}
.unified-shell .vscode-sidebar .mud-navmenu .mud-nav-link-icon path {
    fill: none !important;
    stroke: currentColor;
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}
.unified-shell .vscode-sidebar .mud-nav-link-expand-icon { color: #cbb5ff; filter: drop-shadow(0 0 4px #925bff) drop-shadow(0 0 9px rgb(38 137 255 / 75%)); }
/* Section accents inherit through submenus; explicit child sections override their parent without painting labels. */
.shell-nav-tree { --nav-accent: #b99aff; }
.shell-nav-tree :is(.nav-link-home, .nav-group-agents, .nav-link-agents) { --nav-accent: #b99aff; }
.shell-nav-tree :is(.nav-link-tournaments, .nav-group-stats, .nav-link-stats, .nav-group-settings, .nav-link-settings) { --nav-accent: #f5ce68; }
.shell-nav-tree :is(.nav-group-cafe, .nav-group-gaming, .nav-link-gaming) { --nav-accent: #59d6ed; }
.shell-nav-tree :is(.nav-link-about, .nav-group-printing, .nav-link-printing, .nav-group-system, .nav-link-system) { --nav-accent: #91b9ee; }
.shell-nav-tree :is(.nav-group-store, .nav-link-store) { --nav-accent: #80d4a0; }
.shell-nav-tree .nav-link-cashout { --nav-accent: #efb574; }
.shell-nav-tree :is(.nav-group-karaoke, .nav-link-karaoke) { --nav-accent: #f38fb9; }
.shell-nav-tree :is(.nav-group-rooms, .nav-link-rooms) { --nav-accent: #7adbc5; }
.shell-nav-tree :is(.nav-group-energy, .nav-link-energy) { --nav-accent: #f5db70; }
.shell-nav-tree :is(.nav-group-rag, .nav-link-rag) { --nav-accent: #d4a0f5; }
.shell-nav-tree :is(.nav-group-cameras, .nav-link-cameras) { --nav-accent: #ee9b9f; }
.shell-nav-tree .nav-group-collab { --nav-accent: #8bcfc1; }
.shell-nav-tree .nav-group-bittensor { --nav-accent: #b4b3f4; }
.unified-shell .vscode-sidebar .mud-nav-link .mud-icon-root { color: var(--nav-accent); }
/* Focus adds a small pulse of light without moving the icon or changing its section hue. */
.unified-shell .vscode-sidebar .mud-nav-link:is(:hover, :focus-visible) .mud-nav-link-icon { filter: drop-shadow(0 0 2px white) drop-shadow(0 0 6px var(--nav-accent)); }
.unified-shell .vscode-sidebar .mud-nav-link:hover { color: #fff; background: #ffffff0c; }
.unified-shell .vscode-sidebar .mud-nav-link.active,
.unified-shell .vscode-sidebar .mud-nav-link.mud-nav-link-active { border-left: 3px solid #711cff; border-radius: 0 !important; color: #b987ff; background: linear-gradient(90deg,#711cff35,#711cff0b); }
.unified-shell .vscode-sidebar .mud-nav-link.active .mud-icon-root,
.unified-shell .vscode-sidebar .mud-nav-link.mud-nav-link-active .mud-icon-root { color: var(--nav-accent); }
.unified-shell .vscode-sidebar .mud-nav-link:is(.active, .mud-nav-link-active) { box-shadow: inset 0 0 24px rgb(115 49 255 / 12%); }
.vscode-sidebar-footer { display: grid; flex: 0 0 auto; grid-template-columns: minmax(0, 1fr) auto; gap: .25em .4em; padding: .4em .5em max(.4em, env(safe-area-inset-bottom)); border-top: 1px solid rgba(155,164,187,.15); background: #080a10; }
.vscode-sidebar-controls { display: flex; min-width: 0; flex: 1 1 auto; grid-column: 1; flex-direction: row-reverse; align-items: center; justify-content: flex-end; gap: .1em; }
.vscode-sidebar-controls .mud-icon-button { width: 32px; height: 32px; min-width: 32px; padding: 4px; }
.vscode-sidebar-controls .mud-icon-button .mud-icon-root { filter: drop-shadow(0 0 1px rgb(164 91 255 / 55%)); }
.vscode-sidebar-controls .mud-avatar { width: 38px; height: 38px; }
/* The avatar menu needs a real focus rectangle; MudMenu's display:contents activator has none. */
.vscode-sidebar-controls .profile-menu-trigger { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; padding: 2px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.vscode-sidebar-controls .profile-menu-trigger:focus-visible { outline: 2px solid var(--cafe-accent-soft, #c69aff); outline-offset: 2px; }
.vscode-sidebar-version { grid-column: 2; grid-row: 2; align-self: center; margin: 0; opacity: .6; padding: 0; font-size: 10px !important; text-align: right; white-space: nowrap; }
.shell-public-footer { display: flex; min-width: 0; grid-column: 1 / -1; align-items: center; justify-content: space-between; gap: .35em; color: #9799a5; }
.shell-public-tagline { overflow: hidden; margin: 0; font-size: .58em; line-height: 1.4; letter-spacing: .08em; text-overflow: ellipsis; white-space: nowrap; }
.shell-public-socials { display: flex; flex: 0 0 auto; align-items: center; gap: .55em; color: #efeff4; }
.shell-public-socials i { filter: drop-shadow(0 0 1px rgb(179 107 255 / 45%)); }

/* The frame is a clipped viewport. Only the route content lane may scroll. */
/* The drawer container is already a flex row; MudMainContent's default drawer offset would count the drawer twice. */
.shell-main.mud-main-content { height: 100%; min-width: 0; min-height: 0; flex: 1 1 auto; margin-left: 0 !important; overflow-x: hidden; overflow-y: hidden !important; overscroll-behavior: contain; padding-top: 0; scrollbar-color: #383341 #080a10; color: var(--mud-palette-text-primary); }
/* The shell is a clipped viewport; route content is the only page-level scroll lane. */
.shell-main .content {
    box-sizing: border-box;
    height: 100%;
    min-width: 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    /* The fixed mobile/tablet menu bar must not cover headings when focus or a route action scrolls content into view. */
    scroll-padding-top: 56px;
    scrollbar-color: #383341 #080a10;
    box-shadow:
    inset 30px 0 30px -30px rgb(0 0 0 / 24%),
    inset -30px 0 30px -30px rgb(0 0 0 / 24%);
    
}
/* 1024px is tablet in practice. Keep it on the compact drawer path so the
menu cannot fall into the desktop layout and disappear off-canvas. */
@media (max-width: 1199.98px) {
    .shell-drawer-header .mud-icon-button { display: inline-flex; }
    /* A closed temporary drawer has no mini class; remove it from flex or it still steals its 240px width. */
    .unified-shell .vscode-sidebar.mud-drawer-temporary.mud-drawer--closed {
        position: absolute;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        flex-basis: 0 !important;
        overflow: hidden !important;
        visibility: hidden;
        border: 0;
    }
    /* Mud's generated close class changes with the drawer variant. Match the
       state prefix too, or a closed tablet drawer keeps stealing a desktop
       column while pretending to be gone. */
    .unified-shell .vscode-sidebar[class*="mud-drawer-close-"] {
        position: absolute;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        flex-basis: 0 !important;
        overflow: hidden !important;
        visibility: hidden;
        border: 0;
    }
    .shell-mobile-menu-bar {
        position: absolute;
        z-index: calc(var(--mud-zindex-appbar, 1300) + 3);
        inset: 10px auto auto 10px;
        display: flex;
        width: min(344px, calc(100vw - 20px));
        height: 68px;
        align-items: center;
        gap: .65em;
        /* MudDrawerContainer offsets every sibling after its mini drawer, including this overlay. */
        margin-left: 0 !important;
        padding-inline: 12px;
        isolation: isolate;
        background: transparent;
        border: 0;
        border-radius: 22px;
        box-shadow: 0 12px 36px rgb(8 8 20 / 30%), 0 0 20px rgb(111 91 255 / 14%);
        pointer-events: none;
        transition: inset .48s cubic-bezier(.2,.8,.2,1), width .48s cubic-bezier(.2,.8,.2,1), height .48s cubic-bezier(.2,.8,.2,1), padding-inline .48s cubic-bezier(.2,.8,.2,1), border-radius .4s ease, box-shadow .4s ease;
    }
    /* The dock becomes a black, edge-to-edge cap before the menu drops out beneath it. */
    .shell-mobile-menu-bar::before { position: absolute; z-index: -1; inset: 0; border: 0; border-radius: inherit; background: linear-gradient(125deg, rgb(255 255 255 / 15%), rgb(174 131 255 / 16%) 45%, rgb(20 25 58 / 68%)); -webkit-backdrop-filter: blur(28px) saturate(160%); backdrop-filter: blur(28px) saturate(160%); content: ''; pointer-events: none; transition: background .35s ease, border-radius .35s ease; }
    .shell-mobile-menu-bar::after { position: absolute; z-index: -1; inset: 0; border-radius: inherit; background: #05070b; content: ''; opacity: 0; pointer-events: none; transition: opacity .4s ease, border-radius .4s ease; }
    .shell-mobile-menu-bar .shell-menu-toggle { width: 48px; height: 48px; min-width: 48px; flex: 0 0 48px; padding: 0; border: 0; border-radius: 0; background: transparent !important; box-shadow: none; pointer-events: auto; }
    .shell-mobile-menu-bar .shell-menu-toggle-visual { gap: 0; }
    .shell-mobile-menu-bar .shell-menu-toggle-label { display: none; }
    .shell-mobile-brand { overflow: hidden; color: #bd9aff; font-size: clamp(14px, 3.8vw, 20px) !important; font-weight: 800; letter-spacing: .12em; text-overflow: ellipsis; text-shadow: 0 0 20px rgb(169 109 255 / 40%); text-transform: uppercase; white-space: nowrap; }
    .shell-mobile-menu-bar.drawer-open { inset: 0 auto auto 0; width: 100vw; height: 88px; padding-inline: 24px; overflow: hidden; border: 0; border-radius: 0; box-shadow: 0 16px 40px rgb(4 5 13 / 34%); }
    .shell-mobile-menu-bar.drawer-open::before { border: 0; border-radius: 0; background: #05070b; }
    .shell-mobile-menu-bar.drawer-open::after { border-radius: 0; opacity: 1; }
    .shell-drawer-header { min-height: 68px; }
    /* Compact drawer overlays the route; MudBlazor's temporary-drawer scrim sits at appbar + 1. */
    .unified-shell .vscode-sidebar.mud-drawer--open {
        position: absolute;
        inset-block: 88px 0;
        width: min(360px, 88vw) !important;
        max-width: 88vw !important;
        height: auto;
        z-index: calc(var(--mud-zindex-appbar, 1300) + 2);
    }
    /* Keep MudBlazor's horizontal drawer motion; animate its contents dropping from the cap. */
    /* Keep the temporary drawer readable while it opens; the scrim already dims the route. */
    .unified-shell .vscode-sidebar.mud-drawer--open .mud-drawer-content { animation: shell-menu-drop .38s cubic-bezier(.2,.8,.2,1) both; background: #05070b; }
    @keyframes shell-menu-drop { from { transform: translateY(-18px); } to { transform: translateY(0); } }
    .unified-shell .vscode-sidebar.mud-drawer--open .shell-drawer-header { display: none; }
    .vscode-sidebar-footer { gap: .2em; padding: .35em .25em; }
    .vscode-sidebar-controls .mud-icon-button { width: 32px; height: 32px; min-width: 32px; }
    .shell-main { width: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .shell-menu-toggle-bars span, .shell-menu-toggle-label, .shell-mobile-menu-bar, .shell-mobile-menu-bar::before, .shell-mobile-menu-bar::after { transition-duration: 0ms !important; }
    .unified-shell .vscode-sidebar.mud-drawer--open .mud-drawer-content { animation: none !important; }
}

/* inlined-from-razor-css: MainLayout.razor.css */
@media (max-width: 600px) {
    .hide-mobile-header-link {
        display: none !important;
    }
}
