/* ============================================================
   sales/css/rail.css — bridges the ported Sales pages' app.css
   layout (.admin-main offset by --sidebar-w) to the CXNav rail
   (.app-sidebar). app.css supplies the tokens, fonts, and the
   240px content offset; this just lifts the rail above the
   admin-bg layer and keeps the offset in sync when collapsed.
   ============================================================ */

.app-sidebar a, .app-switcher-menu a { text-decoration: none; }

/* CRITICAL: keep the rail FIXED at desktop.
   app.css's `body.admin-bg > *:not(.admin-sidebar)` rule (specificity 0,2,1)
   matches the CXNav rail (it carries .app-sidebar, not .admin-sidebar) and would
   demote it to position:relative — dropping it into flow as a 100vh block that
   pushes .admin-main below the fold (content invisible at desktop, fine at
   mobile where nav.css's top-bar layout takes over). This re-asserts fixed with
   matching specificity, loaded after app.css so it wins. Scoped to desktop so
   nav.css's mobile top-bar still applies ≤860px. Width left to nav.css (so the
   collapse to the 56px mini-rail still works). */
@media (min-width: 861px) {
    body.admin-bg > .app-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 150;
    }
}

/* When the rail collapses to the 56px mini-rail, follow with the content. */
body.nav-collapsed .admin-main { margin-left: var(--sidebar-rail, 56px); }

@media (max-width: 860px) {
    .admin-main { margin-left: 0; }
}
