/* =====================================================================
   DESKTOP ONLY (screen width >= 1024px): left sidebar navigation.
   Everything that changes the layout lives inside the media query below,
   so phones / tablets (< 1024px) are not touched at all: bottom nav, top
   header, Home, Map, Bookings ... stay exactly as they were.
   Note: the app runs with body{zoom:.8}, so px values here use the same
   coordinate system as the rest of styles.css (sidebar 260px, content 1200px).
   ===================================================================== */
#dsb{display:none}

@media (min-width:1024px){

  /* ---------- no horizontal scroll ---------- */
  html{overflow-x:hidden}

  /* ---------- left sidebar ---------- */
  #dsb{display:flex;flex-direction:column;position:fixed;top:0;bottom:0;left:0;width:260px;z-index:40;
    background:linear-gradient(180deg,#0E3B2E 0%,#0a2c22 100%);color:#fff;border-right:1px solid rgba(255,255,255,.08);
    box-shadow:6px 0 24px rgba(0,0,0,.18)}
  #dsb *{box-sizing:border-box}
  #dsb .dsb-brand{display:flex;align-items:center;gap:12px;padding:22px 18px 18px;color:#fff;font-weight:800;font-size:16px;line-height:1.2;letter-spacing:-.2px}
  #dsb .dsb-lg{flex:none;width:40px;height:40px;border-radius:12px;background:var(--y,#C6F24E);display:grid;place-items:center;font-size:22px;overflow:hidden;font-style:normal}
  #dsb .dsb-lg img{width:100%;height:100%;object-fit:cover;border-radius:inherit}
  #dsb .dsb-menu{flex:1;min-height:0;overflow-y:auto;padding:6px 12px;display:flex;flex-direction:column;gap:4px}
  #dsb .dsb-it{position:relative;display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:14px;color:rgba(255,255,255,.88);font-weight:700;font-size:15px;transition:background .15s,color .15s}
  #dsb .dsb-it:hover{background:rgba(255,255,255,.1);color:#fff}
  #dsb .dsb-it.on{background:#fff;color:#0E3B2E}
  #dsb .dsb-ic{flex:none;width:26px;text-align:center;font-size:19px;line-height:1}
  #dsb .dsb-tx{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  #dsb .dsb-bd{flex:none;min-width:20px;height:20px;padding:0 6px;border-radius:10px;background:#FF2D2D;color:#fff;font-size:11px;font-weight:800;line-height:20px;text-align:center}
  #dsb .dsb-dot{flex:none;width:10px;height:10px;border-radius:50%;background:#FF2D2D}
  #dsb .dsb-foot{flex:none;display:flex;align-items:center;gap:8px;min-height:74px;padding:16px 14px;border-top:1px solid rgba(255,255,255,.12)}
  #dsb .dsb-hi{flex:1;min-width:0;color:#fff;font-weight:800;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  #dsb .dsb-hi:hover{color:var(--y,#C6F24E)}
  #dsb .dsb-sp{flex:none;width:42px;height:42px;border-radius:50%;background:rgba(255,255,255,.12);color:#fff;font-size:20px;line-height:1;display:flex;align-items:center;justify-content:center;cursor:pointer}
  #dsb .dsb-sp:hover{background:rgba(255,255,255,.2)}
  #dsb .dsb-bs{flex:none;width:42px;height:42px}

  /* ---------- bottom nav + old top bar are replaced by the sidebar ---------- */
  html body #tabs:not(#dsbx){display:none!important}

  /* ---------- the existing Bell sits in the sidebar footer (same element, same logic) ---------- */
  html body #ntw:not(.owner-bell-only):not(#dsbx){position:fixed!important;left:204px;bottom:16px;margin:0!important;display:flex!important;z-index:45}
  html body #ntw:not(.owner-bell-only):not(#dsbx) #ntbell{background:rgba(255,255,255,.12);color:var(--y,#C6F24E);box-shadow:none;width:42px;height:42px}
  html body #ntw:not(.owner-bell-only):not(#dsbx) #ntbell:hover{background:rgba(255,255,255,.2)}
  html body:not(.owner-mode) #ntpanel:not(#dsbx){top:auto;right:auto;left:272px;bottom:12px;max-height:72vh}

  /* ---------- top header (Hi, name + speaker + bell) is already in the sidebar: no duplicate ---------- */
  html body #app>.hero .logo{font-size:0;line-height:0;gap:0;height:0;min-height:0;margin:0;padding:0;overflow:visible}
  html body #app>.hero .logo>i,
  html body #app>.hero .logo>.lb,
  html body #app>.hero .logo>#sfxbtn{display:none!important}
  html body #app>.hero .wlc{margin-top:0}

  /* ---------- main content: right of the sidebar, max 1200px, centered ---------- */
  html body{margin:0 0 0 260px;max-width:none;width:auto}
  html body #app{padding-top:32px}
  html body.aup #app{padding-top:0}
  html body.mp #app{padding-top:0}

  /* Home (body.hm keeps its own 600px / 16px-inset phone rules, so reset them on desktop only) */
  html body.hm{max-width:none;width:auto}
  html body.hm #app{max-width:1200px;margin-left:auto;margin-right:auto;padding-left:28px;padding-right:28px}
  html body.hm #app>*:not(.hero):not(#list){margin-left:0!important;margin-right:0!important;max-width:100%}
  html body.hm .thint{margin-left:0;margin-right:0}

  /* Home: Open Play cards side by side (2 columns) */
  html body.hm #app>.pphome{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:20px;align-items:start}
  html body.hm #app>.pphome>*{grid-column:1/-1}
  html body.hm #app>.pphome>.bk{grid-column:auto}

  /* ---------- Map: sidebar left, map fills the right side ---------- */
  html body.mp #app{max-width:none;margin:0}
  #map{height:125vh;height:125dvh}
  html body .mt{top:16px;left:calc(50% + 130px)}
  html body .mb{left:calc(50% + 130px)}

  /* ---------- court / booking pages: sticky card no longer sits under a top bar ---------- */
  .cw .cta{top:24px}

  /* ---------- fixed bars + toast: centered in the content area, never under the sidebar ---------- */
  .cta,.tcta,.dmbar,#toast{left:calc(50% + 130px)}
}
