@supports (height:100dvh){
  .app{min-height:100dvh}
  .sidebar{height:100dvh}
  @media (max-width:860px){ .chat-wrap{height:calc(100dvh - 96px)} }
  @media (min-width:1100px) and (min-height:700px){
    .app:has(#view.nx-split),.main:has(#view.nx-split),.app:has(#view>.nx-fill:only-child),.main:has(#view>.nx-fill:only-child){height:100dvh}
  }
}
@media (max-width:599.98px){
  html,body{-webkit-text-size-adjust:100%;text-size-adjust:100%}
  body{overscroll-behavior-y:none}
  #view{max-width:100vw;overflow-x:clip}
  input,select,textarea{font-size:16px!important}
  input[type=date],input[type=time],input[type=month]{-webkit-appearance:none;appearance:none;min-height:40px;min-width:0}
  .nx-ftabs{top:0;margin-left:-2px;margin-right:-2px;padding-left:2px;padding-right:2px}
  .nx-ftab{min-height:40px;padding:9px 14px}
  .nx-side.nxm-col{height:auto!important;min-height:0!important}
  .nx-side.nxm-col .nx-pane{display:none!important}
  .nx-side.nxm-col .nx-side-tabs{border-bottom:0;padding-bottom:10px}
  .nx-side.nxm-col .nx-side-tabs button{border-radius:9px;border:1px solid var(--line);margin-bottom:0}
  .nx-side .nx-side-tabs{align-items:center}
  .nxm-side-tg{margin-left:auto;flex:none;min-width:44px;min-height:36px;border-radius:9px;border:1px solid var(--line);background:var(--card);color:var(--muted);font-size:13px;font-weight:800;padding:0 10px}
  .nxm-ztabs{display:flex;gap:6px;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;margin:0 0 10px;padding:2px 0 4px}
  .nxm-ztabs::-webkit-scrollbar{display:none}
  .nxm-zoff{display:none!important}
  body[data-nxws=staff] .g4:has(>.kpi:nth-child(4)),body[data-nxws=kitchen] .g4:has(>.kpi:nth-child(4)){grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:6px}
  body[data-nxws=staff] .g4>.kpi,body[data-nxws=kitchen] .g4>.kpi{padding:8px 6px}
  body[data-nxws=staff] .g4>.kpi .lb,body[data-nxws=kitchen] .g4>.kpi .lb{font-size:11px;line-height:1.2;white-space:normal;word-break:keep-all}
  body[data-nxws=staff] .g4>.kpi .vl,body[data-nxws=kitchen] .g4>.kpi .vl{font-size:17px!important}
  body[data-nxws=staff] .g4>.kpi .icbox,body[data-nxws=kitchen] .g4>.kpi .icbox{display:none}
  body[data-nxws] .grid.g2:has(>.kpi),body[data-nxws] .grid.g3:has(>.kpi){grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px}
  body[data-nxws] .grid.g3:has(>.kpi)>.kpi:nth-child(3):last-child{grid-column:1/-1}
  body[data-nxws=staff] #view .btn,body[data-nxws=kitchen] #view .btn,body[data-nxws=warehouse] #view .btn,body[data-nxws=driver] #view .btn{min-height:44px}
  body[data-nxws=staff] #view .btn.sm,body[data-nxws=staff] #view .btn.xs,body[data-nxws=kitchen] #view .btn.sm,body[data-nxws=kitchen] #view .btn.xs,body[data-nxws=warehouse] #view .btn.sm,body[data-nxws=warehouse] #view .btn.xs,body[data-nxws=driver] #view .btn.sm,body[data-nxws=driver] #view .btn.xs{min-height:38px;padding-left:12px;padding-right:12px}
  body[data-nxws] #view .stat-row input.input{height:40px!important}
  body[data-nxws] #view .stat-row input[type=checkbox]{width:20px;height:20px}
  body[data-nxws=staff] .tcards,body[data-nxws=manager] .tcards{display:grid;grid-template-columns:repeat(auto-fill,minmax(84px,1fr));gap:8px}
  body[data-nxws=staff] .tcard,body[data-nxws=manager] .tcard{width:auto;height:80px}
  body[data-nxws=staff] .tmap,body[data-nxws=manager] .tmap{flex-direction:column}
  body[data-nxws=staff] .tzone,body[data-nxws=manager] .tzone{min-width:0;width:100%;flex:none;padding:10px}
  #rk-send,#sr-send,#ao-send{position:sticky;bottom:calc(10px + env(safe-area-inset-bottom,0px));z-index:4;box-shadow:0 6px 18px rgba(0,0,0,.18)}
  .bell-pop{max-height:calc(100dvh - 80px);overflow-y:auto;-webkit-overflow-scrolling:touch}
}
