/* Width-based mobile workflow only. Desktop and iPad retain their existing UI. */
.mobile-only{display:none!important}
@media(max-width:767px){
 body .view[data-panel=project-detail]{min-width:0}
 /* iOS may zoom focused controls below 16px; retain browser pinch zoom. */
 #login-form input:not([type=checkbox]),body .view[data-panel=project-detail] :is(input:not([type=checkbox]),select,textarea),dialog.u38-dialog :is(input:not([type=checkbox]),select,textarea){font-size:16px!important}
 body .view[data-panel=project-detail] .v3-tabs{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;padding:4px 0;margin:8px 0 12px;width:100%;min-width:0;position:sticky;top:var(--mobile-topbar-offset,0px);background:#f6f6f6;z-index:12}
 body .view[data-panel=project-detail] .v3-tabs>button{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:3px;height:48px!important;min-height:48px!important;width:100%;min-width:0;padding:4px 2px!important;font-size:12px!important;font-weight:500;white-space:nowrap;line-height:1.2;grid-column:auto!important;grid-row:auto!important}
 .v3-tabs svg{width:16px;height:16px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.5}
 body .mobile-only{display:block!important}
 .mobile-section-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 12px;background:var(--ui-head,#eee)}
 .mobile-section-head h3{margin:0;font-size:14px;font-weight:600}
 .mobile-section-head small{font-size:12px;line-height:1.4;text-align:right}
 .mobile-picking,.mobile-loading{border:1px solid #ddd;background:#fff;margin-bottom:12px;min-width:0}
 .mobile-picking-filters,.mobile-material-filters{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;padding:10px}
 .mobile-picking-filters input{grid-column:1/-1}
 .mobile-picking-filters :is(input,select),.mobile-material-filters :is(input,select){min-width:0;width:100%;height:44px!important;padding:8px 30px 8px 10px!important;font-size:16px!important;box-sizing:border-box}
 .mobile-material-filters input{grid-column:1/-1}
 .mobile-pick-row{display:flex!important;align-items:center;justify-content:space-between;gap:10px;width:100%;min-width:0;min-height:64px!important;height:auto!important;border:0!important;border-bottom:1px solid #e8e8e8!important;background:#fff!important;padding:12px!important;text-align:left;white-space:normal!important;color:#333!important;border-radius:0!important;font-size:14px!important}
 .mobile-pick-row:disabled{opacity:1;color:#555!important;cursor:default}
 .mobile-item-copy{min-width:0;display:flex;flex-direction:column;gap:5px;flex:1;overflow-wrap:anywhere}
 .mobile-item-copy .warehouse-material-name{font-size:14px;font-weight:600}
 .mobile-item-copy .warehouse-material-spec,.mobile-item-copy small{font-size:12px;line-height:1.45;color:#666}
 .mobile-count{font-size:14px;font-weight:500;white-space:nowrap}
 body .view[data-panel=project-detail] .u38-columns{display:block!important;grid-template-columns:none!important}
 body .view[data-panel=project-detail] .u38-columns>.u3-pending-materials,
 body .view[data-panel=project-detail] .u38-columns>.u3-destination{display:none!important}
 body .view[data-panel=project-detail] .u38-columns>.u3-actual-destinations{display:block!important;width:100%;min-width:0}
 body .view[data-panel=project-detail] .u38-scroll{max-height:none;overflow:visible}
 body .view[data-panel=project-detail] .u38-actual-group>summary{min-height:44px;padding:8px 10px}
 body .view[data-panel=project-detail] .u38-box-item{white-space:normal;min-width:0;min-height:44px}
 body .view[data-panel=project-detail] #u3-materials-layout{display:block!important;min-width:0}
 body .view[data-panel=project-detail] #u3-materials-layout>.u31-category-panel{display:none!important}
 body .view[data-panel=project-detail] .u31-panel-heading{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0;padding:10px}
 body .view[data-panel=project-detail] .u31-panel-heading h3{font-size:14px;margin:0;min-width:0}
 body .view[data-panel=project-detail] .u31-heading-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px;min-width:0;margin-left:auto}
 body .view[data-panel=project-detail] .u31-heading-actions :is(button,.project-material-actions){width:auto!important;min-width:0!important;flex:0 1 auto}
 body .view[data-panel=project-detail] .u31-heading-actions button{height:34px!important;min-height:34px!important;font-size:12px!important;padding:4px 7px!important}
 body .view[data-panel=project-detail] .u311fix-material-table{display:block!important;width:100%!important;min-width:0!important;border:0;table-layout:auto!important}
 body .view[data-panel=project-detail] .u311fix-material-table :is(thead,colgroup){display:none!important}
 body .view[data-panel=project-detail] .u311fix-material-table tbody{display:flex;flex-direction:column;gap:8px;width:100%}
 body .view[data-panel=project-detail] .u311fix-material-table tr{display:grid!important;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:'category category' 'name quantity' 'spec spec' 'source source' 'actions actions'!important;padding:12px;gap:5px 10px;border-bottom:1px solid #ddd;min-width:0;width:100%;box-sizing:border-box}
 body .view[data-panel=project-detail] .u311fix-material-table tr[hidden]{display:none!important}
 body .view[data-panel=project-detail] .u311fix-material-table td{display:block!important;border:0!important;padding:0!important;min-width:0!important;width:auto!important;max-width:none!important;overflow-wrap:anywhere;font-size:13px!important}
 body .view[data-panel=project-detail] .u311fix-material-table td:before{display:none!important}
 body .view[data-panel=project-detail] .u311fix-material-table td[data-label=分类]{grid-area:category!important;color:#777;font-size:12px!important}
 body .view[data-panel=project-detail] .u311fix-material-table td[data-label=序号]{display:none!important}
 body .view[data-panel=project-detail] .u311fix-material-table td[data-label=物料名称]{grid-area:name!important;font-weight:600}
 body .view[data-panel=project-detail] .u311fix-material-table td[data-label='品牌/规格']{grid-area:spec!important;color:#666}
 body .view[data-panel=project-detail] .u311fix-material-table td[data-label=需求数量]{grid-area:quantity!important;font-weight:600;white-space:nowrap}
 body .view[data-panel=project-detail] .u311fix-material-table td[data-label=操作]{grid-area:actions!important;justify-self:end}
 body .view[data-panel=project-detail] .u311fix-material-table td.mobile-material-stock{grid-area:source!important;color:#666;font-size:12px!important;line-height:1.5}
 body .view[data-panel=project-detail] .u311fix-material-table tr.u3-inline-requirement{display:block!important}
 body .view[data-panel=project-detail] .u3-inline-form{display:flex!important;flex-direction:column;min-width:0}
 .mobile-project-progress{background:#fff;margin-bottom:14px;padding:12px;border:1px solid #ddd}
 .mobile-project-progress h2{margin:0 0 8px;font-size:14px;font-weight:600}
 .mobile-progress-row{display:grid!important;grid-template-columns:minmax(0,1fr) auto 12px;align-items:center;gap:8px;width:100%;height:auto!important;min-height:48px!important;border:0!important;border-bottom:1px solid #eee!important;border-radius:0!important;background:white!important;color:#444!important;padding:10px 0!important;text-align:left;font-size:14px!important;white-space:normal!important}
 .mobile-progress-row small{font-size:12px;color:#666}
 .mobile-forward{font-size:20px;color:#888}
 .mobile-next-step{margin-top:12px;min-height:44px!important;width:100%}
 .mobile-project-information{margin-top:12px;border-top:1px solid #eee}
 .mobile-project-information summary{padding:10px 0;min-height:44px;font-size:13px}
 .mobile-project-information p{display:grid;grid-template-columns:72px minmax(0,1fr);gap:8px;margin:6px 0;overflow-wrap:anywhere;font-size:13px}
 body .view[data-panel=project-detail] .u312-columns{display:block!important}
 body .view[data-panel=project-detail] .u312-columns>.u312-pending{display:none!important}
 .mobile-loading>label,.mobile-loading>.mobile-supplement{margin:10px;width:calc(100% - 20px);box-sizing:border-box}
 .mobile-loading select{min-width:0;max-width:100%;height:44px!important;font-size:16px!important}
 .mobile-loading-row{display:flex;align-items:center;gap:10px;padding:12px;border-top:1px solid #e5e5e5;min-width:0}
 .mobile-loading-row>button{min-width:72px;padding:6px 9px!important;min-height:44px!important;font-size:13px!important;flex-shrink:0}
 .mobile-loading-row details{font-size:12px}
 .mobile-loading-row summary{min-height:44px;display:flex;align-items:center}
 .mobile-loading-row details p{margin:6px 0;overflow-wrap:anywhere}
 body .view[data-panel=project-detail] .u312-actual{width:100%;min-width:0}
 body .view[data-panel=project-detail] .u312-dispatch-controls{display:flex;flex-direction:column;align-items:stretch}
 body .view[data-panel=project-detail] .u312-dispatch-controls select{max-width:100%;font-size:16px!important}
 body .view[data-panel=project-detail] .r316-columns{display:block!important}
 body .view[data-panel=project-detail] .r316-workspace:not(.mobile-return-batch):not(.mobile-return-followup) .r316-confirm{display:none!important}
 .r316-workspace .r3161-list-head{display:none!important}
 .r316-workspace .r316-material-list{min-height:0;max-height:none;overflow:visible}
 .r316-material-list>.empty-state{min-height:112px;padding:24px 12px}
 .r316-workspace .r316-material-row{display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:6px 10px;min-width:0;padding:12px!important;height:auto!important;min-height:74px!important;text-align:left;font-size:14px!important}
 .r316-workspace .r316-material-copy{min-width:0;grid-column:1;grid-row:1}
 .r316-workspace .r316-material-location{grid-column:1;grid-row:2}
 .mobile-return-flow{color:#777;font-size:12px;line-height:1.5}
 .r316-material-copy .warehouse-material-name{font-size:14px!important}
 .r316-material-copy .warehouse-material-spec{font-size:12px!important}
 .r316-workspace .r316-right{margin-top:12px;min-width:0}
 dialog.mobile-operation-panel,dialog.r3163-single-dialog{width:calc(100% - 16px)!important;max-width:600px!important;max-height:calc(var(--mobile-visible-height,100dvh) - 16px)!important;box-sizing:border-box;margin:8px auto calc(8px + env(safe-area-inset-bottom));inset:auto 0 var(--mobile-keyboard-offset,0px);padding:0!important;border:1px solid #d5d5d5;border-radius:12px;background:#fff;overflow:auto;overscroll-behavior:contain}
 .mobile-operation-form{display:flex;flex-direction:column;min-width:0;margin:0}
 .mobile-operation-panel .confirm-dialog-head{position:sticky;top:0;background:#fff;z-index:2;padding:10px 14px;border-bottom:1px solid #eee;min-height:48px;display:flex;align-items:center;justify-content:space-between}
 .mobile-operation-panel .confirm-dialog-head h2{font-size:15px;line-height:1.5;margin:0}
 .mobile-operation-panel .icon-button{width:44px!important;height:44px!important;min-height:44px!important;background:transparent!important;border:0!important;color:#666;font-size:23px}
 .mobile-operation-body{display:flex;flex-direction:column;gap:12px;padding:14px;min-width:0}
 .mobile-operation-body :is(label,select,input){min-width:0;max-width:100%;box-sizing:border-box}
 .mobile-operation-body :is(input:not([type=checkbox]),select),.r3163-single-dialog :is(input:not([type=checkbox]),select){height:44px!important;font-size:16px!important;line-height:normal!important;padding:8px 30px 8px 10px!important}
 .mobile-operation-body label{display:flex;flex-direction:column;gap:6px;font-size:13px}
 .mobile-operation-body .mobile-device-identities label{flex-direction:row;align-items:center;min-height:44px;gap:10px}
 .mobile-device-identities{min-width:0;border:1px solid #ddd;padding:8px}
 .mobile-quantity-stepper{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:6px}
 .mobile-quantity-stepper button{width:44px;min-width:44px;min-height:44px!important;padding:6px!important}
 .mobile-quantity-stepper input{width:100%;text-align:center;padding:8px!important}
 .mobile-operation-error{padding:0 14px;margin:0;overflow-wrap:anywhere}
 .mobile-operation-actions{position:sticky;bottom:0;background:#fff;border-top:1px solid #eee;display:flex!important;flex-wrap:wrap;justify-content:flex-end;gap:8px;padding:10px 14px calc(10px + env(safe-area-inset-bottom))}
 .mobile-operation-actions button{min-height:44px!important;font-size:13px!important;padding:8px 12px!important}
 .r3163-single-dialog .r3163-dialog-head{padding:12px;min-height:44px}
 .r3163-single-dialog .r3163-dialog-body{padding:12px;min-width:0}
 .r3163-single-dialog .r316-actions{position:sticky;bottom:0;background:#fff;min-height:44px;padding:8px 0}
 .r3163-single-dialog .r316-actions button{min-height:44px!important;font-size:13px!important}
 .r3163-single-dialog .r316-quantity input{max-width:100%!important;width:90px!important}
 .mobile-return-remaining{height:44px!important;min-height:44px!important;font-size:13px!important}
}
