/* GFLEX Stage 037 — compact mobile presentation, Stage 036 desktop unchanged.
   Never hides a workflow without a visible toggle. No changes to backend or auth. */
.gflexMobileActions,.gflexShelvesToggle,.gflexAgeToggle {display:none;}
@media(max-width:760px){
  /* Header consumes one compact strip instead of three stacked banners. */
  #appRoot .header{position:relative!important;min-height:0!important;}
  #appRoot .headerShell{
    min-height:0!important;padding:7px 10px 6px!important;
    gap:5px!important;display:grid!important;grid-template-columns:92px minmax(0,1fr)!important;
    align-items:center!important;
  }
  #appRoot .brandArea{min-width:0!important;gap:0!important;margin:0!important;}
  #appRoot .brandLogoImage{height:42px!important;width:90px!important;object-fit:contain!important;}
  #appRoot .brandTextBlock{display:none!important;}
  #appRoot .headerTools{min-width:0!important;max-width:none!important;gap:4px!important;align-items:stretch!important;}
  #appRoot .userBar{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:5px!important;flex-wrap:nowrap!important;margin:0!important;min-width:0!important;}
  #appRoot .branchPill,#appRoot .branchSelect{
    min-width:0!important;max-width:165px!important;min-height:36px!important;
    font-size:11px!important;padding:5px 7px!important;
    white-space:nowrap!important;text-overflow:ellipsis!important;overflow:hidden!important;
    border-radius:9px!important;
  }
  #appRoot .userPill{display:none!important;}
  #appRoot .logoutBtn{min-width:0!important;min-height:36px!important;padding:6px 8px!important;font-size:10px!important;border-radius:9px!important;}
  #appRoot .systemLine{min-width:0!important;gap:5px!important;margin:0!important;display:flex!important;justify-content:flex-end!important;align-items:center!important;}
  #appRoot .testBanner{min-height:0!important;padding:2px 6px!important;border-radius:7px!important;margin:0!important;max-width:100%!important;gap:3px!important;line-height:1.15!important;}
  #appRoot .testBanner .title{font-size:10px!important;}
  #appRoot .testBanner .sub{display:none!important;}
  #appRoot .testVersion{font-size:9px!important;line-height:1.2!important;margin:0!important;}
  #appRoot .sync{display:none!important;}
  #appRoot .testVersion::after{content:" · M 037"!important;}
  #appRoot .container{width:calc(100% - 14px)!important;margin:6px auto!important;padding:0!important;gap:7px!important;}
  /* Navigation remains accessible: never display:none unless our dedicated toggle exists. */
  .gflexMobileActions{
    order:0;display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr));
    gap:3px;margin:0 0 1px;padding:4px;
    background:#0d2c53;border:1px solid #365474;border-radius:12px;
  }
  .gflexMobileActions button{
    display:flex;flex-direction:column;align-items:center;justify-content:center;
    min-width:0;min-height:46px;padding:4px 2px;border:0;border-radius:8px;
    font-size:10px;font-weight:850;color:#f3f7ff;background:transparent;cursor:pointer;
  }
  .gflexMobileActions button .gflexMobileEmoji{font-size:17px;line-height:21px;}
  .gflexMobileActions button[aria-expanded="true"],.gflexMobileActions button:focus-visible{background:#235ca5;outline:1px solid #73a9ff;}
  html.gflex-mobile-enhanced .navGroups{display:none!important;}
  html.gflex-mobile-enhanced.gflex-mobile-menu-open .navGroups{
    display:block!important;order:1!important;margin:0!important;
    max-height:67vh!important;overflow:auto!important;
  }
  #warehouse .warehouseTop{
    min-height:0!important;padding:9px 11px!important;margin:0 0 7px!important;
    border-radius:12px!important;gap:7px!important;flex-wrap:nowrap!important;
  }
  #warehouse .warehouseTop h2,#warehouse .warehouseTop .pageTitle{font-size:17px!important;line-height:1.2!important;}
  #warehouse .warehouseTop .pageTitleIcon{width:30px!important;height:30px!important;}
  #warehouse .warehouseTop .mini{display:none!important;}
  #warehouse #warehouseRefresh{margin:0!important;padding:8px!important;min-height:34px!important;font-size:11px!important;}
  #warehouse #officeIssueWorkflow{gap:7px!important;margin:0 0 7px!important;}
  #warehouse #officePreparePanel,#warehouse #officeReadyBoard{
    padding:10px!important;border-radius:12px!important;
    box-shadow:0 2px 10px rgba(16,62,120,.05)!important;
  }
  #warehouse .officeIssueSectionHead{margin-bottom:7px!important;align-items:center!important;gap:6px!important;flex-wrap:wrap;}
  #warehouse .officeIssueSectionHead h3{font-size:15px!important;line-height:1.25!important;}
  #warehouse .officeIssueSectionHead .mini{display:none!important;}
  #warehouse .officePrepareGrid{gap:5px!important;}
  #warehouse .officePrepareGrid input{
    height:40px!important;min-height:40px!important;padding:6px 11px!important;
    border-radius:9px!important;font-size:16px!important;
  }
  #warehouse #officePrepareBtn{min-height:44px!important;font-size:14px!important;padding:8px!important;margin:1px 0!important;}
  #warehouse #officePreparePanel > .mini{display:none!important;}
  #warehouse .officeReadyTools{gap:4px!important;flex-wrap:wrap!important;}
  #warehouse .officeReadyTools .refreshBtn{padding:6px!important;font-size:10px!important;min-height:31px!important;}
  #warehouse #officeReadyList{
    max-height:204px!important;min-height:0!important;overflow-y:auto!important;
    -webkit-overflow-scrolling:touch;scrollbar-width:thin;
    border-radius:9px!important;gap:5px!important;
  }
  #warehouse .officeReadyRow{padding:7px 8px!important;border-radius:9px!important;gap:4px!important;min-height:61px!important;}
  #warehouse .officeReadyTracking{font-size:13px!important;}
  #warehouse .officeReadyRecipient{font-size:12px!important;}
  #warehouse .officeReadyMeta,#warehouse .officeReadyNote{font-size:10px!important;}
  #warehouse .officeReadyShelf{min-width:47px!important;padding:6px!important;font-size:11px!important;}
  #warehouse .officeReadyCancel{min-height:33px!important;}
  #warehouse .officeReadyEmpty{min-height:46px!important;padding:9px!important;}
  #warehouse #officeInsideWarehouse{
    margin:0 0 7px!important;padding:9px 10px!important;border-radius:12px!important;
  }
  #warehouse .warehouseOfficeHead h3{font-size:14px!important;}
  #warehouse .warehouseOfficeHead .mini{display:none!important;}
  #warehouse #officeInsideWarehouse label{display:none!important;}
  #warehouse .warehouseOfficeGrid{grid-template-columns:minmax(0,1fr) auto!important;gap:6px!important;align-items:center!important;}
  #warehouse #officeCode{min-height:42px!important;font-size:16px!important;padding:6px 10px!important;}
  #warehouse #officeQuickFocusBtn{min-height:42px!important;width:auto!important;padding:8px 12px!important;white-space:nowrap!important;font-size:12px!important;}
  #warehouse .warehouseMainRow{gap:7px!important;}
  #warehouse .warehouseSearchPanel{gap:6px!important;padding:9px 10px!important;border-radius:12px!important;}
  #warehouse .warehouseSearchPanel h3{font-size:14px!important;}
  #warehouse .warehouseSearchPanel > .mini{display:none!important;}
  #warehouse #warehouseSearchCode{grid-row:2!important;min-height:42px!important;font-size:16px!important;}
  #warehouse #warehouseSearchBtn{grid-row:2!important;min-height:42px!important;padding:8px 10px!important;font-size:12px!important;}
  #warehouse .warehouseSearchPanel > .result{grid-row:3!important;}
  #warehouse .warehouseSearchPanel .metricCard.total{grid-row:4!important;margin:0!important;padding:5px 8px!important;min-height:36px!important;}
  #warehouse .warehouseSearchPanel .metricValue{font-size:19px!important;}
  #warehouse .warehouseShelves{padding:9px 10px!important;border-radius:12px!important;}
  #warehouse .warehouseShelves::before{font-size:14px!important;margin:0 0 7px!important;}
  #warehouse #shelfGrid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:4px!important;}
  #warehouse .shelfBtn{min-height:45px!important;padding:6px!important;gap:3px!important;border-radius:8px!important;}
  #warehouse .shelfName{font-size:12px!important;}
  #warehouse .shelfCount{font-size:11px!important;min-width:20px!important;}
  #warehouse .shelfMeta{font-size:9px!important;line-height:1.1!important;}
  .gflexShelvesToggle,.gflexAgeToggle{
    display:block;min-height:38px;width:100%;border-radius:9px;
    background:#eef5ff;color:#1a528e;border:1px solid #cde0f5;
    margin:8px 0 1px;font-weight:900;font-size:12px;cursor:pointer;
  }
  html.gflex-mobile-enhanced:not(.gflex-shelves-expanded) #warehouse #shelfGrid > .shelfBtn:nth-child(n+9){display:none!important;}
  /* The aging rail is not removed; expand to inspect all existing data and exports. */
  body:has(#warehouse.panel.active) .ageRail{margin:0 0 8px!important;max-height:none!important;border-radius:12px!important;}
  html.gflex-mobile-enhanced:not(.gflex-mobile-aging-open) body:has(#warehouse.panel.active) .ageRail .ageArea{display:none!important;}
  body:has(#warehouse.panel.active) .ageRail .ageArea{padding:7px!important;}
  .gflexAgeToggle{background:#243d5d;color:#fff;border-color:#536b88;margin:0;}
  html.gflex-mobile-enhanced .ageRail .gflexAgeToggle{display:block!important;}
  #appRoot .ageRail .ageSection{margin-top:6px!important;}
  #warehouse .dhlZone,#warehouse .expectedOps,#warehouse .routingArea{margin-top:8px!important;}
}
@media(max-width:360px){
  #appRoot .headerShell{grid-template-columns:78px minmax(0,1fr)!important;}
  #appRoot .brandLogoImage{width:76px!important;}
  #appRoot .branchPill,#appRoot .branchSelect{max-width:140px!important;}
  .gflexMobileActions button{font-size:9px!important;}
  #warehouse #shelfGrid{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
}
