/* Fleet 1230: phone navigation drawer.
   Root cause: fleet-app-extra.css still turns .side into a 64px bottom bar of
   flat icon buttons at <=720px, but the grouped 1072 sidebar no longer fits
   that bar, and fleet-sidebar-center-1222.css forces .side{position:relative}
   unconditionally. On phones the bar therefore sits at the top of the page as
   an empty 64px strip with overflow:hidden, clipping every menu item.
   Phones now get a hamburger in the top bar that opens the existing sidebar
   as a slide-out drawer. Everything here is scoped to <=720px so desktop and
   tablet layouts are untouched. */

.fleet-mnav-toggle,.fleet-mnav-head,.fleet-mnav-backdrop{display:none}

@media (max-width:720px){
  html body .layout{display:block!important;grid-template-columns:none!important}
  html body .layout>.main{padding-bottom:env(safe-area-inset-bottom,0px)!important;min-width:0!important}

  /* Top bar: hamburger first, never hover-only. */
  html body .layout>.main>.top{
    display:flex!important;align-items:center!important;gap:10px!important;
    padding-left:max(10px,env(safe-area-inset-left,0px))!important;
    padding-right:max(10px,env(safe-area-inset-right,0px))!important;
  }
  html body .top>.fleet-mnav-toggle{
    display:inline-grid;place-items:center;flex:0 0 44px;
    width:44px;height:44px;min-width:44px;min-height:44px;
    margin:0;padding:0;border:1px solid var(--line,#d8e0e6);border-radius:10px;
    background:var(--card,#fff);color:var(--text,#13202b);
    cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation;
  }
  html body .top>.fleet-mnav-toggle svg{width:20px;height:20px;display:block}
  html body .top>.fleet-mnav-toggle:focus-visible{outline:2px solid #ef233c;outline-offset:2px}
  html[data-theme="dark"] body .top>.fleet-mnav-toggle{background:#13202b;border-color:#2c3c48;color:#e6eef4}

  /* The existing sidebar becomes an off-canvas drawer. */
  html body .layout>.side{
    position:fixed!important;top:0!important;bottom:0!important;left:0!important;right:auto!important;
    width:min(320px,86vw)!important;min-width:0!important;max-width:86vw!important;
    height:100vh!important;height:100dvh!important;max-height:none!important;
    display:flex!important;flex-direction:column!important;
    padding:env(safe-area-inset-top,0px) 0 env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px)!important;
    overflow-x:hidden!important;overflow-y:auto!important;
    overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
    z-index:1100!important;
    transform:translateX(-102%)!important;visibility:hidden!important;
    transition:transform .22s ease,visibility 0s linear .22s!important;
    box-shadow:none!important;border-right:1px solid var(--line,#d8e0e6)!important;
  }
  html body.fleet-mnav-open .layout>.side{
    transform:none!important;visibility:visible!important;
    transition:transform .22s ease,visibility 0s!important;
    box-shadow:0 18px 48px rgba(8,18,28,.28)!important;
  }
  @media (prefers-reduced-motion:reduce){html body .layout>.side{transition:none!important}}

  html body .layout>.side>.logo,
  html body .layout>.side>.fleet-side-toggle{display:none!important}

  html body .layout>.side>.fleet-mnav-head{
    display:flex;align-items:center;justify-content:space-between;gap:8px;
    flex:0 0 auto;min-height:56px;padding:6px 8px 6px 18px;
    border-bottom:1px solid var(--line,#e3e9ee);
  }
  html body .fleet-mnav-head b{font-size:13px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75}
  html body .fleet-mnav-close{
    display:grid;place-items:center;width:44px;height:44px;min-width:44px;
    margin:0;padding:0;border:0;border-radius:10px;background:transparent;color:inherit;
    font-size:26px;line-height:1;cursor:pointer;touch-action:manipulation;
  }
  html body .fleet-mnav-close:focus-visible{outline:2px solid #ef233c;outline-offset:2px}

  /* Vertical list with full labels, regardless of the desktop collapsed-rail
     preference or the legacy horizontal bottom-bar rules. */
  html body .layout>.side .nav.fleet-nav-v1072{
    display:block!important;flex:1 0 auto!important;
    width:100%!important;min-width:0!important;height:auto!important;max-height:none!important;
    padding:8px 10px!important;margin:0!important;
    overflow:visible!important;
  }
  html body .layout>.side .nav.fleet-nav-v1072 .fleet-nav-group{
    display:block!important;width:100%!important;height:auto!important;
    margin:2px 0!important;padding:0!important;overflow:visible!important;
  }
  html body .layout>.side .nav.fleet-nav-v1072 .fleet-nav-group>.fleet-nav-group-head,
  html body .layout>.side .nav.fleet-nav-v1072 .fleet-nav-sub button{
    display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:12px!important;
    width:100%!important;min-width:0!important;max-width:none!important;
    height:auto!important;min-height:44px!important;max-height:none!important;
    margin:0!important;padding:0 12px!important;
    text-align:left!important;border-radius:10px!important;
    touch-action:manipulation;
  }
  html body .layout>.side .nav.fleet-nav-v1072 .fleet-nav-sub button{padding-left:22px!important;font-size:14px!important}
  html body .layout>.side .nav.fleet-nav-v1072 .group-label,
  html body .layout>.side .nav.fleet-nav-v1072 .label{
    display:block!important;flex:1 1 auto!important;min-width:0!important;width:auto!important;
    white-space:normal!important;overflow:visible!important;opacity:1!important;font-size:14px!important;
  }
  html body .layout>.side .nav.fleet-nav-v1072 .fleet-nav-group>.fleet-nav-group-head>.group-chevron{
    display:grid!important;place-items:center!important;flex:0 0 44px!important;
    width:44px!important;min-width:44px!important;height:44px!important;margin:0 -12px 0 auto!important;
  }
  html body .layout>.side .nav.fleet-nav-v1072 .fleet-nav-group.open>.fleet-nav-sub{
    max-height:none!important;grid-template-rows:1fr!important;overflow:visible!important;
  }
  html body .layout>.side .nav.fleet-nav-v1072 .fleet-nav-group:not(.open)>.fleet-nav-sub{
    max-height:0!important;grid-template-rows:0fr!important;overflow:hidden!important;
  }
  html body .layout>.side .nav.fleet-nav-v1072 .fleet-nav-sub-inner{overflow:hidden!important;min-height:0!important}

  html body .layout>.side>.fleet-side-build{flex:0 0 auto!important;margin:8px 14px!important;width:auto!important}
  html body .layout>.side>.fleet-side-signout{
    flex:0 0 auto!important;width:auto!important;min-height:44px!important;
    margin:4px 10px 12px!important;justify-content:flex-start!important;
  }
  html body .layout>.side>.fleet-side-signout .label{display:block!important}

  html body>.fleet-mnav-backdrop{
    display:block;position:fixed;inset:0;z-index:1090;
    background:rgba(4,12,18,.42);opacity:0;pointer-events:none;
    transition:opacity .22s ease;
  }
  html body.fleet-mnav-open>.fleet-mnav-backdrop{opacity:1;pointer-events:auto}
  html body.fleet-mnav-open{overflow:hidden!important}

  /* iOS Safari: 100vh includes the collapsing toolbar; prefer dynamic height. */
  @supports (height:100dvh){
    .fleet-embedded-module{height:calc(100dvh - 118px)}
  }
}
