/* Phone-first operational layout; the desktop workspace remains available. */
.mobile-nav,.menu-scrim,.drawer-close{display:none}
button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #537e9c;outline-offset:3px}
@media(max-width:850px){
 html{scroll-padding-top:76px;-webkit-text-size-adjust:100%}
 body{font-size:15px}
 .shell{display:block}
 .main{margin-left:0;width:100%;min-width:0}
 .sidebar{position:fixed;inset:0 auto 0 0;width:min(320px,88vw);height:100dvh;z-index:80;transform:translateX(-105%);visibility:hidden;padding-bottom:max(20px,env(safe-area-inset-bottom));transition:transform .18s ease,visibility .18s;box-shadow:10px 0 50px #162d3e20}
 .sidebar.open{transform:translateX(0);visibility:visible}
 .drawer-close{display:flex;align-items:center;justify-content:center;align-self:flex-end;min-width:44px;min-height:44px;background:transparent;border:0;margin:-10px 0 8px auto}
 .menu-open .menu-scrim{display:block;position:fixed;inset:0;z-index:79;background:#13232f77;border:0;width:100%;height:100dvh}
 .shell.menu-open .main,.shell.menu-open .mobile-nav{pointer-events:none}
 body:has(.menu-open){overflow:hidden}
 .sidebar .nav button{min-height:48px;font-size:14px}
 .sidebar .profile button{min-width:44px;min-height:44px}
 .sidebar .side-note{display:none}
 .topbar{position:sticky;top:0;z-index:30;height:64px;padding:0 12px;background:#f7f9fb;border-bottom:1px solid var(--border);gap:8px}
 .breadcrumb{gap:5px;min-width:0}
 .breadcrumb>span:not(.mobile-brand),.breadcrumb>b,.top-right>.avatar,.top-right>.date-label,.top-right>span{display:none}
 .mobile-toggle{display:flex;align-items:center;justify-content:center;width:44px;height:44px;padding:10px;flex-shrink:0}
 .breadcrumb .mobile-brand{display:inline-flex;align-items:center;font-size:18px;font-weight:750;letter-spacing:-.6px;white-space:nowrap;min-height:44px}
 .top-right{gap:0}.language-choice span{display:none}.language-choice select{height:44px;font-size:14px;max-width:95px;padding:8px}
 .mobile-nav{display:flex;position:fixed;bottom:0;left:0;right:0;z-index:40;background:#fff;border-top:1px solid #dce1e5;padding:6px 8px max(6px,env(safe-area-inset-bottom));box-shadow:0 -4px 20px #182e3d08}
 .mobile-nav button{display:flex;flex:1;min-width:0;min-height:58px;gap:5px;align-items:center;justify-content:center;flex-direction:column;background:transparent;border:0;border-radius:12px;color:#666e73;font-family:inherit;font-size:12px;font-weight:600;line-height:1.3;padding:6px 2px}
 .mobile-nav button svg{width:22px;height:22px}.mobile-nav button[aria-current=page]{background:#e8eef2;color:#172e3f}
 .content{padding:22px 16px calc(100px + env(safe-area-inset-bottom));max-width:740px;margin:auto}
 .page-head{display:flex;flex-direction:column;align-items:stretch;gap:16px;margin-bottom:20px}
 .page-head h1{font-size:26px;line-height:1.2;letter-spacing:-.7px}.page-head .eyebrow{font-size:10px;line-height:1.5}.subtitle,.help{font-size:13px;line-height:1.6;color:#5f6970}
 .page-head .actions{width:100%;justify-content:flex-start}.page-head .actions>.btn.primary{flex:1}
 .btn,.text-btn{min-height:48px;display:inline-flex;align-items:center;justify-content:center;font-size:14px;padding:12px 16px;touch-action:manipulation}
 .actions{gap:10px;flex-wrap:wrap}.shop-stop .actions .btn,.field-hero .actions .btn{flex:1}
 .entity-grid,.factory-grid,.map-layout,.bottom-grid{grid-template-columns:1fr}
 .card{min-width:0}.entity-card,.shop-stop,.factory-card{padding:20px;border-radius:16px}.entity-card h2,.shop-heading h2{font-size:19px;line-height:1.4;overflow-wrap:anywhere}
 .field-hero{padding:24px 20px;border-radius:18px}.field-hero h2{font-size:25px;line-height:1.25}.field-hero p{font-size:14px;line-height:1.6}.field-hero .eyebrow{font-size:10px}
 .demo-banner{padding:8px 16px;font-size:11px;align-items:center;gap:12px}.demo-banner>span{display:none}.demo-banner label{width:100%;display:flex;justify-content:space-between;align-items:center}.demo-banner select{min-height:40px;font-size:14px;max-width:180px}
 .table-wrap{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}th,td{font-size:13px}
 .filters{gap:12px;flex-wrap:wrap}.filter-left{width:100%;flex-wrap:wrap;gap:8px}.filter-left select{min-height:44px;font-size:14px;min-width:110px;flex:1}.search{width:100%}
 input:not([type=checkbox]):not([type=range]),select,textarea,.field input,.field select,.field textarea{font-size:16px;min-height:48px}
 input[type=checkbox]{width:24px;height:24px;flex-shrink:0}.field{font-size:14px;gap:9px}.form-grid{grid-template-columns:1fr;gap:20px}.field.full{grid-column:auto}
 dialog{inset:0;margin:0;width:100%;max-width:100%;height:100dvh;max-height:100dvh;border-radius:0;overflow-y:auto;overscroll-behavior:contain;padding-top:env(safe-area-inset-top)}
 body:has(dialog[open]){overflow:hidden}
 .modal-header{position:sticky;top:0;background:#f7f9fb;z-index:3;padding:12px 16px;min-height:68px;gap:12px}.modal-header h2{font-size:20px;line-height:1.3}.modal-header button{min-width:44px;min-height:44px}
 .modal-body{padding:20px 16px calc(16px + env(safe-area-inset-bottom))}.modal-footer{position:sticky;bottom:0;background:#f7f9fb;border-top:1px solid var(--border);padding:14px 0 max(14px,env(safe-area-inset-bottom));z-index:2;gap:10px}.modal-footer .btn.primary{flex:1}.modal-footer .btn{min-height:52px}
 .product-choice{gap:12px;flex-wrap:wrap;padding:20px 0}.product-choice>div:first-child{flex:1;min-width:140px}.product-choice strong{font-size:16px}.quantity-stepper button{width:48px;height:48px}.quantity-stepper input{width:56px}.confirm-slide{min-height:58px}.cash-confirm{font-size:15px;padding:16px;background:#e9eff4;border-radius:12px}
 .login{display:block;min-height:100dvh}.login-story{padding:22px 20px;min-height:0}.login-story>div:not(.brand),.login-foot,.login-art{display:none}.login-story .brand{font-size:25px}.login-panel{padding:28px 20px}.login-form{width:100%;max-width:440px;margin:auto}.login-form h2{font-size:25px}.login-form .btn{width:100%;min-height:50px}.login-extra{font-size:13px;line-height:1.7}
 .reset-page{padding:16px}.reset-page .card{padding:22px 18px}#toast{bottom:calc(88px + env(safe-area-inset-bottom));max-width:calc(100vw - 32px);font-size:14px;z-index:100}
 .backup-list>div,.retailer-history-row{flex-wrap:wrap}.route-stops{padding-left:0}.route-stops li{min-width:0}.route-stops li>div{min-width:0;overflow-wrap:anywhere}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

@media(max-width:850px){#modal-form{display:flex;flex-direction:column;min-height:calc(100dvh - 112px - env(safe-area-inset-top) - env(safe-area-inset-bottom));gap:0}#modal-form>*{flex-shrink:0}#modal-form>.modal-footer{margin-top:auto}#modal-form>.modal-footer:empty{display:none}#modal-form>#form-error{margin-bottom:16px}}
