/* Small-screen layout / Telegram viewport support. Desktop presentation untouched. */
html,body{max-width:100%;min-width:0}
.layout,.layout > main,.layout > aside{min-width:0}
.rx-drawer:not([hidden]){
  min-width:0;max-width:100vw;
  height:100dvh;max-height:100dvh;
  min-height:0;overflow:hidden;
}
.rx-drawer .rx-drawer-content{
  flex:1 1 auto;min-height:0;max-height:100%;
  overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;touch-action:pan-y;
}
.rx-drawer .rx-drawer-head{flex:0 0 auto;min-width:0}
.rx-drawer .rx-drawer-head h3{overflow-wrap:anywhere}
.rx-profile-user,.rx-profile-user > div:last-child{min-width:0}
.rx-profile-user strong,.rx-profile-user small,
.rx-profile-role,.rx-profile-order{overflow-wrap:anywhere;word-break:normal}
.rx-profile-stats>div{min-width:0}
.rx-profile-order>div{flex-wrap:wrap}
.rx-profile-order :is(small,b,span,p){min-width:0;overflow-wrap:anywhere}
@media(max-width:700px){
 .layout{display:block!important;grid-template-columns:minmax(0,1fr)!important}
 .layout > main{width:100%;max-width:100%;min-width:0;padding:16px 12px 80px}
 .layout > aside{position:relative;max-width:100%;height:auto;overflow:visible}
 .layout :is(.card,.grid,.fact,.screen,.formgrid,.reportgrid){min-width:0;max-width:100%}
 .layout .scroll,.layout .wf-table{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
 .top{display:flex;flex-direction:column;gap:12px;align-items:stretch}
 .top > div{min-width:0}
 .rx-top-actions{display:flex;flex-wrap:wrap;gap:8px;min-width:0;width:100%;justify-content:stretch}
 .rx-top-actions .rx-header-action{flex:1 1 0;min-width:0;max-width:none}
 .rx-header-profile #userName{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .rx-drawer:not([hidden]){inset:var(--rx-mobile-offset,0px) 0 auto 0;width:100%;border-left:0;height:var(--rx-mobile-height,100dvh);max-height:var(--rx-mobile-height,100dvh)}
 .rx-drawer .rx-drawer-head{
   padding:calc(14px + env(safe-area-inset-top,0px)) 14px 12px;
   position:relative;z-index:1;
 }
 .rx-drawer .rx-drawer-content{
   padding:14px 14px calc(26px + env(safe-area-inset-bottom,0px));
   overflow-x:hidden;overflow-y:auto;touch-action:pan-y;
 }
 .rx-profile-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .rx-profile-user{padding:13px;gap:10px;align-items:flex-start}
 .rx-profile-user .rx-profile-avatar{width:44px;height:44px;flex:0 0 44px}
 .rx-profile-user strong{display:block;font-size:16px;line-height:1.25}
 .rx-profile-order>div{display:flex;flex-direction:column;align-items:flex-start;gap:4px}
 .rx-profile-order{padding:12px}
 .rx-drawer :is(button,input,select,textarea){font-size:16px}
 .rx-drawer .rx-drawer-close{min-height:44px;min-width:44px;flex-shrink:0}
 .rx-drawer-backdrop:not([hidden]){touch-action:none}
}
@media(max-width:360px){
 .rx-top-actions .rx-header-action{padding:8px;font-size:12px}
 .rx-profile-stats{grid-template-columns:minmax(0,1fr)}
 .layout > main{padding-inline:10px}
}

.rx-proxy-monitor .reportgrid{margin:10px 0 12px}
.rx-proxy-estimate{
  display:inline-block;max-width:100%;padding:5px 9px;
  border:1px solid #536b55;border-radius:8px;
  background:#14261b;color:#bfeeb9;font-size:12px;
  overflow-wrap:anywhere;
}
.rx-proxy-estimate[data-state="ESTIMATED_DUE_WEEK"]{color:#f3dea0;border-color:#90784c;background:#332a19}
.rx-proxy-estimate[data-state="ESTIMATED_DUE_SOON"],
.rx-proxy-estimate[data-state="ESTIMATED_PAST_DUE"]{color:#ffc2aa;border-color:#a65f4b;background:#3a2020}
.rx-proxy-estimate[data-state="DATE_UNKNOWN"]{color:#b6c1c6;border-color:#626870;background:#20272d}
