/* 移动端优化（钉钉 H5 微应用）— P0：顶栏/抽屉导航 + 表格适配 @2026-08-26 */
/* 桌面端（>800px）不加载以下任何规则；以下元素桌面端一律隐藏 */
.mobile-menu-btn,.mobile-mask,.mobile-drawer{display:none}
@media(max-width:800px){
  /* ===== 顶栏（替代原左侧边栏）===== */
  .shell{grid-template-columns:1fr}
  aside{position:fixed;top:0;left:0;right:0;height:56px;padding:0 12px;flex-direction:row;align-items:center;gap:10px;border-right:0;border-bottom:1px solid #e5e7eb;z-index:200}
  aside .brand{width:auto;height:30px;margin:0}
  aside .side-user{padding:0;background:none;border-radius:0;margin:0;font-size:14px}
  aside .side-user small{display:none}
  aside nav{display:none}
  aside .logout{display:none}
  .mobile-menu-btn{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;flex:none;margin-left:auto;border:0;border-radius:8px;background:#e8edf5;color:#344054;font-size:20px;line-height:1;cursor:pointer}
  .content{padding:70px 14px 92px;max-width:100%}
  header h1{font-size:20px;margin:0}
  .eyebrow{display:none}
  /* ===== 左抽屉导航 ===== */
  .mobile-mask{display:block;position:fixed;inset:0;background:rgba(16,24,40,.45);z-index:300;opacity:0;visibility:hidden;transition:opacity .22s}
  .mobile-mask.show{opacity:1;visibility:visible}
  .mobile-drawer{position:fixed;top:0;left:0;bottom:0;width:min(78vw,300px);z-index:310;display:flex;flex-direction:column;padding:20px 14px 16px;background:#fff;transform:translateX(-100%);transition:transform .22s;overflow:auto}
  .mobile-drawer.open{transform:translateX(0)}
  body.mobile-menu-open{overflow:hidden}
  .mobile-drawer-user{font-weight:700;font-size:15px;padding:12px;border-radius:8px;background:#e8edf5;margin-bottom:12px}
  .mobile-drawer-user small{display:block;color:#667085;font-weight:400;margin-top:4px;font-size:12px}
  .mobile-nav-btn{display:block;width:100%;min-height:48px;border:0;background:none;text-align:left;padding:14px 12px;border-radius:8px;color:#475467;font-size:15px;margin:2px 0;cursor:pointer}
  .mobile-nav-btn.active{background:#dfe8f8;color:#0b57b7;font-weight:700}
  .mobile-drawer .mobile-logout{margin-top:auto;min-height:48px;border:0;background:none;color:#b42318;text-align:left;padding:14px 12px;font-size:15px;cursor:pointer}
  /* ===== 触控尺寸 ===== */
  .primary,.ghost,.danger{min-height:44px}
  .toolbar button,.toolbar input,.toolbar select{min-height:44px}
  .pager button{min-height:44px}
  .mz-dialog footer button{min-height:44px}
  /* ===== 表格横向滚动兜底（人员/权限矩阵/统计等）===== */
  .table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%}
  .dept-users,.admin-result,.stats-block{overflow-x:auto}
  .dept-user-table{min-width:680px}
  .perm-table{min-width:900px}
  /* ===== 零件清单：前两列（序号+图号名称）固定 + 触控行高 ===== */
  .excel-table-wrap{overflow-x:auto}
  .excel-table th:nth-child(-n+2),.excel-table td:nth-child(-n+2){position:sticky;background:#fff;z-index:2}
  .excel-table th:nth-child(1),.excel-table td:nth-child(1){left:0;min-width:52px}
  .excel-table th:nth-child(2),.excel-table td:nth-child(2){left:52px}
  .excel-table thead th{z-index:3}
  .excel-table td,.excel-table th{padding:10px 12px}
  .excel-table td input{min-height:38px}
  /* ===== P1：订单详情纵向化 ===== */
  .detail-heading{flex-direction:column;align-items:flex-start;gap:6px}
  .detail-heading h2{font-size:19px;line-height:1.35;word-break:break-word}
  .detail-stage{padding:18px 16px}
  .detail-stage strong{font-size:18px}
  .detail-action{min-height:46px;padding:13px 16px;font-size:15px}
  .detail-facts{grid-template-columns:1fr}
  .detail-facts > div:nth-child(-n+2){border-bottom:0}
  .detail-facts dd,.detail-fact-value{font-size:20px}
  .attachment-list li{grid-template-columns:1fr auto;gap:8px}
  .attachment-list a,.order-detail .attachment-list a{display:inline-block;padding:8px 10px}
  .attachment-append label{min-height:44px;padding:0 14px}
  /* ===== P1：工序卡片重排 ===== */
  .machining-item{padding:14px 12px;grid-template-columns:22px 1fr;gap:8px}
  .item-check input{width:20px;height:20px}
  .item-title{flex-wrap:wrap;gap:8px}
  .item-title h4{font-size:15px;flex-basis:100%}
  .machining-item .state-chip{font-size:12px;padding:5px 10px}
  .machining-item .part-responsible{margin-left:0}
  .operation-list li{display:block;background:#fafbfc;border:1px solid #eef1f5;border-radius:8px;padding:12px;margin:8px 0}
  .operation-list li > span{font-weight:600;font-size:14px}
  .operation-list small{display:block;margin-top:6px;line-height:1.6}
  .op-tools{margin-top:10px;display:flex;flex-wrap:wrap;gap:6px}
  .op-tools .link-button{min-height:40px;padding:8px 12px;border:1px solid #d0d5dd;border-radius:6px;background:#fff}
  .link-button{min-height:40px;padding:8px 12px}
  .item-tools{gap:8px}
  .machining-downloads{flex-direction:row;flex-wrap:wrap;justify-content:flex-start}
  .machining-downloads button,.route-buttons button{min-height:44px;padding:10px 14px}
  .excel-toolbar .excel-upload{min-height:44px;display:inline-flex;align-items:center;padding:0 14px}
  .file-chip{padding:8px 10px;font-size:13px}
  .item-files{gap:8px}
  /* ===== P2：报价表单纵向化（sheet-grid 网格块化）===== */
  .sheet-grid{grid-template-columns:1fr;border-left:0}
  .s-row{display:flex;flex-direction:column}
  .s-row .s-label{background:none;border-right:0;justify-content:flex-start;padding:12px 12px 4px}
  .s-row .s-val{padding:2px 12px 12px;align-items:flex-start}
  .sheet-grid input,.sheet-grid select,.sheet-grid textarea{max-width:100%;min-width:0}
  .sheet-grid .tri-input{max-width:100%;flex-wrap:wrap}
  .sheet-grid .tri-input input{min-width:0}
  .sheet-actions button{min-height:44px;padding:10px 14px}
  .fee-grid.fee-base,.fee-grid.fee-mold{grid-template-columns:1fr}
  .fee-pair{flex-wrap:wrap}
  /* ===== P2：报价 chip 加大 ===== */
  .qf-detail .chip{font-size:14px;padding:11px 14px;border-radius:9px}
  .qf-detail .chip-group-nowrap{flex-wrap:wrap;overflow-x:visible;max-width:520px}
  .qf-detail .chip input{width:19px;height:19px}
  .qf-detail .chip-extra{font-size:14px;padding:9px 12px}
  .qf-detail .chip-extra input{font-size:14px;width:84px}
  /* ===== P2：弹窗底部抽屉式 ===== */
  .mz-dialog-overlay{align-items:flex-end;padding:0}
  .mz-dialog{width:100%;max-height:88vh;overflow:auto;border-radius:16px 16px 0 0;padding:18px 16px 22px;animation:mzUp .25s ease}
  @keyframes mzUp{from{transform:translateY(60px);opacity:.4}to{transform:translateY(0);opacity:1}}
  .mz-dialog footer{position:sticky;bottom:0;background:#fff;padding:10px 0 0}
  .mz-dialog footer button{min-height:44px}
  .mz-dialog header button{min-width:44px;min-height:44px}
}
