@media(max-width:640px){
 .grid .compact-order>summary{gap:10px;padding:16px}
 .grid .compact-order .compact-top{display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:center;gap:8px;width:100%;min-width:0}
 .grid .compact-top .order-number{flex:1 0 100%;display:flex;align-items:center;gap:8px;min-width:0;max-width:100%;white-space:nowrap;overflow-wrap:normal;word-break:normal;font-size:14px;line-height:1.5}
 .grid .compact-top .copy-order-number,.grid .seller-number .copy-order-number{flex:none;min-width:32px;min-height:32px}
 .grid .compact-top .material-supply-badge,.grid .compact-top .priority-badge,.grid .compact-top .today-plaque,.grid .compact-top .tomorrow-plaque{flex:0 1 auto;max-width:100%;margin:0;line-height:1.4}
 .grid .compact-order .compact-model{grid-column:1/-1;min-width:0;max-width:100%;font-size:20px;line-height:1.3}
 .grid .compact-model:has(.model-visual){display:grid;grid-template-columns:52px minmax(0,1fr);gap:4px 10px;align-items:center}
 .grid .compact-model>.model-visual{grid-column:1;grid-row:1/span 2;width:52px;height:52px;flex:none;align-self:start}
 .grid .compact-model>.model-label{grid-column:2;grid-row:1;justify-self:start;min-width:0;max-width:100%;font-size:19px;line-height:1.3;white-space:normal;overflow-wrap:anywhere;box-sizing:border-box}
 .grid .compact-model>.order-mattress-note{grid-column:2;grid-row:2;display:block!important;font-size:12px!important;font-weight:500!important;line-height:1.5!important;margin:0}
 .grid .compact-order .compact-size{font-size:20px;line-height:1.35}
 .grid .compact-order .compact-client{font-size:17px;line-height:1.4;overflow-wrap:anywhere}
 .grid .compact-order .delivery{max-width:100%;width:fit-content;white-space:normal;line-height:1.45;box-sizing:border-box}
 .grid .compact-order .compact-comment{align-items:flex-start;flex-wrap:nowrap;gap:8px;line-height:1.55}
 .grid .compact-order .compact-comment>.icon{flex:none}
 .grid .compact-order .compact-comment>span{flex:1 1 0;min-width:0}
 .grid .compact-order[open]>summary .compact-comment{display:none!important}
 .grid .operation .op-heading{display:flex;flex-direction:column;align-items:flex-start;gap:5px}
 .grid .operation .op-heading>strong{min-width:0;line-height:1.45;overflow-wrap:anywhere}
 .grid .operation .op-heading>span{white-space:normal;text-align:left;font-size:12px;line-height:1.4}
 .grid .operation-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .grid .operation-actions>.btn{min-width:0;min-height:44px;padding:10px 8px;font-size:12px;line-height:1.35;white-space:normal;justify-content:center}
 .grid .operation-actions>.btn.primary,.grid .operation-actions>.btn:only-child{grid-column:1/-1}
 .grid .worker-specs .spec,.grid .worker-specs .spec>span{min-width:0;overflow-wrap:anywhere}
 .grid .seller-order>summary{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;padding:16px;align-items:start}
 .grid .seller-order .seller-number-group{grid-column:1/-1;grid-row:auto;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;align-items:center;gap:8px;min-width:0;width:100%}
 .grid .seller-number-group>.seller-number{flex:1 0 100%;display:flex;align-items:center;gap:8px;min-width:0;max-width:100%;white-space:nowrap;overflow-wrap:normal;word-break:normal;font-size:14px;line-height:1.5}
 .grid .seller-number-group>.material-supply-badge,.grid .seller-number-group>.today-plaque,.grid .seller-number-group>.tomorrow-plaque{max-width:100%;margin:0;line-height:1.4}
 .grid .seller-order .seller-primary{grid-column:1/-1;grid-row:auto;display:grid;grid-template-columns:52px minmax(0,1fr);gap:4px 10px;min-width:0;align-items:start}
 .grid .seller-primary>.model-visual{grid-column:1;grid-row:1/span 2;width:52px;height:52px;align-self:start}
 .grid .seller-primary>.seller-model{grid-column:2;grid-row:auto;display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-width:0;max-width:100%;font-size:19px;line-height:1.3}
 .grid .seller-model>.model-label{max-width:100%;min-width:0;font-size:19px;line-height:1.3;white-space:normal;overflow-wrap:anywhere;box-sizing:border-box}
 .grid .seller-model>.order-mattress-note{display:block!important;font-size:12px!important;font-weight:500!important;line-height:1.5!important;margin:0}
 .grid .seller-primary>.seller-client{grid-column:2;grid-row:auto;font-size:17px;line-height:1.4;min-width:0;overflow-wrap:anywhere}
 .grid .seller-primary>.seller-received,.grid .seller-primary>.seller-contact,.grid .seller-primary>.seller-buyer{grid-column:1/-1;grid-row:auto;display:block;width:auto;min-width:0;max-width:100%;margin:4px 0 0;font-size:13px;line-height:1.55;white-space:normal;overflow-wrap:anywhere}
 .grid .seller-order .seller-size,.grid .seller-order .seller-stage,.grid .seller-order .seller-meta,.grid .seller-order .seller-expand{grid-column:1/-1;grid-row:auto;min-width:0;max-width:100%}
 .grid .seller-order .seller-size{font-size:20px;line-height:1.35}
 .grid .seller-order .seller-stage{font-size:13px;line-height:1.55;white-space:normal;overflow-wrap:anywhere}
 .grid .seller-order .seller-meta{display:flex;flex-direction:column;align-items:flex-start;gap:8px}
 .grid .seller-order .seller-delivery{max-width:100%;width:fit-content;white-space:normal;line-height:1.45;box-sizing:border-box}
 .grid .seller-order .seller-expand{position:static;justify-self:stretch;text-align:left;font-size:12px;line-height:1.5}
 .grid .seller-order .seller-expand::after{content:'Подробности заказа ↓'}
 .grid .seller-order[open] .seller-expand::after{content:'Свернуть подробности ↑'}
 .grid .inline-production-plan{grid-column:1/-1;display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1.5fr) minmax(0,1fr);gap:8px!important;align-items:center!important;min-width:0;max-width:100%;font-size:13px}
 .grid .inline-production-plan>span{grid-column:1/-1;font-size:13px;line-height:1.55}
 .grid .inline-production-plan>.btn{min-width:0;min-height:44px;padding:8px 5px;font-size:12px;line-height:1.3;gap:3px;justify-content:center;white-space:normal}
 .grid .inline-production-plan>[data-inline-plan-action="earlier"]{grid-column:1;grid-row:3}
 .grid .inline-production-plan>label{grid-column:2;grid-row:3;min-width:0!important;min-height:44px;padding:8px 4px!important;box-sizing:border-box;font-size:12px}
 .grid .inline-production-plan>[data-inline-plan-action="later"]{grid-column:3;grid-row:3}
 .grid .inline-production-plan>[data-inline-plan-action="up"]{grid-column:1;grid-row:4}
 .grid .inline-production-plan>[data-inline-plan-action="down"]{grid-column:3;grid-row:4}
 .grid .inline-production-plan>b{grid-column:2;grid-row:4;text-align:center;font-size:14px!important}
 .grid .inline-production-plan>small{grid-column:1/-1;grid-row:5;font-size:12px;line-height:1.5;text-align:center}
}
