/* Maurya OS – Persistent left sidebar on laptop+ widths.
   Mobile (<1024px) is untouched: topbar + hamburger drawer + bottom tab bar
   keep their existing behavior. At >=1024px the drawer (built by nav.js)
   is pinned to the left edge, the hamburger / overlay / bottom tab bar are
   hidden, and the main page content is shifted right to make room. */

@media (min-width: 1024px) {

  /* --- TOPBAR: hide horizontal nav links + hamburger + theme toggle ---- */
  /* (.tb-nav is already display:none via an inline style on every page,
     but we re-assert here for safety.) */
  .topbar .tb-nav { display: none !important; }
  .topbar .tb-menu-btn { display: none !important; }

  /* Make room so the brand and right-side auth chip clear the sidebar. */
  .topbar { padding-left: 276px !important; }

  /* --- DRAWER: pin to the left edge, always open, no transition ------- */
  .nav-drawer {
    right: auto !important;
    left: 0 !important;
    top: 0 !important;
    width: 260px !important;
    height: 100vh !important;
    transform: none !important;
    transition: none !important;
    box-shadow: 1px 0 8px rgba(0, 0, 0, .06) !important;
    border-right: 1px solid var(--th-drw-border, #e2e8f0) !important;
    /* Keep z-index above any page-level topbar. Some older pages
       (/leases is one example) set their own .topbar to z-index:200,
       which previously covered the sidebar visually. Bumping to 9500
       puts the sidebar over any reasonable page-level topbar while
       still leaving headroom for true modals (Wave 1 reference modals
       use z-index 9999). Topbar's content shifts right via the
       padding-left:276px rule above, so its empty left strip is
       what the sidebar sits over — no visual overlap with topbar
       content. */
    z-index: 9500 !important;
    display: flex !important;
  }
  .nav-drawer.open {
    /* nav.js toggles .open on click; on desktop we ignore the toggle and
       keep the same fixed-left layout. The shadow override above already
       supersedes the .open drop-shadow. */
    right: auto !important;
    left: 0 !important;
  }

  /* Close (X) button is meaningless when the sidebar is persistent. */
  .nav-drawer .nd-x { display: none !important; }

  /* Overlay would dim the page if drawer.open ever fired — kill it. */
  .nav-overlay { display: none !important; }

  /* --- BOTTOM TAB BAR: hidden on desktop ------------------------------ */
  .btm-nav { display: none !important; }

  /* --- BODY: shift content right and reclaim the bottom-bar padding --- */
  body {
    padding-left: 260px !important;
    padding-bottom: 0 !important;
  }

  /* Topbar is sticky inside the shifted body; keep it spanning the
     remaining width (no extra work needed — sticky already does that). */
}
